/// <summary> /// WalletAPI Constructor /// </summary> /// <param name="rpc">the RPC client to call NEO RPC methods</param> public WalletAPI(RpcClient rpc) { rpcClient = rpc; nep17API = new Nep17API(rpc); }
/// <summary> /// TransactionManagerFactory Constructor /// </summary> /// <param name="rpcClient">the RPC client to call NEO RPC API</param> /// <param name="magic"> /// the network Magic value to use when signing transactions. /// Defaults to ProtocolSettings.Default.Magic if not specified. /// </param> public TransactionManagerFactory(RpcClient rpcClient, uint?magic = null) { this.rpcClient = rpcClient; this.magic = magic ?? ProtocolSettings.Default.Magic; }
/// <summary> /// TransactionManager Constructor /// </summary> /// <param name="rpc">the RPC client to call NEO RPC API</param> /// <param name="sender">the account script hash of sender</param> public TransactionManager(RpcClient rpc) { rpcClient = rpc; policyAPI = new PolicyAPI(rpc); nep5API = new Nep5API(rpc); }
/// <summary> /// PolicyAPI Constructor /// </summary> /// <param name="rpcClient">the RPC client to call NEO RPC methods</param> public PolicyAPI(RpcClient rpcClient) : base(rpcClient) { }
/// <summary> /// TransactionManagerFactory Constructor /// </summary> /// <param name="rpcClient">the RPC client to call NEO RPC API</param> public TransactionManagerFactory(RpcClient rpcClient) { this.rpcClient = rpcClient; }
/// <summary> /// ContractClient Constructor /// </summary> /// <param name="rpc">the RPC client to call NEO RPC methods</param> public ContractClient(RpcClient rpc) { rpcClient = rpc; }
/// <summary> /// Nep5API Constructor /// </summary> /// <param name="rpcClient">the RPC client to call NEO RPC methods</param> public Nep5API(RpcClient rpcClient) : base(rpcClient) { }
/// <summary> /// TransactionManager Constructor /// </summary> /// <param name="tx">the transaction to manage. Typically buildt</param> /// <param name="rpcClient">the RPC client to call NEO RPC API</param> public TransactionManager(Transaction tx, RpcClient rpcClient) { this.tx = tx; this.context = new ContractParametersContext(null, tx, rpcClient.protocolSettings.Network); this.rpcClient = rpcClient; }
/// <summary> /// Helper function for one-off TransactionManager creation /// </summary> public static Task <TransactionManager> MakeTransactionAsync(RpcClient rpcClient, byte[] script, Signer[] signers = null, TransactionAttribute[] attributes = null) { var factory = new TransactionManagerFactory(rpcClient); return(factory.MakeTransactionAsync(script, signers, attributes)); }
/// <summary> /// TransactionManager Constructor /// </summary> /// <param name="rpc">the RPC client to call NEO RPC API</param> /// <param name="sender">the account script hash of sender</param> public TransactionManager(RpcClient rpc, UInt160 sender) { rpcClient = rpc; this.sender = sender; }
public async Task <RpcStateRoot> GetStateRootAsync(uint index) { var result = await rpcClient.RpcSendAsync(RpcClient.GetRpcName(), index).ConfigureAwait(false); return(RpcStateRoot.FromJson(result)); }
public StateAPI(RpcClient rpc) { this.rpcClient = rpc; }
/// <summary> /// TransactionManager Constructor /// </summary> /// <param name="tx">the transaction to manage. Typically buildt</param> /// <param name="rpcClient">the RPC client to call NEO RPC API</param> public TransactionManager(Transaction tx, RpcClient rpcClient) { this.tx = tx; this.context = new ContractParametersContext(null, tx); this.rpcClient = rpcClient; }
/// <summary> /// ContractClient Constructor /// </summary> /// <param name="rpc">the RPC client to call NEO RPC methods</param> /// <param name="magic"> /// the network Magic value to use when signing transactions. /// Defaults to ProtocolSettings.Default.Magic if not specified. /// </param> public ContractClient(RpcClient rpc, uint?magic = null) { rpcClient = rpc; this.magic = magic; }