Compare commits

...

No commits in common. "gh-pages" and "master" have entirely different histories.

441 changed files with 28260 additions and 36628 deletions

View File

@ -1 +1,231 @@
jobs: { build: {} }
version: 2.1
defaults:
default-xcode-version: &default-xcode-version "12.2.0"
default-ruby-version: &default-ruby-version "2.7"
default-environment: &default-environment
FASTLANE_SKIP_UPDATE_CHECK: "1"
devNetworkAuthUsername:
devNetworkAuthPassword:
testNetTestAccountMnemonicsCommaSeparated:
commands:
init-artifacts-submodule:
description: Initialize libmobilecoin-ios-artifacts submodule
steps:
- run:
name: Run git submodule update --init
working_directory: Vendor/libmobilecoin-ios-artifacts
command: git submodule update --init --depth 1 --recursive
print-tool-versions:
description: Print versions of various tools used
steps:
- run:
name: Print tool versions
command: |
set -x
brew config
brew list --versions
bundle env
bundle exec pod env
printenv
set-ruby-version:
description: Set Ruby Version
parameters:
ruby-version:
type: string
default: *default-ruby-version
steps:
- run:
name: Use Ruby << parameters.ruby-version >>
command: |
echo 'source /usr/local/share/chruby/chruby.sh' >> $BASH_ENV
echo 'chruby ruby-<< parameters.ruby-version >>' >> $BASH_ENV
install-gems:
description: Install Ruby gems
parameters:
ruby-version:
type: string
default: *default-ruby-version
steps:
- restore_cache:
name: Restore Ruby gem cache
keys:
- v0-ruby-<< parameters.ruby-version >>-gems-{{ checksum "Gemfile.lock" }}
- v0-ruby-<< parameters.ruby-version >>-gems-
- run:
name: Install root bundler dependencies
command: |
bundle config set --local deployment 'true'
bundle config set --local path '.vendor/bundle'
bundle config set --local clean 'true'
bundle check || bundle install
- save_cache:
name: Save Ruby gem cache
key: v0-ruby-<< parameters.ruby-version >>-gems-{{ checksum "Gemfile.lock" }}
paths:
- .vendor/bundle
install-example-gems:
description: Install gems for Example project
parameters:
ruby-version:
type: string
default: *default-ruby-version
steps:
- restore_cache:
name: Restore Ruby gem cache for Example project
keys:
- v0-example-ruby-<< parameters.ruby-version >>-gems-{{ checksum "Example/Gemfile.lock" }}
- v0-example-ruby-<< parameters.ruby-version >>-gems-
- run:
name: Install Example project bundler dependencies
working_directory: Example
command: |
bundle config set --local deployment 'true'
bundle config set --local path '.vendor/bundle'
bundle config set --local clean 'true'
bundle check || bundle install
- save_cache:
name: Save Ruby gem cache for Example project
key: v0-example-ruby-<< parameters.ruby-version >>-gems-{{ checksum "Example/Gemfile.lock" }}
paths:
- Example/.vendor/bundle
install-example-pods:
description: Install pods for Example project
parameters:
xcode-version:
type: string
steps:
- restore_cache:
name: Restore CocoaPods cache
keys:
- v0-xcode-<< parameters.xcode-version >>-example-pods-{{ checksum "Example/Podfile.lock" }}
- v0-xcode-<< parameters.xcode-version >>-example-pods-
- run: cd Example && bundle exec pod install --deployment
- save_cache:
name: Save CocoaPods cache
key: v0-xcode-<< parameters.xcode-version >>-example-pods-{{ checksum "Example/Podfile.lock" }}
paths:
- Example/Pods
install-gh-pages:
description: Install gh-pages npm package
steps:
- run:
name: Install and configure gh-pages
command: |
npm install --loglevel error gh-pages@2.2.0
git config user.email "mobilecoin-ci@mobilecoin.com"
git config user.name "mobilecoin-ci"
push-docs:
steps:
- add_ssh_keys:
fingerprints:
- "c2:90:32:ec:0e:38:09:a0:b0:d7:20:23:68:bc:8d:6f"
- run:
name: Deploy docs to gh-pages branch
command: |
mkdir -p docs/.circleci
echo "jobs: { build: {} }" > docs/.circleci/config.yml
./node_modules/.bin/gh-pages --message "[skip ci] Update docs" --dist docs --dotfiles
check-dirty-git:
steps:
- run:
name: Check dirty git
command: |
if [[ -n $(git status --porcelain) ]]; then
echo "repo is dirty"
git status
exit 1
fi
jobs:
build-and-test:
parameters:
xcode-version:
type: string
default: *default-xcode-version
macos:
xcode: << parameters.xcode-version >>
environment:
<<: *default-environment
FL_BUILDLOG_PATH: ../output/buildlogs
SCAN_OUTPUT_DIRECTORY: ../output/scan
SCAN_OUTPUT_TYPES: junit
steps:
- checkout
- init-artifacts-submodule
- set-ruby-version
- install-gems
- install-example-gems
- install-example-pods:
xcode-version: << parameters.xcode-version >>
- print-tool-versions
- run: make build
- run: make test
#- run: make docs
#- run: make lint-docs
- store_artifacts: { path: output }
- store_test_results: { path: output/scan }
- store_artifacts: { path: ~/Library/Logs/DiagnosticReports }
- check-dirty-git
generate-docs:
parameters:
xcode-version:
type: string
default: *default-xcode-version
macos:
xcode: << parameters.xcode-version >>
environment:
<<: *default-environment
steps:
- checkout
- init-artifacts-submodule
- set-ruby-version
- install-example-gems
- install-example-pods:
xcode-version: << parameters.xcode-version >>
- install-gems
- run:
name: Generate docs
command: make docs
- persist_to_workspace:
root: .
paths: docs
deploy-docs:
docker:
- image: cimg/node:12.18.2
environment:
<<: *default-environment
steps:
- checkout
- attach_workspace: { at: . }
- install-gh-pages
- push-docs
workflows:
version: 2
build:
jobs:
- build-and-test:
name: build-and-test-xcode-<< matrix.xcode-version >>
matrix:
parameters:
xcode-version: [*default-xcode-version]
#- generate-docs:
#filters:
#branches: { only: master }
#- deploy-docs:
#requires: [ build-and-test, generate-docs ]
#filters:
#branches: { only: master }

10
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule: { interval: "daily" }
- package-ecosystem: bundler
directory: "/Example"
schedule: { interval: "daily" }

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
# Xcode
xcuserdata/
# Fastlane
test_output/
# Bundler
.bundle/
.vendor/
# CocoaPods
Pods/
# Jazzy
/docs/
# npm
node_modules/
/package-lock.json
# CircleCI-only
/output/

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "Vendor/libmobilecoin-ios-artifacts"]
path = Vendor/libmobilecoin-ios-artifacts
url = https://github.com/mobilecoinofficial/libmobilecoin-ios-artifacts.git
shallow = true

74
.jazzy.yaml Normal file
View File

@ -0,0 +1,74 @@
module_version: latest
source_directory: Sources
github_url: https://github.com/mobilecoinofficial/MobileCoin-Swift
github_file_prefix: https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources
swift_build_tool: xcodebuild
build_tool_arguments:
- -workspace
- ../Example/Example.xcworkspace
- -scheme
- Unit Tests
clean: true
theme: fullwidth
hide_documentation_coverage: true
undocumented_text: ''
custom_categories:
- name: Classes
children:
- MobileCoinClient
- name: Structures
children:
- AccountKey
- PublicAddress
- Balance
- AccountActivity
- OwnedTxOut
- BlockMetadata
- Transaction
- Receipt
- MobUri
- PaymentRequest
- TransferPayload
- Attestation
- name: Utilities
children:
- Mnemonic
- Base58Coder
- name: Enumerations
children:
- FeeLevel
- TransactionStatus
- ReceiptStatus
- MobUri.Payload
- Base58DecodingResult
- name: Protocols
children:
- StorageAdapter
- name: Configuration
children:
- MobileCoinLogging
- name: Errors
children:
- ConnectionError
- InvalidInputError
- BalanceTransferEstimationFetcherError
- TransactionEstimationFetcherError
- TransactionPreparationError
- DefragTransactionPreparationError
- TransactionSubmissionError
- name: Deprecated
children:
- BalanceTransferEstimationError
- TransactionEstimationError

134
.swiftlint.yml Normal file
View File

@ -0,0 +1,134 @@
# Rule list: https://github.com/realm/SwiftLint/blob/master/Rules.md
disabled_rules: # rule identifiers to exclude from running
- nesting
- opening_brace
# disabled by default
- conditional_returns_on_newline
- file_types_order
- missing_docs
- no_grouping_extension
- nslocalizedstring_require_bundle
- extension_access_modifier
- type_contents_order
# consider enabling ones below
- explicit_acl
- identifier_name
- empty_count
- shorthand_operator
- attributes
- object_literal
- discouraged_optional_collection
- number_separator
- vertical_whitespace_between_cases
- multiline_arguments_brackets
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- trailing_closure
opt_in_rules: # some rules are only opt-in
- anyobject_protocol
- array_init
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_first_not_nil
- convenience_type
- discouraged_object_literal
- discouraged_optional_boolean
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- explicit_self
- fatal_error_message
- file_header
- file_name
- first_where
- force_unwrapping
- function_default_parameter_at_end
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- last_where
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- multiline_arguments
- multiline_function_chains
- multiline_parameters
- multiline_parameters_brackets
- no_extension_access_modifier
- nslocalizedstring_key
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- prefixed_toplevel_constant
- private_action
- private_outlet
- prohibited_interface_builder
- prohibited_super_call
- reduce_into
- redundant_nil_coalescing
- redundant_type_annotation
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- strong_iboutlet
- switch_case_on_newline
- toggle_bool
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- unused_declaration
- unused_import
- vertical_parameter_alignment_on_call
- xct_specific_matcher
- yoda_condition
# Find all the available rules by running:
# swiftlint rules
included: # paths to include during linting. Ignored if `--path` is present unless `--force-exclude` is specified.
- Sources
- Tests
excluded: # paths to ignore during linting. Takes precedence over `included`.
# configurable rules can be customized from this configuration file
# binary rules can set their severity level
force_cast: warning # implicitly
force_try:
severity: warning # explicitly
# rules that have both warning and error levels, can set just the warning level
# implicitly
line_length: 100
# they can set both implicitly with an array
type_body_length:
- 300 # warning
- 400 # error
# or they can set both explicitly
file_length:
warning: 500
error: 1200
# naming rules can set warnings/errors for min_length and max_length
# additionally they can set excluded names
type_name:
min_length: 4 # only warning
max_length: # warning and error
warning: 40
error: 50
excluded: iPhone # excluded via string
identifier_name:
excluded: ['i', 'n', 't', 'x']
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji, sonarqube, markdown)
trailing_comma:
mandatory_comma: true
file_header:
required_pattern: |
\/\/
\/\/ Copyright \(c\) \d{4}(?:-\d{4})? MobileCoin\. All rights reserved\.
\/\/
# Temporarily turn this into a warning until the code is fixed
large_tuple:
error: 6

56
CHANGELOG.md Normal file
View File

