Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Miniscript as a separate dll. #675

Closed
wants to merge 40 commits into from

Conversation

joemphilips
Copy link
Contributor

@joemphilips joemphilips commented Mar 26, 2019

  • Complete implementation
  • Create C# Facade as an extension methods in NBitcoin namespace
  • Create NBitcoin.nuspec file so that I can include Miniscript.dll to NBitcoin's nupkg.
  • Tweak AssemblyInfo and .fsproj

@joemphilips joemphilips changed the title Support Miniscript as separate dll. WIP: Support Miniscript as separate dll. Mar 26, 2019
@joemphilips joemphilips changed the title WIP: Support Miniscript as separate dll. WIP: Support Miniscript as a separate dll. Mar 26, 2019
@NicolasDorier
Copy link
Collaborator

I think you should not manually touch nuspec. The nuspec is generated by MSBuild. There is MSBuild properties to influence the nuget package. I think you should use this.

@joemphilips
Copy link
Contributor Author

I've been trying a solution 2 in this answer (and solutions in the issue linked from there.)But this does not work in case we have circular dependency.

I will keep looking. But I'm not sure there is a way to workaround without .nuspec

@@ -20,7 +20,7 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net461;net452;netstandard1.3;netstandard1.1;netcoreapp2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard1.3;netstandard1.1;netcoreapp2.1;netstandard2.0</TargetFrameworks>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removing net4xx profiles?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uups. By mistake. I will fix

@@ -93,4 +93,28 @@
<PropertyGroup>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\NBitcoin.xml</DocumentationFile>
</PropertyGroup>

<!-- Include Miniscript dll only if it is ready. -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hacky workaround to include Miniscript.dll to .nupkg as a separate dll

[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing you can remove this file now

open System.Reflection

[<assembly:AssemblyTitleAttribute("FNBitcoin.Tests")>]
[<assembly:AssemblyProductAttribute("FNBitcoin")>]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old names

let AssemblyTitle = "FNBitcoin.Tests"

[<Literal>]
let AssemblyProduct = "FNBitcoin"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old names

Expect.isTrue true "skip"
]

*)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove file?


private TransactionSignature DummyKeyFn(PubKey key) => null;
public void ShouldSatisfyMiniscript()
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI mixed tabs and spaces, misconfigured editor? ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭
I will fix later.

* Tweak public api visibility in Miniscript.
* Add Unsafe version to Miniscript.Satisfy
* Implement satisfyCost in `Satisfy.fs`

s Please enter the commit message for your changes. Lines starting
* Move every PSBT-related tests to NBitcoin.Tests.Miniscript
 * Add reference from NBitcoin.Tests.Miniscript to NBitcoin.Tests|TestFramework
 * Append TargetFrameworks `netcoreapp2.1;netcoreapp2.2` to TestFramework
* Rewrite PSBT.Finalize as an extension method in NBitcoin.Miniscript
@joemphilips joemphilips mentioned this pull request Apr 11, 2019
@joemphilips joemphilips changed the title WIP: Support Miniscript as a separate dll. Support Miniscript as a separate dll. Apr 12, 2019
@nopara73
Copy link
Contributor

nopara73 commented Apr 14, 2019

Guys, what is miniscript? I keep seeing this issue in my notifications for quite a while:)

@joemphilips
Copy link
Contributor Author

@nopara73
In short, it is a high-level DSL which compiles to actual bitcoin script, like Ivy.

You can see general overview here. The page also has links to whole other resources.
https://www.youtube.com/watch?v=xOQulGTknQo

I couldn't found reference implementation by Sipa so I'm treating rust-miniscript as a reference.

@joemphilips
Copy link
Contributor Author

Closing in favor of #684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants