encointer / encointer-js Goto Github PK
View Code? Open in Web Editor NEWjavascript npm packages for encointer
License: GNU General Public License v3.0
javascript npm packages for encointer
License: GNU General Public License v3.0
After upgrading the encointer-wallet I get the following build-warnings:
WARNING in ./node_modules/@polkadot/types-known/upgrades/index.js 62:25-27
"export 'BN' was not found in '@polkadot/util'
@ ./node_modules/@polkadot/types-known/index.js
@ ./node_modules/@polkadot/api/base/Init.js
@ ./node_modules/@polkadot/api/base/Getters.js
@ ./node_modules/@polkadot/api/base/index.js
@ ./node_modules/@polkadot/api/rx/index.js
@ ./node_modules/@polkadot/api/index.js
@ ./src/service/settings.js
@ ./src/index.js
@ multi ./src/index.js
WARNING in ./node_modules/@encointer/worker-api/index.js 2:0-93
"export 'CallOptions' was not found in './interface.js'
@ ./src/service/settings.js
@ ./src/index.js
@ multi ./src/index.js
WARNING in ./node_modules/@encointer/worker-api/index.js 2:0-93
"export 'IEncointerWorker' was not found in './interface.js'
@ ./src/service/settings.js
@ ./src/index.js
@ multi ./src/index.js
WARNING in ./node_modules/@encointer/worker-api/index.js 2:0-93
"export 'PubKeyPinPair' was not found in './interface.js'
@ ./src/service/settings.js
@ ./src/index.js
@ multi ./src/index.js
WARNING in ./node_modules/@encointer/worker-api/index.js 2:0-93
"export 'WorkerOptions' was not found in './interface.js'
@ ./src/service/settings.js
@ ./src/index.js
@ multi ./src/index.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
main.js (1.71 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (1.71 MiB)
main.js
encointerBalances_getAllBalances
ceremonies_getReputations
https://github.com/encointer/encointer-node/releases/tag/v0.8.0
This test reproduces the phenomenon from encointer/encointer-wallet-flutter/issues/374
The same account is returned multiple times.
Since integritee-network/worker@0af6918, we use TLS directly into the enclave.
We have never tested if this works with the current implementation here. Maybe we don't need any changes at all.
Right now, we have a mixture of base58 and hex formats for input/output arguments, I would suggests, that we keep it unified, maybe in base58?
This is the case:
Custom Rpc call: bazaar.getAllBusinesses(cid) expects hex format
Custom rpc call communities. communities.getAll()
Returns to be determined
Gesell node client: list-businesses flag expects cid in base58 format
Gesell node client: get communities: returns communities in hex format
Manual release procedure can go wrong, e.g., one can forget to run yarn install
before running the release cycle locally.
Instead, the npm relase cycle should be triggered in the CI when a github release has been created.
The current integration tests are very limited because it runs on a node without any communities.
This is more a note to self, as I have run into this twice already when updating the dev-deps.
Since paritytech/substrate#8615, metadata includes all info necessary to derive type definitions. We should drop our custom typedefs
lerna version --force-publish
updates the versions in the package.json file and performs a commit + push to the repository.package-info.ts
files due to the new version.Hence, to publish the package, we need two commits currently. Maybe we should do it manually again to be able to do it in only one commit?
Now that the tests are fixed after #15 is merged, we should also have some e2e tests here in GithubActions
Perform some basic actions in the tests:
Should try to fetch the community specific demurrage or fallback to the runtime const, see encointer/explorer#68
Already existing logic in encointer-wallet-flutter:
As our flutter app and the explorer share the need to use the worker-api for Cantillon support, it would make sense to publish a npm package for this.
We have an organization registered at npmjs.com
This has either to do with:
ERROR: Unable to load user definitions: Must use import to load ES Module: /home/clang/code/encointer-js/packages/types/src/interfaces/definitions.ts
require() of ES modules is not supported.
require() of /home/clang/code/encointer-js/packages/types/src/interfaces/definitions.ts from /home/clang/code/encointer-js/node_modules/@polkadot/typegen/cjs/fromDefs.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from /home/clang/code/encointer-js/packages/types/package.json.
Edit: After some investigation I can say that this is due to #70.
In the conversion from string to fixed-point values, we parse the string to a float. In theory, this can be inconsistent.
The runtime validates the locations in the attestations exactly. So if a discrepancy occurs, the attestation is invalid. So far, this has not been observed.
The question is whether we care about an exact transform, or if we just allow for slight discrepancies when validating the fixed point number in the location.
There are no unit tests for that, and we got an error of an invalid location while submitting attestations, most likely due to bad parsing of negative lattitudes
Currently we have defined our fixed point types like:
BalanceType: i128
but what is returned from the chain is:
BalanceTypeChain: {
bits: i128
}
We need to somehow align this properly such that:
encointer-js
or polkadot-js/api
directly.Which basically means that we need to change the encointer-js code to BalanceTypeChain
as arguments and return values of its function.
We need to update the code at several places to fix that.
since encointer/pallets#165 we now have a possible offset defined on meetup time and we have to support this in encointer-js to have valid meetups
We do this manually, and there seems to be a change in the formant, so we fail, and get the can't extract error
error.
encointer-js/packages/node-api/src/tx.ts
Line 83 in 4dfb32a
Due to latest Encointer node use Metadata V13 polkadot.js packages need to be updated.
We need to query 4 registries (bootstrapper, reputable, endorsee, newbie) for each call. A convenient wrapper would be nice.
The return value should be (#bootstrappers, #reputables, #endorsees, # newbies)
Migrate the stuff from polkadot-js/apps here, so we can just import the library there.
This is what we want to be able to do: https://github.com/polkadot-js/apps/blob/396a87743e3ab283e93d7426671ffe8232f526a5/packages/apps-config/src/api/spec/acala.ts#L4
run unit tests as GH action
As of v.3.3 the tests do not run anymore. This is like due to a change in the build-process.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.