Ejemplo n.º 1
0
 /// <summary>
 /// Manually adds or removes a peer-to-peer connection (peers are also discovered and added automatically).
 /// The ip can be a hostname, IPv4 address, IPv4-as-IPv6 address or IPv6 address. For the entire ip:port you can also use the part after the @ symbol of the other node’s
 /// nodeaddress, as given by the getinfo command. The command parameter should be one of add (to manually queue a node for the next available slot),
 /// remove (to remove a node), or onetry (to immediately connect to a node even if a slot is not available).
 /// </summary>
 /// <param name="address"></param>
 /// <param name="command"></param>
 /// <returns></returns>
 public JsonRpcResponse <string> AddNodec(string address, AddNodeParam command)
 {
     return(_Client.Execute <string>("addnode", 0, address, command.ToString().ToLower()));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new asset on the blockchain, sending the initial qty units to address. To create an asset with the default behavior, use an asset name only for name|params. For more control, use an object such as {"name":"asset1","open":true}. If open is true then additional units can be issued in future by the same key which signed the original issuance, via the issuemore or issuemorefrom command. The smallest transactable unit is given by units, e.g. 0.01. If the chain uses a native currency, you can send some with the new asset using the native-amount parameter. Returns the txid of the issuance transaction. For more information, see native assets.
 /// </summary>
 /// <param name="issueAddress"></param>
 /// <param name="assetName"></param>
 /// <param name="quantity"></param>
 /// <param name="units"></param>
 /// <param name="metaData"></param>
 /// <param name="nativeAmount"></param>
 /// <param name="comment"></param>
 /// <param name="commentTo"></param>
 /// <param name="startBlock"></param>
 /// <param name="endBlock"></param>
 /// <returns></returns>
 public JsonRpcResponse <string> Issue(string issueAddress, object assetName, int quantity, decimal units, [Optional] object metaData, decimal nativeAmount = 0, string comment = null, string commentTo = null, int startBlock = 0, int endBlock = 0)
 {
     if (metaData == null)
     {
         return(_Client.Execute <string>("issue", 0, issueAddress, assetName, quantity, units, nativeAmount));
     }
     else
     {
         return(_Client.Execute <string>("issue", 0, issueAddress, assetName, quantity, units, nativeAmount, metaData));
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new stream on the blockchain called name. Pass the value "stream" in the type parameter (the create API can also be used to create upgrades). If open is true then anyone with global send permissions can publish to the stream, otherwise publishers must be explicitly granted per-stream write permissions. Returns the txid of the transaction creating the stream.
 /// Creates a new (as yet unapproved) upgrade on the blockchain called name. Pass the value "upgrade" in the type parameter (the create API can also be used to create streams) and false for the open parameter. For now, only the protocol version can be upgraded, for example from 10008 to 10009. You can also pass {"protocol-version":100xx,"startblock":yy} to create an upgrade that will only be applied after a certain block height. Note that an address requires both admin and create permissions to create an upgrade. Returns the txid of the transaction creating the upgrade.
 /// </summary>
 /// <param name="streamName"></param>
 /// <param name="metadata"></param>
 /// <returns></returns>
 public JsonRpcResponse <string> Create(string streamName, object metadata)
 {
     return(_Client.Execute <string>("create", 0, "stream", streamName, false, metadata));
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Generates one or more public/private key pairs, which are not stored in the wallet or drawn from the node’s key pool, ready for external key management. For each key pair, the address, pubkey (as embedded in transaction inputs) and privkey (used for signatures) is provided.
 /// </summary>
 /// <param name="count"></param>
 /// <returns></returns>
 public JsonRpcResponse <MultiSignatureResponse> CreateKeyPairs(int count)
 {
     return(_Client.Execute <MultiSignatureResponse>("createkeypairs", 0, count));
 }