Skip to content

Commit

Permalink
Add spend output func
Browse files Browse the repository at this point in the history
  • Loading branch information
AAweidai committed Nov 17, 2021
1 parent 118621f commit 9084603
Show file tree
Hide file tree
Showing 33 changed files with 138 additions and 126 deletions.
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import PackageDescription

let package = Package(
name: "Musig2",
name: "Musig2Bitcoin",
platforms: [
.iOS(.v9)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Musig2",
targets: ["Musig2"]),
name: "Musig2Bitcoin",
targets: ["Musig2Bitcoin"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
Expand All @@ -22,7 +22,7 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.binaryTarget(
name: "Musig2",
path: "./Sources/Musig2.xcframework")
name: "Musig2Bitcoin",
path: "./Sources/Musig2Bitcoin.xcframework")
]
)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>Musig2.framework</string>
<string>Musig2Bitcoin.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
Expand All @@ -20,7 +20,7 @@
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
<string>Musig2.framework</string>
<string>Musig2Bitcoin.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
#ifndef MUSIG2_SWIFT_H
#define MUSIG2_SWIFT_H
#ifndef MUSIG2BITCOIN_SWIFT_H
#define MUSIG2BITCOIN_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

Expand Down Expand Up @@ -201,7 +201,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Musig2",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Musig2Bitcoin",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// Musig2Bitcoin.h
// Musig2Bitcoin
//
// Created by daiwei on 2021/11/17.
//

#import <Foundation/Foundation.h>

//! Project version number for Musig2Bitcoin.
FOUNDATION_EXPORT double Musig2BitcoinVersionNumber;

//! Project version string for Musig2Bitcoin.
FOUNDATION_EXPORT const unsigned char Musig2BitcoinVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Musig2Bitcoin/PublicHeader.h>

#import <Musig2Bitcoin/Musig2Header.h>
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ char *generate_schnorr_signature(const char *message, const char *privkey);
char *get_my_privkey(const char *phrase, const char *pd_passphrase);

char *get_scirpt_pubkey(const char *addr);

char *get_spent_outputs(const char *prev_tx, uint32_t index);

char *add_spent_output(const char *spent_outputs, const char *prev_tx, uint32_t index);
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Musig2
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Musig2Bitcoin
import Foundation
@_exported import Musig2
@_exported import Musig2Bitcoin
import Swift
import _Concurrency
public func getRound1State() -> Swift.OpaquePointer?
Expand All @@ -22,3 +22,4 @@ public func generateRawTx(txids: [Swift.String], indexs: [Swift.UInt32], address
public func getSighash(prev_tx: Swift.String, tx: Swift.String, input_index: Swift.UInt32, agg_pubkey: Swift.String, sigversion: Swift.UInt32) -> Swift.String
public func buildThresholdTx(tx: Swift.String, agg_signature: Swift.String, agg_pubkey: Swift.String, control: Swift.String, input_index: Swift.UInt32) -> Swift.String
public func buildTaprootTx(tx: Swift.String, signature: Swift.String, input_index: Swift.UInt32) -> Swift.String
public func generateSpentOutputs(prev_txs: [Swift.String], indexs: [Swift.UInt32]) -> Swift.String
Loading

0 comments on commit 9084603

Please sign in to comment.