@iota/graphql-transport 0.14.0 → 0.16.0

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 (81) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/generated/queries.d.ts +37 -71
  4. package/dist/cjs/generated/queries.d.ts.map +1 -0
  5. package/dist/cjs/generated/queries.js +12 -28
  6. package/dist/cjs/generated/queries.js.map +2 -2
  7. package/dist/cjs/index.d.ts +1 -0
  8. package/dist/cjs/index.d.ts.map +1 -0
  9. package/dist/cjs/mappers/bcs.d.ts +1 -0
  10. package/dist/cjs/mappers/bcs.d.ts.map +1 -0
  11. package/dist/cjs/mappers/checkpoint.d.ts +1 -0
  12. package/dist/cjs/mappers/checkpoint.d.ts.map +1 -0
  13. package/dist/cjs/mappers/display.d.ts +1 -0
  14. package/dist/cjs/mappers/display.d.ts.map +1 -0
  15. package/dist/cjs/mappers/move.d.ts +1 -0
  16. package/dist/cjs/mappers/move.d.ts.map +1 -0
  17. package/dist/cjs/mappers/object.d.ts +1 -0
  18. package/dist/cjs/mappers/object.d.ts.map +1 -0
  19. package/dist/cjs/mappers/owner.d.ts +1 -0
  20. package/dist/cjs/mappers/owner.d.ts.map +1 -0
  21. package/dist/cjs/mappers/stakes.d.ts +1 -0
  22. package/dist/cjs/mappers/stakes.d.ts.map +1 -0
  23. package/dist/cjs/mappers/transaction-block.d.ts +1 -0
  24. package/dist/cjs/mappers/transaction-block.d.ts.map +1 -0
  25. package/dist/cjs/mappers/transaction-block.js +16 -1
  26. package/dist/cjs/mappers/transaction-block.js.map +2 -2
  27. package/dist/cjs/mappers/util.d.ts +1 -0
  28. package/dist/cjs/mappers/util.d.ts.map +1 -0
  29. package/dist/cjs/mappers/validator.d.ts +1 -0
  30. package/dist/cjs/mappers/validator.d.ts.map +1 -0
  31. package/dist/cjs/mappers/validator.js +3 -2
  32. package/dist/cjs/mappers/validator.js.map +2 -2
  33. package/dist/cjs/methods.d.ts +1 -0
  34. package/dist/cjs/methods.d.ts.map +1 -0
  35. package/dist/cjs/methods.js +24 -15
  36. package/dist/cjs/methods.js.map +2 -2
  37. package/dist/cjs/transport.d.ts +4 -1
  38. package/dist/cjs/transport.d.ts.map +1 -0
  39. package/dist/cjs/transport.js +34 -30
  40. package/dist/cjs/transport.js.map +2 -2
  41. package/dist/esm/generated/queries.d.ts +37 -71
  42. package/dist/esm/generated/queries.d.ts.map +1 -0
  43. package/dist/esm/generated/queries.js +12 -28
  44. package/dist/esm/generated/queries.js.map +2 -2
  45. package/dist/esm/index.d.ts +1 -0
  46. package/dist/esm/index.d.ts.map +1 -0
  47. package/dist/esm/mappers/bcs.d.ts +1 -0
  48. package/dist/esm/mappers/bcs.d.ts.map +1 -0
  49. package/dist/esm/mappers/checkpoint.d.ts +1 -0
  50. package/dist/esm/mappers/checkpoint.d.ts.map +1 -0
  51. package/dist/esm/mappers/display.d.ts +1 -0
  52. package/dist/esm/mappers/display.d.ts.map +1 -0
  53. package/dist/esm/mappers/move.d.ts +1 -0
  54. package/dist/esm/mappers/move.d.ts.map +1 -0
  55. package/dist/esm/mappers/object.d.ts +1 -0
  56. package/dist/esm/mappers/object.d.ts.map +1 -0
  57. package/dist/esm/mappers/owner.d.ts +1 -0
  58. package/dist/esm/mappers/owner.d.ts.map +1 -0
  59. package/dist/esm/mappers/stakes.d.ts +1 -0
  60. package/dist/esm/mappers/stakes.d.ts.map +1 -0
  61. package/dist/esm/mappers/transaction-block.d.ts +1 -0
  62. package/dist/esm/mappers/transaction-block.d.ts.map +1 -0
  63. package/dist/esm/mappers/transaction-block.js +16 -1
  64. package/dist/esm/mappers/transaction-block.js.map +2 -2
  65. package/dist/esm/mappers/util.d.ts +1 -0
  66. package/dist/esm/mappers/util.d.ts.map +1 -0
  67. package/dist/esm/mappers/validator.d.ts +1 -0
  68. package/dist/esm/mappers/validator.d.ts.map +1 -0
  69. package/dist/esm/mappers/validator.js +3 -2
  70. package/dist/esm/mappers/validator.js.map +2 -2
  71. package/dist/esm/methods.d.ts +1 -0
  72. package/dist/esm/methods.d.ts.map +1 -0
  73. package/dist/esm/methods.js +30 -16
  74. package/dist/esm/methods.js.map +2 -2
  75. package/dist/esm/transport.d.ts +4 -1
  76. package/dist/esm/transport.d.ts.map +1 -0
  77. package/dist/esm/transport.js +34 -30
  78. package/dist/esm/transport.js.map +2 -2
  79. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  80. package/dist/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # @iota/graphql-transport
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b933a08: Add support for unwrapped objects
8
+
9
+ ### Patch Changes
10
+
11
+ - 22e7eb8: Add support for effective commission rate in validator queries and types (IIP8).
12
+ - Updated dependencies [c6ec123]
13
+ - Updated dependencies [b933a08]
14
+ - Updated dependencies [f15c61d]
15
+ - Updated dependencies [22e7eb8]
16
+ - @iota/iota-sdk@1.13.0
17
+
18
+ ## 0.15.0
19
+
20
+ ### Minor Changes
21
+
22
+ - 0be1d8d: Add a new RequestInspector API to look into requests and responses of an IotaClient
23
+
24
+ ### Patch Changes
25
+
26
+ - 331b7ab: Refreshed the README with up to date APIs, examples and more.
27
+ - adea573: Enable declarationMap in TS packages
28
+ - 1359874: Add fallback values to getBalance call if there is no balance for the requested
29
+ address.
30
+ - f116b86: fix undefined exchangeRatesId and stakingPoolId
31
+ - Updated dependencies [fe97265]
32
+ - Updated dependencies [d2ed95a]
33
+ - Updated dependencies [379dd4b]
34
+ - Updated dependencies [1a2b37f]
35
+ - Updated dependencies [1a2b37f]
36
+ - Updated dependencies [66d0c0d]
37
+ - Updated dependencies [9c6137c]
38
+ - Updated dependencies [331b7ab]
39
+ - Updated dependencies [adea573]
40
+ - Updated dependencies [bd1fa0b]
41
+ - Updated dependencies [1a2b37f]
42
+ - Updated dependencies [3f80310]
43
+ - Updated dependencies [2a9a1df]
44
+ - Updated dependencies [c74bcc2]
45
+ - Updated dependencies [045acb2]
46
+ - Updated dependencies [999224b]
47
+ - Updated dependencies [1a2b37f]
48
+ - Updated dependencies [f3d9079]
49
+ - Updated dependencies [7849d0e]
50
+ - Updated dependencies [045acb2]
51
+ - Updated dependencies [bd1fa0b]
52
+ - Updated dependencies [1a2b37f]
53
+ - Updated dependencies [045acb2]
54
+ - Updated dependencies [0be1d8d]
55
+ - Updated dependencies [235a8d7]
56
+ - Updated dependencies [46171b1]
57
+ - Updated dependencies [9d88461]
58
+ - Updated dependencies [045acb2]
59
+ - @iota/iota-sdk@1.12.0
60
+ - @iota/bcs@1.6.0
61
+
3
62
  ## 0.14.0
