Exemplo n.º 1
0
        public async Task DirectoryAdministratorAddedVASPCredentials(
            string credentialsExamplePath,
            string vaspId)
        {
            var vaspDirectory = _scenarioContext.GetContractByType <VASPDirectory>();

            await vaspDirectory.InsertCredentialsAsync
            (
                administrator : await _accounts.GetAdministratorAsync(),
                vaspId : VASPId.Parse(vaspId),
                credentials : await File.ReadAllTextAsync(credentialsExamplePath)
            );
        }
Exemplo n.º 2
0
        // ReSharper disable once InconsistentNaming
        public async Task ICallTryGetCredentialsRefAndHashAsyncMethodOfVASPDirectoryClient(
            string vaspId,
            int minimalConfirmationLevel)
        {
            var vaspDirectory       = _scenarioContext.GetContractByType <VASPDirectory>();
            var vaspDirectoryClient = new EtherGate.VASPDirectoryClient(vaspDirectory.RealAddress, _web3);

            var callResult = await vaspDirectoryClient.TryGetCredentialsRefAndHashAsync
                             (
                vaspId : VASPId.Parse(vaspId),
                minimalConfirmationLevel : new ConfirmationLevel(minimalConfirmationLevel)
                             );

            _scenarioContext.SetCallResult(callResult);
        }
Exemplo n.º 3
0
        // ReSharper disable once InconsistentNaming
        public async Task ICallVASPIsRegisteredAsyncMethodOfVASPRegistryClient(
            string vaspId,
            int minimalConfirmationLevel)
        {
            var vaspDirectory       = _scenarioContext.GetContractByType <VASPDirectory>();
            var vaspDirectoryClient = new VASPDirectoryClient
                                      (
                vaspDirectory.RealAddress,
                _estimateGasPriceStrategy,
                _web3
                                      );

            var callResult = await vaspDirectoryClient.VASPIsRegisteredAsync
                             (
                vaspId : VASPId.Parse(vaspId),
                minimalConfirmationLevel : new ConfirmationLevel(minimalConfirmationLevel)
                             );

            _scenarioContext.SetCallResult(callResult);
        }