How to use the ambrosus-node-contracts.KycWhitelistWrapper function in ambrosus-node-contracts

To help you get started, we’ve selected a few ambrosus-node-contracts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ambrosus / ambrosus-nop / src / builder.js View on Github external
static buildStage2(stage1Objects, network, privateKey) {
    const objects = {...stage1Objects};

    objects.web3 = new Web3(network.rpc);
    const account = objects.web3.eth.accounts.privateKeyToAccount(privateKey);
    objects.web3.eth.accounts.wallet.add(account);
    const {address} = account;
    objects.web3.eth.defaultAccount = address;

    objects.headWrapper = new HeadWrapper(network.headContractAddress, objects.web3, address);
    objects.kycWhitelistWrapper = new KycWhitelistWrapper(objects.headWrapper, objects.web3, address);
    objects.rolesWrapper = new RolesWrapper(objects.headWrapper, objects.web3, address);
    objects.timeWrapper = new TimeWrapper(objects.headWrapper, objects.web3, address);
    objects.payoutsWrapper = new PayoutsWrapper(objects.headWrapper, objects.web3, address);
    objects.atlasStakeWrapper = new AtlasStakeStoreWrapper(objects.headWrapper, objects.web3, address);
    objects.payoutsActions = new PayoutsActions(objects.timeWrapper, objects.payoutsWrapper);
    objects.onboardActions = new OnboardActions(objects.kycWhitelistWrapper, objects.rolesWrapper, objects.atlasStakeWrapper);

    objects.crypto = new Crypto(objects.web3);

    objects.stateModel = new StateModel(objects.store, objects.crypto, objects.setupCreator);
    objects.smartContractsModel = new SmartContractsModel(objects.crypto, objects.kycWhitelistWrapper, objects.rolesWrapper);
    objects.atlasModeModel = new AtlasModeModel(objects.httpUtils, account, objects.stateModel);

    objects.selectNodeTypePhase = selectNodeTypePhase(objects.stateModel, objects.askForNodeTypeDialog, objects.askForApolloMinimalDepositDialog, objects.roleSelectedDialog);
    objects.getNodeUrlPhase = getNodeUrlPhase(objects.stateModel, objects.nodeUrlDetectedDialog, objects.askForNodeUrlDialog);
    objects.getNodeIPPhase = getNodeIPPhase(objects.stateModel, objects.nodeIPDetectedDialog, objects.askForNodeIPDialog);