tokenio / sdk-js Goto Github PK
View Code? Open in Web Editor NEWJavascript (Node and Browser) SDK for interacting with the Token System
Javascript (Node and Browser) SDK for interacting with the Token System
Getting account info, balance and transactions works nice and was easy to implement thanks to the really cool expressjs sample app. But retrieving standing orders will return PERMISSION_DENIED.
The docs on your website state:
Get Standing Orders
AISPs can access a given standing order with the standingOrderId or a paged-list of standing order records.
Get Standing Orders (Currently available only in Java)
If it does not currently work, I'd rather have an exception that states Not supported yet, please see xyz for more info
instead of an obscure PERMISSION_DENIED error. This gave me quite some headscratching.
ps. Any info about when this feature will work?
The docs for custom engines are a bit hard to find, though it seems like a very important part of integrating tokenIO (if I need to write the keys into a SQL database for example).
https://github.com/tokenio/sdk-js/tree/master/core/src/security/engines
It might help to have a section in the main docs, as a little bonus it might help to have an example of how to implement a custom database.
static verify(message, signature, publicKey) { const msg = Util.wrapBuffer(message); const sig = Util.bufferKey(signature); const result = nacl.sign.detached.verify(msg, sig, publicKey); if (!result) { throw new Error(
Invalid signature ${signature} on message ${message} with pk ${publicKey}); } }
The above function from the Crypto class does not return anything when the result is true.
npm audit
is logging a prototype pollution vulnerability for node-forge
< v0.10.0
as a dependency of @token-io/tpp
and @token-io/core
: https://npmjs.com/advisories/1561
Can it be updated when you get a chance? Thanks!
test
I'd love to see typescript support, it has a bigger community and better tooling than flow, its just the vastly more popular choice (https://www.npmtrends.com/babel-core-vs-typescript-vs-flow-bin).
Also IDE support within VSCode just works, even if you use pure JS, which makes for a better dev experience.
Its just a nitpick though.
I'd like to implement a custom KeyStore / CryptoEngine like:
export class CryptoEngine extends KeyStoreCryptoEngine {
constructor(memberId: string) {
super(memberId, myCustomkeyStore);
}
}
But KeyStoreCryptoEngine
is not exported by @token-io/tpp
neither is any other except for the filesystem one (inside of TokenClient). I know it is exported from @token-io/core
but since it uses esmodules and flow, I can't use it from my nodejs without transpiling.
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.