nara-sdk 1.0.63 → 1.0.65
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
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from "@solana/web3.js";
|
|
13
13
|
import * as anchor from "@coral-xyz/anchor";
|
|
14
14
|
import { Program, AnchorProvider, Wallet } from "@coral-xyz/anchor";
|
|
15
|
+
import BN from "bn.js";
|
|
15
16
|
import { getAssociatedTokenAddressSync, TOKEN_2022_PROGRAM_ID } from "@solana/spl-token";
|
|
16
17
|
import type { NaraAgentRegistry } from "./idls/nara_agent_registry";
|
|
17
18
|
import { DEFAULT_AGENT_REGISTRY_PROGRAM_ID } from "./constants";
|
|
@@ -410,8 +411,8 @@ export async function getConfig(
|
|
|
410
411
|
registerFee: number;
|
|
411
412
|
pointsSelf: number;
|
|
412
413
|
pointsReferral: number;
|
|
413
|
-
|
|
414
|
-
|
|
414
|
+
referralDiscountBps: number;
|
|
415
|
+
referralShareBps: number;
|
|
415
416
|
referralRegisterPoints: number;
|
|
416
417
|
activityReward: number;
|
|
417
418
|
referralActivityReward: number;
|
|
@@ -421,6 +422,9 @@ export async function getConfig(
|
|
|
421
422
|
twitterVerificationPoints: number;
|
|
422
423
|
tweetVerifyReward: number;
|
|
423
424
|
tweetVerifyPoints: number;
|
|
425
|
+
registerFee7: number;
|
|
426
|
+
registerFee6: number;
|
|
427
|
+
registerFee5: number;
|
|
424
428
|
}> {
|
|
425
429
|
const pid = new PublicKey(options?.programId ?? DEFAULT_AGENT_REGISTRY_PROGRAM_ID);
|
|
426
430
|
const configPda = getConfigPda(pid);
|
|
@@ -438,8 +442,8 @@ export async function getConfig(
|
|
|
438
442
|
const registerFee = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
439
443
|
const pointsSelf = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
440
444
|
const pointsReferral = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
441
|
-
const
|
|
442
|
-
const
|
|
445
|
+
const referralDiscountBps = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
446
|
+
const referralShareBps = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
443
447
|
const referralRegisterPoints = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
444
448
|
const activityReward = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
445
449
|
const referralActivityReward = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
@@ -448,8 +452,11 @@ export async function getConfig(
|
|
|
448
452
|
const twitterVerificationReward = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
449
453
|
const twitterVerificationPoints = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
450
454
|
const tweetVerifyReward = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
451
|
-
const tweetVerifyPoints = Number(buf.readBigUInt64LE(offset));
|
|
452
|
-
|
|
455
|
+
const tweetVerifyPoints = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
456
|
+
const registerFee7 = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
457
|
+
const registerFee6 = Number(buf.readBigUInt64LE(offset)); offset += 8;
|
|
458
|
+
const registerFee5 = Number(buf.readBigUInt64LE(offset));
|
|
459
|
+
return { admin, feeVault, pointMint, refereeMint, refereeActivityMint, registerFee, pointsSelf, pointsReferral, referralDiscountBps, referralShareBps, referralRegisterPoints, activityReward, referralActivityReward, twitterVerifier, twitterVerificationFee, twitterVerificationReward, twitterVerificationPoints, tweetVerifyReward, tweetVerifyPoints, registerFee7, registerFee6, registerFee5 };
|
|
453
460
|
}
|
|
454
461
|
|
|
455
462
|
// ─── Agent CRUD ─────────────────────────────────────────────────
|
|
@@ -985,11 +992,11 @@ export async function updateAdmin(
|
|
|
985
992
|
export async function withdrawFees(
|
|
986
993
|
connection: Connection,
|
|
987
994
|
wallet: Keypair,
|
|
988
|
-
amount: number |
|
|
995
|
+
amount: number | BN,
|
|
989
996
|
options?: AgentRegistryOptions
|
|
990
997
|
): Promise<string> {
|
|
991
998
|
const program = createProgram(connection, wallet, options?.programId);
|
|
992
|
-
const amt = typeof amount === "number" ? new
|
|
999
|
+
const amt = typeof amount === "number" ? new BN(amount) : amount;
|
|
993
1000
|
const ix = await program.methods
|
|
994
1001
|
.withdrawFees(amt)
|
|
995
1002
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1003,13 +1010,19 @@ export async function withdrawFees(
|
|
|
1003
1010
|
export async function updateRegisterFee(
|
|
1004
1011
|
connection: Connection,
|
|
1005
1012
|
wallet: Keypair,
|
|
1006
|
-
|
|
1013
|
+
fee: number | BN,
|
|
1014
|
+
fee7: number | BN,
|
|
1015
|
+
fee6: number | BN,
|
|
1016
|
+
fee5: number | BN,
|
|
1007
1017
|
options?: AgentRegistryOptions
|
|
1008
1018
|
): Promise<string> {
|
|
1009
1019
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1010
|
-
const
|
|
1020
|
+
const f = typeof fee === "number" ? new BN(fee) : fee;
|
|
1021
|
+
const f7 = typeof fee7 === "number" ? new BN(fee7) : fee7;
|
|
1022
|
+
const f6 = typeof fee6 === "number" ? new BN(fee6) : fee6;
|
|
1023
|
+
const f5 = typeof fee5 === "number" ? new BN(fee5) : fee5;
|
|
1011
1024
|
const ix = await program.methods
|
|
1012
|
-
.updateRegisterFee(
|
|
1025
|
+
.updateRegisterFee(f, f7, f6, f5)
|
|
1013
1026
|
.accounts({ admin: wallet.publicKey } as any)
|
|
1014
1027
|
.instruction();
|
|
1015
1028
|
return sendTx(connection, wallet, [ix]);
|
|
@@ -1022,13 +1035,13 @@ export async function updateRegisterFee(
|
|
|
1022
1035
|
export async function updatePointsConfig(
|
|
1023
1036
|
connection: Connection,
|
|
1024
1037
|
wallet: Keypair,
|
|
1025
|
-
pointsSelf: number |
|
|
1026
|
-
pointsReferral: number |
|
|
1038
|
+
pointsSelf: number | BN,
|
|
1039
|
+
pointsReferral: number | BN,
|
|
1027
1040
|
options?: AgentRegistryOptions
|
|
1028
1041
|
): Promise<string> {
|
|
1029
1042
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1030
|
-
const ps = typeof pointsSelf === "number" ? new
|
|
1031
|
-
const pr = typeof pointsReferral === "number" ? new
|
|
1043
|
+
const ps = typeof pointsSelf === "number" ? new BN(pointsSelf) : pointsSelf;
|
|
1044
|
+
const pr = typeof pointsReferral === "number" ? new BN(pointsReferral) : pointsReferral;
|
|
1032
1045
|
const ix = await program.methods
|
|
1033
1046
|
.updatePointsConfig(ps, pr)
|
|
1034
1047
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1045,17 +1058,17 @@ export async function updatePointsConfig(
|
|
|
1045
1058
|
export async function updateReferralConfig(
|
|
1046
1059
|
connection: Connection,
|
|
1047
1060
|
wallet: Keypair,
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
referralRegisterPoints: number |
|
|
1061
|
+
referralDiscountBps: number | BN,
|
|
1062
|
+
referralShareBps: number | BN,
|
|
1063
|
+
referralRegisterPoints: number | BN,
|
|
1051
1064
|
options?: AgentRegistryOptions
|
|
1052
1065
|
): Promise<string> {
|
|
1053
1066
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1054
|
-
const
|
|
1055
|
-
const share = typeof
|
|
1056
|
-
const pts = typeof referralRegisterPoints === "number" ? new
|
|
1067
|
+
const discount = typeof referralDiscountBps === "number" ? new BN(referralDiscountBps) : referralDiscountBps;
|
|
1068
|
+
const share = typeof referralShareBps === "number" ? new BN(referralShareBps) : referralShareBps;
|
|
1069
|
+
const pts = typeof referralRegisterPoints === "number" ? new BN(referralRegisterPoints) : referralRegisterPoints;
|
|
1057
1070
|
const ix = await program.methods
|
|
1058
|
-
.updateReferralConfig(
|
|
1071
|
+
.updateReferralConfig(discount, share, pts)
|
|
1059
1072
|
.accounts({ admin: wallet.publicKey } as any)
|
|
1060
1073
|
.instruction();
|
|
1061
1074
|
return sendTx(connection, wallet, [ix]);
|
|
@@ -1069,13 +1082,13 @@ export async function updateReferralConfig(
|
|
|
1069
1082
|
export async function updateActivityConfig(
|
|
1070
1083
|
connection: Connection,
|
|
1071
1084
|
wallet: Keypair,
|
|
1072
|
-
activityReward: number |
|
|
1073
|
-
referralActivityReward: number |
|
|
1085
|
+
activityReward: number | BN,
|
|
1086
|
+
referralActivityReward: number | BN,
|
|
1074
1087
|
options?: AgentRegistryOptions
|
|
1075
1088
|
): Promise<string> {
|
|
1076
1089
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1077
|
-
const ar = typeof activityReward === "number" ? new
|
|
1078
|
-
const rar = typeof referralActivityReward === "number" ? new
|
|
1090
|
+
const ar = typeof activityReward === "number" ? new BN(activityReward) : activityReward;
|
|
1091
|
+
const rar = typeof referralActivityReward === "number" ? new BN(referralActivityReward) : referralActivityReward;
|
|
1079
1092
|
const ix = await program.methods
|
|
1080
1093
|
.updateActivityConfig(ar, rar)
|
|
1081
1094
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1089,11 +1102,11 @@ export async function updateActivityConfig(
|
|
|
1089
1102
|
export async function expandConfig(
|
|
1090
1103
|
connection: Connection,
|
|
1091
1104
|
wallet: Keypair,
|
|
1092
|
-
extendSize: number |
|
|
1105
|
+
extendSize: number | BN,
|
|
1093
1106
|
options?: AgentRegistryOptions
|
|
1094
1107
|
): Promise<string> {
|
|
1095
1108
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1096
|
-
const size = typeof extendSize === "number" ? new
|
|
1109
|
+
const size = typeof extendSize === "number" ? new BN(extendSize) : extendSize;
|
|
1097
1110
|
const ix = await program.methods
|
|
1098
1111
|
.expandConfig(size)
|
|
1099
1112
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1127,15 +1140,15 @@ export async function updateTwitterVerifier(
|
|
|
1127
1140
|
export async function updateTwitterVerificationConfig(
|
|
1128
1141
|
connection: Connection,
|
|
1129
1142
|
wallet: Keypair,
|
|
1130
|
-
fee: number |
|
|
1131
|
-
reward: number |
|
|
1132
|
-
points: number |
|
|
1143
|
+
fee: number | BN,
|
|
1144
|
+
reward: number | BN,
|
|
1145
|
+
points: number | BN,
|
|
1133
1146
|
options?: AgentRegistryOptions
|
|
1134
1147
|
): Promise<string> {
|
|
1135
1148
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1136
|
-
const f = typeof fee === "number" ? new
|
|
1137
|
-
const r = typeof reward === "number" ? new
|
|
1138
|
-
const p = typeof points === "number" ? new
|
|
1149
|
+
const f = typeof fee === "number" ? new BN(fee) : fee;
|
|
1150
|
+
const r = typeof reward === "number" ? new BN(reward) : reward;
|
|
1151
|
+
const p = typeof points === "number" ? new BN(points) : points;
|
|
1139
1152
|
const ix = await program.methods
|
|
1140
1153
|
.updateTwitterVerificationConfig(f, r, p)
|
|
1141
1154
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1151,13 +1164,13 @@ export async function updateTwitterVerificationConfig(
|
|
|
1151
1164
|
export async function updateTweetVerifyConfig(
|
|
1152
1165
|
connection: Connection,
|
|
1153
1166
|
wallet: Keypair,
|
|
1154
|
-
reward: number |
|
|
1155
|
-
points: number |
|
|
1167
|
+
reward: number | BN,
|
|
1168
|
+
points: number | BN,
|
|
1156
1169
|
options?: AgentRegistryOptions
|
|
1157
1170
|
): Promise<string> {
|
|
1158
1171
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1159
|
-
const r = typeof reward === "number" ? new
|
|
1160
|
-
const p = typeof points === "number" ? new
|
|
1172
|
+
const r = typeof reward === "number" ? new BN(reward) : reward;
|
|
1173
|
+
const p = typeof points === "number" ? new BN(points) : points;
|
|
1161
1174
|
const ix = await program.methods
|
|
1162
1175
|
.updateTweetVerifyConfig(r, p)
|
|
1163
1176
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1171,11 +1184,11 @@ export async function updateTweetVerifyConfig(
|
|
|
1171
1184
|
export async function withdrawTwitterVerifyFees(
|
|
1172
1185
|
connection: Connection,
|
|
1173
1186
|
wallet: Keypair,
|
|
1174
|
-
amount: number |
|
|
1187
|
+
amount: number | BN,
|
|
1175
1188
|
options?: AgentRegistryOptions
|
|
1176
1189
|
): Promise<string> {
|
|
1177
1190
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1178
|
-
const amt = typeof amount === "number" ? new
|
|
1191
|
+
const amt = typeof amount === "number" ? new BN(amount) : amount;
|
|
1179
1192
|
const ix = await program.methods
|
|
1180
1193
|
.withdrawTwitterVerifyFees(amt)
|
|
1181
1194
|
.accounts({ admin: wallet.publicKey } as any)
|
|
@@ -1367,7 +1380,7 @@ export async function submitTweet(
|
|
|
1367
1380
|
): Promise<string> {
|
|
1368
1381
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1369
1382
|
const ix = await program.methods
|
|
1370
|
-
.submitTweet(agentId, new
|
|
1383
|
+
.submitTweet(agentId, new BN(tweetId.toString()))
|
|
1371
1384
|
.accounts({ authority: wallet.publicKey } as any)
|
|
1372
1385
|
.instruction();
|
|
1373
1386
|
return sendTx(connection, wallet, [ix]);
|
|
@@ -1484,7 +1497,7 @@ export async function approveTweet(
|
|
|
1484
1497
|
);
|
|
1485
1498
|
|
|
1486
1499
|
const ix = await program.methods
|
|
1487
|
-
.approveTweet(agentId, new
|
|
1500
|
+
.approveTweet(agentId, new BN(tweetId.toString()))
|
|
1488
1501
|
.accounts({
|
|
1489
1502
|
verifier: wallet.publicKey,
|
|
1490
1503
|
authority,
|
|
@@ -3290,11 +3290,11 @@
|
|
|
3290
3290
|
],
|
|
3291
3291
|
"args": [
|
|
3292
3292
|
{
|
|
3293
|
-
"name": "
|
|
3293
|
+
"name": "referral_discount_bps",
|
|
3294
3294
|
"type": "u64"
|
|
3295
3295
|
},
|
|
3296
3296
|
{
|
|
3297
|
-
"name": "
|
|
3297
|
+
"name": "referral_share_bps",
|
|
3298
3298
|
"type": "u64"
|
|
3299
3299
|
},
|
|
3300
3300
|
{
|
|
@@ -3345,7 +3345,19 @@
|
|
|
3345
3345
|
],
|
|
3346
3346
|
"args": [
|
|
3347
3347
|
{
|
|
3348
|
-
"name": "
|
|
3348
|
+
"name": "fee",
|
|
3349
|
+
"type": "u64"
|
|
3350
|
+
},
|
|
3351
|
+
{
|
|
3352
|
+
"name": "fee_7",
|
|
3353
|
+
"type": "u64"
|
|
3354
|
+
},
|
|
3355
|
+
{
|
|
3356
|
+
"name": "fee_6",
|
|
3357
|
+
"type": "u64"
|
|
3358
|
+
},
|
|
3359
|
+
{
|
|
3360
|
+
"name": "fee_5",
|
|
3349
3361
|
"type": "u64"
|
|
3350
3362
|
}
|
|
3351
3363
|
]
|
|
@@ -4154,6 +4166,32 @@
|
|
|
4154
4166
|
74,
|
|
4155
4167
|
39
|
|
4156
4168
|
]
|
|
4169
|
+
},
|
|
4170
|
+
{
|
|
4171
|
+
"name": "TwitterBindRequested",
|
|
4172
|
+
"discriminator": [
|
|
4173
|
+
251,
|
|
4174
|
+
254,
|
|
4175
|
+
188,
|
|
4176
|
+
154,
|
|
4177
|
+
25,
|
|
4178
|
+
126,
|
|
4179
|
+
76,
|
|
4180
|
+
169
|
|
4181
|
+
]
|
|
4182
|
+
},
|
|
4183
|
+
{
|
|
4184
|
+
"name": "TwitterBindResult",
|
|
4185
|
+
"discriminator": [
|
|
4186
|
+
4,
|
|
4187
|
+
160,
|
|
4188
|
+
91,
|
|
4189
|
+
219,
|
|
4190
|
+
142,
|
|
4191
|
+
73,
|
|
4192
|
+
75,
|
|
4193
|
+
215
|
|
4194
|
+
]
|
|
4157
4195
|
}
|
|
4158
4196
|
],
|
|
4159
4197
|
"errors": [
|
|
@@ -4386,6 +4424,11 @@
|
|
|
4386
4424
|
"code": 6045,
|
|
4387
4425
|
"name": "TweetAlreadyApproved",
|
|
4388
4426
|
"msg": "Tweet has already been approved"
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
"code": 6046,
|
|
4430
|
+
"name": "AgentIdReserved",
|
|
4431
|
+
"msg": "Agent ID length <= 4 is reserved for admin only"
|
|
4389
4432
|
}
|
|
4390
4433
|
],
|
|
4391
4434
|
"types": [
|
|
@@ -4675,11 +4718,11 @@
|
|
|
4675
4718
|
"type": "u64"
|
|
4676
4719
|
},
|
|
4677
4720
|
{
|
|
4678
|
-
"name": "
|
|
4721
|
+
"name": "referral_discount_bps",
|
|
4679
4722
|
"type": "u64"
|
|
4680
4723
|
},
|
|
4681
4724
|
{
|
|
4682
|
-
"name": "
|
|
4725
|
+
"name": "referral_share_bps",
|
|
4683
4726
|
"type": "u64"
|
|
4684
4727
|
},
|
|
4685
4728
|
{
|
|
@@ -4718,6 +4761,18 @@
|
|
|
4718
4761
|
"name": "tweet_verify_points",
|
|
4719
4762
|
"type": "u64"
|
|
4720
4763
|
},
|
|
4764
|
+
{
|
|
4765
|
+
"name": "register_fee_7",
|
|
4766
|
+
"type": "u64"
|
|
4767
|
+
},
|
|
4768
|
+
{
|
|
4769
|
+
"name": "register_fee_6",
|
|
4770
|
+
"type": "u64"
|
|
4771
|
+
},
|
|
4772
|
+
{
|
|
4773
|
+
"name": "register_fee_5",
|
|
4774
|
+
"type": "u64"
|
|
4775
|
+
},
|
|
4721
4776
|
{
|
|
4722
4777
|
"name": "_reserved",
|
|
4723
4778
|
"type": {
|
|
@@ -4735,15 +4790,6 @@
|
|
|
4735
4790
|
96
|
|
4736
4791
|
]
|
|
4737
4792
|
}
|
|
4738
|
-
},
|
|
4739
|
-
{
|
|
4740
|
-
"name": "_reserved3",
|
|
4741
|
-
"type": {
|
|
4742
|
-
"array": [
|
|
4743
|
-
"u8",
|
|
4744
|
-
24
|
|
4745
|
-
]
|
|
4746
|
-
}
|
|
4747
4793
|
}
|
|
4748
4794
|
]
|
|
4749
4795
|
}
|
|
@@ -4907,6 +4953,78 @@
|
|
|
4907
4953
|
]
|
|
4908
4954
|
}
|
|
4909
4955
|
},
|
|
4956
|
+
{
|
|
4957
|
+
"name": "TwitterBindRequested",
|
|
4958
|
+
"type": {
|
|
4959
|
+
"kind": "struct",
|
|
4960
|
+
"fields": [
|
|
4961
|
+
{
|
|
4962
|
+
"name": "agent_id",
|
|
4963
|
+
"type": "string"
|
|
4964
|
+
},
|
|
4965
|
+
{
|
|
4966
|
+
"name": "authority",
|
|
4967
|
+
"type": "pubkey"
|
|
4968
|
+
},
|
|
4969
|
+
{
|
|
4970
|
+
"name": "username",
|
|
4971
|
+
"type": "string"
|
|
4972
|
+
},
|
|
4973
|
+
{
|
|
4974
|
+
"name": "fee",
|
|
4975
|
+
"type": "u64"
|
|
4976
|
+
},
|
|
4977
|
+
{
|
|
4978
|
+
"name": "is_first_bind",
|
|
4979
|
+
"type": "bool"
|
|
4980
|
+
},
|
|
4981
|
+
{
|
|
4982
|
+
"name": "timestamp",
|
|
4983
|
+
"type": "i64"
|
|
4984
|
+
}
|
|
4985
|
+
]
|
|
4986
|
+
}
|
|
4987
|
+
},
|
|
4988
|
+
{
|
|
4989
|
+
"name": "TwitterBindResult",
|
|
4990
|
+
"type": {
|
|
4991
|
+
"kind": "struct",
|
|
4992
|
+
"fields": [
|
|
4993
|
+
{
|
|
4994
|
+
"name": "agent_id",
|
|
4995
|
+
"type": "string"
|
|
4996
|
+
},
|
|
4997
|
+
{
|
|
4998
|
+
"name": "authority",
|
|
4999
|
+
"type": "pubkey"
|
|
5000
|
+
},
|
|
5001
|
+
{
|
|
5002
|
+
"name": "username",
|
|
5003
|
+
"type": "string"
|
|
5004
|
+
},
|
|
5005
|
+
{
|
|
5006
|
+
"name": "approved",
|
|
5007
|
+
"type": "bool"
|
|
5008
|
+
},
|
|
5009
|
+
{
|
|
5010
|
+
"name": "fee_refunded",
|
|
5011
|
+
"type": "u64"
|
|
5012
|
+
},
|
|
5013
|
+
{
|
|
5014
|
+
"name": "reward",
|
|
5015
|
+
"type": "u64"
|
|
5016
|
+
},
|
|
5017
|
+
{
|
|
5018
|
+
"name": "points",
|
|
5019
|
+
"type": "u64"
|
|
5020
|
+
},
|
|
5021
|
+
{
|
|
5022
|
+
"name": "timestamp",
|
|
5023
|
+
"type": "i64"
|
|
5024
|
+
}
|
|
5025
|
+
]
|
|
5026
|
+
}
|
|
5027
|
+
},
|
|
4910
5028
|
{
|
|
4911
5029
|
"name": "TwitterHandle",
|
|
4912
5030
|
"serialization": "bytemuck",
|
|
@@ -3296,11 +3296,11 @@ export type NaraAgentRegistry = {
|
|
|
3296
3296
|
],
|
|
3297
3297
|
"args": [
|
|
3298
3298
|
{
|
|
3299
|
-
"name": "
|
|
3299
|
+
"name": "referralDiscountBps",
|
|
3300
3300
|
"type": "u64"
|
|
3301
3301
|
},
|
|
3302
3302
|
{
|
|
3303
|
-
"name": "
|
|
3303
|
+
"name": "referralShareBps",
|
|
3304
3304
|
"type": "u64"
|
|
3305
3305
|
},
|
|
3306
3306
|
{
|
|
@@ -3351,7 +3351,19 @@ export type NaraAgentRegistry = {
|
|
|
3351
3351
|
],
|
|
3352
3352
|
"args": [
|
|
3353
3353
|
{
|
|
3354
|
-
"name": "
|
|
3354
|
+
"name": "fee",
|
|
3355
|
+
"type": "u64"
|
|
3356
|
+
},
|
|
3357
|
+
{
|
|
3358
|
+
"name": "fee7",
|
|
3359
|
+
"type": "u64"
|
|
3360
|
+
},
|
|
3361
|
+
{
|
|
3362
|
+
"name": "fee6",
|
|
3363
|
+
"type": "u64"
|
|
3364
|
+
},
|
|
3365
|
+
{
|
|
3366
|
+
"name": "fee5",
|
|
3355
3367
|
"type": "u64"
|
|
3356
3368
|
}
|
|
3357
3369
|
]
|
|
@@ -4160,6 +4172,32 @@ export type NaraAgentRegistry = {
|
|
|
4160
4172
|
74,
|
|
4161
4173
|
39
|
|
4162
4174
|
]
|
|
4175
|
+
},
|
|
4176
|
+
{
|
|
4177
|
+
"name": "twitterBindRequested",
|
|
4178
|
+
"discriminator": [
|
|
4179
|
+
251,
|
|
4180
|
+
254,
|
|
4181
|
+
188,
|
|
4182
|
+
154,
|
|
4183
|
+
25,
|
|
4184
|
+
126,
|
|
4185
|
+
76,
|
|
4186
|
+
169
|
|
4187
|
+
]
|
|
4188
|
+
},
|
|
4189
|
+
{
|
|
4190
|
+
"name": "twitterBindResult",
|
|
4191
|
+
"discriminator": [
|
|
4192
|
+
4,
|
|
4193
|
+
160,
|
|
4194
|
+
91,
|
|
4195
|
+
219,
|
|
4196
|
+
142,
|
|
4197
|
+
73,
|
|
4198
|
+
75,
|
|
4199
|
+
215
|
|
4200
|
+
]
|
|
4163
4201
|
}
|
|
4164
4202
|
],
|
|
4165
4203
|
"errors": [
|
|
@@ -4392,6 +4430,11 @@ export type NaraAgentRegistry = {
|
|
|
4392
4430
|
"code": 6045,
|
|
4393
4431
|
"name": "tweetAlreadyApproved",
|
|
4394
4432
|
"msg": "Tweet has already been approved"
|
|
4433
|
+
},
|
|
4434
|
+
{
|
|
4435
|
+
"code": 6046,
|
|
4436
|
+
"name": "agentIdReserved",
|
|
4437
|
+
"msg": "Agent ID length <= 4 is reserved for admin only"
|
|
4395
4438
|
}
|
|
4396
4439
|
],
|
|
4397
4440
|
"types": [
|
|
@@ -4681,11 +4724,11 @@ export type NaraAgentRegistry = {
|
|
|
4681
4724
|
"type": "u64"
|
|
4682
4725
|
},
|
|
4683
4726
|
{
|
|
4684
|
-
"name": "
|
|
4727
|
+
"name": "referralDiscountBps",
|
|
4685
4728
|
"type": "u64"
|
|
4686
4729
|
},
|
|
4687
4730
|
{
|
|
4688
|
-
"name": "
|
|
4731
|
+
"name": "referralShareBps",
|
|
4689
4732
|
"type": "u64"
|
|
4690
4733
|
},
|
|
4691
4734
|
{
|
|
@@ -4724,6 +4767,18 @@ export type NaraAgentRegistry = {
|
|
|
4724
4767
|
"name": "tweetVerifyPoints",
|
|
4725
4768
|
"type": "u64"
|
|
4726
4769
|
},
|
|
4770
|
+
{
|
|
4771
|
+
"name": "registerFee7",
|
|
4772
|
+
"type": "u64"
|
|
4773
|
+
},
|
|
4774
|
+
{
|
|
4775
|
+
"name": "registerFee6",
|
|
4776
|
+
"type": "u64"
|
|
4777
|
+
},
|
|
4778
|
+
{
|
|
4779
|
+
"name": "registerFee5",
|
|
4780
|
+
"type": "u64"
|
|
4781
|
+
},
|
|
4727
4782
|
{
|
|
4728
4783
|
"name": "reserved",
|
|
4729
4784
|
"type": {
|
|
@@ -4741,15 +4796,6 @@ export type NaraAgentRegistry = {
|
|
|
4741
4796
|
96
|
|
4742
4797
|
]
|
|
4743
4798
|
}
|
|
4744
|
-
},
|
|
4745
|
-
{
|
|
4746
|
-
"name": "reserved3",
|
|
4747
|
-
"type": {
|
|
4748
|
-
"array": [
|
|
4749
|
-
"u8",
|
|
4750
|
-
24
|
|
4751
|
-
]
|
|
4752
|
-
}
|
|
4753
4799
|
}
|
|
4754
4800
|
]
|
|
4755
4801
|
}
|
|
@@ -4913,6 +4959,78 @@ export type NaraAgentRegistry = {
|
|
|
4913
4959
|
]
|
|
4914
4960
|
}
|
|
4915
4961
|
},
|
|
4962
|
+
{
|
|
4963
|
+
"name": "twitterBindRequested",
|
|
4964
|
+
"type": {
|
|
4965
|
+
"kind": "struct",
|
|
4966
|
+
"fields": [
|
|
4967
|
+
{
|
|
4968
|
+
"name": "agentId",
|
|
4969
|
+
"type": "string"
|
|
4970
|
+
},
|
|
4971
|
+
{
|
|
4972
|
+
"name": "authority",
|
|
4973
|
+
"type": "pubkey"
|
|
4974
|
+
},
|
|
4975
|
+
{
|
|
4976
|
+
"name": "username",
|
|
4977
|
+
"type": "string"
|
|
4978
|
+
},
|
|
4979
|
+
{
|
|
4980
|
+
"name": "fee",
|
|
4981
|
+
"type": "u64"
|
|
4982
|
+
},
|
|
4983
|
+
{
|
|
4984
|
+
"name": "isFirstBind",
|
|
4985
|
+
"type": "bool"
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
"name": "timestamp",
|
|
4989
|
+
"type": "i64"
|
|
4990
|
+
}
|
|
4991
|
+
]
|
|
4992
|
+
}
|
|
4993
|
+
},
|
|
4994
|
+
{
|
|
4995
|
+
"name": "twitterBindResult",
|
|
4996
|
+
"type": {
|
|
4997
|
+
"kind": "struct",
|
|
4998
|
+
"fields": [
|
|
4999
|
+
{
|
|
5000
|
+
"name": "agentId",
|
|
5001
|
+
"type": "string"
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
"name": "authority",
|
|
5005
|
+
"type": "pubkey"
|
|
5006
|
+
},
|
|
5007
|
+
{
|
|
5008
|
+
"name": "username",
|
|
5009
|
+
"type": "string"
|
|
5010
|
+
},
|
|
5011
|
+
{
|
|
5012
|
+
"name": "approved",
|
|
5013
|
+
"type": "bool"
|
|
5014
|
+
},
|
|
5015
|
+
{
|
|
5016
|
+
"name": "feeRefunded",
|
|
5017
|
+
"type": "u64"
|
|
5018
|
+
},
|
|
5019
|
+
{
|
|
5020
|
+
"name": "reward",
|
|
5021
|
+
"type": "u64"
|
|
5022
|
+
},
|
|
5023
|
+
{
|
|
5024
|
+
"name": "points",
|
|
5025
|
+
"type": "u64"
|
|
5026
|
+
},
|
|
5027
|
+
{
|
|
5028
|
+
"name": "timestamp",
|
|
5029
|
+
"type": "i64"
|
|
5030
|
+
}
|
|
5031
|
+
]
|
|
5032
|
+
}
|
|
5033
|
+
},
|
|
4916
5034
|
{
|
|
4917
5035
|
"name": "twitterHandle",
|
|
4918
5036
|
"serialization": "bytemuck",
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
{
|
|
978
978
|
"code": 6000,
|
|
979
979
|
"name": "NameTooShort",
|
|
980
|
-
"msg": "Name too short: min
|
|
980
|
+
"msg": "Name too short: min 4 bytes"
|
|
981
981
|
},
|
|
982
982
|
{
|
|
983
983
|
"code": 6001,
|
|
@@ -1359,7 +1359,7 @@
|
|
|
1359
1359
|
{
|
|
1360
1360
|
"name": "name",
|
|
1361
1361
|
"docs": [
|
|
1362
|
-
"Globally unique name (min
|
|
1362
|
+
"Globally unique name (min 4 bytes, max 32 bytes)."
|
|
1363
1363
|
],
|
|
1364
1364
|
"type": {
|
|
1365
1365
|
"array": [
|
|
@@ -983,7 +983,7 @@ export type NaraSkillsHub = {
|
|
|
983
983
|
{
|
|
984
984
|
"code": 6000,
|
|
985
985
|
"name": "nameTooShort",
|
|
986
|
-
"msg": "Name too short: min
|
|
986
|
+
"msg": "Name too short: min 4 bytes"
|
|
987
987
|
},
|
|
988
988
|
{
|
|
989
989
|
"code": 6001,
|
|
@@ -1365,7 +1365,7 @@ export type NaraSkillsHub = {
|
|
|
1365
1365
|
{
|
|
1366
1366
|
"name": "name",
|
|
1367
1367
|
"docs": [
|
|
1368
|
-
"Globally unique name (min
|
|
1368
|
+
"Globally unique name (min 4 bytes, max 32 bytes)."
|
|
1369
1369
|
],
|
|
1370
1370
|
"type": {
|
|
1371
1371
|
"array": [
|