Giter Club home page Giter Club logo

as's Introduction

AS

check-code-coverage

MassaLabs monorepo for assemblyscript libraries.

This repository is a collection of tools, objects and functions in AssemblyScript.

  • Essential Classes and helper functions with as-types

  • Probabilistic simulation functionalities for smart contracts with as-proba

  • AssemblyScript transformers, dynamic code replacement features with as-transformer

The complete documentation of all available functions and objects is here:

Install

Packages are independant you can choose to install what you need

npm i --save-dev @massalabs/as-types
npm i --save-dev @massalabs/as-proba
npm i --save-dev @massalabs/as-transformer

Development guide

Build

npm run build

Code linting and formatting

npm run fmt

Test

npm run test

Generate doc

npm run doc

Usage

After installing As, you can import the object classes and functions that you need in your AssemblyScript file.

For example, to use the combination function to determine the combination of 2 numbers, you can import and use it like this:

import { combination } from  '@massalabs/as-proba';
import { Args } from  '@massalabs/as-types';

//the argument args contains the serialized values n and k (n >= k) as U64
export function calculateCombination(args: StaticArray<u8>): void {
	const  n = args.nextU64();
	const  k = args.nextU64();
	const  result = combination(n, k);
	generateEvent(`The result of the combination of ${n.toString()} and ${k.toString()} is ${result.toString()}`);
}

Contributing

We welcome contributions from the community!

If you would like to contribute to As, please read the CONTRIBUTING file.

License

As is released under the MIT License.

Powered By

As is developed with love by MassaLabs and powered by a variety of open-source projects.

as's People

Contributors

greglibert avatar elli610 avatar 0xswapfeeder avatar thykof avatar peterjah avatar ben-rey avatar massabot avatar sebastienvalla avatar qdrn avatar julienbrs avatar trottoir avatar batigencho avatar windushka avatar 0xmazout avatar aurelienft avatar slnpons avatar dependabot[bot] avatar jimmylies avatar omerpitts avatar

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.