Skip to content

Commit

Permalink
Clarify library pupose, public API and contribution (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
dincho committed Nov 5, 2021
1 parent d8f0a20 commit 4a8baba
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
6. Make sure your code lints.
7. Issue that pull request!

In general pull requests should:
- Only fix/add the functionality in question **OR** address wide-spread whitespace/style issues, not both.
- Add unit or integration tests for fixed or changed functionality (if a test suite already exists).
- Address a single concern in the least number of changed lines as possible.
- Include documentation in the repo

For changes that address core functionality or would require breaking changes (e.g. a major release), it's best to open an Issue to discuss your proposal first. This is not required but can save time creating and reviewing changes.

## Any contributions you make will be under the ISC Software License
In short, when you submit code changes, your submissions are understood to be under the same [ISC License](https://choosealicense.com/licenses/isc/) that covers the project. Feel free to contact the maintainers if that's a concern.

Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Aeternity data serialization

Aeternity contract calldata encoding and results decoding library
Aeternity contract calldata encoding and results decoding **standalone** library.

This is Javascript imeplemtnation of data serialization specified in [aeternity protocol](https://github.com/aeternity/protocol/blob/master/serializations.md#data).

While the only purpose of the library at the moment of this writing is solely to provide serialize/deserialize and ecnode/decode respectively of contracts calldata and return data it may evolve to full fledged serialization library of the full protocol specification.

## Installation

Expand Down Expand Up @@ -104,8 +108,24 @@ Using the library involves data types and their mappings from Sophia to JavaScri
This project follows the [semantic versioning](https://semver.org/spec/v2.0.0) guidelines.
Refer to the [CHANGELOG](CHANGELOG.md) for more information about releases.

## Public API

The backward compatibility promise signaled with semantic versioning [above](#versioning) is **only** applied to public API of this library,
that is only the module exports and [data types](#data-types) listed above.

The public API namely consist of:

- `encode(contractName: string, functionName: string, arguments: Array<Data>): string`
- `decode(contractName: string, functionName: string, encodedData: string): Data`
- `serialize(contractName: string, functionName: string, arguments: Array<Data>): string`
- `deserialize(contractName: string, functionName: string, encodedData: Uint8Array): Data`

where `Data: Boolean | BigInt | String | Array | Map | Object`

## Development

Please make sure you get familiar with [Contributing Guidelines](CONTRIBUTING.md) first.

### Install

```bash
Expand Down

0 comments on commit 4a8baba

Please sign in to comment.