예제 #1
0
        public async Task <ResultWrapper <string> > vault_signMessage(string vaultId, string keyId, string message)
        {
            try
            {
                string result = await _vaultService.Sign(Guid.Parse(vaultId), Guid.Parse(keyId), message);

                return(ResultWrapper <string> .Success(result));
            }
            catch (Exception e)
            {
                return(ResultWrapper <string> .Fail(e));
            }
        }
예제 #2
0
        public async Task <Signature> Sign(Address address, Keccak message)
        {
            Guid?keyId = await RetrieveId(address);

            if (keyId is null)
            {
                throw new KeyNotFoundException($"Account with the given address {address} could not be found");
            }

            string signature = await _vaultService.Sign(_vaultId, keyId.Value, message.ToString());

            return(new Signature(signature));
        }