@webb-tools/tangle-substrate-types 0.5.9 → 0.5.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/README.md +11 -2
  2. package/{build/interfaces → interfaces}/augment-api-consts.d.ts +119 -24
  3. package/{ts-types/src/interfaces → interfaces}/augment-api-errors.d.ts +199 -342
  4. package/{build/interfaces → interfaces}/augment-api-events.d.ts +1365 -378
  5. package/{build/interfaces → interfaces}/augment-api-query.d.ts +718 -261
  6. package/{ts-types/src/interfaces → interfaces}/augment-api-tx.d.ts +1684 -442
  7. package/{ts-types/src/interfaces → interfaces}/lookup.d.ts +1415 -1095
  8. package/{build/interfaces → interfaces}/lookup.js +1427 -1107
  9. package/{build/interfaces → interfaces}/registry.d.ts +60 -75
  10. package/{ts-types/src/interfaces → interfaces}/types-lookup.d.ts +1225 -1130
  11. package/metadata/static-latest.d.ts +2 -0
  12. package/metadata/static-latest.js +7 -0
  13. package/package.json +1 -72
  14. package/.envrc +0 -5
  15. package/babel-config-cjs.cjs +0 -10
  16. package/build/interfaces/augment-api-errors.d.ts +0 -2144
  17. package/build/interfaces/augment-api-tx.d.ts +0 -2876
  18. package/build/interfaces/lookup.d.ts +0 -5920
  19. package/build/interfaces/types-lookup.d.ts +0 -6062
  20. package/build/metadata/static-latest.d.ts +0 -2
  21. package/build/metadata/static-latest.js +0 -7
  22. package/build/metadata/static-type.d.ts +0 -2
  23. package/build/metadata/static-type.js +0 -1
  24. package/build/package.json +0 -1
  25. package/playground.ts +0 -86
  26. package/polkadot-dev-configs/babel-config-cjs.cjs +0 -12
  27. package/polkadot-dev-configs/babel-general.cjs +0 -15
  28. package/polkadot-dev-configs/babel-plugins.cjs +0 -21
  29. package/polkadot-dev-configs/babel-presets.cjs +0 -33
  30. package/polkadot-dev-configs/babel-resolver.cjs +0 -14
  31. package/scripts/build.js +0 -134
  32. package/scripts/publish-types.js +0 -95
  33. package/scripts/updateMetadata.ts +0 -44
  34. package/src/examples/job_and_result_submission.ts +0 -203
  35. package/src/index.ts +0 -7
  36. package/src/interfaces/augment-api-consts.ts +0 -958
  37. package/src/interfaces/augment-api-errors.ts +0 -2152
  38. package/src/interfaces/augment-api-events.ts +0 -1465
  39. package/src/interfaces/augment-api-query.ts +0 -1629
  40. package/src/interfaces/augment-api-rpc.ts +0 -617
  41. package/src/interfaces/augment-api-runtime.ts +0 -308
  42. package/src/interfaces/augment-api-tx.ts +0 -1550
  43. package/src/interfaces/augment-api.ts +0 -10
  44. package/src/interfaces/augment-types.ts +0 -1256
  45. package/src/interfaces/lookup.ts +0 -5924
  46. package/src/interfaces/registry.ts +0 -435
  47. package/src/interfaces/types-lookup.ts +0 -6467
  48. package/src/metadata/metadata.json +0 -5
  49. package/src/metadata/static-latest.ts +0 -1
  50. package/src/metadata/static-type.ts +0 -3
  51. package/ts-types/playground.d.ts +0 -1
  52. package/ts-types/src/examples/job_and_result_submission.d.ts +0 -1
  53. package/ts-types/src/index.d.ts +0 -3
  54. package/ts-types/src/interfaces/augment-api-consts.d.ts +0 -950
  55. package/ts-types/src/interfaces/augment-api-events.d.ts +0 -2281
  56. package/ts-types/src/interfaces/augment-api-query.d.ts +0 -1660
  57. package/ts-types/src/interfaces/augment-api-rpc.d.ts +0 -679
  58. package/ts-types/src/interfaces/augment-api-runtime.d.ts +0 -363
  59. package/ts-types/src/interfaces/augment-api.d.ts +0 -7
  60. package/ts-types/src/interfaces/augment-types.d.ts +0 -1249
  61. package/ts-types/src/interfaces/registry.d.ts +0 -428
  62. package/ts-types/src/metadata/static-latest.d.ts +0 -2
  63. package/ts-types/src/metadata/static-type.d.ts +0 -2
  64. package/ts-types/tsconfig.tsbuildinfo +0 -1
  65. package/tsconfig.json +0 -36
  66. /package/{build/examples → examples}/job_and_result_submission.d.ts +0 -0
  67. /package/{build/examples → examples}/job_and_result_submission.js +0 -0
  68. /package/{build/index.d.ts → index.d.ts} +0 -0
  69. /package/{build/index.js → index.js} +0 -0
  70. /package/{build/interfaces → interfaces}/augment-api-consts.js +0 -0
  71. /package/{build/interfaces → interfaces}/augment-api-errors.js +0 -0
  72. /package/{build/interfaces → interfaces}/augment-api-events.js +0 -0
  73. /package/{build/interfaces → interfaces}/augment-api-query.js +0 -0
  74. /package/{build/interfaces → interfaces}/augment-api-rpc.d.ts +0 -0
  75. /package/{build/interfaces → interfaces}/augment-api-rpc.js +0 -0
  76. /package/{build/interfaces → interfaces}/augment-api-runtime.d.ts +0 -0
  77. /package/{build/interfaces → interfaces}/augment-api-runtime.js +0 -0
  78. /package/{build/interfaces → interfaces}/augment-api-tx.js +0 -0
  79. /package/{build/interfaces → interfaces}/augment-api.d.ts +0 -0
  80. /package/{build/interfaces → interfaces}/augment-api.js +0 -0
  81. /package/{build/interfaces → interfaces}/augment-types.d.ts +0 -0
  82. /package/{build/interfaces → interfaces}/augment-types.js +0 -0
  83. /package/{build/interfaces → interfaces}/registry.js +0 -0
  84. /package/{build/interfaces → interfaces}/types-lookup.js +0 -0
