mto-custom-driver
v1.0.34
Published
HMP SDK is a blockchain manager for an escrow contracts, it exports the full process for purchasing and selling a product and securing clients fidelity through escrow system.
Downloads
45
Readme
HMP SDK
HMP SDK is a blockchain manager for an escrow contracts, it exports the full process for purchasing and selling a product and securing clients fidelity through escrow system.
How to use custom SDK in nodejs based app (rinkeby testnet)
import { MTOCustomDriver } from "mto-custom-driver"; // TODO check import types issue
const driver = new MTOCustomDriver({
privateKey: wallet.privateKey,
blockchain: "rinkeby-testnet",
});
await driver.init();
const result = await driver.purchase(
PRODUCT_ID,
MERCHANT_ADDRESS,
AMOUNT,
DISPUTABLE_TIME,
WITHDRAW_TIME,
{gasLimit:1000000}
);
Use SDK with react native
To use the SDK with React native a special package should be imported:
import "@ethersproject/shims";