Exemplo n.º 1
0
        // ReSharper disable once InconsistentNaming
        public async Task ICallValidateCredentialsAsyncMethodOfVASPDirectoryClient(
            string credentialsExamplePath,
            string credentialsHash)
        {
            var vaspDirectory       = _scenarioContext.GetContractByType <VASPDirectory>();
            var vaspDirectoryClient = new VASPDirectoryClient
                                      (
                vaspDirectory.RealAddress,
                _estimateGasPriceStrategy,
                _web3
                                      );

            var callResult = await vaspDirectoryClient.ValidateCredentialsAsync
                             (
                credentials : await File.ReadAllTextAsync(credentialsExamplePath),
                credentialsHash : VASPCredentialsHash.Parse(credentialsHash)
                             );

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

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

            _scenarioContext.SetCallResult(callResult);
        }