Code Monkey home page Code Monkey logo

lykke.bil2.templates's Introduction

Lykke.Bil2.Templates

dotnet new CLI templates for blockchain integration services - sign service, transaction executor and block reader.

Templates included

  • lkebil2sign
  • lkebil2tx
  • lkebil2blocks

How to use

  1. Clone repository to a local folder;

  2. Install templates. For each internal directory run:

    $ dotnet new -i ${path}

    where ${path} is the path to the template directory (where folder .template.config placed). On Windows it must be the full path without trailing slash.

    Example

    To install blocks reader template run

    dotnet new -i ./Lykke.Bil2.Templates/Lykke.Bil2.BlocksReader
  3. Generate solutions:

    Generally, run

    dotnet new ${templateName} -n ${integrationName} -o ${outputPath}

    to generate solution in specified directory.

    Or create directory with required name, cd into created directory and run

    dotnet new ${templateName} -n ${integrationName}

    to generate solution from the inside.

Examples

Sign service

dotnet new lkebil2sign -n Bitcoin -o Lykke.Bil2.Bitcoin.SignService

For sign service implementation details see Lykke.Bil2.Bcn.SignService/IMPLEMENTATION.md.

Transactions executor

Transactions executor template contains additional parameters:

  • -tm (or --transactionModel) for choosing between transfer amount and transfer coins transaction model, one of amount|coins, if not specified - amount is used;
  • -fa (or --fromatAddress) for adding code for address formatting, used if the blockchain supports multiple address formats, false by default;
dotnet new lkebil2tx -n Bitcoin -o Lykke.Bil2.Bitcoin.TransactionsExecutor [-tm amount|coins] [-fa]

For transactions executor implementation details see Lykke.Bil2.Bcn.TransactionsExecutor/IMPLEMENTATION.md.

Blocks reader

Blocks reader template contains additional parameter -is (or --irreversibilityStrategy) for irreversible block obtaining strategy, one of none|pull|push, if not specified - none is used:

dotnet new lkebil2blocks -n Bitcoin -o Lykke.Bil2.Bitcoin.BlocksReader [-is none|pull|push]

Use none or skip -is parameter if blockchain does not support irreversible blocks.

Use push model if used blockchain tools allow to determine changes of last irreversible block number (f.e. via web-sockets). IrreversibleBlockHandler class and corresponding registrations are generated in this case. Use IIrreversibleBlockListener provided by DI to emit LastIrreversibleBlockUpdatedEvent.

Use pull model if dedicated request is required to retrieve irreversible block data. IrreversibleBlockProvider class and corresponding registrations are generated in this case.

For transactions executor implementation details see Lykke.Bil2.Bcn.BlocksReader/IMPLEMENTATION.md.

lykke.bil2.templates's People

Contributors

cassade avatar konstantinryazantsev avatar ozhelenkov avatar polonzer avatar some-dev avatar

Watchers

 avatar  avatar  avatar  avatar  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.