4
63
 
5
64
  ### Minor Changes
package/README.md CHANGED
@@ -15,11 +15,11 @@ npm install --save @iota/graphql-transport
15
15
 
16
16
  ```ts
17
17
  import { IotaClientGraphQLTransport } from '@iota/graphql-transport';
18
- import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client';
18
+ import { getFullnodeUrl, getGraphQLUrl, IotaClient } from '@iota/iota-sdk/client';
19
19
 
20
20
  const client = new IotaClient({
21
21
  transport: new IotaClientGraphQLTransport({
22
- url: 'https://iota-testnet.iota.org/graphql',
22
+ url: getGraphQLUrl('testnet'),
23
23
  // When specified, the transport will fallback to JSON RPC for unsupported method and parameters
24
24
  fallbackFullNodeUrl: getFullnodeUrl('testnet'),
25
25
  }),
@@ -5296,7 +5296,7 @@ export type Validator = {
5296
5296
  * low stake threshold.
5297
5297
  */
5298
5298
  atRisk?: Maybe<Scalars['UInt53']['output']>;
5299
- /** The fee charged by the validator for staking services. */
5299
+ /** The fee set by the validator for providing staking services. */
5300
5300
  commissionRate?: Maybe<Scalars['Int']['output']>;
5301
5301
  /**
5302
5302
  * Validator's set of credentials such as public keys, network addresses
@@ -5305,6 +5305,13 @@ export type Validator = {
5305
5305
  credentials?: Maybe<ValidatorCredentials>;
5306
5306
  /** Validator's description. */
5307
5307
  description?: Maybe<Scalars['String']['output']>;
5308
+ /**
5309
+ * The effective fee charged by the validator for staking services.
5310
+ *
5311
+ * This is evaluated according to [IIP8](https://github.com/iotaledger/IIPs/blob/main/iips/IIP-0008/IIP-0008.md)
5312
+ * for epochs with protocol version >= 20.
5313
+ */
5314
+ effectiveCommissionRate?: Maybe<Scalars['Int']['output']>;
5308
5315
  /**
5309
5316
  * The validator's current exchange object. The exchange rate is used to
5310
5317
  * determine the amount of IOTA tokens that each past IOTA staker can
@@ -6485,6 +6492,7 @@ export type GetCurrentEpochQuery = {
6485
6492
  __typename?: 'Validator';
6486
6493
  atRisk?: any | null;
6487
6494
  commissionRate?: number | null;
6495
+ effectiveCommissionRate?: number | null;
6488
6496
  exchangeRatesSize?: any | null;
6489
6497
  description?: string | null;
6490
6498
  gasPrice?: any | null;
@@ -6499,16 +6507,13 @@ export type GetCurrentEpochQuery = {
6499
6507
  poolTokenBalance?: any | null;
6500
6508
  projectUrl?: string | null;
6501
6509
  rewardsPool?: any | null;
6510
+ stakingPoolId: any;
6502
6511
  stakingPoolActivationEpoch?: any | null;
6503
6512
  stakingPoolIotaBalance?: any | null;
6504
6513
  votingPower?: number | null;
6505
- exchangeRates?: {
6506
- __typename?: 'MoveObject';
6514
+ exchangeRatesTable?: {
6515
+ __typename?: 'Owner';
6507
6516
  address: any;
6508
- contents?: {
6509
- __typename?: 'MoveValue';
6510
- json: any;
6511
- } | null;
6512
6517
  } | null;
6513
6518
  credentials?: {
6514
6519
  __typename?: 'ValidatorCredentials';
@@ -6534,10 +6539,6 @@ export type GetCurrentEpochQuery = {
6534
6539
  __typename?: 'MoveObject';
6535
6540
  address: any;
6536
6541
  } | null;
6537
- stakingPool?: {
6538
- __typename?: 'MoveObject';
6539
- address: any;
6540
- } | null;
6541
6542
  address: {
6542
6543
  __typename?: 'Address';
6543
6544
  address: any;
@@ -6555,6 +6556,7 @@ export type GetCurrentEpochQuery = {
6555
6556
  __typename?: 'Validator';
6556
6557
  atRisk?: any | null;
6557
6558
  commissionRate?: number | null;
6559
+ effectiveCommissionRate?: number | null;
6558
6560
  exchangeRatesSize?: any | null;
6559
6561
  description?: string | null;
6560
6562
  gasPrice?: any | null;
@@ -6569,16 +6571,13 @@ export type GetCurrentEpochQuery = {
6569
6571
  poolTokenBalance?: any | null;
6570
6572
  projectUrl?: string | null;
6571
6573
  rewardsPool?: any | null;
6574
+ stakingPoolId: any;
6572
6575
  stakingPoolActivationEpoch?: any | null;
6573
6576
  stakingPoolIotaBalance?: any | null;
6574
6577
  votingPower?: number | null;
6575
- exchangeRates?: {
6576
- __typename?: 'MoveObject';
6578
+ exchangeRatesTable?: {
6579
+ __typename?: 'Owner';
6577
6580
  address: any;
6578
- contents?: {
6579
- __typename?: 'MoveValue';
6580
- json: any;
6581
- } | null;
6582
6581
  } | null;
6583
6582
  credentials?: {
6584
6583
  __typename?: 'ValidatorCredentials';
@@ -6604,10 +6603,6 @@ export type GetCurrentEpochQuery = {
6604
6603
  __typename?: 'MoveObject';
6605
6604
  address: any;
6606
6605
  } | null;
6607
- stakingPool?: {
6608
- __typename?: 'MoveObject';
6609
- address: any;
6610
- } | null;
6611
6606
  address: {
6612
6607
  __typename?: 'Address';
6613
6608
  address: any;
@@ -6645,6 +6640,7 @@ export type PaginateEpochValidatorsQuery = {
6645
6640
  __typename?: 'Validator';
6646
6641
  atRisk?: any | null;
6647
6642
  commissionRate?: number | null;
6643
+ effectiveCommissionRate?: number | null;
6648
6644
  exchangeRatesSize?: any | null;
6649
6645
  description?: string | null;
6650
6646
  gasPrice?: any | null;
@@ -6659,16 +6655,13 @@ export type PaginateEpochValidatorsQuery = {
6659
6655
  poolTokenBalance?: any | null;
6660
6656
  projectUrl?: string | null;
6661
6657
  rewardsPool?: any | null;
6658
+ stakingPoolId: any;
6662
6659
  stakingPoolActivationEpoch?: any | null;
6663
6660
  stakingPoolIotaBalance?: any | null;
6664
6661
  votingPower?: number | null;
6665
- exchangeRates?: {
6666
- __typename?: 'MoveObject';
6662
+ exchangeRatesTable?: {
6663
+ __typename?: 'Owner';
6667
6664
  address: any;
6668
- contents?: {
6669
- __typename?: 'MoveValue';
6670
- json: any;
6671
- } | null;
6672
6665
  } | null;
6673
6666
  credentials?: {
6674
6667
  __typename?: 'ValidatorCredentials';
@@ -6694,10 +6687,6 @@ export type PaginateEpochValidatorsQuery = {
6694
6687
  __typename?: 'MoveObject';
6695
6688
  address: any;
6696
6689
  } | null;
6697
- stakingPool?: {
6698
- __typename?: 'MoveObject';
6699
- address: any;
6700
- } | null;
6701
6690
  address: {
6702
6691
  __typename?: 'Address';
6703
6692
  address: any;
@@ -6715,6 +6704,7 @@ export type PaginateEpochValidatorsQuery = {
6715
6704
  __typename?: 'Validator';
6716
6705
  atRisk?: any | null;
6717
6706
  commissionRate?: number | null;
6707
+ effectiveCommissionRate?: number | null;
6718
6708
  exchangeRatesSize?: any | null;
6719
6709
  description?: string | null;
6720
6710
  gasPrice?: any | null;
@@ -6729,16 +6719,13 @@ export type PaginateEpochValidatorsQuery = {
6729
6719
  poolTokenBalance?: any | null;
6730
6720
  projectUrl?: string | null;
6731
6721
  rewardsPool?: any | null;
6722
+ stakingPoolId: any;
6732
6723
  stakingPoolActivationEpoch?: any | null;
6733
6724
  stakingPoolIotaBalance?: any | null;
6734
6725
  votingPower?: number | null;
6735
- exchangeRates?: {
6736
- __typename?: 'MoveObject';
6726
+ exchangeRatesTable?: {
6727
+ __typename?: 'Owner';
6737
6728
  address: any;
6738
- contents?: {
6739
- __typename?: 'MoveValue';
6740
- json: any;
6741
- } | null;
6742
6729
  } | null;
6743
6730
  credentials?: {
6744
6731
  __typename?: 'ValidatorCredentials';
@@ -6764,10 +6751,6 @@ export type PaginateEpochValidatorsQuery = {
6764
6751
  __typename?: 'MoveObject';
6765
6752
  address: any;
6766
6753
  } | null;
6767
- stakingPool?: {
6768
- __typename?: 'MoveObject';
6769
- address: any;
6770
- } | null;
6771
6754
  address: {
6772
6755
  __typename?: 'Address';
6773
6756
  address: any;
@@ -6781,6 +6764,7 @@ export type Rpc_Validator_FieldsFragment = {
6781
6764
  __typename?: 'Validator';
6782
6765
  atRisk?: any | null;
6783
6766
  commissionRate?: number | null;
6767
+ effectiveCommissionRate?: number | null;
6784
6768
  exchangeRatesSize?: any | null;
6785
6769
  description?: string | null;
6786
6770
  gasPrice?: any | null;
@@ -6795,16 +6779,13 @@ export type Rpc_Validator_FieldsFragment = {
6795
6779
  poolTokenBalance?: any | null;
6796
6780
  projectUrl?: string | null;
6797
6781
  rewardsPool?: any | null;
6782
+ stakingPoolId: any;
6798
6783
  stakingPoolActivationEpoch?: any | null;
6799
6784
  stakingPoolIotaBalance?: any | null;
6800
6785
  votingPower?: number | null;
6801
- exchangeRates?: {
6802
- __typename?: 'MoveObject';
6786
+ exchangeRatesTable?: {
6787
+ __typename?: 'Owner';
6803
6788
  address: any;
6804
- contents?: {
6805
- __typename?: 'MoveValue';
6806
- json: any;
6807
- } | null;
6808
6789
  } | null;
6809
6790
  credentials?: {
6810
6791
  __typename?: 'ValidatorCredentials';
@@ -6830,10 +6811,6 @@ export type Rpc_Validator_FieldsFragment = {
6830
6811
  __typename?: 'MoveObject';
6831
6812
  address: any;
6832
6813
  } | null;
6833
- stakingPool?: {
6834
- __typename?: 'MoveObject';
6835
- address: any;
6836
- } | null;
6837
6814
  address: {
6838
6815
  __typename?: 'Address';
6839
6816
  address: any;
@@ -7067,6 +7044,7 @@ export type GetLatestIotaSystemStateQuery = {
7067
7044
  __typename?: 'Validator';
7068
7045
  atRisk?: any | null;
7069
7046
  commissionRate?: number | null;
7047
+ effectiveCommissionRate?: number | null;
7070
7048
  exchangeRatesSize?: any | null;
7071
7049
  description?: string | null;
7072
7050
  gasPrice?: any | null;
@@ -7081,16 +7059,13 @@ export type GetLatestIotaSystemStateQuery = {
7081
7059
  poolTokenBalance?: any | null;
7082
7060
  projectUrl?: string | null;
7083
7061
  rewardsPool?: any | null;
7062
+ stakingPoolId: any;
7084
7063
  stakingPoolActivationEpoch?: any | null;
7085
7064
  stakingPoolIotaBalance?: any | null;
7086
7065
  votingPower?: number | null;
7087
- exchangeRates?: {
7088
- __typename?: 'MoveObject';
7066
+ exchangeRatesTable?: {
7067
+ __typename?: 'Owner';
7089
7068
  address: any;
7090
- contents?: {
7091
- __typename?: 'MoveValue';
7092
- json: any;
7093
- } | null;
7094
7069
  } | null;
7095
7070
  credentials?: {
7096
7071
  __typename?: 'ValidatorCredentials';
@@ -7116,10 +7091,6 @@ export type GetLatestIotaSystemStateQuery = {
7116
7091
  __typename?: 'MoveObject';
7117
7092
  address: any;
7118
7093
  } | null;
7119
- stakingPool?: {
7120
- __typename?: 'MoveObject';
7121
- address: any;
7122
- } | null;
7123
7094
  address: {
7124
7095
  __typename?: 'Address';
7125
7096
  address: any;
@@ -7137,6 +7108,7 @@ export type GetLatestIotaSystemStateQuery = {
7137
7108
  __typename?: 'Validator';
7138
7109
  atRisk?: any | null;
7139
7110
  commissionRate?: number | null;
7111
+ effectiveCommissionRate?: number | null;
7140
7112
  exchangeRatesSize?: any | null;
7141
7113
  description?: string | null;
7142
7114
  gasPrice?: any | null;
@@ -7151,16 +7123,13 @@ export type GetLatestIotaSystemStateQuery = {
7151
7123
  poolTokenBalance?: any | null;
7152
7124
  projectUrl?: string | null;
7153
7125
  rewardsPool?: any | null;
7126
+ stakingPoolId: any;
7154
7127
  stakingPoolActivationEpoch?: any | null;
7155
7128
  stakingPoolIotaBalance?: any | null;
7156
7129
  votingPower?: number | null;
7157
- exchangeRates?: {
7158
- __typename?: 'MoveObject';
7130
+ exchangeRatesTable?: {
7131
+ __typename?: 'Owner';
7159
7132
  address: any;
7160
- contents?: {
7161
- __typename?: 'MoveValue';
7162
- json: any;
7163
- } | null;
7164
7133
  } | null;
7165
7134
  credentials?: {
7166
7135
  __typename?: 'ValidatorCredentials';
@@ -7186,10 +7155,6 @@ export type GetLatestIotaSystemStateQuery = {
7186
7155
  __typename?: 'MoveObject';
7187
7156
  address: any;
7188
7157
  } | null;
7189
- stakingPool?: {
7190
- __typename?: 'MoveObject';
7191
- address: any;
7192
- } | null;
7193
7158
  address: {
7194
7159
  __typename?: 'Address';
7195
7160
  address: any;
@@ -9453,3 +9418,4 @@ export declare const MultiGetTransactionBlocksDocument: TypedDocumentString<Mult
9453
9418
  export declare const PaginateTransactionBlockListsDocument: TypedDocumentString<PaginateTransactionBlockListsQuery, PaginateTransactionBlockListsQueryVariables>;
9454
9419
  export declare const ViewDocument: TypedDocumentString<ViewQuery, ViewQueryVariables>;
9455
9420
  export {};
9421
+ //# sourceMappingURL=queries.d.ts.map