Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build_android:
#build_ios:
# stage: build
# script:
# - xcodebuild -scheme AirGapSapling -destination generic/platform=iOS Simulator,arch=x86_64
# - xcodebuild -scheme MadfishSapling -destination generic/platform=iOS Simulator,arch=x86_64

check:
stage: check
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let excludes: [String] = [
]

let package = Package(
name: "AirGapSapling",
name: "MadfishSapling",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
55 changes: 10 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# AirGap Sapling
# Madfish Sapling

[![npm](https://img.shields.io/npm/v/@airgap/sapling-wasm.svg?colorB=brightgreen)](https://www.npmjs.com/package/@airgap/sapling-wasm)
[![jitpack](https://img.shields.io/jitpack/v/github/airgap-it/airgap-sapling)](https://jitpack.io/#airgap-it/airgap-sapling)
[![spm](https://img.shields.io/github/v/tag/airgap-it/airgap-sapling?include_prereleases&label=spm)](https://github.com/airgap-it/airgap-sapling/releases)
[![jitpack](https://img.shields.io/jitpack/v/github/madfish-solutions/madfish-sapling)](https://jitpack.io/#madfish-solutions/madfish-sapling)
[![spm](https://img.shields.io/github/v/tag/madfish-solutions/madfish-sapling?include_prereleases&label=spm)](https://github.com/madfish-solutions/madfish-sapling/releases)

Wasm, Android and iOS wrappers around [Zcash Rust crates](https://github.com/zcash/librustzcash).

Expand All @@ -16,48 +16,13 @@ The project is divided into the following packages:

## Sapling Wasm

### Install

To add JS AirGap Sapling library into your project run:

```bash
$ npm install --save @airgap/sapling-wasm
```

### Examples

```ts
import * as bip39 from 'bip39'
import * as sapling from '@airgap/sapling-wasm'
import { SaplingPaymentAddress } from '@airgap/sapling-wasm'

const mnemonic: string = bip39.generateMnemonic()
const seed: Buffer = await bip39.mnemonicToSeed(mnemonic, '')
const derivationPath: string = 'm/'

// create an extended spending key
const spendingKey: Buffer = await sapling.getExtendedSpendingKey(seed, derivationPath)
console.log('spendingKey =', spendingKey.toString('hex'))

// create an extended full viewing key
const viewingKey: Buffer = await sapling.getExtendedFullViewingKey(seed, derivationPath)
console.log('viewingKey =', viewingKey.toString('hex'))

// get default address
const address: SaplingPaymentAddress = await sapling.getPaymentAddressFromViewingKey(viewingKey)
console.log(
'address.index =', address.index.toString('hex'),
'address.raw =', address.raw.toString('hex')
)
```

More advanced examples can be found in `js/examples`.
The custom version of Sapling Wasm has not been released, use [Airgap Sapling Wasm](https://github.com/airgap-it/airgap-sapling?tab=readme-ov-file#sapling-wasm).

## Sapling Android

### Install

To add Android AirGap Sapling library into your project:
To add Android Madfish Sapling library into your project:

1. Ensure [Android NDK](https://developer.android.com/ndk) is supported in your project.

Expand All @@ -75,27 +40,27 @@ To add Android AirGap Sapling library into your project:
```groovy
def saplingVersion = "x.y.z"

implementation "com.github.airgap-it:airgap-sapling:$saplingVersion"
implementation "com.github.madfish-solutions:madfish-sapling:$saplingVersion"
```

## Sapling iOS

### Install

To add iOS AirGap Sapling into your project, add the package dependency:
To add iOS Madfish Sapling into your project, add the package dependency:

#### Xcode

Open the `Add Package Dependency` window (as described in [the official guide](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)) and enter the AirGap Sapling GitHub repository URL:
Open the `Add Package Dependency` window (as described in [the official guide](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)) and enter the Madfish Sapling GitHub repository URL:
```
https://github.com/airgap-it/airgap-sapling
https://github.com/madfish-solutions/madfish-sapling
```

#### Package.swift file

Add the following dependency in your `Package.swift` file:

```swift
.package(url: "https://github.com/airgap-it/airgap-sapling", from: "x.y.z")
.package(url: "https://github.com/madfish-solutions/madfish-sapling", from: "x.y.z")
```

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/sapling-wasm"
],
"version": "0.0.11-beta.1"
"version": "0.0.11-beta.2"
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "airgap-sapling",
"name": "madfish-sapling",
"version": "0.0.0",
"private": true,
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/sapling-android/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# AirGap Sapling Android
# Madfish Sapling Android

[![release](https://img.shields.io/jitpack/v/github/airgap-it/airgap-sapling)](https://jitpack.io/#airgap-it/airgap-sapling)
[![release](https://img.shields.io/jitpack/v/github/madfish-solutions/madfish-sapling)](https://jitpack.io/#madfish-solutions/madfish-sapling)

An Android wrapper around [Zcash Rust crates](https://github.com/zcash/librustzcash).

## Install

To add Android AirGap Sapling library into your project:
To add Android Madfish Sapling library into your project:

1. Ensure [Android NDK](https://developer.android.com/ndk) is supported in your project.

Expand All @@ -24,7 +24,7 @@ To add Android AirGap Sapling library into your project:
```groovy
def saplingVersion = "x.y.z"

implementation "com.github.airgap-it:airgap-sapling:$saplingVersion"
implementation "com.github.madfish-solutions:madfish-sapling:$saplingVersion"
```

## Development
Expand Down
8 changes: 4 additions & 4 deletions packages/sapling-android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ android {
ndkVersion = "29.0.14206865"

defaultConfig {
namespace "it.airgap.sapling"
namespace "com.madfish.sapling"
minSdk 21
targetSdk 36
versionCode 1
versionName "0.0.11-beta01"
versionName "0.0.11-beta02"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
Expand Down Expand Up @@ -51,7 +51,7 @@ android {

cargo {
module = '../../sapling'
libname = 'libairgap_sapling'
libname = 'libmadfish_sapling'
targets = ['arm', 'arm64', 'x86', 'x86_64']
profile = 'release'
prebuiltToolchains = true
Expand Down Expand Up @@ -83,7 +83,7 @@ afterEvaluate {
release(MavenPublication) {
from components.release

groupId = 'it.airgap'
groupId = 'com.madfish'
artifactId = 'sapling'
version = android.defaultConfig.versionName
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.airgap.sapling
package com.madfish.sapling

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("it.airgap.sapling", appContext.packageName)
assertEquals("com.madfish.sapling", appContext.packageName)
}
}
2 changes: 1 addition & 1 deletion packages/sapling-android/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.10.2)

# Declares and names the project.

project("airgap-sapling")
project("madfish-sapling")

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef AIRGAP_SAPLING_H
#define AIRGAP_SAPLING_H
#ifndef MADFISH_SAPLING_H
#define MADFISH_SAPLING_H

#include "stdlib.h"
#include "stddef.h"
Expand Down Expand Up @@ -254,4 +254,4 @@ extern "C" {
};
#endif // __cplusplus

#endif // AIRGAP_SAPLING_H
#endif // MADFISH_SAPLING_H
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading