orbs-network / orbs-client-sdk-javascript Goto Github PK
View Code? Open in Web Editor NEWSDK for implementing clients for Orbs network in JavaScript / TypeScript
License: MIT License
SDK for implementing clients for Orbs network in JavaScript / TypeScript
License: MIT License
Both functions encode Uint8Array to string (and the first one is defined twice in different places).
When accidentally returning a boolean from the contract, I get the error:
Error: received argument 0 has unknown type: 65535
at Ce (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:8:29510)
at et (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:8:38018)
at e.<anonymous> (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:8:47002)
at c (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:171510)
at Generator._invoke (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:171298)
at Generator.e.<computed> [as next] (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:171932)
at r (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:24553)
at o (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:24763)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
a better error message could state the supported types, and/or direct to the data types documentation.
The addresses we generate need to have a checksum, in that manner of lower/upper case similar to EIP-55
See for reference the go client sdk - crypto/encoding/hex.go
Currently missing:
I have verified that once Firefox 69 is out, everything will work automatically.
Things missing so far:
Easiest way to enable iOS support is to include the following snippet:
<script src="https://peterolson.github.io/BigInteger.js/BigInteger.min.js"></script>
<script>
if (navigator.userAgent.match(/iPhone/) || navigator.userAgent.match(/iPad/)) {
function BigInt(value) {
if ((typeof value) === "string" && value.slice(0, 2) === "0x") {
return bigInt(value.slice(2), 16);
}
return bigInt(value);
}
}
</script>
It includes the BigInt polyfill and a compatibility layer that allows our SDK to utilize it.
Also notice that some files in membuffers were added (like .d.ts
files for typescript)
They should be copied back to the module
Are we ok with all of these warnings, including "no such file or directory"?
`
npm WARN npm npm does not support Node.js v10.10.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN saveError ENOENT: no such file or directory, open '/Users/drortrieman/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/drortrieman/package.json'
npm WARN drortrieman No description
npm WARN drortrieman No repository field.
npm WARN drortrieman No README data
npm WARN drortrieman No license field.
the transaction object (result from {transactions} = await client.getBlock(x)
) does not contain a reference to the enclosing block. this is lean but not easy to use for bulk transaction opertations where you'd like to pass the transaction object around with all. its relevant info.
should add a reference (either blockHeight integer, or a js reference to the GetBlockResponse
object.
so that a user can serialize her address to be persisted and usable between restarts
The library lacks tests in general. After adding more tests, this work can also be available for the users of this library as a test-kit.
When we translate from Argument (src/codec/Arguments.ts func argumentsBuilders) to Builder (src/protocol/Protocol.ts ctor)
we take apart the arg and use switch over the type as string to create a builder where the type is number ... this seems unneeded ...
why not just push the switch over string into the builder ?
TODO: outline a wallet architecture, supposedly modeled after Metamask Ethereum Provider.
The whole thing boils down to these signature calls: https://github.com/orbs-network/orbs-client-sdk-javascript/blob/master/src/crypto/Signature.ts
They should be extracted to an adapter, which would make it a 2.0 SDK.
It would help users if we export internal tools to them. my specific example currently is (addressToBytes
and bytesToAddress
).
this can happen in several ways:
orbs-client-sdk/dist/orbs/Account
In test("Deployment")
scenario inside NodeJs E2E test:
https://github.com/orbs-network/orbs-client-sdk-javascript/blob/master/e2e/nodejs/e2e.test.js#L126
The scenario deploys a contract named Inc
and then performs transactions on BenchmarkToken
.. It should be changed to transact with the newly deployed contract.
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.