-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Definition of libraries in kadena.js #42
Comments
removed. Let's discuss Pact generator etc in another issue |
Some thoughts:
==== Regarding:
I would switch the name of the two:
The api endpoints we're discussing here (i.e. So they can be used to interact with a pact-server (a simple http server that comes with the The prefix added to these endpoints is what changes across these different networks. const pactServerApiHost: string = 'http://127.0.0.1:9001' const devnetApiHostChain0: string =
'http://localhost:8080/chainweb/0.0/development/chain/0/pact'; And the request and response types of these endpoints are pretty generalized, except that certain networks will require specific values. For example, the Also, the Currently, some of the functions and type definitions are chainweb-node specific (with the ability to set But maybe we want to have more generalizable types/functions along with the very specific chainweb types/functions. |
prepareContCmd, prepareExecCmd, mkSingleCmd, mkPublicSend and similar should probably go in one of the pact libraries. Most likely a lower-level one, as they pretty closely match things defined here: https://api.chainweb.com/openapi/pact.html. Same thing applies to mkCap, send, local, poll, and listen. Other than that, I think this list of libraries looks pretty good. I also broadly agree with the thrust of Linda's comments about names. |
We had a meeting addressing the concerns raised in the comments above.
We've decided to rename all the
It is intende to be more generalizable work with any pact contract. It is to be a CLI with commands like
Where
This point is about the difference between pact (the smart contract language), kadena (the blockchain), chainweb (the public implementation of kadena) and other relating things. For this I'd like to make a glossary that clearly defines the terms and their meaning, so there is no confusion between them. (@LindaOrtega can you confirm that using "Kadena blockchain" as term for the underlying technology that allows Chainweb and Kuro to exist, is correct? Or should we use another name? I have seen other terms like ScalableBFT as well) So, all
Omitted the rest for brevity I have changed the name of the two libs. Especially because pact is used in not only Chainweb but also Kuro. @LindaOrtega Would it make sense to combine those two? Just have everything in I'd say we want them separate, so anyone who has a permissioned blockchain can implement their own Addition Maybe it could be an idea that we have |
I've renamed I've added
|
Thought; maybe we should rename |
This issue is stale because it is open for 60 days with no activity |
Libraries based on what pact-lang-api used to have
@kadena/cryptography-utils
contains encode/decode/hash utils@kadena/chainweb-node-client
typed js wrapper with fetch to call chainweb-node API endpoints.This will probably have some breakdown
blockchain
wrapper around chainweb-node p2p api endpointspact
https://api.chainweb.com/openapi/pact.htmlrosetta
https://api.chainweb.com/openapi/#tag/rosetta@kadena/chainweb-data-client
typed js wrapper with fetch to call chainweb-data API endpointsRemoved in favor of @kadena/chainweb-node-client/pact@kadena/pactjs-client
wrapper around chainweb-node-client with ability to switch environments etc.@kadena/wallet-client
client for wallet to sign, connect, retreive account info, etc@kadena/marmalade-client
specific client for marmalade/NFTs@kadena/types
common used typescript definitions. Preferably this will all move to the low-level libraries. Whenever you build something on top of those, you can use those types.@kadena/pactjs-utils
low level pact utils (like PactNumber, createExp, keySet, ...) Renamed to@kadena/pactjs
@kadena/chainweaver-client
typed js wrapper with fetch to call chainweaver endpoints@kadena/pactjs
runtime for generating pact expressions Renamed to@kadena/client
@kadena/pactjs-cli
cli to generate pact contract type definitions and interface to pact client. deployment of contracts, etc@kadena/pactjs-generator
library that creates typescript definition from contract, template, etc.kadena/pactjs-generated
library that does not exist on npm.It is generated by
@kadena/pactjs-cli
and@kadena/pactjs-generator
and is a dependency of@kadena/pactjs
(to be@kadena/client
)@kadena/transaction-templates
a supportive library for transactions. As there is no way to determine from pact alone which caps are needed for a given transaction, and in turn which signatures are needed, we want to provide the community a way to "publish" templates. These templates can be used by@kadena/pactjs-cli
to generate the necessary typescript definitionspackages/kadena.js
do not depend on this package, as it's leftovers from when we started with the kadena-community/kadena.js monorepo@LindaOrtega, @ggobugi27, @jmininger, @buckie can you review the libs and what we think that the contents should be, if that's correct?
// JSON blob that will export all the functions so we can generate the types from this file - chainweaver add button
The text was updated successfully, but these errors were encountered: