Skip to content

Latest commit

 

History

History
60 lines (52 loc) · 1.53 KB

ADD_COIN_GUIDE.md

File metadata and controls

60 lines (52 loc) · 1.53 KB
  1. Create new coin package
$ lerna create @makkii/app-<coin symbol>
  1. add makkii-core dependency
$ lerna add @makkii/makkii-core --scope @makkii/app-<coin symbol>
  1. implement IsingleApiClient or IsingleApiFullClient interfaces

Example:

import { IsingleApiClient } from '@makkii/makkii-core/src/interfaces/api_client';

class ExampleApiClient implements IsingleApiClient {
    symbol: string = "ExampleCoinSymbol";

    getNetwork = () => this.config.network;
    ...
}
  1. implement IsingleKeystoreClient interface

Example:

import { IsingleKeystoreClient } from '@makkii/makkii-core/src/interfaces/keystore_client';

class ExampleKeystoreClient implements IsingleKeystoreClient {
    signTransaction =(tx: UnsignedTx, signer: IkeystoreSigner, singerParams: any) => {
        return signer.signTransaction(tx, signerParams);
    }
    ...
}
  1. implement IkeystoreSigner interface

Example:

import { IkeystoreSigner } from '@makkii/makkii-core/src/interfaces/keystore_client';

class ExampleSigner implements IkeystoreSigner {
    signTransaction = async (
        tx: AionUnsignedTx,
        params: { private_key: string }
    ): Promise<string> => {
        ...
    }
}
  1. (Optional) if you support hardware wallet on your coin, implement IHardware interface
import { IHardware } from '@makkii/makkii-core/src/interfaces/hardware';

class ExampleLedger implements IHardware {
    getAccount = async(index: number) => {
        ...
    }
    ...
}