Exemplo n.º 1
0
        public async Task verify_authority()
        {
            var args = new VerifyAuthorityArgs
            {
                Trx = await GetSignedTransaction().ConfigureAwait(false)
            };
            var resp = await Api.VerifyAuthorityAsync(args, CancellationToken.None).ConfigureAwait(false);

            TestPropetries(resp);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Execute custom user method
        /// Возвращает TRUE если транзакция подписана правильно
        /// </summary>
        /// <param name="userPrivateKeys"></param>
        /// <param name="token">Throws a <see cref="T:System.OperationCanceledException" /> if this token has had cancellation requested.</param>
        /// <param name="testOps"></param>
        /// <returns></returns>
        /// <exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
        public JsonRpcResponse <VerifyAuthorityReturn> VerifyAuthority(IList <byte[]> userPrivateKeys, CancellationToken token, params BaseOperation[] testOps)
        {
            var prop        = DynamicGlobalPropertyApiObj.Default;
            var transaction = CreateTransaction(prop, userPrivateKeys, token, testOps);
            var args        = new VerifyAuthorityArgs()
            {
                Trx = transaction
            };

            return(VerifyAuthority(args, token));
        }
Exemplo n.º 3
0
        public async Task <JsonRpcResponse <VerifyAuthorityReturn> > CondenserVerifyAuthorityAsync(IList <byte[]> userPrivateKeys, BaseOperation[] testOps, CancellationToken token)
        {
            var prop        = DynamicGlobalPropertyApiObj.Default;
            var transaction = await CreateTransactionAsync(prop, userPrivateKeys, testOps, token).ConfigureAwait(false);

            var args = new VerifyAuthorityArgs
            {
                Trx = transaction
            };

            return(await CondenserVerifyAuthorityAsync(args, token).ConfigureAwait(false));
        }
Exemplo n.º 4
0
        public void verify_authority()
        {
            var args = new VerifyAuthorityArgs
            {
                Trx = GetSignedTransaction()
            };
            var resp = Api.VerifyAuthority(args, CancellationToken.None);

            WriteLine(resp);
            Assert.IsFalse(resp.IsError);

            var obj = Api.CustomGetRequest <JObject>(KnownApiNames.DatabaseApi, "verify_authority", args, CancellationToken.None);

            TestPropetries(resp.Result.GetType(), obj.Result);
            WriteLine("----------------------------------------------------------------------------");
            WriteLine(obj);
        }
Exemplo n.º 5
0
 /// <summary>
 /// API name: verify_authority
 ///
 /// </summary>
 /// <param name="args">API type: verify_authority_args</param>
 /// <param name="token">Throws a <see cref="T:System.OperationCanceledException" /> if this token has had cancellation requested.</param>
 /// <returns>API type: verify_authority_return true of the @ref trx has all of the required signatures, otherwise throws an exception</returns>
 /// <exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
 public Task <JsonRpcResponse <VerifyAuthorityReturn> > VerifyAuthority(VerifyAuthorityArgs args, CancellationToken token)
 {
     return(CustomGetRequest <VerifyAuthorityReturn>(KnownApiNames.DatabaseApi, "verify_authority", args, token));
 }
Exemplo n.º 6
0
        //  "condenser_api.get_version",
        //  "condenser_api.get_vesting_delegations",
        //  "condenser_api.get_volume",
        //  "condenser_api.get_withdraw_routes",
        //  "condenser_api.get_witness_by_account",
        //  "condenser_api.get_witness_count",
        //  "condenser_api.get_witness_schedule",
        //  "condenser_api.get_witnesses",
        //  "condenser_api.get_witnesses_by_vote",
        //  "condenser_api.lookup_account_names",
        //  "condenser_api.lookup_accounts",
        //  "condenser_api.lookup_witness_accounts",
        //  "condenser_api.verify_account_authority",

        /// <summary>
        /// API name: verify_authority
        ///
        /// </summary>
        /// <param name="args">API type: verify_authority_args</param>
        /// <param name="token">Throws a <see cref="T:System.OperationCanceledException" /> if this token has had cancellation requested.</param>
        /// <returns>API type: verify_authority_return true of the @ref trx has all of the required signatures, otherwise throws an exception</returns>
        /// <exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
        public Task <JsonRpcResponse <VerifyAuthorityReturn> > CondenserVerifyAuthorityAsync(VerifyAuthorityArgs args, CancellationToken token)
        {
            return(CondenserCustomGetRequestAsync <VerifyAuthorityReturn>(KnownApiNames.CondenserApi, "verify_authority", args, token));
        }