@firefly-exchange/firefly-client
Version:
The Firefly Client Library allows traders to sign, create, retrieve and listen to orders on Firefly Exchange.
25 lines • 1.38 kB
JavaScript
;
/**
* Client initialization code example
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable no-console */
const index_1 = require("../index");
function main() {
return __awaiter(this, void 0, void 0, function* () {
// using predefined network
const client = new index_1.FireflyClient(false, index_1.Networks.TESTNET_ARBITRUM); // passing isTermAccepted = true for compliance and authorizarion
yield client.init(false, "9737fb68940ae27f95d5a603792d4988a9fdcf3efeea7185b43f2bd045ee87f9"); // initialze client via readOnlyToken
});
}
main().then().catch(console.warn);
//# sourceMappingURL=23.initializationReadOnly.js.map