Skip to content

Commit

Permalink
Add SendAsset fns that take assetId, quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
dthorpe committed Nov 7, 2014
1 parent 57204d9 commit bb32f4f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions NBitcoin/TransactionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,31 @@ public TransactionBuilder SendAsset(BitcoinAddress destination, Asset asset)
return SendAsset(destination.ID, asset);
}

public TransactionBuilder SendAsset(BitcoinAddress destination, AssetId assetId, ulong quantity)
{
return SendAsset(destination.ID, new Asset(assetId, quantity));
}

public TransactionBuilder SendAsset(PubKey pubKey, Asset asset)
{
return SendAsset(pubKey.PaymentScript, asset);
}

public TransactionBuilder SendAsset(PubKey pubKey, AssetId assetId, ulong quantity)
{
return SendAsset(pubKey.PaymentScript, new Asset(assetId, quantity));
}

public TransactionBuilder SendAsset(TxDestination id, Asset asset)
{
return SendAsset(id.CreateScriptPubKey(), asset);
}

public TransactionBuilder SendAsset(TxDestination id, AssetId assetId, ulong quantity)
{
return SendAsset(id.CreateScriptPubKey(), new Asset(assetId, quantity));
}

public TransactionBuilder Shuffle()
{
DefaultCoinSelector.Shuffle(_BuilderGroups, _Rand);
Expand Down

0 comments on commit bb32f4f

Please sign in to comment.