Skip to content

Commit

Permalink
Convenience fn fill-in for TransactionBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
dthorpe committed Nov 16, 2014
1 parent 6ca8951 commit 6723c88
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions NBitcoin/TransactionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ Money SetColoredChange(TransactionBuildingContext ctx)
return ctx.ChangeAmount;
}

public TransactionBuilder SendAsset(Script scriptPubKey, AssetId assetId, ulong assetQuantity)
{
return SendAsset(scriptPubKey, new Asset(assetId, assetQuantity));
}

public TransactionBuilder SendAsset(Script scriptPubKey, Asset asset)
{
AssertOpReturn("Colored Coin");
Expand Down Expand Up @@ -520,7 +525,7 @@ public TransactionBuilder IssueAsset(PubKey destination, Asset asset)

AssetId _IssuedAsset;

private TransactionBuilder IssueAsset(Script scriptPubKey, Asset asset)
public TransactionBuilder IssueAsset(Script scriptPubKey, Asset asset)
{
AssertOpReturn("Colored Coin");
if(_IssuedAsset == null)
Expand Down Expand Up @@ -671,7 +676,8 @@ public Transaction SignTransaction(Transaction transaction)
SignTransactionInPlace(tx);
return tx;
}
public void SignTransactionInPlace(Transaction transaction)

public Transaction SignTransactionInPlace(Transaction transaction)
{
TransactionSigningContext ctx = new TransactionSigningContext(this, transaction);
for(int i = 0 ; i < transaction.Inputs.Count ; i++)
Expand Down

0 comments on commit 6723c88

Please sign in to comment.