@ -0,0 +1,56 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.2.0-pre2] - 2021-10-27
### Added
- Support for Apple's Bitcode. Reduces compressed "downloadable" size by 25% (#80)
### Changed
- Upgraded LibMobileCoin to v1.2.0-pre3 (#80)
- Updated Trust Root Certificate (#78)
## [1.2.0-pre0] - 2021-09-17
### Added
- HTTP Interface to API for Network Robustness (#73)
- Apple Silicon M1 & Mac Catalyst Support (#73)
### Changed
- Upgraded LibMobileCoin & Fog to v1.2.0-pre1 (#73)
## [1.1.0] - 2021-06-10
### Added
- Minimum transaction fee caching. (#38)
### Changed
- Upgraded LibMobileCoin to v1.1.0. (#39)
## [1.1.0-pre2] - 2021-05-10
### Added
- Dynamic minimum transaction fee. (#29)
### Changed
- Upgraded LibMobileCoin to v1.1.0-pre2. (#27)
## [1.0.0] - 2021-04-05
## 1.0.0-rc1 - 2021-03-15
[1.1.0]: https://github.com/mobilecoinofficial/MobileCoin-Swift/compare/1.1.0-pre2...1.1.0
[1.1.0-pre2]: https://github.com/mobilecoinofficial/MobileCoin-Swift/compare/1.0.0...1.1.0-pre2
[1.0.0]: https://github.com/mobilecoinofficial/MobileCoin-Swift/compare/1.0.0-rc1...1.0.0

30
CLA.md Normal file
View File

@ -0,0 +1,30 @@
## Contributor License Agreement
Thank you for your contribution to the MobileCoin project from MoblieCoin Inc. (“MobileCoin”).
This contributor license agreement documents the rights granted by contributors to MobileCoin. This license is for your protection as a Contributor as well as the protection of MobileCoin, its users, and its licensees; you may still license your own Contributions under other terms.
In exchange for the ability to participate in the MobileCoin community and for other good consideration, the receipt of which is hereby acknowledged, you accept and agree to the following terms and conditions for Your present and future Contributions submitted to MobileCoin. Except for the license granted herein to MobileCoin and recipients of software distributed by MobileCoin, You reserve all right, title, and interest in and to Your Contributions.
1. Definitions.
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with MobileCoin. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
“Contribution” shall mean any original work of authorship or invention, including any modifications or additions to an existing work, that is intentionally submitted by You to MobileCoin for inclusion in, or documentation of, any of the products owned or managed by MobileCoin (the “Work”). For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to MobileCoin or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, MobileCoin for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as “Not a Contribution.”
1. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to MobileCoin and to recipients of software distributed by MobileCoin a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute Your Contributions and such derivative works, as well as the right to sublicense and have sublicensed all of the foregoing rights, through multiple tiers of sublicensees, provided that in all cases, MobileCoin will make Your Contributions available under an open source license.
a. Moral Rights. If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against MobileCoin or its successors in interest, or any of MobileCoins licensees, either direct or indirect.
1. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to MobileCoin and to recipients of software distributed by MobileCoin a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
1. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your contributions to MobileCoin, or that your employer has executed with MobileCoin a separate contributor license agreement substantially similar to this Agreement.
1. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
1. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of title, non-infringement, merchantability, or fitness for a particular purpose.
1. Should You wish to submit work that is not Your original creation, You may submit it to MobileCoin separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as “Not a Contribution”. Third-party materials licensed pursuant to: [license name(s) here]” (substituting the bracketed text with the appropriate license name(s)).
1. You agree to notify MobileCoin of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.

30
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,30 @@
## Contributing Bug Reports
The MobileCoin Swift SDK is a prototype that is being actively developed.
Please report issues to https://github.com/mobilecoinofficial/MobileCoin-Swift/issues.
1. Search both open and closed tickets to make sure your bug report is not a duplicate.
1. Do not use github issues as a forum. To participate in community discussions, please use the community forum at [community.mobilecoin.foundation](https://community.mobilecoin.foundation).
## Pull Requests (PRs)
We are happy to review and consider PRs submitted against the public MobileCoin-Swift repository. Your changes will be taken as suggestions and may be rolled in with other changes.
Coming soon: Code Style Guidelines
### Sign the Contributor License Agreement (CLA)
You will need to sign [our CLA](./CLA.md) before your pull request can be merged. Please email [cla@mobilecoin.com](mailto://cla@mobilecoin.com) and we will send you a copy.
## Participating in TestNet
MobileCoin is maintaining a test network. Help us try it out.
Let's build a community around private payments.
If you would like to participate in TestNet, please [apply here](https://forms.gle/ULNjA6cMxCD5XNyT7).
## Get in Touch
We're friendly. Feel free to [ping us](mailto://support@mobilecoin.com)!

View File

@ -1,253 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Classes Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
<a title="Classes Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">MobileCoin Reference</a>
<img class="carat" src="img/carat.png" />
Classes Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Classes</h1>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC"></a>
<a name="//apple_ref/swift/Class/MobileCoinClient" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC">MobileCoinClient</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Classes/MobileCoinClient.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">MobileCoinClient</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L10-L247">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,830 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>MobileCoinClient Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/MobileCoinClient" class="dashAnchor"></a>
<a title="MobileCoinClient Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
MobileCoinClient Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>MobileCoinClient</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">MobileCoinClient</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L10-L247">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC4make10accountKey6configs6ResultOyAcA17InvalidInputErrorVGAA07AccountF0V_AC6ConfigVtFZ"></a>
<a name="//apple_ref/swift/Method/make(accountKey:config:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC4make10accountKey6configs6ResultOyAcA17InvalidInputErrorVGAA07AccountF0V_AC6ConfigVtFZ">make(accountKey:<wbr>config:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">make</span><span class="p">(</span><span class="nv">accountKey</span><span class="p">:</span> <span class="kt"><a href="../Structs/AccountKey.html">AccountKey</a></span><span class="p">,</span> <span class="nv">config</span><span class="p">:</span> <span class="kt"><a href="../Classes/MobileCoinClient/Config.html">Config</a></span><span class="p">)</span>
<span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt">MobileCoinClient</span><span class="p">,</span> <span class="kt"><a href="../Structs/InvalidInputError.html">InvalidInputError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div>
<h4>Return Value</h4>
<p><code><a href="../Structs/InvalidInputError.html">InvalidInputError</a></code> when <code>accountKey</code> isn&rsquo;t configured to use Fog.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L12-L22">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC7balanceAA7BalanceVvp"></a>
<a name="//apple_ref/swift/Property/balance" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC7balanceAA7BalanceVvp">balance</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">balance</span><span class="p">:</span> <span class="kt"><a href="../Structs/Balance.html">Balance</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L64-L66">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC15accountActivityAA07AccountE0Vvp"></a>
<a name="//apple_ref/swift/Property/accountActivity" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC15accountActivityAA07AccountE0Vvp">accountActivity</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">accountActivity</span><span class="p">:</span> <span class="kt"><a href="../Structs/AccountActivity.html">AccountActivity</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L68-L70">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC30setConsensusBasicAuthorization8username8passwordySS_SStF"></a>
<a name="//apple_ref/swift/Method/setConsensusBasicAuthorization(username:password:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC30setConsensusBasicAuthorization8username8passwordySS_SStF">setConsensusBasicAuthorization(username:<wbr>password:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setConsensusBasicAuthorization</span><span class="p">(</span><span class="nv">username</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L72-L75">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC24setFogBasicAuthorization8username8passwordySS_SStF"></a>
<a name="//apple_ref/swift/Method/setFogBasicAuthorization(username:password:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC24setFogBasicAuthorization8username8passwordySS_SStF">setFogBasicAuthorization(username:<wbr>password:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setFogBasicAuthorization</span><span class="p">(</span><span class="nv">username</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L77-L80">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC13updateBalance10completionyys6ResultOyAA0E0VAA15ConnectionErrorOGc_tF"></a>
<a name="//apple_ref/swift/Method/updateBalance(completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC13updateBalance10completionyys6ResultOyAA0E0VAA15ConnectionErrorOGc_tF">updateBalance(completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">updateBalance</span><span class="p">(</span><span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="kt"><a href="../Structs/Balance.html">Balance</a></span><span class="p">,</span> <span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L82-L97">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC18amountTransferable8feeLevel10completionyAA03FeeG0O_ys6ResultOys6UInt64VAA37BalanceTransferEstimationFetcherErrorOGctF"></a>
<a name="//apple_ref/swift/Method/amountTransferable(feeLevel:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC18amountTransferable8feeLevel10completionyAA03FeeG0O_ys6ResultOys6UInt64VAA37BalanceTransferEstimationFetcherErrorOGctF">amountTransferable(feeLevel:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">amountTransferable</span><span class="p">(</span>
<span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="kt">UInt64</span><span class="p">,</span> <span class="kt"><a href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L99-L109">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC16estimateTotalFee12toSendAmount8feeLevel10completionys6UInt64V_AA0fK0Oys6ResultOyAiA33TransactionEstimationFetcherErrorOGctF"></a>
<a name="//apple_ref/swift/Method/estimateTotalFee(toSendAmount:feeLevel:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC16estimateTotalFee12toSendAmount8feeLevel10completionys6UInt64V_AA0fK0Oys6ResultOyAiA33TransactionEstimationFetcherErrorOGctF">estimateTotalFee(toSendAmount:<wbr>feeLevel:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">estimateTotalFee</span><span class="p">(</span>
<span class="n">toSendAmount</span> <span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="kt">UInt64</span><span class="p">,</span> <span class="kt"><a href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L111-L122">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC23requiresDefragmentation12toSendAmount8feeLevel10completionys6UInt64V_AA03FeeJ0Oys6ResultOySbAA33TransactionEstimationFetcherErrorOGctF"></a>
<a name="//apple_ref/swift/Method/requiresDefragmentation(toSendAmount:feeLevel:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC23requiresDefragmentation12toSendAmount8feeLevel10completionys6UInt64V_AA03FeeJ0Oys6ResultOySbAA33TransactionEstimationFetcherErrorOGctF">requiresDefragmentation(toSendAmount:<wbr>feeLevel:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">requiresDefragmentation</span><span class="p">(</span>
<span class="n">toSendAmount</span> <span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="kt">Bool</span><span class="p">,</span> <span class="kt"><a href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L124-L135">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC18prepareTransaction2to6amount3fee10completionyAA13PublicAddressV_s6UInt64VALys6ResultOyAA0E0V11transaction_AA7ReceiptV7receipttAA0E16PreparationErrorOGctF"></a>
<a name="//apple_ref/swift/Method/prepareTransaction(to:amount:fee:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC18prepareTransaction2to6amount3fee10completionyAA13PublicAddressV_s6UInt64VALys6ResultOyAA0E0V11transaction_AA7ReceiptV7receipttAA0E16PreparationErrorOGctF">prepareTransaction(to:<wbr>amount:<wbr>fee:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareTransaction</span><span class="p">(</span>
<span class="n">to</span> <span class="nv">recipient</span><span class="p">:</span> <span class="kt"><a href="../Structs/PublicAddress.html">PublicAddress</a></span><span class="p">,</span>
<span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">fee</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span>
<span class="kt">Result</span><span class="o">&lt;</span><span class="p">(</span><span class="nv">transaction</span><span class="p">:</span> <span class="kt"><a href="../Structs/Transaction.html">Transaction</a></span><span class="p">,</span> <span class="nv">receipt</span><span class="p">:</span> <span class="kt"><a href="../Structs/Receipt.html">Receipt</a></span><span class="p">),</span> <span class="kt"><a href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a></span><span class="o">&gt;</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L137-L160">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC18prepareTransaction2to6amount8feeLevel10completionyAA13PublicAddressV_s6UInt64VAA03FeeI0Oys6ResultOyAA0E0V11transaction_AA7ReceiptV7receipttAA0E16PreparationErrorOGctF"></a>
<a name="//apple_ref/swift/Method/prepareTransaction(to:amount:feeLevel:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC18prepareTransaction2to6amount8feeLevel10completionyAA13PublicAddressV_s6UInt64VAA03FeeI0Oys6ResultOyAA0E0V11transaction_AA7ReceiptV7receipttAA0E16PreparationErrorOGctF">prepareTransaction(to:<wbr>amount:<wbr>feeLevel:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareTransaction</span><span class="p">(</span>
<span class="n">to</span> <span class="nv">recipient</span><span class="p">:</span> <span class="kt"><a href="../Structs/PublicAddress.html">PublicAddress</a></span><span class="p">,</span>
<span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span>
<span class="kt">Result</span><span class="o">&lt;</span><span class="p">(</span><span class="nv">transaction</span><span class="p">:</span> <span class="kt"><a href="../Structs/Transaction.html">Transaction</a></span><span class="p">,</span> <span class="nv">receipt</span><span class="p">:</span> <span class="kt"><a href="../Structs/Receipt.html">Receipt</a></span><span class="p">),</span> <span class="kt"><a href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a></span><span class="o">&gt;</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L162-L185">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC38prepareDefragmentationStepTransactions12toSendAmount8feeLevel10completionys6UInt64V_AA03FeeL0Oys6ResultOySayAA11TransactionVGAA06DefragQ16PreparationErrorOGctF"></a>
<a name="//apple_ref/swift/Method/prepareDefragmentationStepTransactions(toSendAmount:feeLevel:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC38prepareDefragmentationStepTransactions12toSendAmount8feeLevel10completionys6UInt64V_AA03FeeL0Oys6ResultOySayAA11TransactionVGAA06DefragQ16PreparationErrorOGctF">prepareDefragmentationStepTransactions(toSendAmount:<wbr>feeLevel:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareDefragmentationStepTransactions</span><span class="p">(</span>
<span class="n">toSendAmount</span> <span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="p">[</span><span class="kt"><a href="../Structs/Transaction.html">Transaction</a></span><span class="p">],</span> <span class="kt"><a href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L187-L208">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC17submitTransaction_10completionyAA0E0V_ys6ResultOyytAA0E15SubmissionErrorOGctF"></a>
<a name="//apple_ref/swift/Method/submitTransaction(_:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC17submitTransaction_10completionyAA0E0V_ys6ResultOyytAA0E15SubmissionErrorOGctF">submitTransaction(_:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">submitTransaction</span><span class="p">(</span>
<span class="n">_</span> <span class="nv">transaction</span><span class="p">:</span> <span class="kt"><a href="../Structs/Transaction.html">Transaction</a></span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="p">(),</span> <span class="kt"><a href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L210-L224">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6status2of10completionyAA11TransactionV_ys6ResultOyAA0G6StatusOAA15ConnectionErrorOGctF"></a>
<a name="//apple_ref/swift/Method/status(of:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6status2of10completionyAA11TransactionV_ys6ResultOyAA0G6StatusOAA15ConnectionErrorOGctF">status(of:<wbr>completion:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">status</span><span class="p">(</span>
<span class="n">of</span> <span class="nv">transaction</span><span class="p">:</span> <span class="kt"><a href="../Structs/Transaction.html">Transaction</a></span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o">&lt;</span><span class="kt"><a href="../Enums/TransactionStatus.html">TransactionStatus</a></span><span class="p">,</span> <span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="o">&gt;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span>
<span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L226-L242">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6status2ofs6ResultOyAA13ReceiptStatusOAA17InvalidInputErrorVGAA0G0V_tF"></a>
<a name="//apple_ref/swift/Method/status(of:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6status2ofs6ResultOyAA13ReceiptStatusOAA17InvalidInputErrorVGAA0G0V_tF">status(of:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">status</span><span class="p">(</span><span class="n">of</span> <span class="nv">receipt</span><span class="p">:</span> <span class="kt"><a href="../Structs/Receipt.html">Receipt</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt"><a href="../Enums/ReceiptStatus.html">ReceiptStatus</a></span><span class="p">,</span> <span class="kt"><a href="../Structs/InvalidInputError.html">InvalidInputError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L244-L246">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC18amountTransferable8feeLevels6ResultOys6UInt64VAA30BalanceTransferEstimationErrorOGAA03FeeG0O_tF"></a>
<a name="//apple_ref/swift/Method/amountTransferable(feeLevel:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC18amountTransferable8feeLevels6ResultOys6UInt64VAA30BalanceTransferEstimationErrorOGAA03FeeG0O_tF">amountTransferable(feeLevel:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">amountTransferable</span><span class="p">(</span><span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">)</span>
<span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt">UInt64</span><span class="p">,</span> <span class="kt"><a href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L271-L280">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC16estimateTotalFee12toSendAmount8feeLevels6ResultOys6UInt64VAA26TransactionEstimationErrorOGAJ_AA0fK0OtF"></a>
<a name="//apple_ref/swift/Method/estimateTotalFee(toSendAmount:feeLevel:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC16estimateTotalFee12toSendAmount8feeLevels6ResultOys6UInt64VAA26TransactionEstimationErrorOGAJ_AA0fK0OtF">estimateTotalFee(toSendAmount:<wbr>feeLevel:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">estimateTotalFee</span><span class="p">(</span>
<span class="n">toSendAmount</span> <span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span>
<span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt">UInt64</span><span class="p">,</span> <span class="kt"><a href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L284-L294">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC23requiresDefragmentation12toSendAmount8feeLevels6ResultOySbAA26TransactionEstimationErrorOGs6UInt64V_AA03FeeJ0OtF"></a>
<a name="//apple_ref/swift/Method/requiresDefragmentation(toSendAmount:feeLevel:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC23requiresDefragmentation12toSendAmount8feeLevels6ResultOySbAA26TransactionEstimationErrorOGs6UInt64V_AA03FeeJ0OtF">requiresDefragmentation(toSendAmount:<wbr>feeLevel:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">requiresDefragmentation</span><span class="p">(</span><span class="n">toSendAmount</span> <span class="nv">amount</span><span class="p">:</span> <span class="kt">UInt64</span><span class="p">,</span> <span class="nv">feeLevel</span><span class="p">:</span> <span class="kt"><a href="../Enums/FeeLevel.html">FeeLevel</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">minimum</span><span class="p">)</span>
<span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt">Bool</span><span class="p">,</span> <span class="kt"><a href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L298-L307">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV"></a>
<a name="//apple_ref/swift/Struct/Config" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV">Config</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="../Classes/MobileCoinClient/Config.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Config</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L323-L413">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,481 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Config Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Config" class="dashAnchor"></a>
<a title="Config Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">MobileCoin Reference</a>
<img class="carat" src="../../img/carat.png" />
Config Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Config</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Config</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L323-L413">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV4make12consensusUrl0F11Attestation03fogG00i4ViewH00i8KeyImageH00i11MerkleProofH00i6ReportH0s6ResultOyAeA17InvalidInputErrorVGSS_AA0H0VSSA4TtFZ"></a>
<a name="//apple_ref/swift/Method/make(consensusUrl:consensusAttestation:fogUrl:fogViewAttestation:fogKeyImageAttestation:fogMerkleProofAttestation:fogReportAttestation:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV4make12consensusUrl0F11Attestation03fogG00i4ViewH00i8KeyImageH00i11MerkleProofH00i6ReportH0s6ResultOyAeA17InvalidInputErrorVGSS_AA0H0VSSA4TtFZ">make(consensusUrl:<wbr>consensusAttestation:<wbr>fogUrl:<wbr>fogViewAttestation:<wbr>fogKeyImageAttestation:<wbr>fogMerkleProofAttestation:<wbr>fogReportAttestation:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">make</span><span class="p">(</span>
<span class="nv">consensusUrl</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
<span class="nv">consensusAttestation</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Attestation.html">Attestation</a></span><span class="p">,</span>
<span class="nv">fogUrl</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
<span class="nv">fogViewAttestation</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Attestation.html">Attestation</a></span><span class="p">,</span>
<span class="nv">fogKeyImageAttestation</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Attestation.html">Attestation</a></span><span class="p">,</span>
<span class="nv">fogMerkleProofAttestation</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Attestation.html">Attestation</a></span><span class="p">,</span>
<span class="nv">fogReportAttestation</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Attestation.html">Attestation</a></span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt">Config</span><span class="p">,</span> <span class="kt"><a href="../../Structs/InvalidInputError.html">InvalidInputError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div>
<h4>Return Value</h4>
<p><code><a href="../../Structs/InvalidInputError.html">InvalidInputError</a></code> when <code>consensusUrl</code> or <code>fogUrl</code> are not well-formed URLs
with the appropriate schemes.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L326-L350">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV18minimumFeeCacheTTLSdvp"></a>
<a name="//apple_ref/swift/Property/minimumFeeCacheTTL" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV18minimumFeeCacheTTLSdvp">minimumFeeCacheTTL</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">minimumFeeCacheTTL</span><span class="p">:</span> <span class="kt">TimeInterval</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV19cacheStorageAdapterAA0fG0_pSgvp"></a>
<a name="//apple_ref/swift/Property/cacheStorageAdapter" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV19cacheStorageAdapterAA0fG0_pSgvp">cacheStorageAdapter</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">cacheStorageAdapter</span><span class="p">:</span> <span class="kt"><a href="../../Protocols/StorageAdapter.html">StorageAdapter</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV13callbackQueueSo17OS_dispatch_queueCSgvp"></a>
<a name="//apple_ref/swift/Property/callbackQueue" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV13callbackQueueSo17OS_dispatch_queueCSgvp">callbackQueue</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The <code>DispatchQueue</code> on which all <code><a href="../../Classes/MobileCoinClient.html">MobileCoinClient</a></code> completion handlers will be called.
If <code>nil</code>, <code>DispatchQueue.main</code> will be used.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">callbackQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L361">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV22setConsensusTrustRootsys6ResultOyytAA17InvalidInputErrorVGSay10Foundation4DataVGF"></a>
<a name="//apple_ref/swift/Method/setConsensusTrustRoots(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV22setConsensusTrustRootsys6ResultOyytAA17InvalidInputErrorVGSay10Foundation4DataVGF">setConsensusTrustRoots(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">setConsensusTrustRoots</span><span class="p">(</span><span class="n">_</span> <span class="nv">trustRoots</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">])</span>
<span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="p">(),</span> <span class="kt"><a href="../../Structs/InvalidInputError.html">InvalidInputError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L371-L377">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV16setFogTrustRootsys6ResultOyytAA17InvalidInputErrorVGSay10Foundation4DataVGF"></a>
<a name="//apple_ref/swift/Method/setFogTrustRoots(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV16setFogTrustRootsys6ResultOyytAA17InvalidInputErrorVGSay10Foundation4DataVGF">setFogTrustRoots(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">setFogTrustRoots</span><span class="p">(</span><span class="n">_</span> <span class="nv">trustRoots</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="p">(),</span> <span class="kt"><a href="../../Structs/InvalidInputError.html">InvalidInputError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L379-L384">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV30setConsensusBasicAuthorization8username8passwordySS_SStF"></a>
<a name="//apple_ref/swift/Method/setConsensusBasicAuthorization(username:password:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV30setConsensusBasicAuthorization8username8passwordySS_SStF">setConsensusBasicAuthorization(username:<wbr>password:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">setConsensusBasicAuthorization</span><span class="p">(</span><span class="nv">username</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L404-L407">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB6ClientC6ConfigV24setFogBasicAuthorization8username8passwordySS_SStF"></a>
<a name="//apple_ref/swift/Method/setFogBasicAuthorization(username:password:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB6ClientC6ConfigV24setFogBasicAuthorization8username8passwordySS_SStF">setFogBasicAuthorization(username:<wbr>password:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">setFogBasicAuthorization</span><span class="p">(</span><span class="nv">username</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">password</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/MobileCoinClient.swift#L409-L412">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,253 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Configuration Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Configuration" class="dashAnchor"></a>
<a title="Configuration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">MobileCoin Reference</a>
<img class="carat" src="img/carat.png" />
Configuration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Configuration</h1>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB7LoggingO"></a>
<a name="//apple_ref/swift/Enum/MobileCoinLogging" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB7LoggingO">MobileCoinLogging</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/MobileCoinLogging.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">MobileCoinLogging</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/MobileCoinLogging.swift#L9-L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,285 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Deprecated Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Deprecated" class="dashAnchor"></a>
<a title="Deprecated Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">MobileCoin Reference</a>
<img class="carat" src="img/carat.png" />
Deprecated Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Deprecated</h1>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin30BalanceTransferEstimationErrorO"></a>
<a name="//apple_ref/swift/Enum/BalanceTransferEstimationError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin30BalanceTransferEstimationErrorO">BalanceTransferEstimationError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/BalanceTransferEstimationError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">BalanceTransferEstimationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">BalanceTransferEstimationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L168-L171">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionEstimationErrorO"></a>
<a name="//apple_ref/swift/Enum/TransactionEstimationError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionEstimationErrorO">TransactionEstimationError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/TransactionEstimationError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionEstimationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionEstimationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L188-L191">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,343 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Enumerations Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
<a title="Enumerations Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">MobileCoin Reference</a>
<img class="carat" src="img/carat.png" />
Enumerations Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Enumerations</h1>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin8FeeLevelO"></a>
<a name="//apple_ref/swift/Enum/FeeLevel" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin8FeeLevelO">FeeLevel</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/FeeLevel.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">FeeLevel</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/Fee/FeeLevel.swift#L7-L9">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin17TransactionStatusO"></a>
<a name="//apple_ref/swift/Enum/TransactionStatus" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin17TransactionStatusO">TransactionStatus</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/TransactionStatus.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionStatus</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/TransactionStatus.swift#L7-L22">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin13ReceiptStatusO"></a>
<a name="//apple_ref/swift/Enum/ReceiptStatus" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin13ReceiptStatusO">ReceiptStatus</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/ReceiptStatus.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ReceiptStatus</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/ReceiptStatus.swift#L7-L22">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin20Base58DecodingResultO"></a>
<a name="//apple_ref/swift/Enum/Base58DecodingResult" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin20Base58DecodingResultO">Base58DecodingResult</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/Base58DecodingResult.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Base58DecodingResult</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L8-L12">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,321 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>BalanceTransferEstimationError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/BalanceTransferEstimationError" class="dashAnchor"></a>
<a title="BalanceTransferEstimationError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
BalanceTransferEstimationError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>BalanceTransferEstimationError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">BalanceTransferEstimationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">BalanceTransferEstimationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L168-L171">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin30BalanceTransferEstimationErrorO010feeExceedsC0yACSScACmF"></a>
<a name="//apple_ref/swift/Element/feeExceedsBalance(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin30BalanceTransferEstimationErrorO010feeExceedsC0yACSScACmF">feeExceedsBalance(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">feeExceedsBalance</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin30BalanceTransferEstimationErrorO15balanceOverflowyACSScACmF"></a>
<a name="//apple_ref/swift/Element/balanceOverflow(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin30BalanceTransferEstimationErrorO15balanceOverflowyACSScACmF">balanceOverflow(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">balanceOverflow</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L175-L184">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,350 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>BalanceTransferEstimationFetcherError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/BalanceTransferEstimationFetcherError" class="dashAnchor"></a>
<a title="BalanceTransferEstimationFetcherError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
BalanceTransferEstimationFetcherError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>BalanceTransferEstimationFetcherError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">BalanceTransferEstimationFetcherError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">BalanceTransferEstimationFetcherError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L53-L57">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO010feeExceedsC0yACSScACmF"></a>
<a name="//apple_ref/swift/Element/feeExceedsBalance(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO010feeExceedsC0yACSScACmF">feeExceedsBalance(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">feeExceedsBalance</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO15balanceOverflowyACSScACmF"></a>
<a name="//apple_ref/swift/Element/balanceOverflow(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO15balanceOverflowyACSScACmF">balanceOverflow(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">balanceOverflow</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO010connectionG0yAcA010ConnectionG0OcACmF"></a>
<a name="//apple_ref/swift/Element/connectionError(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO010connectionG0yAcA010ConnectionG0OcACmF">connectionError(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectionError</span><span class="p">(</span><span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L60-L71">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,353 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Base58Coder Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Base58Coder" class="dashAnchor"></a>
<a title="Base58Coder Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
Base58Coder Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Base58Coder</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Base58Coder</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L14-L59">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin11Base58CoderO6encodeySSAA13PublicAddressVFZ"></a>
<a name="//apple_ref/swift/Method/encode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin11Base58CoderO6encodeySSAA13PublicAddressVFZ">encode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">encode</span><span class="p">(</span><span class="n">_</span> <span class="nv">publicAddress</span><span class="p">:</span> <span class="kt"><a href="../Structs/PublicAddress.html">PublicAddress</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L15-L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin11Base58CoderO6encodeySSAA14PaymentRequestVFZ"></a>
<a name="//apple_ref/swift/Method/encode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin11Base58CoderO6encodeySSAA14PaymentRequestVFZ">encode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">encode</span><span class="p">(</span><span class="n">_</span> <span class="nv">paymentRequest</span><span class="p">:</span> <span class="kt"><a href="../Structs/PaymentRequest.html">PaymentRequest</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L21-L25">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin11Base58CoderO6encodeySSAA15TransferPayloadVFZ"></a>
<a name="//apple_ref/swift/Method/encode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin11Base58CoderO6encodeySSAA15TransferPayloadVFZ">encode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">encode</span><span class="p">(</span><span class="n">_</span> <span class="nv">transferPayload</span><span class="p">:</span> <span class="kt"><a href="../Structs/TransferPayload.html">TransferPayload</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L27-L31">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin11Base58CoderO6decodeyAA0C14DecodingResultOSgSSFZ"></a>
<a name="//apple_ref/swift/Method/decode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin11Base58CoderO6decodeyAA0C14DecodingResultOSgSSFZ">decode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">decode</span><span class="p">(</span><span class="n">_</span> <span class="nv">base58String</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Return Value</h4>
<p><code>nil</code> when the input is not decodable.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L34-L58">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,320 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Base58DecodingResult Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Base58DecodingResult" class="dashAnchor"></a>
<a title="Base58DecodingResult Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
Base58DecodingResult Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Base58DecodingResult</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Base58DecodingResult</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L8-L12">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin20Base58DecodingResultO13publicAddressyAcA06PublicG0VcACmF"></a>
<a name="//apple_ref/swift/Element/publicAddress(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin20Base58DecodingResultO13publicAddressyAcA06PublicG0VcACmF">publicAddress(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">publicAddress</span><span class="p">(</span><span class="kt"><a href="../Structs/PublicAddress.html">PublicAddress</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin20Base58DecodingResultO14paymentRequestyAcA07PaymentG0VcACmF"></a>
<a name="//apple_ref/swift/Element/paymentRequest(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin20Base58DecodingResultO14paymentRequestyAcA07PaymentG0VcACmF">paymentRequest(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">paymentRequest</span><span class="p">(</span><span class="kt"><a href="../Structs/PaymentRequest.html">PaymentRequest</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin20Base58DecodingResultO15transferPayloadyAcA08TransferG0VcACmF"></a>
<a name="//apple_ref/swift/Element/transferPayload(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin20Base58DecodingResultO15transferPayloadyAcA08TransferG0VcACmF">transferPayload(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">transferPayload</span><span class="p">(</span><span class="kt"><a href="../Structs/TransferPayload.html">TransferPayload</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/Base58Coder.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,437 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ConnectionError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/ConnectionError" class="dashAnchor"></a>
<a title="ConnectionError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
ConnectionError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>ConnectionError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ConnectionError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">ConnectionError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L23-L30">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO17connectionFailureyACSScACmF"></a>
<a name="//apple_ref/swift/Element/connectionFailure(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO17connectionFailureyACSScACmF">connectionFailure(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectionFailure</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO20authorizationFailureyACSScACmF"></a>
<a name="//apple_ref/swift/Element/authorizationFailure(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO20authorizationFailureyACSScACmF">authorizationFailure(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">authorizationFailure</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO21invalidServerResponseyACSScACmF"></a>
<a name="//apple_ref/swift/Element/invalidServerResponse(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO21invalidServerResponseyACSScACmF">invalidServerResponse(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidServerResponse</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO29attestationVerificationFailedyACSScACmF"></a>
<a name="//apple_ref/swift/Element/attestationVerificationFailed(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO29attestationVerificationFailedyACSScACmF">attestationVerificationFailed(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">attestationVerificationFailed</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO14outdatedClientyACSScACmF"></a>
<a name="//apple_ref/swift/Element/outdatedClient(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO14outdatedClientyACSScACmF">outdatedClient(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">outdatedClient</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO17serverRateLimitedyACSScACmF"></a>
<a name="//apple_ref/swift/Element/serverRateLimited(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO17serverRateLimitedyACSScACmF">serverRateLimited(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">serverRateLimited</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L33-L50">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,350 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>DefragTransactionPreparationError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/DefragTransactionPreparationError" class="dashAnchor"></a>
<a title="DefragTransactionPreparationError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
DefragTransactionPreparationError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>DefragTransactionPreparationError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">DefragTransactionPreparationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">DefragTransactionPreparationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L119-L123">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33DefragTransactionPreparationErrorO12invalidInputyACSScACmF"></a>
<a name="//apple_ref/swift/Element/invalidInput(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33DefragTransactionPreparationErrorO12invalidInputyACSScACmF">invalidInput(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidInput</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33DefragTransactionPreparationErrorO19insufficientBalanceyACSScACmF"></a>
<a name="//apple_ref/swift/Element/insufficientBalance(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33DefragTransactionPreparationErrorO19insufficientBalanceyACSScACmF">insufficientBalance(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">insufficientBalance</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33DefragTransactionPreparationErrorO010connectionF0yAcA010ConnectionF0OcACmF"></a>
<a name="//apple_ref/swift/Element/connectionError(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33DefragTransactionPreparationErrorO010connectionF0yAcA010ConnectionF0OcACmF">connectionError(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectionError</span><span class="p">(</span><span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L126-L137">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,262 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>FeeLevel Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/FeeLevel" class="dashAnchor"></a>
<a title="FeeLevel Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
FeeLevel Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>FeeLevel</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">FeeLevel</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/Fee/FeeLevel.swift#L7-L9">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin8FeeLevelO7minimumyA2CmF"></a>
<a name="//apple_ref/swift/Element/minimum" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin8FeeLevelO7minimumyA2CmF">minimum</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">minimum</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/Fee/FeeLevel.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,379 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>MobUri Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/MobUri" class="dashAnchor"></a>
<a title="MobUri Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
MobUri Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>MobUri</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">MobUri</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L7-L49">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO7PayloadO"></a>
<a name="//apple_ref/swift/Enum/Payload" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO7PayloadO">Payload</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="../Enums/MobUri/Payload.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Payload</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L8-L12">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO6decode3uris6ResultOyAC7PayloadOAA17InvalidInputErrorVGSS_tFZ"></a>
<a name="//apple_ref/swift/Method/decode(uri:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO6decode3uris6ResultOyAC7PayloadOAA17InvalidInputErrorVGSS_tFZ">decode(uri:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">decode</span><span class="p">(</span><span class="n">uri</span> <span class="nv">uriString</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Result</span><span class="o">&lt;</span><span class="kt"><a href="../Enums/MobUri/Payload.html">Payload</a></span><span class="p">,</span> <span class="kt"><a href="../Structs/InvalidInputError.html">InvalidInputError</a></span><span class="o">&gt;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L14-L32">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO6encodeySSAA13PublicAddressVFZ"></a>
<a name="//apple_ref/swift/Method/encode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO6encodeySSAA13PublicAddressVFZ">encode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">encode</span><span class="p">(</span><span class="n">_</span> <span class="nv">publicAddress</span><span class="p">:</span> <span class="kt"><a href="../Structs/PublicAddress.html">PublicAddress</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L34-L36">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO6encodeySSAA14PaymentRequestVFZ"></a>
<a name="//apple_ref/swift/Method/encode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO6encodeySSAA14PaymentRequestVFZ">encode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">encode</span><span class="p">(</span><span class="n">_</span> <span class="nv">paymentRequest</span><span class="p">:</span> <span class="kt"><a href="../Structs/PaymentRequest.html">PaymentRequest</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L38-L40">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO6encodeySSAA15TransferPayloadVFZ"></a>
<a name="//apple_ref/swift/Method/encode(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO6encodeySSAA15TransferPayloadVFZ">encode(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">encode</span><span class="p">(</span><span class="n">_</span> <span class="nv">transferPayload</span><span class="p">:</span> <span class="kt"><a href="../Structs/TransferPayload.html">TransferPayload</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L42-L44">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,320 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Payload Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Payload" class="dashAnchor"></a>
<a title="Payload Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">MobileCoin Reference</a>
<img class="carat" src="../../img/carat.png" />
Payload Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Payload</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Payload</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L8-L12">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO7PayloadO13publicAddressyAeA06PublicG0VcAEmF"></a>
<a name="//apple_ref/swift/Element/publicAddress(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO7PayloadO13publicAddressyAeA06PublicG0VcAEmF">publicAddress(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">publicAddress</span><span class="p">(</span><span class="kt"><a href="../../Structs/PublicAddress.html">PublicAddress</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO7PayloadO14paymentRequestyAeA07PaymentG0VcAEmF"></a>
<a name="//apple_ref/swift/Element/paymentRequest(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO7PayloadO14paymentRequestyAeA07PaymentG0VcAEmF">paymentRequest(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">paymentRequest</span><span class="p">(</span><span class="kt"><a href="../../Structs/PaymentRequest.html">PaymentRequest</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin6MobUriO7PayloadO08transferE0yAeA08TransferE0VcAEmF"></a>
<a name="//apple_ref/swift/Element/transferPayload(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin6MobUriO7PayloadO08transferE0yAeA08TransferE0VcAEmF">transferPayload(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">transferPayload</span><span class="p">(</span><span class="kt"><a href="../../Structs/TransferPayload.html">TransferPayload</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Encodings/MobUri.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,262 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>MobileCoinLogging Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/MobileCoinLogging" class="dashAnchor"></a>
<a title="MobileCoinLogging Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
MobileCoinLogging Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>MobileCoinLogging</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">MobileCoinLogging</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/MobileCoinLogging.swift#L9-L18">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin0aB7LoggingO16logSensitiveDataSbvpZ"></a>
<a name="//apple_ref/swift/Variable/logSensitiveData" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin0aB7LoggingO16logSensitiveDataSbvpZ">logSensitiveData</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">logSensitiveData</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/MobileCoinLogging.swift#L10-L17">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,320 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ReceiptStatus Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/ReceiptStatus" class="dashAnchor"></a>
<a title="ReceiptStatus Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
ReceiptStatus Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>ReceiptStatus</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ReceiptStatus</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/ReceiptStatus.swift#L7-L22">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin13ReceiptStatusO7unknownyA2CmF"></a>
<a name="//apple_ref/swift/Element/unknown" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin13ReceiptStatusO7unknownyA2CmF">unknown</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">unknown</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/ReceiptStatus.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin13ReceiptStatusO8receivedyAcA13BlockMetadataV_tcACmF"></a>
<a name="//apple_ref/swift/Element/received(block:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin13ReceiptStatusO8receivedyAcA13BlockMetadataV_tcACmF">received(block:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">received</span><span class="p">(</span><span class="nv">block</span><span class="p">:</span> <span class="kt"><a href="../Structs/BlockMetadata.html">BlockMetadata</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/ReceiptStatus.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin13ReceiptStatusO6failedyA2CmF"></a>
<a name="//apple_ref/swift/Element/failed" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin13ReceiptStatusO6failedyA2CmF">failed</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">failed</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/ReceiptStatus.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,321 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TransactionEstimationError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/TransactionEstimationError" class="dashAnchor"></a>
<a title="TransactionEstimationError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
TransactionEstimationError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>TransactionEstimationError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionEstimationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionEstimationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L188-L191">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionEstimationErrorO12invalidInputyACSScACmF"></a>
<a name="//apple_ref/swift/Element/invalidInput(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionEstimationErrorO12invalidInputyACSScACmF">invalidInput(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidInput</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionEstimationErrorO19insufficientBalanceyACSScACmF"></a>
<a name="//apple_ref/swift/Element/insufficientBalance(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionEstimationErrorO19insufficientBalanceyACSScACmF">insufficientBalance(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">insufficientBalance</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L195-L204">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,350 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TransactionEstimationFetcherError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/TransactionEstimationFetcherError" class="dashAnchor"></a>
<a title="TransactionEstimationFetcherError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
TransactionEstimationFetcherError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>TransactionEstimationFetcherError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionEstimationFetcherError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionEstimationFetcherError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L74-L78">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33TransactionEstimationFetcherErrorO12invalidInputyACSScACmF"></a>
<a name="//apple_ref/swift/Element/invalidInput(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33TransactionEstimationFetcherErrorO12invalidInputyACSScACmF">invalidInput(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidInput</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33TransactionEstimationFetcherErrorO19insufficientBalanceyACSScACmF"></a>
<a name="//apple_ref/swift/Element/insufficientBalance(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33TransactionEstimationFetcherErrorO19insufficientBalanceyACSScACmF">insufficientBalance(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">insufficientBalance</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33TransactionEstimationFetcherErrorO010connectionF0yAcA010ConnectionF0OcACmF"></a>
<a name="//apple_ref/swift/Element/connectionError(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33TransactionEstimationFetcherErrorO010connectionF0yAcA010ConnectionF0OcACmF">connectionError(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectionError</span><span class="p">(</span><span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L81-L92">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,379 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TransactionPreparationError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/TransactionPreparationError" class="dashAnchor"></a>
<a title="TransactionPreparationError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
TransactionPreparationError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>TransactionPreparationError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionPreparationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionPreparationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L95-L100">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin27TransactionPreparationErrorO12invalidInputyACSScACmF"></a>
<a name="//apple_ref/swift/Element/invalidInput(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin27TransactionPreparationErrorO12invalidInputyACSScACmF">invalidInput(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidInput</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin27TransactionPreparationErrorO19insufficientBalanceyACSScACmF"></a>
<a name="//apple_ref/swift/Element/insufficientBalance(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin27TransactionPreparationErrorO19insufficientBalanceyACSScACmF">insufficientBalance(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">insufficientBalance</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin27TransactionPreparationErrorO23defragmentationRequiredyACSScACmF"></a>
<a name="//apple_ref/swift/Element/defragmentationRequired(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin27TransactionPreparationErrorO23defragmentationRequiredyACSScACmF">defragmentationRequired(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">defragmentationRequired</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin27TransactionPreparationErrorO010connectionE0yAcA010ConnectionE0OcACmF"></a>
<a name="//apple_ref/swift/Element/connectionError(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin27TransactionPreparationErrorO010connectionE0yAcA010ConnectionE0OcACmF">connectionError(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectionError</span><span class="p">(</span><span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L103-L116">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,320 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TransactionStatus Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/TransactionStatus" class="dashAnchor"></a>
<a title="TransactionStatus Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
TransactionStatus Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>TransactionStatus</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionStatus</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/TransactionStatus.swift#L7-L22">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin17TransactionStatusO7unknownyA2CmF"></a>
<a name="//apple_ref/swift/Element/unknown" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin17TransactionStatusO7unknownyA2CmF">unknown</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">unknown</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/TransactionStatus.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin17TransactionStatusO8acceptedyAcA13BlockMetadataV_tcACmF"></a>
<a name="//apple_ref/swift/Element/accepted(block:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin17TransactionStatusO8acceptedyAcA13BlockMetadataV_tcACmF">accepted(block:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">accepted</span><span class="p">(</span><span class="nv">block</span><span class="p">:</span> <span class="kt"><a href="../Structs/BlockMetadata.html">BlockMetadata</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/TransactionStatus.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin17TransactionStatusO6failedyA2CmF"></a>
<a name="//apple_ref/swift/Element/failed" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin17TransactionStatusO6failedyA2CmF">failed</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">failed</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Transaction/TransactionStatus.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,408 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TransactionSubmissionError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/TransactionSubmissionError" class="dashAnchor"></a>
<a title="TransactionSubmissionError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
TransactionSubmissionError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>TransactionSubmissionError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionSubmissionError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionSubmissionError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L140-L146">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionSubmissionErrorO010connectionE0yAcA010ConnectionE0OcACmF"></a>
<a name="//apple_ref/swift/Element/connectionError(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionSubmissionErrorO010connectionE0yAcA010ConnectionE0OcACmF">connectionError(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectionError</span><span class="p">(</span><span class="kt"><a href="../Enums/ConnectionError.html">ConnectionError</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionSubmissionErrorO07invalidC0yACSScACmF"></a>
<a name="//apple_ref/swift/Element/invalidTransaction(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionSubmissionErrorO07invalidC0yACSScACmF">invalidTransaction(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidTransaction</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionSubmissionErrorO03feeE0yACSScACmF"></a>
<a name="//apple_ref/swift/Element/feeError(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionSubmissionErrorO03feeE0yACSScACmF">feeError(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">feeError</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionSubmissionErrorO20tombstoneBlockTooFaryACSScACmF"></a>
<a name="//apple_ref/swift/Element/tombstoneBlockTooFar(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionSubmissionErrorO20tombstoneBlockTooFaryACSScACmF">tombstoneBlockTooFar(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">tombstoneBlockTooFar</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionSubmissionErrorO18inputsAlreadySpentyACSScACmF"></a>
<a name="//apple_ref/swift/Element/inputsAlreadySpent(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionSubmissionErrorO18inputsAlreadySpentyACSScACmF">inputsAlreadySpent(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">inputsAlreadySpent</span><span class="p">(</span><span class="nv">_</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">String</span><span class="p">())</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L149-L164">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,440 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Errors Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Errors" class="dashAnchor"></a>
<a title="Errors Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">MobileCoin Reference</a>
<img class="carat" src="img/carat.png" />
Errors Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Errors</h1>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin15ConnectionErrorO"></a>
<a name="//apple_ref/swift/Enum/ConnectionError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin15ConnectionErrorO">ConnectionError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/ConnectionError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ConnectionError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">ConnectionError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L23-L30">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin17InvalidInputErrorV"></a>
<a name="//apple_ref/swift/Struct/InvalidInputError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin17InvalidInputErrorV">InvalidInputError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Structs/InvalidInputError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">InvalidInputError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">InvalidInputError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L9-L15">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO"></a>
<a name="//apple_ref/swift/Enum/BalanceTransferEstimationFetcherError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin37BalanceTransferEstimationFetcherErrorO">BalanceTransferEstimationFetcherError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/BalanceTransferEstimationFetcherError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">BalanceTransferEstimationFetcherError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">BalanceTransferEstimationFetcherError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L53-L57">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33TransactionEstimationFetcherErrorO"></a>
<a name="//apple_ref/swift/Enum/TransactionEstimationFetcherError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33TransactionEstimationFetcherErrorO">TransactionEstimationFetcherError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/TransactionEstimationFetcherError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionEstimationFetcherError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionEstimationFetcherError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L74-L78">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin27TransactionPreparationErrorO"></a>
<a name="//apple_ref/swift/Enum/TransactionPreparationError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin27TransactionPreparationErrorO">TransactionPreparationError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/TransactionPreparationError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionPreparationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionPreparationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L95-L100">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin33DefragTransactionPreparationErrorO"></a>
<a name="//apple_ref/swift/Enum/DefragTransactionPreparationError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin33DefragTransactionPreparationErrorO">DefragTransactionPreparationError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/DefragTransactionPreparationError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">DefragTransactionPreparationError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">DefragTransactionPreparationError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L119-L123">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin26TransactionSubmissionErrorO"></a>
<a name="//apple_ref/swift/Enum/TransactionSubmissionError" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin26TransactionSubmissionErrorO">TransactionSubmissionError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Enums/TransactionSubmissionError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">TransactionSubmissionError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TransactionSubmissionError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Common/Errors.swift#L140-L146">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -0,0 +1,514 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
2706868D2474C4D800B82C57 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2706868C2474C4D800B82C57 /* AppDelegate.swift */; };
270686932474C4DA00B82C57 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 270686922474C4DA00B82C57 /* Assets.xcassets */; };
270686962474C4DA00B82C57 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 270686952474C4DA00B82C57 /* Preview Assets.xcassets */; };
270686992474C4DA00B82C57 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 270686972474C4DA00B82C57 /* LaunchScreen.storyboard */; };
27A1FABF24E8B89C001A0614 /* Performance Tests.xctestplan in Resources */ = {isa = PBXBuildFile; fileRef = 27A1FABE24E8B89C001A0614 /* Performance Tests.xctestplan */; };
F9800F2C17E6D5B2B021EB8D /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0382FE8E8E7AAAC02CECA3 /* Pods_Example.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
05E35D1FAC2827984EE8B421 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
270686892474C4D800B82C57 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
2706868C2474C4D800B82C57 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
270686922474C4DA00B82C57 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
270686952474C4DA00B82C57 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
270686982474C4DA00B82C57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2706869A2474C4DA00B82C57 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
27A1FABE24E8B89C001A0614 /* Performance Tests.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Performance Tests.xctestplan"; sourceTree = "<group>"; };
27A39C3C24C2622600B44786 /* Integration Tests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Integration Tests.xctestplan"; sourceTree = "<group>"; };
27A39C3D24C2622600B44786 /* Unit Tests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Unit Tests.xctestplan"; sourceTree = "<group>"; };
3AF40DB60A0ADA2CB879AE38 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
4C0382FE8E8E7AAAC02CECA3 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FC106CAA4E993C2D6301C5CA /* Pods-Example.testable release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.testable release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.testable release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
270686862474C4D800B82C57 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F9800F2C17E6D5B2B021EB8D /* Pods_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
270686802474C4D800B82C57 = {
isa = PBXGroup;
children = (
2706868B2474C4D800B82C57 /* Example */,
27A39C3B24C2622600B44786 /* TestPlans */,
2706868A2474C4D800B82C57 /* Products */,
4256C0AB87AF2BC2F24F1B92 /* Pods */,
9E89A7B3975ECA671C9D8346 /* Frameworks */,
);
sourceTree = "<group>";
};
2706868A2474C4D800B82C57 /* Products */ = {
isa = PBXGroup;
children = (
270686892474C4D800B82C57 /* Example.app */,
);
name = Products;
sourceTree = "<group>";
};
2706868B2474C4D800B82C57 /* Example */ = {
isa = PBXGroup;
children = (
2706868C2474C4D800B82C57 /* AppDelegate.swift */,
270686922474C4DA00B82C57 /* Assets.xcassets */,
270686972474C4DA00B82C57 /* LaunchScreen.storyboard */,
2706869A2474C4DA00B82C57 /* Info.plist */,
270686942474C4DA00B82C57 /* Preview Content */,
);
path = Example;
sourceTree = "<group>";
};
270686942474C4DA00B82C57 /* Preview Content */ = {
isa = PBXGroup;
children = (
270686952474C4DA00B82C57 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
27A39C3B24C2622600B44786 /* TestPlans */ = {
isa = PBXGroup;
children = (
27A39C3D24C2622600B44786 /* Unit Tests.xctestplan */,
27A39C3C24C2622600B44786 /* Integration Tests.xctestplan */,
27A1FABE24E8B89C001A0614 /* Performance Tests.xctestplan */,
);
path = TestPlans;
sourceTree = "<group>";
};
4256C0AB87AF2BC2F24F1B92 /* Pods */ = {
isa = PBXGroup;
children = (
05E35D1FAC2827984EE8B421 /* Pods-Example.debug.xcconfig */,
3AF40DB60A0ADA2CB879AE38 /* Pods-Example.release.xcconfig */,
FC106CAA4E993C2D6301C5CA /* Pods-Example.testable release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
9E89A7B3975ECA671C9D8346 /* Frameworks */ = {
isa = PBXGroup;
children = (
4C0382FE8E8E7AAAC02CECA3 /* Pods_Example.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
270686882474C4D800B82C57 /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2706869D2474C4DA00B82C57 /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
A960891E414B6399548D3852 /* [CP] Check Pods Manifest.lock */,
270686852474C4D800B82C57 /* Sources */,
270686862474C4D800B82C57 /* Frameworks */,
270686872474C4D800B82C57 /* Resources */,
1851CDD4271ED50E0D6D8B7B /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Example;
productName = Example;
productReference = 270686892474C4D800B82C57 /* Example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
270686812474C4D800B82C57 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1140;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = "MobileCoin Inc.";
TargetAttributes = {
270686882474C4D800B82C57 = {
CreatedOnToolsVersion = 11.4.1;
};
};
};
buildConfigurationList = 270686842474C4D800B82C57 /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 270686802474C4D800B82C57;
productRefGroup = 2706868A2474C4D800B82C57 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
270686882474C4D800B82C57 /* Example */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
270686872474C4D800B82C57 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
270686992474C4DA00B82C57 /* LaunchScreen.storyboard in Resources */,
27A1FABF24E8B89C001A0614 /* Performance Tests.xctestplan in Resources */,
270686962474C4DA00B82C57 /* Preview Assets.xcassets in Resources */,
270686932474C4DA00B82C57 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1851CDD4271ED50E0D6D8B7B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A960891E414B6399548D3852 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
270686852474C4D800B82C57 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2706868D2474C4D800B82C57 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
270686972474C4DA00B82C57 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
270686982474C4DA00B82C57 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
2706869B2474C4DA00B82C57 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
2706869C2474C4DA00B82C57 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
2706869E2474C4DA00B82C57 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 05E35D1FAC2827984EE8B421 /* Pods-Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = 8JT9JJD9Y5;
ENABLE_ONLY_ACTIVE_RESOURCES = NO;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mobilecoin.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
2706869F2474C4DA00B82C57 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3AF40DB60A0ADA2CB879AE38 /* Pods-Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = 8JT9JJD9Y5;
ENABLE_ONLY_ACTIVE_RESOURCES = NO;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.mobilecoin.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
274D3FAD24E8B5DD004E2F4A /* Testable Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = "Testable Release";
};
274D3FAE24E8B5DD004E2F4A /* Testable Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FC106CAA4E993C2D6301C5CA /* Pods-Example.testable release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = 8JT9JJD9Y5;
ENABLE_ONLY_ACTIVE_RESOURCES = NO;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.mobilecoin.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Testable Release";
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
270686842474C4D800B82C57 /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2706869B2474C4DA00B82C57 /* Debug */,
2706869C2474C4DA00B82C57 /* Release */,
274D3FAD24E8B5DD004E2F4A /* Testable Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2706869D2474C4DA00B82C57 /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2706869E2474C4DA00B82C57 /* Debug */,
2706869F2474C4DA00B82C57 /* Release */,
274D3FAE24E8B5DD004E2F4A /* Testable Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 270686812474C4D800B82C57 /* Project object */;
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Example.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,10 @@
<?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>FILEHEADER</key>
<string>
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//</string>
</dict>
</plist>

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,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>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "45F542481CBFF9E786B4F9148AC9D6F2"
BuildableName = "MobileCoin-Unit-Core-IntegrationTests.xctest"
BlueprintName = "MobileCoin-Unit-Core-IntegrationTests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/Integration Tests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "45F542481CBFF9E786B4F9148AC9D6F2"
BuildableName = "MobileCoin-Unit-Core-IntegrationTests.xctest"
BlueprintName = "MobileCoin-Unit-Core-IntegrationTests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Testable Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8A0545E992AC3A0A6B313DAF029D326"
BuildableName = "MobileCoin-UI-Core-PerformanceTests.xctest"
BlueprintName = "MobileCoin-UI-Core-PerformanceTests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Testable Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/Performance Tests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8A0545E992AC3A0A6B313DAF029D326"
BuildableName = "MobileCoin-UI-Core-PerformanceTests.xctest"
BlueprintName = "MobileCoin-UI-Core-PerformanceTests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Testable Release">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Testable Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C10663274EBBCA6839AB2898903FF5CB"
BuildableName = "MobileCoin-Unit-Core-Tests.xctest"
BlueprintName = "MobileCoin-Unit-Core-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:TestPlans/Unit Tests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C10663274EBBCA6839AB2898903FF5CB"
BuildableName = "MobileCoin-Unit-Core-Tests.xctest"
BlueprintName = "MobileCoin-Unit-Core-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Testable Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,16 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
}

View File

@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,43 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

7
Example/Gemfile Normal file
View File

@ -0,0 +1,7 @@
source 'https://rubygems.org' do
gem 'cocoapods', '~> 1.11'
gem 'cocoapods-binary', :git => 'https://github.com/mobilecoinofficial/cocoapods-binary.git', :tag => 'v0.4.4.rev5'
gem 'cocoapods-repo-update'
gem 'cocoapods-keys'
gem 'fastlane'
end

306
Example/Gemfile.lock Normal file
View File

@ -0,0 +1,306 @@
GIT
remote: https://github.com/mobilecoinofficial/cocoapods-binary.git
revision: 748a64cc890cfaee59cdd67e80d9ade82b1b179b
tag: v0.4.4.rev5
specs:
cocoapods-binary (0.4.4)
cocoapods (>= 1.5.0, < 2.0)
fourflusher (~> 2.0)
xcpretty (~> 0.3.0)
GEM
specs:
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
rexml
RubyInline (3.12.5)
ZenTest (~> 4.3)
ZenTest (4.12.0)
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.520.0)
aws-sdk-core (3.121.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.50.0)
aws-sdk-core (~> 3, >= 3.121.2)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.104.0)
aws-sdk-core (~> 3, >= 3.121.2)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
cocoapods (1.11.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.2)
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.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.2)
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 (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-keys (2.2.1)
dotenv
osx_keychain
cocoapods-plugins (1.0.0)
nap
cocoapods-repo-update (0.0.4)
cocoapods (~> 1.0, >= 1.3.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.1.9)
declarative (0.0.20)
digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
excon (0.88.0)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.5)
fastlane (2.197.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
ffi (1.15.4)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.13.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.8.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.6.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.9.0)
google-apis-core (>= 0.4, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.2.0)
google-cloud-storage (1.34.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.1.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.4)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
json (2.6.1)
jwt (2.3.0)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.2)
minitest (5.14.4)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
optparse (0.1.1)
os (1.1.1)
osx_keychain (1.0.2)
RubyInline (~> 3)
plist (3.6.0)
public_suffix (4.0.6)
rake (13.0.6)
representable (3.1.1)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rouge (2.0.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
trailblazer-option (0.1.1)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8)
unicode-display_width (1.8.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.21.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)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
zeitwerk (2.5.1)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.11)!
cocoapods-binary!
cocoapods-keys!
cocoapods-repo-update!
fastlane!
BUNDLED WITH
2.2.24

43
Example/Makefile Normal file
View File

@ -0,0 +1,43 @@
.PHONY: default
default: setup bootstrap build test
.PHONY: setup
setup:
bundle install
.PHONY: bootstrap
bootstrap:
bundle exec pod install
.PHONY: build
build:
bundle exec fastlane gym \
--scheme "Unit Tests" \
--skip_archive \
--skip_codesigning
bundle exec fastlane gym \
--scheme "Integration Tests" \
--skip_archive \
--skip_codesigning
bundle exec fastlane gym \
--scheme "Performance Tests" \
--skip_archive \
--skip_codesigning
.PHONY: test
test:
bundle exec fastlane scan \
--scheme "Unit Tests"
bundle exec fastlane scan \
--scheme "Performance Tests"
.PHONY: clean
clean:
@[ ! -e test_output ] || rm -r test_output
# Maintenance commands
.PHONY: upgrade-deps
upgrade-deps:
bundle update
bundle exec pod update

92
Example/Podfile Normal file
View File

@ -0,0 +1,92 @@
source 'https://cdn.cocoapods.org/'
platform :ios, '10.0'
plugin 'cocoapods-repo-update'
keep_source_code_for_prebuilt_frameworks!
plugin 'cocoapods-keys', {
:project => "MobileCoin",
:keys => [
"devNetworkAuthUsername",
"devNetworkAuthPassword",
"testNetTestAccountMnemonicsCommaSeparated",
]}
use_frameworks!
ENV['MC_ENABLE_SWIFTLINT_SCRIPT'] = '1'
ENV['MC_ENABLE_WARN_LONG_COMPILE_TIMES'] = '1'
target 'Example' do
pod 'MobileCoin', path: '..'
pod 'MobileCoin/Core', path: '..', testspecs: ['Tests', 'IntegrationTests', 'PerformanceTests']
# pod 'MobileCoin', podspec: '../MobileCoin.podspec'
# pod 'MobileCoin/Core', podspec: '../MobileCoin.podspec', testspecs: ['Tests', 'IntegrationTests']
# pod 'MobileCoin', git: 'https://github.com/mobilecoinofficial/MobileCoin-Swift.git'
# pod 'MobileCoin/Core', git: 'https://github.com/mobilecoinofficial/MobileCoin-Swift.git', testspecs: ['Tests', 'IntegrationTests']
pod 'LibMobileCoin'
# pod 'LibMobileCoin', path: '../Vendor/libmobilecoin-ios-artifacts'
# pod 'LibMobileCoin', podspec: '../Vendor/libmobilecoin-ios-artifacts/LibMobileCoin.podspec'
# pod 'LibMobileCoin', git: 'https://github.com/the-real-adammork/libmobilecoin-ios-artifacts.git'
pod 'gRPC-Swift'
pod 'SwiftProtobuf'
pod 'SwiftLint'
end
post_install do |installer|
# Enable building tests using Testable Release build configuration
installer.pods_project.targets.each do |target|
next unless target.name == 'MobileCoin'
target.build_configurations.each do |config|
next unless config.name == 'Testable Release'
config.build_settings['ENABLE_TESTABILITY'] = 'YES'
end
end
# Enable running performance tests on a physical device
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == 'AppHost-MobileCoin-UI-Tests'
config.build_settings['DEVELOPMENT_TEAM'] = '8JT9JJD9Y5'
elsif target.name.start_with? 'MobileCoin-UI-'
config.build_settings['DEVELOPMENT_TEAM'] = '8JT9JJD9Y5'
config.build_settings.delete('CODE_SIGN_IDENTITY[sdk=iphoneos*]')
end
end
end
# Bump deployment target to 9.0 for pods that explicitly specify 8.0, since 9.0 is the minimum
# that Xcode 12 supports.
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) < Gem::Version.new('9.0')
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
# Add Keys framework to Integration Tests for injecting values using cocoapods-keys
installer.pods_project.targets.each do |target|
next unless target.name == 'MobileCoin-Unit-Core-IntegrationTests'
installer.pods_project.targets.each do |keys_target|
next unless keys_target.name == 'Keys'
target.add_dependency(keys_target)
end
target.build_configurations.each do |config|
config.build_settings["FRAMEWORK_SEARCH_PATHS"] ||= "$(inherited)"
config.build_settings["FRAMEWORK_SEARCH_PATHS"] << ' "${PODS_CONFIGURATION_BUILD_DIR}/Keys"'
config.build_settings["OTHER_LDFLAGS"] ||= "$(inherited)"
config.build_settings["OTHER_LDFLAGS"] << ' -framework "Keys"'
end
end
# Disable bitcode on test targets
installer.pods_project.targets.each do |target|
next unless ['MobileCoin-Unit-Core-IntegrationTests', 'MobileCoin-UI-Core-PerformanceTests', 'MobileCoin-Unit-Core-Tests'].find_index(target.name) != nil
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end

204
Example/Podfile.lock Normal file
View File

@ -0,0 +1,204 @@
PODS:
- _NIODataStructures (2.32.3)
- CGRPCZlib (1.5.0)
- CNIOAtomics (2.32.3)
- CNIOBoringSSL (2.15.1)
- CNIOBoringSSLShims (2.15.1):
- CNIOBoringSSL (= 2.15.1)
- CNIODarwin (2.32.3)
- CNIOHTTPParser (2.32.3)
- CNIOLinux (2.32.3)
- CNIOWindows (2.32.3)
- gRPC-Swift (1.5.0):
- CGRPCZlib (= 1.5.0)
- Logging (< 2.0.0, >= 1.4.0)
- SwiftNIO (< 3.0.0, >= 2.32.0)
- SwiftNIOExtras (< 2.0.0, >= 1.4.0)
- SwiftNIOHTTP2 (< 2.0.0, >= 1.18.2)
- SwiftNIOSSL (< 3.0.0, >= 2.14.0)
- SwiftNIOTransportServices (< 2.0.0, >= 1.11.1)
- SwiftProtobuf (< 2.0.0, >= 1.9.0)
- Keys (1.0.1)
- LibMobileCoin (1.2.0-pre3):
- gRPC-Swift
- SwiftProtobuf (~> 1.5)
- Logging (1.4.0)
- MobileCoin (1.2.0-pre2):
- MobileCoin/Core (= 1.2.0-pre2)
- MobileCoin/Core (1.2.0-pre2):
- gRPC-Swift
- LibMobileCoin (~> 1.2.0-pre3)
- Logging (~> 1.4)
- SwiftLint
- SwiftNIO
- SwiftNIOHPACK
- SwiftNIOHTTP1
- SwiftProtobuf
- MobileCoin/Core/IntegrationTests (1.2.0-pre2):
- gRPC-Swift
- LibMobileCoin (~> 1.2.0-pre3)
- Logging (~> 1.4)
- SwiftLint
- SwiftNIO
- SwiftNIOHPACK
- SwiftNIOHTTP1
- SwiftProtobuf
- MobileCoin/Core/PerformanceTests (1.2.0-pre2):
- gRPC-Swift
- LibMobileCoin (~> 1.2.0-pre3)
- Logging (~> 1.4)
- SwiftLint
- SwiftNIO
- SwiftNIOHPACK
- SwiftNIOHTTP1
- SwiftProtobuf
- MobileCoin/Core/Tests (1.2.0-pre2):
- gRPC-Swift
- LibMobileCoin (~> 1.2.0-pre3)
- Logging (~> 1.4)
- SwiftLint
- SwiftNIO
- SwiftNIOHPACK
- SwiftNIOHTTP1
- SwiftProtobuf
- SwiftLint (0.45.0)
- SwiftNIO (2.32.3):
- SwiftNIOCore (= 2.32.3)
- SwiftNIOEmbedded (= 2.32.3)
- SwiftNIOPosix (= 2.32.3)
- SwiftNIOConcurrencyHelpers (2.32.3):
- CNIOAtomics (= 2.32.3)
- SwiftNIOCore (2.32.3):
- CNIOLinux (= 2.32.3)
- SwiftNIOConcurrencyHelpers (= 2.32.3)
- SwiftNIOEmbedded (2.32.3):
- _NIODataStructures (= 2.32.3)
- SwiftNIOCore (= 2.32.3)
- SwiftNIOExtras (1.10.2):
- SwiftNIO (< 3, >= 2.32.0)
- SwiftNIOFoundationCompat (2.32.3):
- SwiftNIO (= 2.32.3)
- SwiftNIOCore (= 2.32.3)
- SwiftNIOHPACK (1.18.3):
- SwiftNIO (< 3, >= 2.32.0)
- SwiftNIOConcurrencyHelpers (< 3, >= 2.32.0)
- SwiftNIOCore (< 3, >= 2.32.0)
- SwiftNIOHTTP1 (< 3, >= 2.32.0)
- SwiftNIOHTTP1 (2.32.3):
- CNIOHTTPParser (= 2.32.3)
- SwiftNIO (= 2.32.3)
- SwiftNIOConcurrencyHelpers (= 2.32.3)
- SwiftNIOCore (= 2.32.3)
- SwiftNIOHTTP2 (1.18.3):
- SwiftNIO (< 3, >= 2.32.0)
- SwiftNIOConcurrencyHelpers (< 3, >= 2.32.0)
- SwiftNIOCore (< 3, >= 2.32.0)
- SwiftNIOHPACK (= 1.18.3)
- SwiftNIOHTTP1 (< 3, >= 2.32.0)
- SwiftNIOTLS (< 3, >= 2.32.0)
- SwiftNIOPosix (2.32.3):
- _NIODataStructures (= 2.32.3)
- CNIODarwin (= 2.32.3)
- CNIOLinux (= 2.32.3)
- CNIOWindows (= 2.32.3)
- SwiftNIOConcurrencyHelpers (= 2.32.3)
- SwiftNIOCore (= 2.32.3)
- SwiftNIOSSL (2.15.1):
- CNIOBoringSSL (= 2.15.1)
- CNIOBoringSSLShims (= 2.15.1)
- SwiftNIO (< 3, >= 2.32.0)
- SwiftNIOConcurrencyHelpers (< 3, >= 2.32.0)
- SwiftNIOCore (< 3, >= 2.32.0)
- SwiftNIOTLS (< 3, >= 2.32.0)
- SwiftNIOTLS (2.32.3):
- SwiftNIO (= 2.32.3)
- SwiftNIOCore (= 2.32.3)
- SwiftNIOTransportServices (1.11.3):
- SwiftNIO (< 3, >= 2.32.0)
- SwiftNIOConcurrencyHelpers (< 3, >= 2.32.0)
- SwiftNIOFoundationCompat (< 3, >= 2.32.0)
- SwiftNIOTLS (< 3, >= 2.32.0)
- SwiftProtobuf (1.18.0)
DEPENDENCIES:
- gRPC-Swift
- Keys (from `Pods/CocoaPodsKeys`)
- LibMobileCoin
- MobileCoin (from `..`)
- MobileCoin/Core (from `..`)
- MobileCoin/Core/IntegrationTests (from `..`)
- MobileCoin/Core/PerformanceTests (from `..`)
- MobileCoin/Core/Tests (from `..`)
- SwiftLint
- SwiftProtobuf
SPEC REPOS:
trunk:
- _NIODataStructures
- CGRPCZlib
- CNIOAtomics
- CNIOBoringSSL
- CNIOBoringSSLShims
- CNIODarwin
- CNIOHTTPParser
- CNIOLinux
- CNIOWindows
- gRPC-Swift
- LibMobileCoin
- Logging
- SwiftLint
- SwiftNIO
- SwiftNIOConcurrencyHelpers
- SwiftNIOCore
- SwiftNIOEmbedded
- SwiftNIOExtras
- SwiftNIOFoundationCompat
- SwiftNIOHPACK
- SwiftNIOHTTP1
- SwiftNIOHTTP2
- SwiftNIOPosix
- SwiftNIOSSL
- SwiftNIOTLS
- SwiftNIOTransportServices
- SwiftProtobuf
EXTERNAL SOURCES:
Keys:
:path: Pods/CocoaPodsKeys
MobileCoin:
:path: ".."
SPEC CHECKSUMS:
_NIODataStructures: e2077c7dc7c1d6c93e698c85fe04d663a17f53a4
CGRPCZlib: db324e4e4e71262d48faceb86b52dd7d4f71ff62
CNIOAtomics: 4dde57e1838a29a9b23ef91617505f34751cdbe5
CNIOBoringSSL: c99129423da079a9eb74bcfc7cfec41a6775cf94
CNIOBoringSSLShims: 902ae35fea0b6be5eefb4fdce906751886cfa46f
CNIODarwin: 0489511f8486443af71ff986ccd5abbc680ae713
CNIOHTTPParser: f7a6816f7ddbe7dfa57a74cd36dc2db2c53b56e8
CNIOLinux: 5921dfefbc4bbe017380b34c510855622147ea41
CNIOWindows: f5aa9dfb401b440a7b4c9cd911e53e981a787193
gRPC-Swift: 8942047451bf81413077e6b94bf4213e47b181cc
Keys: a576f4c9c1c641ca913a959a9c62ed3f215a8de9
LibMobileCoin: f3c44fb94b8647bd5cac3aedf0b1ca24f6cc7201
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MobileCoin: 339e51b8739b7ea2f0519cc7bdde8c4e05c2b374
SwiftLint: e5c7f1fba68eccfc51509d5b2ce1699f5502e0c7
SwiftNIO: bb336ceef32850e9671d3fa0e0cc2b9add3b5948
SwiftNIOConcurrencyHelpers: ca2594e10749655f42baf5468212be83d2f94fe3
SwiftNIOCore: 9deed6620f80c7c82e8e2c2ffb9864495416d892
SwiftNIOEmbedded: b7ccf12b402dff35a5d4356990a6253621e4337d
SwiftNIOExtras: 70f09aa8eca3ab6baeaf1993da9c855b6e95e97f
SwiftNIOFoundationCompat: d3b888766e7c67354a4e4e145d38edf9586efa0c
SwiftNIOHPACK: e2fc784ce453bec4c058b21071e89fb7e542ac30
SwiftNIOHTTP1: 349a16aae363250cd49f430a9fdb93cff518adfa
SwiftNIOHTTP2: a0322f3dcecd949e03df65f4dac106411df0f12c
SwiftNIOPosix: e4988a8dcfd5a6319bde219d7a3d0acc5fbe7a89
SwiftNIOSSL: 7c2ddcbcbb2a8188468b7fe9c2bc6124df4b3772
SwiftNIOTLS: 1b8290ec775238ccc714ed842d929494df95a2c2
SwiftNIOTransportServices: 1fbbdb58510af3c53a838a1dbea98f18132dc952
SwiftProtobuf: c3c12645230d9b09c72267e0de89468c5543bd86
PODFILE CHECKSUM: 46e25fe8f13c4beb3ac1e4ab1a9512960701d05d
COCOAPODS: 1.11.2

View File

@ -0,0 +1,30 @@
{
"configurations" : [
{
"id" : "7B8CC01D-B029-4322-84A2-F7F086835547",
"name" : "Configuration 1",
"options" : {
}
}
],
"defaultOptions" : {
},
"testTargets" : [
{
"skippedTests" : [
"ConsensusConnectionIntTests\/testWrongTrustRootFails()",
"FogBlockConnectionIntTests\/testDoSGetBlocks()",
"FogBlockConnectionIntTests\/testGetBlockZero()",
"MobileCoinClientPublicApiIntTests\/testWrongConsensusTrustRootReturnsError()"
],
"target" : {
"containerPath" : "container:Pods\/Pods.xcodeproj",
"identifier" : "45F542481CBFF9E786B4F9148AC9D6F2",
"name" : "MobileCoin-Unit-Core-IntegrationTests"
}
}
],
"version" : 1
}

View File

@ -0,0 +1,25 @@
{
"configurations" : [
{
"id" : "98A4F1B1-FE76-43E0-BD61-A2B0B7F719FC",
"name" : "Configuration 1",
"options" : {
}
}
],
"defaultOptions" : {
"uiTestingScreenshotsLifetime" : "keepNever",
"userAttachmentLifetime" : "keepNever"
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Pods\/Pods.xcodeproj",
"identifier" : "E8A0545E992AC3A0A6B313DAF029D326",
"name" : "MobileCoin-UI-Core-PerformanceTests"
}
}
],
"version" : 1
}

View File

@ -0,0 +1,24 @@
{
"configurations" : [
{
"id" : "E10088A3-9143-42A3-8186-B64A2E756B6A",
"name" : "Configuration 1",
"options" : {
}
}
],
"defaultOptions" : {
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Pods\/Pods.xcodeproj",
"identifier" : "C10663274EBBCA6839AB2898903FF5CB",
"name" : "MobileCoin-Unit-Core-Tests"
}
}
],
"version" : 1
}

4
Gemfile Normal file
View File

@ -0,0 +1,4 @@
source 'https://rubygems.org' do
gem 'cocoapods', '~> 1.11'
gem 'jazzy'
end

121
Gemfile.lock Normal file
View File

@ -0,0 +1,121 @@
GEM
specs:
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.4)
rexml
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.11.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.2)
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.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.2)
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 (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-plugins (1.0.0)
nap
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.9)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.4)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jazzy (0.14.1)
cocoapods (~> 1.5)
mustache (~> 1.1)
open4 (~> 1.3)
redcarpet (~> 3.4)
rexml (~> 3.2)
rouge (>= 2.0.6, < 4.0)
sassc (~> 2.1)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (2.6.1)
liferaft (0.0.6)
minitest (5.14.4)
molinillo (0.8.0)
mustache (1.1.1)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
open4 (1.3.4)
public_suffix (4.0.6)
redcarpet (3.5.1)
rexml (3.2.5)
rouge (3.26.1)
ruby-macho (2.5.1)
sassc (2.4.0)
ffi (~> 1.9)
sqlite3 (1.4.2)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.21.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.5.1)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.11)!
jazzy!
BUNDLED WITH
2.2.24

621
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

15
LICENSE.md Normal file
View File

@ -0,0 +1,15 @@
Software License Agreement (GPLv3 License)
========================================
Copyright (c) 2018-2021 MobileCoin Inc.
----------------------------------------------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

104
Makefile Normal file
View File

@ -0,0 +1,104 @@
.PHONY: default
default: setup bootstrap build test
# Commands
.PHONY: setup
setup:
bundle install
@$(MAKE) --directory=Example setup
.PHONY: bootstrap
bootstrap:
@$(MAKE) --directory=Example bootstrap
.PHONY: build
build:
@$(MAKE) --directory=Example build
.PHONY: test
test:
@$(MAKE) --directory=Example test
.PHONY: clean
clean: clean-docs
@$(MAKE) --directory=Example clean
.PHONY: lint
lint: swiftlint
.PHONY: lint-all
lint-all: lint lint-circleci lint-podspec lint-docs
.PHONY: publish
publish: tag-release publish-podspec
# Release
.PHONY: tag-release
tag-release:
VERSION="$$(bundle exec pod ipc spec MobileCoin.podspec | jq -r '.version')" && \
git tag "v$$VERSION" && \
git push git@github.com:mobilecoinofficial/MobileCoin-Swift.git "refs/tags/v$$VERSION"
# MobileCoin pod
.PHONY: lint-podspec
lint-podspec:
bundle exec pod spec lint MobileCoin.podspec --skip-tests
.PHONY: publish-podspec
publish-podspec:
bundle exec pod trunk push MobileCoin.podspec --skip-tests
# CircleCI
.PHONY: install-circleci
install-circleci:
brew install circleci
.PHONY: lint-circleci
lint-circleci:
@command -v circleci >/dev/null || $(MAKE) install-circleci
circleci config validate
# Documentation
.PHONY: docs
docs:
bundle exec jazzy
.PHONY: clean-docs
clean-docs:
@[ ! -e docs ] || rm -r docs
.PHONY: lint-docs
lint-docs:
@[ -e docs ] || $(MAKE) docs
@# Check that there are no categories that start with `Other `, since that signifies that a new public
@# type was added but was not added to a category in `.jazzy.yaml`
@[[ "$$( \
name_regex='^Other (?:Classes|Constants|Enumerations|Extensions|Functions|Protocols|Structures|Type Aliases|Type Definitions)$$'; \
cat docs/search.json | jq ".[] \
| select(has(\"parent_name\") | not) \
| select(has(\"name\")) \
| select(.name | test(\"$$name_regex\"))" \
)" == "" ]] || { echo 'Error: Found one or more public types not categorized in jazzy.'; exit 1; }
# Swiftlint
.PHONY: autocorrect
autocorrect:
@PATH="./Example/Pods/SwiftLint:$$PATH" swiftlint autocorrect
.PHONY: swiftlint
swiftlint:
@PATH="./Example/Pods/SwiftLint:$$PATH" swiftlint
# Maintenance
.PHONY: upgrade-deps
upgrade-deps:
bundle update
$(MAKE) -C Example upgrade-deps

114
MobileCoin.podspec Normal file
View File

@ -0,0 +1,114 @@
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "MobileCoin"
s.version = "1.2.0-pre2"
s.summary = "A library for communicating with MobileCoin network"
s.author = "MobileCoin"
s.homepage = "https://www.mobilecoin.com/"
s.license = { :type => "GPLv3" }
s.source = {
:git => "https://github.com/mobilecoinofficial/MobileCoin-Swift.git",
:tag => "v#{s.version}",
:submodules => true
}
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.platform = :ios, "10.0"
# ――― Subspecs ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.default_subspec = "Core"
s.subspec "Core" do |subspec|
subspec.source_files = [
"Sources/**/*.{h,m,swift}",
]
subspec.dependency "LibMobileCoin", "~> 1.2.0-pre3"
subspec.dependency "gRPC-Swift"
subspec.dependency "Logging", "~> 1.4"
subspec.dependency "SwiftNIO"
subspec.dependency "SwiftNIOHPACK"
subspec.dependency "SwiftNIOHTTP1"
subspec.dependency "SwiftProtobuf"
subspec.test_spec do |test_spec|
test_spec.source_files = "Tests/{Unit,Common}/**/*.swift"
test_spec.resources = [
"Tests/Common/FixtureData/**/*",
"Vendor/libmobilecoin-ios-artifacts/Vendor/mobilecoin/test-vectors/vectors/**/*",
]
end
subspec.test_spec 'IntegrationTests' do |test_spec|
test_spec.source_files = "Tests/{Integration,Common}/**/*.swift"
test_spec.resource = "Tests/Common/FixtureData/**/*"
end
subspec.test_spec 'PerformanceTests' do |test_spec|
test_spec.source_files = "Tests/{Performance,Common}/**/*.swift"
test_spec.test_type = :ui
test_spec.requires_app_host = true
end
unless ENV["MC_ENABLE_SWIFTLINT_SCRIPT"].nil?
subspec.dependency 'SwiftLint'
end
end
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.swift_version = "5.2"
# The LibMobileCoin podspec specifies these xcconfig values in
# `user_target_xcconfig`, however that only applies to app targets, not to the
# intermediary frameworks. These must be speicifed here for CocoaPods to set them
# on the framework target and any testspec targets for this pod.
pod_target_xcconfig = {
"GCC_OPTIMIZATION_LEVEL" => "z",
"LLVM_LTO" => "YES",
"ENABLE_BITCODE" => "YES",
"SUPPORTS_MACCATALYST" => "YES",
# The LibMobileCoin vendored binary doesn't include support for 32-bit
# architectures or for arm64 iphonesimulator.
"VALID_ARCHS[sdk=iphoneos*]" => "arm64",
"VALID_ARCHS[sdk=iphonesimulator*]" => "x86_64 arm64",
}
unless ENV["MC_ENABLE_WARN_LONG_COMPILE_TIMES"].nil?
pod_target_xcconfig['OTHER_SWIFT_FLAGS'] = '-Xfrontend -warn-long-function-bodies=500'
pod_target_xcconfig['OTHER_SWIFT_FLAGS'] += ' -Xfrontend -warn-long-expression-type-checking=500'
end
s.pod_target_xcconfig = pod_target_xcconfig
unless ENV["MC_ENABLE_SWIFTLINT_SCRIPT"].nil?
s.script_phases = [
{
:name => "Run SwiftLint",
:execution_position => :any,
:script => <<~'EOS'
SWIFTLINT="${PODS_ROOT}/SwiftLint/swiftlint"
if which ${SWIFTLINT} >/dev/null; then
cd "${PODS_TARGET_SRCROOT}"
${SWIFTLINT}
else
echo "warning: SwiftLint not installed, run \`pod install\`"
fi
EOS
},
]
end
end

View File

@ -1,253 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Protocols Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
<a title="Protocols Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">MobileCoin Reference</a>
<img class="carat" src="img/carat.png" />
Protocols Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Protocols</h1>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin14StorageAdapterP"></a>
<a name="//apple_ref/swift/Protocol/StorageAdapter" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin14StorageAdapterP">StorageAdapter</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<a href="Protocols/StorageAdapter.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">StorageAdapter</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Storage/StorageAdapter.swift#L7-L11">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

View File

@ -1,320 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>StorageAdapter Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/StorageAdapter" class="dashAnchor"></a>
<a title="StorageAdapter Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
MobileCoin latest Docs
</a>
</p>
<p class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/mobilecoinofficial/MobileCoin-Swift">
<img class="header-icon" src="../img/gh.png"/>
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">MobileCoin Reference</a>
<img class="carat" src="../img/carat.png" />
StorageAdapter Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient.html">MobileCoinClient</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/MobileCoinClient/Config.html"> Config</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structures.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountKey.html">AccountKey</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PublicAddress.html">PublicAddress</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Balance.html">Balance</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/AccountActivity.html">AccountActivity</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/OwnedTxOut.html">OwnedTxOut</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/BlockMetadata.html">BlockMetadata</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Transaction.html">Transaction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Receipt.html">Receipt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri.html">MobUri</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobUri/Payload.html"> Payload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/PaymentRequest.html">PaymentRequest</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/TransferPayload.html">TransferPayload</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation.html">Attestation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrEnclave.html"> MrEnclave</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Attestation/MrSigner.html"> MrSigner</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Utilities.html">Utilities</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mnemonic.html">Mnemonic</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58Coder.html">Base58Coder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enumerations.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/FeeLevel.html">FeeLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionStatus.html">TransactionStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ReceiptStatus.html">ReceiptStatus</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Base58DecodingResult.html">Base58DecodingResult</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/StorageAdapter.html">StorageAdapter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Configuration.html">Configuration</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/MobileCoinLogging.html">MobileCoinLogging</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Errors.html">Errors</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ConnectionError.html">ConnectionError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/InvalidInputError.html">InvalidInputError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationFetcherError.html">BalanceTransferEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationFetcherError.html">TransactionEstimationFetcherError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionPreparationError.html">TransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/DefragTransactionPreparationError.html">DefragTransactionPreparationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionSubmissionError.html">TransactionSubmissionError</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Deprecated.html">Deprecated</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/BalanceTransferEstimationError.html">BalanceTransferEstimationError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/TransactionEstimationError.html">TransactionEstimationError</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>StorageAdapter</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">StorageAdapter</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Storage/StorageAdapter.swift#L7-L11">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin14StorageAdapterP3get3key10Foundation4DataVSgSS_tF"></a>
<a name="//apple_ref/swift/Method/get(key:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin14StorageAdapterP3get3key10Foundation4DataVSgSS_tF">get(key:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">get</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Data</span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Storage/StorageAdapter.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin14StorageAdapterP3set3key5valueySS_10Foundation4DataVtF"></a>
<a name="//apple_ref/swift/Method/set(key:value:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin14StorageAdapterP3set3key5valueySS_10Foundation4DataVtF">set(key:<wbr>value:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">set</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Storage/StorageAdapter.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:10MobileCoin14StorageAdapterP5clear3keyySS_tF"></a>
<a name="//apple_ref/swift/Method/clear(key:)" class="dashAnchor"></a>
<a class="token" href="#/s:10MobileCoin14StorageAdapterP5clear3keyySS_tF">clear(key:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">clear</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/mobilecoinofficial/MobileCoin-Swift/tree/master/Sources/Storage/StorageAdapter.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://www.mobilecoin.com/" target="_blank" rel="external">MobileCoin</a>. All rights reserved. (Last updated: 2021-08-18)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
</html>

87
README.md Normal file
View File

@ -0,0 +1,87 @@
![MobileCoin logo](https://raw.githubusercontent.com/mobilecoinofficial/mobilecoin/master/img/mobilecoin_logo.png)
[![CircleCI](https://img.shields.io/circleci/build/gh/mobilecoinofficial/MobileCoin-Swift?token=da755dc2814021ad04ee7b31a129b41e6c7161ac)](https://circleci.com/gh/mobilecoinofficial/MobileCoin-Swift/tree/master) [![Documentation](https://img.shields.io/badge/docs-latest-blue)](https://mobilecoinofficial.github.io/MobileCoin-Swift/)
# MobileCoin Swift
MobileCoin is a privacy-preserving payments network designed for use on mobile devices.
# Sending your First Payment
* You must read and accept the [Terms of Use for MobileCoins and MobileCoin Wallets](./TERMS-OF-USE.md) to use MobileCoin Software.
### Note to Developers
* MobileCoin is a prototype. Expect substantial changes before the release.
* Please see [*CONTRIBUTING.md*](./CONTRIBUTING.md) for notes on contributing bug reports and code.
# Table of Contents
- [License](#license)
- [Cryptography Notice](#cryptography-notice)
- [Repository Structure](#repository-structure)
- [Build Instructions](#build-instructions)
- [Overview](#overview)
- [Support](#support)
- [Trademarks](#trademarks)
## License
MobileCoin is available under open-source licenses. Please read the [*LICENSE.md*](./LICENSE.md) and corresponding [*LICENSE*](./LICENSE).
## Cryptography Notice
This distribution includes cryptographic software. Your country may have restrictions on the use of encryption software.
Please check your country's laws before downloading or using this software.
## Repository Structure
|Directory |Description |
| :-- | :-- |
| [Example](./Example) | Example application. |
| [Sources](./Sources) | Sources for the MobileCoin Swift SDK. |
| [Tests](./Tests) | Tests. |
| [Vendor](./Vendor) | iOS Artifacts. |
## Build Instructions
The workspace can be built with `make`.
1. Initialize or update submodules
```
git submodule update --init --recursive
```
1. Install Ruby
1. Install the gem bundler
```
gem install bundler
```
1. Build the MobileCoin Swift SDK
```
make
```
Note: To build libmobilecoin, run `make` in [libmobilecoin-ios-artifacts](./Vendor/libmobilecoin-ios-artifacts).
## Overview
MobileCoin is a payment network with no central authority. The fundamental goal of the network is to safely and
efficiently enable the exchange of value, represented as fractional ownership of the total value of the network.
Like most cryptocurrencies, MobileCoin maintains a permanent and immutable record of all successfully completed
payments in a blockchain data structure. Cryptography is used extensively to establish ownership, control transfers,
and to preserve cash-like privacy for users.
For more information about the cryptocurrency, see [MobileCoinFoundation/MobileCoin](https://github.com/mobilecoinfoundation/mobilecoin).
## Support
For troubleshooting help and other questions, please visit our [community forum](https://community.mobilecoin.foundation/).
You can also open a technical support ticket via [email](mailto://support@mobilecoin.com).
#### Trademarks
MobileCoin is a registered trademark of MobileCoin Inc.

View File

@ -0,0 +1,128 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
extension Account {
struct BalanceUpdater {
private let serialQueue: DispatchQueue
private let account: ReadWriteDispatchLock<Account>
private let txOutFetcher: FogView.TxOutFetcher
private let viewKeyScanner: FogViewKeyScanner
private let fogKeyImageChecker: FogKeyImageChecker
init(
account: ReadWriteDispatchLock<Account>,
fogViewService: FogViewService,
fogKeyImageService: FogKeyImageService,
fogBlockService: FogBlockService,
fogQueryScalingStrategy: FogQueryScalingStrategy,
targetQueue: DispatchQueue?
) {
self.serialQueue = DispatchQueue(
label: "com.mobilecoin.\(Account.self).\(Self.self)",
target: targetQueue)
self.account = account
self.txOutFetcher = FogView.TxOutFetcher(
fogView: account.mapLockWithoutLocking { $0.fogView },
accountKey: account.accessWithoutLocking.accountKey,
fogViewService: fogViewService,
fogQueryScalingStrategy: fogQueryScalingStrategy,
targetQueue: targetQueue)
self.viewKeyScanner = FogViewKeyScanner(
accountKey: account.accessWithoutLocking.accountKey,
fogBlockService: fogBlockService)
self.fogKeyImageChecker = FogKeyImageChecker(
fogKeyImageService: fogKeyImageService,
targetQueue: targetQueue)
}
func updateBalance(completion: @escaping (Result<Balance, ConnectionError>) -> Void) {
logger.info("Updating balance...", logFunction: false)
checkForNewTxOuts {
guard $0.successOr(completion: completion) != nil else {
logger.warning(
"Failed to update balance: checkForNewTxOuts error: \($0)",
logFunction: false)
return
}
self.checkForSpentTxOuts {
guard $0.successOr(completion: completion) != nil else {
logger.warning(
"Failed to update balance: checkForSpentTxOuts error: \($0)",
logFunction: false)
return
}
let balance = self.account.readSync { $0.cachedBalance }
logger.info(
"Balance update successful. balance: \(redacting: balance)",
logFunction: false)
completion(.success(balance))
}
}
}
func checkForNewTxOuts(completion: @escaping (Result<(), ConnectionError>) -> Void) {
checkForNewFogViewTxOuts {
guard $0.successOr(completion: completion) != nil else { return }
self.viewKeyScanUnscannedMissedBlocks(completion: completion)
}
}
func checkForNewFogViewTxOuts(completion: @escaping (Result<(), ConnectionError>) -> Void) {
txOutFetcher.fetchTxOuts(partialResultsWithWriteLock: { newTxOuts in
logger.info(
"Found \(redacting: newTxOuts.count) new TxOuts using Fog View",
logFunction: false)
let account = self.account.accessWithoutLocking
account.addTxOuts(newTxOuts)
}, completion: completion)
}
func viewKeyScanUnscannedMissedBlocks(
completion: @escaping (Result<(), ConnectionError>) -> Void
) {
let unscannedBlockRanges = account.readSync { $0.unscannedMissedBlocksRanges }
guard !unscannedBlockRanges.isEmpty else {
logger.debug("0 unscanned missed blocks, skipping.", logFunction: false)
serialQueue.async {
completion(.success(()))
}
return
}
viewKeyScanner.viewKeyScanBlocks(blockRanges: unscannedBlockRanges) {
completion($0.map { foundTxOuts in
self.account.writeSync {
$0.addViewKeyScanResults(
scannedBlockRanges: unscannedBlockRanges,
foundTxOuts: foundTxOuts)
}
})
}
}
func checkForSpentTxOuts(completion: @escaping (Result<(), ConnectionError>) -> Void) {
let keyImageTrackers = account.mapLock { account in
account.allTxOutTrackers.filter { !$0.isSpent }.map { $0.keyImageTracker }
}
let queries = keyImageTrackers.readSync {
$0.map { ($0.keyImage, $0.nextKeyImageQueryBlockIndex) }
}
fogKeyImageChecker.checkKeyImages(keyImageQueries: queries) {
completion($0.map { statuses in
keyImageTrackers.writeSync { keyImageTrackers in
for (tracker, status) in zip(keyImageTrackers, statuses) {
tracker.spentStatus = status
}
}
})
}
}
}
}

View File

@ -0,0 +1,231 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable closure_body_length
import Foundation
extension Account {
struct TransactionEstimator {
private let serialQueue: DispatchQueue
private let account: ReadWriteDispatchLock<Account>
private let feeFetcher: BlockchainFeeFetcher
private let txOutSelector: TxOutSelector
init(
account: ReadWriteDispatchLock<Account>,
feeFetcher: BlockchainFeeFetcher,
txOutSelectionStrategy: TxOutSelectionStrategy,
targetQueue: DispatchQueue?
) {
self.serialQueue = DispatchQueue(
label: "com.mobilecoin.\(Account.self).\(Self.self))",
target: targetQueue)
self.account = account
self.feeFetcher = feeFetcher
self.txOutSelector = TxOutSelector(txOutSelectionStrategy: txOutSelectionStrategy)
}
func amountTransferable(
feeLevel: FeeLevel,
completion: @escaping (Result<UInt64, BalanceTransferEstimationFetcherError>) -> Void
) {
feeFetcher.feeStrategy(for: feeLevel) {
completion($0.mapError { .connectionError($0) }
.flatMap { feeStrategy in
let txOuts = self.account.readSync { $0.unspentTxOuts }
logger.info(
"Calculating amountTransferable. feeLevel: \(feeLevel), " +
"unspentTxOutValues: \(redacting: txOuts.map { $0.value })",
logFunction: false)
return self.txOutSelector
.amountTransferable(feeStrategy: feeStrategy, txOuts: txOuts)
.mapError {
switch $0 {
case .feeExceedsBalance(let reason):
return .feeExceedsBalance(reason)
case .balanceOverflow(let reason):
return .balanceOverflow(reason)
}
}
.map {
logger.info(
"amountTransferable: \(redacting: $0)",
logFunction: false)
return $0
}
})
}
}
func estimateTotalFee(
toSendAmount amount: UInt64,
feeLevel: FeeLevel,
completion: @escaping (Result<UInt64, TransactionEstimationFetcherError>) -> Void
) {
guard amount > 0 else {
let errorMessage = "estimateTotalFee failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
serialQueue.async {
completion(.failure(.invalidInput(errorMessage)))
}
return
}
feeFetcher.feeStrategy(for: feeLevel) {
completion($0.mapError { .connectionError($0) }
.flatMap { feeStrategy in
let txOuts = self.account.readSync { $0.unspentTxOuts }
logger.info(
"Estimating total fee: amount: \(redacting: amount), feeLevel: " +
"\(feeLevel), unspentTxOutValues: " +
"\(redacting: txOuts.map { $0.value })",
logFunction: false)
return self.txOutSelector
.estimateTotalFee(
toSendAmount: amount,
feeStrategy: feeStrategy,
txOuts: txOuts)
.mapError { _ in
TransactionEstimationFetcherError.insufficientBalance()
}
.map {
logger.info(
"estimateTotalFee: \(redacting: $0.totalFee), " +
"requiresDefrag: \($0.requiresDefrag)",
logFunction: false)
return $0.totalFee
}
})
}
}
func requiresDefragmentation(
toSendAmount amount: UInt64,
feeLevel: FeeLevel,
completion: @escaping (Result<Bool, TransactionEstimationFetcherError>) -> Void
) {
guard amount > 0 else {
let errorMessage = "requiresDefragmentation failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
serialQueue.async {
completion(.failure(.invalidInput(errorMessage)))
}
return
}
feeFetcher.feeStrategy(for: feeLevel) {
completion($0.mapError { .connectionError($0) }
.flatMap { feeStrategy in
let txOuts = self.account.readSync { $0.unspentTxOuts }
logger.info(
"Calculation defragmentation required: amount: \(redacting: amount), " +
"feeLevel: \(feeLevel), unspentTxOutValues: " +
"\(redacting: txOuts.map { $0.value })",
logFunction: false)
return self.txOutSelector
.estimateTotalFee(
toSendAmount: amount,
feeStrategy: feeStrategy,
txOuts: txOuts)
.mapError { _ in
TransactionEstimationFetcherError.insufficientBalance()
}
.map {
logger.info(
"requiresDefragmentation: \($0.requiresDefrag), totalFee: " +
"\(redacting: $0.totalFee)",
logFunction: false)
return $0.requiresDefrag
}
})
}
}
}
}
extension Account.TransactionEstimator {
@available(*, deprecated, message: "Use amountTransferable(feeLevel:completion:) instead")
func amountTransferable(feeLevel: FeeLevel)
-> Result<UInt64, BalanceTransferEstimationError>
{
let feeStrategy = feeLevel.defaultFeeStrategy
let txOuts = account.readSync { $0.unspentTxOuts }
logger.info(
"Calculating amountTransferable. feeLevel: \(feeLevel), unspentTxOutValues: " +
"\(redacting: txOuts.map { $0.value })",
logFunction: false)
return txOutSelector.amountTransferable(feeStrategy: feeStrategy, txOuts: txOuts)
.mapError {
switch $0 {
case .feeExceedsBalance(let reason):
return .feeExceedsBalance(reason)
case .balanceOverflow(let reason):
return .balanceOverflow(reason)
}
}
.map {
logger.info("amountTransferable: \(redacting: $0)", logFunction: false)
return $0
}
}
@available(*, deprecated, message:
"Use estimateTotalFee(toSendAmount:feeLevel:completion:) instead")
func estimateTotalFee(toSendAmount amount: UInt64, feeLevel: FeeLevel)
-> Result<UInt64, TransactionEstimationError>
{
guard amount > 0 else {
let errorMessage = "estimateTotalFee failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
return .failure(.invalidInput(errorMessage))
}
let feeStrategy = feeLevel.defaultFeeStrategy
let txOuts = account.readSync { $0.unspentTxOuts }
logger.info(
"Estimating total fee: amount: \(redacting: amount), feeLevel: \(feeLevel), " +
"unspentTxOutValues: \(redacting: txOuts.map { $0.value })",
logFunction: false)
return txOutSelector
.estimateTotalFee(toSendAmount: amount, feeStrategy: feeStrategy, txOuts: txOuts)
.mapError { _ -> TransactionEstimationError in .insufficientBalance() }
.map {
logger.info(
"estimateTotalFee: \(redacting: $0.totalFee), requiresDefrag: " +
"\($0.requiresDefrag)",
logFunction: false)
return $0.totalFee
}
}
@available(*, deprecated, message:
"Use requiresDefragmentation(toSendAmount:feeLevel:completion:) instead")
func requiresDefragmentation(toSendAmount amount: UInt64, feeLevel: FeeLevel)
-> Result<Bool, TransactionEstimationError>
{
guard amount > 0 else {
let errorMessage = "requiresDefragmentation failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
return .failure(.invalidInput(errorMessage))
}
let feeStrategy = feeLevel.defaultFeeStrategy
let txOuts = account.readSync { $0.unspentTxOuts }
logger.info(
"Calculation defragmentation required: amount: \(redacting: amount), feeLevel: " +
"\(feeLevel), unspentTxOutValues: \(redacting: txOuts.map { $0.value })",
logFunction: false)
return txOutSelector
.estimateTotalFee(toSendAmount: amount, feeStrategy: feeStrategy, txOuts: txOuts)
.mapError { _ -> TransactionEstimationError in .insufficientBalance() }
.map {
logger.info(
"requiresDefragmentation: \($0.requiresDefrag), totalFee: " +
"\(redacting: $0.totalFee)",
logFunction: false)
return $0.requiresDefrag
}
}
}

View File

@ -0,0 +1,222 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable closure_body_length function_body_length multiline_arguments
import Foundation
extension Account {
struct TransactionOperations {
private let serialQueue: DispatchQueue
private let account: ReadWriteDispatchLock<Account>
private let feeFetcher: BlockchainFeeFetcher
private let txOutSelector: TxOutSelector
private let transactionPreparer: TransactionPreparer
init(
account: ReadWriteDispatchLock<Account>,
fogMerkleProofService: FogMerkleProofService,
fogResolverManager: FogResolverManager,
feeFetcher: BlockchainFeeFetcher,
txOutSelectionStrategy: TxOutSelectionStrategy,
mixinSelectionStrategy: MixinSelectionStrategy,
targetQueue: DispatchQueue?
) {
self.serialQueue = DispatchQueue(
label: "com.mobilecoin.\(Account.self).\(Self.self))",
target: targetQueue)
self.account = account
self.feeFetcher = feeFetcher
self.txOutSelector = TxOutSelector(txOutSelectionStrategy: txOutSelectionStrategy)
self.transactionPreparer = TransactionPreparer(
accountKey: account.accessWithoutLocking.accountKey,
fogMerkleProofService: fogMerkleProofService,
fogResolverManager: fogResolverManager,
mixinSelectionStrategy: mixinSelectionStrategy,
targetQueue: targetQueue)
}
func prepareTransaction(
to recipient: PublicAddress,
amount: UInt64,
fee: UInt64,
completion: @escaping (
Result<(transaction: Transaction, receipt: Receipt), TransactionPreparationError>
) -> Void
) {
guard amount > 0 else {
let errorMessage = "prepareTransactionWithFee failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
serialQueue.async {
completion(.failure(.invalidInput(errorMessage)))
}
return
}
let (unspentTxOuts, ledgerBlockCount) =
account.readSync { ($0.unspentTxOuts, $0.knowableBlockCount) }
logger.info(
"Preparing transaction with provided fee... recipient: \(redacting: recipient), " +
"amount: \(redacting: amount), fee: \(redacting: fee), unspentTxOutValues: " +
"\(redacting: unspentTxOuts.map { $0.value })",
logFunction: false)
switch txOutSelector
.selectTransactionInputs(amount: amount, fee: fee, fromTxOuts: unspentTxOuts)
.mapError({ error -> TransactionPreparationError in
switch error {
case .insufficientTxOuts:
return .insufficientBalance()
case .defragmentationRequired:
return .defragmentationRequired()
}
})
{
case .success(let txOutsToSpend):
logger.info(
"Transaction prepared with fee. txOutsToSpend: " +
"0x\(redacting: txOutsToSpend.map { $0.publicKey.hexEncodedString() })",
logFunction: false)
let tombstoneBlockIndex = ledgerBlockCount + 50
transactionPreparer.prepareTransaction(
inputs: txOutsToSpend,
recipient: recipient,
amount: amount,
fee: fee,
tombstoneBlockIndex: tombstoneBlockIndex,
completion: completion)
case .failure(let error):
logger.info("prepareTransactionWithFee failure: \(error)", logFunction: false)
serialQueue.async {
completion(.failure(error))
}
}
}
func prepareTransaction(
to recipient: PublicAddress,
amount: UInt64,
feeLevel: FeeLevel,
completion: @escaping (
Result<(transaction: Transaction, receipt: Receipt), TransactionPreparationError>
) -> Void
) {
guard amount > 0 else {
let errorMessage = "prepareTransactionWithFeeLevel failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
serialQueue.async {
completion(.failure(.invalidInput(errorMessage)))
}
return
}
feeFetcher.feeStrategy(for: feeLevel) {
switch $0 {
case .success(let feeStrategy):
let (unspentTxOuts, ledgerBlockCount) =
self.account.readSync { ($0.unspentTxOuts, $0.knowableBlockCount) }
logger.info(
"Preparing transaction with fee level... recipient: " +
"\(redacting: recipient), amount: \(redacting: amount), feeLevel: " +
"\(feeLevel), unspentTxOutValues: " +
"\(redacting: unspentTxOuts.map { $0.value })",
logFunction: false)
switch self.txOutSelector
.selectTransactionInputs(
amount: amount,
feeStrategy: feeStrategy,
fromTxOuts: unspentTxOuts)
.mapError({ error -> TransactionPreparationError in
switch error {
case .insufficientTxOuts:
return .insufficientBalance()
case .defragmentationRequired:
return .defragmentationRequired()
}
})
{
case .success(let (inputs: inputs, fee: fee)):
logger.info(
"Transaction prepared with fee level. fee: \(redacting: fee)",
logFunction: false)
let tombstoneBlockIndex = ledgerBlockCount + 50
self.transactionPreparer.prepareTransaction(
inputs: inputs,
recipient: recipient,
amount: amount,
fee: fee,
tombstoneBlockIndex: tombstoneBlockIndex,
completion: completion)
case .failure(let error):
logger.info(
"prepareTransactionWithFeeLevel failure: \(error)",
logFunction: false)
completion(.failure(error))
}
case .failure(let connectionError):
logger.info("failure - error: \(connectionError)")
completion(.failure(.connectionError(connectionError)))
}
}
}
func prepareDefragmentationStepTransactions(
toSendAmount amountToSend: UInt64,
feeLevel: FeeLevel,
completion: @escaping (Result<[Transaction], DefragTransactionPreparationError>) -> Void
) {
guard amountToSend > 0 else {
let errorMessage =
"prepareDefragmentationStepTransactions failure: Cannot spend 0 MOB"
logger.error(errorMessage, logFunction: false)
serialQueue.async {
completion(.failure(.invalidInput(errorMessage)))
}
return
}
feeFetcher.feeStrategy(for: feeLevel) {
switch $0 {
case .success(let feeStrategy):
let (unspentTxOuts, ledgerBlockCount) =
self.account.readSync { ($0.unspentTxOuts, $0.knowableBlockCount) }
logger.info(
"Preparing defragmentation step transactions... amountToSend: " +
"\(redacting: amountToSend), feeLevel: \(feeLevel), " +
"unspentTxOutValues: \(redacting: unspentTxOuts.map { $0.value })",
logFunction: false)
switch self.txOutSelector.selectInputsForDefragTransactions(
toSendAmount: amountToSend,
feeStrategy: feeStrategy,
fromTxOuts: unspentTxOuts)
{
case .success(let defragTxInputs):
if !defragTxInputs.isEmpty {
logger.info(
"Preparing \(defragTxInputs.count) defrag transactions",
logFunction: false)
}
let tombstoneBlockIndex = ledgerBlockCount + 50
defragTxInputs.mapAsync({ defragInputs, callback in
self.transactionPreparer.prepareSelfAddressedTransaction(
inputs: defragInputs.inputs,
fee: defragInputs.fee,
tombstoneBlockIndex: tombstoneBlockIndex,
completion: callback)
}, serialQueue: self.serialQueue, completion: completion)
case .failure(let error):
logger.info(
"prepareDefragmentationStepTransactions failure: \(error)",
logFunction: false)
self.serialQueue.async {
completion(.failure(.insufficientBalance()))
}
}
case .failure(let connectionError):
logger.info("failure - error: \(connectionError)")
completion(.failure(.connectionError(connectionError)))
}
}
}
}
}

View File

@ -0,0 +1,220 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
final class Account {
let accountKey: AccountKey
let fogView = FogView()
var allTxOutTrackers: [TxOutTracker] = []
init(accountKey: AccountKeyWithFog) {
self.accountKey = accountKey.accountKey
}
var publicAddress: PublicAddress {
accountKey.publicAddress
}
var unscannedMissedBlocksRanges: [Range<UInt64>] { fogView.unscannedMissedBlocksRanges }
private var allTxOutsFoundBlockCount: UInt64 {
var allTxOutsFoundBlockCount = fogView.allRngTxOutsFoundBlockCount
for unscannedMissedBlocksRange in unscannedMissedBlocksRanges
where unscannedMissedBlocksRange.lowerBound < allTxOutsFoundBlockCount
{
allTxOutsFoundBlockCount = unscannedMissedBlocksRange.lowerBound
}
return allTxOutsFoundBlockCount
}
/// The number of blocks for which we have complete knowledge of this Account's wallet.
var knowableBlockCount: UInt64 {
var knowableBlockCount = allTxOutsFoundBlockCount
for txOut in allTxOutTrackers {
if case .unspent(let knownToBeUnspentBlockCount) = txOut.spentStatus {
knowableBlockCount = min(knowableBlockCount, knownToBeUnspentBlockCount)
}
}
return knowableBlockCount
}
var cachedBalance: Balance {
let blockCount = knowableBlockCount
let txOutValues = allTxOutTrackers
.filter { $0.receivedAndUnspent(asOfBlockCount: blockCount) }
.map { $0.knownTxOut.value }
return Balance(values: txOutValues, blockCount: blockCount)
}
var cachedAccountActivity: AccountActivity {
let blockCount = knowableBlockCount
let txOuts = allTxOutTrackers.compactMap { OwnedTxOut($0, atBlockCount: blockCount) }
return AccountActivity(txOuts: txOuts, blockCount: blockCount)
}
var ownedTxOuts: [KnownTxOut] {
ownedTxOutsAndBlockCount.txOuts
}
var ownedTxOutsAndBlockCount: (txOuts: [KnownTxOut], blockCount: UInt64) {
let knowableBlockCount = self.knowableBlockCount
let txOuts = allTxOutTrackers
.filter { $0.received(asOfBlockCount: knowableBlockCount) }
.map { $0.knownTxOut }
return (txOuts: txOuts, blockCount: knowableBlockCount)
}
var unspentTxOuts: [KnownTxOut] {
unspentTxOutsAndBlockCount.txOuts
}
var unspentTxOutsAndBlockCount: (txOuts: [KnownTxOut], blockCount: UInt64) {
let knowableBlockCount = self.knowableBlockCount
let txOuts = allTxOutTrackers
.filter { $0.receivedAndUnspent(asOfBlockCount: knowableBlockCount) }
.map { $0.knownTxOut }
return (txOuts: txOuts, blockCount: knowableBlockCount)
}
func addTxOuts(_ txOuts: [KnownTxOut]) {
allTxOutTrackers.append(contentsOf: txOuts.map { TxOutTracker($0) })
}
func addViewKeyScanResults(scannedBlockRanges: [Range<UInt64>], foundTxOuts: [KnownTxOut]) {
addTxOuts(foundTxOuts)
fogView.markBlocksAsScanned(blockRanges: scannedBlockRanges)
}
func cachedReceivedStatus(of receipt: Receipt)
-> Result<Receipt.ReceivedStatus, InvalidInputError>
{
ownedTxOut(for: receipt).map {
if let ownedTxOut = $0 {
return .received(block: ownedTxOut.block)
} else {
let knownToBeNotReceivedBlockCount = allTxOutsFoundBlockCount
guard receipt.txTombstoneBlockIndex > knownToBeNotReceivedBlockCount else {
return .tombstoneExceeded
}
return .notReceived(knownToBeNotReceivedBlockCount: knownToBeNotReceivedBlockCount)
}
}
}
/// Retrieves the `KnownTxOut`'s corresponding to `receipt` and verifies `receipt` is valid.
private func ownedTxOut(for receipt: Receipt) -> Result<KnownTxOut?, InvalidInputError> {
logger.debug(
"Last received TxOut: TxOut pubkey: " +
"\(redacting: ownedTxOuts.last?.publicKey.hexEncodedString() ?? "None")",
logFunction: false)
// First check if we've received the TxOut (either from Fog View or from view key scanning).
// This has the benefit of providing a guarantee that the TxOut is owned by this account.
guard let ownedTxOut = ownedTxOut(for: receipt.txOutPublicKeyTyped) else {
return .success(nil)
}
// Make sure the Receipt data matches the TxOut found in the ledger. This verifies that the
// public key, commitment, and masked value match.
//
// Note: This doesn't verify the confirmation number or tombstone block (since neither are
// saved to the ledger).
guard receipt.matchesTxOut(ownedTxOut) else {
let errorMessage =
"Receipt data doesn't match the corresponding TxOut found in the ledger. " +
"Receipt: \(redacting: receipt.serializedData.base64EncodedString()) - " +
"Account TxOut: \(redacting: ownedTxOut)"
logger.error(errorMessage, sensitive: true, logFunction: false)
return .failure(InvalidInputError(errorMessage))
}
// Verify that the confirmation number validates for this account key. This provides a
// guarantee that the sender of the Receipt was the creator of the TxOut that we received.
guard receipt.validateConfirmationNumber(accountKey: accountKey) else {
let errorMessage = "Receipt confirmation number is invalid for this account. " +
"Receipt: \(redacting: receipt.serializedData.base64EncodedString())"
logger.error(errorMessage, sensitive: true, logFunction: false)
return .failure(InvalidInputError(errorMessage))
}
return .success(ownedTxOut)
}
private func ownedTxOut(for txOutPublicKey: RistrettoPublic) -> KnownTxOut? {
ownedTxOuts.first(where: { $0.publicKey == txOutPublicKey })
}
}
extension Account {
/// - Returns: `.failure` if `accountKey` doesn't use Fog.
static func make(accountKey: AccountKey) -> Result<Account, InvalidInputError> {
guard let accountKey = AccountKeyWithFog(accountKey: accountKey) else {
let errorMessage = "Accounts without fog URLs are not currently supported."
logger.error(errorMessage, logFunction: false)
return .failure(InvalidInputError(errorMessage))
}
return .success(Account(accountKey: accountKey))
}
}
extension Account: CustomRedactingStringConvertible {
var redactingDescription: String {
publicAddress.redactingDescription
}
}
final class TxOutTracker {
let knownTxOut: KnownTxOut
var keyImageTracker: KeyImageSpentTracker
init(_ knownTxOut: KnownTxOut) {
self.knownTxOut = knownTxOut
self.keyImageTracker = KeyImageSpentTracker(knownTxOut.keyImage)
}
var spentStatus: KeyImage.SpentStatus {
keyImageTracker.spentStatus
}
var isSpent: Bool {
keyImageTracker.isSpent
}
func receivedAndUnspent(asOfBlockCount blockCount: UInt64) -> Bool {
received(asOfBlockCount: blockCount) && !spent(asOfBlockCount: blockCount)
}
func received(asOfBlockCount blockCount: UInt64) -> Bool {
knownTxOut.block.index < blockCount
}
func spent(asOfBlockCount blockCount: UInt64) -> Bool {
if case .spent = keyImageTracker.spentStatus.status(atBlockCount: blockCount) {
return true
}
return false
}
}
extension OwnedTxOut {
fileprivate init?(_ txOutTracker: TxOutTracker, atBlockCount blockCount: UInt64) {
guard txOutTracker.knownTxOut.block.index < blockCount else {
return nil
}
let receivedBlock = txOutTracker.knownTxOut.block
let spentBlock: BlockMetadata?
if case .spent(let block) = txOutTracker.spentStatus, block.index < blockCount {
spentBlock = block
} else {
spentBlock = nil
}
self.init(txOutTracker.knownTxOut, receivedBlock: receivedBlock, spentBlock: spentBlock)
}
}

View File

@ -0,0 +1,18 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
/// Provides a snapshot of account activity at a particular point in the ledger, as indicated by
/// `blockCount`.
public struct AccountActivity {
public let txOuts: Set<OwnedTxOut>
public let blockCount: UInt64
init(txOuts: [OwnedTxOut], blockCount: UInt64) {
self.txOuts = Set(txOuts)
self.blockCount = blockCount
}
}

View File

@ -0,0 +1,189 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_function_chains
import Foundation
import LibMobileCoin
public struct AccountKey {
static func make(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
fogReportUrl: String,
fogReportId: String,
fogAuthoritySpki: Data,
subaddressIndex: UInt64 = McConstants.DEFAULT_SUBADDRESS_INDEX
) -> Result<AccountKey, InvalidInputError> {
FogInfo.make(
reportUrl: fogReportUrl,
reportId: fogReportId,
authoritySpki: fogAuthoritySpki
).map { fogInfo in
AccountKey(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
fogInfo: fogInfo,
subaddressIndex: subaddressIndex)
}
}
let viewPrivateKey: RistrettoPrivate
let spendPrivateKey: RistrettoPrivate
let fogInfo: FogInfo?
let subaddressIndex: UInt64
public let publicAddress: PublicAddress
init(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
fogInfo: FogInfo? = nil,
subaddressIndex: UInt64 = McConstants.DEFAULT_SUBADDRESS_INDEX
) {
self.viewPrivateKey = viewPrivateKey
self.spendPrivateKey = spendPrivateKey
self.fogInfo = fogInfo
self.subaddressIndex = subaddressIndex
self.publicAddress = PublicAddress(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
accountKeyFogInfo: fogInfo,
subaddressIndex: subaddressIndex)
}
/// - Returns: `nil` when the input is not deserializable.
public init?(serializedData: Data) {
guard let proto = try? External_AccountKey(serializedData: serializedData) else {
logger.error("External_AccountKey deserialization failed.", logFunction: false)
return nil
}
self.init(proto)
}
public var serializedData: Data {
let proto = External_AccountKey(self)
return proto.serializedDataInfallible
}
var fogReportUrlString: String? { fogInfo?.reportUrlString }
var fogReportUrl: FogUrl? { fogInfo?.reportUrl }
var fogReportId: String? { fogInfo?.reportId }
var fogAuthoritySpki: Data? { fogInfo?.authoritySpki }
var subaddressViewPrivateKey: RistrettoPrivate {
AccountKeyUtils.subaddressPrivateKeys(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
subaddressIndex: subaddressIndex
).subaddressViewPrivateKey
}
var subaddressSpendPrivateKey: RistrettoPrivate {
AccountKeyUtils.subaddressPrivateKeys(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
subaddressIndex: subaddressIndex
).subaddressSpendPrivateKey
}
}
extension AccountKey: Equatable {}
extension AccountKey: Hashable {}
extension AccountKey {
init?(
_ proto: External_AccountKey,
subaddressIndex: UInt64 = McConstants.DEFAULT_SUBADDRESS_INDEX
) {
guard let viewPrivateKey = RistrettoPrivate(proto.viewPrivateKey.data),
let spendPrivateKey = RistrettoPrivate(proto.spendPrivateKey.data)
else {
return nil
}
let maybeFogInfo: FogInfo?
if !proto.fogReportURL.isEmpty {
guard case .success(let fogInfo) = FogInfo.make(
reportUrl: proto.fogReportURL,
reportId: proto.fogReportID,
authoritySpki: proto.fogAuthoritySpki)
else {
return nil
}
maybeFogInfo = fogInfo
} else {
maybeFogInfo = nil
}
self.init(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
fogInfo: maybeFogInfo,
subaddressIndex: subaddressIndex)
}
}
extension External_AccountKey {
init(_ accountKey: AccountKey) {
self.init()
self.viewPrivateKey = External_RistrettoPrivate(accountKey.viewPrivateKey)
self.spendPrivateKey = External_RistrettoPrivate(accountKey.spendPrivateKey)
if let fogInfo = accountKey.fogInfo {
self.fogReportURL = fogInfo.reportUrlString
self.fogReportID = fogInfo.reportId
self.fogAuthoritySpki = fogInfo.authoritySpki
}
}
}
extension AccountKey {
struct FogInfo {
fileprivate static func make(reportUrl: String, reportId: String, authoritySpki: Data)
-> Result<FogInfo, InvalidInputError>
{
FogUrl.make(string: reportUrl).map { reportUrlTyped in
FogInfo(
reportUrlString: reportUrl,
reportUrl: reportUrlTyped,
reportId: reportId,
authoritySpki: authoritySpki)
}
}
let reportUrlString: String
let reportUrl: FogUrl
let reportId: String
let authoritySpki: Data
private init(
reportUrlString: String,
reportUrl: FogUrl,
reportId: String,
authoritySpki: Data
) {
self.reportUrlString = reportUrlString
self.reportUrl = reportUrl
self.reportId = reportId
self.authoritySpki = authoritySpki
}
}
}
extension AccountKey.FogInfo: Equatable {}
extension AccountKey.FogInfo: Hashable {}
struct AccountKeyWithFog {
let accountKey: AccountKey
let fogInfo: AccountKey.FogInfo
init?(accountKey: AccountKey) {
guard let fogInfo = accountKey.fogInfo else {
return nil
}
self.accountKey = accountKey
self.fogInfo = fogInfo
}
}

View File

@ -0,0 +1,232 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable function_parameter_count
import Foundation
import LibMobileCoin
enum AccountKeyUtils {
static func subaddressPrivateKeys(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
subaddressIndex: UInt64
) -> (subaddressViewPrivateKey: RistrettoPrivate, subaddressSpendPrivateKey: RistrettoPrivate) {
var subaddressViewPrivateKeyOut = Data32()
var subaddressSpendPrivateKeyOut = Data32()
viewPrivateKey.asMcBuffer { viewKeyBufferPtr in
spendPrivateKey.asMcBuffer { spendKeyBufferPtr in
subaddressViewPrivateKeyOut.asMcMutableBuffer { viewPrivateKeyOutPtr in
subaddressSpendPrivateKeyOut.asMcMutableBuffer { spendPrivateKeyOutPtr in
withMcInfallible {
mc_account_key_get_subaddress_private_keys(
viewKeyBufferPtr,
spendKeyBufferPtr,
subaddressIndex,
viewPrivateKeyOutPtr,
spendPrivateKeyOutPtr)
}
}
}
}
}
// Safety: It's safe to skip validation because mc_account_key_get_subaddress_private_keys
// should always return valid RistrettoPrivate values on success.
return (RistrettoPrivate(skippingValidation: subaddressViewPrivateKeyOut),
RistrettoPrivate(skippingValidation: subaddressSpendPrivateKeyOut))
}
static func publicAddressPublicKeys(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
subaddressIndex: UInt64
) -> (viewPublicKey: RistrettoPublic, spendPublicKey: RistrettoPublic) {
var viewPublicKeyOut = Data32()
var spendPublicKeyOut = Data32()
viewPrivateKey.asMcBuffer { viewKeyBufferPtr in
spendPrivateKey.asMcBuffer { spendKeyBufferPtr in
viewPublicKeyOut.asMcMutableBuffer { viewPublicKeyOutPtr in
spendPublicKeyOut.asMcMutableBuffer { spendPublicKeyOutPtr in
withMcInfallible {
mc_account_key_get_public_address_public_keys(
viewKeyBufferPtr,
spendKeyBufferPtr,
subaddressIndex,
viewPublicKeyOutPtr,
spendPublicKeyOutPtr)
}
}
}
}
}
// Safety: It's safe to skip validation because
// mc_account_key_get_public_address_public_keys should always return valid RistrettoPublic
// values on success.
return (RistrettoPublic(skippingValidation: viewPublicKeyOut),
RistrettoPublic(skippingValidation: spendPublicKeyOut))
}
static func fogAuthoritySig(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
reportUrl: String,
reportId: String,
authoritySpki: Data,
subaddressIndex: UInt64
) -> Data {
McAccountKey.withUnsafePointer(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
reportUrl: reportUrl,
reportId: reportId,
authoritySpki: authoritySpki
) { accountKeyPtr in
Data(withFixedLengthMcMutableBufferInfallible: McConstants.SCHNORRKEL_SIGNATURE_LEN)
{ bufferPtr in
mc_account_key_get_public_address_fog_authority_sig(
accountKeyPtr,
subaddressIndex,
bufferPtr)
}
}
}
}
extension McAccountKey {
fileprivate static func withUnsafePointer<T>(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
reportUrl: String,
reportId: String,
authoritySpki: Data,
body: (UnsafePointer<McAccountKey>) throws -> T
) rethrows -> T {
try McAccountKeyFogInfo.withUnsafePointer(
reportUrl: reportUrl,
reportId: reportId,
authoritySpki: authoritySpki
) { fogInfoPtr in
try viewPrivateKey.asMcBuffer { viewKeyBufferPtr in
try spendPrivateKey.asMcBuffer { spendKeyBufferPtr in
var publicAddress = McAccountKey(
view_private_key: viewKeyBufferPtr,
spend_private_key: spendKeyBufferPtr,
fog_info: fogInfoPtr)
return try body(&publicAddress)
}
}
}
}
fileprivate static func withUnsafePointer<T>(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
body: (UnsafePointer<McAccountKey>) throws -> T
) rethrows -> T {
try viewPrivateKey.asMcBuffer { viewKeyBufferPtr in
try spendPrivateKey.asMcBuffer { spendKeyBufferPtr in
var publicAddress = McAccountKey(
view_private_key: viewKeyBufferPtr,
spend_private_key: spendKeyBufferPtr,
fog_info: nil)
return try body(&publicAddress)
}
}
}
}
extension AccountKey: CStructWrapper {
typealias CStruct = McAccountKey
func withUnsafeCStructPointer<R>(
_ body: (UnsafePointer<McAccountKey>) throws -> R
) rethrows -> R {
try fogInfo.withUnsafeCStructPointer { fogInfoPtr in
try viewPrivateKey.asMcBuffer { viewKeyBufferPtr in
try spendPrivateKey.asMcBuffer { spendKeyBufferPtr in
var publicAddress = McAccountKey(
view_private_key: viewKeyBufferPtr,
spend_private_key: spendKeyBufferPtr,
fog_info: fogInfoPtr)
return try body(&publicAddress)
}
}
}
}
}
extension McAccountKeyFogInfo {
fileprivate static func withUnsafePointer<T>(
reportUrl: String,
reportId: String,
authoritySpki: Data,
body: (UnsafePointer<McAccountKeyFogInfo>) throws -> T
) rethrows -> T {
try reportUrl.withCString { reportUrlPtr in
try reportId.withCString { reportIdPtr in
try authoritySpki.asMcBuffer { authoritySpkiPtr in
var mcFogInfo = McAccountKeyFogInfo(
report_url: reportUrlPtr,
report_id: reportIdPtr,
authority_fingerprint: authoritySpkiPtr)
return try body(&mcFogInfo)
}
}
}
}
}
extension AccountKey.FogInfo: CStructWrapper {
typealias CStruct = McAccountKeyFogInfo
func withUnsafeCStructPointer<R>(
_ body: (UnsafePointer<McAccountKeyFogInfo>) throws -> R
) rethrows -> R {
try McAccountKeyFogInfo.withUnsafePointer(
reportUrl: reportUrlString,
reportId: reportId,
authoritySpki: authoritySpki,
body: body)
}
}
extension PublicAddress: CStructWrapper {
typealias CStruct = McPublicAddress
func withUnsafeCStructPointer<R>(
_ body: (UnsafePointer<McPublicAddress>) throws -> R
) rethrows -> R {
try viewPublicKey.asMcBuffer { viewKeyBufferPtr in
try spendPublicKey.asMcBuffer { spendKeyBufferPtr in
try fogInfo.withUnsafeCStructPointer { fogInfoPtr in
var publicAddress = McPublicAddress(
view_public_key: viewKeyBufferPtr,
spend_public_key: spendKeyBufferPtr,
fog_info: fogInfoPtr)
return try body(&publicAddress)
}
}
}
}
}
extension PublicAddress.FogInfo: CStructWrapper {
typealias CStruct = McPublicAddressFogInfo
func withUnsafeCStructPointer<R>(
_ body: (UnsafePointer<McPublicAddressFogInfo>) throws -> R
) rethrows -> R {
try reportUrlString.withCString { reportUrlPtr in
try reportId.withCString { reportIdPtr in
try authoritySig.asMcBuffer { authoritySigPtr in
var mcFogInfo = McPublicAddressFogInfo(
report_url: reportUrlPtr,
report_id: reportIdPtr,
authority_sig: authoritySigPtr)
return try body(&mcFogInfo)
}
}
}
}
}

View File

@ -0,0 +1,108 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct Balance {
public let amountPicoMobLow: UInt64
public let amountPicoMobHigh: UInt8
let blockCount: UInt64
init(values: [UInt64], blockCount: UInt64) {
var amountLow: UInt64 = 0
var amountHigh: UInt8 = 0
for value in values {
let (partialValue, overflow) = amountLow.addingReportingOverflow(value)
amountLow = partialValue
if overflow {
amountHigh += 1
}
}
self.init(amountLow: amountLow, amountHigh: amountHigh, blockCount: blockCount)
}
init(amountLow: UInt64, amountHigh: UInt8, blockCount: UInt64) {
self.amountPicoMobLow = amountLow
self.amountPicoMobHigh = amountHigh
self.blockCount = blockCount
}
/// - Returns: `nil` when the amount is too large to fit in a `UInt64`.
public func amountPicoMob() -> UInt64? {
guard amountPicoMobHigh == 0 else {
return nil
}
return amountPicoMobLow
}
/// Convenience accessor for balance value. `mobInt` is the integer part of the value when
/// represented in MOB. `picoFrac` is the fractional part of the value when represented in MOB.
/// However, rather than reprenting the fractional part as a decimal fraction, it is represented
/// in picoMOB, thus allowing both parts to be integer values.
///
/// The purpose of this representation is to facilitate presenting the balance to the user in
/// MOB form.
///
/// To illustrate, given an amount in the form of XXXXXXXXX.YYYYYYYYYYYY MOB,
/// - `mobInt`: XXXXXXXXX (denominated in MOB)
/// - `picoFrac`: YYYYYYYYYYYY (denominated in picoMOB)
///
/// It is necessary to break apart the values into 2 parts because the total max possible
/// balance is too large to fit in a single `UInt64`, when denominated in picoMOB, assuming 250
/// million MOB in circulation and assuming a base unit of 1 picoMOB as the smallest indivisible
/// unit of MOB.
public var amountMobParts: (mobInt: UInt32, picoFrac: UInt64) {
// amount (picoMOB) = amountLow + amountHigh * 2^64
//
// amountLowMobDec = amountLow / 10^12
// amountHighMobDec = amountHigh * 2^64 / 10^12
//
// amountMobDec = amountLowMobDec + amountHighMobDec
//
// amountLowMobInt = floor(amountLow / 10^12)
// amountLowPicoFrac = amountLow % 10^12
// amountHighMobInt = floor((amountHigh * 2^64) / 10^12)
// = floor((amountHigh << 52) / 5^12)
// amountHighPicoFrac = (amountHigh * 2^64) % 10^12
// = ((amountHigh << 52) % 5^12) << 12
//
// amountPicoFracCarry = floor((amountLowPicoFrac + amountHighPicoFrac) / 10^12)
//
// amountMobInt = amountLowMobInt + amountHighMobInt + amountPicoFracCarry
// amountPicoFrac = (amountLowPicoFrac + amountHighPicoFrac) % 10^12
let (amountLowMobInt, amountLowPicoFrac) = { () -> (UInt32, UInt64) in
// 10^12 = 1_000_000_000_000
let mobParts = amountPicoMobLow.quotientAndRemainder(dividingBy: 1_000_000_000_000)
return (UInt32(mobParts.quotient), mobParts.remainder)
}()
let (amountHighMobInt, amountHighPicoFrac) = { () -> (UInt32, UInt64) in
// Intermediary = base of 5^-12 MOB
let amountHighIntermediary = UInt64(amountPicoMobHigh) << 52
// 5^12 = 244_140_625
let mobParts = amountHighIntermediary.quotientAndRemainder(dividingBy: 244_140_625)
return (UInt32(mobParts.quotient), mobParts.remainder << 12)
}()
let amountPicoFracParts = (amountLowPicoFrac + amountHighPicoFrac).quotientAndRemainder(
dividingBy: 1_000_000_000_000)
let amountMobInt = amountLowMobInt + amountHighMobInt + UInt32(amountPicoFracParts.quotient)
let amountPicoFrac = amountPicoFracParts.remainder
return (amountMobInt, amountPicoFrac)
}
}
extension Balance: Equatable {}
extension Balance: Hashable {}
extension Balance: CustomStringConvertible {
public var description: String {
let amountMob = amountMobParts
return String(format: "%u.%012llu MOB", amountMob.mobInt, amountMob.picoFrac)
}
}

View File

@ -0,0 +1,36 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct OwnedTxOut {
let publicKeyTyped: RistrettoPublic
/// - Returns: `TxOut` public key
public var publicKey: Data { publicKeyTyped.data }
public let value: UInt64
let keyImageTyped: KeyImage
/// - Returns: `TxOut` key image
public var keyImage: Data { keyImageTyped.data }
public let receivedBlock: BlockMetadata
public let spentBlock: BlockMetadata?
init(
_ knownTxOut: KnownTxOut,
receivedBlock: BlockMetadata,
spentBlock: BlockMetadata?
) {
self.publicKeyTyped = knownTxOut.publicKey
self.value = knownTxOut.value
self.keyImageTyped = knownTxOut.keyImage
self.receivedBlock = receivedBlock
self.spentBlock = spentBlock
}
}
extension OwnedTxOut: Equatable {}
extension OwnedTxOut: Hashable {}

View File

@ -0,0 +1,197 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
public struct PublicAddress {
static func make(
viewPublicKey: RistrettoPublic,
spendPublicKey: RistrettoPublic,
fogReportUrl: String,
fogReportId: String,
fogAuthoritySig: Data
) -> Result<PublicAddress, InvalidInputError> {
FogInfo.make(
reportUrl: fogReportUrl,
reportId: fogReportId,
authoritySig: fogAuthoritySig)
.map { fogInfo in
PublicAddress(
viewPublicKey: viewPublicKey,
spendPublicKey: spendPublicKey,
fogInfo: fogInfo)
}
}
let viewPublicKeyTyped: RistrettoPublic
let spendPublicKeyTyped: RistrettoPublic
let fogInfo: FogInfo?
init(viewPublicKey: RistrettoPublic, spendPublicKey: RistrettoPublic, fogInfo: FogInfo? = nil) {
self.viewPublicKeyTyped = viewPublicKey
self.spendPublicKeyTyped = spendPublicKey
self.fogInfo = fogInfo
}
/// - Returns: `nil` when the input is not deserializable.
public init?(serializedData: Data) {
guard let proto = try? External_PublicAddress(serializedData: serializedData) else {
logger.warning("External_PublicAddress deserialization failed. serializedData: " +
"\(redacting: serializedData.base64EncodedString())")
return nil
}
self.init(proto)
}
public var serializedData: Data {
let proto = External_PublicAddress(self)
return proto.serializedDataInfallible
}
/// Subaddress view public key, `C`, in bytes.
public var viewPublicKey: Data { viewPublicKeyTyped.data }
/// Subaddress spend public key, `D`, in bytes.
public var spendPublicKey: Data { spendPublicKeyTyped.data }
public var fogReportUrlString: String? { fogInfo?.reportUrlString }
var fogReportUrl: FogUrl? { fogInfo?.reportUrl }
var fogReportId: String? { fogInfo?.reportId }
var fogAuthoritySig: Data? { fogInfo?.authoritySig }
}
extension PublicAddress: Equatable {}
extension PublicAddress: Hashable {}
extension PublicAddress: CustomRedactingStringConvertible {
var redactingDescription: String {
"PublicAddress(\(Base58Coder.encode(self)))"
}
}
extension PublicAddress {
init(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
accountKeyFogInfo: AccountKey.FogInfo? = nil,
subaddressIndex: UInt64 = McConstants.DEFAULT_SUBADDRESS_INDEX
) {
let (viewPublicKey, spendPublicKey) = AccountKeyUtils.publicAddressPublicKeys(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
subaddressIndex: subaddressIndex)
let fogInfo: FogInfo?
if let accountKeyFogInfo = accountKeyFogInfo {
fogInfo = FogInfo(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
accountKeyFogInfo: accountKeyFogInfo,
subaddressIndex: subaddressIndex)
} else {
fogInfo = nil
}
self.init(viewPublicKey: viewPublicKey, spendPublicKey: spendPublicKey, fogInfo: fogInfo)
}
}
extension PublicAddress {
init?(_ publicAddress: External_PublicAddress) {
guard let viewPublicKey = RistrettoPublic(publicAddress.viewPublicKey),
let spendPublicKey = RistrettoPublic(publicAddress.spendPublicKey)
else {
return nil
}
let fogInfo: FogInfo?
if !publicAddress.fogReportURL.isEmpty {
guard case .success(let maybeFogInfo) = FogInfo.make(
reportUrl: publicAddress.fogReportURL,
reportId: publicAddress.fogReportID,
authoritySig: publicAddress.fogAuthoritySig)
else {
return nil
}
fogInfo = maybeFogInfo
} else {
fogInfo = nil
}
self.init(viewPublicKey: viewPublicKey, spendPublicKey: spendPublicKey, fogInfo: fogInfo)
}
}
extension External_PublicAddress {
init(_ publicAddress: PublicAddress) {
self.init()
self.viewPublicKey = External_CompressedRistretto(publicAddress.viewPublicKey)
self.spendPublicKey = External_CompressedRistretto(publicAddress.spendPublicKey)
if let fogInfo = publicAddress.fogInfo {
self.fogReportURL = fogInfo.reportUrlString
self.fogReportID = fogInfo.reportId
self.fogAuthoritySig = fogInfo.authoritySig
}
}
}
extension PublicAddress {
struct FogInfo {
fileprivate static func make(reportUrl: String, reportId: String, authoritySig: Data)
-> Result<FogInfo, InvalidInputError>
{
FogUrl.make(string: reportUrl).map { reportUrlTyped in
FogInfo(
reportUrlString: reportUrl,
reportUrl: reportUrlTyped,
reportId: reportId,
authoritySig: authoritySig)
}
}
let reportUrlString: String
let reportUrl: FogUrl
let reportId: String
let authoritySig: Data
private init(
reportUrlString: String,
reportUrl: FogUrl,
reportId: String,
authoritySig: Data
) {
self.reportUrlString = reportUrlString
self.reportUrl = reportUrl
self.reportId = reportId
self.authoritySig = authoritySig
}
}
}
extension PublicAddress.FogInfo: Equatable {}
extension PublicAddress.FogInfo: Hashable {}
extension PublicAddress.FogInfo {
fileprivate init(
viewPrivateKey: RistrettoPrivate,
spendPrivateKey: RistrettoPrivate,
accountKeyFogInfo: AccountKey.FogInfo,
subaddressIndex: UInt64 = McConstants.DEFAULT_SUBADDRESS_INDEX
) {
let authoritySig = AccountKeyUtils.fogAuthoritySig(
viewPrivateKey: viewPrivateKey,
spendPrivateKey: spendPrivateKey,
reportUrl: accountKeyFogInfo.reportUrlString,
reportId: accountKeyFogInfo.reportId,
authoritySpki: accountKeyFogInfo.authoritySpki,
subaddressIndex: subaddressIndex)
self.init(
reportUrlString: accountKeyFogInfo.reportUrlString,
reportUrl: accountKeyFogInfo.reportUrl,
reportId: accountKeyFogInfo.reportId,
authoritySig: authoritySig)
}
}

View File

@ -0,0 +1,9 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
protocol CustomRedactingStringConvertible {
var redactingDescription: String { get }
}

208
Sources/Common/Errors.swift Normal file
View File

@ -0,0 +1,208 @@
// swiftlint:disable:this file_name
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public struct InvalidInputError: Error {
let reason: String
init(_ reason: String) {
self.reason = reason
}
}
extension InvalidInputError: CustomStringConvertible {
public var description: String {
"Invalid input: \(reason)"
}
}
public enum ConnectionError: Error {
case connectionFailure(String)
case authorizationFailure(String)
case invalidServerResponse(String)
case attestationVerificationFailed(String)
case outdatedClient(String)
case serverRateLimited(String)
}
extension ConnectionError: CustomStringConvertible {
public var description: String {
"Connection error: " + {
switch self {
case .connectionFailure(let reason):
return "Connection failure: \(reason)"
case .authorizationFailure(let reason):
return "Authorization failure: \(reason)"
case .invalidServerResponse(let reason):
return "Invalid server response: \(reason)"
case .attestationVerificationFailed(let reason):
return "Attestation verification failed: \(reason)"
case .outdatedClient(let reason):
return "Outdated client: \(reason)"
case .serverRateLimited(let reason):
return "Server rate limited: \(reason)"
}
}()
}
}
public enum BalanceTransferEstimationFetcherError: Error {
case feeExceedsBalance(String = String())
case balanceOverflow(String = String())
case connectionError(ConnectionError)
}
extension BalanceTransferEstimationFetcherError: CustomStringConvertible {
public var description: String {
"Balance transfer estimation error: " + {
switch self {
case .feeExceedsBalance(let reason):
return "Fee exceeds balance\(!reason.isEmpty ? ": \(reason)" : "")"
case .balanceOverflow(let reason):
return "Balance overflow\(!reason.isEmpty ? ": \(reason)" : "")"
case .connectionError(let innerError):
return "\(innerError)"
}
}()
}
}
public enum TransactionEstimationFetcherError: Error {
case invalidInput(String)
case insufficientBalance(String = String())
case connectionError(ConnectionError)
}
extension TransactionEstimationFetcherError: CustomStringConvertible {
public var description: String {
"Transaction estimation error: " + {
switch self {
case .invalidInput(let reason):
return "Invalid input: \(reason)"
case .insufficientBalance(let reason):
return "Insufficient balance\(!reason.isEmpty ? ": \(reason)" : "")"
case .connectionError(let innerError):
return "\(innerError)"
}
}()
}
}
public enum TransactionPreparationError: Error {
case invalidInput(String)
case insufficientBalance(String = String())
case defragmentationRequired(String = String())
case connectionError(ConnectionError)
}
extension TransactionPreparationError: CustomStringConvertible {
public var description: String {
"Transaction preparation error: " + {
switch self {
case .invalidInput(let reason):
return "Invalid input: \(reason)"
case .insufficientBalance(let reason):
return "Insufficient balance\(!reason.isEmpty ? ": \(reason)" : "")"
case .defragmentationRequired(let reason):
return "Defragmentation required\(!reason.isEmpty ? ": \(reason)" : "")"
case .connectionError(let innerError):
return "\(innerError)"
}
}()
}
}
public enum DefragTransactionPreparationError: Error {
case invalidInput(String)
case insufficientBalance(String = String())
case connectionError(ConnectionError)
}
extension DefragTransactionPreparationError: CustomStringConvertible {
public var description: String {
"Defragmentation transaction preparation error: " + {
switch self {
case .invalidInput(let reason):
return "Invalid input: \(reason)"
case .insufficientBalance(let reason):
return "Insufficient balance\(!reason.isEmpty ? ": \(reason)" : "")"
case .connectionError(let innerError):
return "\(innerError)"
}
}()
}
}
public enum TransactionSubmissionError: Error {
case connectionError(ConnectionError)
case invalidTransaction(String = String())
case feeError(String = String())
case tombstoneBlockTooFar(String = String())
case missingMemo(String = String())
case inputsAlreadySpent(String = String())
}
extension TransactionSubmissionError: CustomStringConvertible {
public var description: String {
"Transaction submission error: " + {
switch self {
case .connectionError(let connectionError):
return "\(connectionError)"
case .missingMemo(let reason):
return "Missing memo error\(!reason.isEmpty ? ": \(reason)" : "")"
case .feeError(let reason):
return "Fee error\(!reason.isEmpty ? ": \(reason)" : "")"
case .invalidTransaction(let reason):
return "Invalid transaction\(!reason.isEmpty ? ": \(reason)" : "")"
case .tombstoneBlockTooFar(let reason):
return "Tombstone block too far\(!reason.isEmpty ? ": \(reason)" : "")"
case .inputsAlreadySpent(let reason):
return "Inputs already spent\(!reason.isEmpty ? ": \(reason)" : "")"
}
}()
}
}
@available(*, deprecated)
public enum BalanceTransferEstimationError: Error {
case feeExceedsBalance(String = String())
case balanceOverflow(String = String())
}
@available(*, deprecated)
extension BalanceTransferEstimationError: CustomStringConvertible {
public var description: String {
"Balance transfer estimation error: " + {
switch self {
case .feeExceedsBalance(let reason):
return "Fee exceeds balance\(!reason.isEmpty ? ": \(reason)" : "")"
case .balanceOverflow(let reason):
return "Balance overflow\(!reason.isEmpty ? ": \(reason)" : "")"
}
}()
}
}
@available(*, deprecated)
public enum TransactionEstimationError: Error {
case invalidInput(String)
case insufficientBalance(String = String())
}
@available(*, deprecated)
extension TransactionEstimationError: CustomStringConvertible {
public var description: String {
"Transaction estimation error: " + {
switch self {
case .invalidInput(let reason):
return "Invalid input: \(reason)"
case .insufficientBalance(let reason):
return "Insufficient balance\(!reason.isEmpty ? ": \(reason)" : "")"
}
}()
}
}

View File

@ -0,0 +1,497 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable function_parameter_count prefixed_toplevel_constant
import Logging
public enum MobileCoinLogging {
public static var logSensitiveData = false {
willSet {
guard logSensitiveDataInternal.set(newValue) else {
logger.preconditionFailure(
"logSensitiveData can only be set prior to using the MobileCoin SDK.")
}
}
}
}
internal let logger = Logger(label: "com.mobilecoin", factory: ContextPrefixLogHandler.init)
private struct ContextPrefixLogHandler: LogHandler {
static let ENABLE_LOG_FUNCTION_METADATA_KEY = "LOG_FUNCTION_METADATA_KEY"
private var logger: Logger
subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? {
get { logger[metadataKey: metadataKey] }
set { logger[metadataKey: metadataKey] = newValue }
}
init(label: String) {
self.logger = Logger(label: label)
}
// `metadata` isn't currently accessible via `logger`, so there's not much we can do.
// Fortunately, it's not accessed by `Logger` either, so we're just going to ignore it.
var metadata: Logger.Metadata {
get { [:] }
set { _ = newValue }
}
var logLevel: Logger.Level {
get { logger.logLevel }
set { logger.logLevel = newValue }
}
func log(
level: Logger.Level,
message: Logger.Message,
metadata: Logger.Metadata?,
source: String,
file: String,
function: String,
line: UInt
) {
var (message, metadata) = (message, metadata)
// Remove log function metadata entry and add file/line/function name if it was enabled.
if metadata?
.removeValue(forKey: ContextPrefixLogHandler.ENABLE_LOG_FUNCTION_METADATA_KEY) != nil
{
let filename = URL(fileURLWithPath: file, isDirectory: false).lastPathComponent
message = "\(filename):\(line):\(function) - \(message)"
}
logger.log(
level: level,
message,
metadata: metadata,
source: source,
file: file,
function: function,
line: line)
}
}
// The value of `logSensitiveDataInternal` gets locked in place upon first read.
private let logSensitiveDataInternal = ImmutableOnceReadLock(false)
extension Logger {
func assert(
_ condition: @autoclosure () -> Bool,
_ message: @autoclosure () -> String = String(),
file: StaticString = #file,
function: String = #function,
line: UInt = #line
) {
if condition() {
assertionFailure(message(), file: file, function: function, line: line)
}
}
func precondition(
_ condition: @autoclosure () -> Bool,
_ message: @autoclosure () -> String = String(),
file: StaticString = #file,
function: String = #function,
line: UInt = #line
) {
if condition() {
preconditionFailure(message(), file: file, function: function, line: line)
}
}
func assertionFailure(
_ message: @autoclosure () -> String = String(),
file: StaticString = #file,
function: String = #function,
line: UInt = #line
) {
let message = message()
error("\(message)", file: "\(file)", function: function, line: line)
Swift.assertionFailure(message, file: file, line: line)
}
func preconditionFailure(
_ message: @autoclosure () -> String = String(),
file: StaticString = #file,
function: String = #function,
line: UInt = #line
) -> Never {
let message = message()
critical("\(message)", file: "\(file)", function: function, line: line)
return Swift.preconditionFailure(message, file: file, line: line)
}
func fatalError(
_ message: @autoclosure () -> String = String(),
file: StaticString = #file,
function: String = #function,
line: UInt = #line
) -> Never {
let message = message()
critical("\(message)", file: "\(file)", function: function, line: line)
return Swift.fatalError(message, file: file, line: line)
}
}
extension Logger {
func trace(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
trace(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
func debug(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
debug(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
func info(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
info(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
func notice(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
notice(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
func warning(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
warning(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
func error(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
error(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
func critical(
_ message: @autoclosure () -> Logger.Message,
metadata: @autoclosure () -> Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
guard !sensitive || logSensitiveDataInternal.get() else { return }
let metadata = logFunction ? { Self.addingLogFunctionKey(metadata()) } : metadata
critical(
message(),
metadata: metadata(),
source: source(),
file: file,
function: function,
line: line)
}
private static func addingLogFunctionKey(_ metadata: Logger.Metadata?) -> Logger.Metadata {
var metadata = metadata ?? Logger.Metadata()
metadata[ContextPrefixLogHandler.ENABLE_LOG_FUNCTION_METADATA_KEY] = "1"
return metadata
}
}
extension Logger {
func trace(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
trace(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
func debug(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
debug(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
func info(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
info(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
func notice(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
notice(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
func warning(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
warning(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
func error(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
error(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
func critical(
_ message: @autoclosure () -> String,
metadata: @autoclosure () -> Logging.Logger.Metadata? = nil,
source: @autoclosure () -> String? = nil,
sensitive: Bool = false,
logFunction: Bool = true,
file: String = #file,
function: String = #function,
line: UInt = #line
) {
critical(
Message(stringLiteral: message()),
metadata: metadata(),
source: source(),
sensitive: sensitive,
logFunction: logFunction,
file: file,
function: function,
line: line)
}
}
extension DefaultStringInterpolation {
mutating func appendInterpolation<T>(redacting value: T)
where T: CustomStringConvertible & TextOutputStreamable
{
if logSensitiveDataInternal.get() {
appendInterpolation(value)
} else {
appendInterpolation("<redacted>")
}
}
mutating func appendInterpolation<T: TextOutputStreamable>(redacting value: T) {
if logSensitiveDataInternal.get() {
appendInterpolation(value)
} else {
appendInterpolation("<redacted>")
}
}
mutating func appendInterpolation<T: CustomStringConvertible>(redacting value: T) {
if logSensitiveDataInternal.get() {
appendInterpolation(value)
} else {
appendInterpolation("<redacted>")
}
}
mutating func appendInterpolation<T>(redacting value: T) {
if logSensitiveDataInternal.get() {
appendInterpolation(value)
} else {
appendInterpolation("<redacted>")
}
}
mutating func appendInterpolation(redacting value: Any.Type) {
if logSensitiveDataInternal.get() {
appendInterpolation(value)
} else {
appendInterpolation("<redacted>")
}
}
mutating func appendInterpolation<T: CustomRedactingStringConvertible>(redacting value: T) {
appendInterpolation(value.redactingDescription)
}
}

View File

@ -0,0 +1,28 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
enum CryptoUtils {
static func ristrettoPrivateValidate(_ bytes: Data) -> Bool {
bytes.asMcBuffer { bytesPtr in
var valid = false
withMcInfallible {
mc_ristretto_private_validate(bytesPtr, &valid)
}
return valid
}
}
static func ristrettoPublicValidate(_ bytes: Data) -> Bool {
bytes.asMcBuffer { bytesPtr in
var valid = false
withMcInfallible {
mc_ristretto_public_validate(bytesPtr, &valid)
}
return valid
}
}
}

View File

@ -0,0 +1,47 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
struct RistrettoPrivate {
let data32: Data32
init?(_ data: Data32) {
guard CryptoUtils.ristrettoPrivateValidate(data.data) else {
return nil
}
self.data32 = data
}
init(skippingValidation data: Data32) {
self.data32 = data
}
}
extension RistrettoPrivate: DataConvertibleImpl {
typealias Iterator = Data.Iterator
init?(_ data: Data) {
guard let data32 = Data32(data.data) else {
return nil
}
self.init(data32)
}
var data: Data { data32.data }
}
extension RistrettoPrivate {
init?(_ ristrettoPrivate: External_RistrettoPrivate) {
self.init(ristrettoPrivate.data)
}
}
extension External_RistrettoPrivate {
init(_ ristrettoPrivate: RistrettoPrivate) {
self.init()
self.data = ristrettoPrivate.data
}
}

View File

@ -0,0 +1,47 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
struct RistrettoPublic {
let data32: Data32
init?(_ data: Data32) {
guard CryptoUtils.ristrettoPublicValidate(data.data) else {
return nil
}
self.data32 = data
}
init(skippingValidation data: Data32) {
self.data32 = data
}
}
extension RistrettoPublic: DataConvertibleImpl {
typealias Iterator = Data.Iterator
init?(_ data: Data) {
guard let data32 = Data32(data.data) else {
return nil
}
self.init(data32)
}
var data: Data { data32.data }
}
extension RistrettoPublic {
init?(_ ristrettoPublic: External_CompressedRistretto) {
self.init(ristrettoPublic.data)
}
}
extension External_CompressedRistretto {
init(_ ristrettoPublic: RistrettoPublic) {
self.init()
self.data = ristrettoPublic.data
}
}

View File

@ -0,0 +1,88 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_function_chains
import Foundation
import LibMobileCoin
enum VersionedCryptoBoxError: Error {
case invalidInput(String)
case unsupportedVersion(String)
}
extension VersionedCryptoBoxError: CustomStringConvertible {
var description: String {
"Versioned CryptoBox error: " + {
switch self {
case .invalidInput(let reason):
return "Invalid input: \(reason)"
case .unsupportedVersion(let reason):
return "Unsupported version: \(reason)"
}
}()
}
}
enum VersionedCryptoBox {
static func encrypt(
plaintext: Data,
publicKey: RistrettoPublic,
rng: (@convention(c) (UnsafeMutableRawPointer?) -> UInt64)?,
rngContext: Any?
) -> Result<Data, InvalidInputError> {
publicKey.asMcBuffer { viewPublicKeyPtr in
plaintext.asMcBuffer { plaintextPtr in
withMcRngCallback(rng: rng, rngContext: rngContext) { rngCallbackPtr in
Data.make(withMcMutableBuffer: { bufferPtr, errorPtr in
mc_versioned_crypto_box_encrypt(
viewPublicKeyPtr,
plaintextPtr,
rngCallbackPtr,
bufferPtr,
&errorPtr)
}).mapError {
switch $0.errorCode {
case .aead:
return InvalidInputError("\(redacting: $0.description)")
default:
// Safety: mc_versioned_crypto_box_encrypt should not throw
// non-documented errors.
logger.fatalError("Unhandled LibMobileCoin error: \(redacting: $0)")
}
}
}
}
}
}
static func decrypt(
ciphertext: Data,
privateKey: RistrettoPrivate
) -> Result<Data, VersionedCryptoBoxError> {
privateKey.asMcBuffer { privateKeyPtr in
ciphertext.asMcBuffer { ciphertextPtr in
Data.make(withEstimatedLengthMcMutableBuffer: ciphertext.count)
{ bufferPtr, errorPtr in
mc_versioned_crypto_box_decrypt(
privateKeyPtr,
ciphertextPtr,
bufferPtr,
&errorPtr)
}.mapError {
switch $0.errorCode {
case .aead, .invalidInput:
return .invalidInput("\(redacting: $0.description)")
case .unsupportedCryptoBoxVersion:
return .unsupportedVersion("\(redacting: $0.description)")
default:
// Safety: mc_versioned_crypto_box_decrypt should not throw non-documented
// errors.
logger.fatalError("Unhandled LibMobileCoin error: \(redacting: $0)")
}
}
}
}
}
}

View File

@ -0,0 +1,59 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
public enum Base58DecodingResult {
case publicAddress(PublicAddress)
case paymentRequest(PaymentRequest)
case transferPayload(TransferPayload)
}
public enum Base58Coder {
public static func encode(_ publicAddress: PublicAddress) -> String {
var wrapper = Printable_PrintableWrapper()
wrapper.publicAddress = External_PublicAddress(publicAddress)
return wrapper.base58EncodedString()
}
public static func encode(_ paymentRequest: PaymentRequest) -> String {
var wrapper = Printable_PrintableWrapper()
wrapper.paymentRequest = Printable_PaymentRequest(paymentRequest)
return wrapper.base58EncodedString()
}
public static func encode(_ transferPayload: TransferPayload) -> String {
var wrapper = Printable_PrintableWrapper()
wrapper.transferPayload = Printable_TransferPayload(transferPayload)
return wrapper.base58EncodedString()
}
/// - Returns: `nil` when the input is not decodable.
public static func decode(_ base58String: String) -> Base58DecodingResult? {
guard let wrapper = Printable_PrintableWrapper(base58Encoded: base58String) else {
return nil
}
switch wrapper.wrapper {
case .publicAddress(let publicAddress):
guard let publicAddress = PublicAddress(publicAddress) else {
return nil
}
return .publicAddress(publicAddress)
case .paymentRequest(let paymentRequest):
guard let paymentRequest = PaymentRequest(paymentRequest) else {
return nil
}
return .paymentRequest(paymentRequest)
case .transferPayload(let transferPayload):
guard let transferPayload = TransferPayload(transferPayload) else {
return nil
}
return .transferPayload(transferPayload)
case .none:
return nil
}
}
}

View File

@ -0,0 +1,142 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
public enum MobUri {
public enum Payload {
case publicAddress(PublicAddress)
case paymentRequest(PaymentRequest)
case transferPayload(TransferPayload)
}
public static func decode(uri uriString: String) -> Result<Payload, InvalidInputError> {
guard let uri = URL(string: uriString) else {
logger.info("Could not parse MobURI as URL: \(redacting: uriString)")
return .failure(
InvalidInputError("Could not parse MobUri as URL: \(redacting: uriString)"))
}
guard let scheme = uri.scheme else {
logger.info("MobUri scheme cannot be empty.")
return .failure(InvalidInputError("MobUri scheme cannot be empty."))
}
guard scheme == McConstants.MOB_URI_SCHEME else {
logger.info(
"MobUri scheme must be \"\(McConstants.MOB_URI_SCHEME)\". Found: \(scheme)")
return .failure(InvalidInputError(
"MobUri scheme must be \"\(McConstants.MOB_URI_SCHEME)\". Found: \(scheme)"))
}
return Payload.make(pathComponents: uri.pathComponents)
}
public static func encode(_ publicAddress: PublicAddress) -> String {
encode(.publicAddress(publicAddress))
}
public static func encode(_ paymentRequest: PaymentRequest) -> String {
encode(.paymentRequest(paymentRequest))
}
public static func encode(_ transferPayload: TransferPayload) -> String {
encode(.transferPayload(transferPayload))
}
static func encode(_ payload: Payload) -> String {
"\(McConstants.MOB_URI_SCHEME)://\(payload.uriPath)"
}
}
extension MobUri.Payload {
static func make(pathComponents: [String]) -> Result<MobUri.Payload, InvalidInputError> {
// Foundation.URL returns "/" as the first value in pathComponents, so we normalize by
// removing it.
guard let firstComponent = pathComponents.first else {
return .failure(InvalidInputError("MobUri must have a path."))
}
guard firstComponent == "/" else {
return .failure(InvalidInputError("MobUri must have an absolute path."))
}
let pathComponents = Array(pathComponents.dropFirst())
guard pathComponents.count >= 2 else {
return .failure(InvalidInputError("MobUri must have at least 2 path components."))
}
let payloadTypeString = pathComponents[0]
guard let payloadType = PayloadType(payloadTypeString) else {
return .failure(InvalidInputError(
"MobUri contains unrecognized payload type: \(payloadTypeString)"))
}
switch payloadType {
case .b58:
let payloadString = pathComponents[1]
guard let decodingResult = Base58Coder.decode(payloadString) else {
return .failure(InvalidInputError(
"MobUri payload base-58 decoding failed. Payload: \(redacting: payloadString)"))
}
return .success(MobUri.Payload(decodingResult))
}
}
init(_ base58DecodingResult: Base58DecodingResult) {
switch base58DecodingResult {
case .publicAddress(let publicAddress):
self = .publicAddress(publicAddress)
case .paymentRequest(let paymentRequest):
self = .paymentRequest(paymentRequest)
case .transferPayload(let transferPayload):
self = .transferPayload(transferPayload)
}
}
var payloadType: PayloadType {
switch self {
case .publicAddress, .paymentRequest, .transferPayload:
return .b58
}
}
var payloadString: String {
switch self {
case .publicAddress(let publicAddress):
return Base58Coder.encode(publicAddress)
case .paymentRequest(let paymentRequest):
return Base58Coder.encode(paymentRequest)
case .transferPayload(let transferPayload):
return Base58Coder.encode(transferPayload)
}
}
var uriPath: String {
"/\(payloadType)/\(payloadString)"
}
}
extension MobUri.Payload {
enum PayloadType {
case b58
init?(_ string: String) {
switch string {
case "b58":
self = .b58
default:
return nil
}
}
}
}
extension MobUri.Payload.PayloadType: CustomStringConvertible {
var description: String {
switch self {
case .b58:
return "b58"
}
}
}

View File

@ -0,0 +1,59 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
public struct PaymentRequest {
public let publicAddress: PublicAddress
public let value: UInt64?
public let memo: String?
/// # Notes:
/// * Providing a `value` of `0` is the same as passing `nil`, meaning no value is specified.
/// * Providing an empty string for `memo` is the same as passing `nil`, meaning no memo is
/// specified.
public init(publicAddress: PublicAddress, value: UInt64? = nil, memo: String? = nil) {
self.publicAddress = publicAddress
if let value = value, value != 0 {
self.value = value
} else {
self.value = nil
}
if let memo = memo, !memo.isEmpty {
self.memo = memo
} else {
self.memo = nil
}
}
}
extension PaymentRequest: Equatable {}
extension PaymentRequest: Hashable {}
extension PaymentRequest {
init?(_ paymentRequest: Printable_PaymentRequest) {
guard let publicAddress = PublicAddress(paymentRequest.publicAddress) else {
return nil
}
self.publicAddress = publicAddress
self.value = paymentRequest.value != 0 ? paymentRequest.value : nil
self.memo = !paymentRequest.memo.isEmpty ? paymentRequest.memo : nil
}
}
extension Printable_PaymentRequest {
init(_ paymentRequest: PaymentRequest) {
self.init()
self.publicAddress = External_PublicAddress(paymentRequest.publicAddress)
if let value = paymentRequest.value {
self.value = value
}
if let memo = paymentRequest.memo {
self.memo = memo
}
}
}

View File

@ -0,0 +1,37 @@
// swiftlint:disable:this file_name
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
extension Printable_PrintableWrapper {
init?(base58Encoded base58String: String) {
guard case .success(let decodedData) =
Data.make(withMcMutableBuffer: { bufferPtr, errorPtr in
mc_printable_wrapper_b58_decode(base58String, bufferPtr, &errorPtr)
})
else {
logger.warning("PrintableWrapper base-58 decoding failed.")
return nil
}
guard let printableWrapper = try? Self(serializedData: decodedData) else {
logger.warning("Printable_PrintableWrapper deserialization failed.")
return nil
}
self = printableWrapper
}
func base58EncodedString() -> String {
let serialized = serializedDataInfallible
return serialized.asMcBuffer { bufferPtr in
String(mcString: withMcInfallibleReturningOptional {
mc_printable_wrapper_b58_encode(bufferPtr)
})
}
}
}

View File

@ -0,0 +1,49 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
public struct TransferPayload {
let rootEntropy32: Data32
let txOutPublicKey: RistrettoPublic
public let memo: String?
init(rootEntropy: Data32, txOutPublicKey: RistrettoPublic, memo: String? = nil) {
self.rootEntropy32 = rootEntropy
self.txOutPublicKey = txOutPublicKey
self.memo = memo?.isEmpty == false ? memo : nil
}
public var rootEntropy: Data {
rootEntropy32.data
}
}
extension TransferPayload: Equatable {}
extension TransferPayload: Hashable {}
extension TransferPayload {
init?(_ transferPayload: Printable_TransferPayload) {
guard let rootEntropy = Data32(transferPayload.rootEntropy),
let txOutPublicKey = RistrettoPublic(transferPayload.txOutPublicKey.data)
else {
return nil
}
self.rootEntropy32 = rootEntropy
self.txOutPublicKey = txOutPublicKey
self.memo = !transferPayload.memo.isEmpty ? transferPayload.memo : nil
}
}
extension Printable_TransferPayload {
init(_ transferPayload: TransferPayload) {
self.init()
self.rootEntropy = transferPayload.rootEntropy
self.txOutPublicKey = External_CompressedRistretto(transferPayload.txOutPublicKey)
if let memo = transferPayload.memo {
self.memo = memo
}
}
}

View File

@ -0,0 +1,113 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_arguments multiline_function_chains
import Foundation
import LibMobileCoin
struct FogKeyImageChecker {
private let serialQueue: DispatchQueue
private let fogKeyImageService: FogKeyImageService
init(fogKeyImageService: FogKeyImageService, targetQueue: DispatchQueue?) {
self.serialQueue = DispatchQueue(label: "com.mobilecoin.\(Self.self)", target: targetQueue)
self.fogKeyImageService = fogKeyImageService
}
func checkKeyImage(
keyImage: KeyImage,
nextKeyImageQueryBlockIndex: UInt64 = 0,
completion: @escaping (Result<KeyImage.SpentStatus, ConnectionError>) -> Void
) {
checkKeyImages(
keyImageQueries: [(keyImage, nextKeyImageQueryBlockIndex: nextKeyImageQueryBlockIndex)]
) {
completion($0.flatMap { statuses in
guard let keyImageStatus = statuses.first else {
return .failure(.invalidServerResponse(
"CheckKeyImage failed to return results: \(statuses)"))
}
return .success(keyImageStatus)
})
}
}
func checkKeyImages(
keyImageQueries: [KeyImage],
maxKeyImagesPerQuery: Int,
completion: @escaping (Result<[KeyImage.SpentStatus], ConnectionError>) -> Void
) {
checkKeyImages(
keyImageQueries: keyImageQueries.map { ($0, nextKeyImageQueryBlockIndex: 0) },
maxKeyImagesPerQuery: maxKeyImagesPerQuery,
completion: completion)
}
func checkKeyImages(
keyImageQueries: [(KeyImage, nextKeyImageQueryBlockIndex: UInt64)],
maxKeyImagesPerQuery: Int,
completion: @escaping (Result<[KeyImage.SpentStatus], ConnectionError>) -> Void
) {
let queryArrays = keyImageQueries.chunked(maxLength: maxKeyImagesPerQuery).map { Array($0) }
queryArrays.mapAsync({ chunk, callback in
checkKeyImages(keyImageQueries: chunk, completion: callback)
}, serialQueue: serialQueue, completion: { result in
completion(result.map { $0.flatMap { $0 } })
})
}
func checkKeyImages(
keyImageQueries: [KeyImage],
completion: @escaping (Result<[KeyImage.SpentStatus], ConnectionError>) -> Void
) {
checkKeyImages(
keyImageQueries: keyImageQueries.map { ($0, nextKeyImageQueryBlockIndex: 0) },
completion: completion)
}
func checkKeyImages(
keyImageQueries: [(KeyImage, nextKeyImageQueryBlockIndex: UInt64)],
completion: @escaping (Result<[KeyImage.SpentStatus], ConnectionError>) -> Void
) {
var request = FogLedger_CheckKeyImagesRequest()
request.queries = keyImageQueries.map {
var query = FogLedger_KeyImageQuery()
query.keyImage = External_KeyImage($0.0)
query.startBlock = $0.nextKeyImageQueryBlockIndex
return query
}
fogKeyImageService.checkKeyImages(request: request) {
completion($0.flatMap {
Self.parseResponse(keyImageQueries: keyImageQueries, response: $0)
})
}
}
private static func parseResponse(
keyImageQueries: [(KeyImage, nextKeyImageQueryBlockIndex: UInt64)],
response: FogLedger_CheckKeyImagesResponse
) -> Result<[KeyImage.SpentStatus], ConnectionError> {
keyImageQueries.map { query in
guard let keyImageResult = response.results.first(
where: { KeyImage($0.keyImage) == query.0 }) else
{
return .success(.unspent(knownToBeUnspentBlockCount: response.numBlocks))
}
switch keyImageResult.keyImageResultCodeEnum {
case .spent:
let spentAtBlock = BlockMetadata(
index: keyImageResult.spentAt,
timestampStatus: keyImageResult.timestampStatus)
return .success(.spent(block: spentAtBlock))
case .notSpent:
return .success(.unspent(knownToBeUnspentBlockCount: response.numBlocks))
case .keyImageError, .unused, .UNRECOGNIZED:
return .failure(.invalidServerResponse("Fog KeyImage result error: " +
"\(keyImageResult.keyImageResultCodeEnum), response: \(response)"))
}
}.collectResult()
}
}

View File

@ -0,0 +1,144 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_arguments multiline_function_chains
// swiftlint:disable closure_body_length
import Foundation
import LibMobileCoin
enum FogMerkleProofFetcherError: Error {
case connectionError(ConnectionError)
case outOfBounds(blockCount: UInt64, ledgerTxOutCount: UInt64)
}
extension FogMerkleProofFetcherError: CustomStringConvertible {
var description: String {
"Fog Merkle Proof Fetcher error: " + {
switch self {
case .connectionError(let innerError):
return "\(innerError)"
case let .outOfBounds(blockCount: blockCount, ledgerTxOutCount: txOutCount):
return "Out of bounds: blockCount: \(blockCount), globalTxOutCount: \(txOutCount)"
}
}()
}
}
struct FogMerkleProofFetcher {
private let serialQueue: DispatchQueue
private let fogMerkleProofService: FogMerkleProofService
init(fogMerkleProofService: FogMerkleProofService, targetQueue: DispatchQueue?) {
self.serialQueue = DispatchQueue(label: "com.mobilecoin.\(Self.self)", target: targetQueue)
self.fogMerkleProofService = fogMerkleProofService
}
func getOutputs(
globalIndicesArray: [[UInt64]],
merkleRootBlock: UInt64,
maxNumIndicesPerQuery: Int,
completion: @escaping (
Result<[[(TxOut, TxOutMembershipProof)]], FogMerkleProofFetcherError>
) -> Void
) {
getOutputs(
globalIndices: globalIndicesArray.flatMap { $0 },
merkleRootBlock: merkleRootBlock,
maxNumIndicesPerQuery: maxNumIndicesPerQuery
) {
completion($0.flatMap { allResults in
globalIndicesArray.map { globalIndices in
guard let results = allResults[globalIndices] else {
return .failure(.connectionError(.invalidServerResponse(
"Global txout indices not found in GetOutputs reponse. " +
"globalTxOutIndices: \(globalIndices), returned outputs: " +
"\(allResults)")))
}
return .success(results)
}.collectResult()
})
}
}
func getOutputs(
globalIndices: [UInt64],
merkleRootBlock: UInt64,
maxNumIndicesPerQuery: Int,
completion: @escaping (
Result<[UInt64: (TxOut, TxOutMembershipProof)], FogMerkleProofFetcherError>
) -> Void
) {
let globalIndicesArrays =
globalIndices.chunked(maxLength: maxNumIndicesPerQuery).map { Array($0) }
globalIndicesArrays.mapAsync({ chunk, callback in
getOutputs(globalIndices: chunk, merkleRootBlock: merkleRootBlock, completion: callback)
}, serialQueue: serialQueue, completion: {
completion($0.map { arrayOfOutputMaps in
arrayOfOutputMaps.reduce(into: [:]) { outputMapAccum, outputMap in
outputMapAccum.merge(outputMap, uniquingKeysWith: { key1, _ in key1 })
}
})
})
}
func getOutputs(
globalIndices: [UInt64],
merkleRootBlock: UInt64,
completion: @escaping (
Result<[UInt64: (TxOut, TxOutMembershipProof)], FogMerkleProofFetcherError>
) -> Void
) {
var request = FogLedger_GetOutputsRequest()
request.indices = globalIndices
request.merkleRootBlock = merkleRootBlock
fogMerkleProofService.getOutputs(request: request) {
completion(
$0.mapError { .connectionError($0) }
.flatMap { Self.parseResponse(response: $0) })
}
}
private static func parseResponse(response: FogLedger_GetOutputsResponse)
-> Result<[UInt64: (TxOut, TxOutMembershipProof)], FogMerkleProofFetcherError>
{
response.results.map { outputResult in
switch outputResult.resultCodeEnum {
case .exists:
break
case .doesNotExist:
return .failure(.outOfBounds(
blockCount: response.numBlocks,
ledgerTxOutCount: response.globalTxoCount))
case .outputDatabaseError, .intentionallyUnused, .UNRECOGNIZED:
return .failure(.connectionError(.invalidServerResponse(
"FogMerkleProofService.getOutputs result code error: " +
"\(outputResult.resultCodeEnum), response: \(redacting: response)")))
}
let txOut: TxOut
switch TxOut.make(outputResult.output) {
case .success(let result):
txOut = result
case .failure(let error):
return .failure(.connectionError(.invalidServerResponse(
"FogMerkleProofService.getOutputs returned invalid TxOut. error: \(error)")))
}
let membershipProof: TxOutMembershipProof
switch TxOutMembershipProof.make(outputResult.proof) {
case .success(let result):
membershipProof = result
case .failure(let error):
return .failure(.connectionError(.invalidServerResponse(
"FogMerkleProofService.getOutputs returned invalid membership proof. error: " +
"\(error)")))
}
return .success((outputResult.index, (txOut, membershipProof)))
}.collectResult().map {
Dictionary($0, uniquingKeysWith: { key1, _ in key1 })
}
}
}

View File

@ -0,0 +1,67 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
struct FogUntrustedTxOutFetcher {
private let fogUntrustedTxOutService: FogUntrustedTxOutService
init(fogUntrustedTxOutService: FogUntrustedTxOutService) {
self.fogUntrustedTxOutService = fogUntrustedTxOutService
}
func getTxOut(
outputPublicKey: RistrettoPublic,
completion: @escaping (
Result<(result: FogLedger_TxOutResult, blockCount: UInt64), ConnectionError>
) -> Void
) {
getTxOuts(outputPublicKeys: [outputPublicKey]) {
completion($0.flatMap { results, blockCount in
guard let result =
results.first(where: { $0.txOutPubkey.data == outputPublicKey.data })
else {
logger.info("failure - Fog UntrustedTxOut service failed to " +
"return the requested TxOut: \(redacting: results)")
return .failure(.invalidServerResponse(
"Fog UntrustedTxOut service failed to return the requested TxOut. " +
"\(results)"))
}
return .success((result, blockCount: blockCount))
})
}
}
func getTxOuts(
outputPublicKeys: [RistrettoPublic],
completion:
@escaping (
Result<(results: [FogLedger_TxOutResult], blockCount: UInt64), ConnectionError>
) -> Void
) {
logger.info(
"outputPublicKeys: \(redacting: outputPublicKeys.map { $0.hexEncodedString() })")
var request = FogLedger_TxOutRequest()
request.txOutPubkeys = outputPublicKeys.map { External_CompressedRistretto($0) }
fogUntrustedTxOutService.getTxOuts(request: request) {
completion($0.flatMap { response in
let resultPairs = response.results.map { ($0.txOutPubkey.data, $0) }
let publicKeyToResult =
Dictionary(resultPairs, uniquingKeysWith: { key1, _ in key1 })
let outputPublicKeys = outputPublicKeys.map { $0.data }
guard let results = publicKeyToResult[outputPublicKeys] else {
logger.info("failure - Fog UntrustedTxOut service failed to " +
"return the requested TxOuts: \(redacting: response.results)")
return .failure(.invalidServerResponse(
"Fog UntrustedTxOut service failed to return the requested TxOuts. " +
"\(response)"))
}
return .success((results, blockCount: response.numBlocks))
})
}
}
}

View File

@ -0,0 +1,74 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_function_chains
import Foundation
import LibMobileCoin
final class FogViewKeyScanner {
private let accountKey: AccountKey
private let fogBlockService: FogBlockService
init(accountKey: AccountKey, fogBlockService: FogBlockService) {
self.accountKey = accountKey
self.fogBlockService = fogBlockService
}
func viewKeyScanBlocks(
blockRanges: [Range<UInt64>],
completion: @escaping (Result<[KnownTxOut], ConnectionError>) -> Void
) {
logger.info(
"Fetching block ranges: \(blockRanges.map { "[\($0.lowerBound), \($0.upperBound))" })",
logFunction: false)
fetchBlocksTxOuts(ranges: blockRanges) {
completion($0.map { blocksTxOuts in
logger.info(
"View key scanning blocks: " +
"\(blockRanges.map { "[\($0.lowerBound), \($0.upperBound))" }) " +
"containing \(blocksTxOuts.count) TxOuts",
logFunction: false)
let foundTxOuts = blocksTxOuts.compactMap {
$0.decrypt(accountKey: self.accountKey)
}
logger.info(
"View key scanning missed blocks found \(redacting: foundTxOuts.count) TxOuts",
logFunction: false)
return foundTxOuts
})
}
}
func fetchBlocksTxOuts(
ranges: [Range<UInt64>],
completion: @escaping (Result<[LedgerTxOut], ConnectionError>) -> Void
) {
var request = FogLedger_BlockRequest()
request.rangeValues = ranges
fogBlockService.getBlocks(request: request) {
completion($0.flatMap { response in
response.blocks.flatMap { responseBlock -> [Result<LedgerTxOut, ConnectionError>] in
let globalIndexStart =
responseBlock.globalTxoCount - UInt64(responseBlock.outputs.count)
return responseBlock.outputs.enumerated().map { outputIndex, output in
guard let partialTxOut = PartialTxOut(output) else {
let errorMessage =
"Fog Block service returned invalid TxOut: \(output)"
logger.error(errorMessage, logFunction: false)
return .failure(.invalidServerResponse(errorMessage))
}
return .success(LedgerTxOut(
partialTxOut,
globalIndex: globalIndexStart + UInt64(outputIndex),
block: responseBlock.metadata))
}
}.collectResult()
})
}
}
}

View File

@ -0,0 +1,72 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
final class FogReportManager {
private let inner: SerialDispatchLock<Inner>
private let serialQueue: DispatchQueue
private let serviceProvider: ServiceProvider
init(serviceProvider: ServiceProvider, targetQueue: DispatchQueue?) {
self.inner = .init(Inner(targetQueue: targetQueue), targetQueue: targetQueue)
self.serialQueue = DispatchQueue(label: "com.mobilecoin.\(Self.self)", target: targetQueue)
self.serviceProvider = serviceProvider
}
func reportResponse(
for reportUrl: FogUrl,
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
logger.info("reportUrl: \(reportUrl.url)")
serviceProvider.fogReportService(for: reportUrl) { reportService in
self.inner.accessAsync {
let reportServer = $0.reportServer(for: reportUrl)
reportServer.reports(reportService: reportService, completion: completion)
}
}
}
func reportResponse(
for reportUrl: FogUrl,
reportParams: [(reportId: String, desiredMinPubkeyExpiry: UInt64)],
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
logger.info("reportUrl: \(reportUrl.url), reportParams: \(reportParams)")
serviceProvider.fogReportService(for: reportUrl) { reportService in
self.inner.accessAsync {
let reportServer = $0.reportServer(for: reportUrl)
reportServer.reports(
reportService: reportService,
reportParams: reportParams,
completion: completion)
}
}
}
}
extension FogReportManager {
private struct Inner {
private let sharedSerialExclusionQueue: DispatchQueue
private var networkConfigToServer: [GrpcChannelConfig: FogReportServer] = [:]
init(targetQueue: DispatchQueue?) {
self.sharedSerialExclusionQueue = DispatchQueue(
label: "com.mobilecoin.\(FogReportServer.self)",
target: targetQueue)
}
mutating func reportServer(for reportUrl: FogUrl) -> FogReportServer {
let config = GrpcChannelConfig(url: reportUrl)
return networkConfigToServer[config] ?? {
let reportServer = FogReportServer(serialExclusionQueue: sharedSerialExclusionQueue)
networkConfigToServer[config] = reportServer
return reportServer
}()
}
}
}

View File

@ -0,0 +1,137 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable array_init
import Foundation
import LibMobileCoin
final class FogReportServer {
private let inner: SerialDispatchLock<Inner>
private let serialConnectionQueue: SerialCallbackQueue
init(serialExclusionQueue: DispatchQueue) {
self.inner = .init(Inner(), serialExclusionQueue: serialExclusionQueue)
self.serialConnectionQueue = .init(targetQueue: serialExclusionQueue)
}
func reports(
reportService: FogReportService,
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
fetchReports(reportService: reportService, completion: completion)
}
func reports(
reportService: FogReportService,
reportParams: [(reportId: String, desiredMinPubkeyExpiry: UInt64)],
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
logger.info("reportParams: \(reportParams)")
inner.accessAsync {
if let reportResponse =
$0.cachedReportResponse(satisfyingReportParams: reportParams.map { $0 })
{
completion(.success(reportResponse))
} else {
self.fetchReports(
reportService: reportService,
reportParams: reportParams,
completion: completion)
}
}
}
private func fetchReports(
reportService: FogReportService,
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
serialConnectionQueue.append({ callback in
self.doFetchReports(reportService: reportService, completion: callback)
}, completion: completion)
}
private func fetchReports(
reportService: FogReportService,
reportParams: [(reportId: String, desiredMinPubkeyExpiry: UInt64)],
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
logger.info("reportParams: \(reportParams)")
serialConnectionQueue.append({ callback in
// Now that we have the serialConnectionQueue lock, check again if there's a cached
// report response that satisfies the reportParams.
self.inner.accessAsync {
if let reportResponse =
$0.cachedReportResponse(satisfyingReportParams: reportParams.map { $0 })
{
callback(.success(reportResponse))
} else {
// Otherwise, continue with fetching from the network.
self.doFetchReports(reportService: reportService, completion: callback)
}
}
}, completion: completion)
}
private func doFetchReports(
reportService: FogReportService,
completion: @escaping (Result<Report_ReportResponse, ConnectionError>) -> Void
) {
reportService.getReports(request: Report_ReportRequest()) {
guard let reportResponse = $0.successOr(completion: completion) else { return }
// Save report response before releasing the serialConnectionQueue
// lock. This ensures that, if there's another request waiting, it
// will have access to the report response we just fetched.
self.cacheReportResponse(reportResponse) {
completion(.success(reportResponse))
}
}
}
private func cacheReportResponse(
_ reportResponse: Report_ReportResponse,
completion: @escaping () -> Void
) {
inner.accessAsync {
$0.cacheReportResponse(reportResponse)
completion()
}
}
}
extension FogReportServer {
private struct Inner {
private var cachedReportResponse: Report_ReportResponse?
func cachedReportResponse(
satisfyingReportParams reportParams: [(reportId: String, minPubkeyExpiry: UInt64)]
) -> Report_ReportResponse? {
logger.info("reportParams: \(reportParams)")
guard let reportResponse = cachedReportResponse else {
return nil
}
guard reportResponse.isValid(reportParams: reportParams) else {
logger.info("report response invalid - reportParams: \(reportParams)")
return nil
}
logger.info("report response valid - reportParams: \(reportParams)")
return reportResponse
}
mutating func cacheReportResponse(_ reportResponse: Report_ReportResponse) {
cachedReportResponse = reportResponse
}
}
}
extension Report_ReportResponse {
fileprivate func isValid(reportParams: [(reportId: String, minPubkeyExpiry: UInt64)]) -> Bool {
reportParams.allSatisfy { reportId, minPubkeyExpiry in
reports.contains { $0.fogReportID == reportId && $0.pubkeyExpiry >= minPubkeyExpiry }
}
}
}

View File

@ -0,0 +1,72 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
final class FogResolver {
private let ptr: OpaquePointer
convenience init() {
self.init(attestation: Attestation())
}
convenience init(
attestation: Attestation,
reportUrlsAndResponses: [(FogUrl, Report_ReportResponse)]
) {
self.init(attestation: attestation)
for (reportUrl, response) in reportUrlsAndResponses {
addReportResponse(reportUrl: reportUrl, reportResponse: response)
}
}
private init(attestation: Attestation) {
logger.info("attestation: \(attestation)")
let verifier = AttestationVerifier(attestation: attestation)
// Safety: mc_fog_resolver_create should never return nil.
self.ptr = verifier.withUnsafeOpaquePointer { verifierPtr in
withMcInfallible {
mc_fog_resolver_create(verifierPtr)
}
}
}
deinit {
mc_fog_resolver_free(ptr)
}
func withUnsafeOpaquePointer<R>(_ body: (OpaquePointer) throws -> R) rethrows -> R {
try body(ptr)
}
private func addReportResponse(reportUrl: FogUrl, reportResponse: Report_ReportResponse) {
logger.info("")
let serializedReportResponse = reportResponse.serializedDataInfallible
serializedReportResponse.asMcBuffer { reportResponsePtr in
switch withMcError({ errorPtr in
mc_fog_resolver_add_report_response(
ptr,
reportUrl.url.absoluteString,
reportResponsePtr,
&errorPtr)
}) {
case .success:
break
case .failure(let error):
switch error.errorCode {
case .invalidInput:
// Safety: mc_fog_resolver_add_report_response shouldn't fail deserialization
// since we just serialized it and roundtrip serialization should always
// succeed.
logger.fatalError("\(error)")
default:
// Safety: mc_fog_resolver_add_report_response should not throw non-documented
// errors.
logger.fatalError("Unhandled LibMobileCoin error: \(redacting: error)")
}
}
}
}
}

View File

@ -0,0 +1,75 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_arguments
import Foundation
import LibMobileCoin
final class FogResolverManager {
private let serialQueue: DispatchQueue
private let reportAttestation: Attestation
private let reportManager: FogReportManager
init(
fogReportAttestation: Attestation,
serviceProvider: ServiceProvider,
targetQueue: DispatchQueue?
) {
self.serialQueue = DispatchQueue(label: "com.mobilecoin.\(Self.self)", target: targetQueue)
self.reportAttestation = fogReportAttestation
self.reportManager =
FogReportManager(serviceProvider: serviceProvider, targetQueue: targetQueue)
}
func fogResolver(
addresses: [PublicAddress],
completion: @escaping (Result<FogResolver, ConnectionError>) -> Void
) {
logger.info("addresses: \(addresses.map { "\(redacting: $0)" })")
let reportUrls = Set(addresses.compactMap { $0.fogReportUrl })
reportUrls.mapAsync({ reportUrl, callback in
reportManager.reportResponse(for: reportUrl) {
callback($0.map { response in
(reportUrl, response)
})
}
}, serialQueue: serialQueue, completion: {
completion($0.map { reportUrlsAndResponses in
FogResolver(
attestation: self.reportAttestation,
reportUrlsAndResponses: reportUrlsAndResponses)
})
})
}
func fogResolver(
addresses: [PublicAddress],
desiredMinPubkeyExpiry: UInt64,
completion: @escaping (Result<FogResolver, ConnectionError>) -> Void
) {
logger.info("\(addresses.map { "\(redacting: $0)" }), " +
"desiredMinPubkeyExpiry: \(desiredMinPubkeyExpiry)")
let fogInfos = addresses.compactMap { $0.fogInfo }
let reportUrlsToFogInfos = Dictionary(grouping: fogInfos, by: { $0.reportUrl })
let reportUrlsToReportParams = reportUrlsToFogInfos.mapValues { fogInfos in
fogInfos.map { ($0.reportId, desiredMinPubkeyExpiry) }
}
reportUrlsToReportParams.mapAsync({ reportUrlToReportParams, callback in
let (reportUrl, reportParams) = reportUrlToReportParams
reportManager.reportResponse(for: reportUrl, reportParams: reportParams) {
callback($0.map { response in
(reportUrl, response)
})
}
}, serialQueue: serialQueue, completion: {
completion($0.map { reportUrlsAndResponses in
FogResolver(
attestation: self.reportAttestation,
reportUrlsAndResponses: reportUrlsAndResponses)
})
})
}
}

View File

@ -0,0 +1,23 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
struct DefaultFogQueryScalingStrategy: FogQueryScalingStrategy {
private static let MIN_SEARCH_KEYS_PER_QUERY = 10
private static let MAX_SEARCH_KEYS_PER_QUERY = 200
private static let SCALING_MULTIPLIER: Double = 3
func create() -> AnyInfiniteIterator<PositiveInt> {
var next = Self.MIN_SEARCH_KEYS_PER_QUERY
return AnyInfiniteIterator {
guard let current = PositiveInt(next) else {
// Safety: `next` should always be positive if we only ever increase in value.
logger.fatalError("PositiveInt.init returned nil. value: \(next)")
}
next = min(Int(Double(next) * Self.SCALING_MULTIPLIER), Self.MAX_SEARCH_KEYS_PER_QUERY)
return current
}
}
}

View File

@ -0,0 +1,9 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
protocol FogQueryScalingStrategy {
func create() -> AnyInfiniteIterator<PositiveInt>
}

View File

@ -0,0 +1,140 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_function_chains
import Foundation
import LibMobileCoin
enum FogRngError: Error {
case invalidKey(String)
case unsupportedCryptoBoxVersion(String)
}
extension FogRngError: CustomStringConvertible {
var description: String {
"Fog Kex Rng error: " + {
switch self {
case .invalidKey(let reason):
return "Invalid key: \(reason)"
case .unsupportedCryptoBoxVersion(let reason):
return "Unsupported CryptoBox version: \(reason)"
}
}()
}
}
final class FogRng {
static func make(fogRngKey: FogRngKey, accountKey: AccountKey) -> Result<FogRng, FogRngError> {
make(fogRngKey: fogRngKey, subaddressViewPrivateKey: accountKey.subaddressViewPrivateKey)
}
static func make(fogRngKey: FogRngKey, subaddressViewPrivateKey: RistrettoPrivate)
-> Result<FogRng, FogRngError>
{
subaddressViewPrivateKey.asMcBuffer { viewPrivateKeyPtr in
fogRngKey.pubkey.asMcBuffer { pubkeyPtr in
withMcError { errorPtr in
mc_fog_rng_create(viewPrivateKeyPtr, pubkeyPtr, fogRngKey.version, &errorPtr)
}.mapError {
switch $0.errorCode {
case .invalidInput:
return .invalidKey("\(redacting: $0.description)")
case .unsupportedCryptoBoxVersion:
return .unsupportedCryptoBoxVersion("\(redacting: $0.description)")
default:
// Safety: mc_fog_rng_create should not throw non-documented errors.
logger.fatalError("Unhandled LibMobileCoin error: \(redacting: $0)")
}
}.map { ptr in
FogRng(ptr)
}
}
}
}
/// - Returns: `.failure` when the input is not deserializable.
static func make(serializedData: Data) -> Result<FogRng, FogRngError> {
serializedData.asMcBuffer { dataPtr in
withMcError { errorPtr in
mc_fog_rng_deserialize_proto(dataPtr, &errorPtr)
}.mapError {
switch $0.errorCode {
case .invalidInput:
return .invalidKey("\(redacting: $0.description)")
case .unsupportedCryptoBoxVersion:
return .unsupportedCryptoBoxVersion("\(redacting: $0.description)")
default:
// Safety: mc_fog_rng_deserialize_proto should not throw non-documented errors.
logger.fatalError("Unhandled LibMobileCoin error: \(redacting: $0)")
}
}
}.map { ptr in
FogRng(ptr)
}
}
private let ptr: OpaquePointer
private let outputSize: Int
private init(_ ptr: OpaquePointer) {
self.ptr = ptr
self.outputSize = withMcInfallibleReturningOptional {
let len = mc_fog_rng_get_output_len(ptr)
return len >= 0 ? len : nil
}
}
deinit {
mc_fog_rng_free(ptr)
}
var serializedData: Data {
Data(withMcMutableBufferInfallible: { bufferPtr in
mc_fog_rng_serialize_proto(ptr, bufferPtr)
})
}
func clone() -> FogRng {
// Safety: mc_fog_rng_clone should never return nil.
FogRng(withMcInfallible { mc_fog_rng_clone(ptr) })
}
var index: UInt64 {
withMcInfallibleReturningOptional {
let res = mc_fog_rng_index(ptr)
return res >= 0 ? UInt64(res) : nil
}
}
var output: Data {
Data(withFixedLengthMcMutableBufferInfallible: outputSize) { bufferPtr in
mc_fog_rng_peek(ptr, bufferPtr)
}
}
func outputs(count: Int) -> [Data] {
let rngCopy = clone()
return (0..<count).map { _ in
rngCopy.advance()
}
}
@discardableResult
func advance() -> Data {
Data(withFixedLengthMcMutableBufferInfallible: outputSize) { bufferPtr in
mc_fog_rng_advance(ptr, bufferPtr)
}
}
}
extension FogRng {
static func make(fogRngPubkey: KexRng_KexRngPubkey, accountKey: AccountKey)
-> Result<FogRng, FogRngError>
{
make(
fogRngKey: FogRngKey(fogRngPubkey),
subaddressViewPrivateKey: accountKey.subaddressViewPrivateKey)
}
}

View File

@ -0,0 +1,34 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
import LibMobileCoin
struct FogRngKey {
let pubkey: Data
let version: UInt32
init(pubkey: Data, version: UInt32) {
self.pubkey = pubkey
self.version = version
}
}
extension FogRngKey: Equatable {}
extension FogRngKey: Hashable {}
extension FogRngKey {
init(_ pubkey: KexRng_KexRngPubkey) {
self.pubkey = pubkey.pubkey
self.version = pubkey.version
}
}
extension KexRng_KexRngPubkey {
init(_ fogRngKey: FogRngKey) {
self.init()
self.pubkey = fogRngKey.pubkey
self.version = fogRngKey.version
}
}

View File

@ -0,0 +1,349 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable multiline_function_chains
import Foundation
import LibMobileCoin
final class FogRngSet {
private var ingestInvocationIdToRngTrackers: [Int64: RngTracker] = [:]
private(set) var rngRecordsKnownBlockCount: UInt64 = 0
var earliestRngRecordStartBlockIndex: UInt64? {
ingestInvocationIdToRngTrackers.values.map { $0.startBlockIndex }.min()
}
var knownBlockCount: UInt64 {
ingestInvocationIdToRngTrackers.values.map { $0.knownBlockCount }
.reduce(rngRecordsKnownBlockCount, min)
}
func searchAttempt(
targetBlockCount: UInt64?,
numOutputs: PositiveInt,
minOutputsPerSelectedRng: Int
) -> FogRngSetSearchAttempt {
// Max rngs we can select while maintaining the requested minimum outputs per selected rng.
let maxRngs = 0 < minOutputsPerSelectedRng && minOutputsPerSelectedRng <= numOutputs.value
? numOutputs.value / minOutputsPerSelectedRng : numOutputs.value
let selectedRngs =
selectRngsForSearch(requestedBlockCount: targetBlockCount, maxRngs: maxRngs)
guard !selectedRngs.isEmpty else {
logger.info(
"No active Fog rngs as of block count: \(rngRecordsKnownBlockCount)",
logFunction: false)
return FogRngSetSearchAttempt()
}
// Num of outputs to generate per selected rng.
let outputsPerRng = numOutputs.value / selectedRngs.count
let numRemainderOutputs = numOutputs.value % selectedRngs.count
let ingestInvocationIdAndRngSearchAttempt =
selectedRngs.enumerated().map { i, rngPair -> (Int64, FogRngSearchAttempt) in
let (ingestInvocationId, rngTracker) = rngPair
let numOutputs = outputsPerRng + (i < numRemainderOutputs ? 1 : 0)
let rngSearchAttempt = rngTracker.searchAttempt(numOutputs: numOutputs)
return (ingestInvocationId, rngSearchAttempt)
}
return FogRngSetSearchAttempt(
ingestInvocationIdToRngSearchAttempt: Dictionary(
uniqueKeysWithValues: ingestInvocationIdAndRngSearchAttempt))
}
private func selectRngsForSearch(requestedBlockCount: UInt64?, maxRngs: Int)
-> [Int64: RngTracker]
{
// Filter for rngs that are still active.
var eligibleRngTrackers = ingestInvocationIdToRngTrackers.filter { $0.value.active }
if let requestedBlockCount = requestedBlockCount {
// Filter for rngs that haven't already successfully processed the requested number of
// blocks.
//
// This is how we handle TxOut search pagination. If we repeatedly perform search
// attempts with the same `requestedBlockCount` (e.g. when performing a single balance
// check), eventually all rngs will have a `knownBlockCount` of at least
// `requestedBlockCount`.
eligibleRngTrackers = eligibleRngTrackers.filter {
$0.value.knownBlockCount < requestedBlockCount
}
}
return Dictionary(uniqueKeysWithValues: Array(eligibleRngTrackers.prefix(maxRngs)))
}
func processRngs(queryResponse: FogView_QueryResponse, accountKey: AccountKey)
-> Result<(), ConnectionError>
{
processRngRecords(
queryResponse.rngs,
highestProcessedBlockCount: queryResponse.highestProcessedBlockCount,
accountKey: accountKey
).map {
processDecommissionedRngs(queryResponse.decommissionedIngestInvocations)
}
}
private func processRngRecords(
_ rngRecords: [FogView_RngRecord],
highestProcessedBlockCount: UInt64,
accountKey: AccountKey
) -> Result<(), ConnectionError> {
for rngRecord in rngRecords
where ingestInvocationIdToRngTrackers[rngRecord.ingestInvocationID] == nil
{
logger.info(
"New RngRecord: ingestInvocationID: \(rngRecord.ingestInvocationID), pubkey: " +
"\(rngRecord.pubkey.pubkey.hexEncodedString()), version: " +
"\(rngRecord.pubkey.version), startBlockIndex: \(rngRecord.startBlock)",
logFunction: false)
switch RngTracker.make(rngRecord: rngRecord, accountKey: accountKey) {
case .success(let rngTracker):
ingestInvocationIdToRngTrackers[rngRecord.ingestInvocationID] = rngTracker
case .failure(let error):
switch error {
case .invalidKey(let reason):
let errorMessage = "Fog View returned invalid key rng key: \(reason)"
logger.error(errorMessage, logFunction: false)
return .failure(.invalidServerResponse(errorMessage))
case .unsupportedCryptoBoxVersion(let reason):
let errorMessage = "Fog View returned unsupported kex rng version: \(reason)"
logger.error(errorMessage, logFunction: false)
return .failure(.outdatedClient(errorMessage))
}
}
}
// Record that Fog has told us about all rngs that could possibly have been active up to
// `highestProcessedBlockCount` (while accounting for the possibility that we already have
// more up-to-date information already).
if highestProcessedBlockCount > rngRecordsKnownBlockCount {
logger.info(
"FogRngSet updating rngRecordsKnownBlockCount from \(rngRecordsKnownBlockCount) " +
"to \(highestProcessedBlockCount)",
logFunction: false)
rngRecordsKnownBlockCount = highestProcessedBlockCount
}
return .success(())
}
private func processDecommissionedRngs(
_ decommissionedRngs: [FogView_DecommissionedIngestInvocation]
) {
for decommissionedRng in decommissionedRngs {
if let rngTracker =
ingestInvocationIdToRngTrackers[decommissionedRng.ingestInvocationID]
{
logger.info(
"Rng decommissioned: ingestInvocationID: " +
"\(decommissionedRng.ingestInvocationID), lastIngestedBlockIndex: " +
"\(decommissionedRng.lastIngestedBlock)",
logFunction: false)
rngTracker.decommissioned = true
} else {
logger.error(
"Fog View decommissioned unknown ingestInvocation. ingestInvocationID: " +
"\(decommissionedRng.ingestInvocationID), lastIngestedBlock: " +
"\(decommissionedRng.lastIngestedBlock), current " +
"rngRecordsKnownBlockCount: \(rngRecordsKnownBlockCount)",
logFunction: false)
}
}
}
func processTxOutSearchResults(
queryResponse: FogView_QueryResponse,
rngSetSearchAttempt: FogRngSetSearchAttempt
) -> Result<[FogView_TxOutSearchResult], ConnectionError> {
processTxOutSearchResults(
queryResponse.txOutSearchResults,
highestProcessedBlockCount: queryResponse.highestProcessedBlockCount,
rngSetSearchAttempt: rngSetSearchAttempt)
}
private func processTxOutSearchResults(
_ txOutSearchResults: [FogView_TxOutSearchResult],
highestProcessedBlockCount: UInt64,
rngSetSearchAttempt: FogRngSetSearchAttempt
) -> Result<[FogView_TxOutSearchResult], ConnectionError> {
let searchKeyToTxOutResult = Dictionary(
txOutSearchResults.map { ($0.searchKey, $0) },
uniquingKeysWith: { key1, _ in key1 })
return rngSetSearchAttempt.ingestInvocationIdToRngSearchAttempt
.map { ingestInvocationId, rngSearchAttempt
-> Result<[FogView_TxOutSearchResult], ConnectionError> in
guard let rngTracker = ingestInvocationIdToRngTrackers[ingestInvocationId] else {
// This condition is considered a programming error and mean `searchAttempt` was
// created using a different `FogRngSet` instance. We silently fail here, since
// we know we're still in a valid, internally-consistent state.
logger.assertionFailure("RngTracker not found for rngKey in search attempt. " +
"ingestInvocationId: \(ingestInvocationId)")
return .success([])
}
// Filter for only the outputs we searched for.
let rngSearchKeyToTxOutResult: [Data: FogView_TxOutSearchResult] = Dictionary(
rngSearchAttempt.searchKeys.map { $0.bytes }.compactMap { searchKeyBytes in
guard let txOutResult = searchKeyToTxOutResult[searchKeyBytes] else {
logger.error(
"Searched key not in search results. searched key: " +
"\(searchKeyBytes.hexEncodedString())",
logFunction: false)
return nil
}
return (searchKeyBytes, txOutResult)
},
uniquingKeysWith: { key1, _ in key1 })
return rngTracker.processSearchKeyResults(
rngSearchKeyToTxOutResult: rngSearchKeyToTxOutResult,
highestProcessedBlockCount: highestProcessedBlockCount)
}.collectResult().map {
$0.flatMap { $0 }
}
}
}
private final class RngTracker {
let rng: FogRng
let startBlockIndex: UInt64
/// Whether this RNG is still in use by Fog.
///
/// If an RNG has been decommissioned, then all `TxOut`'s corresponding to the RNG are available
/// for immediate retrieval from Fog. This means that once we encounter a search miss we can
/// stop considering the RNG when generating search keys for a `TxOut` search.
var decommissioned = false
/// Whether we have found all `TxOut`'s for this RNG.
///
/// An RNG is active until the RNG has been both decommissioned and we've encountered at least
/// one search miss since.
var active = true
/// Number of blocks for which all `TxOut`s for this RNG are known.
///
/// Represents the number of blocks for which we can guarantee that all `TxOut`'s corresponding
/// to this RNG have been found. Put another way, we can guarantee that the next output from
/// this RNG has no corresponding `TxOut` within this block range.
///
/// This starts at either `0` or the RNG's `startBlock`. Each time we do a search, if we
/// encounter at least one miss (a.k.a. a `TxOut` is not found for an output from this RNG),
/// then we set this value to the `highestProcessedBlockCount` returned in the search response.
var knownBlockCount: UInt64
init(rng: FogRng, startBlockIndex: UInt64) {
self.rng = rng
self.startBlockIndex = startBlockIndex
// We assign a blockCount with the value of a blockIndex because, if X is the block index of
// the first block that the rng is active, then X is also the number of blocks that came
// before that block, hence our knownBlockCount. E.g. if the startBlockIndex is 1, 1 is also
// the number of blocks before block index 1.
self.knownBlockCount = startBlockIndex
}
func searchAttempt(numOutputs: Int) -> FogRngSearchAttempt {
let outputs = rng.outputs(count: numOutputs)
let searchKeys = outputs.map { FogSearchKey($0) }
// Note: converting directly from blockCount to blockIndex is valid here.
return FogRngSearchAttempt(searchKeys: searchKeys, startFromBlockIndex: knownBlockCount)
}
func processSearchKeyResults(
rngSearchKeyToTxOutResult: [Data: FogView_TxOutSearchResult],
highestProcessedBlockCount: UInt64
) -> Result<[FogView_TxOutSearchResult], ConnectionError> {
var foundTxOutResults: [FogView_TxOutSearchResult] = []
searchResultLoop: while true {
let output = rng.output
guard let txOutResult = rngSearchKeyToTxOutResult[output] else {
// Either we've found all the outputs we searched for or we've processed txos since
// this search attempt was made. Either way, if the next output we need wasn't one
// of the ones searched for or wasn't in the search results, then there's nothing
// else we can do with this rng.
logger.debug(
"Next rng output not found in searched keys. rng output: " +
"0x\(redacting: output.hexEncodedString())",
logFunction: false)
break
}
switch txOutResult.resultCodeEnum {
case .found:
foundTxOutResults.append(txOutResult)
rng.advance()
case .notFound:
// The search key failed to return a `TxOut` during this search attempt.
if highestProcessedBlockCount > knownBlockCount {
// `highestProcessedBlockCount` is the number of blocks that fog guarantees it
// finished processing when performing the search, so we store
// `highestProcessedBlockCount` as the `knownBlockCount` for this RNG on the
// assumption that if we encountered a miss for this RNG, then there are no more
// `TxOut`'s that can be found for this RNG in the first
// `highestProcessedBlockCount` number of blocks in the ledger.
knownBlockCount = highestProcessedBlockCount
}
// Break on the first miss
break searchResultLoop
case .rateLimited:
let errorMessage = "Fog View error response: rateLimited"
logger.warning(errorMessage, logFunction: false)
return .failure(.serverRateLimited(errorMessage))
case .badSearchKey, .internalError, .intentionallyUnused, .UNRECOGNIZED:
let errorMessage = "Fog view error response: \(txOutResult.resultCodeEnum), " +
"txOutResult.searchKey: \(redacting: txOutResult.searchKey)"
logger.error(errorMessage, logFunction: false)
return .failure(.invalidServerResponse(errorMessage))
}
}
return .success(foundTxOutResults)
}
}
extension RngTracker {
static func make(rngRecord: FogView_RngRecord, accountKey: AccountKey)
-> Result<RngTracker, FogRngError>
{
FogRng.make(fogRngPubkey: rngRecord.pubkey, accountKey: accountKey).map { rng in
RngTracker(rng: rng, rngRecord: rngRecord)
}
}
convenience init(rng: FogRng, rngRecord: FogView_RngRecord) {
self.init(rng: rng, startBlockIndex: rngRecord.startBlock)
}
}
struct FogRngSetSearchAttempt {
fileprivate let ingestInvocationIdToRngSearchAttempt: [Int64: FogRngSearchAttempt]
fileprivate init(ingestInvocationIdToRngSearchAttempt: [Int64: FogRngSearchAttempt]? = nil) {
self.ingestInvocationIdToRngSearchAttempt = ingestInvocationIdToRngSearchAttempt ?? [:]
}
var searchKeys: [FogSearchKey] {
ingestInvocationIdToRngSearchAttempt.values.flatMap { $0.searchKeys }
}
var lowestStartFromBlockIndex: UInt64 {
ingestInvocationIdToRngSearchAttempt.values.map { $0.startFromBlockIndex }.min() ?? 0
}
}
private struct FogRngSearchAttempt {
let searchKeys: [FogSearchKey]
let startFromBlockIndex: UInt64
}

View File

@ -0,0 +1,16 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
import Foundation
struct FogSearchKey {
let bytes: Data
init(_ bytes: Data) {
self.bytes = bytes
}
}
extension FogSearchKey: Equatable {}
extension FogSearchKey: Hashable {}

View File

@ -0,0 +1,123 @@
//
// Copyright (c) 2020-2021 MobileCoin. All rights reserved.
//
// swiftlint:disable closure_body_length multiline_function_chains
import Foundation
import LibMobileCoin
import os
extension FogView {
struct TxOutFetcher {
private let serialQueue: DispatchQueue
private let fogView: ReadWriteDispatchLock<FogView>
private let accountKey: AccountKey
private let fogViewService: FogViewService
private let fogQueryScalingStrategy: FogQueryScalingStrategy
init(
fogView: ReadWriteDispatchLock<FogView>,
accountKey: AccountKey,
fogViewService: FogViewService,
fogQueryScalingStrategy: FogQueryScalingStrategy,
targetQueue: DispatchQueue?
) {
self.serialQueue = DispatchQueue(
label: "com.mobilecoin.\(FogView.self).\(Self.self)",
target: targetQueue)
self.fogView = fogView
self.accountKey = accountKey
self.fogViewService = fogViewService
self.fogQueryScalingStrategy = fogQueryScalingStrategy
}
private var allRngTxOutsFoundBlockCount: UInt64 {
fogView.readSync { $0.allRngTxOutsFoundBlockCount }
}
func fetchTxOuts(
partialResultsWithWriteLock: @escaping ([KnownTxOut]) -> Void,
completion: @escaping (Result<(), ConnectionError>) -> Void
) {
performSearchRound(
targetBlockCount: nil,
queryScaling: nil,
partialResultsWithWriteLock: partialResultsWithWriteLock,
completion: completion)
}
private func performSearchRound(
targetBlockCount: UInt64?,
queryScaling: AnyInfiniteIterator<PositiveInt>?,
partialResultsWithWriteLock: @escaping ([KnownTxOut]) -> Void,
completion: @escaping (Result<(), ConnectionError>) -> Void
) {
logger.info("Querying Fog View...", logFunction: false)
let queryScaling = queryScaling ?? fogQueryScalingStrategy.create()
let numOutputs = queryScaling.next()
let (requestWrapper, searchAttempt) = fogView.readSync {
$0.queryRequest(targetBlockCount: targetBlockCount, numOutputs: numOutputs)
}
fogViewService.query(requestWrapper: requestWrapper) {
let result = $0.flatMap { response in
self.fogView.writeSync {
$0.processQueryResponse(
response,
searchAttempt: searchAttempt,
accountKey: self.accountKey
).map { processResult -> UInt64? in
if !searchAttempt.searchKeys.isEmpty {
partialResultsWithWriteLock(processResult.newTxOuts)
}
return processResult.nextRoundTargetBlockCount
}
}
}
switch result {
case .success(let nextRoundTargetBlockCount):
if let nextRoundTargetBlockCount = nextRoundTargetBlockCount {
// Reset query scaling if we didn't search for anything last round.
let queryScaling = !searchAttempt.searchKeys.isEmpty ? queryScaling : nil
// Do another search round
self.performSearchRound(
targetBlockCount: nextRoundTargetBlockCount,
queryScaling: queryScaling,
partialResultsWithWriteLock: partialResultsWithWriteLock,
completion: completion)
} else {
// Search complete
completion(.success(()))
}
case .failure(let error):
completion(.failure(error))
}
}
}
}
}
extension FogView_QueryResponse: CustomRedactingStringConvertible {
var redactingDescription: String {
let hits = txOutSearchResults.filter { $0.resultCodeEnum == .found }
return """
FogView_QueryResponse:
rng record count: \(rngs.count)
TxOutResult count: \(redacting: txOutSearchResults.count)
TxOutResult success count: \(redacting: hits.count)
highestProcessedBlockCount: \(highestProcessedBlockCount)
highestProcessedBlockSignatureTimestamp: \(highestProcessedBlockSignatureTimestamp) \
\(Date(timeIntervalSince1970: TimeInterval(highestProcessedBlockSignatureTimestamp)))
decommissionedRngs: \(decommissionedIngestInvocations)
missedBlockRanges.count: \(missedBlockRanges.count)
missedBlockRanges: \(missedBlockRanges)
nextStartFromUserEventId: \(nextStartFromUserEventID)
lastKnownBlockCount: \(lastKnownBlockCount)
lastKnownBlockCumulativeTxoCount: \(lastKnownBlockCumulativeTxoCount)
txOutResults result codes: \(redacting: txOutSearchResults.map { $0.resultCode })
"""
}
}

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