swapable
Version:
Swapable: Automated Liquidity Pools
30 lines (29 loc) • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTestMarket = exports.FakeMarket = void 0;
/**
* This file is part of Swapable shared under AGPL-3.0
* Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom
*
* @package Swapable
* @author Grégory Saive for Using Blockchain Ltd <greg@ubc.digital>
* @license AGPL-3.0
*/
const symbol_sdk_1 = require("symbol-sdk");
// internal dependencies
const Accounts_1 = require("./Accounts");
const index_1 = require("../../index");
const mnemonic = Accounts_1.getTestMnemonic();
const seedHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4';
class FakeMarket extends index_1.Swapable.DigitalMarket {
fakeGetContext(actor, params = new index_1.TransactionParameters(), argv) {
return this.getContext(actor, params, argv);
}
fakeGetCommand(command, context) {
return this.getCommand(exports.getTestMarket().identifier, command, context);
}
}
exports.FakeMarket = FakeMarket;
exports.getTestMarket = () => {
return new FakeMarket('SWP:XYM', new index_1.Symbol.Reader('http://api-01.us-west-1.symboldev.network:3000', symbol_sdk_1.NetworkType.TEST_NET, seedHash, 1573430400, new symbol_sdk_1.MosaicId('519FC24B9223E0B4'), 'DummyNodePublicKey'), new index_1.Symbol.Signer(), mnemonic);
};