Compare commits

...

No commits in common. "main" and "6.0.2" have entirely different histories.
main ... 6.0.2

147 changed files with 25589 additions and 1042 deletions

View File

@ -1,7 +1,8 @@
---
version: 2.1
defaults:
default-xcode-version: &default-xcode-version "12.5.1"
default-xcode-version: &default-xcode-version "14.1.0"
default-ruby-version: &default-ruby-version "2.7"
default-environment: &default-environment
@ -35,7 +36,7 @@ commands:
steps:
- run:
name: Version Info
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: |
set -x
@ -55,7 +56,7 @@ commands:
steps:
- run:
name: Configure Cargo to use git cli
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: |
mkdir -p ~/.cargo
echo '[net]' >> ~/.cargo/config
@ -73,30 +74,34 @@ commands:
restore-homebrew-cache:
steps:
- restore_cache:
name: Restore Homebrew cache
key: v0-homebrew-{{ arch }}
#- restore_cache:
#name: Restore Homebrew cache
#keys:
#v1-homebrew-{{ arch }}-{{ .Revision }}
#v1-homebrew-{{ arch }}-
- run:
name: Update Homebrew
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: |
brew --version
brew update --preinstall
brew --version
#brew --version
- run:
name: Install Homebrew dependencies
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: |
rm '/usr/local/lib/python3.9/site-packages/six.py'
brew update-reset
brew install llvm
brew install ninja
brew install pkg-config
brew bundle --no-upgrade
#- save-homebrew-cache
save-homebrew-cache:
steps:
- run:
name: Prepare Homebrew cache for saving
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: |
# Make sure latest versions are installed
time brew bundle
@ -107,7 +112,7 @@ commands:
brew info
- save_cache:
name: Save Homebrew cache
key: v0-homebrew-{{ arch }}-{{ .Revision }}
key: v1-homebrew-{{ arch }}-{{ .Revision }}
paths:
- /usr/local/Cellar
@ -161,7 +166,7 @@ commands:
- restore_cache:
name: Restore build artifact libmobilecoin.a cache for target <<parameters.build-target>>
keys:
- v2-build-artifact-<<parameters.build-target>>-{{ checksum "vendor_mobilecoin.hash" }}
- v2-build-artifact-<<parameters.build-target>>-{{ checksum "libmobilecoin/libmobilecoin_and_vendor_mobilecoin.hash" }}
save-build-artifact-cache:
parameters:
@ -172,9 +177,9 @@ commands:
- print-mobilecoin-submodule-hash
- save_cache:
name: Save build artifact libmobilecoin.a cache for target <<parameters.build-target>>
key: v2-build-artifact-<<parameters.build-target>>-{{ checksum "vendor_mobilecoin.hash" }}
key: v2-build-artifact-<<parameters.build-target>>-{{ checksum "libmobilecoin/libmobilecoin_and_vendor_mobilecoin.hash" }}
paths:
- ~/project/Vendor/mobilecoin/libmobilecoin/out/ios/target/<<parameters.build-target>>/mobile-release
- libmobilecoin/libmobilecoin/out/ios/target/<<parameters.build-target>>/mobile-release
#
# LibMobileCoin Headers
@ -185,16 +190,16 @@ commands:
- restore_cache:
name: Restore build artifact headers cache
keys:
- v2-build-artifact-headers-{{ checksum "vendor_mobilecoin.hash" }}
- v2-build-artifact-headers-{{ checksum "libmobilecoin/libmobilecoin_and_vendor_mobilecoin.hash" }}
save-build-artifact-headers-cache:
steps:
- print-mobilecoin-submodule-hash
- save_cache:
name: Save build artifact headers cache
key: v2-build-artifact-headers-{{ checksum "vendor_mobilecoin.hash" }}
key: v2-build-artifact-headers-{{ checksum "libmobilecoin/libmobilecoin_and_vendor_mobilecoin.hash" }}
paths:
- ~/project/Vendor/mobilecoin/libmobilecoin/out/ios/include
- libmobilecoin/libmobilecoin/out/ios/include
#
# Rustup Toolchain Cache's
@ -208,7 +213,7 @@ commands:
- restore_cache:
name: Restore Rustup cache for target <<parameters.build-target>>
keys:
- v0-rustup-<<parameters.build-target>>-{{ checksum "Vendor/mobilecoin/libmobilecoin/toolchain-config.env" }}
- v0-rustup-<<parameters.build-target>>-{{ checksum "libmobilecoin/libmobilecoin/toolchain-config.env" }}
save-rustup-cache:
parameters:
@ -218,7 +223,7 @@ commands:
steps:
- save_cache:
name: Save Rustup cache for target aarch64-apple-ios-sim
key: v0-rustup-<<parameters.build-target>>-{{ checksum "Vendor/mobilecoin/libmobilecoin/toolchain-config.env" }}
key: v0-rustup-<<parameters.build-target>>-{{ checksum "libmobilecoin/libmobilecoin/toolchain-config.env" }}
paths:
- ~/.rustup/toolchains
@ -239,7 +244,7 @@ commands:
steps:
- run:
name: Fetch project Cargo dependencies
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: |
set -x
time cargo fetch --locked
@ -253,7 +258,6 @@ commands:
cbindgen: { type: boolean, default: false }
os: { type: enum, enum: [ "linux", "macos", "windows" ], default: linux }
steps:
- checkout
- when:
condition: { equal: [ << parameters.os >>, macos ] }
steps: [ restore-homebrew-cache ]
@ -263,15 +267,22 @@ commands:
- prefetch-cargo-deps
#
# libmobilecoin-ios-artifacts cocoapods lint/spec publish
# libmobilecoin cocoapods lint/spec publish
#
init-artifacts-submodule:
description: Initialize artifacts submodule
steps:
- run:
name: Run git submodule update --init
working_directory: libmobilecoin
command: git submodule update --init --depth 1 Artifacts
init-mobilecoin-submodule:
description: Initialize mobilecoin submodule
steps:
- run:
name: Run git submodule update --init
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/Vendor/mobilecoin
command: git submodule update --init --depth 1 --recursive
print-mobilecoin-submodule-hash:
@ -279,20 +290,22 @@ commands:
steps:
- run:
name: Save submodule hash to file for checksumming
working_directory: libmobilecoin
command: |
git submodule status > vendor_mobilecoin.hash
cat <(git submodule status Vendor/mobilecoin) <(git ls-files -s libmobilecoin | git hash-object --stdin) > libmobilecoin_and_vendor_mobilecoin.hash
print-tool-versions:
description: Print versions of various tools used
steps:
- run:
name: Print tool versions
working_directory: libmobilecoin
command: |
set -x
brew config
brew list --versions
bundle env
bundle exec pod env
bundle config unset deployment
printenv
set-ruby-version:
@ -318,10 +331,11 @@ commands:
- restore_cache:
name: Restore Ruby gem cache
keys:
- v0-ruby-<< parameters.ruby-version >>-gems-{{ checksum "Gemfile.lock" }}
- v0-ruby-<< parameters.ruby-version >>-gems-{{ checksum "libmobilecoin/Gemfile.lock" }}
- v0-ruby-<< parameters.ruby-version >>-gems-
- run:
name: Install root bundler dependencies
working_directory: libmobilecoin
command: |
bundle config set --local deployment 'true'
bundle config set --local path '.vendor/bundle'
@ -329,9 +343,9 @@ commands:
bundle check || bundle install
- save_cache:
name: Save Ruby gem cache
key: v0-ruby-<< parameters.ruby-version >>-gems-{{ checksum "Gemfile.lock" }}
key: v0-ruby-<< parameters.ruby-version >>-gems-{{ checksum "libmobilecoin/Gemfile.lock" }}
paths:
- .vendor/bundle
- libmobilecoin/.vendor/bundle
#
# MobileCoin-Swift for testing
@ -384,8 +398,8 @@ commands:
- restore_cache:
name: Restore Ruby gem cache swift sdk
keys:
- v1-ruby-<< parameters.ruby-version >>-gems-{{ checksum "~/MobileCoin-Swift/Gemfile.lock" }}
- v1-ruby-<< parameters.ruby-version >>-gems-
- v2-ruby-<< parameters.ruby-version >>-gems-{{ checksum "~/MobileCoin-Swift/Gemfile.lock" }}
- v2-ruby-<< parameters.ruby-version >>-gems-
- run:
name: Install root bundler dependencies
working_directory: ~/MobileCoin-Swift
@ -499,9 +513,9 @@ commands:
name: Clone current branch of LibMobileCoin and its submodules
working_directory: ~/MobileCoin-Swift
command: |
mkdir -p Vendor/libmobilecoin-ios-artifacts
git clone --branch ${CIRCLE_BRANCH} ${CIRCLE_REPOSITORY_URL} Vendor/libmobilecoin-ios-artifacts
cd Vendor/libmobilecoin-ios-artifacts
mkdir -p Vendor/libmobilecoin
git clone --branch ${CIRCLE_BRANCH} ${CIRCLE_REPOSITORY_URL} Vendor/libmobilecoin
cd Vendor/libmobilecoin
git submodule update --init --recursive --depth 1
@ -510,6 +524,17 @@ commands:
steps:
- run:
name: Set git credentials
working_directory: libmobilecoin
command: |
git config user.email "mobilecoin-ci@mobilecoin.com"
git config user.name "mobilecoin-ci"
set-artifacts-git-credentials:
description: Set git credentials
steps:
- run:
name: Set Artifacts git credentials
working_directory: libmobilecoin/Artifacts
command: |
git config user.email "mobilecoin-ci@mobilecoin.com"
git config user.name "mobilecoin-ci"
@ -518,6 +543,7 @@ commands:
steps:
- run:
name: Lint podspec locally
working_directory: libmobilecoin
command: make lint-locally
publish-to-trunk:
@ -525,8 +551,15 @@ commands:
- add_ssh_keys:
fingerprints:
- "16:4d:90:f0:c4:2b:2e:ac:96:7b:6b:8b:e0:ce:72:28"
- run:
name: Use SSH remote for push
working_directory: libmobilecoin/Artifacts
command: |
git remote remove origin
git remote add origin git@github.com:mobilecoinofficial/libmobilecoin-apple-artifacts.git
- run:
name: Publish Pod to Trunk
working_directory: libmobilecoin
command: make publish
make-push-generated:
@ -536,12 +569,14 @@ commands:
- "0b:63:05:5c:f9:37:25:a8:85:7a:8e:2c:8d:96:1a:39"
- run:
name: Push generated to remote
working_directory: libmobilecoin
command: make push-generated
check-dirty-git:
steps:
- run:
name: Check dirty git
working_directory: libmobilecoin
command: |
if [[ -n $(git status --porcelain) ]]; then
echo "repo is dirty"
@ -563,7 +598,10 @@ jobs:
SCAN_OUTPUT_DIRECTORY: ../output/scan
SCAN_OUTPUT_TYPES: junit
steps:
- checkout
- run:
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- init-artifacts-submodule
- init-mobilecoin-submodule
- set-ruby-version
- install-gems
@ -582,50 +620,16 @@ jobs:
environment:
<<: *default-environment
steps:
- checkout
- run:
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- init-artifacts-submodule
- init-mobilecoin-submodule
- set-ruby-version
- install-gems
- print-tool-versions
- set-git-credentials
- publish-to-trunk
build-toolchain:
parameters:
xcode-version: { type: string, default: *default-xcode-version }
build-target:
type: string
default: "aarch64-apple-ios-sim"
executor:
name: macos
xcode-version: << parameters.xcode-version >>
environment:
<<: *default-build-environment
OPENSSL_BIN: /usr/local/opt/openssl/bin/openssl
steps:
- checkout
- init-mobilecoin-submodule
- run:
name: Make rustup toolchains directory
working_directory: Vendor/mobilecoin/libmobilecoin
command: |
mkdir -p ~/.rustup/toolchains
- restore-rustup-cache:
build-target: <<parameters.build-target>>
- skip-if-cache-directory-exists:
directory: ~/.rustup/toolchains/ios-<<parameters.build-target>>-nightly-2021-08-01-swift-5-3-2
- prepare-for-build: { os: macos }
- run:
working_directory: Vendor/mobilecoin
name: Build rustup toolchains for a build target
command: |
cd libmobilecoin
make setup
make toolchain_<< parameters.build-target >>
- save-rustup-cache:
build-target: <<parameters.build-target>>
- save-homebrew-cache
build-artifacts:
parameters:
@ -640,20 +644,25 @@ jobs:
<<: *default-build-environment
OPENSSL_BIN: /usr/local/opt/openssl/bin/openssl
steps:
- checkout
- run:
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- init-mobilecoin-submodule
- restore-build-artifact-cache:
build-target: <<parameters.build-target>>
- skip-if-cache-file-exists:
file: ~/project/Vendor/mobilecoin/libmobilecoin/out/ios/target/<<parameters.build-target>>/mobile-release/libmobilecoin.a
file: libmobilecoin/libmobilecoin/out/ios/target/<<parameters.build-target>>/mobile-release/libmobilecoin.a
- run:
name: Install git-lfs mac
command: |
git lfs install
- prepare-for-build: { os: macos }
- restore-rustup-cache:
build-target: <<parameters.build-target>>
- run:
working_directory: Vendor/mobilecoin
working_directory: libmobilecoin/libmobilecoin
name: Build libmobilecoin static libraries
command: |
cd libmobilecoin
make setup
make << parameters.build-target >>
@ -670,36 +679,61 @@ jobs:
environment:
<<: *default-build-environment
steps:
- checkout
- run:
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- run:
name: Install git-lfs mac
command: |
git lfs install
- init-artifacts-submodule
- init-mobilecoin-submodule
- run:
name: Make output directories
working_directory: Vendor/mobilecoin/libmobilecoin
working_directory: libmobilecoin/libmobilecoin
command: |
mkdir -p out/ios/target
- restore-build-artifact-cache:
build-target: aarch64-apple-ios-sim
- restore-build-artifact-cache:
build-target: aarch64-apple-ios-macabi
- restore-build-artifact-cache:
build-target: aarch64-apple-ios
- restore-build-artifact-cache:
build-target: x86_64-apple-ios-macabi
- restore-build-artifact-cache:
build-target: x86_64-apple-ios
- restore-build-artifact-cache:
build-target: x86_64-apple-ios-darwin
build-target: x86_64-apple-darwin
- restore-build-artifact-cache:
build-target: aarch64-apple-darwin
- restore-build-artifact-headers-cache
- run:
name: Copy Artifacts
working_directory: libmobilecoin
command: |
make copy
- persist_to_workspace:
root: ./
paths:
- Artifacts
- set-git-credentials
- set-artifacts-git-credentials
- run:
name: Push artifacts to remote w/ LFS
working_directory: libmobilecoin/Artifacts
command: |
git checkout -b ${CIRCLE_BRANCH} || true
git checkout ${CIRCLE_BRANCH}
git config pull.rebase false
git pull origin ${CIRCLE_BRANCH} || true
git add .
git commit -m 'Add compiled static libraries from CICD'
git remote remove origin
git remote add origin git@github.com:mobilecoinofficial/libmobilecoin-apple-artifacts.git
git push origin ${CIRCLE_BRANCH} || true
- run:
name: Update libmobilecoin submodule tracked commit hash
working_directory: libmobilecoin
command: |
git add Artifacts
git commit -m '[skip ci] Update Artifacts submodule commit hash for compiled static libraries from CICD'
git push origin ${CIRCLE_BRANCH}
make-generate:
machine:
@ -707,21 +741,21 @@ jobs:
environment:
<<: *default-build-environment
steps:
- checkout
- init-mobilecoin-submodule
- attach_workspace:
at: /tmp/workspace
- run:
name: Copy artifacts from workspce
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- set-git-credentials
- run:
name: Pull latest to get new CICD changes
working_directory: libmobilecoin/Artifacts
command: |
rm -rf Artifacts
cp -R /tmp/workspace/Artifacts ./
git fetch origin ${CIRCLE_BRANCH} && git reset --hard origin/${CIRCLE_BRANCH}
- init-mobilecoin-submodule
- run:
name: make generate (proto -> grpc swift)
working_directory: libmobilecoin
command: |
make generate
- set-git-credentials
- make-push-generated
test-example-http-with-mobilecoin-swift:
@ -740,7 +774,14 @@ jobs:
SCAN_OUTPUT_DIRECTORY: ../output/scan
SCAN_OUTPUT_TYPES: junit
steps:
- checkout
- run:
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- run:
name: Install git-lfs mac
command: |
git lfs install
- init-artifacts-submodule
- init-mobilecoin-submodule
- set-ruby-version
- set-git-credentials
@ -775,7 +816,14 @@ jobs:
SCAN_OUTPUT_DIRECTORY: ../output/scan
SCAN_OUTPUT_TYPES: junit
steps:
- checkout
- run:
name: Clone GitHub repository
command: git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH"
- run:
name: Install git-lfs mac
command: |
git lfs install
- init-artifacts-submodule
- init-mobilecoin-submodule
- set-ruby-version
- set-git-credentials
@ -803,114 +851,103 @@ workflows:
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
# ios-sim
- build-toolchain:
name: build-toolchain-m1-ios-sim-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-ios-sim"
matrix:
parameters:
xcode-version: [*default-xcode-version]
- build-artifacts:
name: build-artifacts-m1-ios-sim-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-ios-sim"
requires: [build-toolchain-m1-ios-sim-xcode-<< matrix.xcode-version >>]
matrix:
parameters:
xcode-version: [*default-xcode-version]
# m1-catalyst
- build-toolchain:
name: build-toolchain-m1-catalyst-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-ios-macabi"
matrix:
parameters:
xcode-version: [*default-xcode-version]
- build-artifacts:
name: build-artifacts-m1-catalyst-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-ios-macabi"
requires: [build-toolchain-m1-catalyst-xcode-<< matrix.xcode-version >>]
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
# ios-device
- build-toolchain:
name: build-toolchain-ios-device-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-ios"
matrix:
parameters:
xcode-version: [*default-xcode-version]
- build-artifacts:
name: build-artifacts-ios-device-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-ios"
requires: [build-toolchain-ios-device-xcode-<< matrix.xcode-version >>]
matrix:
parameters:
xcode-version: [*default-xcode-version]
# intel-catalyst
- build-toolchain:
name: build-toolchain-intel-catalyst-xcode-<< matrix.xcode-version >>
build-target: "x86_64-apple-ios-macabi"
matrix:
parameters:
xcode-version: [*default-xcode-version]
- build-artifacts:
name: build-artifacts-intel-catalyst-xcode-<< matrix.xcode-version >>
build-target: "x86_64-apple-ios-macabi"
requires: [build-toolchain-intel-catalyst-xcode-<< matrix.xcode-version >>]
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
# intel-ios-sim
- build-toolchain:
name: build-toolchain-intel-ios-sim-xcode-<< matrix.xcode-version >>
build-target: "x86_64-apple-ios"
matrix:
parameters:
xcode-version: [*default-xcode-version]
- build-artifacts:
name: build-artifacts-intel-ios-sim-xcode-<< matrix.xcode-version >>
build-target: "x86_64-apple-ios"
requires: [build-toolchain-intel-ios-sim-xcode-<< matrix.xcode-version >>]
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
# intel-macos
- build-toolchain:
name: build-toolchain-intel-macos-xcode-<< matrix.xcode-version >>
build-target: "x86_64-apple-darwin"
matrix:
parameters:
xcode-version: [*default-xcode-version]
- build-artifacts:
name: build-artifacts-intel-macos-xcode-<< matrix.xcode-version >>
build-target: "x86_64-apple-darwin"
requires: [build-toolchain-intel-macos-xcode-<< matrix.xcode-version >>]
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
# apple-silicon-macos
- build-artifacts:
name: build-artifacts-m1-macos-xcode-<< matrix.xcode-version >>
build-target: "aarch64-apple-darwin"
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
- copy-artifacts:
name: copy-artifacats
name: copy-artifacts-job
requires:
- build-artifacts-m1-ios-sim-xcode-<< matrix.xcode-version >>
- build-artifacts-m1-catalyst-xcode-<< matrix.xcode-version >>
- build-artifacts-ios-device-xcode-<< matrix.xcode-version >>
- build-artifacts-intel-catalyst-xcode-<< matrix.xcode-version >>
- build-artifacts-intel-ios-sim-xcode-<< matrix.xcode-version >>
- build-artifacts-intel-macos-xcode-<< matrix.xcode-version >>
- build-artifacts-m1-macos-xcode-<< matrix.xcode-version >>
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
- make-generate:
name: make-generate
requires:
- copy-artifacts
filters:
branches:
ignore:
- master
- /release\/.*/
- test-example-http-with-mobilecoin-swift:
name: test-example-http-with-mobilecoin-swift-<< matrix.xcode-version >>
@ -919,6 +956,11 @@ workflows:
matrix:
parameters:
xcode-version: [*default-xcode-version]
filters:
branches:
ignore:
- master
- /release\/.*/
- test-example-with-mobilecoin-swift:
name: test-example-with-mobilecoin-swift-<< matrix.xcode-version >>
@ -926,8 +968,17 @@ workflows:
- make-generate
matrix:
parameters:
xcode-version: [*default-xcode-version]
xcode-version: ["12.5.1"]
filters:
branches:
ignore:
- master
- /release\/.*/
- publish-pod-release:
filters:
branches: { only: master }
branches:
only:
- master
- /release\/.*/

7
.gitattributes vendored Normal file
View File

@ -0,0 +1,7 @@
Artifacts/bundle.zip filter=lfs diff=lfs merge=lfs -text
Artifacts/LibMobileCoinLibrary.xcframework filter=lfs diff=lfs merge=lfs -text
Artifacts/LibMobileCoinLibrary.xcframework/ios-arm64_x86_64-simulator/libmobilecoin_iossimulator.a filter=lfs diff=lfs merge=lfs -text
Artifacts/LibMobileCoinLibrary.xcframework/macos-arm64_x86_64/libmobilecoin_macos.a filter=lfs diff=lfs merge=lfs -text
Artifacts/LibMobileCoinLibrary.xcframework/macos-arm64_x86_64/libmobilecoin_macos.a filter=lfs diff=lfs merge=lfs -text
Artifacts/LibMobileCoinLibrary.xcframework/ios-arm64_x86_64-simulator/libmobilecoin_iossimulator.a filter=lfs diff=lfs merge=lfs -text
**/*.a filter=lfs diff=lfs merge=lfs -text

10
.gitignore vendored
View File

@ -1,3 +1,12 @@
# Rust
# Generated by Cargo
# will have compiled files and executables
/target/
**/target/
/cargo/
**/cargo/
**/cmake-build-debug/
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
@ -75,3 +84,4 @@ iOSInjectionProject/
# Bundler
.bundle/
.vendor/
.DS_Store

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "Vendor/mobilecoin"]
path = Vendor/mobilecoin
url = https://github.com/mobilecoinfoundation/mobilecoin.git
[submodule "Artifacts"]
path = Artifacts
url = https://github.com/signalapp/libmobilecoin-apple-artifacts.git

1
Artifacts Submodule

@ -0,0 +1 @@
Subproject commit 223aeac316addcae8abcc5398b347123d16c2fce

View File

@ -1,540 +0,0 @@
// Copyright (c) 2018-2022 The MobileCoin Foundation
#ifndef TRANSACTION_H_
#define TRANSACTION_H_
#include "common.h"
#include "fog.h"
#include "keys.h"
/* ==================== Transaction ==================== */
#ifdef __cplusplus
extern "C" {
#endif
/* ==== Types ==== */
typedef struct {
uint64_t masked_value;
const McBuffer* MC_NONNULL masked_token_id;
} McTxOutMaskedAmount;
typedef struct {
uint64_t value;
uint64_t token_id;
} McTxOutAmount;
typedef struct _McTransactionBuilderRing McTransactionBuilderRing;
typedef struct _McTransactionBuilder McTransactionBuilder;
typedef struct _McTxOutMemoBuilder McTxOutMemoBuilder;
/* ==== TxOut ==== */
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `tx_out_public_key` - must be a valid 32-byte Ristretto-format scalar.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
/// * `LibMcError::TransactionCrypto`
bool mc_tx_out_get_shared_secret(
const McBuffer* MC_NONNULL view_private_key,
const McBuffer* MC_NONNULL tx_out_public_key,
McMutableBuffer* MC_NONNULL out_shared_secret,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3);
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
/// * `LibMcError::TransactionCrypto`
bool mc_tx_out_reconstruct_commitment(
const McTxOutMaskedAmount* MC_NONNULL tx_out_masked_amount,
const McBuffer* MC_NONNULL tx_out_public_key,
const McBuffer* MC_NONNULL view_private_key,
McMutableBuffer* MC_NONNULL out_commitment,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4);
/// # Preconditions
///
/// * `tx_out_commitment` - must be a valid CompressedCommitment
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_tx_out_commitment_crc32(
const McBuffer* MC_NONNULL tx_out_commitment,
uint32_t* MC_NONNULL out_crc32,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `subaddress_spend_private_key` - must be a valid 32-byte Ristretto-format scalar.
bool mc_tx_out_matches_subaddress(
const McBuffer* MC_NONNULL tx_out_target_key,
const McBuffer* MC_NONNULL tx_out_public_key,
const McBuffer* MC_NONNULL view_private_key,
const McBuffer* MC_NONNULL subaddress_spend_private_key,
bool* MC_NONNULL out_matches
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4, 5);
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `out_subaddress_spend_public_key` - length must be >= 32.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_tx_out_get_subaddress_spend_public_key(
const McBuffer* MC_NONNULL tx_out_target_key,
const McBuffer* MC_NONNULL tx_out_public_key,
const McBuffer* MC_NONNULL view_private_key,
McMutableBuffer* MC_NONNULL out_subaddress_spend_public_key,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4);
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
/// * `LibMcError::TransactionCrypto`
bool mc_tx_out_get_amount(
const McTxOutMaskedAmount* MC_NONNULL tx_out_masked_amount,
const McBuffer* MC_NONNULL tx_out_public_key,
const McBuffer* MC_NONNULL view_private_key,
McTxOutAmount* MC_NONNULL out_amount,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4);
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `subaddress_spend_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `out_key_image` - length must be >= 32.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
/// * `LibMcError::TransactionCrypto`
bool mc_tx_out_get_key_image(
const McBuffer* MC_NONNULL tx_out_target_key,
const McBuffer* MC_NONNULL tx_out_public_key,
const McBuffer* MC_NONNULL view_private_key,
const McBuffer* MC_NONNULL subaddress_spend_private_key,
McMutableBuffer* MC_NONNULL out_key_image,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4, 5);
/// # Preconditions
///
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
bool mc_tx_out_validate_confirmation_number(
const McBuffer* MC_NONNULL tx_out_public_key,
const McBuffer* MC_NONNULL tx_out_confirmation_number,
const McBuffer* MC_NONNULL view_private_key,
bool* MC_NONNULL out_valid
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4);
/* ==== McTransactionBuilderRing ==== */
McTransactionBuilderRing* MC_NULLABLE mc_transaction_builder_ring_create();
void mc_transaction_builder_ring_free(
McTransactionBuilderRing* MC_NULLABLE transaction_builder_ring
);
/// # Preconditions
///
/// * `tx_out_proto_bytes` - must be a valid binary-serialized `external.TxOut` Protobuf.
/// * `membership_proof_proto_bytes` - must be a valid binary-serialized
/// `external.TxOutMembershipProof` Protobuf.
bool mc_transaction_builder_ring_add_element(
McTransactionBuilderRing* MC_NONNULL transaction_builder_ring,
const McBuffer* MC_NONNULL tx_out_proto_bytes,
const McBuffer* MC_NONNULL membership_proof_proto_bytes
)
MC_ATTRIBUTE_NONNULL(1, 2, 3);
/* ==== McTransactionBuilder ==== */
McTransactionBuilder* MC_NULLABLE mc_transaction_builder_create(
uint64_t fee,
uint64_t token_id,
uint64_t tombstone_block,
const McFogResolver* MC_NULLABLE fog_resolver,
McTxOutMemoBuilder* MC_NONNULL memo_builder,
uint32_t block_version
)
MC_ATTRIBUTE_NONNULL(5);
void mc_transaction_builder_free(
McTransactionBuilder* MC_NULLABLE transaction_builder
);
/// # Preconditions
///
/// * `transaction_builder` - must not have been previously consumed by a call to `build`.
/// * `view_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `subaddress_spend_private_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `real_index` - must be within bounds of `ring`.
/// * `ring` - `TxOut` at `real_index` must be owned by account keys.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_transaction_builder_add_input(
McTransactionBuilder* MC_NONNULL transaction_builder,
const McBuffer* MC_NONNULL view_private_key,
const McBuffer* MC_NONNULL subaddress_spend_private_key,
size_t real_index,
const McTransactionBuilderRing* MC_NONNULL ring,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 5);
/// # Preconditions
///
/// * `transaction_builder` - must not have been previously consumed by a call to `build`.
/// * `recipient_address` - must be a valid `PublicAddress`.
/// * `out_subaddress_spend_public_key` - length must be >= 32.
///
/// # Errors
///
/// * `LibMcError::AttestationVerification`
/// * `LibMcError::InvalidInput`
McData* MC_NULLABLE mc_transaction_builder_add_output(
McTransactionBuilder* MC_NONNULL transaction_builder,
uint64_t amount,
const McPublicAddress* MC_NONNULL recipient_address,
McRngCallback* MC_NULLABLE rng_callback,
McMutableBuffer* MC_NONNULL out_tx_out_confirmation_number,
McMutableBuffer* MC_NONNULL out_tx_out_shared_secret,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 3, 5, 6);
/// # Preconditions
///
/// * `account_kay` - must be a valid account key, default change address computed from account key
/// * `transaction_builder` - must not have been previously consumed by a call
/// to `build`.
/// * `out_tx_out_confirmation_number` - length must be >= 32.
///
/// # Errors
///
/// * `LibMcError::AttestationVerification`
/// * `LibMcError::InvalidInput`
McData* MC_NULLABLE mc_transaction_builder_add_change_output(
const McAccountKey* MC_NONNULL account_key,
McTransactionBuilder* MC_NONNULL transaction_builder,
uint64_t amount,
McRngCallback* MC_NULLABLE rng_callback,
McMutableBuffer* MC_NONNULL out_tx_out_confirmation_number,
McMutableBuffer* MC_NONNULL out_tx_out_shared_secret,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 4, 6);
/// # Preconditions
///
/// * `transaction_builder` - must not have been previously consumed by a call to `build`.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
McData* MC_NULLABLE mc_transaction_builder_build(
McTransactionBuilder* MC_NONNULL transaction_builder,
McRngCallback* MC_NULLABLE rng_callback,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1);
/// # Preconditions
///
/// * `account_key` - must be a valid `AccountKey` with `fog_info`.
McTxOutMemoBuilder* MC_NULLABLE mc_memo_builder_sender_and_destination_create(
const McAccountKey* MC_NONNULL account_key)
MC_ATTRIBUTE_NONNULL(1);
/// # Preconditions
///
/// * `account_key` - must be a valid `AccountKey` with `fog_info`.
McTxOutMemoBuilder* MC_NULLABLE mc_memo_builder_sender_payment_request_and_destination_create(
uint64_t payment_request_id,
const McAccountKey* MC_NONNULL account_key
)
MC_ATTRIBUTE_NONNULL(2);
McTxOutMemoBuilder* MC_NULLABLE mc_memo_builder_default_create();
void mc_memo_builder_free(
McTxOutMemoBuilder* MC_NULLABLE memo_builder
);
/* ==== SenderMemo ==== */
/// # Preconditions
///
/// * `sender_memo_data` - must be 64 bytes
/// * `sender_public_address` - must be a valid `PublicAddress`.
/// * `receiving_subaddress_view_private_key` - must be a valid
/// 32-byte Ristretto-format scalar.
/// * `tx_out_public_key` - must be a valid 32-byte Ristretto-format scalar.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_memo_is_valid(
const McBuffer* MC_NONNULL sender_memo_data,
const McPublicAddress* MC_NONNULL sender_public_address,
const McBuffer* MC_NONNULL receiving_subaddress_view_private_key,
const McBuffer* MC_NONNULL tx_out_public_key,
bool* MC_NONNULL out_valid,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4, 5);
/// # Preconditions
///
/// * `sender_account_key` - must be a valid account key
/// * `recipient_subaddress_view_public_key` - must be a valid
/// 32-byte Ristretto-format scalar.
/// * `tx_out_public_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `out_memo_data` - length must be >= 64.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_memo_create(
const McAccountKey* MC_NONNULL sender_account_key,
const McBuffer* MC_NONNULL recipient_subaddress_view_public_key,
const McBuffer* MC_NONNULL tx_out_public_key,
McMutableBuffer* MC_NONNULL out_memo_data,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4);
/// # Preconditions
///
/// * `sender_memo_data` - must be 64 bytes
/// * `out_short_address_hash` - length must be >= 16 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_memo_get_address_hash(
const McBuffer* MC_NONNULL sender_memo_data,
McMutableBuffer* MC_NONNULL out_short_address_hash,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/* ==== DestinationMemo ==== */
/// # Preconditions
///
/// * `destination_public_address` - must be a valid 32-byte
/// Ristretto-format scalar.
/// * `number_of_recipients` - must be > 0
/// * `out_memo_data` - length must be >= 64.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_destination_memo_create(
const McPublicAddress* MC_NONNULL destination_public_address,
uint8_t number_of_recipients,
uint64_t fee,
uint64_t total_outlay,
McMutableBuffer* MC_NONNULL out_memo_data,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 5);
/// # Preconditions
///
/// * `destination_memo_data` - must be 64 bytes
/// * `out_short_address_hash` - length must be >= 16 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_destination_memo_get_address_hash(
const McBuffer* MC_NONNULL destination_memo_data,
McMutableBuffer* MC_NONNULL out_short_address_hash,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/// # Preconditions
///
/// * `destination_memo_data` - must be 64 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_destination_memo_get_number_of_recipients(
const McBuffer* MC_NONNULL destination_memo_data,
uint8_t* MC_NONNULL out_number_of_recipients,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/// # Preconditions
///
/// * `destination_memo_data` - must be 64 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_destination_memo_get_fee(
const McBuffer* MC_NONNULL destination_memo_data,
uint64_t* MC_NONNULL out_fee,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/// # Preconditions
///
/// * `destination_memo_data` - must be 64 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_destination_memo_get_total_outlay(
const McBuffer* MC_NONNULL destination_memo_data,
uint64_t* MC_NONNULL out_total_outlay,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/* ==== SenderWithPaymentRequestMemo ==== */
/// # Preconditions
///
/// * `sender_with_payment_request_memo_data` - must be 64 bytes
/// * `sender_public_address` - must be a valid `PublicAddress`.
/// * `receiving_subaddress_view_private_key` - must be a valid
/// 32-byte Ristretto-format scalar.
/// * `tx_out_public_key` - must be a valid 32-byte Ristretto-format scalar.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_with_payment_request_memo_is_valid(
const McBuffer* MC_NONNULL sender_with_payment_request_memo_data,
const McPublicAddress* MC_NONNULL sender_public_address,
const McBuffer* MC_NONNULL receiving_subaddress_view_private_key,
const McBuffer* MC_NONNULL tx_out_public_key,
bool* MC_NONNULL out_valid,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4, 5);
/// # Preconditions
///
/// * `sender_account_key` - must be a valid account key
/// * `recipient_subaddress_view_public_key` - must be a valid
/// 32-byte Ristretto-format scalar.
/// * `tx_out_public_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `out_memo_data` - length must be >= 64.
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_with_payment_request_memo_create(
const McAccountKey* MC_NONNULL sender_account_key,
const McBuffer* MC_NONNULL recipient_subaddress_view_public_key,
const McBuffer* MC_NONNULL tx_out_public_key,
uint64_t payment_request_id,
McMutableBuffer* MC_NONNULL out_memo_data,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 5);
/// # Preconditions
///
/// * `sender_with_payment_request_memo_data` - must be 64 bytes
/// * `out_short_address_hash` - length must be >= 16 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_with_payment_request_memo_get_address_hash(
const McBuffer* MC_NONNULL sender_with_payment_request_memo_data,
McMutableBuffer* MC_NONNULL out_short_address_hash,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/// # Preconditions
///
/// * `sender_with_payment_request_memo_data` - must be 64 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_sender_with_payment_request_memo_get_payment_request_id(
const McBuffer* MC_NONNULL sender_with_payment_request_memo_data,
uint64_t* MC_NONNULL out_payment_request_id,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2);
/* ==== Decrypt Memo Payload ==== */
/// # Preconditions
///
/// * `encrypted_memo` - must be 66 bytes
/// * `tx_out_public_key` - must be a valid 32-byte Ristretto-format scalar.
/// * `account_key` - must be a valid account key
/// * `out_memo_payload` - length must be >= 16 bytes
///
/// # Errors
///
/// * `LibMcError::InvalidInput`
bool mc_memo_decrypt_e_memo_payload(
const McBuffer* MC_NONNULL encrypted_memo,
const McBuffer* MC_NONNULL tx_out_public_key,
const McAccountKey* MC_NONNULL account_key,
McMutableBuffer* MC_NONNULL out_memo_data,
McError* MC_NULLABLE * MC_NULLABLE out_error
)
MC_ATTRIBUTE_NONNULL(1, 2, 3, 4);
#ifdef __cplusplus
}
#endif
#endif /* !TRANSACTION_H_ */

2
Brewfile Normal file
View File

@ -0,0 +1,2 @@
brew "cbindgen"
brew "git-lfs"

View File

@ -8,10 +8,14 @@ ARG grpc_swift_version
WORKDIR /root
RUN git clone --depth 1 -b $grpc_swift_version https://github.com/grpc/grpc-swift.git
RUN git clone --depth 1 https://github.com/mobilecoinofficial/protoc-gen-http-swift.git
WORKDIR grpc-swift
RUN make plugins
WORKDIR /root
WORKDIR protoc-gen-http-swift
RUN make plugins
FROM swift:focal as build
@ -24,14 +28,17 @@ RUN apt-get -q update && apt-get -q install -y --no-install-recommends \
COPY --from=plugins \
/root/grpc-swift/protoc-gen-grpc-swift \
/root/grpc-swift/protoc-gen-swift \
/root/grpc-swift-plugins/bin/
ENV PATH="/root/grpc-swift-plugins/bin:${PATH}"
/root/protoc-gen-http-swift/protoc-gen-http-swift \
/root/swift-plugins/bin/
ENV PATH="/root/swift-plugins/bin:${PATH}"
WORKDIR /root/project
COPY Vendor/mobilecoin/api/proto/blockchain.proto \
Vendor/mobilecoin/api/proto/external.proto \
Vendor/mobilecoin/api/proto/printable.proto \
Vendor/mobilecoin/api/proto/quorum_set.proto \
Vendor/mobilecoin/api/proto/watcher.proto \
Vendor/mobilecoin/api/proto/
COPY Vendor/mobilecoin/attest/api/proto/attest.proto \
@ -46,22 +53,33 @@ COPY Vendor/mobilecoin/fog/api/proto/fog_common.proto \
Vendor/mobilecoin/fog/api/proto/kex_rng.proto \
Vendor/mobilecoin/fog/api/proto/ledger.proto \
Vendor/mobilecoin/fog/api/proto/view.proto \
libmobilecoin/legacy/legacyview.proto \
Vendor/mobilecoin/fog/api/proto/
RUN mkdir -p Sources/Generated/Proto
RUN mkdir -p Sources/GRPC
RUN mkdir -p Sources/Common
COPY Vendor/misty-swap/api/proto/mistyswap_offramp.proto \
Vendor/misty-swap/api/proto/mistyswap_onramp.proto \
Vendor/misty-swap/api/proto/mistyswap_common.proto \
Vendor/misty-swap/api/proto/
RUN protoc \
--swift_out=Sources/Generated/Proto \
--swift_out=Sources/Common \
--swift_opt=Visibility=Public \
--grpc-swift_out=Sources/Generated/Proto \
--grpc-swift_out=Sources/GRPC \
--grpc-swift_opt=Client=true,Server=false,Visibility=Public \
--grpc-swift_opt=ExtraModuleImports=LibMobileCoinCommon \
-IVendor/mobilecoin/api/proto \
-IVendor/mobilecoin/attest/api/proto \
-IVendor/mobilecoin/consensus/api/proto \
-IVendor/mobilecoin/fog/api/proto \
-IVendor/mobilecoin/fog/report/api/proto \
-IVendor/misty-swap/api/proto \
external.proto \
blockchain.proto \
printable.proto \
quorum_set.proto \
watcher.proto \
attest.proto \
consensus_client.proto \
@ -71,11 +89,49 @@ RUN protoc \
fog_common.proto \
kex_rng.proto \
ledger.proto \
view.proto
mistyswap_offramp.proto \
mistyswap_onramp.proto \
mistyswap_common.proto \
view.proto \
legacyview.proto
WORKDIR /root/project
RUN cd Sources/GRPC && find . -name "*grpc.swift" | xargs -I {} sed -i'' -e 's/import LibMobileCoinCommon/\#if canImport(LibMobileCoinCommon)\nimport LibMobileCoinCommon\n#endif/' {} ;
WORKDIR /root/project
RUN mkdir -p Sources/HTTP
RUN protoc \
--plugin=/root/swift-plugins/bin/protoc-gen-http-swift \
--http-swift_out=Sources/HTTP \
--http-swift_opt=Client=true,Visibility=Public \
--http-swift_opt=ExtraModuleImports=LibMobileCoinCommon \
-IVendor/mobilecoin/api/proto \
-IVendor/mobilecoin/attest/api/proto \
-IVendor/mobilecoin/consensus/api/proto \
-IVendor/mobilecoin/fog/api/proto \
-IVendor/mobilecoin/fog/report/api/proto \
-IVendor/misty-swap/api/proto \
external.proto \
blockchain.proto \
printable.proto \
quorum_set.proto \
watcher.proto \
attest.proto \
consensus_client.proto \
consensus_common.proto \
consensus_config.proto \
report.proto \
fog_common.proto \
kex_rng.proto \
ledger.proto \
mistyswap_offramp.proto \
mistyswap_onramp.proto \
mistyswap_common.proto \
view.proto \
legacyview.proto
FROM scratch
COPY --from=build \
/root/project/Sources/Generated/Proto/ \
/Sources/Generated/Proto/
/root/project/Sources/ \
/Sources/

View File

@ -1,3 +1,7 @@
source 'https://rubygems.org' do
gem 'cocoapods'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods', :ref => 'ecb9a4d0bececbd76db72e4ca95c265bfbbc0bf4'
gem 'addressable', '2.8.1', :git => 'https://github.com/sporkmonger/addressable'
gem 'cocoapods-deintegrate', '~> 1.0', '>= 1.0.4'
gem 'rexml'
gem 'pkg-config'
end

View File

@ -1,96 +1,116 @@
GIT
remote: https://github.com/CocoaPods/CocoaPods
revision: ecb9a4d0bececbd76db72e4ca95c265bfbbc0bf4
ref: ecb9a4d0bececbd76db72e4ca95c265bfbbc0bf4
specs:
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
GIT
remote: https://github.com/sporkmonger/addressable
revision: 1fdd676753fb2f44c9d7e0953c97c3e6becfb36a
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
GEM
specs:
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
activesupport (5.2.4.5)
CFPropertyList (3.0.6)
rexml
activesupport (6.1.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.10.1)
addressable (~> 2.6)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.19.0, < 2.0)
cocoapods-core (1.10.1)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
claide (1.1.0)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-trunk (1.5.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.8)
concurrent-ruby (1.2.0)
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
ffi (1.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.9)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.14.4)
molinillo (0.6.6)
json (2.6.3)
minitest (5.17.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
ruby-macho (1.4.0)
thread_safe (0.3.6)
pkg-config (1.5.1)
public_suffix (4.0.7)
rexml (3.2.5)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
xcodeproj (1.19.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.6)
PLATFORMS
ruby
DEPENDENCIES
addressable (= 2.8.1)!
cocoapods!
cocoapods-deintegrate (~> 1.0, >= 1.0.4)!
pkg-config!
rexml!
BUNDLED WITH
2.2.24
2.3.15

View File

@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "LibMobileCoin"
s.version = "1.2.2"
s.version = "6.0.2"
s.summary = "A library for communicating with MobileCoin network"
s.author = "MobileCoin"
@ -11,14 +11,14 @@ Pod::Spec.new do |s|
s.license = { :type => "GPLv3" }
s.source = {
:git => "https://github.com/mobilecoinofficial/libmobilecoin-ios-artifacts.git",
:git => "https://github.com/mobilecoinofficial/libmobilecoin.git",
:tag => "v#{s.version}",
:submodules => true
}
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.platform = :ios, "10.0"
s.platform = :ios, "11.0"
# ――― Subspecs ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@ -26,23 +26,30 @@ Pod::Spec.new do |s|
s.default_subspecs = "Core"
s.subspec "TestVectors" do |subspec|
subspec.source_files = "Sources/TestVector/**/*.swift"
subspec.source_files = [
"Sources/TestVector/Util/Bundle+TestVector.swift",
"Sources/TestVector/Util/TestVectorError.swift"
]
subspec.preserve_paths = [
'Artifacts/**/libmobilecoin.a',
'Artifacts/target/**/libmobilecoin.a',
]
subspec.resources = [
"Vendor/mobilecoin/test-vectors/vectors/**/*.*",
"Sources/TestVector/vectors/*.*",
]
end
s.subspec "Core" do |subspec|
subspec.preserve_paths = [
'Artifacts/**/libmobilecoin.a',
'Artifacts/target/**/libmobilecoin.a',
]
subspec.source_files = [
"Artifacts/include/*.h",
"Sources/Generated/Proto/*.{grpc,pb}.swift",
"Sources/HTTP/*.{http}.swift",
"Sources/HTTP/Interface/*.swift",
"Sources/GRPC/*.{grpc}.swift",
"Sources/Common/*.{pb}.swift",
]
subspec.dependency "gRPC-Swift"
@ -51,17 +58,34 @@ Pod::Spec.new do |s|
s.subspec "CoreHTTP" do |subspec|
subspec.preserve_paths = [
'Artifacts/**/libmobilecoin.a',
'Artifacts/target/**/libmobilecoin.a',
]
subspec.source_files = [
"Artifacts/include/*.h",
"Sources/Generated/Proto/*.pb.swift",
"Sources/HTTP/*.{http}.swift",
"Sources/HTTP/Interface/*.swift",
"Sources/Common/*.{pb}.swift",
]
subspec.dependency "SwiftProtobuf", "~> 1.5"
end
s.subspec "CoreGRPC" do |subspec|
subspec.preserve_paths = [
'Artifacts/target/**/libmobilecoin.a',
]
subspec.source_files = [
"Artifacts/include/*.h",
"Sources/GRPC/*.{grpc}.swift",
"Sources/Common/*.{pb}.swift",
]
subspec.dependency "gRPC-Swift"
subspec.dependency "SwiftProtobuf", "~> 1.5"
end
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.swift_version = "5.2"
@ -74,7 +98,7 @@ Pod::Spec.new do |s|
"ENABLE_BITCODE" => "YES",
# Mac Catalyst is not supported since tjis library includes a vendored binary
# that only includes support for iOS archictures.
"SUPPORTS_MACCATALYST" => "YES",
"SUPPORTS_MACCATALYST" => "NO",
# The vendored binary doesn't include support for 32-bit architectures or arm64
# for iphonesimulator. This must be manually configured to avoid Xcode's default
# setting of building 32-bit and Xcode 12's default setting of including the
@ -84,18 +108,13 @@ Pod::Spec.new do |s|
"SWIFT_INCLUDE_PATHS": "$(HEADER_SEARCH_PATHS)",
"LIBMOBILECOIN_LIB_IF_NEEDED": "$(PODS_TARGET_SRCROOT)/Artifacts/target/$(CARGO_BUILD_TARGET)/release/libmobilecoin.a",
"OTHER_LDFLAGS": "-u _mc_string_free $(LIBMOBILECOIN_LIB_IF_NEEDED)",
"OTHER_LDFLAGS": "-lz -u _mc_string_free $(LIBMOBILECOIN_LIB_IF_NEEDED)",
"CARGO_BUILD_TARGET[sdk=iphonesimulator*][arch=arm64]": "aarch64-apple-ios-sim",
"CARGO_BUILD_TARGET[sdk=iphonesimulator*][arch=*]": "x86_64-apple-ios",
"CARGO_BUILD_TARGET[sdk=iphoneos*]": "aarch64-apple-ios",
"CARGO_BUILD_TARGET_MAC_CATALYST_ARM_": "aarch64-apple-darwin",
"CARGO_BUILD_TARGET_MAC_CATALYST_ARM_YES": "aarch64-apple-ios-macabi",
"CARGO_BUILD_TARGET[sdk=macosx*][arch=arm64]": "$(CARGO_BUILD_TARGET_MAC_CATALYST_ARM_$(IS_MACCATALYST))",
"CARGO_BUILD_TARGET_MAC_CATALYST_X86_": "x86_64-apple-darwin",
"CARGO_BUILD_TARGET_MAC_CATALYST_X86_YES": "x86_64-apple-ios-macabi",
"CARGO_BUILD_TARGET[sdk=macosx*][arch=*]": "$(CARGO_BUILD_TARGET_MAC_CATALYST_X86_$(IS_MACCATALYST))",
"CARGO_BUILD_TARGET[sdk=macosx*][arch=arm64]": "aarch64-apple-darwin",
"CARGO_BUILD_TARGET[sdk=macosx*][arch=*]": "x86_64-apple-darwin",
"VALID_ARCHS[sdk=iphoneos*]" => "arm64",
"VALID_ARCHS[sdk=iphonesimulator*]" => "x86_64 arm64",
@ -108,7 +127,7 @@ Pod::Spec.new do |s|
# `user_target_xcconfig` should only be set when the setting needs to propogate to
# all targets that depend on this library.
s.user_target_xcconfig = {
"SUPPORTS_MACCATALYST" => "YES",
"SUPPORTS_MACCATALYST" => "NO",
"EXCLUDED_ARCHS[sdk=iphoneos*]" => "armv7",
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" => "i386",
"VALID_ARCHS[sdk=iphoneos*]" => "arm64",

9
LibMobileCoinExample/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,95 @@
{
"pins" : [
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/grpc/grpc-swift.git",
"state" : {
"revision" : "130467153ff0acd642d2f098b69c1ac33373b24e",
"version" : "1.15.0"
}
},
{
"identity" : "swift-atomics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-atomics.git",
"state" : {
"revision" : "6c89474e62719ddcc1e9614989fff2f68208fe10",
"version" : "1.1.0"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "937e904258d22af6e447a0b72c0bc67583ef64a2",
"version" : "1.0.4"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "32e8d724467f8fe623624570367e3d50c5638e46",
"version" : "1.5.2"
}
},
{
"identity" : "swift-nio",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "f7c46552983b06b0958a1a4c8bc5199406ae4c8a",
"version" : "2.51.0"
}
},
{
"identity" : "swift-nio-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-extras.git",
"state" : {
"revision" : "0e0d0aab665ff1a0659ce75ac003081f2b1c8997",
"version" : "1.19.0"
}
},
{
"identity" : "swift-nio-http2",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-http2.git",
"state" : {
"revision" : "6d021a48483dbb273a9be43f65234bdc9185b364",
"version" : "1.26.0"
}
},
{
"identity" : "swift-nio-ssl",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-ssl.git",
"state" : {
"revision" : "9d0d5d8798a576fbf674a823734e65e15ca5f2ec",
"version" : "2.23.1"
}
},
{
"identity" : "swift-nio-transport-services",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-transport-services.git",
"state" : {
"revision" : "59b966415dd336db6f388bbfe3fb43cfa549b981",
"version" : "1.16.0"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf",
"state" : {
"revision" : "0af9125c4eae12a4973fb66574c53a54962a9e1e",
"version" : "1.21.0"
}
}
],
"version" : 2
}

View File

@ -0,0 +1,33 @@
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "LibMobileCoinExample",
platforms: [
.macOS(.v11),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "LibMobileCoinExample",
targets: ["LibMobileCoinExample"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(path: "../"),
],
targets: [
// 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.
.target(
name: "LibMobileCoinExample",
dependencies: [
.product(name: "LibMobileCoinCore", package: "libmobilecoin"),
]),
.testTarget(
name: "LibMobileCoinExampleTests",
dependencies: ["LibMobileCoinExample"]),
]
)

View File

@ -0,0 +1,3 @@
# LibMobileCoinExample
A description of this package.

View File

@ -0,0 +1,6 @@
public struct LibMobileCoinExample {
public private(set) var text = "Hello, World!"
public init() {
}
}

View File

@ -0,0 +1,66 @@
//
// GRPCClientImports.swift
//
//
// Created by Adam Mork on 4/26/23.
//
import XCTest
import LibMobileCoinGRPC
import LibMobileCoinCommon
import GRPC
///
/// Importing one class from each file to ensure proper SPM packaging.
/// Testing one file would likely give the same signal but doing one
/// from each for completeness
///
final class GRPCClientImports: XCTestCase {
func testAttestClient() throws {
let client = Attest_AttestedApiClient(channel: .testChannel)
XCTAssertNotNil(client)
}
func testConsensusClient() throws {
let client = ConsensusClient_ConsensusClientAPIClient(channel: .testChannel)
XCTAssertNotNil(client)
}
func testConsensusCommon() throws {
let client = ConsensusCommon_BlockchainAPIClient(channel: .testChannel)
XCTAssertNotNil(client)
}
func testLedgerClient() throws {
let client = FogLedger_FogMerkleProofAPIClient(channel: .testChannel)
XCTAssertNotNil(client)
}
func testReportClient() throws {
let client = Report_ReportAPIClient(channel: .testChannel)
XCTAssertNotNil(client)
}
func testFogViewClient() throws {
let client = FogView_FogViewAPIClient(channel: .testChannel)
XCTAssertNotNil(client)
}
}
struct GrpcChannelConfig {
let host: String
let port: Int
static var testConfig: GrpcChannelConfig {
GrpcChannelConfig(host: "localhost", port: 4000)
}
}
extension GRPCChannel where Self == ClientConnection {
static var testChannel: ClientConnection {
let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)
let builder = ClientConnection.insecure(group: group)
let config = GrpcChannelConfig.testConfig
return builder.connect(host: config.host, port: config.port)
}
}

View File

@ -0,0 +1,45 @@
//
// HTTPClientImports.swift
//
//
// Created by Adam Mork on 4/26/23.
//
import XCTest
import LibMobileCoinHTTP
import LibMobileCoinCommon
///
/// Importing one class from each file to ensure proper SPM packaging.
///
final class HTTPClientImports: XCTestCase {
func testAttestRestClient() throws {
let client = Attest_AttestedApiRestClient()
XCTAssertNotNil(client)
}
func testConsensusRestClient() throws {
let client = ConsensusClient_ConsensusClientAPIRestClient()
XCTAssertNotNil(client)
}
func testConsensusCommon() throws {
let client = ConsensusCommon_BlockchainAPIRestClient()
XCTAssertNotNil(client)
}
func testLedgerRestClient() throws {
let client = FogLedger_FogMerkleProofAPIRestClient()
XCTAssertNotNil(client)
}
func testReportRestClient() throws {
let client = Report_ReportAPIRestClient()
XCTAssertNotNil(client)
}
func testFogViewRestClient() throws {
let client = FogView_FogViewAPIRestClient()
XCTAssertNotNil(client)
}
}

View File

@ -0,0 +1,91 @@
//
// ProtobufImports.swift
//
//
// Created by Adam Mork on 4/24/23.
//
import XCTest
import LibMobileCoinCommon
///
/// Importing one class from each file to ensure proper SPM packaging.
/// Testing one file would likely give the same signal but doing one
/// from each for completeness
///
final class ProtobufImports: XCTestCase {
func testAttest() throws {
let proto = Attest_AuthMessage()
XCTAssertNotNil(proto)
}
func testBlockchain() throws {
let proto = Blockchain_BlockID()
XCTAssertNotNil(proto)
}
func testConsensusClient() throws {
let proto = ConsensusClient_MintValidationResult()
XCTAssertNotNil(proto)
}
func testConsensusCommon() throws {
let proto = ConsensusCommon_LastBlockInfoResponse()
XCTAssertNotNil(proto)
}
func testConsensusConfig() throws {
let proto = ConsensusConfig_ActiveMintConfig()
XCTAssertNotNil(proto)
}
func testExternal() throws {
let proto = External_RistrettoPrivate()
XCTAssertNotNil(proto)
}
func testFogCommon() throws {
let proto = FogCommon_BlockRange()
XCTAssertNotNil(proto)
}
func testKexRNG() throws {
let proto = KexRng_KexRngPubkey()
XCTAssertNotNil(proto)
}
func testLedger() throws {
let proto = FogLedger_GetOutputsRequest()
XCTAssertNotNil(proto)
}
func testLegacyView() throws {
let proto = FogView_TxOutRecordLegacy()
XCTAssertNotNil(proto)
}
func testPrintable() throws {
let proto = Printable_PaymentRequest()
XCTAssertNotNil(proto)
}
func testQuorumSet() throws {
let proto = QuorumSet_Node()
XCTAssertNotNil(proto)
}
func testReport() throws {
let proto = Report_ReportRequest()
XCTAssertNotNil(proto)
}
func testView() throws {
let proto = FogView_QueryRequestAAD()
XCTAssertNotNil(proto)
}
func testWatcher() throws {
let proto = Watcher_TimestampResultCode.blockIndexOutOfBounds
XCTAssertNotNil(proto)
}
}

View File

@ -0,0 +1,176 @@
//
// StaticLibraryAPI.swift
//
//
// Created by Adam Mork on 4/26/23.
//
import XCTest
import LibMobileCoin
///
/// Testing one function from each rust file to make sure they're all available in the
/// static library. Some data is invalid and will throw errors, thats ok.
///
final class StaticLibraryAPI: XCTestCase {
func testAttestHeader() throws {
let data = Data()
let _ = data.asMcBuffer({ ptr in
mc_mr_enclave_verifier_create(ptr)
})
XCTAssertTrue(true)
}
func testBip39Header() throws {
let data = Data()
let _ = data.asMcBuffer({ ptr in
mc_bip39_mnemonic_from_entropy(ptr)
})
XCTAssertTrue(true)
}
func testChaCha20Header() throws {
let value = UInt64(0)
var error: UnsafeMutablePointer<McError>?
mc_chacha20_rng_create_with_long(value, &error)
XCTAssertTrue(true)
}
func testCryptoHeader() throws {
let data = Data()
var bool = true
let _ = data.asMcBuffer({ ptr in
mc_ristretto_private_validate(ptr, &bool)
})
XCTAssertTrue(true)
}
func testEncodingsHeader() throws {
let data = Data()
let _ = data.asMcBuffer({ ptr in
mc_printable_wrapper_b58_encode(ptr)
})
XCTAssertTrue(true)
}
func testFogHeader() throws {
let ptr = OpaquePointer(bitPattern: 1)!
let data = Data()
var error: UnsafeMutablePointer<McError>?
let _ = data.asMcBuffer({ reportResponsePtr in
mc_fog_resolver_add_report_response(
ptr,
"reportUrl.url.absoluteString",
reportResponsePtr,
&error)
})
XCTAssertTrue(true)
}
func testKeysHeader() throws {
let viewPrivateKey = Data()
let spendPrivateKey = Data()
let subaddressIndex = UInt64(0)
var subaddressViewPrivateKeyOut = Data()
var subaddressSpendPrivateKeyOut = Data()
let _ = viewPrivateKey.asMcBuffer { viewKeyBufferPtr in
spendPrivateKey.asMcBuffer { spendKeyBufferPtr in
subaddressViewPrivateKeyOut.asMcMutableBuffer { viewPrivateKeyOutPtr in
subaddressSpendPrivateKeyOut.asMcMutableBuffer { spendPrivateKeyOutPtr in
mc_account_key_get_subaddress_private_keys(
viewKeyBufferPtr,
spendKeyBufferPtr,
subaddressIndex,
viewPrivateKeyOutPtr,
spendPrivateKeyOutPtr)
}
}
}
}
XCTAssertTrue(true)
}
func testSCIHeader() throws {
let sci = Data()
var errorPtr: UnsafeMutablePointer<McError>?
let _ = sci.asMcBuffer { sciPtr in
mc_signed_contingent_input_data_is_valid(
sciPtr,
&errorPtr
)
}
XCTAssertTrue(true)
}
func testSlip10Header() throws {
let accountIndex = UInt32(0)
var viewPrivateKeyOut = Data()
var spendPrivateKeyOut = Data()
var errorPtr: UnsafeMutablePointer<McError>?
let _ = viewPrivateKeyOut.asMcMutableBuffer { viewPrivateKeyOutPtr in
spendPrivateKeyOut.asMcMutableBuffer { spendPrivateKeyOutPtr in
mc_slip10_account_private_keys_from_mnemonic(
"mnemonic.phrase",
accountIndex,
viewPrivateKeyOutPtr,
spendPrivateKeyOutPtr,
&errorPtr)
}
}
XCTAssertTrue(true)
}
func testTransactionHeader() throws {
let publicKey = Data()
let viewPrivateKey = Data()
var buffer = Data()
var errorPtr: UnsafeMutablePointer<McError>?
let _ = publicKey.asMcBuffer { publicKeyBufferPtr in
viewPrivateKey.asMcBuffer { viewPrivateKeyPtr in
buffer.asMcMutableBuffer { bufferPtr in
mc_tx_out_get_shared_secret(
viewPrivateKeyPtr,
publicKeyBufferPtr,
bufferPtr,
&errorPtr)
}
}
}
XCTAssertTrue(true)
}
}
extension Data {
func asMcBuffer<T>(_ body: (UnsafePointer<McBuffer>) throws -> T) rethrows -> T {
try self.withUnsafeBytes {
let ptr : UnsafeBufferPointer<UInt8> = $0.bindMemory(to: UInt8.self)
guard let bufferPtr = ptr.baseAddress else {
// This indicates a programming error. Pointer returned from withUnsafeBytes
// shouldn't have a nil baseAddress.
throw TestingError.unknown
}
var buffer = McBuffer(buffer: bufferPtr, len: ptr.count)
return try body(&buffer)
}
}
mutating func asMcMutableBuffer<T>(
_ body: (UnsafeMutablePointer<McMutableBuffer>) throws -> T
) rethrows -> T {
try withUnsafeMutableBytes {
let ptr : UnsafeMutableBufferPointer<UInt8> = $0.bindMemory(to: UInt8.self)
guard let bufferPtr = ptr.baseAddress else {
// This indicates a programming error. Pointer returned from withUnsafeMutableBytes
// shouldn't have a nil baseAddress.
throw TestingError.unknown
}
var buffer = McMutableBuffer(buffer: bufferPtr, len: ptr.count)
return try body(&buffer)
}
}
}
enum TestingError: Error {
case unknown
}

View File

@ -0,0 +1,108 @@
//
// TestVectorImports.swift
//
//
// Created by Adam Mork on 4/25/23.
//
import XCTest
import Foundation
import LibMobileCoinTestVector
///
/// Importing eact test-vector file to ensure proper SPM packaging.
/// Testing one file would likely give the same signal but doing all
/// for completeness
///
final class TestVectorImports: XCTestCase {
func testAcctPrivKeysFromBip39() throws {
let filename = "acct_priv_keys_from_bip39"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testAcctPrivKeysFromRootEntropy() throws {
let filename = "acct_priv_keys_from_root_entropy"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testb58EncodePublicAddressWithFog() throws {
let filename = "b58_encode_public_address_with_fog"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testb58EncodePublicAddressWithoutFog() throws {
let filename = "b58_encode_public_address_without_fog"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testCorrectEncryptedDestinationMemos() throws {
let filename = "correct_encrypted_destination_memos"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testCorrectEncryptedSenderMemos() throws {
let filename = "correct_encrypted_sender_memos"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testCorrectEncryptedSenderWithPaymentRequestIdMemos() throws {
let filename = "correct_encrypted_sender_with_payment_request_id_memos"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testCorrectTxOutRecords() throws {
let filename = "correct_tx_out_records"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testDefaultSubaddrKeysFromAcctPrivKeys() throws {
let filename = "default_subaddr_keys_from_acct_priv_keys"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testIncorrectEncryptedSenderMemos() throws {
let filename = "incorrect_encrypted_sender_memos"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testIncorrectEncryptedSenderWithPaymentRequestIdMemos() throws {
let filename = "incorrect_encrypted_sender_with_payment_request_id_memos"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testIncorrectTxOutRecords() throws {
let filename = "incorrect_tx_out_records"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
func testSubaddrKeysFromAcctPrivKeys() throws {
let filename = "subaddr_keys_from_acct_priv_keys"
let url = try Bundle.testVectorModuleUrl(filename)
let text = try String(contentsOf: url, encoding: .utf8)
XCTAssertNotNil(text)
}
}

112
Makefile
View File

@ -1,9 +1,11 @@
MOBILECOIN_DIR = Vendor/mobilecoin
LIBMOBILECOIN_LIB_DIR = $(MOBILECOIN_DIR)/libmobilecoin
LIBMOBILECOIN_LIB_DIR = libmobilecoin
LIBMOBILECOIN_ARTIFACTS_DIR = $(LIBMOBILECOIN_LIB_DIR)/out/ios
LIBMOBILECOIN_ARTIFACTS_HEADERS = $(LIBMOBILECOIN_LIB_DIR)/out/ios/include
ARTIFACTS_DIR = Artifacts
IOS_TARGETS = x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim aarch64-apple-ios-macabi x86_64-apple-ios-macabi
TEST_VECTOR_DIR = Sources/TestVector
IOS_TARGETS = aarch64-apple-ios-sim aarch64-apple-ios x86_64-apple-ios x86_64-apple-darwin aarch64-apple-darwin
LIBMOBILECOIN_PROFILE = mobile-release
define BINARY_copy
@ -13,12 +15,9 @@ endef
.PHONY: default
default: setup build clean-artifacts copy generate
.PHONY: legacy
legacy: setup build-legacy clean-artifacts copy-legacy generate
.PHONY: setup
setup:
cd "$(LIBMOBILECOIN_LIB_DIR)"
cd "$(LIBMOBILECOIN_LIB_DIR)" && $(MAKE) setup
bundle install
# Unexport conditional environment variables so the build is more predictable
@ -32,12 +31,12 @@ unexport CARGO_PROFILE
build:
cd "$(LIBMOBILECOIN_LIB_DIR)" && $(MAKE)
.PHONY: build-legacy
build-legacy:
cd "$(LIBMOBILECOIN_LIB_DIR)" && $(MAKE) legacy
.PHONY: framework
framework:
cd "$(LIBMOBILECOIN_LIB_DIR)" && $(MAKE) xcframework
.PHONY: clean-artifacts
copy-legacy:
clean-artifacts:
rm -r "$(ARTIFACTS_DIR)" 2>/dev/null || true
mkdir -p "$(ARTIFACTS_DIR)"
@ -45,22 +44,59 @@ copy-legacy:
$(foreach arch,$(IOS_TARGETS),mkdir -p $(ARTIFACTS_DIR)/target/$(arch)/release;)
.PHONY: copy
copy:
copy: copy-libs generate-xcframework
.PHONY: copy-libs
copy-libs:
$(call BINARY_copy,target)
cp -R "$(LIBMOBILECOIN_ARTIFACTS_HEADERS)" "$(ARTIFACTS_DIR)"
.PHONY: copy-legacy
copy-legacy:
$(call BINARY_copy,legacy)
cp -R "$(LIBMOBILECOIN_ARTIFACTS_HEADERS)" "$(ARTIFACTS_DIR)"
.PHONY: generate
generate:
generate: generate-test-vectors generate-protoc
.PHONY: generate-protoc
generate-protoc:
rm -r Sources/Generated/Proto 2>/dev/null || true
DOCKER_BUILDKIT=1 docker build . \
--build-arg grpc_swift_version=1.0.0 \
--output .
.PHONY: generate-test-vectors
generate-test-vectors:
rm -rf $(TEST_VECTOR_DIR)/vectors
cp -R $(MOBILECOIN_DIR)/test-vectors/vectors $(TEST_VECTOR_DIR)
cd $(TEST_VECTOR_DIR)/vectors && find . -type f -name '*.jsonl' -exec mv -fi '{}' ./ ';'
cd $(TEST_VECTOR_DIR)/vectors && find . -mindepth 1 -maxdepth 1 -type d -exec rm -rf '{}' ';'
.PHONY: generate-xcframework
generate-xcframework:
rm -rf Artifacts/LibMobileCoinLibrary.xcframework || true
rm libmobilecoin/out/ios/target/libmobilecoin_macos.a || true
rm libmobilecoin/out/ios/target/libmobilecoin_iossimulator.a || true
mkdir -p .build/headers
cp Artifacts/include/* .build/headers
cp modulemap/module.modulemap .build/headers
mkdir -p libmobilecoin/out/ios/target
lipo -create \
$(ARTIFACTS_DIR)/target/x86_64-apple-darwin/release/libmobilecoin.a \
$(ARTIFACTS_DIR)/target/aarch64-apple-darwin/release/libmobilecoin.a \
-output $(LIBMOBILECOIN_ARTIFACTS_DIR)/target/libmobilecoin_macos.a
lipo -create \
$(ARTIFACTS_DIR)/target/x86_64-apple-ios/release/libmobilecoin.a \
$(ARTIFACTS_DIR)/target/aarch64-apple-ios-sim/release/libmobilecoin.a \
-output $(LIBMOBILECOIN_ARTIFACTS_DIR)/target/libmobilecoin_iossimulator.a
rm -rf $(LIBMOBILECOIN_ARTIFACTS_DIR)/LibMobileCoinLibrary.xcframework
xcodebuild -create-xcframework \
-library $(LIBMOBILECOIN_ARTIFACTS_DIR)/target/libmobilecoin_macos.a \
-headers .build/headers \
-library $(LIBMOBILECOIN_ARTIFACTS_DIR)/target/libmobilecoin_iossimulator.a \
-headers .build/headers \
-library $(ARTIFACTS_DIR)/target/aarch64-apple-ios/release/libmobilecoin.a \
-headers .build/headers \
-output $(ARTIFACTS_DIR)/LibMobileCoinLibrary.xcframework
rm -rf .build/headers
.PHONY: lint
lint: lint-podspec
@ -68,35 +104,48 @@ lint: lint-podspec
lint-locally: lint-locally-podspec
.PHONY: publish
publish: tag-release publish-podspec
publish: save-release-artifacts tag-release publish-podspec
.PHONY: publish-hotfix
publish-hotfix: tag-hotfix publish-podspec
.PHONY: push-generated
push-generated:
git add Artifacts/*
git add Sources/Generated/Proto/*
git add Sources/GRPC
git add Sources/HTTP
git add Sources/Common
if ! git diff-index --quiet HEAD; then \
git commit -m '[skip ci] commit build Artifacts and generated protos from build machine'; \
git commit -m '[skip ci] commit generated protos from build machine'; \
git push origin HEAD; \
fi
# Release
.PHONY: save-release-artifacts
save-release-artifacts:
@[[ "$$(git rev-parse --abbrev-ref HEAD)" == "master" ]] || \
{ echo 'Error: Must be on branch "master" when tagging a release.'; exit 1; }
VERSION="$$(bundle exec pod ipc spec LibMobileCoin.podspec | jq -r '.version')" && \
SHORTSHA="$$(git rev-parse --short HEAD)" && \
TIME="$$(date +%s)" && \
cd Artifacts && \
git checkout -b "master-$$VERSION-$$SHORTSHA-$$TIME" && \
git push origin "master-$$VERSION-$$SHORTSHA-$$TIME"
.PHONY: tag-release
tag-release:
@[[ "$$(git rev-parse --abbrev-ref HEAD)" == "master" ]] || \
{ echo 'Error: Must be on branch "master" when tagging a release.'; exit 1; }
VERSION="$$(bundle exec pod ipc spec LibMobileCoin.podspec | jq -r '.version')" && \
git tag "v$$VERSION" && \
git push git@github.com:mobilecoinofficial/libmobilecoin-ios-artifacts.git "refs/tags/v$$VERSION"
git push git@github.com:mobilecoinofficial/libmobilecoin.git "refs/tags/v$$VERSION"
.PHONY: tag-hotfix
tag-hotfix:
VERSION="$$(bundle exec pod ipc spec LibMobileCoin.podspec | jq -r '.version')" && \
git tag "v$$VERSION" && \
git push git@github.com:mobilecoinofficial/libmobilecoin-ios-artifacts.git "refs/tags/v$$VERSION"
git push git@github.com:mobilecoinofficial/libmobilecoin.git "refs/tags/v$$VERSION"
# LibMobileCoin pod
@ -111,3 +160,20 @@ lint-podspec:
.PHONY: publish-podspec
publish-podspec:
bundle exec pod trunk push LibMobileCoin.podspec --allow-warnings
.PHONY: clean
clean:
$(MAKE) -C libmobilecoin clean
@rm -r $(MOBILECOIN_DIR)/target 2>/dev/null || true
.PHONY: patch-cmake
patch-cmake:
tools/patch-cmake.sh
.PHONY: unpatch-cmake
unpatch-cmake:
tools/unpatch-cmake.sh
.PHONY: test-spm
test-spm:
cd LibMobileCoinExample && swift package reset && swift test

95
Package.resolved Normal file
View File

@ -0,0 +1,95 @@
{
"pins" : [
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/grpc/grpc-swift.git",
"state" : {
"revision" : "9f4e2e4fd0294fe83372a2b80426a883d5617d2b",
"version" : "1.17.0"
}
},
{
"identity" : "swift-atomics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-atomics.git",
"state" : {
"revision" : "6c89474e62719ddcc1e9614989fff2f68208fe10",
"version" : "1.1.0"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "937e904258d22af6e447a0b72c0bc67583ef64a2",
"version" : "1.0.4"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "32e8d724467f8fe623624570367e3d50c5638e46",
"version" : "1.5.2"
}
},
{
"identity" : "swift-nio",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "f7c46552983b06b0958a1a4c8bc5199406ae4c8a",
"version" : "2.51.0"
}
},
{
"identity" : "swift-nio-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-extras.git",
"state" : {
"revision" : "0e0d0aab665ff1a0659ce75ac003081f2b1c8997",
"version" : "1.19.0"
}
},
{
"identity" : "swift-nio-http2",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-http2.git",
"state" : {
"revision" : "6d021a48483dbb273a9be43f65234bdc9185b364",
"version" : "1.26.0"
}
},
{
"identity" : "swift-nio-ssl",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-ssl.git",
"state" : {
"revision" : "9d0d5d8798a576fbf674a823734e65e15ca5f2ec",
"version" : "2.23.1"
}
},
{
"identity" : "swift-nio-transport-services",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-transport-services.git",
"state" : {
"revision" : "59b966415dd336db6f388bbfe3fb43cfa549b981",
"version" : "1.16.0"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf",
"state" : {
"revision" : "f25867a208f459d3c5a06935dceb9083b11cd539",
"version" : "1.22.0"
}
}
],
"version" : 2
}

63
Package.swift Normal file
View File

@ -0,0 +1,63 @@
// swift-tools-version:5.7
import PackageDescription
import Foundation
let package = Package(
name: "libmobilecoin",
platforms: [
.iOS(.v13),
.macOS(.v11)
],
products: [
.library(
name: "LibMobileCoinCore",
targets: ["LibMobileCoinTestVector", "LibMobileCoinHTTP", "LibMobileCoinGRPC", "LibMobileCoinCommon", "LibMobileCoinLibrary"]),
.library(
name: "LibMobileCoinCoreCommon",
targets: ["LibMobileCoinTestVector", "LibMobileCoinCommon", "LibMobileCoinLibrary"]),
.library(
name: "LibMobileCoinCoreGRPC",
targets: ["LibMobileCoinTestVector", "LibMobileCoinGRPC", "LibMobileCoinCommon", "LibMobileCoinLibrary"]),
.library(
name: "LibMobileCoinCoreHTTP",
targets: ["LibMobileCoinTestVector", "LibMobileCoinHTTP", "LibMobileCoinCommon", "LibMobileCoinLibrary"])
],
dependencies: [
// Here we define our package's external dependencies
// and from where they can be fetched:
.package(
url: "https://github.com/apple/swift-protobuf.git",
from: "1.5.0"
),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.15.0")
],
targets: [
.target(
name: "LibMobileCoinTestVector",
dependencies: [],
path: "Sources/TestVector",
resources: [
.copy("vectors")
]
),
.target(
name: "LibMobileCoinCommon",
dependencies: [.product(name: "SwiftProtobuf", package: "swift-protobuf")],
path: "Sources/Common"
),
.target(
name: "LibMobileCoinHTTP",
dependencies: [.target(name: "LibMobileCoinCommon")],
path: "Sources/HTTP"
),
.target(
name: "LibMobileCoinGRPC",
dependencies: [.target(name: "LibMobileCoinCommon"), .product(name: "GRPC", package: "grpc-swift")],
path: "Sources/GRPC"
),
.binaryTarget(
name: "LibMobileCoinLibrary",
path: "Artifacts/LibMobileCoinLibrary.xcframework"
)
]
)

View File

@ -65,9 +65,38 @@ public struct Attest_Message {
public init() {}
}
//// An AEAD message with an explicit nonce.
////
//// This message is technically compatible with [`Message`], but exists to
//// ensure generated code doesn't use Message.
public struct Attest_NonceMessage {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// A byte array containing plaintext authenticated data.
public var aad: Data = Data()
//// An byte array containing the channel ID this message is
//// associated with. A zero-length channel ID is not valid.
public var channelID: Data = Data()
//// A potentially encrypted bytestream containing opaque data intended
//// for use in the enclave.
public var data: Data = Data()
//// The explicit nonce.
public var nonce: UInt64 = 0
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension Attest_AuthMessage: @unchecked Sendable {}
extension Attest_Message: @unchecked Sendable {}
extension Attest_NonceMessage: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
@ -149,3 +178,53 @@ extension Attest_Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
return true
}
}
extension Attest_NonceMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".NonceMessage"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "aad"),
2: .standard(proto: "channel_id"),
3: .same(proto: "data"),
4: .same(proto: "nonce"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularBytesField(value: &self.aad) }()
case 2: try { try decoder.decodeSingularBytesField(value: &self.channelID) }()
case 3: try { try decoder.decodeSingularBytesField(value: &self.data) }()
case 4: try { try decoder.decodeSingularFixed64Field(value: &self.nonce) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.aad.isEmpty {
try visitor.visitSingularBytesField(value: self.aad, fieldNumber: 1)
}
if !self.channelID.isEmpty {
try visitor.visitSingularBytesField(value: self.channelID, fieldNumber: 2)
}
if !self.data.isEmpty {
try visitor.visitSingularBytesField(value: self.data, fieldNumber: 3)
}
if self.nonce != 0 {
try visitor.visitSingularFixed64Field(value: self.nonce, fieldNumber: 4)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Attest_NonceMessage, rhs: Attest_NonceMessage) -> Bool {
if lhs.aad != rhs.aad {return false}
if lhs.channelID != rhs.channelID {return false}
if lhs.data != rhs.data {return false}
if lhs.nonce != rhs.nonce {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

View File

@ -175,6 +175,128 @@ public struct Blockchain_BlockSignature {
fileprivate var _signer: External_Ed25519Public? = nil
}
public struct Blockchain_BlockMetadataContents {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// The Block ID.
public var blockID: Blockchain_BlockID {
get {return _blockID ?? Blockchain_BlockID()}
set {_blockID = newValue}
}
/// Returns true if `blockID` has been explicitly set.
public var hasBlockID: Bool {return self._blockID != nil}
/// Clears the value of `blockID`. Subsequent reads from it will return its default value.
public mutating func clearBlockID() {self._blockID = nil}
/// Quorum set configuration at the time of externalization.
public var quorumSet: QuorumSet_QuorumSet {
get {return _quorumSet ?? QuorumSet_QuorumSet()}
set {_quorumSet = newValue}
}
/// Returns true if `quorumSet` has been explicitly set.
public var hasQuorumSet: Bool {return self._quorumSet != nil}
/// Clears the value of `quorumSet`. Subsequent reads from it will return its default value.
public mutating func clearQuorumSet() {self._quorumSet = nil}
/// The attestation evidence for the enclave which generated the signature.
public var attestationEvidence: Blockchain_BlockMetadataContents.OneOf_AttestationEvidence? = nil
public var verificationReport: External_VerificationReport {
get {
if case .verificationReport(let v)? = attestationEvidence {return v}
return External_VerificationReport()
}
set {attestationEvidence = .verificationReport(newValue)}
}
public var dcapEvidence: External_DcapEvidence {
get {
if case .dcapEvidence(let v)? = attestationEvidence {return v}
return External_DcapEvidence()
}
set {attestationEvidence = .dcapEvidence(newValue)}
}
/// Responder ID of the consensus node that externalized this block.
public var responderID: String = String()
public var unknownFields = SwiftProtobuf.UnknownStorage()
/// The attestation evidence for the enclave which generated the signature.
public enum OneOf_AttestationEvidence: Equatable {
case verificationReport(External_VerificationReport)
case dcapEvidence(External_DcapEvidence)
#if !swift(>=4.1)
public static func ==(lhs: Blockchain_BlockMetadataContents.OneOf_AttestationEvidence, rhs: Blockchain_BlockMetadataContents.OneOf_AttestationEvidence) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.verificationReport, .verificationReport): return {
guard case .verificationReport(let l) = lhs, case .verificationReport(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.dcapEvidence, .dcapEvidence): return {
guard case .dcapEvidence(let l) = lhs, case .dcapEvidence(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
fileprivate var _blockID: Blockchain_BlockID? = nil
fileprivate var _quorumSet: QuorumSet_QuorumSet? = nil
}
public struct Blockchain_BlockMetadata {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// Metadata signed by the consensus node.
public var contents: Blockchain_BlockMetadataContents {
get {return _storage._contents ?? Blockchain_BlockMetadataContents()}
set {_uniqueStorage()._contents = newValue}
}
/// Returns true if `contents` has been explicitly set.
public var hasContents: Bool {return _storage._contents != nil}
/// Clears the value of `contents`. Subsequent reads from it will return its default value.
public mutating func clearContents() {_uniqueStorage()._contents = nil}
/// Message signing key (signer).
public var nodeKey: External_Ed25519Public {
get {return _storage._nodeKey ?? External_Ed25519Public()}
set {_uniqueStorage()._nodeKey = newValue}
}
/// Returns true if `nodeKey` has been explicitly set.
public var hasNodeKey: Bool {return _storage._nodeKey != nil}
/// Clears the value of `nodeKey`. Subsequent reads from it will return its default value.
public mutating func clearNodeKey() {_uniqueStorage()._nodeKey = nil}
/// Signature using `node_key` over the Digestible encoding of `contents`.
public var signature: External_Ed25519Signature {
get {return _storage._signature ?? External_Ed25519Signature()}
set {_uniqueStorage()._signature = newValue}
}
/// Returns true if `signature` has been explicitly set.
public var hasSignature: Bool {return _storage._signature != nil}
/// Clears the value of `signature`. Subsequent reads from it will return its default value.
public mutating func clearSignature() {_uniqueStorage()._signature = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
/// Version 1 of an archived block.
/// Note: The block.version field within the block may or may not be equal to 1.
public struct Blockchain_ArchiveBlockV1 {
@ -182,43 +304,51 @@ public struct Blockchain_ArchiveBlockV1 {
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// Block
/// The block (header).
public var block: Blockchain_Block {
get {return _block ?? Blockchain_Block()}
set {_block = newValue}
get {return _storage._block ?? Blockchain_Block()}
set {_uniqueStorage()._block = newValue}
}
/// Returns true if `block` has been explicitly set.
public var hasBlock: Bool {return self._block != nil}
public var hasBlock: Bool {return _storage._block != nil}
/// Clears the value of `block`. Subsequent reads from it will return its default value.
public mutating func clearBlock() {self._block = nil}
public mutating func clearBlock() {_uniqueStorage()._block = nil}
/// Contents of the block.
public var blockContents: Blockchain_BlockContents {
get {return _blockContents ?? Blockchain_BlockContents()}
set {_blockContents = newValue}
get {return _storage._blockContents ?? Blockchain_BlockContents()}
set {_uniqueStorage()._blockContents = newValue}
}
/// Returns true if `blockContents` has been explicitly set.
public var hasBlockContents: Bool {return self._blockContents != nil}
public var hasBlockContents: Bool {return _storage._blockContents != nil}
/// Clears the value of `blockContents`. Subsequent reads from it will return its default value.
public mutating func clearBlockContents() {self._blockContents = nil}
public mutating func clearBlockContents() {_uniqueStorage()._blockContents = nil}
/// Block signature, when available.
public var signature: Blockchain_BlockSignature {
get {return _signature ?? Blockchain_BlockSignature()}
set {_signature = newValue}
get {return _storage._signature ?? Blockchain_BlockSignature()}
set {_uniqueStorage()._signature = newValue}
}
/// Returns true if `signature` has been explicitly set.
public var hasSignature: Bool {return self._signature != nil}
public var hasSignature: Bool {return _storage._signature != nil}
/// Clears the value of `signature`. Subsequent reads from it will return its default value.
public mutating func clearSignature() {self._signature = nil}
public mutating func clearSignature() {_uniqueStorage()._signature = nil}
/// Additional signed metadata about this block.
public var metadata: Blockchain_BlockMetadata {
get {return _storage._metadata ?? Blockchain_BlockMetadata()}
set {_uniqueStorage()._metadata = newValue}
}
/// Returns true if `metadata` has been explicitly set.
public var hasMetadata: Bool {return _storage._metadata != nil}
/// Clears the value of `metadata`. Subsequent reads from it will return its default value.
public mutating func clearMetadata() {_uniqueStorage()._metadata = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _block: Blockchain_Block? = nil
fileprivate var _blockContents: Blockchain_BlockContents? = nil
fileprivate var _signature: Blockchain_BlockSignature? = nil
fileprivate var _storage = _StorageClass.defaultInstance
}
/// An archived block.
@ -279,6 +409,9 @@ extension Blockchain_BlockContentsHash: @unchecked Sendable {}
extension Blockchain_Block: @unchecked Sendable {}
extension Blockchain_BlockContents: @unchecked Sendable {}
extension Blockchain_BlockSignature: @unchecked Sendable {}
extension Blockchain_BlockMetadataContents: @unchecked Sendable {}
extension Blockchain_BlockMetadataContents.OneOf_AttestationEvidence: @unchecked Sendable {}
extension Blockchain_BlockMetadata: @unchecked Sendable {}
extension Blockchain_ArchiveBlockV1: @unchecked Sendable {}
extension Blockchain_ArchiveBlock: @unchecked Sendable {}
extension Blockchain_ArchiveBlock.OneOf_Block: @unchecked Sendable {}
@ -523,12 +656,14 @@ extension Blockchain_BlockSignature: SwiftProtobuf.Message, SwiftProtobuf._Messa
}
}
extension Blockchain_ArchiveBlockV1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ArchiveBlockV1"
extension Blockchain_BlockMetadataContents: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".BlockMetadataContents"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "block"),
2: .standard(proto: "block_contents"),
3: .same(proto: "signature"),
1: .standard(proto: "block_id"),
2: .standard(proto: "quorum_set"),
3: .standard(proto: "verification_report"),
5: .standard(proto: "dcap_evidence"),
4: .standard(proto: "responder_id"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -537,9 +672,35 @@ extension Blockchain_ArchiveBlockV1: SwiftProtobuf.Message, SwiftProtobuf._Messa
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularMessageField(value: &self._block) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._blockContents) }()
case 3: try { try decoder.decodeSingularMessageField(value: &self._signature) }()
case 1: try { try decoder.decodeSingularMessageField(value: &self._blockID) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._quorumSet) }()
case 3: try {
var v: External_VerificationReport?
var hadOneofValue = false
if let current = self.attestationEvidence {
hadOneofValue = true
if case .verificationReport(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.attestationEvidence = .verificationReport(v)
}
}()
case 4: try { try decoder.decodeSingularStringField(value: &self.responderID) }()
case 5: try {
var v: External_DcapEvidence?
var hadOneofValue = false
if let current = self.attestationEvidence {
hadOneofValue = true
if case .dcapEvidence(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.attestationEvidence = .dcapEvidence(v)
}
}()
default: break
}
}
@ -550,22 +711,221 @@ extension Blockchain_ArchiveBlockV1: SwiftProtobuf.Message, SwiftProtobuf._Messa
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._block {
try { if let v = self._blockID {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
try { if let v = self._blockContents {
try { if let v = self._quorumSet {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = self._signature {
try { if case .verificationReport(let v)? = self.attestationEvidence {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
if !self.responderID.isEmpty {
try visitor.visitSingularStringField(value: self.responderID, fieldNumber: 4)
}
try { if case .dcapEvidence(let v)? = self.attestationEvidence {
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Blockchain_BlockMetadataContents, rhs: Blockchain_BlockMetadataContents) -> Bool {
if lhs._blockID != rhs._blockID {return false}
if lhs._quorumSet != rhs._quorumSet {return false}
if lhs.attestationEvidence != rhs.attestationEvidence {return false}
if lhs.responderID != rhs.responderID {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Blockchain_BlockMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".BlockMetadata"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "contents"),
2: .standard(proto: "node_key"),
3: .same(proto: "signature"),
]
fileprivate class _StorageClass {
var _contents: Blockchain_BlockMetadataContents? = nil
var _nodeKey: External_Ed25519Public? = nil
var _signature: External_Ed25519Signature? = nil
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
init(copying source: _StorageClass) {
_contents = source._contents
_nodeKey = source._nodeKey
_signature = source._signature
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularMessageField(value: &_storage._contents) }()
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._nodeKey) }()
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._signature) }()
default: break
}
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = _storage._contents {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
try { if let v = _storage._nodeKey {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = _storage._signature {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Blockchain_BlockMetadata, rhs: Blockchain_BlockMetadata) -> Bool {
if lhs._storage !== rhs._storage {
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let rhs_storage = _args.1
if _storage._contents != rhs_storage._contents {return false}
if _storage._nodeKey != rhs_storage._nodeKey {return false}
if _storage._signature != rhs_storage._signature {return false}
return true
}
if !storagesAreEqual {return false}
}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Blockchain_ArchiveBlockV1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".ArchiveBlockV1"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "block"),
2: .standard(proto: "block_contents"),
3: .same(proto: "signature"),
4: .same(proto: "metadata"),
]
fileprivate class _StorageClass {
var _block: Blockchain_Block? = nil
var _blockContents: Blockchain_BlockContents? = nil
var _signature: Blockchain_BlockSignature? = nil
var _metadata: Blockchain_BlockMetadata? = nil
#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif
private init() {}
init(copying source: _StorageClass) {
_block = source._block
_blockContents = source._blockContents
_signature = source._signature
_metadata = source._metadata
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularMessageField(value: &_storage._block) }()
case 2: try { try decoder.decodeSingularMessageField(value: &_storage._blockContents) }()
case 3: try { try decoder.decodeSingularMessageField(value: &_storage._signature) }()
case 4: try { try decoder.decodeSingularMessageField(value: &_storage._metadata) }()
default: break
}
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = _storage._block {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
try { if let v = _storage._blockContents {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = _storage._signature {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
try { if let v = _storage._metadata {
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Blockchain_ArchiveBlockV1, rhs: Blockchain_ArchiveBlockV1) -> Bool {
if lhs._block != rhs._block {return false}
if lhs._blockContents != rhs._blockContents {return false}
if lhs._signature != rhs._signature {return false}
if lhs._storage !== rhs._storage {
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let rhs_storage = _args.1
if _storage._block != rhs_storage._block {return false}
if _storage._blockContents != rhs_storage._blockContents {return false}
if _storage._signature != rhs_storage._signature {return false}
if _storage._metadata != rhs_storage._metadata {return false}
return true
}
if !storagesAreEqual {return false}
}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}

View File

@ -39,6 +39,7 @@ public enum ConsensusClient_MintValidationResultCode: SwiftProtobuf.Enum {
case noGovernors // = 10
case nonceAlreadyUsed // = 11
case noMatchingMintConfig // = 12
case mintingToFogNotSupported // = 13
case UNRECOGNIZED(Int)
public init() {
@ -60,6 +61,7 @@ public enum ConsensusClient_MintValidationResultCode: SwiftProtobuf.Enum {
case 10: self = .noGovernors
case 11: self = .nonceAlreadyUsed
case 12: self = .noMatchingMintConfig
case 13: self = .mintingToFogNotSupported
default: self = .UNRECOGNIZED(rawValue)
}
}
@ -79,6 +81,7 @@ public enum ConsensusClient_MintValidationResultCode: SwiftProtobuf.Enum {
case .noGovernors: return 10
case .nonceAlreadyUsed: return 11
case .noMatchingMintConfig: return 12
case .mintingToFogNotSupported: return 13
case .UNRECOGNIZED(let i): return i
}
}
@ -89,7 +92,7 @@ public enum ConsensusClient_MintValidationResultCode: SwiftProtobuf.Enum {
extension ConsensusClient_MintValidationResultCode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [ConsensusClient_MintValidationResultCode] = [
public static let allCases: [ConsensusClient_MintValidationResultCode] = [
.ok,
.invalidBlockVersion,
.invalidTokenID,
@ -103,6 +106,7 @@ extension ConsensusClient_MintValidationResultCode: CaseIterable {
.noGovernors,
.nonceAlreadyUsed,
.noMatchingMintConfig,
.mintingToFogNotSupported,
]
}
@ -214,6 +218,7 @@ extension ConsensusClient_MintValidationResultCode: SwiftProtobuf._ProtoNameProv
10: .same(proto: "NoGovernors"),
11: .same(proto: "NonceAlreadyUsed"),
12: .same(proto: "NoMatchingMintConfig"),
13: .same(proto: "MintingToFogNotSupported"),
]
}

View File

@ -64,6 +64,16 @@ public enum ConsensusCommon_ProposeTxResult: SwiftProtobuf.Enum {
case missingMaskedTokenID // = 43
case maskedTokenIDNotAllowed // = 44
case unsortedOutputs // = 45
case inputRulesNotAllowed // = 46
case inputRuleMissingRequiredOutput // = 47
case inputRuleMaxTombstoneBlockExceeded // = 48
case unknownMaskedAmountVersion // = 49
case inputRulePartialFill // = 50
case inputRuleInvalidAmountSharedSecret // = 51
case inputRuleTxOutConversion // = 52
case inputRuleAmount // = 53
case ledgerTxOutIndexOutOfBounds // = 54
case feeMapDigestMismatch // = 55
case UNRECOGNIZED(Int)
public init() {
@ -109,6 +119,16 @@ public enum ConsensusCommon_ProposeTxResult: SwiftProtobuf.Enum {
case 43: self = .missingMaskedTokenID
case 44: self = .maskedTokenIDNotAllowed
case 45: self = .unsortedOutputs
case 46: self = .inputRulesNotAllowed
case 47: self = .inputRuleMissingRequiredOutput
case 48: self = .inputRuleMaxTombstoneBlockExceeded
case 49: self = .unknownMaskedAmountVersion
case 50: self = .inputRulePartialFill
case 51: self = .inputRuleInvalidAmountSharedSecret
case 52: self = .inputRuleTxOutConversion
case 53: self = .inputRuleAmount
case 54: self = .ledgerTxOutIndexOutOfBounds
case 55: self = .feeMapDigestMismatch
default: self = .UNRECOGNIZED(rawValue)
}
}
@ -152,6 +172,16 @@ public enum ConsensusCommon_ProposeTxResult: SwiftProtobuf.Enum {
case .missingMaskedTokenID: return 43
case .maskedTokenIDNotAllowed: return 44
case .unsortedOutputs: return 45
case .inputRulesNotAllowed: return 46
case .inputRuleMissingRequiredOutput: return 47
case .inputRuleMaxTombstoneBlockExceeded: return 48
case .unknownMaskedAmountVersion: return 49
case .inputRulePartialFill: return 50
case .inputRuleInvalidAmountSharedSecret: return 51
case .inputRuleTxOutConversion: return 52
case .inputRuleAmount: return 53
case .ledgerTxOutIndexOutOfBounds: return 54
case .feeMapDigestMismatch: return 55
case .UNRECOGNIZED(let i): return i
}
}
@ -162,7 +192,7 @@ public enum ConsensusCommon_ProposeTxResult: SwiftProtobuf.Enum {
extension ConsensusCommon_ProposeTxResult: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [ConsensusCommon_ProposeTxResult] = [
public static let allCases: [ConsensusCommon_ProposeTxResult] = [
.ok,
.inputsProofsLengthMismatch,
.noInputs,
@ -200,6 +230,16 @@ extension ConsensusCommon_ProposeTxResult: CaseIterable {
.missingMaskedTokenID,
.maskedTokenIDNotAllowed,
.unsortedOutputs,
.inputRulesNotAllowed,
.inputRuleMissingRequiredOutput,
.inputRuleMaxTombstoneBlockExceeded,
.unknownMaskedAmountVersion,
.inputRulePartialFill,
.inputRuleInvalidAmountSharedSecret,
.inputRuleTxOutConversion,
.inputRuleAmount,
.ledgerTxOutIndexOutOfBounds,
.feeMapDigestMismatch,
]
}
@ -278,6 +318,9 @@ public struct ConsensusCommon_ProposeTxResponse {
//// The block version which is in effect right now
public var blockVersion: UInt32 = 0
//// Human-readable error message, in case of nonzero ProposeTxResult
public var errMsg: String = String()
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
@ -334,6 +377,16 @@ extension ConsensusCommon_ProposeTxResult: SwiftProtobuf._ProtoNameProviding {
43: .same(proto: "MissingMaskedTokenId"),
44: .same(proto: "MaskedTokenIdNotAllowed"),
45: .same(proto: "UnsortedOutputs"),
46: .same(proto: "InputRulesNotAllowed"),
47: .same(proto: "InputRuleMissingRequiredOutput"),
48: .same(proto: "InputRuleMaxTombstoneBlockExceeded"),
49: .same(proto: "UnknownMaskedAmountVersion"),
50: .same(proto: "InputRulePartialFill"),
51: .same(proto: "InputRuleInvalidAmountSharedSecret"),
52: .same(proto: "InputRuleTxOutConversion"),
53: .same(proto: "InputRuleAmount"),
54: .same(proto: "LedgerTxOutIndexOutOfBounds"),
55: .same(proto: "FeeMapDigestMismatch"),
]
}
@ -463,6 +516,7 @@ extension ConsensusCommon_ProposeTxResponse: SwiftProtobuf.Message, SwiftProtobu
1: .same(proto: "result"),
2: .standard(proto: "block_count"),
3: .standard(proto: "block_version"),
4: .standard(proto: "err_msg"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -474,6 +528,7 @@ extension ConsensusCommon_ProposeTxResponse: SwiftProtobuf.Message, SwiftProtobu
case 1: try { try decoder.decodeSingularEnumField(value: &self.result) }()
case 2: try { try decoder.decodeSingularUInt64Field(value: &self.blockCount) }()
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.blockVersion) }()
case 4: try { try decoder.decodeSingularStringField(value: &self.errMsg) }()
default: break
}
}
@ -489,6 +544,9 @@ extension ConsensusCommon_ProposeTxResponse: SwiftProtobuf.Message, SwiftProtobu
if self.blockVersion != 0 {
try visitor.visitSingularUInt32Field(value: self.blockVersion, fieldNumber: 3)
}
if !self.errMsg.isEmpty {
try visitor.visitSingularStringField(value: self.errMsg, fieldNumber: 4)
}
try unknownFields.traverse(visitor: &visitor)
}
@ -496,6 +554,7 @@ extension ConsensusCommon_ProposeTxResponse: SwiftProtobuf.Message, SwiftProtobu
if lhs.result != rhs.result {return false}
if lhs.blockCount != rhs.blockCount {return false}
if lhs.blockVersion != rhs.blockVersion {return false}
if lhs.errMsg != rhs.errMsg {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}

View File

@ -39,8 +39,22 @@ public struct FogCommon_BlockRange {
public init() {}
}
public struct FogCommon_AddShardRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// The shard's URI in string format.
public var shardUri: String = String()
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension FogCommon_BlockRange: @unchecked Sendable {}
extension FogCommon_AddShardRequest: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
@ -84,3 +98,35 @@ extension FogCommon_BlockRange: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
return true
}
}
extension FogCommon_AddShardRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".AddShardRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "shard_uri"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.shardUri) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.shardUri.isEmpty {
try visitor.visitSingularStringField(value: self.shardUri, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogCommon_AddShardRequest, rhs: FogCommon_AddShardRequest) -> Bool {
if lhs.shardUri != rhs.shardUri {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

View File

@ -22,6 +22,71 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
//// The status associated with a MultiKeyImageStoreQueryResponse
public enum FogLedger_MultiKeyImageStoreResponseStatus: SwiftProtobuf.Enum {
public typealias RawValue = Int
//// Ensure default value (unfilled status) doesn't falsely appear to be a success
case unknown // = 0
//// The Fog Ledger Store successfully fulfilled the request.
case success // = 1
//// The Fog Ledger Store is unable to decrypt a query within the MultiKeyImageStoreRequest. It needs to be authenticated
//// by the router.
case authenticationError // = 2
//// The Fog Ledger Store is not ready to service a MultiLedgerStoreQueryRequest. This might be because the store has
//// not loaded enough blocks yet.
case notReady // = 3
//// The Fog Ledger Store could not decode the protobuf message.
case invalidArgument // = 4
case UNRECOGNIZED(Int)
public init() {
self = .unknown
}
public init?(rawValue: Int) {
switch rawValue {
case 0: self = .unknown
case 1: self = .success
case 2: self = .authenticationError
case 3: self = .notReady
case 4: self = .invalidArgument
default: self = .UNRECOGNIZED(rawValue)
}
}
public var rawValue: Int {
switch self {
case .unknown: return 0
case .success: return 1
case .authenticationError: return 2
case .notReady: return 3
case .invalidArgument: return 4
case .UNRECOGNIZED(let i): return i
}
}
}
#if swift(>=4.2)
extension FogLedger_MultiKeyImageStoreResponseStatus: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [FogLedger_MultiKeyImageStoreResponseStatus] = [
.unknown,
.success,
.authenticationError,
.notReady,
.invalidArgument,
]
}
#endif // swift(>=4.2)
//// The logical result of an individual index in a GetOutputs request
public enum FogLedger_OutputResultCode: SwiftProtobuf.Enum {
public typealias RawValue = Int
@ -69,7 +134,7 @@ public enum FogLedger_OutputResultCode: SwiftProtobuf.Enum {
extension FogLedger_OutputResultCode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [FogLedger_OutputResultCode] = [
public static let allCases: [FogLedger_OutputResultCode] = [
.intentionallyUnused,
.doesNotExist,
.exists,
@ -126,7 +191,7 @@ public enum FogLedger_KeyImageResultCode: SwiftProtobuf.Enum {
extension FogLedger_KeyImageResultCode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [FogLedger_KeyImageResultCode] = [
public static let allCases: [FogLedger_KeyImageResultCode] = [
.unused,
.spent,
.notSpent,
@ -174,7 +239,7 @@ public enum FogLedger_TxOutResultCode: SwiftProtobuf.Enum {
extension FogLedger_TxOutResultCode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [FogLedger_TxOutResultCode] = [
public static let allCases: [FogLedger_TxOutResultCode] = [
.notFound,
.found,
.malformedRequest,
@ -184,6 +249,185 @@ extension FogLedger_TxOutResultCode: CaseIterable {
#endif // swift(>=4.2)
public struct FogLedger_LedgerRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var requestData: FogLedger_LedgerRequest.OneOf_RequestData? = nil
public var auth: Attest_AuthMessage {
get {
if case .auth(let v)? = requestData {return v}
return Attest_AuthMessage()
}
set {requestData = .auth(newValue)}
}
/// TODO: Fill in block query service and merkle proof service.
/// Potentially untrusted_tx_out_service? To be decided.
public var checkKeyImages: Attest_Message {
get {
if case .checkKeyImages(let v)? = requestData {return v}
return Attest_Message()
}
set {requestData = .checkKeyImages(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_RequestData: Equatable {
case auth(Attest_AuthMessage)
/// TODO: Fill in block query service and merkle proof service.
/// Potentially untrusted_tx_out_service? To be decided.
case checkKeyImages(Attest_Message)
#if !swift(>=4.1)
public static func ==(lhs: FogLedger_LedgerRequest.OneOf_RequestData, rhs: FogLedger_LedgerRequest.OneOf_RequestData) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.auth, .auth): return {
guard case .auth(let l) = lhs, case .auth(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.checkKeyImages, .checkKeyImages): return {
guard case .checkKeyImages(let l) = lhs, case .checkKeyImages(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
public struct FogLedger_LedgerResponse {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var responseData: FogLedger_LedgerResponse.OneOf_ResponseData? = nil
public var auth: Attest_AuthMessage {
get {
if case .auth(let v)? = responseData {return v}
return Attest_AuthMessage()
}
set {responseData = .auth(newValue)}
}
/// TODO: Fill in block query service and merkle proof service.
/// Potentially untrusted_tx_out_service? To be decided.
public var checkKeyImageResponse: Attest_Message {
get {
if case .checkKeyImageResponse(let v)? = responseData {return v}
return Attest_Message()
}
set {responseData = .checkKeyImageResponse(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_ResponseData: Equatable {
case auth(Attest_AuthMessage)
/// TODO: Fill in block query service and merkle proof service.
/// Potentially untrusted_tx_out_service? To be decided.
case checkKeyImageResponse(Attest_Message)
#if !swift(>=4.1)
public static func ==(lhs: FogLedger_LedgerResponse.OneOf_ResponseData, rhs: FogLedger_LedgerResponse.OneOf_ResponseData) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.auth, .auth): return {
guard case .auth(let l) = lhs, case .auth(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.checkKeyImageResponse, .checkKeyImageResponse): return {
guard case .checkKeyImageResponse(let l) = lhs, case .checkKeyImageResponse(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
/// Identical to FogViewStoreDecryptionError
public struct FogLedger_FogLedgerStoreDecryptionError {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// The FogLedgerStoreUri for the specific Fog Ledger Store that
//// tried to decrypt the MultiKeyImageStoreRequest and failed.
//// The client should subsequently authenticate with the machine
//// described by this URI.
public var storeUri: String = String()
//// An error message that describes the decryption error.
public var errorMessage: String = String()
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
/// Identical to MultiViewStoreQueryRequest
public struct FogLedger_MultiKeyImageStoreRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// A list of queries encrypted for Fog Ledger Stores.
public var queries: [Attest_NonceMessage] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
public struct FogLedger_MultiKeyImageStoreResponse {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// Optional field that gets set when the Fog Ledger Store is able to decrypt a query
//// included in the MultiKeyImageStoreRequest and create a query response for that
/// query. This is an encrypted CheckKeyImagesResponse.
public var queryResponse: Attest_NonceMessage {
get {return _queryResponse ?? Attest_NonceMessage()}
set {_queryResponse = newValue}
}
/// Returns true if `queryResponse` has been explicitly set.
public var hasQueryResponse: Bool {return self._queryResponse != nil}
/// Clears the value of `queryResponse`. Subsequent reads from it will return its default value.
public mutating func clearQueryResponse() {self._queryResponse = nil}
//// The FogLedgerStore for the specific Fog Ledger Store that
//// tried to decrypt the MultiLedgerStoreQueryRequest and failed.
//// The client should subsequently authenticate with the machine
//// described by this URI.
public var storeUri: String = String()
//// Status that gets returned when the Fog Ledger Store services a MultiKeyImageStoreRequest.
public var status: FogLedger_MultiKeyImageStoreResponseStatus = .unknown
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _queryResponse: Attest_NonceMessage? = nil
}
public struct FogLedger_GetOutputsRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@ -565,9 +809,17 @@ public struct FogLedger_TxOutResult {
}
#if swift(>=5.5) && canImport(_Concurrency)
extension FogLedger_MultiKeyImageStoreResponseStatus: @unchecked Sendable {}
extension FogLedger_OutputResultCode: @unchecked Sendable {}
extension FogLedger_KeyImageResultCode: @unchecked Sendable {}
extension FogLedger_TxOutResultCode: @unchecked Sendable {}
extension FogLedger_LedgerRequest: @unchecked Sendable {}
extension FogLedger_LedgerRequest.OneOf_RequestData: @unchecked Sendable {}
extension FogLedger_LedgerResponse: @unchecked Sendable {}
extension FogLedger_LedgerResponse.OneOf_ResponseData: @unchecked Sendable {}
extension FogLedger_FogLedgerStoreDecryptionError: @unchecked Sendable {}
extension FogLedger_MultiKeyImageStoreRequest: @unchecked Sendable {}
extension FogLedger_MultiKeyImageStoreResponse: @unchecked Sendable {}
extension FogLedger_GetOutputsRequest: @unchecked Sendable {}
extension FogLedger_GetOutputsResponse: @unchecked Sendable {}
extension FogLedger_OutputResult: @unchecked Sendable {}
@ -587,6 +839,16 @@ extension FogLedger_TxOutResult: @unchecked Sendable {}
fileprivate let _protobuf_package = "fog_ledger"
extension FogLedger_MultiKeyImageStoreResponseStatus: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "UNKNOWN"),
1: .same(proto: "SUCCESS"),
2: .same(proto: "AUTHENTICATION_ERROR"),
3: .same(proto: "NOT_READY"),
4: .same(proto: "INVALID_ARGUMENT"),
]
}
extension FogLedger_OutputResultCode: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "IntentionallyUnused"),
@ -614,6 +876,264 @@ extension FogLedger_TxOutResultCode: SwiftProtobuf._ProtoNameProviding {
]
}
extension FogLedger_LedgerRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".LedgerRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "auth"),
2: .standard(proto: "check_key_images"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try {
var v: Attest_AuthMessage?
var hadOneofValue = false
if let current = self.requestData {
hadOneofValue = true
if case .auth(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.requestData = .auth(v)
}
}()
case 2: try {
var v: Attest_Message?
var hadOneofValue = false
if let current = self.requestData {
hadOneofValue = true
if case .checkKeyImages(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.requestData = .checkKeyImages(v)
}
}()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
switch self.requestData {
case .auth?: try {
guard case .auth(let v)? = self.requestData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
}()
case .checkKeyImages?: try {
guard case .checkKeyImages(let v)? = self.requestData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogLedger_LedgerRequest, rhs: FogLedger_LedgerRequest) -> Bool {
if lhs.requestData != rhs.requestData {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogLedger_LedgerResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".LedgerResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "auth"),
2: .standard(proto: "check_key_image_response"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try {
var v: Attest_AuthMessage?
var hadOneofValue = false
if let current = self.responseData {
hadOneofValue = true
if case .auth(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.responseData = .auth(v)
}
}()
case 2: try {
var v: Attest_Message?
var hadOneofValue = false
if let current = self.responseData {
hadOneofValue = true
if case .checkKeyImageResponse(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.responseData = .checkKeyImageResponse(v)
}
}()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
switch self.responseData {
case .auth?: try {
guard case .auth(let v)? = self.responseData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
}()
case .checkKeyImageResponse?: try {
guard case .checkKeyImageResponse(let v)? = self.responseData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogLedger_LedgerResponse, rhs: FogLedger_LedgerResponse) -> Bool {
if lhs.responseData != rhs.responseData {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogLedger_FogLedgerStoreDecryptionError: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".FogLedgerStoreDecryptionError"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "store_uri"),
2: .standard(proto: "error_message"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.storeUri) }()
case 2: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.storeUri.isEmpty {
try visitor.visitSingularStringField(value: self.storeUri, fieldNumber: 1)
}
if !self.errorMessage.isEmpty {
try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogLedger_FogLedgerStoreDecryptionError, rhs: FogLedger_FogLedgerStoreDecryptionError) -> Bool {
if lhs.storeUri != rhs.storeUri {return false}
if lhs.errorMessage != rhs.errorMessage {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogLedger_MultiKeyImageStoreRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".MultiKeyImageStoreRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "queries"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.queries) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.queries.isEmpty {
try visitor.visitRepeatedMessageField(value: self.queries, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogLedger_MultiKeyImageStoreRequest, rhs: FogLedger_MultiKeyImageStoreRequest) -> Bool {
if lhs.queries != rhs.queries {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogLedger_MultiKeyImageStoreResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".MultiKeyImageStoreResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "query_response"),
2: .standard(proto: "store_uri"),
3: .same(proto: "status"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularMessageField(value: &self._queryResponse) }()
case 2: try { try decoder.decodeSingularStringField(value: &self.storeUri) }()
case 3: try { try decoder.decodeSingularEnumField(value: &self.status) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._queryResponse {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
if !self.storeUri.isEmpty {
try visitor.visitSingularStringField(value: self.storeUri, fieldNumber: 2)
}
if self.status != .unknown {
try visitor.visitSingularEnumField(value: self.status, fieldNumber: 3)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogLedger_MultiKeyImageStoreResponse, rhs: FogLedger_MultiKeyImageStoreResponse) -> Bool {
if lhs._queryResponse != rhs._queryResponse {return false}
if lhs.storeUri != rhs.storeUri {return false}
if lhs.status != rhs.status {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogLedger_GetOutputsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".GetOutputsRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [

View File

@ -0,0 +1,207 @@
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: legacyview.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
// Copyright (c) 2018-2022 The MobileCoin Foundation
import Foundation
import SwiftProtobuf
// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}
////
//// *** DISCLAIMER ***
////
//// This proto is deprecated and no longer used, we're re-importing it so we can re-use serialized data in
//// some Swift unit tests. Once we convert these tests we should remove this proto.
////
//// *** END DISCLAIMER ***
////
//// The schema for the decrypted TxOutSearchResult ciphertext
//// This is the information that the Ingest enclave produces for the user about their TxOut
////
//// Note: The fields of FogTxOut are flattened here because it reduces the size of the protobuf
//// enough to make a difference for the quality of ORAM implementation, like ~10% better memory utilization
////
//// Note: Fog TxOutRecord DOES NOT include the encrypted fog hint of the original TxOut, because it is big,
//// and the client cannot read it anyways. However, when using the TxOut to build transactions, you must have that
//// or the merkle proofs will fail validation, at least for now.
//// The fog merkle proof server gives you a TxOut with fog hint, as it appears in blockchain,
//// and that's the version of the TxOut that you should use when building a transaction.
public struct FogView_TxOutRecordLegacy {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// The (compressed ristretto) bytes of commitment associated to amount field in the TxOut that was recovered
////
//// Note: This field is omitted in recent versions, because it can be reconstructed by the recipient instead.
public var txOutAmountCommitmentData: Data = Data()
//// The masked value associated to amount field in the TxOut that was recovered
public var txOutAmountMaskedValue: UInt64 = 0
//// The (compressed ristretto) bytes of the target key associated to the TxOut that was recovered
public var txOutTargetKeyData: Data = Data()
//// The (compressed ristretto) bytes of the public key associated to the TxOut that was recovered
public var txOutPublicKeyData: Data = Data()
//// The global index of this TxOut in the set of all TxOuts in the entire block chain
public var txOutGlobalIndex: UInt64 = 0
//// The index of the block index in which this TxOut appeared
public var blockIndex: UInt64 = 0
//// The timestamp of the block containing this output.
//// Some blocks, like the origin block, don't have a timestamp, and this value is u64::MAX
//// Other blocks are expected to have timestamps.
////
//// Note: The timestamp is based on untrusted reporting of time from ONE of the consensus validators.
//// Because it is a distributed system, it may not be the SAME consensus validator from block to block,
//// and the timestamps may not make even a minimal amount of sense when the validator differs.
////
//// These timestamps are
//// - NOISY, forward and backwards in time, depending on system time settings of many different servers.
//// - NOT MONOTONIC: it's possible that you get a timestamp for block 101 that is before the timestamp for block 100.
//// - Not even CONSISTENT across fog services: It's possible you get a different timestamp for a TxOut in block 100,
//// than you do for a key image in block 100 from the key image endpoint.
//// This is unavoidable right now because it is possible that fog-ingest has different levels of
//// connectivity from the fog-key-image service to the blockchain data sources.
////
//// Timestamps are BEST-EFFORT and for a good user experience, the client software should attempt to reconcile these
//// timestamps, so that events that have a happens-before relationship in the system, have timestamps that reflect that.
//// Otherwise, we should expect users to be confused and disturbed about the occasional time-travelling transaction.
////
//// We hope to improve the quality guarantees of these timestamps over time, but for now this is the best we
//// can do until some changes can be made to the consensus network and other services related to timestamps.
////
//// Represented as seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
public var timestamp: UInt64 = 0
//// The crc32 of the commitment data bytes.
//// This is a 4-byte IEEE crc32 of the bytes of the tx_out_amount_commitment_data bytes, which is present if
//// the full tx_out_amount_commitment_data is omitted.
//// The client can recompute the tx_out_amount_commitment from the other data that we include.
//// They can confirm correct recomputation by checking this crc value.
public var txOutAmountCommitmentDataCrc32: UInt32 = 0
//// The bytes of the encrypted memo.
//// This exactly 66 bytes when present.
//// This is omitted for TxOut's from before the upgrade that introduced memos.
public var txOutEMemoData: Data = Data()
//// The masked token id associated to the amount field in the TxOut that was recovered
public var txOutAmountMaskedTokenID: Data = Data()
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension FogView_TxOutRecordLegacy: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "fog_view"
extension FogView_TxOutRecordLegacy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".TxOutRecordLegacy"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "tx_out_amount_commitment_data"),
2: .standard(proto: "tx_out_amount_masked_value"),
3: .standard(proto: "tx_out_target_key_data"),
4: .standard(proto: "tx_out_public_key_data"),
5: .standard(proto: "tx_out_global_index"),
6: .standard(proto: "block_index"),
7: .same(proto: "timestamp"),
8: .standard(proto: "tx_out_amount_commitment_data_crc32"),
9: .standard(proto: "tx_out_e_memo_data"),
10: .standard(proto: "tx_out_amount_masked_token_id"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularBytesField(value: &self.txOutAmountCommitmentData) }()
case 2: try { try decoder.decodeSingularFixed64Field(value: &self.txOutAmountMaskedValue) }()
case 3: try { try decoder.decodeSingularBytesField(value: &self.txOutTargetKeyData) }()
case 4: try { try decoder.decodeSingularBytesField(value: &self.txOutPublicKeyData) }()
case 5: try { try decoder.decodeSingularFixed64Field(value: &self.txOutGlobalIndex) }()
case 6: try { try decoder.decodeSingularFixed64Field(value: &self.blockIndex) }()
case 7: try { try decoder.decodeSingularFixed64Field(value: &self.timestamp) }()
case 8: try { try decoder.decodeSingularFixed32Field(value: &self.txOutAmountCommitmentDataCrc32) }()
case 9: try { try decoder.decodeSingularBytesField(value: &self.txOutEMemoData) }()
case 10: try { try decoder.decodeSingularBytesField(value: &self.txOutAmountMaskedTokenID) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.txOutAmountCommitmentData.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutAmountCommitmentData, fieldNumber: 1)
}
if self.txOutAmountMaskedValue != 0 {
try visitor.visitSingularFixed64Field(value: self.txOutAmountMaskedValue, fieldNumber: 2)
}
if !self.txOutTargetKeyData.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutTargetKeyData, fieldNumber: 3)
}
if !self.txOutPublicKeyData.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutPublicKeyData, fieldNumber: 4)
}
if self.txOutGlobalIndex != 0 {
try visitor.visitSingularFixed64Field(value: self.txOutGlobalIndex, fieldNumber: 5)
}
if self.blockIndex != 0 {
try visitor.visitSingularFixed64Field(value: self.blockIndex, fieldNumber: 6)
}
if self.timestamp != 0 {
try visitor.visitSingularFixed64Field(value: self.timestamp, fieldNumber: 7)
}
if self.txOutAmountCommitmentDataCrc32 != 0 {
try visitor.visitSingularFixed32Field(value: self.txOutAmountCommitmentDataCrc32, fieldNumber: 8)
}
if !self.txOutEMemoData.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutEMemoData, fieldNumber: 9)
}
if !self.txOutAmountMaskedTokenID.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutAmountMaskedTokenID, fieldNumber: 10)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogView_TxOutRecordLegacy, rhs: FogView_TxOutRecordLegacy) -> Bool {
if lhs.txOutAmountCommitmentData != rhs.txOutAmountCommitmentData {return false}
if lhs.txOutAmountMaskedValue != rhs.txOutAmountMaskedValue {return false}
if lhs.txOutTargetKeyData != rhs.txOutTargetKeyData {return false}
if lhs.txOutPublicKeyData != rhs.txOutPublicKeyData {return false}
if lhs.txOutGlobalIndex != rhs.txOutGlobalIndex {return false}
if lhs.blockIndex != rhs.blockIndex {return false}
if lhs.timestamp != rhs.timestamp {return false}
if lhs.txOutAmountCommitmentDataCrc32 != rhs.txOutAmountCommitmentDataCrc32 {return false}
if lhs.txOutEMemoData != rhs.txOutEMemoData {return false}
if lhs.txOutAmountMaskedTokenID != rhs.txOutAmountMaskedTokenID {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

View File

@ -0,0 +1,268 @@
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: mistyswap_common.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
// Copyright (c) 2018-2023 MobileCoin Inc.
import Foundation
import SwiftProtobuf
// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}
//// On-going swap info.
public struct MistyswapCommon_OngoingSwap {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// The Mixin trace ID of the swap.
public var traceID: String = String()
//// The Mixin user ID of the swap.
public var followID: String = String()
//// Asset UUID we are swapping from.
public var srcAssetID: String = String()
//// Amount we are swapping (string since it can be decimal).
public var srcAmount: String = String()
//// Asset UUID we are swapping to.
public var dstAssetID: String = String()
//// Minimum amount we will accept, otherwise the swap gets rejected (string since it can be decimal).
public var dstAmountMin: String = String()
//// Mixin route hash ids.
public var routeHashIds: String = String()
//// The Mixin snapshot JSON blob.
public var transferJson: String = String()
//// Our balance of the src asset before we sent the swap transaction.
public var preSwapSrcBalance: String = String()
//// Our balance of the dst asset before we sent the swap transaction.
public var preSwapDstBalance: String = String()
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
//// Response to the `GetInfo` request
public struct MistyswapCommon_GetInfoResponse {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// Max concurrent offramps
public var maxConcurrentOfframps: UInt64 = 0
//// Max concurrent onramps
public var maxConcurrentOnramps: UInt64 = 0
//// Current number of offramps
public var currentOfframps: UInt64 = 0
//// Current number of onramps
public var currentOnramps: UInt64 = 0
//// List of supported offramp source asset ids.
public var offrampAllowedSrcAssetIds: [String] = []
//// List of supported offramp destination asset ids.
public var offrampAllowedDstAssetIds: [String] = []
//// List of supported onramp source asset ids.
public var onrampAllowedSrcAssetIds: [String] = []
//// List of supported onramp destination asset ids.
public var onrampAllowedDstAssetIds: [String] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension MistyswapCommon_OngoingSwap: @unchecked Sendable {}
extension MistyswapCommon_GetInfoResponse: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "mistyswap_common"
extension MistyswapCommon_OngoingSwap: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".OngoingSwap"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "trace_id"),
2: .standard(proto: "follow_id"),
3: .standard(proto: "src_asset_id"),
4: .standard(proto: "src_amount"),
5: .standard(proto: "dst_asset_id"),
6: .standard(proto: "dst_amount_min"),
7: .standard(proto: "route_hash_ids"),
8: .standard(proto: "transfer_json"),
9: .standard(proto: "pre_swap_src_balance"),
10: .standard(proto: "pre_swap_dst_balance"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.traceID) }()
case 2: try { try decoder.decodeSingularStringField(value: &self.followID) }()
case 3: try { try decoder.decodeSingularStringField(value: &self.srcAssetID) }()
case 4: try { try decoder.decodeSingularStringField(value: &self.srcAmount) }()
case 5: try { try decoder.decodeSingularStringField(value: &self.dstAssetID) }()
case 6: try { try decoder.decodeSingularStringField(value: &self.dstAmountMin) }()
case 7: try { try decoder.decodeSingularStringField(value: &self.routeHashIds) }()
case 8: try { try decoder.decodeSingularStringField(value: &self.transferJson) }()
case 9: try { try decoder.decodeSingularStringField(value: &self.preSwapSrcBalance) }()
case 10: try { try decoder.decodeSingularStringField(value: &self.preSwapDstBalance) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.traceID.isEmpty {
try visitor.visitSingularStringField(value: self.traceID, fieldNumber: 1)
}
if !self.followID.isEmpty {
try visitor.visitSingularStringField(value: self.followID, fieldNumber: 2)
}
if !self.srcAssetID.isEmpty {
try visitor.visitSingularStringField(value: self.srcAssetID, fieldNumber: 3)
}
if !self.srcAmount.isEmpty {
try visitor.visitSingularStringField(value: self.srcAmount, fieldNumber: 4)
}
if !self.dstAssetID.isEmpty {
try visitor.visitSingularStringField(value: self.dstAssetID, fieldNumber: 5)
}
if !self.dstAmountMin.isEmpty {
try visitor.visitSingularStringField(value: self.dstAmountMin, fieldNumber: 6)
}
if !self.routeHashIds.isEmpty {
try visitor.visitSingularStringField(value: self.routeHashIds, fieldNumber: 7)
}
if !self.transferJson.isEmpty {
try visitor.visitSingularStringField(value: self.transferJson, fieldNumber: 8)
}
if !self.preSwapSrcBalance.isEmpty {
try visitor.visitSingularStringField(value: self.preSwapSrcBalance, fieldNumber: 9)
}
if !self.preSwapDstBalance.isEmpty {
try visitor.visitSingularStringField(value: self.preSwapDstBalance, fieldNumber: 10)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: MistyswapCommon_OngoingSwap, rhs: MistyswapCommon_OngoingSwap) -> Bool {
if lhs.traceID != rhs.traceID {return false}
if lhs.followID != rhs.followID {return false}
if lhs.srcAssetID != rhs.srcAssetID {return false}
if lhs.srcAmount != rhs.srcAmount {return false}
if lhs.dstAssetID != rhs.dstAssetID {return false}
if lhs.dstAmountMin != rhs.dstAmountMin {return false}
if lhs.routeHashIds != rhs.routeHashIds {return false}
if lhs.transferJson != rhs.transferJson {return false}
if lhs.preSwapSrcBalance != rhs.preSwapSrcBalance {return false}
if lhs.preSwapDstBalance != rhs.preSwapDstBalance {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension MistyswapCommon_GetInfoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".GetInfoResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "max_concurrent_offramps"),
2: .standard(proto: "max_concurrent_onramps"),
3: .standard(proto: "current_offramps"),
4: .standard(proto: "current_onramps"),
5: .standard(proto: "offramp_allowed_src_asset_ids"),
6: .standard(proto: "offramp_allowed_dst_asset_ids"),
7: .standard(proto: "onramp_allowed_src_asset_ids"),
8: .standard(proto: "onramp_allowed_dst_asset_ids"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt64Field(value: &self.maxConcurrentOfframps) }()
case 2: try { try decoder.decodeSingularUInt64Field(value: &self.maxConcurrentOnramps) }()
case 3: try { try decoder.decodeSingularUInt64Field(value: &self.currentOfframps) }()
case 4: try { try decoder.decodeSingularUInt64Field(value: &self.currentOnramps) }()
case 5: try { try decoder.decodeRepeatedStringField(value: &self.offrampAllowedSrcAssetIds) }()
case 6: try { try decoder.decodeRepeatedStringField(value: &self.offrampAllowedDstAssetIds) }()
case 7: try { try decoder.decodeRepeatedStringField(value: &self.onrampAllowedSrcAssetIds) }()
case 8: try { try decoder.decodeRepeatedStringField(value: &self.onrampAllowedDstAssetIds) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if self.maxConcurrentOfframps != 0 {
try visitor.visitSingularUInt64Field(value: self.maxConcurrentOfframps, fieldNumber: 1)
}
if self.maxConcurrentOnramps != 0 {
try visitor.visitSingularUInt64Field(value: self.maxConcurrentOnramps, fieldNumber: 2)
}
if self.currentOfframps != 0 {
try visitor.visitSingularUInt64Field(value: self.currentOfframps, fieldNumber: 3)
}
if self.currentOnramps != 0 {
try visitor.visitSingularUInt64Field(value: self.currentOnramps, fieldNumber: 4)
}
if !self.offrampAllowedSrcAssetIds.isEmpty {
try visitor.visitRepeatedStringField(value: self.offrampAllowedSrcAssetIds, fieldNumber: 5)
}
if !self.offrampAllowedDstAssetIds.isEmpty {
try visitor.visitRepeatedStringField(value: self.offrampAllowedDstAssetIds, fieldNumber: 6)
}
if !self.onrampAllowedSrcAssetIds.isEmpty {
try visitor.visitRepeatedStringField(value: self.onrampAllowedSrcAssetIds, fieldNumber: 7)
}
if !self.onrampAllowedDstAssetIds.isEmpty {
try visitor.visitRepeatedStringField(value: self.onrampAllowedDstAssetIds, fieldNumber: 8)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: MistyswapCommon_GetInfoResponse, rhs: MistyswapCommon_GetInfoResponse) -> Bool {
if lhs.maxConcurrentOfframps != rhs.maxConcurrentOfframps {return false}
if lhs.maxConcurrentOnramps != rhs.maxConcurrentOnramps {return false}
if lhs.currentOfframps != rhs.currentOfframps {return false}
if lhs.currentOnramps != rhs.currentOnramps {return false}
if lhs.offrampAllowedSrcAssetIds != rhs.offrampAllowedSrcAssetIds {return false}
if lhs.offrampAllowedDstAssetIds != rhs.offrampAllowedDstAssetIds {return false}
if lhs.onrampAllowedSrcAssetIds != rhs.onrampAllowedSrcAssetIds {return false}
if lhs.onrampAllowedDstAssetIds != rhs.onrampAllowedDstAssetIds {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -50,6 +50,9 @@ public struct Printable_PaymentRequest {
//// Token id to transact in.
public var tokenID: UInt64 = 0
//// Payment Id
public var paymentID: UInt64 = 0
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
@ -94,6 +97,47 @@ public struct Printable_TransferPayload {
fileprivate var _txOutPublicKey: External_CompressedRistretto? = nil
}
//// Message encoding information required to locate a TxOut,
//// un-blind the amount, and spend the TxOut. This can be used to give
//// MobileCoin to both FOG & non-FOG users who may not yet have
/// a MobileCoin account enabled
public struct Printable_TxOutGiftCode {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// The global index of the TxOut that has been gifted. This allows
/// the receiver to find & uniquely identify the TxOut
public var globalIndex: UInt64 = 0
/// The one-time private key which can be used to spend the TxOut
public var onetimePrivateKey: External_RistrettoPrivate {
get {return _onetimePrivateKey ?? External_RistrettoPrivate()}
set {_onetimePrivateKey = newValue}
}
/// Returns true if `onetimePrivateKey` has been explicitly set.
public var hasOnetimePrivateKey: Bool {return self._onetimePrivateKey != nil}
/// Clears the value of `onetimePrivateKey`. Subsequent reads from it will return its default value.
public mutating func clearOnetimePrivateKey() {self._onetimePrivateKey = nil}
/// The shared secret used to un-blind the amount of the TxOut
public var sharedSecret: External_CompressedRistretto {
get {return _sharedSecret ?? External_CompressedRistretto()}
set {_sharedSecret = newValue}
}
/// Returns true if `sharedSecret` has been explicitly set.
public var hasSharedSecret: Bool {return self._sharedSecret != nil}
/// Clears the value of `sharedSecret`. Subsequent reads from it will return its default value.
public mutating func clearSharedSecret() {self._sharedSecret = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _onetimePrivateKey: External_RistrettoPrivate? = nil
fileprivate var _sharedSecret: External_CompressedRistretto? = nil
}
//// This wraps all of the above messages using "oneof", allowing us to
//// have a single encoding scheme and extend as necessary simply by adding
//// new messages without breaking backwards compatibility
@ -128,12 +172,21 @@ public struct Printable_PrintableWrapper {
set {wrapper = .transferPayload(newValue)}
}
public var txOutGiftCode: Printable_TxOutGiftCode {
get {
if case .txOutGiftCode(let v)? = wrapper {return v}
return Printable_TxOutGiftCode()
}
set {wrapper = .txOutGiftCode(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_Wrapper: Equatable {
case publicAddress(External_PublicAddress)
case paymentRequest(Printable_PaymentRequest)
case transferPayload(Printable_TransferPayload)
case txOutGiftCode(Printable_TxOutGiftCode)
#if !swift(>=4.1)
public static func ==(lhs: Printable_PrintableWrapper.OneOf_Wrapper, rhs: Printable_PrintableWrapper.OneOf_Wrapper) -> Bool {
@ -153,6 +206,10 @@ public struct Printable_PrintableWrapper {
guard case .transferPayload(let l) = lhs, case .transferPayload(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.txOutGiftCode, .txOutGiftCode): return {
guard case .txOutGiftCode(let l) = lhs, case .txOutGiftCode(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
@ -165,6 +222,7 @@ public struct Printable_PrintableWrapper {
#if swift(>=5.5) && canImport(_Concurrency)
extension Printable_PaymentRequest: @unchecked Sendable {}
extension Printable_TransferPayload: @unchecked Sendable {}
extension Printable_TxOutGiftCode: @unchecked Sendable {}
extension Printable_PrintableWrapper: @unchecked Sendable {}
extension Printable_PrintableWrapper.OneOf_Wrapper: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
@ -180,6 +238,7 @@ extension Printable_PaymentRequest: SwiftProtobuf.Message, SwiftProtobuf._Messag
2: .same(proto: "value"),
3: .same(proto: "memo"),
4: .standard(proto: "token_id"),
5: .standard(proto: "payment_id"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -192,6 +251,7 @@ extension Printable_PaymentRequest: SwiftProtobuf.Message, SwiftProtobuf._Messag
case 2: try { try decoder.decodeSingularUInt64Field(value: &self.value) }()
case 3: try { try decoder.decodeSingularStringField(value: &self.memo) }()
case 4: try { try decoder.decodeSingularUInt64Field(value: &self.tokenID) }()
case 5: try { try decoder.decodeSingularUInt64Field(value: &self.paymentID) }()
default: break
}
}
@ -214,6 +274,9 @@ extension Printable_PaymentRequest: SwiftProtobuf.Message, SwiftProtobuf._Messag
if self.tokenID != 0 {
try visitor.visitSingularUInt64Field(value: self.tokenID, fieldNumber: 4)
}
if self.paymentID != 0 {
try visitor.visitSingularUInt64Field(value: self.paymentID, fieldNumber: 5)
}
try unknownFields.traverse(visitor: &visitor)
}
@ -222,6 +285,7 @@ extension Printable_PaymentRequest: SwiftProtobuf.Message, SwiftProtobuf._Messag
if lhs.value != rhs.value {return false}
if lhs.memo != rhs.memo {return false}
if lhs.tokenID != rhs.tokenID {return false}
if lhs.paymentID != rhs.paymentID {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
@ -281,12 +345,61 @@ extension Printable_TransferPayload: SwiftProtobuf.Message, SwiftProtobuf._Messa
}
}
extension Printable_TxOutGiftCode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".TxOutGiftCode"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "global_index"),
2: .standard(proto: "onetime_private_key"),
3: .standard(proto: "shared_secret"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt64Field(value: &self.globalIndex) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._onetimePrivateKey) }()
case 3: try { try decoder.decodeSingularMessageField(value: &self._sharedSecret) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if self.globalIndex != 0 {
try visitor.visitSingularUInt64Field(value: self.globalIndex, fieldNumber: 1)
}
try { if let v = self._onetimePrivateKey {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = self._sharedSecret {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Printable_TxOutGiftCode, rhs: Printable_TxOutGiftCode) -> Bool {
if lhs.globalIndex != rhs.globalIndex {return false}
if lhs._onetimePrivateKey != rhs._onetimePrivateKey {return false}
if lhs._sharedSecret != rhs._sharedSecret {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Printable_PrintableWrapper: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".PrintableWrapper"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "public_address"),
2: .standard(proto: "payment_request"),
3: .standard(proto: "transfer_payload"),
4: .standard(proto: "tx_out_gift_code"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -334,6 +447,19 @@ extension Printable_PrintableWrapper: SwiftProtobuf.Message, SwiftProtobuf._Mess
self.wrapper = .transferPayload(v)
}
}()
case 4: try {
var v: Printable_TxOutGiftCode?
var hadOneofValue = false
if let current = self.wrapper {
hadOneofValue = true
if case .txOutGiftCode(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.wrapper = .txOutGiftCode(v)
}
}()
default: break
}
}
@ -357,6 +483,10 @@ extension Printable_PrintableWrapper: SwiftProtobuf.Message, SwiftProtobuf._Mess
guard case .transferPayload(let v)? = self.wrapper else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
}()
case .txOutGiftCode?: try {
guard case .txOutGiftCode(let v)? = self.wrapper else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)

View File

@ -0,0 +1,276 @@
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: quorum_set.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
// Copyright (c) 2018-2022 The MobileCoin Foundation
// QuorumSet data types.
// Implemented here because the Rust definition is generic, so these types are for the current impl.
import Foundation
import SwiftProtobuf
// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}
public struct QuorumSet_Node {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var responderID: String = String()
public var publicKey: External_Ed25519Public {
get {return _publicKey ?? External_Ed25519Public()}
set {_publicKey = newValue}
}
/// Returns true if `publicKey` has been explicitly set.
public var hasPublicKey: Bool {return self._publicKey != nil}
/// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
public mutating func clearPublicKey() {self._publicKey = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _publicKey: External_Ed25519Public? = nil
}
public struct QuorumSet_QuorumSetMember {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var member: QuorumSet_QuorumSetMember.OneOf_Member? = nil
public var node: QuorumSet_Node {
get {
if case .node(let v)? = member {return v}
return QuorumSet_Node()
}
set {member = .node(newValue)}
}
public var innerSet: QuorumSet_QuorumSet {
get {
if case .innerSet(let v)? = member {return v}
return QuorumSet_QuorumSet()
}
set {member = .innerSet(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_Member: Equatable {
case node(QuorumSet_Node)
case innerSet(QuorumSet_QuorumSet)
#if !swift(>=4.1)
public static func ==(lhs: QuorumSet_QuorumSetMember.OneOf_Member, rhs: QuorumSet_QuorumSetMember.OneOf_Member) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.node, .node): return {
guard case .node(let l) = lhs, case .node(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.innerSet, .innerSet): return {
guard case .innerSet(let l) = lhs, case .innerSet(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
public struct QuorumSet_QuorumSet {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var threshold: UInt32 = 0
public var members: [QuorumSet_QuorumSetMember] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension QuorumSet_Node: @unchecked Sendable {}
extension QuorumSet_QuorumSetMember: @unchecked Sendable {}
extension QuorumSet_QuorumSetMember.OneOf_Member: @unchecked Sendable {}
extension QuorumSet_QuorumSet: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "quorum_set"
extension QuorumSet_Node: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Node"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "responder_id"),
2: .standard(proto: "public_key"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.responderID) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._publicKey) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if !self.responderID.isEmpty {
try visitor.visitSingularStringField(value: self.responderID, fieldNumber: 1)
}
try { if let v = self._publicKey {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: QuorumSet_Node, rhs: QuorumSet_Node) -> Bool {
if lhs.responderID != rhs.responderID {return false}
if lhs._publicKey != rhs._publicKey {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension QuorumSet_QuorumSetMember: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".QuorumSetMember"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "node"),
2: .standard(proto: "inner_set"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try {
var v: QuorumSet_Node?
var hadOneofValue = false
if let current = self.member {
hadOneofValue = true
if case .node(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.member = .node(v)
}
}()
case 2: try {
var v: QuorumSet_QuorumSet?
var hadOneofValue = false
if let current = self.member {
hadOneofValue = true
if case .innerSet(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.member = .innerSet(v)
}
}()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
switch self.member {
case .node?: try {
guard case .node(let v)? = self.member else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
}()
case .innerSet?: try {
guard case .innerSet(let v)? = self.member else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: QuorumSet_QuorumSetMember, rhs: QuorumSet_QuorumSetMember) -> Bool {
if lhs.member != rhs.member {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension QuorumSet_QuorumSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".QuorumSet"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "threshold"),
2: .same(proto: "members"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.threshold) }()
case 2: try { try decoder.decodeRepeatedMessageField(value: &self.members) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if self.threshold != 0 {
try visitor.visitSingularUInt32Field(value: self.threshold, fieldNumber: 1)
}
if !self.members.isEmpty {
try visitor.visitRepeatedMessageField(value: self.members, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: QuorumSet_QuorumSet, rhs: QuorumSet_QuorumSet) -> Bool {
if lhs.threshold != rhs.threshold {return false}
if lhs.members != rhs.members {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

View File

@ -62,17 +62,26 @@ public struct Report_Report {
//// This should match fog_report_id in Bob's public_address
public var fogReportID: String = String()
//// The IAS report of the Fog Ingest node.
//// The attestation evidence for the fog ingest node.
////
//// This report structure includes the ingest server's ingress public key.
public var report: External_VerificationReport {
get {return _report ?? External_VerificationReport()}
set {_report = newValue}
//// This includes the ingest server's ingress public key.
public var attestationEvidence: Report_Report.OneOf_AttestationEvidence? = nil
public var verificationReport: External_VerificationReport {
get {
if case .verificationReport(let v)? = attestationEvidence {return v}
return External_VerificationReport()
}
set {attestationEvidence = .verificationReport(newValue)}
}
public var dcapEvidence: External_DcapEvidence {
get {
if case .dcapEvidence(let v)? = attestationEvidence {return v}
return External_DcapEvidence()
}
set {attestationEvidence = .dcapEvidence(newValue)}
}
/// Returns true if `report` has been explicitly set.
public var hasReport: Bool {return self._report != nil}
/// Clears the value of `report`. Subsequent reads from it will return its default value.
public mutating func clearReport() {self._report = nil}
//// The first block index in which a well-formed client may not use this public key.
//// This is the same semantic as tombstone block of a Tx, which is the first block index
@ -87,15 +96,41 @@ public struct Report_Report {
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
//// The attestation evidence for the fog ingest node.
////
//// This includes the ingest server's ingress public key.
public enum OneOf_AttestationEvidence: Equatable {
case verificationReport(External_VerificationReport)
case dcapEvidence(External_DcapEvidence)
fileprivate var _report: External_VerificationReport? = nil
#if !swift(>=4.1)
public static func ==(lhs: Report_Report.OneOf_AttestationEvidence, rhs: Report_Report.OneOf_AttestationEvidence) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.verificationReport, .verificationReport): return {
guard case .verificationReport(let l) = lhs, case .verificationReport(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.dcapEvidence, .dcapEvidence): return {
guard case .dcapEvidence(let l) = lhs, case .dcapEvidence(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension Report_ReportRequest: @unchecked Sendable {}
extension Report_ReportResponse: @unchecked Sendable {}
extension Report_Report: @unchecked Sendable {}
extension Report_Report.OneOf_AttestationEvidence: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
@ -169,7 +204,8 @@ extension Report_Report: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
public static let protoMessageName: String = _protobuf_package + ".Report"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "fog_report_id"),
2: .same(proto: "report"),
2: .standard(proto: "verification_report"),
4: .standard(proto: "dcap_evidence"),
3: .standard(proto: "pubkey_expiry"),
]
@ -180,8 +216,33 @@ extension Report_Report: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.fogReportID) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._report) }()
case 2: try {
var v: External_VerificationReport?
var hadOneofValue = false
if let current = self.attestationEvidence {
hadOneofValue = true
if case .verificationReport(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.attestationEvidence = .verificationReport(v)
}
}()
case 3: try { try decoder.decodeSingularFixed64Field(value: &self.pubkeyExpiry) }()
case 4: try {
var v: External_DcapEvidence?
var hadOneofValue = false
if let current = self.attestationEvidence {
hadOneofValue = true
if case .dcapEvidence(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.attestationEvidence = .dcapEvidence(v)
}
}()
default: break
}
}
@ -195,18 +256,21 @@ extension Report_Report: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
if !self.fogReportID.isEmpty {
try visitor.visitSingularStringField(value: self.fogReportID, fieldNumber: 1)
}
try { if let v = self._report {
try { if case .verificationReport(let v)? = self.attestationEvidence {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
if self.pubkeyExpiry != 0 {
try visitor.visitSingularFixed64Field(value: self.pubkeyExpiry, fieldNumber: 3)
}
try { if case .dcapEvidence(let v)? = self.attestationEvidence {
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Report_Report, rhs: Report_Report) -> Bool {
if lhs.fogReportID != rhs.fogReportID {return false}
if lhs._report != rhs._report {return false}
if lhs.attestationEvidence != rhs.attestationEvidence {return false}
if lhs.pubkeyExpiry != rhs.pubkeyExpiry {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true

View File

@ -22,6 +22,65 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
typealias Version = _2
}
//// The status associated with a MultiViewStoreQueryResponse
public enum FogView_MultiViewStoreQueryResponseStatus: SwiftProtobuf.Enum {
public typealias RawValue = Int
//// Default status. Shouldn't be set explicitly.
case unknown // = 0
//// The Fog View Store successfully fulfilled the request.
case success // = 1
//// The Fog View Store is unable to decrypt a query within the MultiViewStoreQuery. It needs to be authenticated
//// by the router.
case authenticationError // = 2
//// The Fog View Store is not ready to service a MultiViewStoreQueryRequest. This might be because the store has
//// not loaded enough blocks yet.
case notReady // = 3
case UNRECOGNIZED(Int)
public init() {
self = .unknown
}
public init?(rawValue: Int) {
switch rawValue {
case 0: self = .unknown
case 1: self = .success
case 2: self = .authenticationError
case 3: self = .notReady
default: self = .UNRECOGNIZED(rawValue)
}
}
public var rawValue: Int {
switch self {
case .unknown: return 0
case .success: return 1
case .authenticationError: return 2
case .notReady: return 3
case .UNRECOGNIZED(let i): return i
}
}
}
#if swift(>=4.2)
extension FogView_MultiViewStoreQueryResponseStatus: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static let allCases: [FogView_MultiViewStoreQueryResponseStatus] = [
.unknown,
.success,
.authenticationError,
.notReady,
]
}
#endif // swift(>=4.2)
//// Corresponds to and documents values of TxOutSearchResult.result_code
//// If any values are added they must be synced with TxOutSearchResult used in recovery db
public enum FogView_TxOutSearchResultCode: SwiftProtobuf.Enum {
@ -79,7 +138,7 @@ public enum FogView_TxOutSearchResultCode: SwiftProtobuf.Enum {
extension FogView_TxOutSearchResultCode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [FogView_TxOutSearchResultCode] = [
public static let allCases: [FogView_TxOutSearchResultCode] = [
.intentionallyUnused,
.found,
.notFound,
@ -91,6 +150,181 @@ extension FogView_TxOutSearchResultCode: CaseIterable {
#endif // swift(>=4.2)
public struct FogView_FogViewRouterRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var requestData: FogView_FogViewRouterRequest.OneOf_RequestData? = nil
//// This is called to perform IX key exchange
//// with the enclave before making a query call.
public var auth: Attest_AuthMessage {
get {
if case .auth(let v)? = requestData {return v}
return Attest_AuthMessage()
}
set {requestData = .auth(newValue)}
}
//// Input should be an encrypted QueryRequest
public var query: Attest_Message {
get {
if case .query(let v)? = requestData {return v}
return Attest_Message()
}
set {requestData = .query(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_RequestData: Equatable {
//// This is called to perform IX key exchange
//// with the enclave before making a query call.
case auth(Attest_AuthMessage)
//// Input should be an encrypted QueryRequest
case query(Attest_Message)
#if !swift(>=4.1)
public static func ==(lhs: FogView_FogViewRouterRequest.OneOf_RequestData, rhs: FogView_FogViewRouterRequest.OneOf_RequestData) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.auth, .auth): return {
guard case .auth(let l) = lhs, case .auth(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.query, .query): return {
guard case .query(let l) = lhs, case .query(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
public struct FogView_FogViewRouterResponse {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
public var responseData: FogView_FogViewRouterResponse.OneOf_ResponseData? = nil
//// Returned for an auth request.
public var auth: Attest_AuthMessage {
get {
if case .auth(let v)? = responseData {return v}
return Attest_AuthMessage()
}
set {responseData = .auth(newValue)}
}
//// Returned for a query request.
//// The data is an encrypted QueryResponse.
public var query: Attest_Message {
get {
if case .query(let v)? = responseData {return v}
return Attest_Message()
}
set {responseData = .query(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public enum OneOf_ResponseData: Equatable {
//// Returned for an auth request.
case auth(Attest_AuthMessage)
//// Returned for a query request.
//// The data is an encrypted QueryResponse.
case query(Attest_Message)
#if !swift(>=4.1)
public static func ==(lhs: FogView_FogViewRouterResponse.OneOf_ResponseData, rhs: FogView_FogViewRouterResponse.OneOf_ResponseData) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.auth, .auth): return {
guard case .auth(let l) = lhs, case .auth(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.query, .query): return {
guard case .query(let l) = lhs, case .query(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
public struct FogView_MultiViewStoreQueryRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// A list of queries encrypted for Fog View Stores.
public var queries: [Attest_NonceMessage] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
public struct FogView_MultiViewStoreQueryResponse {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// Optional field that gets set when the Fog View Store is able to decrypt a query
//// included in the MultiViewStoreQueryRequest and create a query response for that
/// query.
public var queryResponse: Attest_NonceMessage {
get {return _queryResponse ?? Attest_NonceMessage()}
set {_queryResponse = newValue}
}
/// Returns true if `queryResponse` has been explicitly set.
public var hasQueryResponse: Bool {return self._queryResponse != nil}
/// Clears the value of `queryResponse`. Subsequent reads from it will return its default value.
public mutating func clearQueryResponse() {self._queryResponse = nil}
//// The FogViewStoreUri for the specific Fog View Store that
//// tried to decrypt the MultiViewStoreQueryRequest and failed.
//// The client should subsequently authenticate with the machine
//// described by this URI.
public var storeUri: String = String()
//// Status that gets returned when the Fog View Store services a MultiViewStoreQueryRequest.
public var status: FogView_MultiViewStoreQueryResponseStatus = .unknown
//// The block range that this view store is responsible for based on the store's sharding strategy. Note that this
//// doesn't mean the block ranges that this store has processed. Rather, this is the range of blocks that this
//// store is configured to serve once they become available.
public var blockRange: FogCommon_BlockRange {
get {return _blockRange ?? FogCommon_BlockRange()}
set {_blockRange = newValue}
}
/// Returns true if `blockRange` has been explicitly set.
public var hasBlockRange: Bool {return self._blockRange != nil}
/// Clears the value of `blockRange`. Subsequent reads from it will return its default value.
public mutating func clearBlockRange() {self._blockRange = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _queryResponse: Attest_NonceMessage? = nil
fileprivate var _blockRange: FogCommon_BlockRange? = nil
}
//// There are several kinds of records returned by the fog view API
//// - RngRecords, which a user can use with their private key to construct KexRng's
//// - TxOutSearchResults, which the user can decrypt with their private key to obtain TxOutRecords
@ -228,6 +462,8 @@ public struct FogView_QueryResponse {
public var decommissionedIngestInvocations: [FogView_DecommissionedIngestInvocation] = []
//// Any TxOutSearchResults from the get_txos in the request.
//// TODO: Deprecate this field once clients have been given enough time to upgrade to the new
//// fixed_tx_out_search_result field.
public var txOutSearchResults: [FogView_TxOutSearchResult] = []
//// Extra data: The index of the last known block.
@ -240,6 +476,10 @@ public struct FogView_QueryResponse {
//// This field doesn't have the same "cursor" semantics as the other fields.
public var lastKnownBlockCumulativeTxoCount: UInt64 = 0
//// Any FixedTxOutSearchResults from the get_txos in the request. Will be filled alongside the tx_out_search_result
//// field and contains the same payload data, but in a different format.
public var fixedTxOutSearchResults: [FogView_FixedTxOutSearchResult] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
@ -315,6 +555,40 @@ public struct FogView_TxOutSearchResult {
//// FIXME: MC-1491 ensure this happens either in enclave or db, or wait for ORAM
public var ciphertext: Data = Data()
//// Unused padding that needs to be returned to maintain internal obliviousness.
public var padding: Data = Data()
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
}
//// Contains the same payload data as a TxOutSearchResult, but the payload is contained within a ciphertext of fixed
/// length.
public struct FogView_FixedTxOutSearchResult {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
//// The search key associated to this result
public var searchKey: Data = Data()
//// The result code for the query.
//// This is logically an enum, but should not be an enum because protobuf
//// requires that enums are encoded using the "varint" encoding which is not fixed size.
//// We want that e.g. "Found" and "NotFound" have the same length on the wire to avoid leaking that.
//// So it is a fixed32 in protobuf, and the 0 (default) value is intentionally unused.
public var resultCode: UInt32 = 0
//// A ciphertext, which is a view-key encrypted TxOutRecord in case result_code == 1.
//// FIXME: MC-1491 ensure this happens either in enclave or db, or wait for ORAM
public var ciphertext: Data = Data()
//// The length of the payload that is encrypted in the ciphertext. Ciphertexts will always be of fixed length, but
//// the contained payload may be less than this length, so the rest of the ciphertext is zeroed out. These
//// zeroed bytes should not be interpreted by the client, and this value tells the client which bytes to interpret.
public var payloadLength: UInt32 = 0
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
@ -395,28 +669,95 @@ public struct FogView_TxOutRecord {
public var txOutEMemoData: Data = Data()
//// The masked token id associated to the amount field in the TxOut that was recovered
public var txOutAmountMaskedTokenID: Data = Data()
public var txOutAmountMaskedTokenID: FogView_TxOutRecord.OneOf_TxOutAmountMaskedTokenID? = nil
//// The masked token id associated to the v1 amount field in the TxOut that was recovered
//// The presence of this field indicates that a MaskedAmountV1 object was serialized.
public var txOutAmountMaskedV1TokenID: Data {
get {
if case .txOutAmountMaskedV1TokenID(let v)? = txOutAmountMaskedTokenID {return v}
return Data()
}
set {txOutAmountMaskedTokenID = .txOutAmountMaskedV1TokenID(newValue)}
}
//// The masked token id associated to the v2 amount field in the TxOut that was recovered
//// The presence of this field indicates that a MaskedAmountV2 object was serialized.
public var txOutAmountMaskedV2TokenID: Data {
get {
if case .txOutAmountMaskedV2TokenID(let v)? = txOutAmountMaskedTokenID {return v}
return Data()
}
set {txOutAmountMaskedTokenID = .txOutAmountMaskedV2TokenID(newValue)}
}
public var unknownFields = SwiftProtobuf.UnknownStorage()
//// The masked token id associated to the amount field in the TxOut that was recovered
public enum OneOf_TxOutAmountMaskedTokenID: Equatable {
//// The masked token id associated to the v1 amount field in the TxOut that was recovered
//// The presence of this field indicates that a MaskedAmountV1 object was serialized.
case txOutAmountMaskedV1TokenID(Data)
//// The masked token id associated to the v2 amount field in the TxOut that was recovered
//// The presence of this field indicates that a MaskedAmountV2 object was serialized.
case txOutAmountMaskedV2TokenID(Data)
#if !swift(>=4.1)
public static func ==(lhs: FogView_TxOutRecord.OneOf_TxOutAmountMaskedTokenID, rhs: FogView_TxOutRecord.OneOf_TxOutAmountMaskedTokenID) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.txOutAmountMaskedV1TokenID, .txOutAmountMaskedV1TokenID): return {
guard case .txOutAmountMaskedV1TokenID(let l) = lhs, case .txOutAmountMaskedV1TokenID(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.txOutAmountMaskedV2TokenID, .txOutAmountMaskedV2TokenID): return {
guard case .txOutAmountMaskedV2TokenID(let l) = lhs, case .txOutAmountMaskedV2TokenID(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
public init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension FogView_MultiViewStoreQueryResponseStatus: @unchecked Sendable {}
extension FogView_TxOutSearchResultCode: @unchecked Sendable {}
extension FogView_FogViewRouterRequest: @unchecked Sendable {}
extension FogView_FogViewRouterRequest.OneOf_RequestData: @unchecked Sendable {}
extension FogView_FogViewRouterResponse: @unchecked Sendable {}
extension FogView_FogViewRouterResponse.OneOf_ResponseData: @unchecked Sendable {}
extension FogView_MultiViewStoreQueryRequest: @unchecked Sendable {}
extension FogView_MultiViewStoreQueryResponse: @unchecked Sendable {}
extension FogView_QueryRequestAAD: @unchecked Sendable {}
extension FogView_QueryRequest: @unchecked Sendable {}
extension FogView_QueryResponse: @unchecked Sendable {}
extension FogView_RngRecord: @unchecked Sendable {}
extension FogView_DecommissionedIngestInvocation: @unchecked Sendable {}
extension FogView_TxOutSearchResult: @unchecked Sendable {}
extension FogView_FixedTxOutSearchResult: @unchecked Sendable {}
extension FogView_TxOutRecord: @unchecked Sendable {}
extension FogView_TxOutRecord.OneOf_TxOutAmountMaskedTokenID: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "fog_view"
extension FogView_MultiViewStoreQueryResponseStatus: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "UNKNOWN"),
1: .same(proto: "SUCCESS"),
2: .same(proto: "AUTHENTICATION_ERROR"),
3: .same(proto: "NOT_READY"),
]
}
extension FogView_TxOutSearchResultCode: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "IntentionallyUnused"),
@ -428,6 +769,232 @@ extension FogView_TxOutSearchResultCode: SwiftProtobuf._ProtoNameProviding {
]
}
extension FogView_FogViewRouterRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".FogViewRouterRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "auth"),
2: .same(proto: "query"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try {
var v: Attest_AuthMessage?
var hadOneofValue = false
if let current = self.requestData {
hadOneofValue = true
if case .auth(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.requestData = .auth(v)
}
}()
case 2: try {
var v: Attest_Message?
var hadOneofValue = false
if let current = self.requestData {
hadOneofValue = true
if case .query(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.requestData = .query(v)
}
}()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
switch self.requestData {
case .auth?: try {
guard case .auth(let v)? = self.requestData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
}()
case .query?: try {
guard case .query(let v)? = self.requestData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogView_FogViewRouterRequest, rhs: FogView_FogViewRouterRequest) -> Bool {
if lhs.requestData != rhs.requestData {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogView_FogViewRouterResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".FogViewRouterResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "auth"),
2: .same(proto: "query"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try {
var v: Attest_AuthMessage?
var hadOneofValue = false
if let current = self.responseData {
hadOneofValue = true
if case .auth(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.responseData = .auth(v)
}
}()
case 2: try {
var v: Attest_Message?
var hadOneofValue = false
if let current = self.responseData {
hadOneofValue = true
if case .query(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.responseData = .query(v)
}
}()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
switch self.responseData {
case .auth?: try {
guard case .auth(let v)? = self.responseData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
}()
case .query?: try {
guard case .query(let v)? = self.responseData else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogView_FogViewRouterResponse, rhs: FogView_FogViewRouterResponse) -> Bool {
if lhs.responseData != rhs.responseData {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogView_MultiViewStoreQueryRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".MultiViewStoreQueryRequest"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "queries"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.queries) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.queries.isEmpty {
try visitor.visitRepeatedMessageField(value: self.queries, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogView_MultiViewStoreQueryRequest, rhs: FogView_MultiViewStoreQueryRequest) -> Bool {
if lhs.queries != rhs.queries {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogView_MultiViewStoreQueryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".MultiViewStoreQueryResponse"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "query_response"),
2: .standard(proto: "store_uri"),
3: .same(proto: "status"),
4: .standard(proto: "block_range"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularMessageField(value: &self._queryResponse) }()
case 2: try { try decoder.decodeSingularStringField(value: &self.storeUri) }()
case 3: try { try decoder.decodeSingularEnumField(value: &self.status) }()
case 4: try { try decoder.decodeSingularMessageField(value: &self._blockRange) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._queryResponse {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
if !self.storeUri.isEmpty {
try visitor.visitSingularStringField(value: self.storeUri, fieldNumber: 2)
}
if self.status != .unknown {
try visitor.visitSingularEnumField(value: self.status, fieldNumber: 3)
}
try { if let v = self._blockRange {
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogView_MultiViewStoreQueryResponse, rhs: FogView_MultiViewStoreQueryResponse) -> Bool {
if lhs._queryResponse != rhs._queryResponse {return false}
if lhs.storeUri != rhs.storeUri {return false}
if lhs.status != rhs.status {return false}
if lhs._blockRange != rhs._blockRange {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogView_QueryRequestAAD: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".QueryRequestAAD"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
@ -510,6 +1077,7 @@ extension FogView_QueryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
7: .standard(proto: "tx_out_search_results"),
8: .standard(proto: "last_known_block_count"),
9: .standard(proto: "last_known_block_cumulative_txo_count"),
10: .standard(proto: "fixed_tx_out_search_results"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -527,6 +1095,7 @@ extension FogView_QueryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
case 7: try { try decoder.decodeRepeatedMessageField(value: &self.txOutSearchResults) }()
case 8: try { try decoder.decodeSingularUInt64Field(value: &self.lastKnownBlockCount) }()
case 9: try { try decoder.decodeSingularUInt64Field(value: &self.lastKnownBlockCumulativeTxoCount) }()
case 10: try { try decoder.decodeRepeatedMessageField(value: &self.fixedTxOutSearchResults) }()
default: break
}
}
@ -560,6 +1129,9 @@ extension FogView_QueryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
if self.lastKnownBlockCumulativeTxoCount != 0 {
try visitor.visitSingularUInt64Field(value: self.lastKnownBlockCumulativeTxoCount, fieldNumber: 9)
}
if !self.fixedTxOutSearchResults.isEmpty {
try visitor.visitRepeatedMessageField(value: self.fixedTxOutSearchResults, fieldNumber: 10)
}
try unknownFields.traverse(visitor: &visitor)
}
@ -573,6 +1145,7 @@ extension FogView_QueryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
if lhs.txOutSearchResults != rhs.txOutSearchResults {return false}
if lhs.lastKnownBlockCount != rhs.lastKnownBlockCount {return false}
if lhs.lastKnownBlockCumulativeTxoCount != rhs.lastKnownBlockCumulativeTxoCount {return false}
if lhs.fixedTxOutSearchResults != rhs.fixedTxOutSearchResults {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
@ -670,6 +1243,7 @@ extension FogView_TxOutSearchResult: SwiftProtobuf.Message, SwiftProtobuf._Messa
1: .standard(proto: "search_key"),
2: .standard(proto: "result_code"),
3: .same(proto: "ciphertext"),
4: .same(proto: "padding"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -681,6 +1255,7 @@ extension FogView_TxOutSearchResult: SwiftProtobuf.Message, SwiftProtobuf._Messa
case 1: try { try decoder.decodeSingularBytesField(value: &self.searchKey) }()
case 2: try { try decoder.decodeSingularFixed32Field(value: &self.resultCode) }()
case 3: try { try decoder.decodeSingularBytesField(value: &self.ciphertext) }()
case 4: try { try decoder.decodeSingularBytesField(value: &self.padding) }()
default: break
}
}
@ -696,6 +1271,9 @@ extension FogView_TxOutSearchResult: SwiftProtobuf.Message, SwiftProtobuf._Messa
if !self.ciphertext.isEmpty {
try visitor.visitSingularBytesField(value: self.ciphertext, fieldNumber: 3)
}
if !self.padding.isEmpty {
try visitor.visitSingularBytesField(value: self.padding, fieldNumber: 4)
}
try unknownFields.traverse(visitor: &visitor)
}
@ -703,6 +1281,57 @@ extension FogView_TxOutSearchResult: SwiftProtobuf.Message, SwiftProtobuf._Messa
if lhs.searchKey != rhs.searchKey {return false}
if lhs.resultCode != rhs.resultCode {return false}
if lhs.ciphertext != rhs.ciphertext {return false}
if lhs.padding != rhs.padding {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension FogView_FixedTxOutSearchResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".FixedTxOutSearchResult"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "search_key"),
2: .standard(proto: "result_code"),
3: .same(proto: "ciphertext"),
4: .standard(proto: "payload_length"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularBytesField(value: &self.searchKey) }()
case 2: try { try decoder.decodeSingularFixed32Field(value: &self.resultCode) }()
case 3: try { try decoder.decodeSingularBytesField(value: &self.ciphertext) }()
case 4: try { try decoder.decodeSingularFixed32Field(value: &self.payloadLength) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.searchKey.isEmpty {
try visitor.visitSingularBytesField(value: self.searchKey, fieldNumber: 1)
}
if self.resultCode != 0 {
try visitor.visitSingularFixed32Field(value: self.resultCode, fieldNumber: 2)
}
if !self.ciphertext.isEmpty {
try visitor.visitSingularBytesField(value: self.ciphertext, fieldNumber: 3)
}
if self.payloadLength != 0 {
try visitor.visitSingularFixed32Field(value: self.payloadLength, fieldNumber: 4)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: FogView_FixedTxOutSearchResult, rhs: FogView_FixedTxOutSearchResult) -> Bool {
if lhs.searchKey != rhs.searchKey {return false}
if lhs.resultCode != rhs.resultCode {return false}
if lhs.ciphertext != rhs.ciphertext {return false}
if lhs.payloadLength != rhs.payloadLength {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
@ -720,7 +1349,8 @@ extension FogView_TxOutRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl
7: .same(proto: "timestamp"),
8: .standard(proto: "tx_out_amount_commitment_data_crc32"),
9: .standard(proto: "tx_out_e_memo_data"),
10: .standard(proto: "tx_out_amount_masked_token_id"),
10: .standard(proto: "tx_out_amount_masked_v1_token_id"),
11: .standard(proto: "tx_out_amount_masked_v2_token_id"),
]
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -738,13 +1368,32 @@ extension FogView_TxOutRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl
case 7: try { try decoder.decodeSingularFixed64Field(value: &self.timestamp) }()
case 8: try { try decoder.decodeSingularFixed32Field(value: &self.txOutAmountCommitmentDataCrc32) }()
case 9: try { try decoder.decodeSingularBytesField(value: &self.txOutEMemoData) }()
case 10: try { try decoder.decodeSingularBytesField(value: &self.txOutAmountMaskedTokenID) }()
case 10: try {
var v: Data?
try decoder.decodeSingularBytesField(value: &v)
if let v = v {
if self.txOutAmountMaskedTokenID != nil {try decoder.handleConflictingOneOf()}
self.txOutAmountMaskedTokenID = .txOutAmountMaskedV1TokenID(v)
}
}()
case 11: try {
var v: Data?
try decoder.decodeSingularBytesField(value: &v)
if let v = v {
if self.txOutAmountMaskedTokenID != nil {try decoder.handleConflictingOneOf()}
self.txOutAmountMaskedTokenID = .txOutAmountMaskedV2TokenID(v)
}
}()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if !self.txOutAmountCommitmentData.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutAmountCommitmentData, fieldNumber: 1)
}
@ -772,8 +1421,16 @@ extension FogView_TxOutRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl
if !self.txOutEMemoData.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutEMemoData, fieldNumber: 9)
}
if !self.txOutAmountMaskedTokenID.isEmpty {
try visitor.visitSingularBytesField(value: self.txOutAmountMaskedTokenID, fieldNumber: 10)
switch self.txOutAmountMaskedTokenID {
case .txOutAmountMaskedV1TokenID?: try {
guard case .txOutAmountMaskedV1TokenID(let v)? = self.txOutAmountMaskedTokenID else { preconditionFailure() }
try visitor.visitSingularBytesField(value: v, fieldNumber: 10)
}()
case .txOutAmountMaskedV2TokenID?: try {
guard case .txOutAmountMaskedV2TokenID(let v)? = self.txOutAmountMaskedTokenID else { preconditionFailure() }
try visitor.visitSingularBytesField(value: v, fieldNumber: 11)
}()
case nil: break
}
try unknownFields.traverse(visitor: &visitor)
}

View File

@ -86,7 +86,7 @@ public enum Watcher_TimestampResultCode: SwiftProtobuf.Enum {
extension Watcher_TimestampResultCode: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
public static var allCases: [Watcher_TimestampResultCode] = [
public static let allCases: [Watcher_TimestampResultCode] = [
.unusedField,
.timestampFound,
.watcherBehind,

View File

@ -21,6 +21,9 @@
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf

View File

@ -21,6 +21,9 @@
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf

View File

@ -21,6 +21,9 @@
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf

View File

@ -21,10 +21,233 @@
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf
/// Usage: instantiate `FogLedger_LedgerAPIClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_LedgerAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogLedger_LedgerAPIClientInterceptorFactoryProtocol? { get }
func request(
callOptions: CallOptions?,
handler: @escaping (FogLedger_LedgerResponse) -> Void
) -> BidirectionalStreamingCall<FogLedger_LedgerRequest, FogLedger_LedgerResponse>
}
extension FogLedger_LedgerAPIClientProtocol {
public var serviceName: String {
return "fog_ledger.LedgerAPI"
}
/// Bidirectional streaming call to Request
///
/// Callers should use the `send` method on the returned object to send messages
/// to the server. The caller should send an `.end` after the final message has been sent.
///
/// - Parameters:
/// - callOptions: Call options.
/// - handler: A closure called when each response is received from the server.
/// - Returns: A `ClientStreamingCall` with futures for the metadata and status.
public func request(
callOptions: CallOptions? = nil,
handler: @escaping (FogLedger_LedgerResponse) -> Void
) -> BidirectionalStreamingCall<FogLedger_LedgerRequest, FogLedger_LedgerResponse> {
return self.makeBidirectionalStreamingCall(
path: "/fog_ledger.LedgerAPI/Request",
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeRequestInterceptors() ?? [],
handler: handler
)
}
}
public protocol FogLedger_LedgerAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'request'.
func makeRequestInterceptors() -> [ClientInterceptor<FogLedger_LedgerRequest, FogLedger_LedgerResponse>]
}
public final class FogLedger_LedgerAPIClient: FogLedger_LedgerAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogLedger_LedgerAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_ledger.LedgerAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogLedger_LedgerAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// Usage: instantiate `FogLedger_LedgerRouterAdminAPIClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_LedgerRouterAdminAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogLedger_LedgerRouterAdminAPIClientInterceptorFactoryProtocol? { get }
func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: CallOptions?
) -> UnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty>
}
extension FogLedger_LedgerRouterAdminAPIClientProtocol {
public var serviceName: String {
return "fog_ledger.LedgerRouterAdminAPI"
}
/// Adds a shard to the Fog Ledger Router's list of shards to query.
///
/// - Parameters:
/// - request: Request to send to AddShard.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty> {
return self.makeUnaryCall(
path: "/fog_ledger.LedgerRouterAdminAPI/AddShard",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeAddShardInterceptors() ?? []
)
}
}
public protocol FogLedger_LedgerRouterAdminAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'addShard'.
func makeAddShardInterceptors() -> [ClientInterceptor<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty>]
}
public final class FogLedger_LedgerRouterAdminAPIClient: FogLedger_LedgerRouterAdminAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogLedger_LedgerRouterAdminAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_ledger.LedgerRouterAdminAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogLedger_LedgerRouterAdminAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
//// Fulfills requests sent by the Fog Ledger Router. This is not meant to fulfill requests sent directly by the client.
///
/// Usage: instantiate `FogLedger_KeyImageStoreAPIClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_KeyImageStoreAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogLedger_KeyImageStoreAPIClientInterceptorFactoryProtocol? { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions?
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func multiKeyImageStoreQuery(
_ request: FogLedger_MultiKeyImageStoreRequest,
callOptions: CallOptions?
) -> UnaryCall<FogLedger_MultiKeyImageStoreRequest, FogLedger_MultiKeyImageStoreResponse>
}
extension FogLedger_KeyImageStoreAPIClientProtocol {
public var serviceName: String {
return "fog_ledger.KeyImageStoreAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: "/fog_ledger.KeyImageStoreAPI/Auth",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeAuthInterceptors() ?? []
)
}
//// Input should be an encrypted MultiKeyImageStoreRequest, result is an encrypted response.
///
/// - Parameters:
/// - request: Request to send to MultiKeyImageStoreQuery.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func multiKeyImageStoreQuery(
_ request: FogLedger_MultiKeyImageStoreRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<FogLedger_MultiKeyImageStoreRequest, FogLedger_MultiKeyImageStoreResponse> {
return self.makeUnaryCall(
path: "/fog_ledger.KeyImageStoreAPI/MultiKeyImageStoreQuery",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeMultiKeyImageStoreQueryInterceptors() ?? []
)
}
}
public protocol FogLedger_KeyImageStoreAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'auth'.
func makeAuthInterceptors() -> [ClientInterceptor<Attest_AuthMessage, Attest_AuthMessage>]
/// - Returns: Interceptors to use when invoking 'multiKeyImageStoreQuery'.
func makeMultiKeyImageStoreQueryInterceptors() -> [ClientInterceptor<FogLedger_MultiKeyImageStoreRequest, FogLedger_MultiKeyImageStoreResponse>]
}
public final class FogLedger_KeyImageStoreAPIClient: FogLedger_KeyImageStoreAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogLedger_KeyImageStoreAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_ledger.KeyImageStoreAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogLedger_KeyImageStoreAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// Usage: instantiate `FogLedger_FogMerkleProofAPIClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_FogMerkleProofAPIClientProtocol: GRPCClient {
var serviceName: String { get }

View File

@ -0,0 +1,93 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: mistyswap_common.proto
//
//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf
/// Usage: instantiate `MistyswapCommon_MistyswapCommonApiClient`, then call methods of this protocol to make API calls.
public protocol MistyswapCommon_MistyswapCommonApiClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: MistyswapCommon_MistyswapCommonApiClientInterceptorFactoryProtocol? { get }
func getInfo(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: CallOptions?
) -> UnaryCall<SwiftProtobuf.Google_Protobuf_Empty, MistyswapCommon_GetInfoResponse>
}
extension MistyswapCommon_MistyswapCommonApiClientProtocol {
public var serviceName: String {
return "mistyswap_common.MistyswapCommonApi"
}
//// Get information about this mistyswap instance.
///
/// - Parameters:
/// - request: Request to send to GetInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getInfo(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: CallOptions? = nil
) -> UnaryCall<SwiftProtobuf.Google_Protobuf_Empty, MistyswapCommon_GetInfoResponse> {
return self.makeUnaryCall(
path: "/mistyswap_common.MistyswapCommonApi/GetInfo",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetInfoInterceptors() ?? []
)
}
}
public protocol MistyswapCommon_MistyswapCommonApiClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'getInfo'.
func makeGetInfoInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, MistyswapCommon_GetInfoResponse>]
}
public final class MistyswapCommon_MistyswapCommonApiClient: MistyswapCommon_MistyswapCommonApiClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: MistyswapCommon_MistyswapCommonApiClientInterceptorFactoryProtocol?
/// Creates a client for the mistyswap_common.MistyswapCommonApi service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: MistyswapCommon_MistyswapCommonApiClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}

View File

@ -0,0 +1,175 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: mistyswap_offramp.proto
//
//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf
/// Usage: instantiate `MistyswapOfframp_MistyswapOfframpApiClient`, then call methods of this protocol to make API calls.
public protocol MistyswapOfframp_MistyswapOfframpApiClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: MistyswapOfframp_MistyswapOfframpApiClientInterceptorFactoryProtocol? { get }
func initiateOfframp(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
func forgetOfframp(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
func getOfframpStatus(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
func getOfframpDebugInfo(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
}
extension MistyswapOfframp_MistyswapOfframpApiClientProtocol {
public var serviceName: String {
return "mistyswap_offramp.MistyswapOfframpApi"
}
//// Initiate (or pick up a previously initiated) offramp.
//// Input should be an encrypted InitiateOfframpRequest, output is an encrypted InitiateOfframpResponse.
///
/// - Parameters:
/// - request: Request to send to InitiateOfframp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func initiateOfframp(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_offramp.MistyswapOfframpApi/InitiateOfframp",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeInitiateOfframpInterceptors() ?? []
)
}
//// Forget an offramp.
//// Input should be an encrypted ForgetOfframpRequest, output is an encrypted ForgetOfframpResponse.
///
/// - Parameters:
/// - request: Request to send to ForgetOfframp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func forgetOfframp(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_offramp.MistyswapOfframpApi/ForgetOfframp",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeForgetOfframpInterceptors() ?? []
)
}
//// Get the status of an offramp.
//// Input should be an encrypted GetOfframpStatusRequest, output is an encrypted GetOfframpStatusResponse.
///
/// - Parameters:
/// - request: Request to send to GetOfframpStatus.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOfframpStatus(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_offramp.MistyswapOfframpApi/GetOfframpStatus",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetOfframpStatusInterceptors() ?? []
)
}
//// Get debug info.
//// Input should be an encrypted GetOfframpDebugInfoRequest, output is an encrypted GetOfframpDebugInfoResponse.
///
/// - Parameters:
/// - request: Request to send to GetOfframpDebugInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOfframpDebugInfo(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_offramp.MistyswapOfframpApi/GetOfframpDebugInfo",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetOfframpDebugInfoInterceptors() ?? []
)
}
}
public protocol MistyswapOfframp_MistyswapOfframpApiClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'initiateOfframp'.
func makeInitiateOfframpInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
/// - Returns: Interceptors to use when invoking 'forgetOfframp'.
func makeForgetOfframpInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
/// - Returns: Interceptors to use when invoking 'getOfframpStatus'.
func makeGetOfframpStatusInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
/// - Returns: Interceptors to use when invoking 'getOfframpDebugInfo'.
func makeGetOfframpDebugInfoInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
}
public final class MistyswapOfframp_MistyswapOfframpApiClient: MistyswapOfframp_MistyswapOfframpApiClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: MistyswapOfframp_MistyswapOfframpApiClientInterceptorFactoryProtocol?
/// Creates a client for the mistyswap_offramp.MistyswapOfframpApi service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: MistyswapOfframp_MistyswapOfframpApiClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}

View File

@ -0,0 +1,175 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: mistyswap_onramp.proto
//
//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf
/// Usage: instantiate `MistyswapOnramp_MistyswapOnrampApiClient`, then call methods of this protocol to make API calls.
public protocol MistyswapOnramp_MistyswapOnrampApiClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: MistyswapOnramp_MistyswapOnrampApiClientInterceptorFactoryProtocol? { get }
func setupOnramp(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
func forgetOnramp(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
func getOnrampStatus(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
func getOnrampDebugInfo(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
}
extension MistyswapOnramp_MistyswapOnrampApiClientProtocol {
public var serviceName: String {
return "mistyswap_onramp.MistyswapOnrampApi"
}
//// Setup onramping (or check if it is already setup).
//// Input should be an encrypted SetupOnrampRequest, output is an encrypted SetupOnrampResponse.
///
/// - Parameters:
/// - request: Request to send to SetupOnramp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func setupOnramp(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_onramp.MistyswapOnrampApi/SetupOnramp",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeSetupOnrampInterceptors() ?? []
)
}
//// Forget an onramp.
//// Input should be an encrypted ForgetOnrampRequest, output is an encrypted ForgetOnrampResponse.
///
/// - Parameters:
/// - request: Request to send to ForgetOnramp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func forgetOnramp(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_onramp.MistyswapOnrampApi/ForgetOnramp",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeForgetOnrampInterceptors() ?? []
)
}
//// Get the status of an onramp.
//// Input should be an encrypted GetOnrampStatusRequest, output is an encrypted GetOnrampStatusResponse.
///
/// - Parameters:
/// - request: Request to send to GetOnrampStatus.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOnrampStatus(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_onramp.MistyswapOnrampApi/GetOnrampStatus",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetOnrampStatusInterceptors() ?? []
)
}
//// Get debug info.
//// Input should be an encrypted GetOnrampDebugInfoRequest, output is an encrypted GetOnrampDebugInfoResponse.
///
/// - Parameters:
/// - request: Request to send to GetOnrampDebugInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOnrampDebugInfo(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/mistyswap_onramp.MistyswapOnrampApi/GetOnrampDebugInfo",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetOnrampDebugInfoInterceptors() ?? []
)
}
}
public protocol MistyswapOnramp_MistyswapOnrampApiClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'setupOnramp'.
func makeSetupOnrampInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
/// - Returns: Interceptors to use when invoking 'forgetOnramp'.
func makeForgetOnrampInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
/// - Returns: Interceptors to use when invoking 'getOnrampStatus'.
func makeGetOnrampStatusInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
/// - Returns: Interceptors to use when invoking 'getOnrampDebugInfo'.
func makeGetOnrampDebugInfoInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
}
public final class MistyswapOnramp_MistyswapOnrampApiClient: MistyswapOnramp_MistyswapOnrampApiClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: MistyswapOnramp_MistyswapOnrampApiClientInterceptorFactoryProtocol?
/// Creates a client for the mistyswap_onramp.MistyswapOnrampApi service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: MistyswapOnramp_MistyswapOnrampApiClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}

View File

@ -21,6 +21,9 @@
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf

View File

@ -0,0 +1,344 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: view.proto
//
//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import GRPC
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
import NIO
import SwiftProtobuf
//// A single Duplex streaming API that allows clients to authorize with Fog View and
//// query it for TxOuts.
///
/// Usage: instantiate `FogView_FogViewRouterAPIClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewRouterAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogView_FogViewRouterAPIClientInterceptorFactoryProtocol? { get }
func request(
callOptions: CallOptions?,
handler: @escaping (FogView_FogViewRouterResponse) -> Void
) -> BidirectionalStreamingCall<FogView_FogViewRouterRequest, FogView_FogViewRouterResponse>
}
extension FogView_FogViewRouterAPIClientProtocol {
public var serviceName: String {
return "fog_view.FogViewRouterAPI"
}
/// Bidirectional streaming call to request
///
/// Callers should use the `send` method on the returned object to send messages
/// to the server. The caller should send an `.end` after the final message has been sent.
///
/// - Parameters:
/// - callOptions: Call options.
/// - handler: A closure called when each response is received from the server.
/// - Returns: A `ClientStreamingCall` with futures for the metadata and status.
public func request(
callOptions: CallOptions? = nil,
handler: @escaping (FogView_FogViewRouterResponse) -> Void
) -> BidirectionalStreamingCall<FogView_FogViewRouterRequest, FogView_FogViewRouterResponse> {
return self.makeBidirectionalStreamingCall(
path: "/fog_view.FogViewRouterAPI/request",
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makerequestInterceptors() ?? [],
handler: handler
)
}
}
public protocol FogView_FogViewRouterAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'request'.
func makerequestInterceptors() -> [ClientInterceptor<FogView_FogViewRouterRequest, FogView_FogViewRouterResponse>]
}
public final class FogView_FogViewRouterAPIClient: FogView_FogViewRouterAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogView_FogViewRouterAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_view.FogViewRouterAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogView_FogViewRouterAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// Usage: instantiate `FogView_FogViewRouterAdminAPIClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewRouterAdminAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogView_FogViewRouterAdminAPIClientInterceptorFactoryProtocol? { get }
func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: CallOptions?
) -> UnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty>
}
extension FogView_FogViewRouterAdminAPIClientProtocol {
public var serviceName: String {
return "fog_view.FogViewRouterAdminAPI"
}
/// Adds a shard to the Fog View Router's list of shards to query.
///
/// - Parameters:
/// - request: Request to send to addShard.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty> {
return self.makeUnaryCall(
path: "/fog_view.FogViewRouterAdminAPI/addShard",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeaddShardInterceptors() ?? []
)
}
}
public protocol FogView_FogViewRouterAdminAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'addShard'.
func makeaddShardInterceptors() -> [ClientInterceptor<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty>]
}
public final class FogView_FogViewRouterAdminAPIClient: FogView_FogViewRouterAdminAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogView_FogViewRouterAdminAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_view.FogViewRouterAdminAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogView_FogViewRouterAdminAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
//// Fulfills requests sent directly by a Fog client, e.g. a mobile phone using the SDK.
///
/// Usage: instantiate `FogView_FogViewAPIClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogView_FogViewAPIClientInterceptorFactoryProtocol? { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions?
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func query(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
}
extension FogView_FogViewAPIClientProtocol {
public var serviceName: String {
return "fog_view.FogViewAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: "/fog_view.FogViewAPI/Auth",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeAuthInterceptors() ?? []
)
}
//// Input should be an encrypted QueryRequest, result is an encrypted QueryResponse
///
/// - Parameters:
/// - request: Request to send to Query.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func query(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/fog_view.FogViewAPI/Query",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeQueryInterceptors() ?? []
)
}
}
public protocol FogView_FogViewAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'auth'.
func makeAuthInterceptors() -> [ClientInterceptor<Attest_AuthMessage, Attest_AuthMessage>]
/// - Returns: Interceptors to use when invoking 'query'.
func makeQueryInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
}
public final class FogView_FogViewAPIClient: FogView_FogViewAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogView_FogViewAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_view.FogViewAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogView_FogViewAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
//// Fulfills requests sent by the Fog View Router. This is not meant to fulfill requests sent directly by the client.
///
/// Usage: instantiate `FogView_FogViewStoreAPIClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewStoreAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogView_FogViewStoreAPIClientInterceptorFactoryProtocol? { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions?
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func multiViewStoreQuery(
_ request: FogView_MultiViewStoreQueryRequest,
callOptions: CallOptions?
) -> UnaryCall<FogView_MultiViewStoreQueryRequest, FogView_MultiViewStoreQueryResponse>
}
extension FogView_FogViewStoreAPIClientProtocol {
public var serviceName: String {
return "fog_view.FogViewStoreAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: "/fog_view.FogViewStoreAPI/Auth",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeAuthInterceptors() ?? []
)
}
//// Input should be an encrypted MultiViewStoreQueryRequest, result is an encrypted QueryResponse.
///
/// - Parameters:
/// - request: Request to send to MultiViewStoreQuery.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func multiViewStoreQuery(
_ request: FogView_MultiViewStoreQueryRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<FogView_MultiViewStoreQueryRequest, FogView_MultiViewStoreQueryResponse> {
return self.makeUnaryCall(
path: "/fog_view.FogViewStoreAPI/MultiViewStoreQuery",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeMultiViewStoreQueryInterceptors() ?? []
)
}
}
public protocol FogView_FogViewStoreAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'auth'.
func makeAuthInterceptors() -> [ClientInterceptor<Attest_AuthMessage, Attest_AuthMessage>]
/// - Returns: Interceptors to use when invoking 'multiViewStoreQuery'.
func makeMultiViewStoreQueryInterceptors() -> [ClientInterceptor<FogView_MultiViewStoreQueryRequest, FogView_MultiViewStoreQueryResponse>]
}
public final class FogView_FogViewStoreAPIClient: FogView_FogViewStoreAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogView_FogViewStoreAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_view.FogViewStoreAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogView_FogViewStoreAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}

View File

@ -1,116 +0,0 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: view.proto
//
//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import GRPC
import NIO
import SwiftProtobuf
/// Usage: instantiate `FogView_FogViewAPIClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewAPIClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: FogView_FogViewAPIClientInterceptorFactoryProtocol? { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions?
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func query(
_ request: Attest_Message,
callOptions: CallOptions?
) -> UnaryCall<Attest_Message, Attest_Message>
}
extension FogView_FogViewAPIClientProtocol {
public var serviceName: String {
return "fog_view.FogViewAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: "/fog_view.FogViewAPI/Auth",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeAuthInterceptors() ?? []
)
}
//// Input should be an encrypted QueryRequest, result is an encrypted QueryResponse
///
/// - Parameters:
/// - request: Request to send to Query.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func query(
_ request: Attest_Message,
callOptions: CallOptions? = nil
) -> UnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: "/fog_view.FogViewAPI/Query",
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeQueryInterceptors() ?? []
)
}
}
public protocol FogView_FogViewAPIClientInterceptorFactoryProtocol {
/// - Returns: Interceptors to use when invoking 'auth'.
func makeAuthInterceptors() -> [ClientInterceptor<Attest_AuthMessage, Attest_AuthMessage>]
/// - Returns: Interceptors to use when invoking 'query'.
func makeQueryInterceptors() -> [ClientInterceptor<Attest_Message, Attest_Message>]
}
public final class FogView_FogViewAPIClient: FogView_FogViewAPIClientProtocol {
public let channel: GRPCChannel
public var defaultCallOptions: CallOptions
public var interceptors: FogView_FogViewAPIClientInterceptorFactoryProtocol?
/// Creates a client for the fog_view.FogViewAPI service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
public init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: FogView_FogViewAPIClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}

View File

@ -0,0 +1,21 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct HTTPCallOptions {
public var headers: [String: String]
public var timeoutIntervalForRequest: TimeInterval?
public var timeoutIntervalForResource: TimeInterval?
}
extension HTTPCallOptions {
public init() {
self.init(headers: [:], timeoutIntervalForRequest: 30, timeoutIntervalForResource: 30)
}
public init(headers: [String: String]) {
self.init(headers: headers, timeoutIntervalForRequest: 30, timeoutIntervalForResource: 30)
}
}

View File

@ -0,0 +1,9 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public enum HTTPCallType {
case unary
}

View File

@ -0,0 +1,31 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import SwiftProtobuf
/// A HTTP client.
public protocol HTTPClient {
/// The call options to use should the user not provide per-call options.
var defaultHTTPCallOptions: HTTPCallOptions { get set }
}
extension HTTPClient {
public func makeUnaryCall<Request, Response>(
path: String,
request: Request,
callOptions: HTTPCallOptions? = nil,
responseType: Response.Type = Response.self
) -> HTTPUnaryCall<
Request,
Response
> where Request: SwiftProtobuf.Message, Response: SwiftProtobuf.Message
{
HTTPUnaryCall(
path: path,
options: callOptions,
requestPayload: request,
responseType: responseType)
}
}

View File

@ -0,0 +1,38 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import SwiftProtobuf
public protocol HTTPClientCall {
/// The type of the request message for the call.
associatedtype RequestPayload: SwiftProtobuf.Message
/// The type of the response message for the call.
associatedtype ResponsePayload: SwiftProtobuf.Message
/// The resource path (generated)
var path: String { get }
/// The http method to use for the call
var method: HTTPMethod { get }
var requestPayload: RequestPayload? { get set }
/// The response message returned from the service if the call is successful. This may be failed
/// if the call encounters an error.
///
/// Callers should rely on the `status` of the call for the canonical outcome.
var responseType: ResponsePayload.Type { get set }
/// The options used to make the session.
var options: HTTPCallOptions? { get }
/// Response metadata.
var metadata: HTTPURLResponse? { get }
/// Status of this call.
///
var status: HTTPStatus? { get }
}

View File

@ -0,0 +1,14 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public enum HTTPMethod: String {
case GET
case POST
case PUT
case HEAD
case PATCH
case DELETE
}

View File

@ -0,0 +1,11 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct HTTPMethodDescriptor {
let name: String
let path: String
let type: HTTPCallType
}

View File

@ -0,0 +1,33 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct HTTPResponse {
public let statusCode: Int
public let url: URL?
public let allHeaderFields: [AnyHashable: Any]
public let responseData: Data?
public init(
statusCode: Int,
url: URL?,
allHeaderFields: [AnyHashable: Any],
responseData: Data?
) {
self.statusCode = statusCode
self.url = url
self.allHeaderFields = allHeaderFields
self.responseData = responseData
}
}
extension HTTPResponse {
public init(httpUrlResponse: HTTPURLResponse, responseData: Data?) {
self.statusCode = httpUrlResponse.statusCode
self.url = httpUrlResponse.url
self.allHeaderFields = httpUrlResponse.allHeaderFields
self.responseData = responseData
}
}

View File

@ -0,0 +1,11 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct HTTPServiceDescriptor {
public let name: String
public let fullName: String
public let methods: [HTTPMethodDescriptor]
}

View File

@ -0,0 +1,61 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
/// Encapsulates the result of a HTTP call.
public struct HTTPStatus {
/// The REST status code
public var code: Int
/// The status message
public var message: String?
/// Whether the status is '.ok'.
public var isOk: Bool {
(200...299).contains(code)
}
/// The default status to return for succeeded calls.
///
/// - Important: This should *not* be used when checking whether a returned status has an 'ok'
/// status code. Use `HTTPStatus.isOk` or check the code directly.
public static let ok: HTTPStatus = .init(code: 200, message: "Success")
/// "Internal server error" status.
public static let processingError: HTTPStatus = .init(code: 500, message: "Error")
public init(code: Int, message: String? = nil) {
self.code = code
self.message = message
}
}
extension HTTPStatus: CustomStringConvertible {
public var description: String {
codeDescription + (["", message].compactMap({ $0 }).joined(separator: " "))
}
private var codeDescription: String {
switch code {
case 200:
return "Success: "
case 400:
return "Invalid Arguments: "
case 403:
return "Unauthorized: "
case 404:
return "Not Found: "
case 500:
return "Error: "
case 501:
return "Unimplemented: "
case 503:
return "Unavailable: "
default:
return "Unknown Error: "
}
}
}

View File

@ -0,0 +1,37 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import SwiftProtobuf
/// A unary http call. The request is sent on initialization.
///
/// Note: while this object is a `struct`, its implementation delegates to `Call`. It therefore
/// has reference semantics.
public struct HTTPUnaryCall<
RequestPayload: SwiftProtobuf.Message,
ResponsePayload: SwiftProtobuf.Message
>: HTTPClientCall {
public var path: String
public var method: HTTPMethod = .POST
public var response: ResponsePayload?
/// The options used in the URLSession
public var options: HTTPCallOptions?
/// The initial metadata returned from the server.
public var metadata: HTTPURLResponse?
/// The request message sent to the server
public var requestPayload: RequestPayload?
/// The response returned by the server.
public var responseType: ResponsePayload.Type
public var responsePayload: ResponsePayload?
/// The final status of the the RPC.
public var status: HTTPStatus?
}

View File

@ -0,0 +1,110 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: attest.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
//// A server-authenticated service for SGX enclaves. The responder is the
//// attesting enclave, and the client is unauthenticated. When described
//// within the noise protocol, this is similar to the "IX" style key exchange:
////
//// ```txt
//// IX:
//// -> e, s
//// <- e, ee, se, s, es
//// ->
//// <-
//// ```
////
//// The first two messages are contained within the Auth and AuthResponse
///
/// Usage: instantiate `Attest_AttestedApiRestClient`, then call methods of this protocol to make API calls.
public protocol Attest_AttestedApiRestClientProtocol: HTTPClient {
var serviceName: String { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage>
}
extension Attest_AttestedApiRestClientProtocol {
public var serviceName: String {
return "attest.AttestedApi"
}
//// This API call is made when one enclave wants to start a mutually-
//// authenticated key-exchange session with an enclave.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: Attest_AttestedApiClientMetadata.Methods.auth.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class Attest_AttestedApiRestClient: Attest_AttestedApiRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the attest.AttestedApi service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum Attest_AttestedApiClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "AttestedApi",
fullName: "attest.AttestedApi",
methods: [
Attest_AttestedApiClientMetadata.Methods.auth,
]
)
public enum Methods {
public static let auth = HTTPMethodDescriptor(
name: "Auth",
path: "/attest.AttestedApi/Auth",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,183 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: consensus_client.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
/// Usage: instantiate `ConsensusClient_ConsensusClientAPIRestClient`, then call methods of this protocol to make API calls.
public protocol ConsensusClient_ConsensusClientAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func clientTxPropose(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, ConsensusCommon_ProposeTxResponse>
func proposeMintConfigTx(
_ request: External_MintConfigTx,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<External_MintConfigTx, ConsensusClient_ProposeMintConfigTxResponse>
func proposeMintTx(
_ request: External_MintTx,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<External_MintTx, ConsensusClient_ProposeMintTxResponse>
func getNodeConfig(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, ConsensusConfig_ConsensusNodeConfig>
}
extension ConsensusClient_ConsensusClientAPIRestClientProtocol {
public var serviceName: String {
return "consensus_client.ConsensusClientAPI"
}
//// This API call is made with an encrypted payload for the enclave,
//// indicating a new value to be acted upon.
///
/// - Parameters:
/// - request: Request to send to ClientTxPropose.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func clientTxPropose(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, ConsensusCommon_ProposeTxResponse> {
return self.makeUnaryCall(
path: ConsensusClient_ConsensusClientAPIClientMetadata.Methods.clientTxPropose.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Propose a new MintConfigTx.
///
/// - Parameters:
/// - request: Request to send to ProposeMintConfigTx.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func proposeMintConfigTx(
_ request: External_MintConfigTx,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<External_MintConfigTx, ConsensusClient_ProposeMintConfigTxResponse> {
return self.makeUnaryCall(
path: ConsensusClient_ConsensusClientAPIClientMetadata.Methods.proposeMintConfigTx.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Propose a new MintTx.
///
/// - Parameters:
/// - request: Request to send to ProposeMintTx.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func proposeMintTx(
_ request: External_MintTx,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<External_MintTx, ConsensusClient_ProposeMintTxResponse> {
return self.makeUnaryCall(
path: ConsensusClient_ConsensusClientAPIClientMetadata.Methods.proposeMintTx.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Get current node configuration.
///
/// - Parameters:
/// - request: Request to send to GetNodeConfig.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getNodeConfig(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, ConsensusConfig_ConsensusNodeConfig> {
return self.makeUnaryCall(
path: ConsensusClient_ConsensusClientAPIClientMetadata.Methods.getNodeConfig.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class ConsensusClient_ConsensusClientAPIRestClient: ConsensusClient_ConsensusClientAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the consensus_client.ConsensusClientAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum ConsensusClient_ConsensusClientAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "ConsensusClientAPI",
fullName: "consensus_client.ConsensusClientAPI",
methods: [
ConsensusClient_ConsensusClientAPIClientMetadata.Methods.clientTxPropose,
ConsensusClient_ConsensusClientAPIClientMetadata.Methods.proposeMintConfigTx,
ConsensusClient_ConsensusClientAPIClientMetadata.Methods.proposeMintTx,
ConsensusClient_ConsensusClientAPIClientMetadata.Methods.getNodeConfig,
]
)
public enum Methods {
public static let clientTxPropose = HTTPMethodDescriptor(
name: "ClientTxPropose",
path: "/consensus_client.ConsensusClientAPI/ClientTxPropose",
type: HTTPCallType.unary
)
public static let proposeMintConfigTx = HTTPMethodDescriptor(
name: "ProposeMintConfigTx",
path: "/consensus_client.ConsensusClientAPI/ProposeMintConfigTx",
type: HTTPCallType.unary
)
public static let proposeMintTx = HTTPMethodDescriptor(
name: "ProposeMintTx",
path: "/consensus_client.ConsensusClientAPI/ProposeMintTx",
type: HTTPCallType.unary
)
public static let getNodeConfig = HTTPMethodDescriptor(
name: "GetNodeConfig",
path: "/consensus_client.ConsensusClientAPI/GetNodeConfig",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,126 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: consensus_common.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
//// Blockchain API shared between clients and peers.
///
/// Usage: instantiate `ConsensusCommon_BlockchainAPIRestClient`, then call methods of this protocol to make API calls.
public protocol ConsensusCommon_BlockchainAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func getLastBlockInfo(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, ConsensusCommon_LastBlockInfoResponse>
func getBlocks(
_ request: ConsensusCommon_BlocksRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<ConsensusCommon_BlocksRequest, ConsensusCommon_BlocksResponse>
}
extension ConsensusCommon_BlockchainAPIRestClientProtocol {
public var serviceName: String {
return "consensus_common.BlockchainAPI"
}
/// Unary call to GetLastBlockInfo
///
/// - Parameters:
/// - request: Request to send to GetLastBlockInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getLastBlockInfo(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, ConsensusCommon_LastBlockInfoResponse> {
return self.makeUnaryCall(
path: ConsensusCommon_BlockchainAPIClientMetadata.Methods.getLastBlockInfo.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
/// Unary call to GetBlocks
///
/// - Parameters:
/// - request: Request to send to GetBlocks.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getBlocks(
_ request: ConsensusCommon_BlocksRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<ConsensusCommon_BlocksRequest, ConsensusCommon_BlocksResponse> {
return self.makeUnaryCall(
path: ConsensusCommon_BlockchainAPIClientMetadata.Methods.getBlocks.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class ConsensusCommon_BlockchainAPIRestClient: ConsensusCommon_BlockchainAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the consensus_common.BlockchainAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum ConsensusCommon_BlockchainAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "BlockchainAPI",
fullName: "consensus_common.BlockchainAPI",
methods: [
ConsensusCommon_BlockchainAPIClientMetadata.Methods.getLastBlockInfo,
ConsensusCommon_BlockchainAPIClientMetadata.Methods.getBlocks,
]
)
public enum Methods {
public static let getLastBlockInfo = HTTPMethodDescriptor(
name: "GetLastBlockInfo",
path: "/consensus_common.BlockchainAPI/GetLastBlockInfo",
type: HTTPCallType.unary
)
public static let getBlocks = HTTPMethodDescriptor(
name: "GetBlocks",
path: "/consensus_common.BlockchainAPI/GetBlocks",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,592 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: ledger.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
/// Usage: instantiate `FogLedger_LedgerAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_LedgerAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func request(
_ request: FogLedger_LedgerRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogLedger_LedgerRequest, FogLedger_LedgerResponse>
}
extension FogLedger_LedgerAPIRestClientProtocol {
public var serviceName: String {
return "fog_ledger.LedgerAPI"
}
/// Unary call to Request
///
/// - Parameters:
/// - request: Request to send to Request.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func request(
_ request: FogLedger_LedgerRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogLedger_LedgerRequest, FogLedger_LedgerResponse> {
return self.makeUnaryCall(
path: FogLedger_LedgerAPIClientMetadata.Methods.request.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_LedgerAPIRestClient: FogLedger_LedgerAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.LedgerAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_LedgerAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "LedgerAPI",
fullName: "fog_ledger.LedgerAPI",
methods: [
FogLedger_LedgerAPIClientMetadata.Methods.request,
]
)
public enum Methods {
public static let request = HTTPMethodDescriptor(
name: "Request",
path: "/fog_ledger.LedgerAPI/Request",
type: HTTPCallType.unary
)
}
}
/// Usage: instantiate `FogLedger_LedgerRouterAdminAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_LedgerRouterAdminAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty>
}
extension FogLedger_LedgerRouterAdminAPIRestClientProtocol {
public var serviceName: String {
return "fog_ledger.LedgerRouterAdminAPI"
}
/// Adds a shard to the Fog Ledger Router's list of shards to query.
///
/// - Parameters:
/// - request: Request to send to AddShard.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty> {
return self.makeUnaryCall(
path: FogLedger_LedgerRouterAdminAPIClientMetadata.Methods.addShard.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_LedgerRouterAdminAPIRestClient: FogLedger_LedgerRouterAdminAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.LedgerRouterAdminAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_LedgerRouterAdminAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "LedgerRouterAdminAPI",
fullName: "fog_ledger.LedgerRouterAdminAPI",
methods: [
FogLedger_LedgerRouterAdminAPIClientMetadata.Methods.addShard,
]
)
public enum Methods {
public static let addShard = HTTPMethodDescriptor(
name: "AddShard",
path: "/fog_ledger.LedgerRouterAdminAPI/AddShard",
type: HTTPCallType.unary
)
}
}
//// Fulfills requests sent by the Fog Ledger Router. This is not meant to fulfill requests sent directly by the client.
///
/// Usage: instantiate `FogLedger_KeyImageStoreAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_KeyImageStoreAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func multiKeyImageStoreQuery(
_ request: FogLedger_MultiKeyImageStoreRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogLedger_MultiKeyImageStoreRequest, FogLedger_MultiKeyImageStoreResponse>
}
extension FogLedger_KeyImageStoreAPIRestClientProtocol {
public var serviceName: String {
return "fog_ledger.KeyImageStoreAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: FogLedger_KeyImageStoreAPIClientMetadata.Methods.auth.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Input should be an encrypted MultiKeyImageStoreRequest, result is an encrypted response.
///
/// - Parameters:
/// - request: Request to send to MultiKeyImageStoreQuery.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func multiKeyImageStoreQuery(
_ request: FogLedger_MultiKeyImageStoreRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogLedger_MultiKeyImageStoreRequest, FogLedger_MultiKeyImageStoreResponse> {
return self.makeUnaryCall(
path: FogLedger_KeyImageStoreAPIClientMetadata.Methods.multiKeyImageStoreQuery.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_KeyImageStoreAPIRestClient: FogLedger_KeyImageStoreAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.KeyImageStoreAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_KeyImageStoreAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "KeyImageStoreAPI",
fullName: "fog_ledger.KeyImageStoreAPI",
methods: [
FogLedger_KeyImageStoreAPIClientMetadata.Methods.auth,
FogLedger_KeyImageStoreAPIClientMetadata.Methods.multiKeyImageStoreQuery,
]
)
public enum Methods {
public static let auth = HTTPMethodDescriptor(
name: "Auth",
path: "/fog_ledger.KeyImageStoreAPI/Auth",
type: HTTPCallType.unary
)
public static let multiKeyImageStoreQuery = HTTPMethodDescriptor(
name: "MultiKeyImageStoreQuery",
path: "/fog_ledger.KeyImageStoreAPI/MultiKeyImageStoreQuery",
type: HTTPCallType.unary
)
}
}
/// Usage: instantiate `FogLedger_FogMerkleProofAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_FogMerkleProofAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func getOutputs(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
}
extension FogLedger_FogMerkleProofAPIRestClientProtocol {
public var serviceName: String {
return "fog_ledger.FogMerkleProofAPI"
}
//// This is called to perform mc-noise IX key exchange with the enclave,
//// before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: FogLedger_FogMerkleProofAPIClientMetadata.Methods.auth.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Get TxOut's and merkle proofs of membership for these outputs
//// These requests can be the user's "real" outputs from fog view, in order
//// to get the needed merkle proof, or their mixins for RingCT.
///
/// - Parameters:
/// - request: Request to send to GetOutputs.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOutputs(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: FogLedger_FogMerkleProofAPIClientMetadata.Methods.getOutputs.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_FogMerkleProofAPIRestClient: FogLedger_FogMerkleProofAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.FogMerkleProofAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_FogMerkleProofAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogMerkleProofAPI",
fullName: "fog_ledger.FogMerkleProofAPI",
methods: [
FogLedger_FogMerkleProofAPIClientMetadata.Methods.auth,
FogLedger_FogMerkleProofAPIClientMetadata.Methods.getOutputs,
]
)
public enum Methods {
public static let auth = HTTPMethodDescriptor(
name: "Auth",
path: "/fog_ledger.FogMerkleProofAPI/Auth",
type: HTTPCallType.unary
)
public static let getOutputs = HTTPMethodDescriptor(
name: "GetOutputs",
path: "/fog_ledger.FogMerkleProofAPI/GetOutputs",
type: HTTPCallType.unary
)
}
}
/// Usage: instantiate `FogLedger_FogKeyImageAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_FogKeyImageAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func checkKeyImages(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
}
extension FogLedger_FogKeyImageAPIRestClientProtocol {
public var serviceName: String {
return "fog_ledger.FogKeyImageAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: FogLedger_FogKeyImageAPIClientMetadata.Methods.auth.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Check if key images have appeared in the ledger, and if so, when
///
/// - Parameters:
/// - request: Request to send to CheckKeyImages.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func checkKeyImages(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: FogLedger_FogKeyImageAPIClientMetadata.Methods.checkKeyImages.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_FogKeyImageAPIRestClient: FogLedger_FogKeyImageAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.FogKeyImageAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_FogKeyImageAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogKeyImageAPI",
fullName: "fog_ledger.FogKeyImageAPI",
methods: [
FogLedger_FogKeyImageAPIClientMetadata.Methods.auth,
FogLedger_FogKeyImageAPIClientMetadata.Methods.checkKeyImages,
]
)
public enum Methods {
public static let auth = HTTPMethodDescriptor(
name: "Auth",
path: "/fog_ledger.FogKeyImageAPI/Auth",
type: HTTPCallType.unary
)
public static let checkKeyImages = HTTPMethodDescriptor(
name: "CheckKeyImages",
path: "/fog_ledger.FogKeyImageAPI/CheckKeyImages",
type: HTTPCallType.unary
)
}
}
/// Usage: instantiate `FogLedger_FogBlockAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_FogBlockAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func getBlocks(
_ request: FogLedger_BlockRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogLedger_BlockRequest, FogLedger_BlockResponse>
}
extension FogLedger_FogBlockAPIRestClientProtocol {
public var serviceName: String {
return "fog_ledger.FogBlockAPI"
}
//// Request for all of the TxOuts for a particular range of blocks.
//// This is meant to help the users recover from "missed blocks" i.e.
//// data loss in the fog service.
///
/// - Parameters:
/// - request: Request to send to GetBlocks.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getBlocks(
_ request: FogLedger_BlockRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogLedger_BlockRequest, FogLedger_BlockResponse> {
return self.makeUnaryCall(
path: FogLedger_FogBlockAPIClientMetadata.Methods.getBlocks.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_FogBlockAPIRestClient: FogLedger_FogBlockAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.FogBlockAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_FogBlockAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogBlockAPI",
fullName: "fog_ledger.FogBlockAPI",
methods: [
FogLedger_FogBlockAPIClientMetadata.Methods.getBlocks,
]
)
public enum Methods {
public static let getBlocks = HTTPMethodDescriptor(
name: "GetBlocks",
path: "/fog_ledger.FogBlockAPI/GetBlocks",
type: HTTPCallType.unary
)
}
}
/// Usage: instantiate `FogLedger_FogUntrustedTxOutApiRestClient`, then call methods of this protocol to make API calls.
public protocol FogLedger_FogUntrustedTxOutApiRestClientProtocol: HTTPClient {
var serviceName: String { get }
func getTxOuts(
_ request: FogLedger_TxOutRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogLedger_TxOutRequest, FogLedger_TxOutResponse>
}
extension FogLedger_FogUntrustedTxOutApiRestClientProtocol {
public var serviceName: String {
return "fog_ledger.FogUntrustedTxOutApi"
}
//// This can be used by a sender who may be sharing their private keys across
//// multiple parties / devices, to confirm that a transaction that they sent
//// landed in the blockchain, by confirming that one of the random keys from
//// a TxOut that they produced appears in the ledger.
////
//// Given the TxOut.pubkey value, we return if it is found, and the num_blocks
//// value, allowing Alice to determine that her transactions succeeded, or if
//// num_blocks exceeded her tombstone value, conclude that it failed somehow.
//// We also return the global tx out index. We don't currently return the block
//// index or time stamp in which the TxOut appeared.
////
//// This API is NOT attested and Bob, the recipient, SHOULD NOT use it in connection
//// to the same TxOut, as that will leak the transaction graph to fog operator,
//// which breaks the privacy statement for fog as a whole.
///
/// - Parameters:
/// - request: Request to send to GetTxOuts.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getTxOuts(
_ request: FogLedger_TxOutRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogLedger_TxOutRequest, FogLedger_TxOutResponse> {
return self.makeUnaryCall(
path: FogLedger_FogUntrustedTxOutApiClientMetadata.Methods.getTxOuts.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogLedger_FogUntrustedTxOutApiRestClient: FogLedger_FogUntrustedTxOutApiRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_ledger.FogUntrustedTxOutApi service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogLedger_FogUntrustedTxOutApiClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogUntrustedTxOutApi",
fullName: "fog_ledger.FogUntrustedTxOutApi",
methods: [
FogLedger_FogUntrustedTxOutApiClientMetadata.Methods.getTxOuts,
]
)
public enum Methods {
public static let getTxOuts = HTTPMethodDescriptor(
name: "GetTxOuts",
path: "/fog_ledger.FogUntrustedTxOutApi/GetTxOuts",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,95 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: mistyswap_common.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
/// Usage: instantiate `MistyswapCommon_MistyswapCommonApiRestClient`, then call methods of this protocol to make API calls.
public protocol MistyswapCommon_MistyswapCommonApiRestClientProtocol: HTTPClient {
var serviceName: String { get }
func getInfo(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, MistyswapCommon_GetInfoResponse>
}
extension MistyswapCommon_MistyswapCommonApiRestClientProtocol {
public var serviceName: String {
return "mistyswap_common.MistyswapCommonApi"
}
//// Get information about this mistyswap instance.
///
/// - Parameters:
/// - request: Request to send to GetInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getInfo(
_ request: SwiftProtobuf.Google_Protobuf_Empty,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, MistyswapCommon_GetInfoResponse> {
return self.makeUnaryCall(
path: MistyswapCommon_MistyswapCommonApiClientMetadata.Methods.getInfo.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class MistyswapCommon_MistyswapCommonApiRestClient: MistyswapCommon_MistyswapCommonApiRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the mistyswap_common.MistyswapCommonApi service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum MistyswapCommon_MistyswapCommonApiClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "MistyswapCommonApi",
fullName: "mistyswap_common.MistyswapCommonApi",
methods: [
MistyswapCommon_MistyswapCommonApiClientMetadata.Methods.getInfo,
]
)
public enum Methods {
public static let getInfo = HTTPMethodDescriptor(
name: "GetInfo",
path: "/mistyswap_common.MistyswapCommonApi/GetInfo",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,186 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: mistyswap_offramp.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
/// Usage: instantiate `MistyswapOfframp_MistyswapOfframpApiRestClient`, then call methods of this protocol to make API calls.
public protocol MistyswapOfframp_MistyswapOfframpApiRestClientProtocol: HTTPClient {
var serviceName: String { get }
func initiateOfframp(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
func forgetOfframp(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
func getOfframpStatus(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
func getOfframpDebugInfo(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
}
extension MistyswapOfframp_MistyswapOfframpApiRestClientProtocol {
public var serviceName: String {
return "mistyswap_offramp.MistyswapOfframpApi"
}
//// Initiate (or pick up a previously initiated) offramp.
//// Input should be an encrypted InitiateOfframpRequest, output is an encrypted InitiateOfframpResponse.
///
/// - Parameters:
/// - request: Request to send to InitiateOfframp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func initiateOfframp(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.initiateOfframp.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Forget an offramp.
//// Input should be an encrypted ForgetOfframpRequest, output is an encrypted ForgetOfframpResponse.
///
/// - Parameters:
/// - request: Request to send to ForgetOfframp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func forgetOfframp(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.forgetOfframp.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Get the status of an offramp.
//// Input should be an encrypted GetOfframpStatusRequest, output is an encrypted GetOfframpStatusResponse.
///
/// - Parameters:
/// - request: Request to send to GetOfframpStatus.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOfframpStatus(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.getOfframpStatus.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Get debug info.
//// Input should be an encrypted GetOfframpDebugInfoRequest, output is an encrypted GetOfframpDebugInfoResponse.
///
/// - Parameters:
/// - request: Request to send to GetOfframpDebugInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOfframpDebugInfo(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.getOfframpDebugInfo.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class MistyswapOfframp_MistyswapOfframpApiRestClient: MistyswapOfframp_MistyswapOfframpApiRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the mistyswap_offramp.MistyswapOfframpApi service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum MistyswapOfframp_MistyswapOfframpApiClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "MistyswapOfframpApi",
fullName: "mistyswap_offramp.MistyswapOfframpApi",
methods: [
MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.initiateOfframp,
MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.forgetOfframp,
MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.getOfframpStatus,
MistyswapOfframp_MistyswapOfframpApiClientMetadata.Methods.getOfframpDebugInfo,
]
)
public enum Methods {
public static let initiateOfframp = HTTPMethodDescriptor(
name: "InitiateOfframp",
path: "/mistyswap_offramp.MistyswapOfframpApi/InitiateOfframp",
type: HTTPCallType.unary
)
public static let forgetOfframp = HTTPMethodDescriptor(
name: "ForgetOfframp",
path: "/mistyswap_offramp.MistyswapOfframpApi/ForgetOfframp",
type: HTTPCallType.unary
)
public static let getOfframpStatus = HTTPMethodDescriptor(
name: "GetOfframpStatus",
path: "/mistyswap_offramp.MistyswapOfframpApi/GetOfframpStatus",
type: HTTPCallType.unary
)
public static let getOfframpDebugInfo = HTTPMethodDescriptor(
name: "GetOfframpDebugInfo",
path: "/mistyswap_offramp.MistyswapOfframpApi/GetOfframpDebugInfo",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,186 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: mistyswap_onramp.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
/// Usage: instantiate `MistyswapOnramp_MistyswapOnrampApiRestClient`, then call methods of this protocol to make API calls.
public protocol MistyswapOnramp_MistyswapOnrampApiRestClientProtocol: HTTPClient {
var serviceName: String { get }
func setupOnramp(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
func forgetOnramp(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
func getOnrampStatus(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
func getOnrampDebugInfo(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
}
extension MistyswapOnramp_MistyswapOnrampApiRestClientProtocol {
public var serviceName: String {
return "mistyswap_onramp.MistyswapOnrampApi"
}
//// Setup onramping (or check if it is already setup).
//// Input should be an encrypted SetupOnrampRequest, output is an encrypted SetupOnrampResponse.
///
/// - Parameters:
/// - request: Request to send to SetupOnramp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func setupOnramp(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.setupOnramp.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Forget an onramp.
//// Input should be an encrypted ForgetOnrampRequest, output is an encrypted ForgetOnrampResponse.
///
/// - Parameters:
/// - request: Request to send to ForgetOnramp.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func forgetOnramp(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.forgetOnramp.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Get the status of an onramp.
//// Input should be an encrypted GetOnrampStatusRequest, output is an encrypted GetOnrampStatusResponse.
///
/// - Parameters:
/// - request: Request to send to GetOnrampStatus.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOnrampStatus(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.getOnrampStatus.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Get debug info.
//// Input should be an encrypted GetOnrampDebugInfoRequest, output is an encrypted GetOnrampDebugInfoResponse.
///
/// - Parameters:
/// - request: Request to send to GetOnrampDebugInfo.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getOnrampDebugInfo(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.getOnrampDebugInfo.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class MistyswapOnramp_MistyswapOnrampApiRestClient: MistyswapOnramp_MistyswapOnrampApiRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the mistyswap_onramp.MistyswapOnrampApi service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum MistyswapOnramp_MistyswapOnrampApiClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "MistyswapOnrampApi",
fullName: "mistyswap_onramp.MistyswapOnrampApi",
methods: [
MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.setupOnramp,
MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.forgetOnramp,
MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.getOnrampStatus,
MistyswapOnramp_MistyswapOnrampApiClientMetadata.Methods.getOnrampDebugInfo,
]
)
public enum Methods {
public static let setupOnramp = HTTPMethodDescriptor(
name: "SetupOnramp",
path: "/mistyswap_onramp.MistyswapOnrampApi/SetupOnramp",
type: HTTPCallType.unary
)
public static let forgetOnramp = HTTPMethodDescriptor(
name: "ForgetOnramp",
path: "/mistyswap_onramp.MistyswapOnrampApi/ForgetOnramp",
type: HTTPCallType.unary
)
public static let getOnrampStatus = HTTPMethodDescriptor(
name: "GetOnrampStatus",
path: "/mistyswap_onramp.MistyswapOnrampApi/GetOnrampStatus",
type: HTTPCallType.unary
)
public static let getOnrampDebugInfo = HTTPMethodDescriptor(
name: "GetOnrampDebugInfo",
path: "/mistyswap_onramp.MistyswapOnrampApi/GetOnrampDebugInfo",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,97 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: report.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
//// The public API for getting reports
///
/// Usage: instantiate `Report_ReportAPIRestClient`, then call methods of this protocol to make API calls.
public protocol Report_ReportAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func getReports(
_ request: Report_ReportRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Report_ReportRequest, Report_ReportResponse>
}
extension Report_ReportAPIRestClientProtocol {
public var serviceName: String {
return "report.ReportAPI"
}
//// Get all available pubkeys, with Intel SGX reports, fog urls, and expiry info
///
/// - Parameters:
/// - request: Request to send to GetReports.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func getReports(
_ request: Report_ReportRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Report_ReportRequest, Report_ReportResponse> {
return self.makeUnaryCall(
path: Report_ReportAPIClientMetadata.Methods.getReports.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class Report_ReportAPIRestClient: Report_ReportAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the report.ReportAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum Report_ReportAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "ReportAPI",
fullName: "report.ReportAPI",
methods: [
Report_ReportAPIClientMetadata.Methods.getReports,
]
)
public enum Methods {
public static let getReports = HTTPMethodDescriptor(
name: "GetReports",
path: "/report.ReportAPI/GetReports",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,355 @@
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: view.proto
//
//
// Copyright 2023, MobileCoin Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#if canImport(LibMobileCoinCommon)
import LibMobileCoinCommon
#endif
#if canImport(SwiftProtobuf)
import SwiftProtobuf
#endif
//// A single Duplex streaming API that allows clients to authorize with Fog View and
//// query it for TxOuts.
///
/// Usage: instantiate `FogView_FogViewRouterAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewRouterAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func request(
_ request: FogView_FogViewRouterRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogView_FogViewRouterRequest, FogView_FogViewRouterResponse>
}
extension FogView_FogViewRouterAPIRestClientProtocol {
public var serviceName: String {
return "fog_view.FogViewRouterAPI"
}
/// Unary call to request
///
/// - Parameters:
/// - request: Request to send to request.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func request(
_ request: FogView_FogViewRouterRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogView_FogViewRouterRequest, FogView_FogViewRouterResponse> {
return self.makeUnaryCall(
path: FogView_FogViewRouterAPIClientMetadata.Methods.request.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogView_FogViewRouterAPIRestClient: FogView_FogViewRouterAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_view.FogViewRouterAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogView_FogViewRouterAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogViewRouterAPI",
fullName: "fog_view.FogViewRouterAPI",
methods: [
FogView_FogViewRouterAPIClientMetadata.Methods.request,
]
)
public enum Methods {
public static let request = HTTPMethodDescriptor(
name: "request",
path: "/fog_view.FogViewRouterAPI/request",
type: HTTPCallType.unary
)
}
}
/// Usage: instantiate `FogView_FogViewRouterAdminAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewRouterAdminAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty>
}
extension FogView_FogViewRouterAdminAPIRestClientProtocol {
public var serviceName: String {
return "fog_view.FogViewRouterAdminAPI"
}
/// Adds a shard to the Fog View Router's list of shards to query.
///
/// - Parameters:
/// - request: Request to send to addShard.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func addShard(
_ request: FogCommon_AddShardRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogCommon_AddShardRequest, SwiftProtobuf.Google_Protobuf_Empty> {
return self.makeUnaryCall(
path: FogView_FogViewRouterAdminAPIClientMetadata.Methods.addShard.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogView_FogViewRouterAdminAPIRestClient: FogView_FogViewRouterAdminAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_view.FogViewRouterAdminAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogView_FogViewRouterAdminAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogViewRouterAdminAPI",
fullName: "fog_view.FogViewRouterAdminAPI",
methods: [
FogView_FogViewRouterAdminAPIClientMetadata.Methods.addShard,
]
)
public enum Methods {
public static let addShard = HTTPMethodDescriptor(
name: "addShard",
path: "/fog_view.FogViewRouterAdminAPI/addShard",
type: HTTPCallType.unary
)
}
}
//// Fulfills requests sent directly by a Fog client, e.g. a mobile phone using the SDK.
///
/// Usage: instantiate `FogView_FogViewAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func query(
_ request: Attest_Message,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_Message, Attest_Message>
}
extension FogView_FogViewAPIRestClientProtocol {
public var serviceName: String {
return "fog_view.FogViewAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: FogView_FogViewAPIClientMetadata.Methods.auth.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Input should be an encrypted QueryRequest, result is an encrypted QueryResponse
///
/// - Parameters:
/// - request: Request to send to Query.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func query(
_ request: Attest_Message,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_Message, Attest_Message> {
return self.makeUnaryCall(
path: FogView_FogViewAPIClientMetadata.Methods.query.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogView_FogViewAPIRestClient: FogView_FogViewAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_view.FogViewAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogView_FogViewAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogViewAPI",
fullName: "fog_view.FogViewAPI",
methods: [
FogView_FogViewAPIClientMetadata.Methods.auth,
FogView_FogViewAPIClientMetadata.Methods.query,
]
)
public enum Methods {
public static let auth = HTTPMethodDescriptor(
name: "Auth",
path: "/fog_view.FogViewAPI/Auth",
type: HTTPCallType.unary
)
public static let query = HTTPMethodDescriptor(
name: "Query",
path: "/fog_view.FogViewAPI/Query",
type: HTTPCallType.unary
)
}
}
//// Fulfills requests sent by the Fog View Router. This is not meant to fulfill requests sent directly by the client.
///
/// Usage: instantiate `FogView_FogViewStoreAPIRestClient`, then call methods of this protocol to make API calls.
public protocol FogView_FogViewStoreAPIRestClientProtocol: HTTPClient {
var serviceName: String { get }
func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage>
func multiViewStoreQuery(
_ request: FogView_MultiViewStoreQueryRequest,
callOptions: HTTPCallOptions?
) -> HTTPUnaryCall<FogView_MultiViewStoreQueryRequest, FogView_MultiViewStoreQueryResponse>
}
extension FogView_FogViewStoreAPIRestClientProtocol {
public var serviceName: String {
return "fog_view.FogViewStoreAPI"
}
//// This is called to perform IX key exchange with the enclave before calling GetOutputs.
///
/// - Parameters:
/// - request: Request to send to Auth.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func auth(
_ request: Attest_AuthMessage,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<Attest_AuthMessage, Attest_AuthMessage> {
return self.makeUnaryCall(
path: FogView_FogViewStoreAPIClientMetadata.Methods.auth.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
//// Input should be an encrypted MultiViewStoreQueryRequest, result is an encrypted QueryResponse.
///
/// - Parameters:
/// - request: Request to send to MultiViewStoreQuery.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
public func multiViewStoreQuery(
_ request: FogView_MultiViewStoreQueryRequest,
callOptions: HTTPCallOptions? = nil
) -> HTTPUnaryCall<FogView_MultiViewStoreQueryRequest, FogView_MultiViewStoreQueryResponse> {
return self.makeUnaryCall(
path: FogView_FogViewStoreAPIClientMetadata.Methods.multiViewStoreQuery.path,
request: request,
callOptions: callOptions ?? self.defaultHTTPCallOptions
)
}
}
public final class FogView_FogViewStoreAPIRestClient: FogView_FogViewStoreAPIRestClientProtocol {
public var defaultHTTPCallOptions: HTTPCallOptions
/// Creates a client for the fog_view.FogViewStoreAPI service.
///
/// - Parameters:
/// - defaultHTTPCallOptions: Options to use for each service call if the user doesn't provide them.
public init(
defaultHTTPCallOptions: HTTPCallOptions = HTTPCallOptions()
) {
self.defaultHTTPCallOptions = defaultHTTPCallOptions
}
}
public enum FogView_FogViewStoreAPIClientMetadata {
public static let serviceDescriptor = HTTPServiceDescriptor(
name: "FogViewStoreAPI",
fullName: "fog_view.FogViewStoreAPI",
methods: [
FogView_FogViewStoreAPIClientMetadata.Methods.auth,
FogView_FogViewStoreAPIClientMetadata.Methods.multiViewStoreQuery,
]
)
public enum Methods {
public static let auth = HTTPMethodDescriptor(
name: "Auth",
path: "/fog_view.FogViewStoreAPI/Auth",
type: HTTPCallType.unary
)
public static let multiViewStoreQuery = HTTPMethodDescriptor(
name: "MultiViewStoreQuery",
path: "/fog_view.FogViewStoreAPI/MultiViewStoreQuery",
type: HTTPCallType.unary
)
}
}

View File

@ -0,0 +1,21 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
extension Bundle {
private static let TEST_VECTOR_EXTENSION = "jsonl"
public static let libmobilecoin_TestVectorBundleIdentifier = Bundle.module.bundleIdentifier!
public static func testVectorModuleUrl(_ resource: String) throws -> URL {
guard
let url = Bundle.module.url(forResource: resource, withExtension: TEST_VECTOR_EXTENSION, subdirectory: "vectors")
else {
throw TestVectorError(
"Failed to get url for resource: \(resource).\(TEST_VECTOR_EXTENSION)")
}
return url
}
}

View File

@ -0,0 +1,48 @@
{"entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"mnemonic":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about","account_index":0,"view_private_key":[188,129,163,113,13,117,198,157,198,39,182,192,73,120,6,53,11,179,210,123,59,88,209,194,153,223,0,109,169,0,192,4],"spend_private_key":[148,183,217,189,73,62,87,252,199,231,25,152,96,19,26,14,154,116,76,19,157,217,127,215,83,252,120,115,140,122,163,6]}
{"entropy":[127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],"mnemonic":"legal winner thank year wave sausage worth useful legal winner thank yellow","account_index":0,"view_private_key":[65,71,5,68,199,140,230,170,253,218,39,94,216,151,171,23,187,176,14,55,231,206,115,105,8,7,46,79,121,221,246,11],"spend_private_key":[138,12,222,78,186,230,230,248,145,121,210,151,234,200,51,24,224,149,210,119,162,153,252,94,213,12,112,212,127,187,103,12]}
{"entropy":[128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128],"mnemonic":"letter advice cage absurd amount doctor acoustic avoid letter advice cage above","account_index":0,"view_private_key":[168,188,171,170,81,1,104,213,189,33,133,126,15,218,224,115,143,78,118,191,191,34,35,19,70,74,233,70,90,193,168,14],"spend_private_key":[102,25,115,105,170,161,44,237,183,149,229,247,128,74,118,181,193,239,63,236,7,22,138,155,15,131,164,76,73,147,198,1]}
{"entropy":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"mnemonic":"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong","account_index":0,"view_private_key":[49,157,226,188,86,175,175,111,154,251,17,31,204,232,92,248,128,165,158,46,50,219,235,58,254,90,201,49,171,17,171,0],"spend_private_key":[194,10,90,167,157,70,224,49,243,70,37,108,235,28,202,144,237,232,74,171,182,70,202,77,119,151,242,211,254,27,163,0]}
{"entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"mnemonic":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon agent","account_index":0,"view_private_key":[87,114,221,8,101,131,152,1,79,119,118,227,100,28,215,205,42,30,109,16,252,122,213,90,20,222,40,223,161,179,144,11],"spend_private_key":[194,224,129,54,234,174,42,31,174,97,17,195,184,230,223,148,55,181,22,201,35,242,184,17,213,44,154,5,204,138,132,15]}
{"entropy":[127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],"mnemonic":"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will","account_index":0,"view_private_key":[192,168,138,197,203,202,105,12,177,76,90,175,164,226,149,60,66,175,127,210,226,110,103,116,28,246,90,8,100,153,138,15],"spend_private_key":[3,250,163,76,235,107,61,251,226,20,161,141,85,238,57,213,186,20,229,98,102,20,46,33,24,29,87,49,50,31,115,15]}
{"entropy":[128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128],"mnemonic":"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always","account_index":0,"view_private_key":[225,186,111,233,54,193,184,55,39,5,202,208,165,17,236,29,141,106,151,75,179,180,193,233,82,158,140,228,171,64,199,2],"spend_private_key":[23,163,13,181,151,155,147,119,32,150,130,104,200,121,205,133,71,106,182,206,149,197,164,93,25,177,84,114,36,135,34,7]}
{"entropy":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"mnemonic":"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo when","account_index":0,"view_private_key":[67,214,5,60,80,143,6,246,231,169,70,64,69,249,54,87,178,43,100,69,71,249,168,74,80,74,10,110,71,34,174,12],"spend_private_key":[67,76,191,83,122,130,66,99,17,137,168,199,227,17,243,229,122,238,115,178,89,189,62,118,38,91,175,234,0,28,153,0]}
{"entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"mnemonic":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art","account_index":0,"view_private_key":[130,82,172,23,120,108,69,12,63,22,179,196,47,172,162,25,75,147,172,45,204,253,237,216,211,13,40,165,139,211,33,0],"spend_private_key":[83,250,62,131,221,171,35,72,94,103,135,50,98,229,182,152,61,26,39,113,223,20,131,239,89,138,161,135,68,128,125,5]}
{"entropy":[127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],"mnemonic":"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth title","account_index":0,"view_private_key":[142,5,173,180,48,99,228,100,85,149,50,37,42,84,30,253,4,220,16,90,169,136,138,200,168,67,135,82,125,32,203,5],"spend_private_key":[151,5,133,51,220,239,107,20,232,167,91,113,251,125,127,10,6,48,20,247,49,228,32,240,162,12,230,240,21,85,130,7]}
{"entropy":[128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128],"mnemonic":"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless","account_index":0,"view_private_key":[179,180,126,95,209,203,85,189,240,149,119,166,101,229,243,226,238,242,156,227,125,86,148,219,81,202,7,70,126,206,240,15],"spend_private_key":[84,237,96,162,254,244,132,56,171,200,44,87,11,186,111,78,36,203,32,249,131,13,155,7,113,156,16,250,241,45,96,5]}
{"entropy":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"mnemonic":"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote","account_index":0,"view_private_key":[119,195,105,86,33,150,47,143,103,104,212,251,25,13,113,155,31,53,239,184,246,154,170,173,33,134,149,204,1,135,27,7],"spend_private_key":[224,36,242,162,36,113,243,150,156,188,152,133,170,180,175,116,41,62,72,95,3,166,133,60,26,45,234,34,125,38,161,14]}
{"entropy":[158,136,93,149,42,211,98,202,235,78,254,52,168,233,27,210],"mnemonic":"ozone drill grab fiber curtain grace pudding thank cruise elder eight picnic","account_index":0,"view_private_key":[92,55,105,236,69,219,63,23,112,76,183,109,207,68,164,250,159,55,129,75,141,60,13,200,2,243,227,59,153,53,66,3],"spend_private_key":[140,167,98,3,61,176,7,3,160,234,221,146,237,10,90,177,254,241,222,203,32,156,197,89,76,230,78,215,54,18,138,11]}
{"entropy":[102,16,178,89,103,205,204,169,213,152,117,245,203,80,176,234,117,67,51,17,134,158,147,11],"mnemonic":"gravity machine north sort system female filter attitude volume fold club stay feature office ecology stable narrow fog","account_index":0,"view_private_key":[209,27,186,167,216,116,217,202,24,106,92,112,73,2,93,174,42,202,223,47,90,197,163,98,221,128,50,131,183,205,38,2],"spend_private_key":[179,158,44,46,104,237,199,75,50,246,146,70,178,10,252,9,218,144,87,79,219,157,226,121,217,230,141,23,137,242,237,5]}
{"entropy":[104,167,158,172,162,50,72,115,234,204,80,203,156,110,202,140,198,142,165,217,54,249,135,135,198,12,126,188,116,230,206,124],"mnemonic":"hamster diagram private dutch cause delay private meat slide toddler razor book happy fancy gospel tennis maple dilemma loan word shrug inflict delay length","account_index":0,"view_private_key":[236,58,159,150,162,98,152,30,66,1,158,72,22,87,189,58,57,193,161,89,4,246,178,88,20,188,153,91,185,207,236,11],"spend_private_key":[53,59,140,118,28,35,185,23,180,216,51,140,1,83,78,211,108,183,140,179,237,248,121,30,89,2,179,148,143,225,140,6]}
{"entropy":[192,186,90,142,145,65,17,33,15,43,209,49,243,213,224,141],"mnemonic":"scheme spot photo card baby mountain device kick cradle pact join borrow","account_index":0,"view_private_key":[10,161,100,236,159,152,104,39,247,91,60,227,156,80,227,42,49,85,167,2,178,103,214,248,85,230,2,150,248,73,118,5],"spend_private_key":[185,87,234,202,184,227,50,79,211,194,57,115,57,193,175,112,241,45,116,222,179,72,61,38,152,99,71,68,173,58,41,2]}
{"entropy":[109,155,225,238,110,189,39,162,88,17,90,173,153,183,49,123,156,141,40,182,215,100,49,195],"mnemonic":"horn tenant knee talent sponsor spell gate clip pulse soap slush warm silver nephew swap uncle crack brave","account_index":0,"view_private_key":[175,144,16,161,114,161,116,232,183,130,80,254,218,135,122,91,86,4,152,145,94,14,231,77,178,26,55,84,71,98,229,10],"spend_private_key":[204,165,4,209,214,229,6,118,66,178,187,118,129,158,91,23,246,152,48,51,8,171,75,255,137,252,138,206,212,111,69,12]}
{"entropy":[159,106,40,120,178,82,7,153,164,78,241,139,199,223,57,78,112,97,162,36,210,195,60,208,21,177,87,215,70,134,152,99],"mnemonic":"panda eyebrow bullet gorilla call smoke muffin taste mesh discover soft ostrich alcohol speed nation flash devote level hobby quick inner drive ghost inside","account_index":0,"view_private_key":[175,161,100,65,245,67,149,98,172,88,17,9,138,217,203,254,62,204,109,77,232,138,186,158,35,117,200,88,43,203,152,0],"spend_private_key":[20,97,241,48,95,165,43,135,175,147,140,191,255,5,147,242,6,237,34,132,7,96,177,60,97,159,61,5,249,235,181,5]}
{"entropy":[35,219,129,96,163,29,62,13,202,54,136,237,148,26,219,243],"mnemonic":"cat swing flag economy stadium alone churn speed unique patch report train","account_index":0,"view_private_key":[156,176,30,242,126,135,90,0,239,169,247,166,211,47,216,105,156,126,236,169,194,231,196,221,94,189,120,162,245,25,81,2],"spend_private_key":[141,210,145,172,179,59,245,56,233,125,87,157,139,170,175,187,79,34,180,101,84,235,220,79,5,242,113,166,135,219,77,9]}
{"entropy":[129,151,164,164,127,4,37,250,234,166,157,238,188,5,202,41,192,165,181,204,118,206,172,192],"mnemonic":"light rule cinnamon wrap drastic word pride squirrel upgrade then income fatal apart sustain crack supply proud access","account_index":0,"view_private_key":[221,101,28,225,135,179,121,26,15,66,56,137,157,243,71,199,198,247,177,14,171,248,144,203,227,183,109,223,105,182,102,12],"spend_private_key":[238,18,36,152,77,208,127,229,3,69,82,63,19,185,98,135,38,179,12,115,103,138,96,46,131,38,36,45,203,221,96,5]}
{"entropy":[6,109,202,26,43,183,232,161,219,40,50,20,140,233,147,62,234,15,58,201,84,141,121,49,18,217,169,92,148,7,239,173],"mnemonic":"all hour make first leader extend hole alien behind guard gospel lava path output census museum junior mass reopen famous sing advance salt reform","account_index":0,"view_private_key":[77,9,64,69,53,151,184,123,181,76,137,13,38,132,145,27,220,174,82,254,155,59,185,144,164,187,122,163,199,142,39,10],"spend_private_key":[11,155,25,208,131,175,0,119,1,175,209,114,146,17,87,21,251,81,156,92,157,143,96,214,21,191,131,68,130,72,174,9]}
{"entropy":[243,15,140,29,166,101,71,143,73,176,1,217,76,95,196,82],"mnemonic":"vessel ladder alter error federal sibling chat ability sun glass valve picture","account_index":0,"view_private_key":[166,213,191,112,40,41,65,54,203,118,146,59,0,88,77,63,98,175,44,233,37,132,175,229,134,117,128,71,139,205,10,13],"spend_private_key":[105,43,136,136,156,21,148,3,237,65,55,172,41,163,246,239,62,109,211,166,82,118,219,189,76,102,154,51,164,187,190,0]}
{"entropy":[193,14,194,13,195,205,159,101,44,127,172,47,18,48,247,163,200,40,56,154,20,57,47,5],"mnemonic":"scissors invite lock maple supreme raw rapid void congress muscle digital elegant little brisk hair mango congress clump","account_index":0,"view_private_key":[7,171,255,39,139,23,117,109,107,38,16,126,207,250,153,87,60,198,173,248,29,136,27,151,105,177,218,117,102,86,70,15],"spend_private_key":[5,193,56,252,241,75,241,190,65,64,185,216,135,35,103,231,82,112,197,150,120,74,65,27,140,57,147,190,161,207,38,2]}
{"entropy":[245,133,193,26,236,82,13,181,125,211,83,198,149,84,178,26,137,178,15,176,101,9,102,250,10,157,111,116,253,152,157,143],"mnemonic":"void come effort suffer camp survey warrior heavy shoot primary clutch crush open amazing screen patrol group space point ten exist slush involve unfold","account_index":0,"view_private_key":[59,136,185,163,80,33,30,35,105,251,115,17,14,244,132,239,197,200,131,207,173,108,146,119,127,63,198,207,26,47,215,3],"spend_private_key":[250,4,104,49,3,100,233,141,159,36,131,195,72,141,222,244,2,107,149,61,151,44,189,82,50,188,165,148,75,241,196,6]}
{"entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"mnemonic":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about","account_index":1,"view_private_key":[245,130,238,130,194,226,121,53,228,173,157,76,156,192,32,94,228,220,255,100,31,179,62,79,72,30,44,41,52,72,138,10],"spend_private_key":[81,197,141,242,99,175,208,68,200,75,246,198,219,202,134,47,46,49,246,167,2,116,161,30,173,210,152,75,67,112,243,4]}
{"entropy":[127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],"mnemonic":"legal winner thank year wave sausage worth useful legal winner thank yellow","account_index":1,"view_private_key":[69,20,168,170,96,13,234,194,201,85,222,200,64,117,53,96,19,158,244,139,215,236,214,87,12,123,53,133,88,86,118,15],"spend_private_key":[51,119,121,137,6,52,156,154,180,36,217,183,208,36,252,137,118,162,22,122,20,178,97,133,73,207,197,142,154,247,48,5]}
{"entropy":[128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128],"mnemonic":"letter advice cage absurd amount doctor acoustic avoid letter advice cage above","account_index":1,"view_private_key":[67,254,21,159,189,100,221,166,19,200,81,112,163,78,4,222,79,215,35,248,56,59,218,13,182,114,179,71,183,119,47,12],"spend_private_key":[173,187,139,37,253,243,213,175,59,25,141,132,70,35,67,8,240,74,211,139,248,139,206,155,141,187,124,149,172,71,36,7]}
{"entropy":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"mnemonic":"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong","account_index":1,"view_private_key":[48,164,117,179,195,108,24,190,123,121,184,110,152,4,102,119,53,70,114,213,179,214,76,0,48,8,81,19,159,4,52,15],"spend_private_key":[239,146,210,129,135,39,22,145,153,86,203,69,116,60,56,210,53,93,147,100,226,250,192,207,242,112,159,66,125,120,153,7]}
{"entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"mnemonic":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon agent","account_index":1,"view_private_key":[129,232,160,81,213,81,183,8,198,223,42,99,251,67,195,211,158,65,51,57,244,134,193,97,91,198,87,229,212,134,129,10],"spend_private_key":[175,157,247,150,66,239,167,96,97,47,60,18,47,16,215,179,205,134,175,187,83,213,64,142,130,97,30,87,153,37,27,13]}
{"entropy":[127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],"mnemonic":"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will","account_index":1,"view_private_key":[248,197,219,27,170,111,124,237,131,136,124,128,228,124,60,140,147,214,82,106,115,229,46,220,180,129,83,5,185,77,109,13],"spend_private_key":[183,228,77,108,135,132,32,189,212,7,204,185,72,176,119,160,136,251,209,130,87,52,151,238,47,18,35,108,235,112,208,11]}
{"entropy":[128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128],"mnemonic":"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always","account_index":1,"view_private_key":[91,198,204,184,54,59,244,44,104,215,164,52,12,34,165,27,181,96,243,112,185,167,171,38,2,247,13,179,114,39,220,8],"spend_private_key":[37,127,141,21,236,85,255,210,197,20,183,119,252,42,200,213,70,100,208,210,68,130,225,216,181,49,95,33,74,251,239,8]}
{"entropy":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"mnemonic":"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo when","account_index":1,"view_private_key":[154,161,101,39,227,77,62,42,215,116,98,65,149,41,12,32,41,76,131,218,38,116,22,121,163,161,238,58,197,126,159,3],"spend_private_key":[234,59,225,35,224,174,158,233,55,201,129,119,197,89,147,201,176,109,193,50,131,111,188,64,205,134,81,148,73,92,162,9]}
{"entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"mnemonic":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art","account_index":1,"view_private_key":[24,48,182,26,161,25,254,102,181,75,120,56,52,239,162,228,114,82,41,181,105,144,56,251,184,169,230,124,117,179,246,4],"spend_private_key":[15,224,241,185,49,56,138,201,81,225,113,56,199,157,107,37,193,211,176,170,112,235,124,246,215,101,149,32,25,41,14,11]}
{"entropy":[127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],"mnemonic":"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth title","account_index":1,"view_private_key":[155,198,140,38,95,0,160,240,129,200,175,177,243,28,202,194,199,54,151,121,53,25,218,111,30,232,53,11,217,30,251,15],"spend_private_key":[229,112,248,102,46,184,208,84,89,225,237,73,171,5,100,235,170,233,239,127,238,44,38,179,137,210,25,197,35,147,177,1]}
{"entropy":[128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128],"mnemonic":"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless","account_index":1,"view_private_key":[178,121,146,197,88,136,146,38,38,33,218,138,223,174,1,127,42,155,90,0,80,234,126,185,192,80,11,205,49,96,151,5],"spend_private_key":[11,195,33,249,224,247,116,138,116,192,63,138,33,191,55,73,159,185,44,16,12,115,144,130,150,12,104,95,194,156,62,15]}
{"entropy":[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"mnemonic":"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote","account_index":1,"view_private_key":[179,76,74,176,139,162,156,47,157,194,60,77,191,197,242,244,57,186,183,162,162,191,15,236,9,184,231,230,226,25,175,8],"spend_private_key":[48,171,75,230,165,167,113,171,112,61,253,105,132,79,231,102,66,3,70,254,170,181,104,17,93,104,149,98,30,72,178,10]}
{"entropy":[158,136,93,149,42,211,98,202,235,78,254,52,168,233,27,210],"mnemonic":"ozone drill grab fiber curtain grace pudding thank cruise elder eight picnic","account_index":1,"view_private_key":[24,21,248,254,141,113,42,46,9,135,157,88,41,249,100,88,157,235,199,18,197,244,117,90,12,32,11,2,206,184,204,12],"spend_private_key":[120,215,166,6,179,161,14,49,51,48,107,129,94,195,76,235,43,60,203,9,247,21,156,168,63,31,231,79,87,120,86,6]}
{"entropy":[102,16,178,89,103,205,204,169,213,152,117,245,203,80,176,234,117,67,51,17,134,158,147,11],"mnemonic":"gravity machine north sort system female filter attitude volume fold club stay feature office ecology stable narrow fog","account_index":1,"view_private_key":[130,116,127,4,239,11,12,190,151,154,99,40,149,156,165,62,219,52,150,118,190,135,172,98,34,96,39,75,151,13,143,0],"spend_private_key":[59,175,161,116,189,255,216,24,116,154,245,109,228,160,12,180,56,102,21,35,136,9,118,191,32,65,234,247,94,62,218,5]}
{"entropy":[104,167,158,172,162,50,72,115,234,204,80,203,156,110,202,140,198,142,165,217,54,249,135,135,198,12,126,188,116,230,206,124],"mnemonic":"hamster diagram private dutch cause delay private meat slide toddler razor book happy fancy gospel tennis maple dilemma loan word shrug inflict delay length","account_index":1,"view_private_key":[74,54,63,93,3,139,252,209,24,73,19,78,122,125,217,157,11,69,140,91,154,92,67,110,69,139,43,11,98,164,13,1],"spend_private_key":[19,151,44,65,15,12,159,163,232,244,142,84,191,19,255,18,116,149,170,167,115,230,178,20,170,95,66,110,205,55,107,7]}
{"entropy":[192,186,90,142,145,65,17,33,15,43,209,49,243,213,224,141],"mnemonic":"scheme spot photo card baby mountain device kick cradle pact join borrow","account_index":1,"view_private_key":[183,189,139,93,14,106,48,171,171,64,100,111,184,113,76,31,221,42,203,72,64,232,86,11,113,135,188,54,196,90,88,14],"spend_private_key":[164,209,252,69,17,115,187,48,145,68,95,77,67,78,158,203,218,123,180,33,70,101,51,57,235,113,242,49,115,37,44,12]}
{"entropy":[109,155,225,238,110,189,39,162,88,17,90,173,153,183,49,123,156,141,40,182,215,100,49,195],"mnemonic":"horn tenant knee talent sponsor spell gate clip pulse soap slush warm silver nephew swap uncle crack brave","account_index":1,"view_private_key":[74,99,137,226,167,222,243,77,131,74,172,219,170,205,233,62,51,168,34,137,135,74,198,151,100,197,181,29,24,13,40,0],"spend_private_key":[124,75,95,69,6,164,231,50,52,197,144,106,61,135,189,227,22,220,52,9,112,218,158,174,27,85,46,31,59,98,16,15]}
{"entropy":[159,106,40,120,178,82,7,153,164,78,241,139,199,223,57,78,112,97,162,36,210,195,60,208,21,177,87,215,70,134,152,99],"mnemonic":"panda eyebrow bullet gorilla call smoke muffin taste mesh discover soft ostrich alcohol speed nation flash devote level hobby quick inner drive ghost inside","account_index":1,"view_private_key":[177,156,9,200,87,174,11,38,95,151,2,97,35,61,99,20,26,5,227,223,129,255,252,67,200,44,204,67,51,80,68,12],"spend_private_key":[201,1,190,165,115,213,112,156,111,37,78,93,173,215,32,20,241,186,254,200,7,28,230,14,192,26,225,129,230,243,25,10]}
{"entropy":[35,219,129,96,163,29,62,13,202,54,136,237,148,26,219,243],"mnemonic":"cat swing flag economy stadium alone churn speed unique patch report train","account_index":1,"view_private_key":[170,152,137,159,65,145,245,42,89,201,71,29,2,203,49,44,60,191,211,184,103,233,112,121,125,240,67,188,19,121,234,5],"spend_private_key":[26,229,74,215,39,86,4,38,226,177,198,228,19,218,118,134,196,85,217,243,205,10,239,73,47,122,34,113,240,2,227,15]}
{"entropy":[129,151,164,164,127,4,37,250,234,166,157,238,188,5,202,41,192,165,181,204,118,206,172,192],"mnemonic":"light rule cinnamon wrap drastic word pride squirrel upgrade then income fatal apart sustain crack supply proud access","account_index":1,"view_private_key":[36,255,17,30,112,127,183,71,161,52,97,240,82,119,35,197,225,168,227,254,151,209,171,153,123,110,126,169,123,35,53,13],"spend_private_key":[106,16,2,217,145,195,128,1,239,175,108,86,170,92,31,28,168,140,53,235,104,30,56,151,141,91,210,109,193,182,131,7]}
{"entropy":[6,109,202,26,43,183,232,161,219,40,50,20,140,233,147,62,234,15,58,201,84,141,121,49,18,217,169,92,148,7,239,173],"mnemonic":"all hour make first leader extend hole alien behind guard gospel lava path output census museum junior mass reopen famous sing advance salt reform","account_index":1,"view_private_key":[101,72,15,202,160,216,22,66,31,158,189,129,225,123,103,149,184,186,198,207,255,186,198,162,65,44,244,6,50,187,77,6],"spend_private_key":[16,48,253,5,41,106,90,62,86,22,106,134,143,247,133,205,96,157,224,252,230,220,124,45,154,113,172,186,65,119,39,14]}
{"entropy":[243,15,140,29,166,101,71,143,73,176,1,217,76,95,196,82],"mnemonic":"vessel ladder alter error federal sibling chat ability sun glass valve picture","account_index":1,"view_private_key":[127,148,13,65,145,7,4,170,130,174,118,151,70,84,47,224,169,131,38,152,253,87,158,60,38,167,242,119,75,118,199,4],"spend_private_key":[185,140,254,189,199,60,233,4,207,1,79,23,129,62,238,70,230,159,10,204,117,248,98,154,131,115,180,22,161,238,251,7]}
{"entropy":[193,14,194,13,195,205,159,101,44,127,172,47,18,48,247,163,200,40,56,154,20,57,47,5],"mnemonic":"scissors invite lock maple supreme raw rapid void congress muscle digital elegant little brisk hair mango congress clump","account_index":1,"view_private_key":[144,249,67,147,230,90,192,200,192,152,51,212,93,128,17,214,81,18,54,141,236,86,191,91,80,73,175,130,148,125,120,0],"spend_private_key":[225,224,76,80,115,18,247,55,13,66,27,124,247,162,29,84,20,123,194,80,50,78,188,238,150,9,228,161,234,221,21,5]}
{"entropy":[245,133,193,26,236,82,13,181,125,211,83,198,149,84,178,26,137,178,15,176,101,9,102,250,10,157,111,116,253,152,157,143],"mnemonic":"void come effort suffer camp survey warrior heavy shoot primary clutch crush open amazing screen patrol group space point ten exist slush involve unfold","account_index":1,"view_private_key":[159,23,197,147,249,74,116,79,183,80,152,235,232,70,164,202,173,94,27,236,201,120,223,243,77,197,82,168,163,14,66,3],"spend_private_key":[167,197,30,84,112,52,75,40,159,78,53,118,101,223,230,216,150,122,41,90,53,208,33,174,57,112,94,172,129,22,28,2]}

View File

@ -0,0 +1,10 @@
{"root_entropy":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"view_private_key":[176,20,109,232,205,143,91,121,98,249,231,74,94,240,243,229,138,149,80,201,82,122,193,68,243,135,41,240,253,63,237,14],"spend_private_key":[180,191,1,167,126,212,224,101,233,8,45,75,218,103,173,211,12,136,224,33,220,248,31,200,78,106,156,162,203,104,225,7]}
{"root_entropy":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"view_private_key":[238,44,205,133,88,138,159,136,134,122,225,29,71,208,164,83,1,132,230,22,214,44,20,71,131,24,54,95,122,169,24,14],"spend_private_key":[108,175,59,49,201,221,189,137,53,2,86,105,75,134,94,190,225,73,92,243,24,28,142,98,149,18,1,28,225,175,252,6]}
{"root_entropy":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"view_private_key":[79,129,37,4,143,168,232,159,111,139,134,81,177,100,182,113,231,171,111,160,142,132,51,239,92,61,1,250,240,245,159,12],"spend_private_key":[208,164,219,143,181,23,25,206,46,40,192,29,160,127,27,234,92,66,111,234,44,73,179,170,43,50,90,74,123,241,185,8]}
{"root_entropy":[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3],"view_private_key":[34,122,90,71,236,178,101,76,52,244,155,155,247,90,15,0,118,228,247,137,214,40,190,176,43,136,28,153,248,14,222,8],"spend_private_key":[14,14,59,143,146,44,112,243,29,194,52,115,241,106,254,240,80,98,87,123,188,147,99,218,146,156,204,52,149,43,145,4]}
{"root_entropy":[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],"view_private_key":[78,217,207,203,47,170,105,105,60,232,201,232,104,58,21,15,24,178,101,114,85,226,208,179,92,42,195,240,22,205,21,0],"spend_private_key":[227,51,244,58,179,238,14,84,20,10,24,232,33,195,210,198,144,231,164,66,156,64,67,166,42,9,246,144,196,52,202,14]}
{"root_entropy":[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],"view_private_key":[24,94,86,65,176,194,135,28,73,26,91,132,77,243,111,133,104,245,19,42,170,184,251,19,233,177,25,209,112,133,141,7],"spend_private_key":[134,180,208,251,253,152,114,66,230,88,162,28,216,198,90,178,220,237,77,154,8,216,168,4,0,97,222,16,250,197,68,1]}
{"root_entropy":[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6],"view_private_key":[156,232,63,237,189,82,194,11,204,143,241,149,180,67,48,38,236,61,222,197,61,202,20,238,214,58,64,106,61,204,9,9],"spend_private_key":[113,172,187,103,232,2,233,225,170,217,119,207,167,110,177,36,76,191,243,45,109,108,12,168,197,139,55,173,149,225,119,11]}
{"root_entropy":[7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],"view_private_key":[86,144,105,35,142,57,181,11,212,213,21,146,177,153,147,37,174,182,233,2,49,10,212,237,9,137,218,202,50,64,36,8],"spend_private_key":[102,133,194,134,164,69,93,135,192,171,113,193,209,217,160,208,136,44,45,165,167,130,9,190,179,132,187,157,152,59,41,0]}
{"root_entropy":[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8],"view_private_key":[85,74,249,7,82,80,142,98,106,29,80,103,62,71,155,192,244,95,234,82,95,176,155,251,90,118,57,122,229,12,12,11],"spend_private_key":[239,109,235,165,246,159,83,110,171,252,234,254,15,194,237,132,218,252,59,108,104,14,95,1,18,69,76,57,43,90,115,11]}
{"root_entropy":[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9],"view_private_key":[225,164,78,107,246,242,237,180,62,34,71,7,176,175,240,0,111,37,181,83,131,11,125,53,39,64,229,89,64,221,33,7],"spend_private_key":[133,68,203,45,178,174,124,93,24,142,17,219,44,137,108,130,54,246,186,215,98,74,14,207,225,165,188,241,193,214,205,9]}

View File

@ -0,0 +1,10 @@
{"view_public_key":[120,144,28,17,131,78,132,45,246,190,152,193,39,149,53,19,225,22,9,93,65,34,204,39,216,7,180,81,28,184,30,17],"spend_public_key":[246,47,241,195,58,34,133,177,174,230,18,237,135,40,31,44,104,187,43,91,15,20,57,161,62,74,183,40,249,142,251,106],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[218,171,69,215,243,52,135,46,228,198,103,23,15,66,72,19,24,188,14,129,60,15,144,228,200,96,21,48,138,36,30,19,143,238,160,149,234,141,236,222,123,186,166,105,11,95,146,91,146,103,44,195,112,116,200,113,215,199,209,178,116,174,30,130],"b58_encoded":"LzoUvXt79qxx7T2v1bfLiv6bsXb48K9hry7nvun9JZuGBFrZfy48rNTrk6xV7SRme3KAmPgtTkfEE2hdPtfpNrgCdM8hfBFijXxiekoTqhSujNv6BzNjHXiTB8pCLAHLa21vF9gc9ZKRd73GuVS7NABTSg9rheGk6L3Us8nFsMLiMcAS3o1h7UPAJHeQKZndFhVko39YiCPzVGZPy3p74cEFWvdgMmiy"}
{"view_public_key":[242,213,24,35,167,71,65,10,8,175,212,176,194,248,83,226,228,10,6,110,52,178,63,54,0,39,76,123,114,137,242,60],"spend_public_key":[250,135,147,226,173,240,121,164,40,44,128,202,136,92,154,43,199,143,131,197,1,3,34,115,190,158,213,233,200,27,143,42],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[232,105,153,200,26,207,47,43,41,195,76,150,15,0,130,180,191,7,193,166,156,67,76,164,93,198,46,211,240,215,194,64,239,12,142,19,237,174,24,204,178,176,193,221,7,170,44,143,25,224,129,35,17,184,103,57,216,55,74,98,126,81,7,141],"b58_encoded":"YP9Mg88XxqtXgsquPFRDzJtz7JH5rpC3sKZCvJkwNRZ3c3ddoWFWZ7mKLKwufSJKATDuRxTMki6NtX4yarpyCqnx5YGJKhJwp3ysA3ZhMSihjukeWqwcdA6jDQRR4URYN97RKoAYia8yMZYBsf95nx5G3CC8ukFNuLxe3dZPV9vEzqxuY7nvJ89Rgry3JVRjC1mK8iZPrzJNKYWKiRDh8nJqYTTT1Ftg"}
{"view_public_key":[130,243,92,146,13,68,152,112,176,168,159,172,165,104,53,233,4,230,173,12,5,32,233,229,122,241,236,52,115,224,4,107],"spend_public_key":[92,230,63,220,50,157,74,190,188,60,113,152,50,19,57,14,32,173,75,254,109,188,189,123,226,163,162,135,137,185,172,28],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[240,117,160,149,117,21,62,231,165,148,45,43,193,97,134,172,106,63,248,14,5,53,90,253,247,77,124,163,193,180,252,122,93,69,35,3,127,116,221,147,116,115,78,72,165,131,171,216,47,92,130,83,11,246,174,2,161,241,39,44,38,232,83,138],"b58_encoded":"7L898CKvCko8DY9UpQjcsh9xFUSnDfB5SXw2eU1ewJDiTXy4aJs1AWaryaVweKhjcNSFsmaTA7c5LDUS3CRzhcA49UsuWHeH6CNVJSgEk7KyjhxAq5p8pzZv9stsQjr9AK4bH2abCAR13HxtEnGh967QmNYKCv4pdrNqJxje9TrBNqnwFJ54Bd85PM9skuHuE3LfWFN7d7kib1RQ5Fk1BgymRHHwM6Fj"}
{"view_public_key":[248,234,208,78,187,161,114,40,194,92,18,216,149,96,64,147,18,224,8,116,131,247,101,241,66,101,146,208,170,133,238,29],"spend_public_key":[226,225,154,88,141,189,219,98,216,225,164,150,164,146,229,213,9,184,0,59,173,102,238,163,217,29,107,23,185,244,216,98],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[244,82,249,13,119,175,40,117,75,200,205,8,10,235,18,52,64,143,24,112,227,69,65,14,64,111,195,87,78,27,138,102,234,54,96,47,192,192,127,96,120,118,154,89,178,223,139,200,53,17,109,39,87,223,110,185,92,61,20,115,227,179,150,130],"b58_encoded":"35DCvNKJwF8ULrjfzt8dMZ1U87eYhkNYkyLbUekZYCDF96LioBwiQ8NmeTc2cyjEv48K6CSJ1wa2DLrqgWN2VGpF1KQ8NCXNoJ1QhyUF9xQ6ePUAk5CHyQ9HGGx6ouYCs5P3Rnik4U6u7Siu5emZnczRn7bMN8DfYk1RmQV1UUnGUgeY9qjPHeLTPjLyiD9L9YGkQZjiu8DAdv3oXBuyiCQ11W79EfRs"}
{"view_public_key":[126,28,12,78,152,93,238,77,129,45,196,101,158,60,105,12,236,149,178,43,154,135,155,199,125,177,105,104,158,224,190,29],"spend_public_key":[22,179,148,66,101,156,245,235,100,165,156,249,175,138,183,235,160,233,79,180,209,28,156,60,71,187,235,164,112,215,128,34],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[142,209,12,210,232,93,77,213,51,204,54,227,98,1,224,207,174,181,31,145,129,29,76,192,177,154,191,190,41,247,188,35,234,153,220,41,160,134,120,101,32,132,78,123,184,8,79,151,249,4,210,71,18,224,83,232,125,46,64,175,128,193,162,128],"b58_encoded":"ZgmgbVhh5thn593x7dbtGP8orHwNKq3LfHJ2gftRwY9QQqHe24HJnoMuu5RtWeVUiyG7aVBitzg9QjB6oe3uHcUHCV9xpumBHzCGBAQCHQQibyn8JyYD9wK1Mgy2zkHWwapSKAkWrZQr6rWrV9f5fxdmrUssrtiSorqGDn1HZdxuRUTswx7cmLLPpfrwkMtPDBPGscJFtzmNPD8wxwLpuVKbdSinmN5M"}
{"view_public_key":[160,36,153,226,183,117,48,116,19,61,139,71,83,81,21,3,148,79,12,3,4,78,161,66,97,69,227,138,38,216,29,5],"spend_public_key":[66,42,214,68,94,106,248,3,101,118,141,140,157,158,157,166,49,235,125,55,204,40,237,99,197,52,206,123,249,205,80,49],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[222,81,60,180,200,171,229,145,100,46,68,10,93,183,35,227,189,164,54,161,32,183,125,189,130,181,193,7,216,13,100,38,188,54,182,233,115,38,10,85,141,88,245,117,216,67,92,97,46,20,178,185,227,25,96,212,123,176,146,53,94,117,84,133],"b58_encoded":"Kosg822pPGxFUyMcKUYM2T4TQCcQCv4gNQ6jvoWZPNAcTX8F7EYA8Gsg6ebGHc8NMi8fE2pzWw8XCXR2wqAsnujQpAAivdpudKnfty9mAMztVfMfVcKzgN82zaQb4bmieMmiteGeGzvRydGvNk9Rge94RcQ2uBsJBexPJVn8PyhYY51noQLe7MopzDvfLVrqQiMbeV9bAnz5E5WinPRqnLHpAFuDrztC"}
{"view_public_key":[120,172,21,195,28,45,181,83,1,47,73,227,197,46,123,22,48,236,127,102,61,150,167,79,233,147,84,210,46,95,125,54],"spend_public_key":[196,104,171,255,236,204,187,88,204,16,193,154,235,43,15,77,114,247,106,126,216,77,137,105,30,56,162,171,169,25,76,126],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[20,73,97,245,3,34,216,87,157,25,44,59,176,127,168,30,206,114,110,230,214,20,36,247,146,85,149,12,172,141,126,125,140,49,96,216,59,115,49,79,39,189,132,122,141,112,89,100,191,198,202,213,0,31,194,189,20,150,66,232,200,162,225,138],"b58_encoded":"mbwt5tNBBPSoNgP4dMg6sRMtPYZmo7m18T456fRFH33xqtsKGEZAMmaNWBkYaHrv5sejC17d5uXu2XVzs6W5aVSEe9EU4YSZBb77W9R8ecsCVQvCUAc2XUqDWjXfc7fAWVxb7KZE7i4H4cks7F1hSBicGtUmDqCMJsupZNg2i5jwuLKrnjiobXDphejAzsKQdt3rgD6SwmQi4cK9dDufmT9os7mWAJuf"}
{"view_public_key":[122,57,20,19,62,81,21,163,112,132,40,127,135,122,131,56,38,20,157,118,224,114,137,39,111,157,61,233,132,147,235,72],"spend_public_key":[100,74,25,176,44,236,236,249,47,124,171,38,5,248,170,20,174,146,3,115,233,206,205,204,106,204,126,29,205,203,248,30],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[208,222,169,93,51,150,252,137,31,154,66,43,194,190,46,192,203,222,170,40,212,210,202,21,233,237,16,91,175,40,154,101,250,225,228,210,46,9,101,26,157,104,9,123,51,215,212,129,50,193,239,180,118,46,27,144,104,162,87,248,189,22,158,128],"b58_encoded":"XzGnVxQ5J9ybP3R9xQrYDcNw5k5dQVywHii1TKZLAPH18UwmeM3uEF8D4kMF6MucGHsdJgmfuT4KygMUiui9uBJMcWjBp3ii6rehNZQuN9N9jzYgLGF2QT1SK62RDxfGkoRdVgAbiJfC48Jbh1AAf7867VhoA1f3G8KJF44vvzBKoTLYacLuSRkepm5WyAga1BrictcHSnfcDTNrmmZTCk6xZhnyCpRV"}
{"view_public_key":[38,89,41,154,123,89,37,0,46,139,126,106,149,244,68,220,164,225,217,86,191,141,107,73,192,214,142,132,137,14,176,44],"spend_public_key":[190,119,215,124,21,0,205,48,168,63,209,246,36,233,111,149,54,27,104,124,254,86,189,113,153,183,27,113,87,161,218,0],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[66,191,194,67,139,6,160,93,176,246,236,247,125,29,161,3,248,221,78,0,188,40,70,132,175,14,10,39,187,248,113,0,214,3,71,8,24,246,79,122,172,45,228,210,240,55,225,73,241,180,194,227,222,142,98,156,203,139,104,191,229,39,143,130],"b58_encoded":"muHnwuhDJJ64SYPYwk8ZyL81UoGWgMp4mSAfAojHvMzZM7a31NC6teF43zxLZvvmwn7FzGTZz7t5TB4CQWFQstVZGU2xGmYTyWsEGGefLZpUFsgpzeBqhLW6BDx5ccG812xu2BYDbKaoqCtSjQ1WgagSt9uBbsEazX3NBnffaoHdPe6rLRXet96n2mhBgbBK53GBWxiXCBuKavdTiDeR9YhpoYcDRBXo"}
{"view_public_key":[220,68,114,162,209,162,85,112,219,84,211,145,40,246,32,156,42,109,176,173,3,247,77,16,236,37,145,38,88,209,250,110],"spend_public_key":[30,229,85,52,6,85,155,69,66,172,177,45,175,113,69,74,127,201,80,159,97,29,5,46,125,253,22,166,137,12,125,116],"fog_report_url":"fog://example.com","fog_report_id":"","fog_authority_sig":[184,83,244,199,40,242,188,205,240,49,66,84,31,41,211,26,11,171,230,2,214,89,180,155,170,101,126,40,110,12,126,9,176,87,159,30,28,145,220,76,251,7,149,75,162,212,251,7,160,213,216,248,86,187,18,211,187,187,136,222,49,102,108,132],"b58_encoded":"n8XnyaGLBAWxb5n56nMLzZD1FCXgSfd6mEWsWJbLZzkAfMWQE4wV2F7Rb9XEsMtqcKvPqSatA5jKtBSah6HSgH1eFDFAuWVdbATdAz7UrGfzEbaUWuyx6ZkCcrPVpBd4WxpN6y1VE3i4RNJ7KiysF5ARNcuNMGB5Wez3e56FaoXa4EyVvRsdfwXLQCoTFG6zFcTWGhyPDtBD3MW3iD4S4HggQBUpaPij"}

View File

@ -0,0 +1,10 @@
{"view_public_key":[120,144,28,17,131,78,132,45,246,190,152,193,39,149,53,19,225,22,9,93,65,34,204,39,216,7,180,81,28,184,30,17],"spend_public_key":[246,47,241,195,58,34,133,177,174,230,18,237,135,40,31,44,104,187,43,91,15,20,57,161,62,74,183,40,249,142,251,106],"b58_encoded":"6UEtkm1rieLhuz2wvELPHdGiCb96zNnW856QVeGLvYzE7NhmbG1MxnoSPGqyVfEHDvxzQmaURFpZcxT9TSypVgRVAusr7svtD1TcrYj92Uh"}
{"view_public_key":[242,213,24,35,167,71,65,10,8,175,212,176,194,248,83,226,228,10,6,110,52,178,63,54,0,39,76,123,114,137,242,60],"spend_public_key":[250,135,147,226,173,240,121,164,40,44,128,202,136,92,154,43,199,143,131,197,1,3,34,115,190,158,213,233,200,27,143,42],"b58_encoded":"8RwFxr8HXWDBozY7nqNcpuPFgj4o2XskkvnmT8gqSiN1jDUhLT5LpRK1M4aJ4huDvvkbby82rUeuRfCicVEKzYoqsbHkwcDHvE7AgxQ5aNM"}
{"view_public_key":[130,243,92,146,13,68,152,112,176,168,159,172,165,104,53,233,4,230,173,12,5,32,233,229,122,241,236,52,115,224,4,107],"spend_public_key":[92,230,63,220,50,157,74,190,188,60,113,152,50,19,57,14,32,173,75,254,109,188,189,123,226,163,162,135,137,185,172,28],"b58_encoded":"78ovR1Z3Y5k5TkCwgTon5eLRntkAVhNiKd6oobTvb285ixWSuuXpGSSkyKxNHtnj7PZNYf1jh7gt9otpyZ1eKa49kWp3XcgRi5i2QbB4XM"}
{"view_public_key":[248,234,208,78,187,161,114,40,194,92,18,216,149,96,64,147,18,224,8,116,131,247,101,241,66,101,146,208,170,133,238,29],"spend_public_key":[226,225,154,88,141,189,219,98,216,225,164,150,164,146,229,213,9,184,0,59,173,102,238,163,217,29,107,23,185,244,216,98],"b58_encoded":"6h1vDYdgwxRLDFGrmSFGWB3mzR2MusGCwZM3KMs9yTUMNCunFk7tYtEiSBBYLqj4jALM4x7entY9eycXJNk58HYPT4yhaZHe9zTFTmHuiGR"}
{"view_public_key":[126,28,12,78,152,93,238,77,129,45,196,101,158,60,105,12,236,149,178,43,154,135,155,199,125,177,105,104,158,224,190,29],"spend_public_key":[22,179,148,66,101,156,245,235,100,165,156,249,175,138,183,235,160,233,79,180,209,28,156,60,71,187,235,164,112,215,128,34],"b58_encoded":"6fUQTb1gq7b5r5jThqcw6DuXPkiUZGWrbS3PkpRJD2ESRo5wpyb2Q6aa7TsiDPtGtP1GKAb3pehM14diJwKGV6sQRPWq1AV4nZLnBTqijxV"}
{"view_public_key":[160,36,153,226,183,117,48,116,19,61,139,71,83,81,21,3,148,79,12,3,4,78,161,66,97,69,227,138,38,216,29,5],"spend_public_key":[66,42,214,68,94,106,248,3,101,118,141,140,157,158,157,166,49,235,125,55,204,40,237,99,197,52,206,123,249,205,80,49],"b58_encoded":"584N36FhYiB3gJ3r4BJWeMtaUVg72FsLxbSM8FRpiFoDEtK468Gau5FJzGiFzzPYdXvbaTLX9YNaaRi2qBvbUqdfK6LPHGkmKqhbY3xvipG"}
{"view_public_key":[120,172,21,195,28,45,181,83,1,47,73,227,197,46,123,22,48,236,127,102,61,150,167,79,233,147,84,210,46,95,125,54],"spend_public_key":[196,104,171,255,236,204,187,88,204,16,193,154,235,43,15,77,114,247,106,126,216,77,137,105,30,56,162,171,169,25,76,126],"b58_encoded":"7hvBSxKDy6nyjUDXW9WEEFDkxHzCRP7EeWqfgRf3hwosBspfgLiPPnGNTx9NBNU4amSjhTHkqKVsVYTBeBLSYhRKv7ChbXU2xV6RUevvhnu"}
{"view_public_key":[122,57,20,19,62,81,21,163,112,132,40,127,135,122,131,56,38,20,157,118,224,114,137,39,111,157,61,233,132,147,235,72],"spend_public_key":[100,74,25,176,44,236,236,249,47,124,171,38,5,248,170,20,174,146,3,115,233,206,205,204,106,204,126,29,205,203,248,30],"b58_encoded":"38noED98FJdNJTheEPcueupjqz98zUcKJPy7yiU9K9XN9nkyh6ezmbAhMAgXHig3XoWATiWQ23u8ysfsSb1ozFDfSEctgFihubMWFtujbfB"}
{"view_public_key":[38,89,41,154,123,89,37,0,46,139,126,106,149,244,68,220,164,225,217,86,191,141,107,73,192,214,142,132,137,14,176,44],"spend_public_key":[190,119,215,124,21,0,205,48,168,63,209,246,36,233,111,149,54,27,104,124,254,86,189,113,153,183,27,113,87,161,218,0],"b58_encoded":"8ns4BhaF3JqkWupjMFmY3jdPS6LNe4zuw3ijUfLfvcczo3PYVrV8kQC8xim8pfz7JS3YnT4cH1BdDP82EYpjJW6B6BEpaecNmcDvj7kJsJ7"}
{"view_public_key":[220,68,114,162,209,162,85,112,219,84,211,145,40,246,32,156,42,109,176,173,3,247,77,16,236,37,145,38,88,209,250,110],"spend_public_key":[30,229,85,52,6,85,155,69,66,172,177,45,175,113,69,74,127,201,80,159,97,29,5,46,125,253,22,166,137,12,125,116],"b58_encoded":"4KQdENGT6vDpMeaU47JQJ4UVdpVcmxsf9NWY3myEDsipmR4Mrfwas9JnCyo2dVk6M1FX4kwM2KGwjntGwyzLfSJgeK8YV8WMawXS1MdM5C7"}

View File

@ -0,0 +1,10 @@
{"sender_public_address_hex_proto_bytes":"0a220a20ac10e6829b79b5d455ef11d9e91269709575331df5981ceba5e4419807eba12312220a207e03ca21d1123587e3b7deec198c57e1833546ff24cf3edd0b853388fc39195c","recipient_short_address_hash_hex_raw_bytes":"af450111d92495617c547937ac4b69c5","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"20af409e5b0bdb43ba8509a52acfd9e5010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a2086722e820dd167b62b4881a54f16db9a370e74960b54d8b2ca8a19d34263bf4512220a207cbc95b7749d36585c838d44951017b7332dd0c8128c720e84155ec28237bc08","recipient_short_address_hash_hex_raw_bytes":"ed7c3c0cf321b5df945dc885d224b758","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"0f15a6f7627c7ce48e715cea60a5a1fb010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a20de91dfb6fc940f10be8e5925fd7fe82435506e95b3588b2934d618ddbf7e482312220a2082a525bd07bc90286a420d7469cc4b7b812e46724d052e9bfc938f7bb1e98166","recipient_short_address_hash_hex_raw_bytes":"dd1e37ef5b9a91df10895e58b892445c","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"f3c3b96f7cb48ab0279a0916258d88f8010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a2092ae678e9356af11ea4cb0f871def3daf6591966e1b82d64ab36e326a403ce6c12220a2062729523a9077912cef23921eb271d58246df5e9d2a374551d5c792059dfcd24","recipient_short_address_hash_hex_raw_bytes":"1234d2d26df44c4ce9303367f451b3cc","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"c9053d5e151028ce5d118983a3b75802010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a2058028435f688c71729224120c6b4f24eb6c09aa9271eb7b8eef76152023c625912220a20189406fcf36317918cd75bbc9b80471abf9b7a8a2b4c950b0b13e6b466296563","recipient_short_address_hash_hex_raw_bytes":"dd3bf173dcb387ebac8d3cb0bd4f83f8","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"ad11960a5e99c3988378ead3566d1aaa010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a203682901334355ef931b6bf45c30ad1c123793191377806eba712efd9f8f1f22512220a202c79680d5a7642c6bbd38fb5dfb13c9204247bc1f8c96e627e34af63c5131930","recipient_short_address_hash_hex_raw_bytes":"5a97794487e39edda194d6a6089644b5","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"84e59bdffc50ad95710b6a5a8d218872010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a20facc98b9f5df9d4f93936313a8041fab8459d46f48fd48959a51bf2aa7bb926112220a20cab4c03ef4408af235f2e0ac48a08296221b16148a2286628e225054511a3910","recipient_short_address_hash_hex_raw_bytes":"408dcaa16641d5b8de3c87283fa8eca4","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"20d29558845eba04f1b28fc0f542c99e010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a203e3845235077bd432ea77f53295229d22da98c456f8d2bc70ea0aecabc2b535112220a209c50d63b452576d9bc51b61026f17314264192a6339d9fb5acdb5fa1d8eb6255","recipient_short_address_hash_hex_raw_bytes":"75dbe26353817b68703fb39fec1eb024","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"acc5c61be100fea8254ad46f973f0fe1010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a20fc070014ccffeff0a2bce2be23cb5fc0542f4f366048bc9da69375cf3a4c1e5b12220a20fefd5b409629d13ab62713606d8703a89d81f9c9d52751f90b5c85f809e58f42","recipient_short_address_hash_hex_raw_bytes":"8884cc69d6ad4e0a33e99bf0edd91d79","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"439386f4a99e591c291ec8ddd5f3f422010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}
{"sender_public_address_hex_proto_bytes":"0a220a2090233cf74757aa295d6d1eb7775a0128e6d55ae260c6dbee6b9216ffe602c90c12220a201054b1395bd4223e87fed5244e61915ee8eae52693f0f1a9d1c8f3db6f6a7511","recipient_short_address_hash_hex_raw_bytes":"0ce938311b7547fd23cde0d7306d0922","total_outlay":12,"fee":13,"encrypted_destination_memo_hex_raw_bytes":"382c8ba73728ebaa9d5a1ea2244e313a010000000000000d000000000000000c0000000000000000000000000000000000000000000000000000000000000000"}

View File

@ -0,0 +1,10 @@
{"sender_public_address_hex_proto_bytes":"0a220a20269f76626e8eaa1e466fe45f57cc100b5f9ec696ce922e34095294db2581ee7012220a202683a173c59787b013c2e0a5486c6b82b8736b3411a52caa45a293e83d79b355","recipient_view_public_key_hex_raw_bytes":"ac10e6829b79b5d455ef11d9e91269709575331df5981ceba5e4419807eba123","encrypted_sender_memo_hex_raw_bytes":"af450111d92495617c547937ac4b69c50000000000000000000000000000000000000000000000000000000000000000b5e9877848bbcce7d75de40cc1d68741"}
{"sender_public_address_hex_proto_bytes":"0a220a20dcd613560e04d45525672be77fac437e6e13cf82337826e2d19cc2bab47ca47112220a20fab1354c0161b33541d796015b33db07d450a4ada0d58b54a9bcb595becb395e","recipient_view_public_key_hex_raw_bytes":"12f6b404238d1555833a24375d286a99f64e452483371d442ad6c1714f086612","encrypted_sender_memo_hex_raw_bytes":"057e59613ea32f1aa5a38df6a0cb3e7e0000000000000000000000000000000000000000000000000000000000000000a0e80426147d8064b267e948b4191b0b"}
{"sender_public_address_hex_proto_bytes":"0a220a20de91dfb6fc940f10be8e5925fd7fe82435506e95b3588b2934d618ddbf7e482312220a2082a525bd07bc90286a420d7469cc4b7b812e46724d052e9bfc938f7bb1e98166","recipient_view_public_key_hex_raw_bytes":"9c029bf6f8bbb0b41b43c44a21e7b082370b91782b86058f8697e225008bfd67","encrypted_sender_memo_hex_raw_bytes":"f3c3b96f7cb48ab0279a0916258d88f800000000000000000000000000000000000000000000000000000000000000001ef4892f2568d76a0376641114bd87cd"}
{"sender_public_address_hex_proto_bytes":"0a220a207cae66205bdae171088d0521bdbc4f3c7296ffa153ca08cb56f338bef27fcd2a12220a20fce7a8da378fbb505ae80ddfb51b0717f879fe1d776981ffbd3963a217c5b355","recipient_view_public_key_hex_raw_bytes":"42ff482497f47f0871610ca4253c29b12da43f7cf4aa660c54e87714399def7b","encrypted_sender_memo_hex_raw_bytes":"86cd2c765e073c0cc2477ab6a4bb49850000000000000000000000000000000000000000000000000000000000000000ed0364e4abedba5ecdc21c2fb7bbb6d1"}
{"sender_public_address_hex_proto_bytes":"0a220a20aceaa6dc66a7c8b44a6734015b77b15ebac3e57c283fa7270ec5d984cdbc4b4712220a20a8cc77a38243bee4a3fd49158e0cfb077485717c202bd1e90e35c60a149b8568","recipient_view_public_key_hex_raw_bytes":"3682901334355ef931b6bf45c30ad1c123793191377806eba712efd9f8f1f225","encrypted_sender_memo_hex_raw_bytes":"5a97794487e39edda194d6a6089644b50000000000000000000000000000000000000000000000000000000000000000e85ef30757ed53baaa0dcd480b81af9a"}
{"sender_public_address_hex_proto_bytes":"0a220a20b017fd2f1cedb37feaa105f4b3c229181ffca28a7a7e181c3072a939d240595d12220a20244f1e3fb43d844e388e83c7159e1ebd8d603c1d91e869850bebd21e44f8ca3c","recipient_view_public_key_hex_raw_bytes":"d29a2f252e30e8c0592d97105cf551e785fbeaa55e116da3671c8924b5f0056e","encrypted_sender_memo_hex_raw_bytes":"884f5c8771a6a3a16e2c051f579fc04f00000000000000000000000000000000000000000000000000000000000000008b12470fa46f5c206cc889c7d1b02537"}
{"sender_public_address_hex_proto_bytes":"0a220a203e3845235077bd432ea77f53295229d22da98c456f8d2bc70ea0aecabc2b535112220a209c50d63b452576d9bc51b61026f17314264192a6339d9fb5acdb5fa1d8eb6255","recipient_view_public_key_hex_raw_bytes":"6449cb2eb2f5da9b6184701dd35fba6291c381cd5712879308cb7732263f3a4c","encrypted_sender_memo_hex_raw_bytes":"acc5c61be100fea8254ad46f973f0fe1000000000000000000000000000000000000000000000000000000000000000009d284d8b41782c9d8feeea98eb9f895"}
{"sender_public_address_hex_proto_bytes":"0a220a20daec6f02e1ca3e52eb4169b71dc5b5c5a1b1dd0ec35ec49061436b374bfb4f4612220a20623119c1797cd86b90d825197dbb90cbe6c8e40531b70f47ce50434bd5d8d029","recipient_view_public_key_hex_raw_bytes":"c8535e8f819044fbcfaf889e15a9c49acd178021a8e8b9f6852e6741cc359064","encrypted_sender_memo_hex_raw_bytes":"fd3ed449cb830659881eddfc5ef72b6000000000000000000000000000000000000000000000000000000000000000005892d6aae135a49f83860521713e7dbe"}
{"sender_public_address_hex_proto_bytes":"0a220a20529153a9ff1a4de95edbc943c7916260e8c5b89df492597b43f186a3fe90ca5b12220a202c61811326a53b68e78ff7662feff96820682946f716b6affd19065ad45ef54a","recipient_view_public_key_hex_raw_bytes":"da16aa5e5dcd1e197e4b5817c0d7d1de5ff4f1bcbf22dda88173c1b16e365826","encrypted_sender_memo_hex_raw_bytes":"0430aebc9f8c386181e02e4a4a8887310000000000000000000000000000000000000000000000000000000000000000c314e0a7dadb8835edabdfcd215681ec"}
{"sender_public_address_hex_proto_bytes":"0a220a2094528819b1511ac20b3048d771bc006634f6b653e4435af71d97dfa3b6a3d74412220a20020243ee07606ed3de030e5f8e94d6b59cc9c59169462d0ded4a46d2874bd707","recipient_view_public_key_hex_raw_bytes":"de019d0d4a9e699910c5a8393cd2bb3c10eda8797e58b1de089380058c9bda46","encrypted_sender_memo_hex_raw_bytes":"0067153f9036ba9416d5e3e2e3798c5b00000000000000000000000000000000000000000000000000000000000000009b28ce3c9259440ddf02bb58291cc485"}

View File

@ -0,0 +1,10 @@
{"sender_public_address_hex_proto_bytes":"0a220a20269f76626e8eaa1e466fe45f57cc100b5f9ec696ce922e34095294db2581ee7012220a202683a173c59787b013c2e0a5486c6b82b8736b3411a52caa45a293e83d79b355","recipient_view_public_key_hex_raw_bytes":"ac10e6829b79b5d455ef11d9e91269709575331df5981ceba5e4419807eba123","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"af450111d92495617c547937ac4b69c50000000000000017000000000000000000000000000000000000000000000000033ef3d4c1d91ae3c44b32dbc29d55c1"}
{"sender_public_address_hex_proto_bytes":"0a220a20dcd613560e04d45525672be77fac437e6e13cf82337826e2d19cc2bab47ca47112220a20fab1354c0161b33541d796015b33db07d450a4ada0d58b54a9bcb595becb395e","recipient_view_public_key_hex_raw_bytes":"12f6b404238d1555833a24375d286a99f64e452483371d442ad6c1714f086612","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"057e59613ea32f1aa5a38df6a0cb3e7e0000000000000017000000000000000000000000000000000000000000000000888e922c4d6bf60112c55a7bf1d41c85"}
{"sender_public_address_hex_proto_bytes":"0a220a20de91dfb6fc940f10be8e5925fd7fe82435506e95b3588b2934d618ddbf7e482312220a2082a525bd07bc90286a420d7469cc4b7b812e46724d052e9bfc938f7bb1e98166","recipient_view_public_key_hex_raw_bytes":"9c029bf6f8bbb0b41b43c44a21e7b082370b91782b86058f8697e225008bfd67","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"f3c3b96f7cb48ab0279a0916258d88f80000000000000017000000000000000000000000000000000000000000000000953a08c79495e1194305e8919f65431b"}
{"sender_public_address_hex_proto_bytes":"0a220a207cae66205bdae171088d0521bdbc4f3c7296ffa153ca08cb56f338bef27fcd2a12220a20fce7a8da378fbb505ae80ddfb51b0717f879fe1d776981ffbd3963a217c5b355","recipient_view_public_key_hex_raw_bytes":"42ff482497f47f0871610ca4253c29b12da43f7cf4aa660c54e87714399def7b","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"86cd2c765e073c0cc2477ab6a4bb4985000000000000001700000000000000000000000000000000000000000000000068a5b2e904996858336138f878ab7b98"}
{"sender_public_address_hex_proto_bytes":"0a220a20aceaa6dc66a7c8b44a6734015b77b15ebac3e57c283fa7270ec5d984cdbc4b4712220a20a8cc77a38243bee4a3fd49158e0cfb077485717c202bd1e90e35c60a149b8568","recipient_view_public_key_hex_raw_bytes":"3682901334355ef931b6bf45c30ad1c123793191377806eba712efd9f8f1f225","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"5a97794487e39edda194d6a6089644b5000000000000001700000000000000000000000000000000000000000000000093ca45f56344a49fbd0ff2ed7bf71f7d"}
{"sender_public_address_hex_proto_bytes":"0a220a20b017fd2f1cedb37feaa105f4b3c229181ffca28a7a7e181c3072a939d240595d12220a20244f1e3fb43d844e388e83c7159e1ebd8d603c1d91e869850bebd21e44f8ca3c","recipient_view_public_key_hex_raw_bytes":"d29a2f252e30e8c0592d97105cf551e785fbeaa55e116da3671c8924b5f0056e","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"884f5c8771a6a3a16e2c051f579fc04f0000000000000017000000000000000000000000000000000000000000000000e3bfbd94f0ac16ca40131a9128b9fa0b"}
{"sender_public_address_hex_proto_bytes":"0a220a203e3845235077bd432ea77f53295229d22da98c456f8d2bc70ea0aecabc2b535112220a209c50d63b452576d9bc51b61026f17314264192a6339d9fb5acdb5fa1d8eb6255","recipient_view_public_key_hex_raw_bytes":"6449cb2eb2f5da9b6184701dd35fba6291c381cd5712879308cb7732263f3a4c","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"acc5c61be100fea8254ad46f973f0fe10000000000000017000000000000000000000000000000000000000000000000be0155b1aec3069347293025b4b1a89d"}
{"sender_public_address_hex_proto_bytes":"0a220a20daec6f02e1ca3e52eb4169b71dc5b5c5a1b1dd0ec35ec49061436b374bfb4f4612220a20623119c1797cd86b90d825197dbb90cbe6c8e40531b70f47ce50434bd5d8d029","recipient_view_public_key_hex_raw_bytes":"c8535e8f819044fbcfaf889e15a9c49acd178021a8e8b9f6852e6741cc359064","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"fd3ed449cb830659881eddfc5ef72b600000000000000017000000000000000000000000000000000000000000000000da6c169039f5cec238da847278003eba"}
{"sender_public_address_hex_proto_bytes":"0a220a20529153a9ff1a4de95edbc943c7916260e8c5b89df492597b43f186a3fe90ca5b12220a202c61811326a53b68e78ff7662feff96820682946f716b6affd19065ad45ef54a","recipient_view_public_key_hex_raw_bytes":"da16aa5e5dcd1e197e4b5817c0d7d1de5ff4f1bcbf22dda88173c1b16e365826","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"0430aebc9f8c386181e02e4a4a8887310000000000000017000000000000000000000000000000000000000000000000a2b49e4958a58a0bfc39c5c529dbb9e3"}
{"sender_public_address_hex_proto_bytes":"0a220a2094528819b1511ac20b3048d771bc006634f6b653e4435af71d97dfa3b6a3d74412220a20020243ee07606ed3de030e5f8e94d6b59cc9c59169462d0ded4a46d2874bd707","recipient_view_public_key_hex_raw_bytes":"de019d0d4a9e699910c5a8393cd2bb3c10eda8797e58b1de089380058c9bda46","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"0067153f9036ba9416d5e3e2e3798c5b00000000000000170000000000000000000000000000000000000000000000003db233eaed6e4b1a7f3922d104aa4d00"}

View File

@ -0,0 +1,10 @@
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"11e8993af924d072341a204220d6bf425422ceca582788baa46379c12e19a5ceb6ea96fe2cdacbe537a7612220febd16fcd5c235b87565149b9a5e71dd05b2bedd19082567556d25b4101c7603296400000000000000310100000000000000390a00000000000000453841cad04a42d96fd3ae64b1ab61ef87706ecf47199183864205987b455e3224295e7e704343e8c3d96d8b6c0fa3dcb98d8cf51343141405bae3ffcfe881b1f6cc1b33572873e2475208cf29351517665a70"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"11befed0167db652981a2012ae87af1ee17a799f5a5add9864a7827ba5db76fd0533d5aa45050b50849864222004df26aa71786cecbaed6ebceb931af6305e58b170180aabc34a89da7509cb19296500000000000000310100000000000000390a00000000000000453bde76b44a42dd543891e012461240e07890ba74c3fc436c9d11882fad81497a2f85738171d06a0ac4cf211f8333190413bb8666727cb4f00810f95f029a25d621619e0957a1ae93520850de0d1955e9dc9b"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"1109c30e30a49d216f1a207aa89c4a4927ab0bf11329569c3b5775f28316357c061de2e2b02447395c344122201ef6438a72d33a192c922676ae33ccd0d5ff114fa828cf6a56d293826966f85b296600000000000000310100000000000000390a0000000000000045ad2b00a34a428e342fc96116ad9a30ca4e230980a1269af3d3c4219d727e9223799c8569f631b1b98539c3e14245eb20800eaf61f9dcfbe29276c16ae06bca749cca46a17e2d628c520890d06daca3b9202f"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"1131d55f93bcd4c8211a203857c302f5eb1a9c1e9aea59521a0d53d86b68411d0c78579ab5b369810b22522220fa157def90089647f45148cd4a3df43b5ed65ef780fef8e10145882d775f4d71296700000000000000310100000000000000390a0000000000000045795074324a42e899b75248a4d7be6a487cbffd7b81d90046b53bd58523ba3d30c883ebe5ccc10af1a1578028a97480539bc90756a20de27e9e81c69ce4878e1d5be613768201ab1f52082e41b749a85a9d89"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"118abd2f9442a434d21a20b46cb681c24f9f3606c39f145710bc16fb79802904c46d86b77d8ce58a1e5c442220d666dcd7129369f5b978dbe03c46d1556c27674a51eaba72dc8b034cfc3fee54296800000000000000310100000000000000390a0000000000000045cac2fb044a424b92aa79143b7b3e0f833123da72b4296964c307100ef9c65904b12205814f0adc7ad0c649d07ce41f741b4794a17fd3dbcdfe9e865b355840f6d4b795eba32eea285208620dfc2a62ebea54"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"1185bffdc9d2461fe31a20ac83b6396455be23996284dc6597c8c2b5a0a0331297d17e9ae8130edf857d59222058d6f986832b667b86a154cce47f8f21e6c836dc467d212745e65f8b09323240296900000000000000310100000000000000390a00000000000000451c0043ff4a42d90987199def04d07f02e66ca82bb9c34ed40cdbff2e507a7d3256a0c712b8efcfb0d668c3cfd97170172fee75ef240de43fc98f2ed54cab983eb11fe472506264f85208af1982aeab8d6b6c"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"1122f938ec0aaa44271a20c6f0ea99bdab1ff111938f32f2773951c71a7b9c7abbbce4a838ac98549a081d222056c325591ca5f08cf81e7bd59a29ea10c5181499afda340ae7f1ccd16815072b296a00000000000000310100000000000000390a00000000000000450e5f834d4a426417b1363bfb6da65f6b0bd8f46f6da4a0d977119be0729d33a2c35a0b6db18137645d63397f2a938dc16eb27a7ae96fe6e1f988473c6c0103ad8ec68f563a36b6a452086f80ad156979584a"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"1127240d7ff918fe591a20e83acbec5c66c27a174e64766cc1eee90748320aac16b455c60f0ae1c5e3b00d222064e0beabf9c61ce13f907d07284b8d2456e55290e4cba478d451f0bbea6a1d32296b00000000000000310100000000000000390a00000000000000452f744bec4a4201cb8e1aa8ceb299f062265c0e4e6f98ce91a063ffad7214ea6db85ad11c8fa4f026aa391e1d9c5868d10f13c0bbed4331e05d271f757ba02da8451098e7f5196c3e5208ed8ec804af1de992"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"11f25b0e523c681bb41a20a628ddbc0405d2380bc79d9bab4d0ebdaea7fdb085c4cd71d3e649bdad52da0e22200c6863b6bd0006339c88d8a3ab013c14464ebd0ea3458ae347eea38e6461884c296c00000000000000310100000000000000390a00000000000000458f832d734a42ff181ee130b16841cb872e5854bfe3ff1a883eb8123faa5487a7670dfa541f55e7ac4d776fd7b8b3e49be5d7563cc258a5d6d3ea9422de26ad58b8a0c1bb3d0481b152089011738805d7cd43"}
{"recipient_view_private_key_hex_proto_bytes":"0a20c76ec8723f3b198bf8bde76fca07cf98082189ad30a057d25271faabdd105e09","tx_out_record_hex_proto_bytes":"11df80b8127832fcea1a20fc988598614cfc9e679b8946447419f42dd9ede49ee5cff0f253ec8bcb05f03e222062f9216c3a9717c4107db3893237587c30247fc3d3e3e791580d252b74453a41296d00000000000000310100000000000000390a00000000000000452ff6f3af4a425e5f0092ef6ec8e7fe2873ee2e9526cd3c4059fca87932aaad2258d089ab69088f6668e2ac3e0dd6f58aa29865e0cf5d559c28ca407defa0c536f791006a855f4d2052082bfb836e25074bdd"}

View File

@ -0,0 +1,10 @@
{"view_private_key":[176,20,109,232,205,143,91,121,98,249,231,74,94,240,243,229,138,149,80,201,82,122,193,68,243,135,41,240,253,63,237,14],"spend_private_key":[180,191,1,167,126,212,224,101,233,8,45,75,218,103,173,211,12,136,224,33,220,248,31,200,78,106,156,162,203,104,225,7],"subaddress_view_private_key":[190,159,158,147,230,83,60,59,37,3,134,114,0,240,50,243,30,60,78,15,23,150,31,246,192,1,117,76,241,99,148,8],"subaddress_spend_private_key":[128,29,25,125,89,6,98,50,91,210,140,113,249,47,95,68,249,192,181,168,30,209,41,9,255,9,184,51,216,181,97,6],"subaddress_view_public_key":[120,144,28,17,131,78,132,45,246,190,152,193,39,149,53,19,225,22,9,93,65,34,204,39,216,7,180,81,28,184,30,17],"subaddress_spend_public_key":[246,47,241,195,58,34,133,177,174,230,18,237,135,40,31,44,104,187,43,91,15,20,57,161,62,74,183,40,249,142,251,106]}
{"view_private_key":[238,44,205,133,88,138,159,136,134,122,225,29,71,208,164,83,1,132,230,22,214,44,20,71,131,24,54,95,122,169,24,14],"spend_private_key":[108,175,59,49,201,221,189,137,53,2,86,105,75,134,94,190,225,73,92,243,24,28,142,98,149,18,1,28,225,175,252,6],"subaddress_view_private_key":[249,251,202,121,253,11,3,160,148,27,231,227,38,24,129,101,235,191,69,154,191,164,198,112,61,118,1,173,26,90,214,11],"subaddress_spend_private_key":[173,167,240,64,153,71,190,1,147,83,42,78,101,216,150,21,245,125,138,111,66,180,68,130,112,45,32,17,101,218,208,12],"subaddress_view_public_key":[242,213,24,35,167,71,65,10,8,175,212,176,194,248,83,226,228,10,6,110,52,178,63,54,0,39,76,123,114,137,242,60],"subaddress_spend_public_key":[250,135,147,226,173,240,121,164,40,44,128,202,136,92,154,43,199,143,131,197,1,3,34,115,190,158,213,233,200,27,143,42]}
{"view_private_key":[79,129,37,4,143,168,232,159,111,139,134,81,177,100,182,113,231,171,111,160,142,132,51,239,92,61,1,250,240,245,159,12],"spend_private_key":[208,164,219,143,181,23,25,206,46,40,192,29,160,127,27,234,92,66,111,234,44,73,179,170,43,50,90,74,123,241,185,8],"subaddress_view_private_key":[242,27,42,222,126,108,199,122,18,123,97,89,114,220,189,202,89,60,187,219,36,0,66,238,193,154,41,106,208,102,9,15],"subaddress_spend_private_key":[134,8,146,80,247,129,224,174,41,96,235,233,194,218,188,100,111,212,223,4,114,194,149,184,51,131,199,167,165,99,156,14],"subaddress_view_public_key":[130,243,92,146,13,68,152,112,176,168,159,172,165,104,53,233,4,230,173,12,5,32,233,229,122,241,236,52,115,224,4,107],"subaddress_spend_public_key":[92,230,63,220,50,157,74,190,188,60,113,152,50,19,57,14,32,173,75,254,109,188,189,123,226,163,162,135,137,185,172,28]}
{"view_private_key":[34,122,90,71,236,178,101,76,52,244,155,155,247,90,15,0,118,228,247,137,214,40,190,176,43,136,28,153,248,14,222,8],"spend_private_key":[14,14,59,143,146,44,112,243,29,194,52,115,241,106,254,240,80,98,87,123,188,147,99,218,146,156,204,52,149,43,145,4],"subaddress_view_private_key":[193,167,99,168,172,14,35,111,154,200,208,97,215,156,127,77,139,245,219,154,21,41,43,46,63,118,102,167,236,30,177,12],"subaddress_spend_private_key":[182,166,112,117,42,66,58,221,38,139,43,102,100,38,6,155,132,40,235,73,81,137,54,153,152,34,111,218,84,80,216,1],"subaddress_view_public_key":[248,234,208,78,187,161,114,40,194,92,18,216,149,96,64,147,18,224,8,116,131,247,101,241,66,101,146,208,170,133,238,29],"subaddress_spend_public_key":[226,225,154,88,141,189,219,98,216,225,164,150,164,146,229,213,9,184,0,59,173,102,238,163,217,29,107,23,185,244,216,98]}
{"view_private_key":[78,217,207,203,47,170,105,105,60,232,201,232,104,58,21,15,24,178,101,114,85,226,208,179,92,42,195,240,22,205,21,0],"spend_private_key":[227,51,244,58,179,238,14,84,20,10,24,232,33,195,210,198,144,231,164,66,156,64,67,166,42,9,246,144,196,52,202,14],"subaddress_view_private_key":[46,78,145,230,37,35,38,71,37,123,199,7,44,151,85,94,102,70,72,149,195,91,243,19,170,95,187,124,89,230,43,6],"subaddress_spend_private_key":[250,67,57,174,108,84,215,89,88,72,75,245,202,3,121,230,172,104,62,15,72,128,75,8,6,68,131,175,21,208,249,3],"subaddress_view_public_key":[126,28,12,78,152,93,238,77,129,45,196,101,158,60,105,12,236,149,178,43,154,135,155,199,125,177,105,104,158,224,190,29],"subaddress_spend_public_key":[22,179,148,66,101,156,245,235,100,165,156,249,175,138,183,235,160,233,79,180,209,28,156,60,71,187,235,164,112,215,128,34]}
{"view_private_key":[24,94,86,65,176,194,135,28,73,26,91,132,77,243,111,133,104,245,19,42,170,184,251,19,233,177,25,209,112,133,141,7],"spend_private_key":[134,180,208,251,253,152,114,66,230,88,162,28,216,198,90,178,220,237,77,154,8,216,168,4,0,97,222,16,250,197,68,1],"subaddress_view_private_key":[122,177,232,73,96,16,97,125,11,86,128,53,13,154,29,232,64,188,249,115,199,69,192,206,22,117,75,210,102,166,174,2],"subaddress_spend_private_key":[53,119,194,35,228,189,105,228,114,64,46,198,84,188,137,99,165,51,232,220,82,52,24,171,93,3,18,229,17,228,140,9],"subaddress_view_public_key":[160,36,153,226,183,117,48,116,19,61,139,71,83,81,21,3,148,79,12,3,4,78,161,66,97,69,227,138,38,216,29,5],"subaddress_spend_public_key":[66,42,214,68,94,106,248,3,101,118,141,140,157,158,157,166,49,235,125,55,204,40,237,99,197,52,206,123,249,205,80,49]}
{"view_private_key":[156,232,63,237,189,82,194,11,204,143,241,149,180,67,48,38,236,61,222,197,61,202,20,238,214,58,64,106,61,204,9,9],"spend_private_key":[113,172,187,103,232,2,233,225,170,217,119,207,167,110,177,36,76,191,243,45,109,108,12,168,197,139,55,173,149,225,119,11],"subaddress_view_private_key":[79,179,112,219,16,235,33,204,90,34,123,176,140,107,126,117,124,159,209,227,159,68,91,37,94,204,66,43,69,56,57,4],"subaddress_spend_private_key":[43,83,93,136,130,144,164,44,139,255,113,103,244,28,206,61,122,100,251,225,2,45,95,91,195,121,148,169,114,166,180,5],"subaddress_view_public_key":[120,172,21,195,28,45,181,83,1,47,73,227,197,46,123,22,48,236,127,102,61,150,167,79,233,147,84,210,46,95,125,54],"subaddress_spend_public_key":[196,104,171,255,236,204,187,88,204,16,193,154,235,43,15,77,114,247,106,126,216,77,137,105,30,56,162,171,169,25,76,126]}
{"view_private_key":[86,144,105,35,142,57,181,11,212,213,21,146,177,153,147,37,174,182,233,2,49,10,212,237,9,137,218,202,50,64,36,8],"spend_private_key":[102,133,194,134,164,69,93,135,192,171,113,193,209,217,160,208,136,44,45,165,167,130,9,190,179,132,187,157,152,59,41,0],"subaddress_view_private_key":[103,184,20,14,225,193,220,58,39,159,169,190,199,180,62,203,9,221,77,13,22,164,104,133,52,196,128,106,56,140,242,15],"subaddress_spend_private_key":[146,127,76,225,98,232,160,186,44,143,79,169,90,32,188,34,64,250,198,90,135,8,240,41,100,168,88,242,197,4,227,0],"subaddress_view_public_key":[122,57,20,19,62,81,21,163,112,132,40,127,135,122,131,56,38,20,157,118,224,114,137,39,111,157,61,233,132,147,235,72],"subaddress_spend_public_key":[100,74,25,176,44,236,236,249,47,124,171,38,5,248,170,20,174,146,3,115,233,206,205,204,106,204,126,29,205,203,248,30]}
{"view_private_key":[85,74,249,7,82,80,142,98,106,29,80,103,62,71,155,192,244,95,234,82,95,176,155,251,90,118,57,122,229,12,12,11],"spend_private_key":[239,109,235,165,246,159,83,110,171,252,234,254,15,194,237,132,218,252,59,108,104,14,95,1,18,69,76,57,43,90,115,11],"subaddress_view_private_key":[243,85,186,60,154,13,49,221,234,73,18,134,244,54,89,223,31,191,19,162,174,127,197,140,65,129,171,117,204,63,198,13],"subaddress_spend_private_key":[51,118,148,67,83,44,195,33,122,102,112,142,246,122,35,122,199,8,114,80,170,239,25,158,177,82,69,67,240,170,242,10],"subaddress_view_public_key":[38,89,41,154,123,89,37,0,46,139,126,106,149,244,68,220,164,225,217,86,191,141,107,73,192,214,142,132,137,14,176,44],"subaddress_spend_public_key":[190,119,215,124,21,0,205,48,168,63,209,246,36,233,111,149,54,27,104,124,254,86,189,113,153,183,27,113,87,161,218,0]}
{"view_private_key":[225,164,78,107,246,242,237,180,62,34,71,7,176,175,240,0,111,37,181,83,131,11,125,53,39,64,229,89,64,221,33,7],"spend_private_key":[133,68,203,45,178,174,124,93,24,142,17,219,44,137,108,130,54,246,186,215,98,74,14,207,225,165,188,241,193,214,205,9],"subaddress_view_private_key":[17,129,246,35,66,7,169,81,241,243,2,206,100,151,247,4,152,23,235,53,106,228,187,203,66,17,81,110,159,157,204,3],"subaddress_spend_private_key":[163,243,251,145,235,141,129,52,29,162,225,20,66,173,190,76,61,64,133,237,161,252,115,242,231,195,205,174,189,67,69,9],"subaddress_view_public_key":[220,68,114,162,209,162,85,112,219,84,211,145,40,246,32,156,42,109,176,173,3,247,77,16,236,37,145,38,88,209,250,110],"subaddress_spend_public_key":[30,229,85,52,6,85,155,69,66,172,177,45,175,113,69,74,127,201,80,159,97,29,5,46,125,253,22,166,137,12,125,116]}

View File

@ -0,0 +1,10 @@
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20ac10e6829b79b5d455ef11d9e91269709575331df5981ceba5e4419807eba12312220a207e03ca21d1123587e3b7deec198c57e1833546ff24cf3edd0b853388fc39195c","incorrect_recipient_view_public_key_hex_raw_bytes":"269f76626e8eaa1e466fe45f57cc100b5f9ec696ce922e34095294db2581ee70","encrypted_sender_memo_hex_raw_bytes":"af450111d92495617c547937ac4b69c50000000000000000000000000000000000000000000000000000000000000000b5e9877848bbcce7d75de40cc1d68741"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a2012f6b404238d1555833a24375d286a99f64e452483371d442ad6c1714f08661212220a20f867a7b4ae892fd85dd30bebc2d3903cf7be951eaa6ae04225738f6f02d6d515","incorrect_recipient_view_public_key_hex_raw_bytes":"dcd613560e04d45525672be77fac437e6e13cf82337826e2d19cc2bab47ca471","encrypted_sender_memo_hex_raw_bytes":"057e59613ea32f1aa5a38df6a0cb3e7e0000000000000000000000000000000000000000000000000000000000000000a0e80426147d8064b267e948b4191b0b"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a209c029bf6f8bbb0b41b43c44a21e7b082370b91782b86058f8697e225008bfd6712220a201a6ba72de659c31bd8965e7447786198b636d0451ba7d603598ebb08481db476","incorrect_recipient_view_public_key_hex_raw_bytes":"de91dfb6fc940f10be8e5925fd7fe82435506e95b3588b2934d618ddbf7e4823","encrypted_sender_memo_hex_raw_bytes":"f3c3b96f7cb48ab0279a0916258d88f800000000000000000000000000000000000000000000000000000000000000001ef4892f2568d76a0376641114bd87cd"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a2042ff482497f47f0871610ca4253c29b12da43f7cf4aa660c54e87714399def7b12220a2034f4543f15f4e398feb5e7b0732ae16bd7aa916f52c25d5448b0486b35c7fb24","incorrect_recipient_view_public_key_hex_raw_bytes":"7cae66205bdae171088d0521bdbc4f3c7296ffa153ca08cb56f338bef27fcd2a","encrypted_sender_memo_hex_raw_bytes":"86cd2c765e073c0cc2477ab6a4bb49850000000000000000000000000000000000000000000000000000000000000000ed0364e4abedba5ecdc21c2fb7bbb6d1"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a203682901334355ef931b6bf45c30ad1c123793191377806eba712efd9f8f1f22512220a202c79680d5a7642c6bbd38fb5dfb13c9204247bc1f8c96e627e34af63c5131930","incorrect_recipient_view_public_key_hex_raw_bytes":"aceaa6dc66a7c8b44a6734015b77b15ebac3e57c283fa7270ec5d984cdbc4b47","encrypted_sender_memo_hex_raw_bytes":"5a97794487e39edda194d6a6089644b50000000000000000000000000000000000000000000000000000000000000000e85ef30757ed53baaa0dcd480b81af9a"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20d29a2f252e30e8c0592d97105cf551e785fbeaa55e116da3671c8924b5f0056e12220a204073bc5450d2be78e276fa94a75476ab22a6c94dee2c1a17c017834c2358f06e","incorrect_recipient_view_public_key_hex_raw_bytes":"b017fd2f1cedb37feaa105f4b3c229181ffca28a7a7e181c3072a939d240595d","encrypted_sender_memo_hex_raw_bytes":"884f5c8771a6a3a16e2c051f579fc04f00000000000000000000000000000000000000000000000000000000000000008b12470fa46f5c206cc889c7d1b02537"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a206449cb2eb2f5da9b6184701dd35fba6291c381cd5712879308cb7732263f3a4c12220a2072c0c363219224ee647c58088a5499ef979406cc590928bd0c98185f7323b011","incorrect_recipient_view_public_key_hex_raw_bytes":"3e3845235077bd432ea77f53295229d22da98c456f8d2bc70ea0aecabc2b5351","encrypted_sender_memo_hex_raw_bytes":"acc5c61be100fea8254ad46f973f0fe1000000000000000000000000000000000000000000000000000000000000000009d284d8b41782c9d8feeea98eb9f895"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20c8535e8f819044fbcfaf889e15a9c49acd178021a8e8b9f6852e6741cc35906412220a207213973190c3d5339c2f5dfad06f47f81f0624adc7b4ad37c6f28282a0ad1e46","incorrect_recipient_view_public_key_hex_raw_bytes":"daec6f02e1ca3e52eb4169b71dc5b5c5a1b1dd0ec35ec49061436b374bfb4f46","encrypted_sender_memo_hex_raw_bytes":"fd3ed449cb830659881eddfc5ef72b6000000000000000000000000000000000000000000000000000000000000000005892d6aae135a49f83860521713e7dbe"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20da16aa5e5dcd1e197e4b5817c0d7d1de5ff4f1bcbf22dda88173c1b16e36582612220a209a728d2498ed232d395b6c9fb042dd141a6409fd951fea24e778b44518c75874","incorrect_recipient_view_public_key_hex_raw_bytes":"529153a9ff1a4de95edbc943c7916260e8c5b89df492597b43f186a3fe90ca5b","encrypted_sender_memo_hex_raw_bytes":"0430aebc9f8c386181e02e4a4a8887310000000000000000000000000000000000000000000000000000000000000000c314e0a7dadb8835edabdfcd215681ec"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20de019d0d4a9e699910c5a8393cd2bb3c10eda8797e58b1de089380058c9bda4612220a2036a431a5417acf87b4f793a8f2745d1063541efca9d825745bb62584474b906c","incorrect_recipient_view_public_key_hex_raw_bytes":"94528819b1511ac20b3048d771bc006634f6b653e4435af71d97dfa3b6a3d744","encrypted_sender_memo_hex_raw_bytes":"0067153f9036ba9416d5e3e2e3798c5b00000000000000000000000000000000000000000000000000000000000000009b28ce3c9259440ddf02bb58291cc485"}

View File

@ -0,0 +1,10 @@
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20ac10e6829b79b5d455ef11d9e91269709575331df5981ceba5e4419807eba12312220a207e03ca21d1123587e3b7deec198c57e1833546ff24cf3edd0b853388fc39195c","incorrect_recipient_view_public_key_hex_raw_bytes":"269f76626e8eaa1e466fe45f57cc100b5f9ec696ce922e34095294db2581ee70","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"af450111d92495617c547937ac4b69c50000000000000017000000000000000000000000000000000000000000000000033ef3d4c1d91ae3c44b32dbc29d55c1"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a2012f6b404238d1555833a24375d286a99f64e452483371d442ad6c1714f08661212220a20f867a7b4ae892fd85dd30bebc2d3903cf7be951eaa6ae04225738f6f02d6d515","incorrect_recipient_view_public_key_hex_raw_bytes":"dcd613560e04d45525672be77fac437e6e13cf82337826e2d19cc2bab47ca471","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"057e59613ea32f1aa5a38df6a0cb3e7e0000000000000017000000000000000000000000000000000000000000000000888e922c4d6bf60112c55a7bf1d41c85"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a209c029bf6f8bbb0b41b43c44a21e7b082370b91782b86058f8697e225008bfd6712220a201a6ba72de659c31bd8965e7447786198b636d0451ba7d603598ebb08481db476","incorrect_recipient_view_public_key_hex_raw_bytes":"de91dfb6fc940f10be8e5925fd7fe82435506e95b3588b2934d618ddbf7e4823","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"f3c3b96f7cb48ab0279a0916258d88f80000000000000017000000000000000000000000000000000000000000000000953a08c79495e1194305e8919f65431b"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a2042ff482497f47f0871610ca4253c29b12da43f7cf4aa660c54e87714399def7b12220a2034f4543f15f4e398feb5e7b0732ae16bd7aa916f52c25d5448b0486b35c7fb24","incorrect_recipient_view_public_key_hex_raw_bytes":"7cae66205bdae171088d0521bdbc4f3c7296ffa153ca08cb56f338bef27fcd2a","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"86cd2c765e073c0cc2477ab6a4bb4985000000000000001700000000000000000000000000000000000000000000000068a5b2e904996858336138f878ab7b98"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a203682901334355ef931b6bf45c30ad1c123793191377806eba712efd9f8f1f22512220a202c79680d5a7642c6bbd38fb5dfb13c9204247bc1f8c96e627e34af63c5131930","incorrect_recipient_view_public_key_hex_raw_bytes":"aceaa6dc66a7c8b44a6734015b77b15ebac3e57c283fa7270ec5d984cdbc4b47","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"5a97794487e39edda194d6a6089644b5000000000000001700000000000000000000000000000000000000000000000093ca45f56344a49fbd0ff2ed7bf71f7d"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20d29a2f252e30e8c0592d97105cf551e785fbeaa55e116da3671c8924b5f0056e12220a204073bc5450d2be78e276fa94a75476ab22a6c94dee2c1a17c017834c2358f06e","incorrect_recipient_view_public_key_hex_raw_bytes":"b017fd2f1cedb37feaa105f4b3c229181ffca28a7a7e181c3072a939d240595d","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"884f5c8771a6a3a16e2c051f579fc04f0000000000000017000000000000000000000000000000000000000000000000e3bfbd94f0ac16ca40131a9128b9fa0b"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a206449cb2eb2f5da9b6184701dd35fba6291c381cd5712879308cb7732263f3a4c12220a2072c0c363219224ee647c58088a5499ef979406cc590928bd0c98185f7323b011","incorrect_recipient_view_public_key_hex_raw_bytes":"3e3845235077bd432ea77f53295229d22da98c456f8d2bc70ea0aecabc2b5351","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"acc5c61be100fea8254ad46f973f0fe10000000000000017000000000000000000000000000000000000000000000000be0155b1aec3069347293025b4b1a89d"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20c8535e8f819044fbcfaf889e15a9c49acd178021a8e8b9f6852e6741cc35906412220a207213973190c3d5339c2f5dfad06f47f81f0624adc7b4ad37c6f28282a0ad1e46","incorrect_recipient_view_public_key_hex_raw_bytes":"daec6f02e1ca3e52eb4169b71dc5b5c5a1b1dd0ec35ec49061436b374bfb4f46","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"fd3ed449cb830659881eddfc5ef72b600000000000000017000000000000000000000000000000000000000000000000da6c169039f5cec238da847278003eba"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20da16aa5e5dcd1e197e4b5817c0d7d1de5ff4f1bcbf22dda88173c1b16e36582612220a209a728d2498ed232d395b6c9fb042dd141a6409fd951fea24e778b44518c75874","incorrect_recipient_view_public_key_hex_raw_bytes":"529153a9ff1a4de95edbc943c7916260e8c5b89df492597b43f186a3fe90ca5b","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"0430aebc9f8c386181e02e4a4a8887310000000000000017000000000000000000000000000000000000000000000000a2b49e4958a58a0bfc39c5c529dbb9e3"}
{"incorrect_sender_public_address_hex_proto_bytes":"0a220a20de019d0d4a9e699910c5a8393cd2bb3c10eda8797e58b1de089380058c9bda4612220a2036a431a5417acf87b4f793a8f2745d1063541efca9d825745bb62584474b906c","incorrect_recipient_view_public_key_hex_raw_bytes":"94528819b1511ac20b3048d771bc006634f6b653e4435af71d97dfa3b6a3d744","payment_request_id":23,"encrypted_sender_with_payment_request_id_memo_hex_raw_bytes":"0067153f9036ba9416d5e3e2e3798c5b00000000000000170000000000000000000000000000000000000000000000003db233eaed6e4b1a7f3922d104aa4d00"}

View File

@ -0,0 +1,10 @@
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"11e8993af924d072341a204220d6bf425422ceca582788baa46379c12e19a5ceb6ea96fe2cdacbe537a7612220febd16fcd5c235b87565149b9a5e71dd05b2bedd19082567556d25b4101c7603296400000000000000310100000000000000390a00000000000000453841cad04a42d96fd3ae64b1ab61ef87706ecf47199183864205987b455e3224295e7e704343e8c3d96d8b6c0fa3dcb98d8cf51343141405bae3ffcfe881b1f6cc1b33572873e2475208cf29351517665a70"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"11befed0167db652981a2012ae87af1ee17a799f5a5add9864a7827ba5db76fd0533d5aa45050b50849864222004df26aa71786cecbaed6ebceb931af6305e58b170180aabc34a89da7509cb19296500000000000000310100000000000000390a00000000000000453bde76b44a42dd543891e012461240e07890ba74c3fc436c9d11882fad81497a2f85738171d06a0ac4cf211f8333190413bb8666727cb4f00810f95f029a25d621619e0957a1ae93520850de0d1955e9dc9b"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"1109c30e30a49d216f1a207aa89c4a4927ab0bf11329569c3b5775f28316357c061de2e2b02447395c344122201ef6438a72d33a192c922676ae33ccd0d5ff114fa828cf6a56d293826966f85b296600000000000000310100000000000000390a0000000000000045ad2b00a34a428e342fc96116ad9a30ca4e230980a1269af3d3c4219d727e9223799c8569f631b1b98539c3e14245eb20800eaf61f9dcfbe29276c16ae06bca749cca46a17e2d628c520890d06daca3b9202f"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"1131d55f93bcd4c8211a203857c302f5eb1a9c1e9aea59521a0d53d86b68411d0c78579ab5b369810b22522220fa157def90089647f45148cd4a3df43b5ed65ef780fef8e10145882d775f4d71296700000000000000310100000000000000390a0000000000000045795074324a42e899b75248a4d7be6a487cbffd7b81d90046b53bd58523ba3d30c883ebe5ccc10af1a1578028a97480539bc90756a20de27e9e81c69ce4878e1d5be613768201ab1f52082e41b749a85a9d89"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"118abd2f9442a434d21a20b46cb681c24f9f3606c39f145710bc16fb79802904c46d86b77d8ce58a1e5c442220d666dcd7129369f5b978dbe03c46d1556c27674a51eaba72dc8b034cfc3fee54296800000000000000310100000000000000390a0000000000000045cac2fb044a424b92aa79143b7b3e0f833123da72b4296964c307100ef9c65904b12205814f0adc7ad0c649d07ce41f741b4794a17fd3dbcdfe9e865b355840f6d4b795eba32eea285208620dfc2a62ebea54"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"1185bffdc9d2461fe31a20ac83b6396455be23996284dc6597c8c2b5a0a0331297d17e9ae8130edf857d59222058d6f986832b667b86a154cce47f8f21e6c836dc467d212745e65f8b09323240296900000000000000310100000000000000390a00000000000000451c0043ff4a42d90987199def04d07f02e66ca82bb9c34ed40cdbff2e507a7d3256a0c712b8efcfb0d668c3cfd97170172fee75ef240de43fc98f2ed54cab983eb11fe472506264f85208af1982aeab8d6b6c"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"1122f938ec0aaa44271a20c6f0ea99bdab1ff111938f32f2773951c71a7b9c7abbbce4a838ac98549a081d222056c325591ca5f08cf81e7bd59a29ea10c5181499afda340ae7f1ccd16815072b296a00000000000000310100000000000000390a00000000000000450e5f834d4a426417b1363bfb6da65f6b0bd8f46f6da4a0d977119be0729d33a2c35a0b6db18137645d63397f2a938dc16eb27a7ae96fe6e1f988473c6c0103ad8ec68f563a36b6a452086f80ad156979584a"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"1127240d7ff918fe591a20e83acbec5c66c27a174e64766cc1eee90748320aac16b455c60f0ae1c5e3b00d222064e0beabf9c61ce13f907d07284b8d2456e55290e4cba478d451f0bbea6a1d32296b00000000000000310100000000000000390a00000000000000452f744bec4a4201cb8e1aa8ceb299f062265c0e4e6f98ce91a063ffad7214ea6db85ad11c8fa4f026aa391e1d9c5868d10f13c0bbed4331e05d271f757ba02da8451098e7f5196c3e5208ed8ec804af1de992"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"11f25b0e523c681bb41a20a628ddbc0405d2380bc79d9bab4d0ebdaea7fdb085c4cd71d3e649bdad52da0e22200c6863b6bd0006339c88d8a3ab013c14464ebd0ea3458ae347eea38e6461884c296c00000000000000310100000000000000390a00000000000000458f832d734a42ff181ee130b16841cb872e5854bfe3ff1a883eb8123faa5487a7670dfa541f55e7ac4d776fd7b8b3e49be5d7563cc258a5d6d3ea9422de26ad58b8a0c1bb3d0481b152089011738805d7cd43"}
{"spurious_view_private_key_hex_proto_bytes":"0a20824c753f97cd96c94d707cdbb495b1cce2a8dfd0fca2a45a93543292245dae0c","tx_out_record_hex_proto_bytes":"11df80b8127832fcea1a20fc988598614cfc9e679b8946447419f42dd9ede49ee5cff0f253ec8bcb05f03e222062f9216c3a9717c4107db3893237587c30247fc3d3e3e791580d252b74453a41296d00000000000000310100000000000000390a00000000000000452ff6f3af4a425e5f0092ef6ec8e7fe2873ee2e9526cd3c4059fca87932aaad2258d089ab69088f6668e2ac3e0dd6f58aa29865e0cf5d559c28ca407defa0c536f791006a855f4d2052082bfb836e25074bdd"}

View File

@ -0,0 +1,10 @@
{"view_private_key":[176,20,109,232,205,143,91,121,98,249,231,74,94,240,243,229,138,149,80,201,82,122,193,68,243,135,41,240,253,63,237,14],"spend_private_key":[180,191,1,167,126,212,224,101,233,8,45,75,218,103,173,211,12,136,224,33,220,248,31,200,78,106,156,162,203,104,225,7],"subaddress_index":0,"subaddress_view_private_key":[190,159,158,147,230,83,60,59,37,3,134,114,0,240,50,243,30,60,78,15,23,150,31,246,192,1,117,76,241,99,148,8],"subaddress_spend_private_key":[128,29,25,125,89,6,98,50,91,210,140,113,249,47,95,68,249,192,181,168,30,209,41,9,255,9,184,51,216,181,97,6],"subaddress_view_public_key":[120,144,28,17,131,78,132,45,246,190,152,193,39,149,53,19,225,22,9,93,65,34,204,39,216,7,180,81,28,184,30,17],"subaddress_spend_public_key":[246,47,241,195,58,34,133,177,174,230,18,237,135,40,31,44,104,187,43,91,15,20,57,161,62,74,183,40,249,142,251,106]}
{"view_private_key":[238,44,205,133,88,138,159,136,134,122,225,29,71,208,164,83,1,132,230,22,214,44,20,71,131,24,54,95,122,169,24,14],"spend_private_key":[108,175,59,49,201,221,189,137,53,2,86,105,75,134,94,190,225,73,92,243,24,28,142,98,149,18,1,28,225,175,252,6],"subaddress_index":1,"subaddress_view_private_key":[96,188,120,239,138,113,142,115,106,89,85,62,108,208,71,128,180,178,122,186,153,212,161,106,11,141,220,246,160,197,129,8],"subaddress_spend_private_key":[59,126,40,75,255,77,215,252,244,64,168,161,171,250,118,87,171,239,46,212,22,105,174,223,21,195,31,211,164,1,204,9],"subaddress_view_public_key":[188,6,76,110,181,155,104,125,51,238,62,12,80,126,148,137,164,155,112,202,167,134,57,107,187,53,61,120,77,154,187,67],"subaddress_spend_public_key":[248,107,10,64,191,6,121,4,1,194,190,221,28,243,64,189,129,127,247,204,164,220,174,116,119,135,26,40,148,60,94,57]}
{"view_private_key":[79,129,37,4,143,168,232,159,111,139,134,81,177,100,182,113,231,171,111,160,142,132,51,239,92,61,1,250,240,245,159,12],"spend_private_key":[208,164,219,143,181,23,25,206,46,40,192,29,160,127,27,234,92,66,111,234,44,73,179,170,43,50,90,74,123,241,185,8],"subaddress_index":2,"subaddress_view_private_key":[168,39,17,51,91,112,74,56,182,209,151,55,6,25,199,163,225,119,75,8,226,244,121,145,176,88,153,243,126,21,13,11],"subaddress_spend_private_key":[87,193,3,73,20,246,6,239,80,160,164,94,205,214,64,104,46,226,112,254,157,112,231,81,175,136,86,63,231,10,120,8],"subaddress_view_public_key":[158,108,210,11,232,113,65,222,61,225,16,101,199,183,120,49,86,187,171,99,234,237,142,235,31,131,227,78,22,93,70,61],"subaddress_spend_public_key":[46,78,241,86,122,48,155,29,203,176,152,12,220,89,163,242,68,74,251,35,182,83,9,20,17,47,228,31,119,23,158,107]}
{"view_private_key":[34,122,90,71,236,178,101,76,52,244,155,155,247,90,15,0,118,228,247,137,214,40,190,176,43,136,28,153,248,14,222,8],"spend_private_key":[14,14,59,143,146,44,112,243,29,194,52,115,241,106,254,240,80,98,87,123,188,147,99,218,146,156,204,52,149,43,145,4],"subaddress_index":3,"subaddress_view_private_key":[151,132,112,51,36,186,174,110,7,199,198,98,143,41,229,212,124,154,176,197,127,27,145,158,149,233,66,234,235,229,92,1],"subaddress_spend_private_key":[61,167,132,119,219,52,200,167,19,60,5,60,79,54,140,49,108,15,170,84,46,67,42,146,245,136,231,67,74,21,104,2],"subaddress_view_public_key":[222,96,223,65,10,217,3,168,219,244,191,114,130,152,121,182,58,227,180,71,91,204,189,172,79,231,143,215,187,169,194,126],"subaddress_spend_public_key":[50,93,145,116,105,161,123,227,91,58,207,227,228,209,231,89,208,248,196,235,161,68,83,63,56,107,19,61,148,132,113,89]}
{"view_private_key":[78,217,207,203,47,170,105,105,60,232,201,232,104,58,21,15,24,178,101,114,85,226,208,179,92,42,195,240,22,205,21,0],"spend_private_key":[227,51,244,58,179,238,14,84,20,10,24,232,33,195,210,198,144,231,164,66,156,64,67,166,42,9,246,144,196,52,202,14],"subaddress_index":4,"subaddress_view_private_key":[171,253,62,75,23,248,224,147,91,17,147,229,55,174,166,131,203,170,45,144,20,63,230,87,46,89,34,114,231,151,138,6],"subaddress_spend_private_key":[56,246,206,98,84,150,129,31,69,77,34,40,70,174,85,158,69,1,202,165,253,87,132,85,114,176,253,31,252,143,201,11],"subaddress_view_public_key":[160,240,229,224,17,70,108,11,54,145,238,77,13,37,100,42,197,83,203,255,76,35,35,226,32,15,142,195,128,132,199,125],"subaddress_spend_public_key":[96,7,252,25,27,55,247,242,154,190,100,79,65,155,141,59,97,34,222,97,109,186,74,9,139,63,150,86,30,183,157,87]}
{"view_private_key":[24,94,86,65,176,194,135,28,73,26,91,132,77,243,111,133,104,245,19,42,170,184,251,19,233,177,25,209,112,133,141,7],"spend_private_key":[134,180,208,251,253,152,114,66,230,88,162,28,216,198,90,178,220,237,77,154,8,216,168,4,0,97,222,16,250,197,68,1],"subaddress_index":5,"subaddress_view_private_key":[2,127,9,115,152,151,175,145,68,236,177,123,70,80,221,166,62,213,52,184,117,197,66,128,244,141,51,202,14,200,221,11],"subaddress_spend_private_key":[34,247,73,133,54,150,75,203,95,113,210,208,88,51,226,136,180,110,180,161,176,138,123,171,180,118,55,171,239,14,91,9],"subaddress_view_public_key":[252,216,242,35,21,71,158,229,110,111,92,67,55,155,171,64,107,251,196,6,10,97,94,188,114,39,0,157,80,243,34,86],"subaddress_spend_public_key":[150,9,140,110,210,205,112,30,192,27,91,219,7,14,102,126,13,77,128,152,132,47,112,61,204,80,12,90,65,38,23,50]}
{"view_private_key":[156,232,63,237,189,82,194,11,204,143,241,149,180,67,48,38,236,61,222,197,61,202,20,238,214,58,64,106,61,204,9,9],"spend_private_key":[113,172,187,103,232,2,233,225,170,217,119,207,167,110,177,36,76,191,243,45,109,108,12,168,197,139,55,173,149,225,119,11],"subaddress_index":6,"subaddress_view_private_key":[135,72,78,120,163,82,83,201,48,131,219,135,214,125,142,204,148,208,201,54,42,117,102,194,116,116,177,25,175,99,25,3],"subaddress_spend_private_key":[231,45,98,249,154,203,169,37,251,207,200,136,1,17,154,154,104,75,106,116,159,249,164,130,118,0,222,183,30,202,1,2],"subaddress_view_public_key":[62,98,11,205,73,221,90,30,123,18,147,205,200,95,83,230,4,7,238,236,23,99,117,229,227,158,135,149,21,25,40,100],"subaddress_spend_public_key":[182,149,187,65,240,74,173,69,85,248,90,201,254,206,225,211,35,206,151,187,131,20,206,255,141,166,104,243,177,118,108,81]}
{"view_private_key":[86,144,105,35,142,57,181,11,212,213,21,146,177,153,147,37,174,182,233,2,49,10,212,237,9,137,218,202,50,64,36,8],"spend_private_key":[102,133,194,134,164,69,93,135,192,171,113,193,209,217,160,208,136,44,45,165,167,130,9,190,179,132,187,157,152,59,41,0],"subaddress_index":7,"subaddress_view_private_key":[163,27,75,50,12,228,165,63,154,64,68,139,191,237,87,10,42,93,122,11,102,238,42,201,223,34,19,89,252,172,3,13],"subaddress_spend_private_key":[223,217,31,21,72,125,37,208,60,110,158,76,84,212,208,254,56,19,152,26,77,206,37,133,16,190,44,137,24,71,223,8],"subaddress_view_public_key":[14,169,133,192,179,3,47,76,150,9,85,115,99,51,161,109,142,79,214,39,217,187,4,99,153,122,65,120,131,232,144,54],"subaddress_spend_public_key":[104,4,53,107,89,21,110,223,42,231,172,164,98,142,176,37,47,182,22,130,200,163,14,51,52,110,58,3,190,49,149,112]}
{"view_private_key":[85,74,249,7,82,80,142,98,106,29,80,103,62,71,155,192,244,95,234,82,95,176,155,251,90,118,57,122,229,12,12,11],"spend_private_key":[239,109,235,165,246,159,83,110,171,252,234,254,15,194,237,132,218,252,59,108,104,14,95,1,18,69,76,57,43,90,115,11],"subaddress_index":8,"subaddress_view_private_key":[236,196,196,145,146,67,58,200,84,136,88,13,119,93,0,172,121,216,238,153,98,142,115,155,34,169,25,222,27,53,148,3],"subaddress_spend_private_key":[141,81,163,170,23,107,221,150,4,201,202,18,206,77,253,170,76,137,208,7,251,162,207,155,49,204,59,215,68,32,88,4],"subaddress_view_public_key":[224,243,57,53,123,49,134,121,82,63,228,61,194,214,175,98,192,143,107,223,187,132,211,130,165,248,209,179,114,183,40,51],"subaddress_spend_public_key":[192,149,19,198,169,237,101,136,61,97,31,235,77,165,252,154,49,239,178,220,75,74,8,233,102,112,62,140,182,172,48,28]}
{"view_private_key":[225,164,78,107,246,242,237,180,62,34,71,7,176,175,240,0,111,37,181,83,131,11,125,53,39,64,229,89,64,221,33,7],"spend_private_key":[133,68,203,45,178,174,124,93,24,142,17,219,44,137,108,130,54,246,186,215,98,74,14,207,225,165,188,241,193,214,205,9],"subaddress_index":9,"subaddress_view_private_key":[121,81,218,253,77,73,72,28,246,1,75,202,30,228,56,41,98,75,21,111,32,238,94,219,110,171,52,241,147,98,139,8],"subaddress_spend_private_key":[203,235,43,232,244,90,115,197,127,242,74,221,160,232,77,153,218,135,71,164,75,233,59,76,30,129,89,108,38,155,146,9],"subaddress_view_public_key":[112,161,135,90,82,54,187,71,75,93,76,227,194,109,82,151,219,98,240,9,132,102,129,136,248,241,45,227,60,97,171,89],"subaddress_spend_public_key":[220,252,228,53,250,237,47,13,10,23,4,63,114,68,47,183,194,41,186,57,240,52,48,172,38,36,37,126,119,202,67,47]}

View File

@ -0,0 +1,73 @@
// Copyright (c) 2018-2023 MobileCoin Inc.
syntax = "proto3";
package mistyswap_common;
option go_package = "mistyswap/api";
import "google/protobuf/empty.proto";
service MistyswapCommonApi {
/// Get information about this mistyswap instance.
rpc GetInfo (google.protobuf.Empty) returns (GetInfoResponse) {}
}
/// On-going swap info.
message OngoingSwap {
/// The Mixin trace ID of the swap.
string trace_id = 1;
/// The Mixin user ID of the swap.
string follow_id = 2;
/// Asset UUID we are swapping from.
string src_asset_id = 3;
/// Amount we are swapping (string since it can be decimal).
string src_amount = 4;
/// Asset UUID we are swapping to.
string dst_asset_id = 5;
/// Minimum amount we will accept, otherwise the swap gets rejected (string since it can be decimal).
string dst_amount_min = 6;
/// Mixin route hash ids.
string route_hash_ids = 7;
/// The Mixin snapshot JSON blob.
string transfer_json = 8;
/// Our balance of the src asset before we sent the swap transaction.
string pre_swap_src_balance = 9;
/// Our balance of the dst asset before we sent the swap transaction.
string pre_swap_dst_balance = 10;
}
/// Response to the `GetInfo` request
message GetInfoResponse {
/// Max concurrent offramps
uint64 max_concurrent_offramps = 1;
/// Max concurrent onramps
uint64 max_concurrent_onramps = 2;
/// Current number of offramps
uint64 current_offramps = 3;
/// Current number of onramps
uint64 current_onramps = 4;
/// List of supported offramp source asset ids.
repeated string offramp_allowed_src_asset_ids = 5;
/// List of supported offramp destination asset ids.
repeated string offramp_allowed_dst_asset_ids = 6;
/// List of supported onramp source asset ids.
repeated string onramp_allowed_src_asset_ids = 7;
/// List of supported onramp destination asset ids.
repeated string onramp_allowed_dst_asset_ids = 8;
}

View File

@ -0,0 +1,196 @@
// Copyright (c) 2018-2023 MobileCoin Inc.
syntax = "proto3";
package mistyswap_offramp;
option go_package = "mistyswap/api";
import "attest.proto";
import "mistyswap_common.proto";
service MistyswapOfframpApi {
/// Initiate (or pick up a previously initiated) offramp.
/// Input should be an encrypted InitiateOfframpRequest, output is an encrypted InitiateOfframpResponse.
rpc InitiateOfframp(attest.Message) returns (attest.Message) {}
/// Forget an offramp.
/// Input should be an encrypted ForgetOfframpRequest, output is an encrypted ForgetOfframpResponse.
rpc ForgetOfframp(attest.Message) returns (attest.Message) {}
/// Get the status of an offramp.
/// Input should be an encrypted GetOfframpStatusRequest, output is an encrypted GetOfframpStatusResponse.
rpc GetOfframpStatus(attest.Message) returns (attest.Message) {}
/// Get debug info.
/// Input should be an encrypted GetOfframpDebugInfoRequest, output is an encrypted GetOfframpDebugInfoResponse.
rpc GetOfframpDebugInfo(attest.Message) returns (attest.Message) {}
}
/// Various possible offramp error codes.
/// This should be kept in sync with mistyswap_offramp_api::Error
/// The ORC prefix is needed since enum variants have to be unique across all enums in the file.
enum OfframpResultCode {
ORC_INVALID = 0;
ORC_OK = 1;
ORC_TOO_MANY_OFFRAMPS = 2;
ORC_MIXIN_CREDENTIALS_JSON = 3;
ORC_OFFRAMP_ALREADY_IN_PROGRESS = 4;
ORC_MIXIN = 5;
ORC_INVALID_SRC_ASSET_ID = 6;
ORC_INVALID_DST_ASSET_ID = 7;
ORC_OFFRAMP_ID_NOT_FOUND = 8;
ORC_INVALID_SRC_EXPECTED_AMOUNT = 9;
ORC_INVALID_MIN_DST_RECEIVED_AMOUNT = 10;
ORC_INVALID_MAX_FEE_AMOUNT_IN_DST_TOKENS = 11;
ORC_INVALID_FEE_TOKEN_SWAP_MULTIPLIER = 12;
}
/// A simplified GRPC-compatible wrapper for Result<_, mistyswap_offramp_api::Error>
message OfframpResult {
OfframpResultCode code = 1;
string message = 2;
// For OfframAlreadyInProgress, this is the offramp_id of the existing offramp.
bytes offramp_id = 3;
}
/// Offramp parameters.
/// They are separated from the credentials since they are not as sensitive, and it makes it
/// easier to include them to the client in the response to GetOfframpStatus calls.
message OfframpParams {
/// The asset being offramped (the token id we will be swapping from). This
/// would be MOB or eUSD. This is the mixin asset uuid.
string src_asset_id = 1;
/// The amount we are going to be swapping. We use strings to allow
/// decimals.
string src_expected_amount = 2;
/// The Mixin destination asset id (the token id we will be swapping into).
/// This is the mixin asset uuid.
string dst_asset_id = 3;
/// The token-specific address to withdraw into.
string dst_address = 4;
/// The token-specific address tag, if any.
string dst_address_tag = 5;
/// The minimum amount of destination tokens we expect to receive from
/// swapping the source tokens. Note that this includes tokens that will
/// later be swapped for fees if the fee token is not the destination token.
string min_dst_received_amount = 6;
/// The maximum amount of destination tokens we are willing to use for fees.
string max_fee_amount_in_dst_tokens = 7;
/// A multiplier to be applied to the amount of destination tokens swapped for fee tokens.
/// This allows controlling how many extra destination tokens are swapped for fee tokens.
/// Extra tokens are desierable to avoid running into insufficient withdrawal fee issues originating from swap rate fluctuations.
/// The default is used if this field is set to an empty string.
/// Setting it to a value lower than 1.0 will result in an error.
/// The default value is set by the `DEFAULT_FEE_TOKEN_SWAP_MULTIPLIER` constant in the `mistyswap_offramp_impl` crate.
string fee_token_swap_multiplier = 8;
}
/// A request to initiate an offramp.
message InitiateOfframpRequest {
/// Mixin credentials, as a JSON string.
string mixin_credentials_json = 1;
/// Offramp parameters.
OfframpParams params = 2;
}
/// A successful response to an InitiateOfframpRequest.
message InitiateOfframpResponse {
/// Result of the offramp request.
OfframpResult result = 1;
/// Unique ID derived from the offramp request (set if result code is Ok)
bytes offramp_id = 2;
}
/// A request to forget an offramp.
message ForgetOfframpRequest {
/// Unique ID of the offramp to forget.
bytes offramp_id = 1;
}
/// A response to a ForgetOfframpRequest.
message ForgetOfframpResponse {
/// Result of the offramp request.
OfframpResult result = 1;
}
/// Current offramp state.
/// This should be kept in sync with offramp_impl::OfframpState
/// The OS prefix is needed since enum variants have to be unique across all enums in the file.
enum OfframpState {
OS_INVALID = 0;
OS_NOT_STARTED = 1;
OS_POLLING = 2;
OS_WAITING = 3;
OS_INVALID_WITHDRAWAL_ADDRESS = 4;
OS_INTERMITTENT_ERROR = 5;
OS_BLOCKED_ON_SWAP = 6;
OS_BLOCKED_ON_WITHDRAWAL = 7;
OS_WITHDRAWAL_COMPLETED = 8;
OS_UNRECOVERABLE_ERROR = 9;
}
/// Details about a previously-initiated offramp.
message Offramp {
/// The original offramp parameters.
OfframpParams params = 1;
/// Current state of the offramp.
OfframpState state = 2;
/// String details, if any, about the current state.
string state_details = 3;
/// The Mixin withdrawal address as a JSON blob (if available, empty string otherwise)
string mixin_withdrawal_address_json = 4;
/// Ongoing swap info, if any.
mistyswap_common.OngoingSwap ongoing_swap = 5;
/// Ongoing withdrawal info, if any. This is a Mixin snapshot JSON blob.
string ongoing_withdrawal_json = 6;
/// Balances (map of Mixin asset UUID to balance as a decimal number).
map<string, string> balances = 7;
}
/// Get the status of an offramp.
message GetOfframpStatusRequest {
/// Unique ID of the offramp to get the status of.
bytes offramp_id = 1;
}
/// A response to a GetOfframpStatusRequest.
message GetOfframpStatusResponse {
/// Result of the offramp request.
OfframpResult result = 1;
/// The offramp status, if the result code is Ok.
Offramp offramp = 2;
}
/// Get the state transitions of a given offramp (for debug purposes).
message GetOfframpDebugInfoRequest {
/// Unique ID of the offramp to get the status of.
bytes offramp_id = 1;
}
/// A response to a GetOfframpDebugInfoRequest.
message GetOfframpDebugInfoResponse {
/// Result of the offramp request.
OfframpResult result = 1;
/// Debug info, encoded as a JSON blob.
/// The schema is defined by the OfframpDebugInfo Rust struct and serialized by serde.
string debug_info_json = 2;
}

View File

@ -0,0 +1,177 @@
// Copyright (c) 2018-2023 MobileCoin Inc.
syntax = "proto3";
package mistyswap_onramp;
option go_package = "mistyswap/api";
import "attest.proto";
import "mistyswap_common.proto";
service MistyswapOnrampApi {
/// Setup onramping (or check if it is already setup).
/// Input should be an encrypted SetupOnrampRequest, output is an encrypted SetupOnrampResponse.
rpc SetupOnramp(attest.Message) returns (attest.Message) {}
/// Forget an onramp.
/// Input should be an encrypted ForgetOnrampRequest, output is an encrypted ForgetOnrampResponse.
rpc ForgetOnramp(attest.Message) returns (attest.Message) {}
/// Get the status of an onramp.
/// Input should be an encrypted GetOnrampStatusRequest, output is an encrypted GetOnrampStatusResponse.
rpc GetOnrampStatus(attest.Message) returns (attest.Message) {}
/// Get debug info.
/// Input should be an encrypted GetOnrampDebugInfoRequest, output is an encrypted GetOnrampDebugInfoResponse.
rpc GetOnrampDebugInfo(attest.Message) returns (attest.Message) {}
}
/// Various possible onramp error codes.
/// This should be kept in sync with mistyswap_onramp_api::Error
/// The ORC prefix is needed since enum variants have to be unique across all enums in the file.
enum OnrampResultCode {
ORC_INVALID = 0;
ORC_OK = 1;
ORC_TOO_MANY_ONRAMPS = 2;
ORC_MIXIN_CREDENTIALS_JSON = 3;
ORC_CREDENTIALS_ALREADY_IN_USE = 4;
ORC_MIXIN = 5;
ORC_ONRAMP_NOT_FOUND = 6;
ORC_INVALID_SRC_ASSET_ID = 7;
ORC_INVALID_DST_ASSET_ID = 8;
ORC_INVALID_WITHDRAWAL_ADDRESS = 9;
ORC_INVALID_MIN_WITHDRAWAL_AMOUNT = 10;
ORC_INVALID_MIN_SWAP_RATE = 11;
}
/// A simplified GRPC-compatible wrapper for Result<_, mistyswap_onramp_api::Error>
message OnrampResult {
OnrampResultCode code = 1;
string message = 2;
// For Credentials Already In Use, this is the onramp_id of the existing onramp.
bytes onramp_id = 3;
// For Invalid Src/Dst asset id, this is the asset id that was invalid.
string asset_id = 4;
}
/// Onramp parameters.
/// They are separated from the credentials since they are not as sensitive, and it makes it
/// easier to include them to the client in the response to GetOnrampStatus calls.
message OnrampParams {
/// The asset id we will be swapping into. This will be a MobileCoin token such as MOB or EUSD.
string dst_asset_id = 1;
/// A map of Mixin asset UUID to minimum swap rate (as a decimal number). For example,
/// if dst_asset_id is EUSD, and this map contains an entry (USDC, 0.95), and we receive 10 USDC,
/// we will set the minimum amount received from the swap to 9.5 EUSD.
/// This allows the client to control how much slippage it is willing to tolerate when performing swaps.
map<string, string> src_asset_id_to_min_swap_rate = 2;
/// The destination address to withdraw to after a successful swap.
string dst_address = 3;
/// The minimum withdrawal amount (as a decimal number). We will only withdraw if our balance exceeds this value.
/// This helps wasting fees on small withdrawals.
string min_withdrawal_amount = 4;
}
/// A request to setup an onramp.
message SetupOnrampRequest {
/// Mixin credentials, as a JSON string.
string mixin_credentials_json = 1;
/// Onramp parameters.
OnrampParams params = 2;
}
/// A successful response to an SetupOnrampRequest.
message SetupOnrampResponse {
/// Result of the onramp request.
OnrampResult result = 1;
/// Unique ID derived from the onramp request (set if result code is Ok)
bytes onramp_id = 2;
}
/// A request to forget an onramp.
message ForgetOnrampRequest {
/// Unique ID of the onramp to forget.
bytes onramp_id = 1;
}
/// A response to a ForgetOnrampRequest.
message ForgetOnrampResponse {
/// Result of the onramp request.
OnrampResult result = 1;
}
/// Current onramp state.
/// This should be kept in sync with onramp_impl::OnrampState
/// The OS prefix is needed since enum variants have to be unique across all enums in the file.
enum OnrampState {
OS_INVALID = 0;
OS_NOT_STARTED = 1;
OS_POLLING = 2;
OS_WAITING = 3;
OS_INTERMITTENT_ERROR = 4;
OS_BLOCKED_ON_SWAP = 5;
OS_BLOCKED_ON_WITHDRAWAL = 6;
}
/// Details about a previously-initiated onramp.
message Onramp {
/// The original onramp parameters.
OnrampParams params = 1;
/// Current state of the onramp.
OnrampState state = 2;
/// String details, if any, about the current state.
string state_details = 3;
/// The Mixin withdrawal address as a JSON blob.
string mixin_withdrawal_address_json = 4;
/// Ongoing swap info, if any.
mistyswap_common.OngoingSwap ongoing_swap = 5;
/// Ongoing withdrawal info, if any. This is a Mixin snapshot JSON blob.
string ongoing_withdrawal_json = 6;
/// Balances (map of Mixin asset UUID to balance as a decimal number).
map<string, string> balances = 7;
}
/// Get the status of an onramp.
message GetOnrampStatusRequest {
/// Unique ID of the onramp to get the status of.
bytes onramp_id = 1;
}
/// A response to a GetOnrampStatusRequest.
message GetOnrampStatusResponse {
/// Result of the onramp request.
OnrampResult result = 1;
/// The onramp status, if the result code is Ok.
Onramp onramp = 2;
}
/// Get the state transitions of a given onramp (for debug purposes).
message GetOnrampDebugInfoRequest {
/// Unique ID of the onramp to get the status of.
bytes onramp_id = 1;
}
/// A response to a GetOnrampDebugInfoRequest.
message GetOnrampDebugInfoResponse {
/// Result of the onramp request.
OnrampResult result = 1;
/// Debug info, encoded as a JSON blob.
/// The schema is defined by the OnrampDebugInfo Rust struct and serialized by serde.
string debug_info_json = 2;
}

2
Vendor/mobilecoin vendored

@ -1 +1 @@
Subproject commit 06e09b3e0ffac7f8b6845c9e09bfe992f72a5f59
Subproject commit fe8017c7067b6c4c116f353b9e1beb3db5639888

2
libmobilecoin/.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
*.zip filter=lfs diff=lfs merge=lfs -text
Artifacts/bundle.zip filter=lfs diff=lfs merge=lfs -text

2
libmobilecoin/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
out/
target/

3450
libmobilecoin/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

95
libmobilecoin/Cargo.toml Normal file
View File

@ -0,0 +1,95 @@
[package]
name = "libmobilecoin"
version = "6.0.0"
authors = ["MobileCoin"]
edition = "2021"
[lib]
name = "mobilecoin"
crate-type = ["lib", "staticlib", "cdylib"]
[profile.mobile]
inherits = "release"
debug = false
lto = true
[profile.mobile-release]
inherits = "mobile"
codegen-units = 1
[dependencies]
# External dependencies
aes-gcm = "0.10.1"
crc = "3.0.0"
der = "0.7.8"
displaydoc = "0.2"
generic-array = { version = "0.14", features = ["serde", "more_lengths"] }
libc = "0.2"
protobuf = "2.27.1"
rand = { version = "0.8", default-features = false }
rand_chacha = { version = "0.3.1" }
rand_core = { version = "0.6", features = ["std"] }
serde_json = "1.0"
sha2 = { version = "0.10", default-features = false }
slip10_ed25519 = "0.1.3"
tiny-bip39 = "1.0"
zeroize = "1.5"
cmake = "= 0.1.49"
# MobileCoin dependencies
mc-account-keys = { path = "../Vendor/mobilecoin/account-keys" }
mc-api = { path = "../Vendor/mobilecoin/api" }
mc-attest-ake = { path = "../Vendor/mobilecoin/attest/ake" }
mc-attest-core = { path = "../Vendor/mobilecoin/attest/core" }
mc-attest-verifier = { path = "../Vendor/mobilecoin/attest/verifier" }
mc-attest-verifier-types = { path = "../Vendor/mobilecoin/attest/verifier/types", default-features = false }
mc-attestation-verifier = "0.4.1"
mc-blockchain-types = { path = "../Vendor/mobilecoin/blockchain/types" }
mc-common = { path = "../Vendor/mobilecoin/common", features = ["std"] }
mc-core = { path = "../Vendor/mobilecoin/core" }
mc-crypto-box = { path = "../Vendor/mobilecoin/crypto/box" }
mc-crypto-keys = { path = "../Vendor/mobilecoin/crypto/keys" }
mc-crypto-noise = { path = "../Vendor/mobilecoin/crypto/noise" }
#mc-crypto-rand = { path = "../Vendor/mobilecoin/crypto/rand", features = ["std"] }
mc-rand = "1.0"
mc-crypto-ring-signature = { path = "../Vendor/mobilecoin/crypto/ring-signature", default-features = false }
mc-crypto-ring-signature-signer = { path = "../Vendor/mobilecoin/crypto/ring-signature/signer", default-features = false }
mc-crypto-sig = { path = "../Vendor/mobilecoin/crypto/sig" }
mc-fog-ingest-report = { path = "../Vendor/mobilecoin/fog/ingest/report" }
mc-fog-kex-rng = { path = "../Vendor/mobilecoin/fog/kex_rng" }
mc-fog-report-resolver = { path = "../Vendor/mobilecoin/fog/report/resolver" }
mc-fog-report-types = { path = "../Vendor/mobilecoin/fog/report/types" }
mc-fog-report-validation = { path = "../Vendor/mobilecoin/fog/report/validation" }
mc-light-client-verifier = { path = "../Vendor/mobilecoin/light-client/verifier" }
mc-sgx-dcap-types = "0.9.0"
mc-transaction-builder = { path = "../Vendor/mobilecoin/transaction/builder" }
mc-transaction-core = { path = "../Vendor/mobilecoin/transaction/core" }
mc-transaction-extra = { path = "../Vendor/mobilecoin/transaction/extra" }
mc-util-ffi = { path = "../Vendor/mobilecoin/util/ffi" }
mc-util-serial = { path = "../Vendor/mobilecoin/util/serial", features = ["std"] }
mc-util-uri = { path = "../Vendor/mobilecoin/util/uri" }
[dev-dependencies]
cbindgen = { version = "0.24" }
curve25519-dalek = { version = "=4.1.1", default-features = false }
[patch.crates-io]
# Fork and rename to use "OG" dalek-cryptography with latest dependencies.
bulletproofs-og = { git = "https://github.com/mobilecoinfoundation/bulletproofs.git", rev = "9abfdc054d9ba65f1e185ea1e6eff3947ce879dc" }
# mbedtls patched to allow certificate verification with a profile
mbedtls = { git = "https://github.com/mobilecoinfoundation/rust-mbedtls.git", rev = "f82523478a1dd813ca381c190175355d249a8123" }
mbedtls-sys-auto = { git = "https://github.com/mobilecoinfoundation/rust-mbedtls.git", rev = "f82523478a1dd813ca381c190175355d249a8123" }
# Fork and rename to use "OG" dalek-cryptography.
schnorrkel-og = { git = "https://github.com/mobilecoinfoundation/schnorrkel.git", rev = "049bf9d30f3bbe072e2ad1b5eefdf0f3c851215e" }
# Fixes the following:
# * Allow enabling `serde/std` without also requiring `serde_cbor/std` to be enabled.
# See: https://github.com/pyfisch/cbor/pull/198
serde_cbor = { git = "https://github.com/mobilecoinofficial/cbor", rev = "4c886a7c1d523aae1ec4aa7386f402cb2f4341b5" }
# latest mbedtls needs spin `^0.9.4`, but `mc-util-vec-map` resolves spin to `^0.9.2` through `heapless` `^0.7`,
# This specifies we use the latest version of heapless ~`0.9.4` to solve the dependency constraints.
heapless = { git = "https://github.com/mobilecoinofficial/heapless", rev = "2726f63bdc767d025f370d88341b1eb785178f2b" }

621
libmobilecoin/LICENSE Normal file
View File

@ -0,0 +1,621 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

Some files were not shown because too many files have changed in this diff Show More