@iota/graphql-transport 0.0.0-dev-20251015065834

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +248 -0
  2. package/LICENSE +201 -0
  3. package/README.md +104 -0
  4. package/dist/cjs/generated/queries.d.ts +9099 -0
  5. package/dist/cjs/generated/queries.js +3021 -0
  6. package/dist/cjs/generated/queries.js.map +7 -0
  7. package/dist/cjs/index.d.ts +1 -0
  8. package/dist/cjs/index.js +19 -0
  9. package/dist/cjs/index.js.map +7 -0
  10. package/dist/cjs/mappers/bcs.d.ts +4 -0
  11. package/dist/cjs/mappers/bcs.js +71 -0
  12. package/dist/cjs/mappers/bcs.js.map +7 -0
  13. package/dist/cjs/mappers/checkpoint.d.ts +3 -0
  14. package/dist/cjs/mappers/checkpoint.js +64 -0
  15. package/dist/cjs/mappers/checkpoint.js.map +7 -0
  16. package/dist/cjs/mappers/display.d.ts +8 -0
  17. package/dist/cjs/mappers/display.js +43 -0
  18. package/dist/cjs/mappers/display.js.map +7 -0
  19. package/dist/cjs/mappers/move.d.ts +57 -0
  20. package/dist/cjs/mappers/move.js +231 -0
  21. package/dist/cjs/mappers/move.js.map +7 -0
  22. package/dist/cjs/mappers/object.d.ts +10 -0
  23. package/dist/cjs/mappers/object.js +79 -0
  24. package/dist/cjs/mappers/object.js.map +7 -0
  25. package/dist/cjs/mappers/owner.d.ts +3 -0
  26. package/dist/cjs/mappers/owner.js +48 -0
  27. package/dist/cjs/mappers/owner.js.map +7 -0
  28. package/dist/cjs/mappers/stakes.d.ts +3 -0
  29. package/dist/cjs/mappers/stakes.js +48 -0
  30. package/dist/cjs/mappers/stakes.js.map +7 -0
  31. package/dist/cjs/mappers/transaction-block.d.ts +7 -0
  32. package/dist/cjs/mappers/transaction-block.js +487 -0
  33. package/dist/cjs/mappers/transaction-block.js.map +7 -0
  34. package/dist/cjs/mappers/util.d.ts +2 -0
  35. package/dist/cjs/mappers/util.js +31 -0
  36. package/dist/cjs/mappers/util.js.map +7 -0
  37. package/dist/cjs/mappers/validator.d.ts +3 -0
  38. package/dist/cjs/mappers/validator.js +64 -0
  39. package/dist/cjs/mappers/validator.js.map +7 -0
  40. package/dist/cjs/methods.d.ts +19 -0
  41. package/dist/cjs/methods.js +1377 -0
  42. package/dist/cjs/methods.js.map +7 -0
  43. package/dist/cjs/package.json +5 -0
  44. package/dist/cjs/transport.d.ts +44 -0
  45. package/dist/cjs/transport.js +155 -0
  46. package/dist/cjs/transport.js.map +7 -0
  47. package/dist/esm/generated/queries.d.ts +9099 -0
  48. package/dist/esm/generated/queries.js +3001 -0
  49. package/dist/esm/generated/queries.js.map +7 -0
  50. package/dist/esm/index.d.ts +1 -0
  51. package/dist/esm/index.js +2 -0
  52. package/dist/esm/index.js.map +7 -0
  53. package/dist/esm/mappers/bcs.d.ts +4 -0
  54. package/dist/esm/mappers/bcs.js +51 -0
  55. package/dist/esm/mappers/bcs.js.map +7 -0
  56. package/dist/esm/mappers/checkpoint.d.ts +3 -0
  57. package/dist/esm/mappers/checkpoint.js +44 -0
  58. package/dist/esm/mappers/checkpoint.js.map +7 -0
  59. package/dist/esm/mappers/display.d.ts +8 -0
  60. package/dist/esm/mappers/display.js +23 -0
  61. package/dist/esm/mappers/display.js.map +7 -0
  62. package/dist/esm/mappers/move.d.ts +57 -0
  63. package/dist/esm/mappers/move.js +211 -0
  64. package/dist/esm/mappers/move.js.map +7 -0
  65. package/dist/esm/mappers/object.d.ts +10 -0
  66. package/dist/esm/mappers/object.js +59 -0
  67. package/dist/esm/mappers/object.js.map +7 -0
  68. package/dist/esm/mappers/owner.d.ts +3 -0
  69. package/dist/esm/mappers/owner.js +28 -0
  70. package/dist/esm/mappers/owner.js.map +7 -0
  71. package/dist/esm/mappers/stakes.d.ts +3 -0
  72. package/dist/esm/mappers/stakes.js +28 -0
  73. package/dist/esm/mappers/stakes.js.map +7 -0
  74. package/dist/esm/mappers/transaction-block.d.ts +7 -0
  75. package/dist/esm/mappers/transaction-block.js +467 -0
  76. package/dist/esm/mappers/transaction-block.js.map +7 -0
  77. package/dist/esm/mappers/util.d.ts +2 -0
  78. package/dist/esm/mappers/util.js +11 -0
  79. package/dist/esm/mappers/util.js.map +7 -0
  80. package/dist/esm/mappers/validator.d.ts +3 -0
  81. package/dist/esm/mappers/validator.js +44 -0
  82. package/dist/esm/mappers/validator.js.map +7 -0
  83. package/dist/esm/methods.d.ts +19 -0
  84. package/dist/esm/methods.js +1406 -0
  85. package/dist/esm/methods.js.map +7 -0
  86. package/dist/esm/package.json +5 -0
  87. package/dist/esm/transport.d.ts +44 -0
  88. package/dist/esm/transport.js +135 -0
  89. package/dist/esm/transport.js.map +7 -0
  90. package/dist/tsconfig.esm.tsbuildinfo +1 -0
  91. package/dist/tsconfig.tsbuildinfo +1 -0
  92. package/package.json +67 -0
