Ejemplo n.º 1
0
        //issue more from with metadata
        public Task <JsonRpcResponse <string> > IssueMoreFromWithMetadataAsync(string fromAddress, string toAddress, string assetName, decimal quantity, string metadataStr)
        {
            var metadataJson = new MetadataJSON()
            {
                metadata = metadataStr
            };
            var metadataJsonStr = JsonConvert.SerializeObject(metadataJson.Values);

            return(this.ExecuteAsync <string>("issuemorefrom", 0, fromAddress, toAddress, assetName, quantity, 0, metadataJsonStr));
        }
Ejemplo n.º 2
0
        //issue - 'open: true' with metadata
        public Task <JsonRpcResponse <string> > IssueOpenWithMetadataFromAsync(string fromAddress, string toAddress, string newAssetName, int quantity, string metadataStr)
        {
            string newAssetNameNoSpaces = MUtilityClass.removeSpaces(newAssetName);
            var    metadataJson         = new MetadataJSON()
            {
                metadata = metadataStr
            };

            var issueAssetParamsJson = new IssueAssetParamsJSON()
            {
                name = newAssetNameNoSpaces,
                open = true
            };

            var metadataJsonStr = JsonConvert.SerializeObject(metadataJson.Values);
            var paramsJsonStr   = JsonConvert.SerializeObject(issueAssetParamsJson.Values);

            return(this.ExecuteAsync <string>("issuefrom", 0, fromAddress, toAddress, paramsJsonStr, quantity, 0.01, 0, metadataJsonStr));
        }