Giter Club home page Giter Club logo

concordium-java-sdk's People

Contributors

abizjak avatar eb-concordium avatar magnusbechwind avatar milkywaypirate avatar orhoj avatar parv0888 avatar radiokot avatar romil-stactrace avatar shjortconcordium avatar tds-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

concordium-java-sdk's Issues

Java SDK examples

The java sdk does not provide many exciting examples.

The repository should also contain self-contained examples of using the sdk like e.g. https://github.com/Concordium/concordium-rust-sdk/tree/main/examples

The examples must be well documented as they serve as an introduction to use the java sdk.

Examples that must be covered

  • Send a simple transfer from one account to another
  • Send a memo transfer from one account to another
  • Alias checker. Check whether an account address is an alias of another.
  • Querying for block statistics (block info), e.g. from a starting time/block height to an end time/height.
  • Find an account. I.e. given an account address find out when it was created on chain.
  • Get the baker statuss of all bakers on chain.
  • (When support for SC exists) Deploy, Initialize and Update a smart contract. The concrete smart contract should be https://github.com/Concordium/concordium-rust-smart-contracts/tree/main/examples/cis2-nft
  • Setup baking and configure stake
  • Setup delegation and configure stake
  • ....

Release and CI integration

Today releasing and building distributions is a manual process.

This should be integrated into the existing CI for lowering the maintenance burden.

The java sdk makes use of a native rust dependency.

A release should build a distributable jar file including the native dependencies for each platform.
I suggest we focus building for macos, windows and probably only one linux distribution (e.g. ubuntu).

Account aliases

Task description

Add ability to check whether addresses are aliases, and to generate aliases to the SDK.

Restructure the README

Task description

The current README is a bit bloated and we should tighten it up.

In particular all the examples should no longer reside in the README, but instead it should refer to the examples that will be introduced as part of #152.

Figure out the best way to replace the rust dependency.

Currently the java sdk exposes ed25519 functionality via jni and a rust dependency.

Replacing this with a native java dependency would make it easier to build and distribute the sdk.

Example solutions each with their pros and cons.

A new issue should be created for the actual work and implementation.

Support for smart contract schemas

Task description

In the first round the java sdk will simply support smart contract parameters as raw bytes.
This is workable but it is not really the best user experience as the user is forced to build their parameters via the rust sdk and pass these over to the java sdk when calling update on a contract.

It will be very time consuming and also a significant maintenance burden to implement all of the types and their according serializations in the java sdk.

One other way could be to let the update contract take in a schema and then the user could as a start provide a json value, which then would be parsed into a proper byte array via a call to (a currently unspecified) rust library.

Get the SDK ready for the delegation feature.

Task description

The SDK must be able to handle the upcoming changes wrt. the new delegation feature.

New events that must be handled:

BakerSetOpenStatus
BakerSetMetadataURL
BakerSetTransactionFeeCommission
BakerSetBakingRewardCommission
BakerSetFinalizationRewardCommission
DelegationStakeIncreased
DelegationStakeDecreased
DelegationSetRestakeEarnings
DelegationSetDelegationTarget
DelegationAdded
DelegationRemoved

Handle smart contracts

Task description

The SDK must expose smart contract functionality, in particular
deploying a module, initializing a contract and updating an instance.

Support GRPCv2 interface of the Concordium node

Task description

The Java SDK should support the newest GRPCv2 interface that the Concordium node exposes.

The new service and type definitions can be found here.

The queries of the new GRPCv2 API in particular offers stronger types, and as such they are not required to be wrapped by custom Java types.

The SDK must remain backwards compatible, hence there should be introduced a new Client which makes use of the new API which users can opt into using.

GRPC2: GetNodeInfo

Implement the GetNodeInfo query.

  • Extend the ClientV2 class with a getNodeInfo function that returns the existing NodeInfo type.
  • Unit test
  • Extend the examples with a new one for acquiring the node info.

Support for P5

The java SDK should support P5.

  • New Protocol
  • New events emitted

Support importing wallet exports.

The SDK should support importing mobile & browser extension wallet exports.

The user should be able to construct a TransactionSigner from an exported json file which in exchange can be used for signing transactions.

The import mechanism should support wallets exported by the browser wallet but also the genesis format.

Handle smart contract additions in the SDK.

Task description

The V1 smart contract feature adds a few things to the API of the node that need to be handled.

Sub-tasks

  • There are two new transaction events "Resumed" and "Interrupted". The Updated and Initialized events have an additional field "contractVersion" that indicates which version of the contract was updated.
  • There is a new endpoint "InvokeContract"
  • The format of "GetContractInfo" has changed. It now has a version field, and V1 contracts do not return the state.

The latter two tasks should be part of #20

The most urgent thing to address is the new events since the SDK currently does not handle smart contracts anyhow. If only one of the tasks will be addressed then the others should be split into independent tasks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.