Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Tweak README and CONTRIB.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonfancher committed Apr 30, 2019
1 parent 9a771d0 commit 18ebf7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Expand Up @@ -6,7 +6,7 @@ Interested in contributing? That's awesome! Here are some guidelines to get star
- [Bug Reports](#bug-reports)
- [Feature Requests](#feature-requests)
- [Change Requests](#change-requests)
- [Working on Softkey Signature Provider](#working-on-eosio-softkey-signature-provider)
- [Working on Softkey Signature Provider](#working-on-softkey-signature-provider)
- [Feature Branches](#feature-branches)
- [Developing With Gradle Locally](#developing-with-gradle-locally)
- [Submitting Pull Requests](#submitting-pull-requests)
Expand Down Expand Up @@ -77,7 +77,7 @@ To get it out of the way:
By default, libraries are installed from remote Maven repositories through Gradle. If, however, you wish to develop locally and you'd like to integrate with locally-cloned versions of EOSIO SDK for Java and/or other Providers, follow these instructions:

1. Clone this and other repos into the same directory, as siblings of one another.
1. Github repo of all libraries:
1. Github repo of all libraries:
* [EOSIO SDK for Java](https://github.com/EOSIO/eosio-java): The core EOSIO SDK for Java library
* [RPC Provider](https://github.com/EOSIO/eosio-java-android-rpc-provider): The RPC provider implementation in the core library
* [ABIEOS Serialization Provider](https://github.com/EOSIO/eosio-java-android-abieos-serialization-provider): A pluggable serialization provider for EOSIO SDK for Java using ABIEOS (for transaction and action conversion between JSON and binary data representations)
Expand All @@ -93,11 +93,11 @@ Pull requests are awesome. If you're looking to raise a PR for something which d

Never underestimate just how useful quality assurance is. If you're looking to get involved with the code base and don't know where to start, checking out and testing a pull request is one of the most useful things you could do.

Essentially, [check out the latest develop branch](#working-on-eosio-sdk-for-java-soft-key-signature-provider), take it for a spin, and if you find anything odd, please follow the [bug report guidelines](#bug-reports) and let us know!
Essentially, [check out the latest develop branch](#working-on-softkey-signature-provider), take it for a spin, and if you find anything odd, please follow the [bug report guidelines](#bug-reports) and let us know!

### Code Style and Linting

Softkey Signature Provider leverages [SonarLint](https://www.sonarlint.org/) for linting and the [Google Java Style Guide](https://github.com/google/styleguide) with tab size and indent set to 4, and continuation indent set to 8 for code format flagging. Once SonarLint is installed, linting warnings and errors will be flagged inline with squiggles. Automatic code formatting can be accomplished by downloading and importing the Google Java Style settings into your IDE.
Softkey Signature Provider leverages [SonarLint](https://www.sonarlint.org/) for linting and the [Google Java Style Guide](https://github.com/google/styleguide) with tab size and indent set to 4, and continuation indent set to 8 for code format flagging. Once SonarLint is installed, linting warnings and errors will be flagged inline with squiggles. Automatic code formatting can be accomplished by downloading and importing the Google Java Style settings into your IDE.

Please be sure to resolve any linting issues introduced by your contributions prior to requesting a review on your PR.

Expand Down
13 changes: 8 additions & 5 deletions README.md
@@ -1,5 +1,6 @@
![Java Logo](img/java-logo.png)
# EOSIO SDK for Java: Softkey Signature Provider ![EOSIO Alpha](https://img.shields.io/badge/EOSIO-Alpha-blue.svg)

[![Software License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/EOSIO/eosio-java-softkey-signature-provider/blob/master/LICENSE)
![Language Java](https://img.shields.io/badge/Language-Java-yellow.svg)
![](https://img.shields.io/badge/Deployment%20Target-JVM-blue.svg)
Expand Down Expand Up @@ -63,7 +64,8 @@ Then refresh your gradle project. Then you're all set for the [Basic Usage](#bas

## Basic Usage

Generally, signature providers are called by [TransactionProcessor](https://github.com/EOSIO/eosio-java/blob/master/eosiojava/src/main/java/one/block/eosiojava/session/TransactionProcessor.java) during signing. (See an [example here](https://github.com/EOSIO/eosio-java#basic-usage).) If you find, however, that you need to get available keys or request signing directly, this library can be invoked as follows:
Generally, signature providers are called by the [TransactionProcessor](https://github.com/EOSIO/eosio-java/blob/master/eosiojava/src/main/java/one/block/eosiojava/session/TransactionProcessor.java) during signing. (See an [example here](https://github.com/EOSIO/eosio-java#basic-usage).) If you find, however, that you need to get available keys or request signing directly, this library can be invoked as follows:

```java
SoftKeySignatureProviderImpl provider = new SoftKeySignatureProviderImpl();
try {
Expand All @@ -73,7 +75,7 @@ try {
}
```

and to import a private key:
And to import a private key:

```java
try {
Expand All @@ -84,6 +86,7 @@ try {
```

To sign an `EosioTransactionSignatureRequest`, you should first create it with your serialized transaction and list of public keys. EOSIO SDK for Java handles the creation of the object for you.

Finally, call `signTransaction` to sign.

```java
Expand All @@ -99,14 +102,14 @@ try {

## Android Example App

If you'd like to see EOSIO SDK for Java: Softkey Signature Provider in action, check out our open source [Android Example App](https://github.com/EOSIO/eosio-java-android-example-app) --a working application that fetches an account's token balance and pushes a transfer action.
If you'd like to see EOSIO SDK for Java: Softkey Signature Provider in action, check out our open source [Android Example App](https://github.com/EOSIO/eosio-java-android-example-app)--a working application that fetches an account's token balance and pushes a transfer action.

## Library Methods

This library is an example implementation of [ISignatureProvider](https://github.com/EOSIO/eosio-java/blob/master/eosiojava/src/main/java/one/block/eosiojava/interfaces/ISignatureProvider.java). It implements the following protocol methods:

* `signTransaction(EosioTransactionSignatureRequest eosioTransactionSignatureRequest)` signs an `Transaction`
* `getAvailableKeys()` returns an array containing the public keys associated with the private keys that the object is initialized with.
* `signTransaction(EosioTransactionSignatureRequest eosioTransactionSignatureRequest)` signs a `Transaction`
* `getAvailableKeys()` returns an array containing the public keys associated with the private keys that the object is initialized with

Import a key by calling:

Expand Down

0 comments on commit 18ebf7f

Please sign in to comment.