- Create new coin package
$ lerna create @makkii/app-<coin symbol>
- add makkii-core dependency
$ lerna add @makkii/makkii-core --scope @makkii/app-<coin symbol>
- 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;
...
}
- 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);
}
...
}
- 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> => {
...
}
}
- (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) => {
...
}
...
}