Overview

Defire library provides a simple and frictionless experience to integrate Defire to your project . It offers a good level of abstraction, making it easy for developers to use the platform in all environments in which the factory contracts are deployed. It is completely open source, decentralized and accesible in different development languages.

The library exports classes that contain initialization and validation checks, necessary data fields, and helper functions to execute these functionalities among others:

  • Operations

    • Create

    • Query basic information

  • Account

    • Execute DeFi operations

    • Query basic information

  • Portfolios

    • Create

    • Execute DeFi operations

    • Add/Remove/Query owners

    • Add/Remove/Query managers

    • Query basic information

  • Other

    • Create and manage funds

    • Concatenate Operations

Architecture

The platform libraries provide all the functionality needed to interact with Ethereum DeFi instruments. They basically abstract the complexity from the developers generating underneath the needed blockchain transactions. Code is open source and calls are decentralized as they allow the developer to configure the Ethereum node provider.

Libraries are all built under the following architecture which consists in actions and queries.

Actions

An action represents a financial or administrative transaction that change the state of an account, portfolio or fund. Actions involve one blockchain transaction. Therefore, an action can last milliseconds to hours depending on of what it does and what blockchain it uses. For advance information on actions please visit this page.

Queries

Queries do not modify the state of the blockchain, but instead they return information about it. For example, if an account is a manger of a fund or the returning assets of an operation. To query more detail information, use Defire API.

Note: For those who prefer not to call a third party API, use Defire SDK Core library.

Languages

Here are Defire's libraries, some ready to use and others under development:

Javascript / Node
Ruby
Python
Java
Javascript / Node

Code: https://github.com/defireio/defire-js

To ensure that an overflow-safe integer implementation, the library uses JSBI objects. In the near future, when the official ECMAScript BigInt proposal becomes a part of the JavaScript language, this dependency can be compiled away.

Ruby

Under development

Python

Under development

Java

Under development