nara-sdk 1.0.66 → 1.0.67
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 +1 -1
- package/src/idls/nara_quest.json +84 -1
- package/src/idls/nara_quest.ts +84 -1
- package/src/quest.ts +2 -1
package/package.json
CHANGED
package/src/idls/nara_quest.json
CHANGED
|
@@ -224,7 +224,35 @@
|
|
|
224
224
|
"address": "11111111111111111111111111111111"
|
|
225
225
|
}
|
|
226
226
|
],
|
|
227
|
-
"args": [
|
|
227
|
+
"args": [
|
|
228
|
+
{
|
|
229
|
+
"name": "proof_a",
|
|
230
|
+
"type": {
|
|
231
|
+
"array": [
|
|
232
|
+
"u8",
|
|
233
|
+
64
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "proof_b",
|
|
239
|
+
"type": {
|
|
240
|
+
"array": [
|
|
241
|
+
"u8",
|
|
242
|
+
128
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "proof_c",
|
|
248
|
+
"type": {
|
|
249
|
+
"array": [
|
|
250
|
+
"u8",
|
|
251
|
+
64
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]
|
|
228
256
|
},
|
|
229
257
|
{
|
|
230
258
|
"name": "create_question",
|
|
@@ -374,6 +402,61 @@
|
|
|
374
402
|
}
|
|
375
403
|
]
|
|
376
404
|
},
|
|
405
|
+
{
|
|
406
|
+
"name": "expand_config",
|
|
407
|
+
"discriminator": [
|
|
408
|
+
120,
|
|
409
|
+
201,
|
|
410
|
+
195,
|
|
411
|
+
128,
|
|
412
|
+
35,
|
|
413
|
+
202,
|
|
414
|
+
73,
|
|
415
|
+
161
|
|
416
|
+
],
|
|
417
|
+
"accounts": [
|
|
418
|
+
{
|
|
419
|
+
"name": "game_config",
|
|
420
|
+
"writable": true,
|
|
421
|
+
"pda": {
|
|
422
|
+
"seeds": [
|
|
423
|
+
{
|
|
424
|
+
"kind": "const",
|
|
425
|
+
"value": [
|
|
426
|
+
113,
|
|
427
|
+
117,
|
|
428
|
+
101,
|
|
429
|
+
115,
|
|
430
|
+
116,
|
|
431
|
+
95,
|
|
432
|
+
99,
|
|
433
|
+
111,
|
|
434
|
+
110,
|
|
435
|
+
102,
|
|
436
|
+
105,
|
|
437
|
+
103
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "authority",
|
|
445
|
+
"writable": true,
|
|
446
|
+
"signer": true
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "system_program",
|
|
450
|
+
"address": "11111111111111111111111111111111"
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"args": [
|
|
454
|
+
{
|
|
455
|
+
"name": "additional_size",
|
|
456
|
+
"type": "u32"
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
},
|
|
377
460
|
{
|
|
378
461
|
"name": "initialize",
|
|
379
462
|
"discriminator": [
|
package/src/idls/nara_quest.ts
CHANGED
|
@@ -230,7 +230,35 @@ export type NaraQuest = {
|
|
|
230
230
|
"address": "11111111111111111111111111111111"
|
|
231
231
|
}
|
|
232
232
|
],
|
|
233
|
-
"args": [
|
|
233
|
+
"args": [
|
|
234
|
+
{
|
|
235
|
+
"name": "proofA",
|
|
236
|
+
"type": {
|
|
237
|
+
"array": [
|
|
238
|
+
"u8",
|
|
239
|
+
64
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "proofB",
|
|
245
|
+
"type": {
|
|
246
|
+
"array": [
|
|
247
|
+
"u8",
|
|
248
|
+
128
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "proofC",
|
|
254
|
+
"type": {
|
|
255
|
+
"array": [
|
|
256
|
+
"u8",
|
|
257
|
+
64
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
]
|
|
234
262
|
},
|
|
235
263
|
{
|
|
236
264
|
"name": "createQuestion",
|
|
@@ -380,6 +408,61 @@ export type NaraQuest = {
|
|
|
380
408
|
}
|
|
381
409
|
]
|
|
382
410
|
},
|
|
411
|
+
{
|
|
412
|
+
"name": "expandConfig",
|
|
413
|
+
"discriminator": [
|
|
414
|
+
120,
|
|
415
|
+
201,
|
|
416
|
+
195,
|
|
417
|
+
128,
|
|
418
|
+
35,
|
|
419
|
+
202,
|
|
420
|
+
73,
|
|
421
|
+
161
|
|
422
|
+
],
|
|
423
|
+
"accounts": [
|
|
424
|
+
{
|
|
425
|
+
"name": "gameConfig",
|
|
426
|
+
"writable": true,
|
|
427
|
+
"pda": {
|
|
428
|
+
"seeds": [
|
|
429
|
+
{
|
|
430
|
+
"kind": "const",
|
|
431
|
+
"value": [
|
|
432
|
+
113,
|
|
433
|
+
117,
|
|
434
|
+
101,
|
|
435
|
+
115,
|
|
436
|
+
116,
|
|
437
|
+
95,
|
|
438
|
+
99,
|
|
439
|
+
111,
|
|
440
|
+
110,
|
|
441
|
+
102,
|
|
442
|
+
105,
|
|
443
|
+
103
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "authority",
|
|
451
|
+
"writable": true,
|
|
452
|
+
"signer": true
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "systemProgram",
|
|
456
|
+
"address": "11111111111111111111111111111111"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"args": [
|
|
460
|
+
{
|
|
461
|
+
"name": "additionalSize",
|
|
462
|
+
"type": "u32"
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
},
|
|
383
466
|
{
|
|
384
467
|
"name": "initialize",
|
|
385
468
|
"discriminator": [
|
package/src/quest.ts
CHANGED
|
@@ -943,11 +943,12 @@ export async function claimAirdrop(
|
|
|
943
943
|
connection: Connection,
|
|
944
944
|
wallet: Keypair,
|
|
945
945
|
user: PublicKey,
|
|
946
|
+
proof: ZkProof,
|
|
946
947
|
options?: QuestOptions
|
|
947
948
|
): Promise<string> {
|
|
948
949
|
const program = createProgram(connection, wallet, options?.programId);
|
|
949
950
|
const ix = await program.methods
|
|
950
|
-
.claimAirdrop()
|
|
951
|
+
.claimAirdrop(proof.proofA as any, proof.proofB as any, proof.proofC as any)
|
|
951
952
|
.accounts({ user, payer: wallet.publicKey } as any)
|
|
952
953
|
.instruction();
|
|
953
954
|
return sendTx(connection, wallet, [ix]);
|