@@ -0,0 +1,3001 @@
1
+ var AddressTransactionBlockRelationship = /* @__PURE__ */ ((AddressTransactionBlockRelationship2) => {
2
+ AddressTransactionBlockRelationship2["Recv"] = "RECV";
3
+ AddressTransactionBlockRelationship2["Sign"] = "SIGN";
4
+ return AddressTransactionBlockRelationship2;
5
+ })(AddressTransactionBlockRelationship || {});
6
+ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
7
+ ExecutionStatus2["Failure"] = "FAILURE";
8
+ ExecutionStatus2["Success"] = "SUCCESS";
9
+ return ExecutionStatus2;
10
+ })(ExecutionStatus || {});
11
+ var Feature = /* @__PURE__ */ ((Feature2) => {
12
+ Feature2["Analytics"] = "ANALYTICS";
13
+ Feature2["Coins"] = "COINS";
14
+ Feature2["DynamicFields"] = "DYNAMIC_FIELDS";
15
+ Feature2["Subscriptions"] = "SUBSCRIPTIONS";
16
+ Feature2["SystemState"] = "SYSTEM_STATE";
17
+ return Feature2;
18
+ })(Feature || {});
19
+ var MoveAbility = /* @__PURE__ */ ((MoveAbility2) => {
20
+ MoveAbility2["Copy"] = "COPY";
21
+ MoveAbility2["Drop"] = "DROP";
22
+ MoveAbility2["Key"] = "KEY";
23
+ MoveAbility2["Store"] = "STORE";
24
+ return MoveAbility2;
25
+ })(MoveAbility || {});
26
+ var MoveVisibility = /* @__PURE__ */ ((MoveVisibility2) => {
27
+ MoveVisibility2["Friend"] = "FRIEND";
28
+ MoveVisibility2["Private"] = "PRIVATE";
29
+ MoveVisibility2["Public"] = "PUBLIC";
30
+ return MoveVisibility2;
31
+ })(MoveVisibility || {});
32
+ var NameFormat = /* @__PURE__ */ ((NameFormat2) => {
33
+ NameFormat2["At"] = "AT";
34
+ NameFormat2["Dot"] = "DOT";
35
+ return NameFormat2;
36
+ })(NameFormat || {});
37
+ var ObjectKind = /* @__PURE__ */ ((ObjectKind2) => {
38
+ ObjectKind2["Indexed"] = "INDEXED";
39
+ ObjectKind2["NotIndexed"] = "NOT_INDEXED";
40
+ ObjectKind2["WrappedOrDeleted"] = "WRAPPED_OR_DELETED";
41
+ return ObjectKind2;
42
+ })(ObjectKind || {});
43
+ var StakeStatus = /* @__PURE__ */ ((StakeStatus2) => {
44
+ StakeStatus2["Active"] = "ACTIVE";
45
+ StakeStatus2["Pending"] = "PENDING";
46
+ StakeStatus2["Unstaked"] = "UNSTAKED";
47
+ return StakeStatus2;
48
+ })(StakeStatus || {});
49
+ var TransactionBlockKindInput = /* @__PURE__ */ ((TransactionBlockKindInput2) => {
50
+ TransactionBlockKindInput2["AuthenticatorStateUpdateV1"] = "AUTHENTICATOR_STATE_UPDATE_V1";
51
+ TransactionBlockKindInput2["ConsensusCommitPrologueV1"] = "CONSENSUS_COMMIT_PROLOGUE_V1";
52
+ TransactionBlockKindInput2["EndOfEpochTx"] = "END_OF_EPOCH_TX";
53
+ TransactionBlockKindInput2["Genesis"] = "GENESIS";
54
+ TransactionBlockKindInput2["ProgrammableTx"] = "PROGRAMMABLE_TX";
55
+ TransactionBlockKindInput2["RandomnessStateUpdate"] = "RANDOMNESS_STATE_UPDATE";
56
+ TransactionBlockKindInput2["SystemTx"] = "SYSTEM_TX";
57
+ return TransactionBlockKindInput2;
58
+ })(TransactionBlockKindInput || {});
59
+ var ZkLoginIntentScope = /* @__PURE__ */ ((ZkLoginIntentScope2) => {
60
+ ZkLoginIntentScope2["PersonalMessage"] = "PERSONAL_MESSAGE";
61
+ ZkLoginIntentScope2["TransactionData"] = "TRANSACTION_DATA";
62
+ return ZkLoginIntentScope2;
63
+ })(ZkLoginIntentScope || {});
64
+ class TypedDocumentString extends String {
65
+ constructor(value, __meta__) {
66
+ super(value);
67
+ this.value = value;
68
+ this.__meta__ = __meta__;
69
+ }
70
+ toString() {
71
+ return this.value;
72
+ }
73
+ }
74
+ const Rpc_Checkpoint_FieldsFragmentDoc = new TypedDocumentString(`
75
+ fragment RPC_Checkpoint_Fields on Checkpoint {
76
+ digest
77
+ epoch {
78
+ epochId
79
+ }
80
+ rollingGasSummary {
81
+ computationCost
82
+ computationCostBurned
83
+ storageCost
84
+ storageRebate
85
+ nonRefundableStorageFee
86
+ }
87
+ networkTotalTransactions
88
+ previousCheckpointDigest
89
+ sequenceNumber
90
+ timestamp
91
+ validatorSignatures
92
+ transactionBlocks {
93
+ pageInfo {
94
+ hasNextPage
95
+ endCursor
96
+ }
97
+ nodes {
98
+ digest
99
+ }
100
+ }
101
+ endOfEpoch: transactionBlocks(last: 1, filter: {kind: END_OF_EPOCH_TX}) {
102
+ nodes {
103
+ kind {
104
+ __typename
105
+ ... on EndOfEpochTransaction {
106
+ transactions(last: 1) {
107
+ nodes {
108
+ __typename
109
+ ... on ChangeEpochTransactionV2 {
110
+ epoch {
111
+ validatorSet {
112
+ activeValidators {
113
+ pageInfo {
114
+ hasNextPage
115
+ endCursor
116
+ }
117
+ nodes {
118
+ credentials {
119
+ authorityPubKey
120
+ }
121
+ votingPower
122
+ }
123
+ }
124
+ committeeMembers {
125
+ pageInfo {
126
+ hasNextPage
127
+ endCursor
128
+ }
129
+ nodes {
130
+ credentials {
131
+ authorityPubKey
132
+ }
133
+ votingPower
134
+ }
135
+ }
136
+ }
137
+ protocolConfigs {
138
+ protocolVersion
139
+ }
140
+ epochId
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ `, { "fragmentName": "RPC_Checkpoint_Fields" });
151
+ const Rpc_Credential_FieldsFragmentDoc = new TypedDocumentString(`
152
+ fragment RPC_CREDENTIAL_FIELDS on ValidatorCredentials {
153
+ netAddress
154
+ networkPubKey
155
+ p2PAddress
156
+ primaryAddress
157
+ authorityPubKey
158
+ proofOfPossession
159
+ protocolPubKey
160
+ }
161
+ `, { "fragmentName": "RPC_CREDENTIAL_FIELDS" });
162
+ const Rpc_Validator_FieldsFragmentDoc = new TypedDocumentString(`
163
+ fragment RPC_VALIDATOR_FIELDS on Validator {
164
+ atRisk
165
+ commissionRate
166
+ exchangeRatesSize
167
+ exchangeRates {
168
+ contents {
169
+ json
170
+ }
171
+ address
172
+ }
173
+ description
174
+ gasPrice
175
+ imageUrl
176
+ name
177
+ credentials {
178
+ ...RPC_CREDENTIAL_FIELDS
179
+ }
180
+ nextEpochCommissionRate
181
+ nextEpochGasPrice
182
+ nextEpochCredentials {
183
+ ...RPC_CREDENTIAL_FIELDS
184
+ }
185
+ nextEpochStake
186
+ nextEpochCommissionRate
187
+ operationCap {
188
+ address
189
+ }
190
+ pendingPoolTokenWithdraw
191
+ pendingStake
192
+ pendingTotalIotaWithdraw
193
+ poolTokenBalance
194
+ projectUrl
195
+ rewardsPool
196
+ stakingPool {
197
+ address
198
+ }
199
+ stakingPoolActivationEpoch
200
+ stakingPoolIotaBalance
201
+ address {
202
+ address
203
+ }
204
+ votingPower
205
+ }
206
+ fragment RPC_CREDENTIAL_FIELDS on ValidatorCredentials {
207
+ netAddress
208
+ networkPubKey
209
+ p2PAddress
210
+ primaryAddress
211
+ authorityPubKey
212
+ proofOfPossession
213
+ protocolPubKey
214
+ }`, { "fragmentName": "RPC_VALIDATOR_FIELDS" });
215
+ const Rpc_Move_Struct_FieldsFragmentDoc = new TypedDocumentString(`
216
+ fragment RPC_MOVE_STRUCT_FIELDS on MoveStruct {
217
+ name
218
+ abilities
219
+ fields {
220
+ name
221
+ type {
222
+ signature
223
+ }
224
+ }
225
+ typeParameters {
226
+ isPhantom
227
+ constraints
228
+ }
229
+ }
230
+ `, { "fragmentName": "RPC_MOVE_STRUCT_FIELDS" });
231
+ const Rpc_Move_Function_FieldsFragmentDoc = new TypedDocumentString(`
232
+ fragment RPC_MOVE_FUNCTION_FIELDS on MoveFunction {
233
+ name
234
+ visibility
235
+ isEntry
236
+ parameters {
237
+ signature
238
+ }
239
+ typeParameters {
240
+ constraints
241
+ }
242
+ return {
243
+ repr
244
+ signature
245
+ }
246
+ }
247
+ `, { "fragmentName": "RPC_MOVE_FUNCTION_FIELDS" });
248
+ const Rpc_Move_Module_FieldsFragmentDoc = new TypedDocumentString(`
249
+ fragment RPC_MOVE_MODULE_FIELDS on MoveModule {
250
+ name
251
+ friends {
252
+ pageInfo {
253
+ hasNextPage
254
+ endCursor
255
+ }
256
+ nodes {
257
+ name
258
+ package {
259
+ address
260
+ }
261
+ }
262
+ }
263
+ structs {
264
+ pageInfo {
265
+ hasNextPage
266
+ endCursor
267
+ }
268
+ nodes {
269
+ ...RPC_MOVE_STRUCT_FIELDS
270
+ }
271
+ }
272
+ fileFormatVersion
273
+ functions {
274
+ pageInfo {
275
+ hasNextPage
276
+ endCursor
277
+ }
278
+ nodes {
279
+ ...RPC_MOVE_FUNCTION_FIELDS
280
+ }
281
+ }
282
+ }
283
+ fragment RPC_MOVE_FUNCTION_FIELDS on MoveFunction {
284
+ name
285
+ visibility
286
+ isEntry
287
+ parameters {
288
+ signature
289
+ }
290
+ typeParameters {
291
+ constraints
292
+ }
293
+ return {
294
+ repr
295
+ signature
296
+ }
297
+ }
298
+ fragment RPC_MOVE_STRUCT_FIELDS on MoveStruct {
299
+ name
300
+ abilities
301
+ fields {
302
+ name
303
+ type {
304
+ signature
305
+ }
306
+ }
307
+ typeParameters {
308
+ isPhantom
309
+ constraints
310
+ }
311
+ }`, { "fragmentName": "RPC_MOVE_MODULE_FIELDS" });
312
+ const Rpc_Object_Owner_FieldsFragmentDoc = new TypedDocumentString(`
313
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
314
+ __typename
315
+ ... on AddressOwner {
316
+ owner {
317
+ asObject {
318
+ address
319
+ }
320
+ asAddress {
321
+ address
322
+ }
323
+ }
324
+ }
325
+ ... on Parent {
326
+ parent {
327
+ address
328
+ }
329
+ }
330
+ ... on Shared {
331
+ initialSharedVersion
332
+ }
333
+ }
334
+ `, { "fragmentName": "RPC_OBJECT_OWNER_FIELDS" });
335
+ const Rpc_Object_FieldsFragmentDoc = new TypedDocumentString(`
336
+ fragment RPC_OBJECT_FIELDS on Object {
337
+ objectId: address
338
+ version
339
+ asMoveObject @include(if: $showType) {
340
+ contents {
341
+ type {
342
+ repr
343
+ }
344
+ }
345
+ }
346
+ asMoveObject @include(if: $showContent) {
347
+ contents {
348
+ data
349
+ type {
350
+ repr
351
+ layout
352
+ signature
353
+ }
354
+ }
355
+ }
356
+ asMoveObject @include(if: $showBcs) {
357
+ contents {
358
+ bcs
359
+ type {
360
+ repr
361
+ }
362
+ }
363
+ }
364
+ owner @include(if: $showOwner) {
365
+ ...RPC_OBJECT_OWNER_FIELDS
366
+ }
367
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
368
+ digest
369
+ }
370
+ storageRebate @include(if: $showStorageRebate)
371
+ digest
372
+ version
373
+ display @include(if: $showDisplay) {
374
+ key
375
+ value
376
+ error
377
+ }
378
+ }
379
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
380
+ __typename
381
+ ... on AddressOwner {
382
+ owner {
383
+ asObject {
384
+ address
385
+ }
386
+ asAddress {
387
+ address
388
+ }
389
+ }
390
+ }
391
+ ... on Parent {
392
+ parent {
393
+ address
394
+ }
395
+ }
396
+ ... on Shared {
397
+ initialSharedVersion
398
+ }
399
+ }`, { "fragmentName": "RPC_OBJECT_FIELDS" });
400
+ const Rpc_Move_Object_FieldsFragmentDoc = new TypedDocumentString(`
401
+ fragment RPC_MOVE_OBJECT_FIELDS on MoveObject {
402
+ objectId: address
403
+ bcs @include(if: $showBcs)
404
+ contents @include(if: $showType) {
405
+ type {
406
+ repr
407
+ }
408
+ }
409
+ contents @include(if: $showContent) {
410
+ data
411
+ type {
412
+ repr
413
+ layout
414
+ signature
415
+ }
416
+ }
417
+ contents @include(if: $showBcs) {
418
+ bcs
419
+ type {
420
+ repr
421
+ }
422
+ }
423
+ owner @include(if: $showOwner) {
424
+ ...RPC_OBJECT_OWNER_FIELDS
425
+ }
426
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
427
+ digest
428
+ }
429
+ storageRebate @include(if: $showStorageRebate)
430
+ digest
431
+ version
432
+ display @include(if: $showDisplay) {
433
+ key
434
+ value
435
+ error
436
+ }
437
+ }
438
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
439
+ __typename
440
+ ... on AddressOwner {
441
+ owner {
442
+ asObject {
443
+ address
444
+ }
445
+ asAddress {
446
+ address
447
+ }
448
+ }
449
+ }
450
+ ... on Parent {
451
+ parent {
452
+ address
453
+ }
454
+ }
455
+ ... on Shared {
456
+ initialSharedVersion
457
+ }
458
+ }`, { "fragmentName": "RPC_MOVE_OBJECT_FIELDS" });
459
+ const Rpc_Stake_FieldsFragmentDoc = new TypedDocumentString(`
460
+ fragment RPC_STAKE_FIELDS on StakedIota {
461
+ principal
462
+ activatedEpoch {
463
+ epochId
464
+ referenceGasPrice
465
+ }
466
+ stakeStatus
467
+ requestedEpoch {
468
+ epochId
469
+ }
470
+ activatedEpoch {
471
+ epochId
472
+ }
473
+ contents {
474
+ json
475
+ }
476
+ address
477
+ estimatedReward
478
+ }
479
+ `, { "fragmentName": "RPC_STAKE_FIELDS" });
480
+ const Rpc_Events_FieldsFragmentDoc = new TypedDocumentString(`
481
+ fragment RPC_EVENTS_FIELDS on Event {
482
+ sendingModule {
483
+ package {
484
+ address
485
+ }
486
+ name
487
+ }
488
+ sender {
489
+ address
490
+ }
491
+ type {
492
+ repr
493
+ }
494
+ json
495
+ bcs
496
+ timestamp
497
+ }
498
+ `, { "fragmentName": "RPC_EVENTS_FIELDS" });
499
+ const Paginate_Transaction_ListsFragmentDoc = new TypedDocumentString(`
500
+ fragment PAGINATE_TRANSACTION_LISTS on TransactionBlock {
501
+ effects {
502
+ events(after: $afterEvents) @include(if: $hasMoreEvents) {
503
+ pageInfo {
504
+ hasNextPage
505
+ endCursor
506
+ }
507
+ nodes {
508
+ ...RPC_EVENTS_FIELDS
509
+ }
510
+ }
511
+ balanceChanges(after: $afterBalanceChanges) @include(if: $hasMoreBalanceChanges) {
512
+ pageInfo {
513
+ hasNextPage
514
+ endCursor
515
+ }
516
+ nodes {
517
+ coinType {
518
+ repr
519
+ }
520
+ owner {
521
+ asObject {
522
+ address
523
+ }
524
+ asAddress {
525
+ address
526
+ }
527
+ }
528
+ amount
529
+ }
530
+ }
531
+ objectChanges(after: $afterObjectChanges) @include(if: $hasMoreObjectChanges) {
532
+ pageInfo {
533
+ hasNextPage
534
+ endCursor
535
+ }
536
+ nodes {
537
+ address
538
+ inputState {
539
+ version
540
+ asMoveObject {
541
+ contents {
542
+ type {
543
+ repr
544
+ }
545
+ }
546
+ }
547
+ }
548
+ outputState {
549
+ asMoveObject {
550
+ contents {
551
+ type {
552
+ repr
553
+ }
554
+ }
555
+ }
556
+ asMovePackage {
557
+ modules(first: 10) {
558
+ nodes {
559
+ name
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ }
566
+ }
567
+ }
568
+ fragment RPC_EVENTS_FIELDS on Event {
569
+ sendingModule {
570
+ package {
571
+ address
572
+ }
573
+ name
574
+ }
575
+ sender {
576
+ address
577
+ }
578
+ type {
579
+ repr
580
+ }
581
+ json
582
+ bcs
583
+ timestamp
584
+ }`, { "fragmentName": "PAGINATE_TRANSACTION_LISTS" });
585
+ const Rpc_Transaction_FieldsFragmentDoc = new TypedDocumentString(`
586
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
587
+ digest
588
+ rawTransaction: bcs @include(if: $showInput)
589
+ rawTransaction: bcs @include(if: $showRawInput)
590
+ sender {
591
+ address
592
+ }
593
+ signatures
594
+ effects {
595
+ bcs @include(if: $showEffects)
596
+ bcs @include(if: $showObjectChanges)
597
+ bcs @include(if: $showRawEffects)
598
+ events @include(if: $showEvents) {
599
+ pageInfo {
600
+ hasNextPage
601
+ endCursor
602
+ }
603
+ nodes {
604
+ ...RPC_EVENTS_FIELDS
605
+ }
606
+ }
607
+ checkpoint {
608
+ sequenceNumber
609
+ }
610
+ timestamp
611
+ balanceChanges @include(if: $showBalanceChanges) {
612
+ pageInfo {
613
+ hasNextPage
614
+ endCursor
615
+ }
616
+ nodes {
617
+ coinType {
618
+ repr
619
+ }
620
+ owner {
621
+ asObject {
622
+ address
623
+ }
624
+ asAddress {
625
+ address
626
+ }
627
+ }
628
+ amount
629
+ }
630
+ }
631
+ objectChanges @include(if: $showObjectChanges) {
632
+ pageInfo {
633
+ hasNextPage
634
+ endCursor
635
+ }
636
+ nodes {
637
+ address
638
+ inputState {
639
+ version
640
+ asMoveObject {
641
+ contents {
642
+ type {
643
+ repr
644
+ }
645
+ }
646
+ }
647
+ }
648
+ outputState {
649
+ asMoveObject {
650
+ contents {
651
+ type {
652
+ repr
653
+ }
654
+ }
655
+ }
656
+ asMovePackage {
657
+ modules(first: 10) {
658
+ nodes {
659
+ name
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ }
666
+ }
667
+ }
668
+ fragment RPC_EVENTS_FIELDS on Event {
669
+ sendingModule {
670
+ package {
671
+ address
672
+ }
673
+ name
674
+ }
675
+ sender {
676
+ address
677
+ }
678
+ type {
679
+ repr
680
+ }
681
+ json
682
+ bcs
683
+ timestamp
684
+ }`, { "fragmentName": "RPC_TRANSACTION_FIELDS" });
685
+ const GetCheckpointDocument = new TypedDocumentString(`
686
+ query getCheckpoint($id: CheckpointId) {
687
+ checkpoint(id: $id) {
688
+ ...RPC_Checkpoint_Fields
689
+ }
690
+ }
691
+ fragment RPC_Checkpoint_Fields on Checkpoint {
692
+ digest
693
+ epoch {
694
+ epochId
695
+ }
696
+ rollingGasSummary {
697
+ computationCost
698
+ computationCostBurned
699
+ storageCost
700
+ storageRebate
701
+ nonRefundableStorageFee
702
+ }
703
+ networkTotalTransactions
704
+ previousCheckpointDigest
705
+ sequenceNumber
706
+ timestamp
707
+ validatorSignatures
708
+ transactionBlocks {
709
+ pageInfo {
710
+ hasNextPage
711
+ endCursor
712
+ }
713
+ nodes {
714
+ digest
715
+ }
716
+ }
717
+ endOfEpoch: transactionBlocks(last: 1, filter: {kind: END_OF_EPOCH_TX}) {
718
+ nodes {
719
+ kind {
720
+ __typename
721
+ ... on EndOfEpochTransaction {
722
+ transactions(last: 1) {
723
+ nodes {
724
+ __typename
725
+ ... on ChangeEpochTransactionV2 {
726
+ epoch {
727
+ validatorSet {
728
+ activeValidators {
729
+ pageInfo {
730
+ hasNextPage
731
+ endCursor
732
+ }
733
+ nodes {
734
+ credentials {
735
+ authorityPubKey
736
+ }
737
+ votingPower
738
+ }
739
+ }
740
+ committeeMembers {
741
+ pageInfo {
742
+ hasNextPage
743
+ endCursor
744
+ }
745
+ nodes {
746
+ credentials {
747
+ authorityPubKey
748
+ }
749
+ votingPower
750
+ }
751
+ }
752
+ }
753
+ protocolConfigs {
754
+ protocolVersion
755
+ }
756
+ epochId
757
+ }
758
+ }
759
+ }
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+ }`);
766
+ const GetCheckpointsDocument = new TypedDocumentString(`
767
+ query getCheckpoints($first: Int, $before: String, $last: Int, $after: String) {
768
+ checkpoints(first: $first, after: $after, last: $last, before: $before) {
769
+ pageInfo {
770
+ startCursor
771
+ endCursor
772
+ hasNextPage
773
+ hasPreviousPage
774
+ }
775
+ nodes {
776
+ ...RPC_Checkpoint_Fields
777
+ }
778
+ }
779
+ }
780
+ fragment RPC_Checkpoint_Fields on Checkpoint {
781
+ digest
782
+ epoch {
783
+ epochId
784
+ }
785
+ rollingGasSummary {
786
+ computationCost
787
+ computationCostBurned
788
+ storageCost
789
+ storageRebate
790
+ nonRefundableStorageFee
791
+ }
792
+ networkTotalTransactions
793
+ previousCheckpointDigest
794
+ sequenceNumber
795
+ timestamp
796
+ validatorSignatures
797
+ transactionBlocks {
798
+ pageInfo {
799
+ hasNextPage
800
+ endCursor
801
+ }
802
+ nodes {
803
+ digest
804
+ }
805
+ }
806
+ endOfEpoch: transactionBlocks(last: 1, filter: {kind: END_OF_EPOCH_TX}) {
807
+ nodes {
808
+ kind {
809
+ __typename
810
+ ... on EndOfEpochTransaction {
811
+ transactions(last: 1) {
812
+ nodes {
813
+ __typename
814
+ ... on ChangeEpochTransactionV2 {
815
+ epoch {
816
+ validatorSet {
817
+ activeValidators {
818
+ pageInfo {
819
+ hasNextPage
820
+ endCursor
821
+ }
822
+ nodes {
823
+ credentials {
824
+ authorityPubKey
825
+ }
826
+ votingPower
827
+ }
828
+ }
829
+ committeeMembers {
830
+ pageInfo {
831
+ hasNextPage
832
+ endCursor
833
+ }
834
+ nodes {
835
+ credentials {
836
+ authorityPubKey
837
+ }
838
+ votingPower
839
+ }
840
+ }
841
+ }
842
+ protocolConfigs {
843
+ protocolVersion
844
+ }
845
+ epochId
846
+ }
847
+ }
848
+ }
849
+ }
850
+ }
851
+ }
852
+ }
853
+ }
854
+ }`);
855
+ const PaginateCheckpointTransactionBlocksDocument = new TypedDocumentString(`
856
+ query paginateCheckpointTransactionBlocks($id: CheckpointId, $after: String) {
857
+ checkpoint(id: $id) {
858
+ transactionBlocks(after: $after) {
859
+ pageInfo {
860
+ hasNextPage
861
+ endCursor
862
+ }
863
+ nodes {
864
+ digest
865
+ }
866
+ }
867
+ }
868
+ }
869
+ `);
870
+ const DevInspectTransactionBlockDocument = new TypedDocumentString(`
871
+ query devInspectTransactionBlock($txBytes: String!, $txMeta: TransactionMetadata!, $showBalanceChanges: Boolean = false, $showEffects: Boolean = false, $showRawEffects: Boolean = false, $showEvents: Boolean = false, $showInput: Boolean = false, $showObjectChanges: Boolean = false, $showRawInput: Boolean = false) {
872
+ dryRunTransactionBlock(txBytes: $txBytes, txMeta: $txMeta) {
873
+ error
874
+ results {
875
+ mutatedReferences {
876
+ input {
877
+ __typename
878
+ ... on Input {
879
+ inputIndex: ix
880
+ }
881
+ ... on Result {
882
+ cmd
883
+ resultIndex: ix
884
+ }
885
+ }
886
+ type {
887
+ repr
888
+ }
889
+ bcs
890
+ }
891
+ returnValues {
892
+ type {
893
+ repr
894
+ }
895
+ bcs
896
+ }
897
+ }
898
+ transaction {
899
+ ...RPC_TRANSACTION_FIELDS
900
+ }
901
+ }
902
+ }
903
+ fragment RPC_EVENTS_FIELDS on Event {
904
+ sendingModule {
905
+ package {
906
+ address
907
+ }
908
+ name
909
+ }
910
+ sender {
911
+ address
912
+ }
913
+ type {
914
+ repr
915
+ }
916
+ json
917
+ bcs
918
+ timestamp
919
+ }
920
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
921
+ digest
922
+ rawTransaction: bcs @include(if: $showInput)
923
+ rawTransaction: bcs @include(if: $showRawInput)
924
+ sender {
925
+ address
926
+ }
927
+ signatures
928
+ effects {
929
+ bcs @include(if: $showEffects)
930
+ bcs @include(if: $showObjectChanges)
931
+ bcs @include(if: $showRawEffects)
932
+ events @include(if: $showEvents) {
933
+ pageInfo {
934
+ hasNextPage
935
+ endCursor
936
+ }
937
+ nodes {
938
+ ...RPC_EVENTS_FIELDS
939
+ }
940
+ }
941
+ checkpoint {
942
+ sequenceNumber
943
+ }
944
+ timestamp
945
+ balanceChanges @include(if: $showBalanceChanges) {
946
+ pageInfo {
947
+ hasNextPage
948
+ endCursor
949
+ }
950
+ nodes {
951
+ coinType {
952
+ repr
953
+ }
954
+ owner {
955
+ asObject {
956
+ address
957
+ }
958
+ asAddress {
959
+ address
960
+ }
961
+ }
962
+ amount
963
+ }
964
+ }
965
+ objectChanges @include(if: $showObjectChanges) {
966
+ pageInfo {
967
+ hasNextPage
968
+ endCursor
969
+ }
970
+ nodes {
971
+ address
972
+ inputState {
973
+ version
974
+ asMoveObject {
975
+ contents {
976
+ type {
977
+ repr
978
+ }
979
+ }
980
+ }
981
+ }
982
+ outputState {
983
+ asMoveObject {
984
+ contents {
985
+ type {
986
+ repr
987
+ }
988
+ }
989
+ }
990
+ asMovePackage {
991
+ modules(first: 10) {
992
+ nodes {
993
+ name
994
+ }
995
+ }
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ }
1001
+ }`);
1002
+ const DryRunTransactionBlockDocument = new TypedDocumentString(`
1003
+ query dryRunTransactionBlock($txBytes: String!, $showBalanceChanges: Boolean = false, $showEffects: Boolean = false, $showRawEffects: Boolean = false, $showEvents: Boolean = false, $showInput: Boolean = false, $showObjectChanges: Boolean = false, $showRawInput: Boolean = false) {
1004
+ dryRunTransactionBlock(txBytes: $txBytes) {
1005
+ error
1006
+ transaction {
1007
+ ...RPC_TRANSACTION_FIELDS
1008
+ }
1009
+ }
1010
+ }
1011
+ fragment RPC_EVENTS_FIELDS on Event {
1012
+ sendingModule {
1013
+ package {
1014
+ address
1015
+ }
1016
+ name
1017
+ }
1018
+ sender {
1019
+ address
1020
+ }
1021
+ type {
1022
+ repr
1023
+ }
1024
+ json
1025
+ bcs
1026
+ timestamp
1027
+ }
1028
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
1029
+ digest
1030
+ rawTransaction: bcs @include(if: $showInput)
1031
+ rawTransaction: bcs @include(if: $showRawInput)
1032
+ sender {
1033
+ address
1034
+ }
1035
+ signatures
1036
+ effects {
1037
+ bcs @include(if: $showEffects)
1038
+ bcs @include(if: $showObjectChanges)
1039
+ bcs @include(if: $showRawEffects)
1040
+ events @include(if: $showEvents) {
1041
+ pageInfo {
1042
+ hasNextPage
1043
+ endCursor
1044
+ }
1045
+ nodes {
1046
+ ...RPC_EVENTS_FIELDS
1047
+ }
1048
+ }
1049
+ checkpoint {
1050
+ sequenceNumber
1051
+ }
1052
+ timestamp
1053
+ balanceChanges @include(if: $showBalanceChanges) {
1054
+ pageInfo {
1055
+ hasNextPage
1056
+ endCursor
1057
+ }
1058
+ nodes {
1059
+ coinType {
1060
+ repr
1061
+ }
1062
+ owner {
1063
+ asObject {
1064
+ address
1065
+ }
1066
+ asAddress {
1067
+ address
1068
+ }
1069
+ }
1070
+ amount
1071
+ }
1072
+ }
1073
+ objectChanges @include(if: $showObjectChanges) {
1074
+ pageInfo {
1075
+ hasNextPage
1076
+ endCursor
1077
+ }
1078
+ nodes {
1079
+ address
1080
+ inputState {
1081
+ version
1082
+ asMoveObject {
1083
+ contents {
1084
+ type {
1085
+ repr
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ outputState {
1091
+ asMoveObject {
1092
+ contents {
1093
+ type {
1094
+ repr
1095
+ }
1096
+ }
1097
+ }
1098
+ asMovePackage {
1099
+ modules(first: 10) {
1100
+ nodes {
1101
+ name
1102
+ }
1103
+ }
1104
+ }
1105
+ }
1106
+ }
1107
+ }
1108
+ }
1109
+ }`);
1110
+ const ExecuteTransactionBlockDocument = new TypedDocumentString(`
1111
+ mutation executeTransactionBlock($txBytes: String!, $signatures: [String!]!, $showBalanceChanges: Boolean = false, $showEffects: Boolean = false, $showRawEffects: Boolean = false, $showEvents: Boolean = false, $showInput: Boolean = false, $showObjectChanges: Boolean = false, $showRawInput: Boolean = false) {
1112
+ executeTransactionBlock(txBytes: $txBytes, signatures: $signatures) {
1113
+ errors
1114
+ effects {
1115
+ transactionBlock {
1116
+ ...RPC_TRANSACTION_FIELDS
1117
+ }
1118
+ }
1119
+ }
1120
+ }
1121
+ fragment RPC_EVENTS_FIELDS on Event {
1122
+ sendingModule {
1123
+ package {
1124
+ address
1125
+ }
1126
+ name
1127
+ }
1128
+ sender {
1129
+ address
1130
+ }
1131
+ type {
1132
+ repr
1133
+ }
1134
+ json
1135
+ bcs
1136
+ timestamp
1137
+ }
1138
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
1139
+ digest
1140
+ rawTransaction: bcs @include(if: $showInput)
1141
+ rawTransaction: bcs @include(if: $showRawInput)
1142
+ sender {
1143
+ address
1144
+ }
1145
+ signatures
1146
+ effects {
1147
+ bcs @include(if: $showEffects)
1148
+ bcs @include(if: $showObjectChanges)
1149
+ bcs @include(if: $showRawEffects)
1150
+ events @include(if: $showEvents) {
1151
+ pageInfo {
1152
+ hasNextPage
1153
+ endCursor
1154
+ }
1155
+ nodes {
1156
+ ...RPC_EVENTS_FIELDS
1157
+ }
1158
+ }
1159
+ checkpoint {
1160
+ sequenceNumber
1161
+ }
1162
+ timestamp
1163
+ balanceChanges @include(if: $showBalanceChanges) {
1164
+ pageInfo {
1165
+ hasNextPage
1166
+ endCursor
1167
+ }
1168
+ nodes {
1169
+ coinType {
1170
+ repr
1171
+ }
1172
+ owner {
1173
+ asObject {
1174
+ address
1175
+ }
1176
+ asAddress {
1177
+ address
1178
+ }
1179
+ }
1180
+ amount
1181
+ }
1182
+ }
1183
+ objectChanges @include(if: $showObjectChanges) {
1184
+ pageInfo {
1185
+ hasNextPage
1186
+ endCursor
1187
+ }
1188
+ nodes {
1189
+ address
1190
+ inputState {
1191
+ version
1192
+ asMoveObject {
1193
+ contents {
1194
+ type {
1195
+ repr
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+ outputState {
1201
+ asMoveObject {
1202
+ contents {
1203
+ type {
1204
+ repr
1205
+ }
1206
+ }
1207
+ }
1208
+ asMovePackage {
1209
+ modules(first: 10) {
1210
+ nodes {
1211
+ name
1212
+ }
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+ }
1218
+ }
1219
+ }`);
1220
+ const GetAllBalancesDocument = new TypedDocumentString(`
1221
+ query getAllBalances($owner: IotaAddress!, $limit: Int, $cursor: String) {
1222
+ address(address: $owner) {
1223
+ balances(first: $limit, after: $cursor) {
1224
+ pageInfo {
1225
+ hasNextPage
1226
+ endCursor
1227
+ }
1228
+ nodes {
1229
+ coinType {
1230
+ repr
1231
+ }
1232
+ coinObjectCount
1233
+ totalBalance
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ `);
1239
+ const GetBalanceDocument = new TypedDocumentString(`
1240
+ query getBalance($owner: IotaAddress!, $type: String = "0x2::iota::IOTA") {
1241
+ address(address: $owner) {
1242
+ balance(type: $type) {
1243
+ coinType {
1244
+ repr
1245
+ }
1246
+ coinObjectCount
1247
+ totalBalance
1248
+ }
1249
+ }
1250
+ }
1251
+ `);
1252
+ const GetChainIdentifierDocument = new TypedDocumentString(`
1253
+ query getChainIdentifier {
1254
+ chainIdentifier
1255
+ }
1256
+ `);
1257
+ const GetCoinMetadataDocument = new TypedDocumentString(`
1258
+ query getCoinMetadata($coinType: String!) {
1259
+ coinMetadata(coinType: $coinType) {
1260
+ decimals
1261
+ name
1262
+ symbol
1263
+ description
1264
+ iconUrl
1265
+ address
1266
+ }
1267
+ }
1268
+ `);
1269
+ const GetCoinsDocument = new TypedDocumentString(`
1270
+ query getCoins($owner: IotaAddress!, $first: Int, $cursor: String, $type: String = "0x2::iota::IOTA") {
1271
+ address(address: $owner) {
1272
+ address
1273
+ coins(first: $first, after: $cursor, type: $type) {
1274
+ pageInfo {
1275
+ hasNextPage
1276
+ endCursor
1277
+ }
1278
+ nodes {
1279
+ coinBalance
1280
+ contents {
1281
+ type {
1282
+ repr
1283
+ }
1284
+ }
1285
+ address
1286
+ version
1287
+ digest
1288
+ previousTransactionBlock {
1289
+ digest
1290
+ }
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ `);
1296
+ const GetCommitteeInfoDocument = new TypedDocumentString(`
1297
+ query getCommitteeInfo($epochId: UInt53, $after: String) {
1298
+ epoch(id: $epochId) {
1299
+ epochId
1300
+ validatorSet {
1301
+ committeeMembers(after: $after) {
1302
+ pageInfo {
1303
+ hasNextPage
1304
+ endCursor
1305
+ }
1306
+ nodes {
1307
+ credentials {
1308
+ authorityPubKey
1309
+ }
1310
+ votingPower
1311
+ }
1312
+ }
1313
+ }
1314
+ }
1315
+ }
1316
+ `);
1317
+ const GetCurrentEpochDocument = new TypedDocumentString(`
1318
+ query getCurrentEpoch {
1319
+ epoch {
1320
+ epochId
1321
+ validatorSet {
1322
+ activeValidators {
1323
+ pageInfo {
1324
+ hasNextPage
1325
+ endCursor
1326
+ }
1327
+ nodes {
1328
+ ...RPC_VALIDATOR_FIELDS
1329
+ }
1330
+ }
1331
+ committeeMembers {
1332
+ pageInfo {
1333
+ hasNextPage
1334
+ endCursor
1335
+ }
1336
+ nodes {
1337
+ ...RPC_VALIDATOR_FIELDS
1338
+ }
1339
+ }
1340
+ }
1341
+ totalTransactions
1342
+ firstCheckpoint: checkpoints(first: 1) {
1343
+ nodes {
1344
+ sequenceNumber
1345
+ }
1346
+ }
1347
+ startTimestamp
1348
+ endTimestamp
1349
+ referenceGasPrice
1350
+ }
1351
+ }
1352
+ fragment RPC_VALIDATOR_FIELDS on Validator {
1353
+ atRisk
1354
+ commissionRate
1355
+ exchangeRatesSize
1356
+ exchangeRates {
1357
+ contents {
1358
+ json
1359
+ }
1360
+ address
1361
+ }
1362
+ description
1363
+ gasPrice
1364
+ imageUrl
1365
+ name
1366
+ credentials {
1367
+ ...RPC_CREDENTIAL_FIELDS
1368
+ }
1369
+ nextEpochCommissionRate
1370
+ nextEpochGasPrice
1371
+ nextEpochCredentials {
1372
+ ...RPC_CREDENTIAL_FIELDS
1373
+ }
1374
+ nextEpochStake
1375
+ nextEpochCommissionRate
1376
+ operationCap {
1377
+ address
1378
+ }
1379
+ pendingPoolTokenWithdraw
1380
+ pendingStake
1381
+ pendingTotalIotaWithdraw
1382
+ poolTokenBalance
1383
+ projectUrl
1384
+ rewardsPool
1385
+ stakingPool {
1386
+ address
1387
+ }
1388
+ stakingPoolActivationEpoch
1389
+ stakingPoolIotaBalance
1390
+ address {
1391
+ address
1392
+ }
1393
+ votingPower
1394
+ }
1395
+ fragment RPC_CREDENTIAL_FIELDS on ValidatorCredentials {
1396
+ netAddress
1397
+ networkPubKey
1398
+ p2PAddress
1399
+ primaryAddress
1400
+ authorityPubKey
1401
+ proofOfPossession
1402
+ protocolPubKey
1403
+ }`);
1404
+ const PaginateEpochValidatorsDocument = new TypedDocumentString(`
1405
+ query paginateEpochValidators($id: UInt53!, $after: String) {
1406
+ epoch(id: $id) {
1407
+ validatorSet {
1408
+ activeValidators(after: $after) {
1409
+ pageInfo {
1410
+ hasNextPage
1411
+ endCursor
1412
+ }
1413
+ nodes {
1414
+ ...RPC_VALIDATOR_FIELDS
1415
+ }
1416
+ }
1417
+ committeeMembers(after: $after) {
1418
+ pageInfo {
1419
+ hasNextPage
1420
+ endCursor
1421
+ }
1422
+ nodes {
1423
+ ...RPC_VALIDATOR_FIELDS
1424
+ }
1425
+ }
1426
+ }
1427
+ }
1428
+ }
1429
+ fragment RPC_VALIDATOR_FIELDS on Validator {
1430
+ atRisk
1431
+ commissionRate
1432
+ exchangeRatesSize
1433
+ exchangeRates {
1434
+ contents {
1435
+ json
1436
+ }
1437
+ address
1438
+ }
1439
+ description
1440
+ gasPrice
1441
+ imageUrl
1442
+ name
1443
+ credentials {
1444
+ ...RPC_CREDENTIAL_FIELDS
1445
+ }
1446
+ nextEpochCommissionRate
1447
+ nextEpochGasPrice
1448
+ nextEpochCredentials {
1449
+ ...RPC_CREDENTIAL_FIELDS
1450
+ }
1451
+ nextEpochStake
1452
+ nextEpochCommissionRate
1453
+ operationCap {
1454
+ address
1455
+ }
1456
+ pendingPoolTokenWithdraw
1457
+ pendingStake
1458
+ pendingTotalIotaWithdraw
1459
+ poolTokenBalance
1460
+ projectUrl
1461
+ rewardsPool
1462
+ stakingPool {
1463
+ address
1464
+ }
1465
+ stakingPoolActivationEpoch
1466
+ stakingPoolIotaBalance
1467
+ address {
1468
+ address
1469
+ }
1470
+ votingPower
1471
+ }
1472
+ fragment RPC_CREDENTIAL_FIELDS on ValidatorCredentials {
1473
+ netAddress
1474
+ networkPubKey
1475
+ p2PAddress
1476
+ primaryAddress
1477
+ authorityPubKey
1478
+ proofOfPossession
1479
+ protocolPubKey
1480
+ }`);
1481
+ const GetTypeLayoutDocument = new TypedDocumentString(`
1482
+ query getTypeLayout($type: String!) {
1483
+ type(type: $type) {
1484
+ layout
1485
+ }
1486
+ }
1487
+ `);
1488
+ const GetDynamicFieldObjectDocument = new TypedDocumentString(`
1489
+ query getDynamicFieldObject($parentId: IotaAddress!, $name: DynamicFieldName!, $showBcs: Boolean = false, $showContent: Boolean = false, $showDisplay: Boolean = false, $showType: Boolean = false, $showOwner: Boolean = false, $showPreviousTransaction: Boolean = false, $showStorageRebate: Boolean = false) {
1490
+ owner(address: $parentId) {
1491
+ dynamicObjectField(name: $name) {
1492
+ value {
1493
+ __typename
1494
+ ... on MoveObject {
1495
+ owner {
1496
+ __typename
1497
+ ... on Parent {
1498
+ parent {
1499
+ address
1500
+ digest
1501
+ version
1502
+ display @include(if: $showDisplay) {
1503
+ key
1504
+ value
1505
+ error
1506
+ }
1507
+ storageRebate @include(if: $showStorageRebate)
1508
+ owner @include(if: $showOwner) {
1509
+ __typename
1510
+ ... on Parent {
1511
+ parent {
1512
+ address
1513
+ }
1514
+ }
1515
+ }
1516
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
1517
+ digest
1518
+ }
1519
+ asMoveObject @include(if: $showType) {
1520
+ contents {
1521
+ type {
1522
+ repr
1523
+ }
1524
+ }
1525
+ }
1526
+ asMoveObject @include(if: $showContent) {
1527
+ contents {
1528
+ data
1529
+ type {
1530
+ repr
1531
+ layout
1532
+ signature
1533
+ }
1534
+ }
1535
+ }
1536
+ asMoveObject @include(if: $showBcs) {
1537
+ contents {
1538
+ data
1539
+ type {
1540
+ repr
1541
+ layout
1542
+ }
1543
+ }
1544
+ }
1545
+ }
1546
+ }
1547
+ }
1548
+ }
1549
+ }
1550
+ }
1551
+ }
1552
+ }
1553
+ `);
1554
+ const GetDynamicFieldsDocument = new TypedDocumentString(`
1555
+ query getDynamicFields($parentId: IotaAddress!, $first: Int, $cursor: String) {
1556
+ owner(address: $parentId) {
1557
+ dynamicFields(first: $first, after: $cursor) {
1558
+ pageInfo {
1559
+ hasNextPage
1560
+ endCursor
1561
+ }
1562
+ nodes {
1563
+ name {
1564
+ bcs
1565
+ json
1566
+ type {
1567
+ layout
1568
+ repr
1569
+ }
1570
+ }
1571
+ value {
1572
+ __typename
1573
+ ... on MoveValue {
1574
+ json
1575
+ type {
1576
+ repr
1577
+ }
1578
+ }
1579
+ ... on MoveObject {
1580
+ contents {
1581
+ type {
1582
+ repr
1583
+ }
1584
+ json
1585
+ }
1586
+ address
1587
+ digest
1588
+ version
1589
+ }
1590
+ }
1591
+ }
1592
+ }
1593
+ }
1594
+ }
1595
+ `);
1596
+ const GetLatestCheckpointSequenceNumberDocument = new TypedDocumentString(`
1597
+ query getLatestCheckpointSequenceNumber {
1598
+ checkpoint {
1599
+ sequenceNumber
1600
+ }
1601
+ }
1602
+ `);
1603
+ const GetLatestIotaSystemStateDocument = new TypedDocumentString(`
1604
+ query getLatestIotaSystemState {
1605
+ epoch {
1606
+ epochId
1607
+ startTimestamp
1608
+ endTimestamp
1609
+ referenceGasPrice
1610
+ safeMode {
1611
+ enabled
1612
+ gasSummary {
1613
+ computationCost
1614
+ computationCostBurned
1615
+ nonRefundableStorageFee
1616
+ storageCost
1617
+ storageRebate
1618
+ }
1619
+ }
1620
+ storageFund {
1621
+ nonRefundableBalance
1622
+ totalObjectStorageRebates
1623
+ }
1624
+ systemStateVersion
1625
+ iotaTotalSupply
1626
+ iotaTreasuryCapId
1627
+ systemParameters {
1628
+ minValidatorCount
1629
+ maxValidatorCount
1630
+ minValidatorJoiningStake
1631
+ durationMs
1632
+ validatorLowStakeThreshold
1633
+ validatorLowStakeGracePeriod
1634
+ validatorVeryLowStakeThreshold
1635
+ }
1636
+ protocolConfigs {
1637
+ protocolVersion
1638
+ }
1639
+ validatorSet {
1640
+ activeValidators {
1641
+ pageInfo {
1642
+ hasNextPage
1643
+ endCursor
1644
+ }
1645
+ nodes {
1646
+ ...RPC_VALIDATOR_FIELDS
1647
+ }
1648
+ }
1649
+ committeeMembers {
1650
+ pageInfo {
1651
+ hasNextPage
1652
+ endCursor
1653
+ }
1654
+ nodes {
1655
+ ...RPC_VALIDATOR_FIELDS
1656
+ }
1657
+ }
1658
+ inactivePoolsSize
1659
+ pendingActiveValidatorsSize
1660
+ stakingPoolMappingsSize
1661
+ validatorCandidatesSize
1662
+ pendingRemovals
1663
+ totalStake
1664
+ stakingPoolMappingsId
1665
+ pendingActiveValidatorsId
1666
+ validatorCandidatesId
1667
+ inactivePoolsId
1668
+ }
1669
+ }
1670
+ }
1671
+ fragment RPC_VALIDATOR_FIELDS on Validator {
1672
+ atRisk
1673
+ commissionRate
1674
+ exchangeRatesSize
1675
+ exchangeRates {
1676
+ contents {
1677
+ json
1678
+ }
1679
+ address
1680
+ }
1681
+ description
1682
+ gasPrice
1683
+ imageUrl
1684
+ name
1685
+ credentials {
1686
+ ...RPC_CREDENTIAL_FIELDS
1687
+ }
1688
+ nextEpochCommissionRate
1689
+ nextEpochGasPrice
1690
+ nextEpochCredentials {
1691
+ ...RPC_CREDENTIAL_FIELDS
1692
+ }
1693
+ nextEpochStake
1694
+ nextEpochCommissionRate
1695
+ operationCap {
1696
+ address
1697
+ }
1698
+ pendingPoolTokenWithdraw
1699
+ pendingStake
1700
+ pendingTotalIotaWithdraw
1701
+ poolTokenBalance
1702
+ projectUrl
1703
+ rewardsPool
1704
+ stakingPool {
1705
+ address
1706
+ }
1707
+ stakingPoolActivationEpoch
1708
+ stakingPoolIotaBalance
1709
+ address {
1710
+ address
1711
+ }
1712
+ votingPower
1713
+ }
1714
+ fragment RPC_CREDENTIAL_FIELDS on ValidatorCredentials {
1715
+ netAddress
1716
+ networkPubKey
1717
+ p2PAddress
1718
+ primaryAddress
1719
+ authorityPubKey
1720
+ proofOfPossession
1721
+ protocolPubKey
1722
+ }`);
1723
+ const GetMoveFunctionArgTypesDocument = new TypedDocumentString(`
1724
+ query getMoveFunctionArgTypes($packageId: IotaAddress!, $module: String!, $function: String!) {
1725
+ object(address: $packageId) {
1726
+ asMovePackage {
1727
+ module(name: $module) {
1728
+ fileFormatVersion
1729
+ function(name: $function) {
1730
+ parameters {
1731
+ signature
1732
+ }
1733
+ }
1734
+ }
1735
+ }
1736
+ }
1737
+ }
1738
+ `);
1739
+ const GetNormalizedMoveFunctionDocument = new TypedDocumentString(`
1740
+ query getNormalizedMoveFunction($packageId: IotaAddress!, $module: String!, $function: String!) {
1741
+ object(address: $packageId) {
1742
+ address
1743
+ asMovePackage {
1744
+ module(name: $module) {
1745
+ fileFormatVersion
1746
+ function(name: $function) {
1747
+ ...RPC_MOVE_FUNCTION_FIELDS
1748
+ }
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1753
+ fragment RPC_MOVE_FUNCTION_FIELDS on MoveFunction {
1754
+ name
1755
+ visibility
1756
+ isEntry
1757
+ parameters {
1758
+ signature
1759
+ }
1760
+ typeParameters {
1761
+ constraints
1762
+ }
1763
+ return {
1764
+ repr
1765
+ signature
1766
+ }
1767
+ }`);
1768
+ const GetNormalizedMoveModuleDocument = new TypedDocumentString(`
1769
+ query getNormalizedMoveModule($packageId: IotaAddress!, $module: String!) {
1770
+ object(address: $packageId) {
1771
+ asMovePackage {
1772
+ module(name: $module) {
1773
+ ...RPC_MOVE_MODULE_FIELDS
1774
+ }
1775
+ }
1776
+ }
1777
+ }
1778
+ fragment RPC_MOVE_FUNCTION_FIELDS on MoveFunction {
1779
+ name
1780
+ visibility
1781
+ isEntry
1782
+ parameters {
1783
+ signature
1784
+ }
1785
+ typeParameters {
1786
+ constraints
1787
+ }
1788
+ return {
1789
+ repr
1790
+ signature
1791
+ }
1792
+ }
1793
+ fragment RPC_MOVE_MODULE_FIELDS on MoveModule {
1794
+ name
1795
+ friends {
1796
+ pageInfo {
1797
+ hasNextPage
1798
+ endCursor
1799
+ }
1800
+ nodes {
1801
+ name
1802
+ package {
1803
+ address
1804
+ }
1805
+ }
1806
+ }
1807
+ structs {
1808
+ pageInfo {
1809
+ hasNextPage
1810
+ endCursor
1811
+ }
1812
+ nodes {
1813
+ ...RPC_MOVE_STRUCT_FIELDS
1814
+ }
1815
+ }
1816
+ fileFormatVersion
1817
+ functions {
1818
+ pageInfo {
1819
+ hasNextPage
1820
+ endCursor
1821
+ }
1822
+ nodes {
1823
+ ...RPC_MOVE_FUNCTION_FIELDS
1824
+ }
1825
+ }
1826
+ }
1827
+ fragment RPC_MOVE_STRUCT_FIELDS on MoveStruct {
1828
+ name
1829
+ abilities
1830
+ fields {
1831
+ name
1832
+ type {
1833
+ signature
1834
+ }
1835
+ }
1836
+ typeParameters {
1837
+ isPhantom
1838
+ constraints
1839
+ }
1840
+ }`);
1841
+ const PaginateMoveModuleListsDocument = new TypedDocumentString(`
1842
+ query paginateMoveModuleLists($packageId: IotaAddress!, $module: String!, $hasMoreFriends: Boolean!, $hasMoreStructs: Boolean!, $hasMoreFunctions: Boolean!, $afterFriends: String, $afterStructs: String, $afterFunctions: String) {
1843
+ object(address: $packageId) {
1844
+ asMovePackage {
1845
+ module(name: $module) {
1846
+ friends(after: $afterFriends) @include(if: $hasMoreFriends) {
1847
+ pageInfo {
1848
+ hasNextPage
1849
+ endCursor
1850
+ }
1851
+ nodes {
1852
+ name
1853
+ package {
1854
+ address
1855
+ }
1856
+ }
1857
+ }
1858
+ structs(after: $afterStructs) @include(if: $hasMoreStructs) {
1859
+ pageInfo {
1860
+ hasNextPage
1861
+ endCursor
1862
+ }
1863
+ nodes {
1864
+ ...RPC_MOVE_STRUCT_FIELDS
1865
+ }
1866
+ }
1867
+ functions(after: $afterFunctions) @include(if: $hasMoreFunctions) {
1868
+ pageInfo {
1869
+ hasNextPage
1870
+ endCursor
1871
+ }
1872
+ nodes {
1873
+ ...RPC_MOVE_FUNCTION_FIELDS
1874
+ }
1875
+ }
1876
+ }
1877
+ }
1878
+ }
1879
+ }
1880
+ fragment RPC_MOVE_FUNCTION_FIELDS on MoveFunction {
1881
+ name
1882
+ visibility
1883
+ isEntry
1884
+ parameters {
1885
+ signature
1886
+ }
1887
+ typeParameters {
1888
+ constraints
1889
+ }
1890
+ return {
1891
+ repr
1892
+ signature
1893
+ }
1894
+ }
1895
+ fragment RPC_MOVE_STRUCT_FIELDS on MoveStruct {
1896
+ name
1897
+ abilities
1898
+ fields {
1899
+ name
1900
+ type {
1901
+ signature
1902
+ }
1903
+ }
1904
+ typeParameters {
1905
+ isPhantom
1906
+ constraints
1907
+ }
1908
+ }`);
1909
+ const GetNormalizedMoveModulesByPackageDocument = new TypedDocumentString(`
1910
+ query getNormalizedMoveModulesByPackage($packageId: IotaAddress!, $cursor: String) {
1911
+ object(address: $packageId) {
1912
+ asMovePackage {
1913
+ address
1914
+ modules(after: $cursor) {
1915
+ pageInfo {
1916
+ hasNextPage
1917
+ endCursor
1918
+ }
1919
+ nodes {
1920
+ ...RPC_MOVE_MODULE_FIELDS
1921
+ }
1922
+ }
1923
+ }
1924
+ }
1925
+ }
1926
+ fragment RPC_MOVE_FUNCTION_FIELDS on MoveFunction {
1927
+ name
1928
+ visibility
1929
+ isEntry
1930
+ parameters {
1931
+ signature
1932
+ }
1933
+ typeParameters {
1934
+ constraints
1935
+ }
1936
+ return {
1937
+ repr
1938
+ signature
1939
+ }
1940
+ }
1941
+ fragment RPC_MOVE_MODULE_FIELDS on MoveModule {
1942
+ name
1943
+ friends {
1944
+ pageInfo {
1945
+ hasNextPage
1946
+ endCursor
1947
+ }
1948
+ nodes {
1949
+ name
1950
+ package {
1951
+ address
1952
+ }
1953
+ }
1954
+ }
1955
+ structs {
1956
+ pageInfo {
1957
+ hasNextPage
1958
+ endCursor
1959
+ }
1960
+ nodes {
1961
+ ...RPC_MOVE_STRUCT_FIELDS
1962
+ }
1963
+ }
1964
+ fileFormatVersion
1965
+ functions {
1966
+ pageInfo {
1967
+ hasNextPage
1968
+ endCursor
1969
+ }
1970
+ nodes {
1971
+ ...RPC_MOVE_FUNCTION_FIELDS
1972
+ }
1973
+ }
1974
+ }
1975
+ fragment RPC_MOVE_STRUCT_FIELDS on MoveStruct {
1976
+ name
1977
+ abilities
1978
+ fields {
1979
+ name
1980
+ type {
1981
+ signature
1982
+ }
1983
+ }
1984
+ typeParameters {
1985
+ isPhantom
1986
+ constraints
1987
+ }
1988
+ }`);
1989
+ const GetNormalizedMoveStructDocument = new TypedDocumentString(`
1990
+ query getNormalizedMoveStruct($packageId: IotaAddress!, $module: String!, $struct: String!) {
1991
+ object(address: $packageId) {
1992
+ asMovePackage {
1993
+ address
1994
+ module(name: $module) {
1995
+ fileFormatVersion
1996
+ struct(name: $struct) {
1997
+ ...RPC_MOVE_STRUCT_FIELDS
1998
+ }
1999
+ }
2000
+ }
2001
+ }
2002
+ }
2003
+ fragment RPC_MOVE_STRUCT_FIELDS on MoveStruct {
2004
+ name
2005
+ abilities
2006
+ fields {
2007
+ name
2008
+ type {
2009
+ signature
2010
+ }
2011
+ }
2012
+ typeParameters {
2013
+ isPhantom
2014
+ constraints
2015
+ }
2016
+ }`);
2017
+ const GetProtocolConfigDocument = new TypedDocumentString(`
2018
+ query getProtocolConfig($protocolVersion: UInt53) {
2019
+ protocolConfig(protocolVersion: $protocolVersion) {
2020
+ protocolVersion
2021
+ configs {
2022
+ key
2023
+ value
2024
+ }
2025
+ featureFlags {
2026
+ key
2027
+ value
2028
+ }
2029
+ }
2030
+ }
2031
+ `);
2032
+ const GetReferenceGasPriceDocument = new TypedDocumentString(`
2033
+ query getReferenceGasPrice {
2034
+ epoch {
2035
+ referenceGasPrice
2036
+ }
2037
+ }
2038
+ `);
2039
+ const GetTotalSupplyDocument = new TypedDocumentString(`
2040
+ query getTotalSupply($coinType: String!) {
2041
+ coinMetadata(coinType: $coinType) {
2042
+ supply
2043
+ decimals
2044
+ }
2045
+ }
2046
+ `);
2047
+ const GetTotalTransactionBlocksDocument = new TypedDocumentString(`
2048
+ query getTotalTransactionBlocks {
2049
+ checkpoint {
2050
+ networkTotalTransactions
2051
+ }
2052
+ }
2053
+ `);
2054
+ const GetValidatorsApyDocument = new TypedDocumentString(`
2055
+ query getValidatorsApy {
2056
+ epoch {
2057
+ epochId
2058
+ validatorSet {
2059
+ activeValidators {
2060
+ pageInfo {
2061
+ hasNextPage
2062
+ endCursor
2063
+ }
2064
+ nodes {
2065
+ address {
2066
+ address
2067
+ }
2068
+ apy
2069
+ }
2070
+ }
2071
+ }
2072
+ }
2073
+ }
2074
+ `);
2075
+ const ResolveNameServiceAddressDocument = new TypedDocumentString(`
2076
+ query resolveNameServiceAddress($name: String!) {
2077
+ resolveIotaNamesAddress(name: $name) {
2078
+ address
2079
+ }
2080
+ }
2081
+ `);
2082
+ const ResolveNameServiceNamesDocument = new TypedDocumentString(`
2083
+ query resolveNameServiceNames($address: IotaAddress!, $limit: Int, $cursor: String) {
2084
+ address(address: $address) {
2085
+ iotaNamesRegistrations(first: $limit, after: $cursor) {
2086
+ pageInfo {
2087
+ hasNextPage
2088
+ endCursor
2089
+ }
2090
+ nodes {
2091
+ name
2092
+ }
2093
+ }
2094
+ }
2095
+ }
2096
+ `);
2097
+ const IsTransactionIndexedOnNodeDocument = new TypedDocumentString(`
2098
+ query IsTransactionIndexedOnNode($digest: String!) {
2099
+ isTransactionIndexedOnNode(digest: $digest)
2100
+ }
2101
+ `);
2102
+ const GetOwnedObjectsDocument = new TypedDocumentString(`
2103
+ query getOwnedObjects($owner: IotaAddress!, $limit: Int, $cursor: String, $showBcs: Boolean = false, $showContent: Boolean = false, $showDisplay: Boolean = false, $showType: Boolean = false, $showOwner: Boolean = false, $showPreviousTransaction: Boolean = false, $showStorageRebate: Boolean = false, $filter: ObjectFilter) {
2104
+ address(address: $owner) {
2105
+ objects(first: $limit, after: $cursor, filter: $filter) {
2106
+ pageInfo {
2107
+ hasNextPage
2108
+ endCursor
2109
+ }
2110
+ nodes {
2111
+ ...RPC_MOVE_OBJECT_FIELDS
2112
+ }
2113
+ }
2114
+ }
2115
+ }
2116
+ fragment RPC_MOVE_OBJECT_FIELDS on MoveObject {
2117
+ objectId: address
2118
+ bcs @include(if: $showBcs)
2119
+ contents @include(if: $showType) {
2120
+ type {
2121
+ repr
2122
+ }
2123
+ }
2124
+ contents @include(if: $showContent) {
2125
+ data
2126
+ type {
2127
+ repr
2128
+ layout
2129
+ signature
2130
+ }
2131
+ }
2132
+ contents @include(if: $showBcs) {
2133
+ bcs
2134
+ type {
2135
+ repr
2136
+ }
2137
+ }
2138
+ owner @include(if: $showOwner) {
2139
+ ...RPC_OBJECT_OWNER_FIELDS
2140
+ }
2141
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
2142
+ digest
2143
+ }
2144
+ storageRebate @include(if: $showStorageRebate)
2145
+ digest
2146
+ version
2147
+ display @include(if: $showDisplay) {
2148
+ key
2149
+ value
2150
+ error
2151
+ }
2152
+ }
2153
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
2154
+ __typename
2155
+ ... on AddressOwner {
2156
+ owner {
2157
+ asObject {
2158
+ address
2159
+ }
2160
+ asAddress {
2161
+ address
2162
+ }
2163
+ }
2164
+ }
2165
+ ... on Parent {
2166
+ parent {
2167
+ address
2168
+ }
2169
+ }
2170
+ ... on Shared {
2171
+ initialSharedVersion
2172
+ }
2173
+ }`);
2174
+ const GetObjectDocument = new TypedDocumentString(`
2175
+ query getObject($id: IotaAddress!, $showBcs: Boolean = false, $showOwner: Boolean = false, $showPreviousTransaction: Boolean = false, $showContent: Boolean = false, $showDisplay: Boolean = false, $showType: Boolean = false, $showStorageRebate: Boolean = false) {
2176
+ object(address: $id) {
2177
+ ...RPC_OBJECT_FIELDS
2178
+ }
2179
+ }
2180
+ fragment RPC_OBJECT_FIELDS on Object {
2181
+ objectId: address
2182
+ version
2183
+ asMoveObject @include(if: $showType) {
2184
+ contents {
2185
+ type {
2186
+ repr
2187
+ }
2188
+ }
2189
+ }
2190
+ asMoveObject @include(if: $showContent) {
2191
+ contents {
2192
+ data
2193
+ type {
2194
+ repr
2195
+ layout
2196
+ signature
2197
+ }
2198
+ }
2199
+ }
2200
+ asMoveObject @include(if: $showBcs) {
2201
+ contents {
2202
+ bcs
2203
+ type {
2204
+ repr
2205
+ }
2206
+ }
2207
+ }
2208
+ owner @include(if: $showOwner) {
2209
+ ...RPC_OBJECT_OWNER_FIELDS
2210
+ }
2211
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
2212
+ digest
2213
+ }
2214
+ storageRebate @include(if: $showStorageRebate)
2215
+ digest
2216
+ version
2217
+ display @include(if: $showDisplay) {
2218
+ key
2219
+ value
2220
+ error
2221
+ }
2222
+ }
2223
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
2224
+ __typename
2225
+ ... on AddressOwner {
2226
+ owner {
2227
+ asObject {
2228
+ address
2229
+ }
2230
+ asAddress {
2231
+ address
2232
+ }
2233
+ }
2234
+ }
2235
+ ... on Parent {
2236
+ parent {
2237
+ address
2238
+ }
2239
+ }
2240
+ ... on Shared {
2241
+ initialSharedVersion
2242
+ }
2243
+ }`);
2244
+ const TryGetPastObjectDocument = new TypedDocumentString(`
2245
+ query tryGetPastObject($id: IotaAddress!, $version: UInt53, $showBcs: Boolean = false, $showOwner: Boolean = false, $showPreviousTransaction: Boolean = false, $showContent: Boolean = false, $showDisplay: Boolean = false, $showType: Boolean = false, $showStorageRebate: Boolean = false) {
2246
+ current: object(address: $id) {
2247
+ address
2248
+ version
2249
+ }
2250
+ object(address: $id, version: $version) {
2251
+ ...RPC_OBJECT_FIELDS
2252
+ }
2253
+ }
2254
+ fragment RPC_OBJECT_FIELDS on Object {
2255
+ objectId: address
2256
+ version
2257
+ asMoveObject @include(if: $showType) {
2258
+ contents {
2259
+ type {
2260
+ repr
2261
+ }
2262
+ }
2263
+ }
2264
+ asMoveObject @include(if: $showContent) {
2265
+ contents {
2266
+ data
2267
+ type {
2268
+ repr
2269
+ layout
2270
+ signature
2271
+ }
2272
+ }
2273
+ }
2274
+ asMoveObject @include(if: $showBcs) {
2275
+ contents {
2276
+ bcs
2277
+ type {
2278
+ repr
2279
+ }
2280
+ }
2281
+ }
2282
+ owner @include(if: $showOwner) {
2283
+ ...RPC_OBJECT_OWNER_FIELDS
2284
+ }
2285
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
2286
+ digest
2287
+ }
2288
+ storageRebate @include(if: $showStorageRebate)
2289
+ digest
2290
+ version
2291
+ display @include(if: $showDisplay) {
2292
+ key
2293
+ value
2294
+ error
2295
+ }
2296
+ }
2297
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
2298
+ __typename
2299
+ ... on AddressOwner {
2300
+ owner {
2301
+ asObject {
2302
+ address
2303
+ }
2304
+ asAddress {
2305
+ address
2306
+ }
2307
+ }
2308
+ }
2309
+ ... on Parent {
2310
+ parent {
2311
+ address
2312
+ }
2313
+ }
2314
+ ... on Shared {
2315
+ initialSharedVersion
2316
+ }
2317
+ }`);
2318
+ const MultiGetObjectsDocument = new TypedDocumentString(`
2319
+ query multiGetObjects($ids: [IotaAddress!]!, $limit: Int, $cursor: String, $showBcs: Boolean = false, $showContent: Boolean = false, $showDisplay: Boolean = false, $showType: Boolean = false, $showOwner: Boolean = false, $showPreviousTransaction: Boolean = false, $showStorageRebate: Boolean = false) {
2320
+ objects(first: $limit, after: $cursor, filter: {objectIds: $ids}) {
2321
+ pageInfo {
2322
+ hasNextPage
2323
+ endCursor
2324
+ }
2325
+ nodes {
2326
+ ...RPC_OBJECT_FIELDS
2327
+ }
2328
+ }
2329
+ }
2330
+ fragment RPC_OBJECT_FIELDS on Object {
2331
+ objectId: address
2332
+ version
2333
+ asMoveObject @include(if: $showType) {
2334
+ contents {
2335
+ type {
2336
+ repr
2337
+ }
2338
+ }
2339
+ }
2340
+ asMoveObject @include(if: $showContent) {
2341
+ contents {
2342
+ data
2343
+ type {
2344
+ repr
2345
+ layout
2346
+ signature
2347
+ }
2348
+ }
2349
+ }
2350
+ asMoveObject @include(if: $showBcs) {
2351
+ contents {
2352
+ bcs
2353
+ type {
2354
+ repr
2355
+ }
2356
+ }
2357
+ }
2358
+ owner @include(if: $showOwner) {
2359
+ ...RPC_OBJECT_OWNER_FIELDS
2360
+ }
2361
+ previousTransactionBlock @include(if: $showPreviousTransaction) {
2362
+ digest
2363
+ }
2364
+ storageRebate @include(if: $showStorageRebate)
2365
+ digest
2366
+ version
2367
+ display @include(if: $showDisplay) {
2368
+ key
2369
+ value
2370
+ error
2371
+ }
2372
+ }
2373
+ fragment RPC_OBJECT_OWNER_FIELDS on ObjectOwner {
2374
+ __typename
2375
+ ... on AddressOwner {
2376
+ owner {
2377
+ asObject {
2378
+ address
2379
+ }
2380
+ asAddress {
2381
+ address
2382
+ }
2383
+ }
2384
+ }
2385
+ ... on Parent {
2386
+ parent {
2387
+ address
2388
+ }
2389
+ }
2390
+ ... on Shared {
2391
+ initialSharedVersion
2392
+ }
2393
+ }`);
2394
+ const QueryEventsDocument = new TypedDocumentString(`
2395
+ query queryEvents($filter: EventFilter!, $before: String, $after: String, $first: Int, $last: Int) {
2396
+ events(
2397
+ filter: $filter
2398
+ first: $first
2399
+ after: $after
2400
+ last: $last
2401
+ before: $before
2402
+ ) {
2403
+ pageInfo {
2404
+ hasNextPage
2405
+ hasPreviousPage
2406
+ endCursor
2407
+ startCursor
2408
+ }
2409
+ nodes {
2410
+ ...RPC_EVENTS_FIELDS
2411
+ }
2412
+ }
2413
+ }
2414
+ fragment RPC_EVENTS_FIELDS on Event {
2415
+ sendingModule {
2416
+ package {
2417
+ address
2418
+ }
2419
+ name
2420
+ }
2421
+ sender {
2422
+ address
2423
+ }
2424
+ type {
2425
+ repr
2426
+ }
2427
+ json
2428
+ bcs
2429
+ timestamp
2430
+ }`);
2431
+ const GetStakesDocument = new TypedDocumentString(`
2432
+ query getStakes($owner: IotaAddress!, $limit: Int, $cursor: String) {
2433
+ address(address: $owner) {
2434
+ stakedIotas(first: $limit, after: $cursor) {
2435
+ pageInfo {
2436
+ hasNextPage
2437
+ endCursor
2438
+ }
2439
+ nodes {
2440
+ ...RPC_STAKE_FIELDS
2441
+ }
2442
+ }
2443
+ }
2444
+ }
2445
+ fragment RPC_STAKE_FIELDS on StakedIota {
2446
+ principal
2447
+ activatedEpoch {
2448
+ epochId
2449
+ referenceGasPrice
2450
+ }
2451
+ stakeStatus
2452
+ requestedEpoch {
2453
+ epochId
2454
+ }
2455
+ activatedEpoch {
2456
+ epochId
2457
+ }
2458
+ contents {
2459
+ json
2460
+ }
2461
+ address
2462
+ estimatedReward
2463
+ }`);
2464
+ const GetStakesByIdsDocument = new TypedDocumentString(`
2465
+ query getStakesByIds($ids: [IotaAddress!]!, $limit: Int, $cursor: String) {
2466
+ objects(first: $limit, after: $cursor, filter: {objectIds: $ids}) {
2467
+ pageInfo {
2468
+ hasNextPage
2469
+ endCursor
2470
+ }
2471
+ nodes {
2472
+ asMoveObject {
2473
+ asStakedIota {
2474
+ ...RPC_STAKE_FIELDS
2475
+ }
2476
+ }
2477
+ }
2478
+ }
2479
+ }
2480
+ fragment RPC_STAKE_FIELDS on StakedIota {
2481
+ principal
2482
+ activatedEpoch {
2483
+ epochId
2484
+ referenceGasPrice
2485
+ }
2486
+ stakeStatus
2487
+ requestedEpoch {
2488
+ epochId
2489
+ }
2490
+ activatedEpoch {
2491
+ epochId
2492
+ }
2493
+ contents {
2494
+ json
2495
+ }
2496
+ address
2497
+ estimatedReward
2498
+ }`);
2499
+ const QueryTransactionBlocksDocument = new TypedDocumentString(`
2500
+ query queryTransactionBlocks($first: Int, $last: Int, $before: String, $after: String, $showBalanceChanges: Boolean = false, $showEffects: Boolean = false, $showRawEffects: Boolean = false, $showEvents: Boolean = false, $showInput: Boolean = false, $showObjectChanges: Boolean = false, $showRawInput: Boolean = false, $filter: TransactionBlockFilter) {
2501
+ transactionBlocks(
2502
+ first: $first
2503
+ after: $after
2504
+ last: $last
2505
+ before: $before
2506
+ filter: $filter
2507
+ ) {
2508
+ pageInfo {
2509
+ hasNextPage
2510
+ hasPreviousPage
2511
+ startCursor
2512
+ endCursor
2513
+ }
2514
+ nodes {
2515
+ ...RPC_TRANSACTION_FIELDS
2516
+ }
2517
+ }
2518
+ }
2519
+ fragment RPC_EVENTS_FIELDS on Event {
2520
+ sendingModule {
2521
+ package {
2522
+ address
2523
+ }
2524
+ name
2525
+ }
2526
+ sender {
2527
+ address
2528
+ }
2529
+ type {
2530
+ repr
2531
+ }
2532
+ json
2533
+ bcs
2534
+ timestamp
2535
+ }
2536
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
2537
+ digest
2538
+ rawTransaction: bcs @include(if: $showInput)
2539
+ rawTransaction: bcs @include(if: $showRawInput)
2540
+ sender {
2541
+ address
2542
+ }
2543
+ signatures
2544
+ effects {
2545
+ bcs @include(if: $showEffects)
2546
+ bcs @include(if: $showObjectChanges)
2547
+ bcs @include(if: $showRawEffects)
2548
+ events @include(if: $showEvents) {
2549
+ pageInfo {
2550
+ hasNextPage
2551
+ endCursor
2552
+ }
2553
+ nodes {
2554
+ ...RPC_EVENTS_FIELDS
2555
+ }
2556
+ }
2557
+ checkpoint {
2558
+ sequenceNumber
2559
+ }
2560
+ timestamp
2561
+ balanceChanges @include(if: $showBalanceChanges) {
2562
+ pageInfo {
2563
+ hasNextPage
2564
+ endCursor
2565
+ }
2566
+ nodes {
2567
+ coinType {
2568
+ repr
2569
+ }
2570
+ owner {
2571
+ asObject {
2572
+ address
2573
+ }
2574
+ asAddress {
2575
+ address
2576
+ }
2577
+ }
2578
+ amount
2579
+ }
2580
+ }
2581
+ objectChanges @include(if: $showObjectChanges) {
2582
+ pageInfo {
2583
+ hasNextPage
2584
+ endCursor
2585
+ }
2586
+ nodes {
2587
+ address
2588
+ inputState {
2589
+ version
2590
+ asMoveObject {
2591
+ contents {
2592
+ type {
2593
+ repr
2594
+ }
2595
+ }
2596
+ }
2597
+ }
2598
+ outputState {
2599
+ asMoveObject {
2600
+ contents {
2601
+ type {
2602
+ repr
2603
+ }
2604
+ }
2605
+ }
2606
+ asMovePackage {
2607
+ modules(first: 10) {
2608
+ nodes {
2609
+ name
2610
+ }
2611
+ }
2612
+ }
2613
+ }
2614
+ }
2615
+ }
2616
+ }
2617
+ }`);
2618
+ const GetTransactionBlockDocument = new TypedDocumentString(`
2619
+ query getTransactionBlock($digest: String!, $showBalanceChanges: Boolean = false, $showEffects: Boolean = false, $showRawEffects: Boolean = false, $showEvents: Boolean = false, $showInput: Boolean = false, $showObjectChanges: Boolean = false, $showRawInput: Boolean = false) {
2620
+ transactionBlock(digest: $digest) {
2621
+ ...RPC_TRANSACTION_FIELDS
2622
+ }
2623
+ }
2624
+ fragment RPC_EVENTS_FIELDS on Event {
2625
+ sendingModule {
2626
+ package {
2627
+ address
2628
+ }
2629
+ name
2630
+ }
2631
+ sender {
2632
+ address
2633
+ }
2634
+ type {
2635
+ repr
2636
+ }
2637
+ json
2638
+ bcs
2639
+ timestamp
2640
+ }
2641
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
2642
+ digest
2643
+ rawTransaction: bcs @include(if: $showInput)
2644
+ rawTransaction: bcs @include(if: $showRawInput)
2645
+ sender {
2646
+ address
2647
+ }
2648
+ signatures
2649
+ effects {
2650
+ bcs @include(if: $showEffects)
2651
+ bcs @include(if: $showObjectChanges)
2652
+ bcs @include(if: $showRawEffects)
2653
+ events @include(if: $showEvents) {
2654
+ pageInfo {
2655
+ hasNextPage
2656
+ endCursor
2657
+ }
2658
+ nodes {
2659
+ ...RPC_EVENTS_FIELDS
2660
+ }
2661
+ }
2662
+ checkpoint {
2663
+ sequenceNumber
2664
+ }
2665
+ timestamp
2666
+ balanceChanges @include(if: $showBalanceChanges) {
2667
+ pageInfo {
2668
+ hasNextPage
2669
+ endCursor
2670
+ }
2671
+ nodes {
2672
+ coinType {
2673
+ repr
2674
+ }
2675
+ owner {
2676
+ asObject {
2677
+ address
2678
+ }
2679
+ asAddress {
2680
+ address
2681
+ }
2682
+ }
2683
+ amount
2684
+ }
2685
+ }
2686
+ objectChanges @include(if: $showObjectChanges) {
2687
+ pageInfo {
2688
+ hasNextPage
2689
+ endCursor
2690
+ }
2691
+ nodes {
2692
+ address
2693
+ inputState {
2694
+ version
2695
+ asMoveObject {
2696
+ contents {
2697
+ type {
2698
+ repr
2699
+ }
2700
+ }
2701
+ }
2702
+ }
2703
+ outputState {
2704
+ asMoveObject {
2705
+ contents {
2706
+ type {
2707
+ repr
2708
+ }
2709
+ }
2710
+ }
2711
+ asMovePackage {
2712
+ modules(first: 10) {
2713
+ nodes {
2714
+ name
2715
+ }
2716
+ }
2717
+ }
2718
+ }
2719
+ }
2720
+ }
2721
+ }
2722
+ }`);
2723
+ const MultiGetTransactionBlocksDocument = new TypedDocumentString(`
2724
+ query multiGetTransactionBlocks($digests: [String!]!, $limit: Int, $cursor: String, $showBalanceChanges: Boolean = false, $showEffects: Boolean = false, $showRawEffects: Boolean = false, $showEvents: Boolean = false, $showInput: Boolean = false, $showObjectChanges: Boolean = false, $showRawInput: Boolean = false) {
2725
+ transactionBlocks(
2726
+ first: $limit
2727
+ after: $cursor
2728
+ filter: {transactionIds: $digests}
2729
+ ) {
2730
+ pageInfo {
2731
+ hasNextPage
2732
+ hasPreviousPage
2733
+ startCursor
2734
+ endCursor
2735
+ }
2736
+ nodes {
2737
+ ...RPC_TRANSACTION_FIELDS
2738
+ }
2739
+ }
2740
+ }
2741
+ fragment RPC_EVENTS_FIELDS on Event {
2742
+ sendingModule {
2743
+ package {
2744
+ address
2745
+ }
2746
+ name
2747
+ }
2748
+ sender {
2749
+ address
2750
+ }
2751
+ type {
2752
+ repr
2753
+ }
2754
+ json
2755
+ bcs
2756
+ timestamp
2757
+ }
2758
+ fragment RPC_TRANSACTION_FIELDS on TransactionBlock {
2759
+ digest
2760
+ rawTransaction: bcs @include(if: $showInput)
2761
+ rawTransaction: bcs @include(if: $showRawInput)
2762
+ sender {
2763
+ address
2764
+ }
2765
+ signatures
2766
+ effects {
2767
+ bcs @include(if: $showEffects)
2768
+ bcs @include(if: $showObjectChanges)
2769
+ bcs @include(if: $showRawEffects)
2770
+ events @include(if: $showEvents) {
2771
+ pageInfo {
2772
+ hasNextPage
2773
+ endCursor
2774
+ }
2775
+ nodes {
2776
+ ...RPC_EVENTS_FIELDS
2777
+ }
2778
+ }
2779
+ checkpoint {
2780
+ sequenceNumber
2781
+ }
2782
+ timestamp
2783
+ balanceChanges @include(if: $showBalanceChanges) {
2784
+ pageInfo {
2785
+ hasNextPage
2786
+ endCursor
2787
+ }
2788
+ nodes {
2789
+ coinType {
2790
+ repr
2791
+ }
2792
+ owner {
2793
+ asObject {
2794
+ address
2795
+ }
2796
+ asAddress {
2797
+ address
2798
+ }
2799
+ }
2800
+ amount
2801
+ }
2802
+ }
2803
+ objectChanges @include(if: $showObjectChanges) {
2804
+ pageInfo {
2805
+ hasNextPage
2806
+ endCursor
2807
+ }
2808
+ nodes {
2809
+ address
2810
+ inputState {
2811
+ version
2812
+ asMoveObject {
2813
+ contents {
2814
+ type {
2815
+ repr
2816
+ }
2817
+ }
2818
+ }
2819
+ }
2820
+ outputState {
2821
+ asMoveObject {
2822
+ contents {
2823
+ type {
2824
+ repr
2825
+ }
2826
+ }
2827
+ }
2828
+ asMovePackage {
2829
+ modules(first: 10) {
2830
+ nodes {
2831
+ name
2832
+ }
2833
+ }
2834
+ }
2835
+ }
2836
+ }
2837
+ }
2838
+ }
2839
+ }`);
2840
+ const PaginateTransactionBlockListsDocument = new TypedDocumentString(`
2841
+ query paginateTransactionBlockLists($digest: String!, $hasMoreEvents: Boolean!, $hasMoreBalanceChanges: Boolean!, $hasMoreObjectChanges: Boolean!, $afterEvents: String, $afterBalanceChanges: String, $afterObjectChanges: String) {
2842
+ transactionBlock(digest: $digest) {
2843
+ ...PAGINATE_TRANSACTION_LISTS
2844
+ }
2845
+ }
2846
+ fragment RPC_EVENTS_FIELDS on Event {
2847
+ sendingModule {
2848
+ package {
2849
+ address
2850
+ }
2851
+ name
2852
+ }
2853
+ sender {
2854
+ address
2855
+ }
2856
+ type {
2857
+ repr
2858
+ }
2859
+ json
2860
+ bcs
2861
+ timestamp
2862
+ }
2863
+ fragment PAGINATE_TRANSACTION_LISTS on TransactionBlock {
2864
+ effects {
2865
+ events(after: $afterEvents) @include(if: $hasMoreEvents) {
2866
+ pageInfo {
2867
+ hasNextPage
2868
+ endCursor
2869
+ }
2870
+ nodes {
2871
+ ...RPC_EVENTS_FIELDS
2872
+ }
2873
+ }
2874
+ balanceChanges(after: $afterBalanceChanges) @include(if: $hasMoreBalanceChanges) {
2875
+ pageInfo {
2876
+ hasNextPage
2877
+ endCursor
2878
+ }
2879
+ nodes {
2880
+ coinType {
2881
+ repr
2882
+ }
2883
+ owner {
2884
+ asObject {
2885
+ address
2886
+ }
2887
+ asAddress {
2888
+ address
2889
+ }
2890
+ }
2891
+ amount
2892
+ }
2893
+ }
2894
+ objectChanges(after: $afterObjectChanges) @include(if: $hasMoreObjectChanges) {
2895
+ pageInfo {
2896
+ hasNextPage
2897
+ endCursor
2898
+ }
2899
+ nodes {
2900
+ address
2901
+ inputState {
2902
+ version
2903
+ asMoveObject {
2904
+ contents {
2905
+ type {
2906
+ repr
2907
+ }
2908
+ }
2909
+ }
2910
+ }
2911
+ outputState {
2912
+ asMoveObject {
2913
+ contents {
2914
+ type {
2915
+ repr
2916
+ }
2917
+ }
2918
+ }
2919
+ asMovePackage {
2920
+ modules(first: 10) {
2921
+ nodes {
2922
+ name
2923
+ }
2924
+ }
2925
+ }
2926
+ }
2927
+ }
2928
+ }
2929
+ }
2930
+ }`);
2931
+ export {
2932
+ AddressTransactionBlockRelationship,
2933
+ DevInspectTransactionBlockDocument,
2934
+ DryRunTransactionBlockDocument,
2935
+ ExecuteTransactionBlockDocument,
2936
+ ExecutionStatus,
2937
+ Feature,
2938
+ GetAllBalancesDocument,
2939
+ GetBalanceDocument,
2940
+ GetChainIdentifierDocument,
2941
+ GetCheckpointDocument,
2942
+ GetCheckpointsDocument,
2943
+ GetCoinMetadataDocument,
2944
+ GetCoinsDocument,
2945
+ GetCommitteeInfoDocument,
2946
+ GetCurrentEpochDocument,
2947
+ GetDynamicFieldObjectDocument,
2948
+ GetDynamicFieldsDocument,
2949
+ GetLatestCheckpointSequenceNumberDocument,
2950
+ GetLatestIotaSystemStateDocument,
2951
+ GetMoveFunctionArgTypesDocument,
2952
+ GetNormalizedMoveFunctionDocument,
2953
+ GetNormalizedMoveModuleDocument,
2954
+ GetNormalizedMoveModulesByPackageDocument,
2955
+ GetNormalizedMoveStructDocument,
2956
+ GetObjectDocument,
2957
+ GetOwnedObjectsDocument,
2958
+ GetProtocolConfigDocument,
2959
+ GetReferenceGasPriceDocument,
2960
+ GetStakesByIdsDocument,
2961
+ GetStakesDocument,
2962
+ GetTotalSupplyDocument,
2963
+ GetTotalTransactionBlocksDocument,
2964
+ GetTransactionBlockDocument,
2965
+ GetTypeLayoutDocument,
2966
+ GetValidatorsApyDocument,
2967
+ IsTransactionIndexedOnNodeDocument,
2968
+ MoveAbility,
2969
+ MoveVisibility,
2970
+ MultiGetObjectsDocument,
2971
+ MultiGetTransactionBlocksDocument,
2972
+ NameFormat,
2973
+ ObjectKind,
2974
+ PaginateCheckpointTransactionBlocksDocument,
2975
+ PaginateEpochValidatorsDocument,
2976
+ PaginateMoveModuleListsDocument,
2977
+ PaginateTransactionBlockListsDocument,
2978
+ Paginate_Transaction_ListsFragmentDoc,
2979
+ QueryEventsDocument,
2980
+ QueryTransactionBlocksDocument,
2981
+ ResolveNameServiceAddressDocument,
2982
+ ResolveNameServiceNamesDocument,
2983
+ Rpc_Checkpoint_FieldsFragmentDoc,
2984
+ Rpc_Credential_FieldsFragmentDoc,
2985
+ Rpc_Events_FieldsFragmentDoc,
2986
+ Rpc_Move_Function_FieldsFragmentDoc,
2987
+ Rpc_Move_Module_FieldsFragmentDoc,
2988
+ Rpc_Move_Object_FieldsFragmentDoc,
2989
+ Rpc_Move_Struct_FieldsFragmentDoc,
2990
+ Rpc_Object_FieldsFragmentDoc,
2991
+ Rpc_Object_Owner_FieldsFragmentDoc,
2992
+ Rpc_Stake_FieldsFragmentDoc,
2993
+ Rpc_Transaction_FieldsFragmentDoc,
2994
+ Rpc_Validator_FieldsFragmentDoc,
2995
+ StakeStatus,
2996
+ TransactionBlockKindInput,
2997
+ TryGetPastObjectDocument,
2998
+ TypedDocumentString,
2999
+ ZkLoginIntentScope
3000
+ };
3001
+ //# sourceMappingURL=queries.js.map