Example #1
0
        public async Task <Asset> TransferAssetAsync(Asset asset, NexusUser fromUser, string toUsername, CancellationToken token = default)
        {
            if (string.IsNullOrWhiteSpace(toUsername))
            {
                throw new ArgumentException("Username is required");
            }

            return(await TransferAssetAsync(asset, fromUser, ("username", toUsername), token));
        }
Example #2
0
        public async Task <Asset> TransferAssetAsync(Asset asset, NexusUser fromUser, GenesisId toUserGenesis, CancellationToken token = default)
        {
            if (string.IsNullOrWhiteSpace(toUserGenesis?.Genesis))
            {
                throw new ArgumentException("Genesis is required");
            }

            return(await TransferAssetAsync(asset, fromUser, ("destination", toUserGenesis.Genesis), token));
        }