chore: remove go-waku binaries from repo

This commit is contained in:
Richard Ramos 2022-06-21 16:18:18 -04:00
parent 047f7d7dac
commit 68973dfe72
No known key found for this signature in database
GPG Key ID: BD36D48BC9FFC88C
21 changed files with 81 additions and 419 deletions

2
.gitignore vendored
View File

@ -62,3 +62,5 @@ android/keystores/debug.keystore
# generated by bob
lib/
tmp/

Binary file not shown.

Binary file not shown.

72
download-gowaku.sh Executable file
View File

@ -0,0 +1,72 @@
#!/bin/sh
VERSION=`cat ./go-waku.VERSION`
ANDROID_TAR=gowaku-${VERSION}-android.tar.gz
IOS_TAR=gowaku-${VERSION}-ios.tar.gz
SHA_FILE=gowaku-${VERSION}.sha256
echo "Verifying go-waku libs..."
DOWNLOAD_IOS=false
DOWNLOAD_ANDROID=false
if [ "$1" = "--force" ]; then
DOWNLOAD_IOS=true
DOWNLOAD_ANDROID=true
fi
if ! test -f "./android/libs/gowaku.aar"; then
echo "android does not exists."
DOWNLOAD_ANDROID=true
fi
if ! test -d "./ios/Gowaku.xcframework"; then
echo "ios does not exists."
DOWNLOAD_IOS=true
fi
cd tmp
rm -f ${SHA_FILE}
wget "https://github.com/status-im/go-waku/releases/download/v${VERSION}/${SHA_FILE}"
if [ "$DOWNLOAD_ANDROID" = true ]; then
rm -f ${ANDROID_TAR}
wget "https://github.com/status-im/go-waku/releases/download/v${VERSION}/${ANDROID_TAR}"
if ! sha256sum --status --ignore-missing -c gowaku-0.1.0.sha256; then
echo "checksum failed - verify download"
exit 1
fi
rm -f ../android/libs/gowaku*
tar xvfz ${ANDROID_TAR} -C ../android/libs
fi
if [ "$DOWNLOAD_IOS" = true ]; then
rm -f ${IOS_TAR}
wget "https://github.com/status-im/go-waku/releases/download/v${VERSION}/${IOS_TAR}"
if ! sha256sum --status --ignore-missing -c gowaku-0.1.0.sha256; then
echo "checksum failed - verify download"
exit 1
fi
rm -rf ../ios/Gowaku.xcframework
tar xvfz ${IOS_TAR} -C ../ios
unlink ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Gowaku
unlink ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Resources
unlink ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Versions/Current
unlink ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Headers
unlink ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Modules
unlink ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Gowaku
unlink ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Resources
unlink ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Versions/Current
unlink ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Headers
unlink ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Modules
mv -f ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Versions/A/* ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/
mv -f ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Versions/A/* ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/
rm -rf ../ios/Gowaku.xcframework/ios-arm64_x86_64-simulator/Gowaku.framework/Versions/A
rm -rf ../ios/Gowaku.xcframework/ios-arm64/Gowaku.framework/Versions/A
fi

1
go-waku.VERSION Normal file
View File

@ -0,0 +1 @@
0.1.0

View File

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>Gowaku.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>Gowaku.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@ -1,13 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// github.com/status-im/go-waku/mobile
//
// File is generated by gomobile bind. Do not edit.
#ifndef __Gowaku_FRAMEWORK_H__
#define __Gowaku_FRAMEWORK_H__
#include "Gowaku.objc.h"
#include "Universe.objc.h"
#endif

View File

@ -1,98 +0,0 @@
// Objective-C API for talking to github.com/status-im/go-waku/mobile Go package.
// gobind -lang=objc github.com/status-im/go-waku/mobile
//
// File is generated by gobind. Do not edit.
#ifndef __Gowaku_H__
#define __Gowaku_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
@protocol GowakuSignalHandler;
@class GowakuSignalHandler;
@protocol GowakuSignalHandler <NSObject>
- (void)handleSignal:(NSString* _Nullable)p0;
@end
FOUNDATION_EXPORT NSString* _Nonnull GowakuAddPeer(NSString* _Nullable address, NSString* _Nullable protocolID);
FOUNDATION_EXPORT NSString* _Nonnull GowakuConnect(NSString* _Nullable address, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuConnectPeerID(NSString* _Nullable peerID, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuContentTopic(NSString* _Nullable applicationName, long applicationVersion, NSString* _Nullable contentTopicName, NSString* _Nullable encoding);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDecodeAsymmetric(NSString* _Nullable messageJSON, NSString* _Nullable privateKey);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDecodeSymmetric(NSString* _Nullable messageJSON, NSString* _Nullable symmetricKey);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDefaultPubsubTopic(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDisconnect(NSString* _Nullable peerID);
FOUNDATION_EXPORT NSString* _Nonnull GowakuLightpushPublish(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable peerID, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuLightpushPublishEncodeAsymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable peerID, NSString* _Nullable publicKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuLightpushPublishEncodeSymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable peerID, NSString* _Nullable symmetricKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuListenAddresses(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuNewNode(NSString* _Nullable configJSON);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPeerCnt(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPeerID(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPeers(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPubsubTopic(NSString* _Nullable name, NSString* _Nullable encoding);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayEnoughPeers(NSString* _Nullable topic);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayPublish(NSString* _Nullable messageJSON, NSString* _Nullable topic, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayPublishEncodeAsymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable publicKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayPublishEncodeSymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable symmetricKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelaySubscribe(NSString* _Nullable topic);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayUnsubscribe(NSString* _Nullable topic);
// skipped function SetEventCallback with unsupported parameter or return types
/**
* SetMobileSignalHandler setup geth callback to notify about new signal
used for gomobile builds
nolint
*/
FOUNDATION_EXPORT void GowakuSetMobileSignalHandler(id<GowakuSignalHandler> _Nullable handler);
FOUNDATION_EXPORT NSString* _Nonnull GowakuStart(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuStop(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuStoreQuery(NSString* _Nullable queryJSON, NSString* _Nullable peerID, long ms);
@class GowakuSignalHandler;
/**
* SignalHandler defines a minimal interface
a signal handler needs to implement.
nolint
*/
@interface GowakuSignalHandler : NSObject <goSeqRefInterface, GowakuSignalHandler> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)handleSignal:(NSString* _Nullable)p0;
@end
#endif

View File

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

View File

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

View File

@ -1,8 +0,0 @@
framework module "Gowaku" {
header "ref.h"
header "Gowaku.objc.h"
header "Universe.objc.h"
header "Gowaku.h"
export *
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

View File

@ -1,13 +0,0 @@
// Objective-C API for talking to the following Go packages
//
// github.com/status-im/go-waku/mobile
//
// File is generated by gomobile bind. Do not edit.
#ifndef __Gowaku_FRAMEWORK_H__
#define __Gowaku_FRAMEWORK_H__
#include "Gowaku.objc.h"
#include "Universe.objc.h"
#endif

View File

@ -1,98 +0,0 @@
// Objective-C API for talking to github.com/status-im/go-waku/mobile Go package.
// gobind -lang=objc github.com/status-im/go-waku/mobile
//
// File is generated by gobind. Do not edit.
#ifndef __Gowaku_H__
#define __Gowaku_H__
@import Foundation;
#include "ref.h"
#include "Universe.objc.h"
@protocol GowakuSignalHandler;
@class GowakuSignalHandler;
@protocol GowakuSignalHandler <NSObject>
- (void)handleSignal:(NSString* _Nullable)p0;
@end
FOUNDATION_EXPORT NSString* _Nonnull GowakuAddPeer(NSString* _Nullable address, NSString* _Nullable protocolID);
FOUNDATION_EXPORT NSString* _Nonnull GowakuConnect(NSString* _Nullable address, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuConnectPeerID(NSString* _Nullable peerID, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuContentTopic(NSString* _Nullable applicationName, long applicationVersion, NSString* _Nullable contentTopicName, NSString* _Nullable encoding);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDecodeAsymmetric(NSString* _Nullable messageJSON, NSString* _Nullable privateKey);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDecodeSymmetric(NSString* _Nullable messageJSON, NSString* _Nullable symmetricKey);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDefaultPubsubTopic(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuDisconnect(NSString* _Nullable peerID);
FOUNDATION_EXPORT NSString* _Nonnull GowakuLightpushPublish(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable peerID, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuLightpushPublishEncodeAsymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable peerID, NSString* _Nullable publicKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuLightpushPublishEncodeSymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable peerID, NSString* _Nullable symmetricKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuListenAddresses(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuNewNode(NSString* _Nullable configJSON);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPeerCnt(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPeerID(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPeers(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuPubsubTopic(NSString* _Nullable name, NSString* _Nullable encoding);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayEnoughPeers(NSString* _Nullable topic);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayPublish(NSString* _Nullable messageJSON, NSString* _Nullable topic, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayPublishEncodeAsymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable publicKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayPublishEncodeSymmetric(NSString* _Nullable messageJSON, NSString* _Nullable topic, NSString* _Nullable symmetricKey, NSString* _Nullable optionalSigningKey, long ms);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelaySubscribe(NSString* _Nullable topic);
FOUNDATION_EXPORT NSString* _Nonnull GowakuRelayUnsubscribe(NSString* _Nullable topic);
// skipped function SetEventCallback with unsupported parameter or return types
/**
* SetMobileSignalHandler setup geth callback to notify about new signal
used for gomobile builds
nolint
*/
FOUNDATION_EXPORT void GowakuSetMobileSignalHandler(id<GowakuSignalHandler> _Nullable handler);
FOUNDATION_EXPORT NSString* _Nonnull GowakuStart(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuStop(void);
FOUNDATION_EXPORT NSString* _Nonnull GowakuStoreQuery(NSString* _Nullable queryJSON, NSString* _Nullable peerID, long ms);
@class GowakuSignalHandler;
/**
* SignalHandler defines a minimal interface
a signal handler needs to implement.
nolint
*/
@interface GowakuSignalHandler : NSObject <goSeqRefInterface, GowakuSignalHandler> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)handleSignal:(NSString* _Nullable)p0;
@end
#endif

View File

@ -1,29 +0,0 @@
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
#include "ref.h"
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString* _Nonnull)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) _Nonnull id _ref;
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (NSString* _Nonnull)error;
@end
#endif

View File

@ -1,35 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef __GO_REF_HDR__
#define __GO_REF_HDR__
#include <Foundation/Foundation.h>
// GoSeqRef is an object tagged with an integer for passing back and
// forth across the language boundary. A GoSeqRef may represent either
// an instance of a Go object, or an Objective-C object passed to Go.
// The explicit allocation of a GoSeqRef is used to pin a Go object
// when it is passed to Objective-C. The Go seq package maintains a
// reference to the Go object in a map keyed by the refnum along with
// a reference count. When the reference count reaches zero, the Go
// seq package will clear the corresponding entry in the map.
@interface GoSeqRef : NSObject {
}
@property(readonly) int32_t refnum;
@property(strong) id obj; // NULL when representing a Go object.
// new GoSeqRef object to proxy a Go object. The refnum must be
// provided from Go side.
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
- (int32_t)incNum;
@end
@protocol goSeqRefInterface
-(GoSeqRef*) _ref;
@end
#endif

View File

@ -1,8 +0,0 @@
framework module "Gowaku" {
header "ref.h"
header "Gowaku.objc.h"
header "Universe.objc.h"
header "Gowaku.h"
export *
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

View File

@ -33,11 +33,16 @@
"test": "jest",
"typescript": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"check-gowaku": "./download-gowaku.sh",
"download-gowaku": "./download-gowaku.sh --force",
"prepare": "bob build",
"prerelease": "yarn check-gowaku",
"release": "release-it",
"example": "yarn --cwd example",
"prepods": "yarn check-gowaku",
"pods": "cd example && pod-install --quiet",
"bootstrap": "yarn example && yarn && yarn pods"
"bootstrap": "yarn check-gowaku && yarn example && yarn && yarn pods",
"prepublish": "yarn check-gowaku"
},
"keywords": [
"react-native",