zapproject / jzap

Java
MIT License
1 stars 4 forks source link

Create Bondage interfaces #21

Closed logohere closed 3 years ago

logohere commented 3 years ago

Summary

Create Bondage Interfaces in java

Reference


export interface TokenBondType extends defaultTx{
    endpoint:string,
    dots : NumType
}
export interface BondType extends defaultTx {
    subscriber ?:address,
    provider:address,
    endpoint:string,
    dots : NumType
}

export interface DelegateBondType extends BondType {
    subscriber :address
}
export interface UnbondType extends defaultTx{
    provider:address,
    endpoint:string,
    dots : NumType
}

export interface SubscribeType extends defaultTx {
    provider:address,
    endpoint:string,
    dots : NumType,
    endpointParams : string[]
}

export interface SubscriberHandler{
    handleResponse : ()=>void,
    handleUnsubscription ?: ()=>void,
    handleSubscription ?: ()=>void
}

export interface ApproveType extends defaultTx{
    provider: address,
    zapNum: string|number|BN
}

export interface BondArgs extends defaultTx{
    provider: address;
    endpoint: string;
    dots: NumType;
}

export interface UnbondArgs extends defaultTx{
    provider: address;
    endpoint: string;
    dots: NumType;
}

export interface DelegateBondArgs extends defaultTx{
    provider: address;
    endpoint: string;
    dots: NumType,
    subscriber: address;
}

export interface BondageArgs {
    subscriber ?: address;
    provider: address;
    endpoint: string;
    dots ?: NumType ;
    zapNum ?: NumType;
}

export interface CalcBondRateType {
    provider: address;
    endpoint: string;
    zapNum: NumType;
}

export interface BondFilter extends Filter{
    numDots ?: NumType,
    numZap ?: NumType
}

Definition of done

Properly imported and instantiated