package/README.md CHANGED
@@ -6,10 +6,11 @@ The package builds the types against the tangle standalone runtime.
6
6
 
7
7
  ### Update Types
8
8
 
9
- In order to update types after making changes to the tangle api do the following:
9
+ In order to update types after making changes to the Tangle APIs, do the following:
10
10
 
11
11
  - Run a local instance of the appropriate runtime. The types in this package correspond to the tangle standalone runtime.
12
-
12
+ - Change your working directory into the `/types` folder (`cd types`).
13
+ - Install dependencies using `yarn`.
13
14
  - Run the following yarn scripts:
14
15
  ```
15
16
  yarn update:metadata
@@ -22,3 +23,11 @@ After updating the types, run a build for the package with
22
23
  ```
23
24
  yarn build
24
25
  ```
26
+
27
+ Note that you may run into some errors of missing imports while building. To resolve this, manually add the missing imports on the files with errors. If using VSCode, you can also use its `Add all missing imports` feature to speed up the process.
28
+
29
+ ### Publishing and consuming types package
30
+
31
+ Once the types have been updated, open a new PR on this repository to submit your changes. Remember to update the types package's version. Once the PR is merged into the `master`, a GitHub Actions workflow will automatically publish them to NPM.
32
+
33
+ In case that you need to use or prototype the types before they are officially published to NPM, consider installing the package locally and using the local package until its updated version is published to NPM.
@@ -1,11 +1,11 @@
1
- import '@polkadot/api-base/types/consts';
2
- import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
3
- import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
4
- import type { Codec, ITuple } from '@polkadot/types-codec/types';
5
- import type { AccountId32, H160, Perbill, Permill } from '@polkadot/types/interfaces/runtime';
6
- import { SpWeightsWeightV2Weight, FrameSupportPalletId, StagingXcmV4AssetAssetId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpWeightsRuntimeDbWeight, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
1
+ import "@polkadot/api-base/types/consts";
2
+ import type { ApiTypes, AugmentedConst } from "@polkadot/api-base/types";
3
+ import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from "@polkadot/types-codec";
4
+ import type { Codec, ITuple } from "@polkadot/types-codec/types";
5
+ import type { AccountId32, H160, Perbill, Permill } from "@polkadot/types/interfaces/runtime";
6
+ import { SpWeightsWeightV2Weight, FrameSupportPalletId, StagingXcmV4AssetAssetId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpWeightsRuntimeDbWeight, SpVersionRuntimeVersion } from "@polkadot/types/lookup";
7
7
  export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
8
- declare module '@polkadot/api-base/types/consts' {
8
+ declare module "@polkadot/api-base/types/consts" {
9
9
  interface AugmentedConsts<ApiType extends ApiTypes> {
10
10
  assets: {
11
11
  /**
@@ -525,9 +525,28 @@ declare module '@polkadot/api-base/types/consts' {
525
525
  **/
526
526
  [key: string]: Codec;
527
527
  };
528
- jobs: {
528
+ lst: {
529
529
  /**
530
- * `PalletId` for the jobs pallet.
530
+ * The maximum pool points-to-balance ratio that an `open` pool can have.
531
+ *
532
+ * This is important in the event slashing takes place and the pool's points-to-balance
533
+ * ratio becomes disproportional.
534
+ *
535
+ * Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations
536
+ * are a function of number of points, and by setting this value to e.g. 10, you ensure
537
+ * that the total number of points in the system are at most 10 times the total_issuance of
538
+ * the chain, in the absolute worse case.
539
+ *
540
+ * For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
541
+ * Such a scenario would also be the equivalent of the pool being 90% slashed.
542
+ **/
543
+ maxPointsToBalance: u8 & AugmentedConst<ApiType>;
544
+ /**
545
+ * The maximum number of simultaneous unbonding chunks that can exist per member.
546
+ **/
547
+ maxUnbonding: u32 & AugmentedConst<ApiType>;
548
+ /**
549
+ * The nomination pool's pallet id.
531
550
  **/
532
551
  palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
533
552
  /**
@@ -537,11 +556,11 @@ declare module '@polkadot/api-base/types/consts' {
537
556
  };
538
557
  multiAssetDelegation: {
539
558
  /**
540
- * The duration for which the bond is locked.
559
+ * The duration for which the stake is locked.
541
560
  **/
542
561
  bondDuration: u32 & AugmentedConst<ApiType>;
543
562
  /**
544
- * Number of rounds that delegation bond less requests must wait before being executable.
563
+ * Number of rounds that delegation unstake requests must wait before being executable.
545
564
  **/
546
565
  delegationBondLessDelay: u32 & AugmentedConst<ApiType>;
547
566
  /**
@@ -553,15 +572,15 @@ declare module '@polkadot/api-base/types/consts' {
553
572
  **/
554
573
  leaveOperatorsDelay: u32 & AugmentedConst<ApiType>;
555
574
  /**
556
- * The minimum amount of bond required for a delegate.
575
+ * The minimum amount of stake required for a delegate.
557
576
  **/
558
577
  minDelegateAmount: u128 & AugmentedConst<ApiType>;
559
578
  /**
560
- * The minimum amount of bond required for an operator.
579
+ * The minimum amount of stake required for an operator.
561
580
  **/
562
581
  minOperatorBondAmount: u128 & AugmentedConst<ApiType>;
563
582
  /**
564
- * Number of rounds operator requests to decrease self-bond must wait to be executable.
583
+ * Number of rounds operator requests to decrease self-stake must wait to be executable.
565
584
  **/
566
585
  operatorBondLessDelay: u32 & AugmentedConst<ApiType>;
567
586
  /**
@@ -666,16 +685,6 @@ declare module '@polkadot/api-base/types/consts' {
666
685
  **/
667
686
  [key: string]: Codec;
668
687
  };
669
- roles: {
670
- /**
671
- * Max roles per account.
672
- **/
673
- maxRolesPerAccount: u32 & AugmentedConst<ApiType>;
674
- /**
675
- * Generic const
676
- **/
677
- [key: string]: Codec;
678
- };
679
688
  scheduler: {
680
689
  /**
681
690
  * The maximum weight that may be scheduled per block for any dispatchables.
@@ -694,6 +703,92 @@ declare module '@polkadot/api-base/types/consts' {
694
703
  **/
695
704
  [key: string]: Codec;
696
705
  };
706
+ services: {
707
+ /**
708
+ * Maximum number of binaries per gadget.
709
+ **/
710
+ maxBinariesPerGadget: u32 & AugmentedConst<ApiType>;
711
+ /**
712
+ * binary name maximum length.
713
+ **/
714
+ maxBinaryNameLength: u32 & AugmentedConst<ApiType>;
715
+ /**
716
+ * Maximum number of blueprints per operator.
717
+ **/
718
+ maxBlueprintsPerOperator: u32 & AugmentedConst<ApiType>;
719
+ /**
720
+ * Container image name maximum length.
721
+ **/
722
+ maxContainerImageNameLength: u32 & AugmentedConst<ApiType>;
723
+ /**
724
+ * Container image tag maximum length.
725
+ **/
726
+ maxContainerImageTagLength: u32 & AugmentedConst<ApiType>;
727
+ /**
728
+ * Container registry maximum length.
729
+ **/
730
+ maxContainerRegistryLength: u32 & AugmentedConst<ApiType>;
731
+ /**
732
+ * Maximum number of fields in a job call.
733
+ **/
734
+ maxFields: u32 & AugmentedConst<ApiType>;
735
+ /**
736
+ * Maximum size of a field in a job call.
737
+ **/
738
+ maxFieldsSize: u32 & AugmentedConst<ApiType>;
739
+ /**
740
+ * Git owner maximum length.
741
+ **/
742
+ maxGitOwnerLength: u32 & AugmentedConst<ApiType>;
743
+ /**
744
+ * Git repository maximum length.
745
+ **/
746
+ maxGitRepoLength: u32 & AugmentedConst<ApiType>;
747
+ /**
748
+ * Git tag maximum length.
749
+ **/
750
+ maxGitTagLength: u32 & AugmentedConst<ApiType>;
751
+ /**
752
+ * IPFS hash maximum length.
753
+ **/
754
+ maxIpfsHashLength: u32 & AugmentedConst<ApiType>;
755
+ /**
756
+ * Maximum number of jobs per service.
757
+ **/
758
+ maxJobsPerService: u32 & AugmentedConst<ApiType>;
759
+ /**
760
+ * Maximum length of metadata string length.
761
+ **/
762
+ maxMetadataLength: u32 & AugmentedConst<ApiType>;
763
+ /**
764
+ * Maximum number of Operators per service.
765
+ **/
766
+ maxOperatorsPerService: u32 & AugmentedConst<ApiType>;
767
+ /**
768
+ * Maximum number of permitted callers per service.
769
+ **/
770
+ maxPermittedCallers: u32 & AugmentedConst<ApiType>;
771
+ /**
772
+ * Maximum number of services per operator.
773
+ **/
774
+ maxServicesPerOperator: u32 & AugmentedConst<ApiType>;
775
+ /**
776
+ * Maximum number of services per user.
777
+ **/
778
+ maxServicesPerUser: u32 & AugmentedConst<ApiType>;
779
+ /**
780
+ * Maximum number of sources per gadget.
781
+ **/
782
+ maxSourcesPerGadget: u32 & AugmentedConst<ApiType>;
783
+ /**
784
+ * `PalletId` for the services pallet.
785
+ **/
786
+ palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
787
+ /**
788
+ * Generic const
789
+ **/
790
+ [key: string]: Codec;
791
+ };
697
792
  staking: {
698
793
  /**
699
794
  * Number of eras that staked funds must remain bonded for.