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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +15 -17
  3. package/build/index.cjs +2 -0
  4. package/build/index.d.ts +20826 -0
  5. package/build/index.mjs +1 -0
  6. package/package.json +57 -1
  7. package/examples/job_and_result_submission.d.ts +0 -1
  8. package/examples/job_and_result_submission.js +0 -230
  9. package/index.d.ts +0 -3
  10. package/index.js +0 -5
  11. package/interfaces/augment-api-consts.d.ts +0 -1045
  12. package/interfaces/augment-api-consts.js +0 -3
  13. package/interfaces/augment-api-errors.d.ts +0 -2001
  14. package/interfaces/augment-api-errors.js +0 -3
  15. package/interfaces/augment-api-events.d.ts +0 -3268
  16. package/interfaces/augment-api-events.js +0 -3
  17. package/interfaces/augment-api-query.d.ts +0 -2117
  18. package/interfaces/augment-api-query.js +0 -3
  19. package/interfaces/augment-api-rpc.d.ts +0 -679
  20. package/interfaces/augment-api-rpc.js +0 -3
  21. package/interfaces/augment-api-runtime.d.ts +0 -363
  22. package/interfaces/augment-api-runtime.js +0 -3
  23. package/interfaces/augment-api-tx.d.ts +0 -4118
  24. package/interfaces/augment-api-tx.js +0 -3
  25. package/interfaces/augment-api.d.ts +0 -7
  26. package/interfaces/augment-api.js +0 -9
  27. package/interfaces/augment-types.d.ts +0 -1249
  28. package/interfaces/augment-types.js +0 -3
  29. package/interfaces/lookup.d.ts +0 -6240
  30. package/interfaces/lookup.js +0 -6248
  31. package/interfaces/registry.d.ts +0 -413
  32. package/interfaces/registry.js +0 -3
  33. package/interfaces/types-lookup.d.ts +0 -6157
  34. package/interfaces/types-lookup.js +0 -3
  35. package/metadata/static-latest.d.ts +0 -2
  36. package/metadata/static-latest.js +0 -7
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -4,30 +4,28 @@ This package is meant to be updated alongside changes to the tangle runtime.
4
4
 
5
5
  The package builds the types against the tangle standalone runtime.
6
6
 
7
- ### Update Types
7
+ ### Updating Types
8
8
 
9
- In order to update types after making changes to the Tangle APIs, do the following:
9
+ To update the types after modifying the Tangle APIs, follow these steps:
10
10
 
11
- - Run a local instance of the appropriate runtime. The types in this package correspond to the tangle standalone runtime.
12
- - Change your working directory into the `/types` folder (`cd types`).
13
- - Install dependencies using `yarn`.
14
- - Run the following yarn scripts:
15
- ```
16
- yarn update:metadata
17
- yarn build:interfaces
18
- ```
11
+ 1. Build the `tangle` project with the testnet feature:
19
12
 
20
- ### Building the types package
13
+ ```bash
14
+ cargo build --release --package tangle --features testnet
15
+ ```
21
16
 
22
- After updating the types, run a build for the package with
23
- ```
24
- yarn build
25
- ```
17
+ 2. Ensure you have [Node.js](https://nodejs.org/) version 18 or higher installed.
26
18
 
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.
19
+ 3. Generate the updated TypeScript types by running the `generate-ts-types.js` script:
20
+
21
+ ```bash
22
+ node types/scripts/generate-ts-types.js
23
+ ```
24
+
25
+ This process will automatically update the TypeScript types to reflect the latest changes in the Tangle APIs.
28
26
 
29
27
  ### Publishing and consuming types package
30
28
 
31
29
  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
30
 
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.
31
+ 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.
@@ -0,0 +1,2 @@
1
+ require('@polkadot/types/types/registry');
2
+