diff --git a/AbstractMichelson/index.html b/AbstractMichelson/index.html deleted file mode 100644 index f6e2f3a3..00000000 --- a/AbstractMichelson/index.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - KukaiCoreSwift - AbstractMichelson - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Abstract​Michelson -

- -
-
public class AbstractMichelson: Codable, Equatable, CustomStringConvertible  
-
-
-

Base Michelson type, only used for polymorphism inside MichelsonPair objects

- -
-
- -
- - - - - - -%93 - - - -AbstractMichelson - - -AbstractMichelson - - - - - -Codable - -Codable - - - -AbstractMichelson->Codable - - - - - -Equatable - -Equatable - - - -AbstractMichelson->Equatable - - - - - -CustomStringConvertible - -CustomStringConvertible - - - -AbstractMichelson->CustomStringConvertible - - - - - -MichelsonPair - - -MichelsonPair - - - - - -MichelsonPair->AbstractMichelson - - - - - -MichelsonValue - - -MichelsonValue - - - - - -MichelsonValue->AbstractMichelson - - - - - - - - -
-

Subclasses

-
-
MichelsonValue
-

A polymophic warpper around a key value pair, used in conjuction with MichelsonPair to leverage automatice JSON serialisation through Codable

-
-
MichelsonPair
-
-
-

Conforms To

-
-
Codable
-
CustomStringConvertible
-
Equatable
-
-
-
-

Properties

- -
-

- description -

-
-
public var description: String  
-
-
-

Customized description with default value showing the Michelson types have not been parsed

- -
-
-
-
-

Operators

- -
-

- == -

-
-
public static func == (lhs: AbstractMichelson, rhs: AbstractMichelson) -> Bool  
-
-
-
- - - -
-
- - - - diff --git a/Account/index.html b/Account/index.html index 6c187a3e..5bf55d14 100644 --- a/Account/index.html +++ b/Account/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -37,7 +37,7 @@

-
public struct Account: Codable  
+
public struct Account: Codable, Hashable  

Fetching all the account balances is a lengthy task, involving many requests and parsing different structures. @@ -52,32 +52,56 @@

"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%55 - + + + +%713 + Account - -Account + +Account - + +Identifiable + +Identifiable + + + +Account->Identifiable + + + + + Codable - -Codable + +Codable - + Account->Codable - - + + + + + +Hashable + +Hashable + + + +Account->Hashable + + @@ -88,8 +112,38 @@

Conforms To

Codable
+
Hashable
+
Identifiable
+
+

Initializers

+ +
+

+ init(wallet​Address:​) +

+
+
public init(walletAddress: String)  
+
+
+

Basic init to default properties to zero / empty, so that optionals can be avoided on a key model throughout an app

+ +
+
+
+

+ init(wallet​Address:​xtz​Balance:​tokens:​nfts:​recent​NFTs:​liquidity​Tokens:​delegate:​delegation​Level:​) +

+
+
public init(walletAddress: String, xtzBalance: XTZAmount, tokens: [Token], nfts: [Token], recentNFTs: [NFT], liquidityTokens: [DipDupPositionData], delegate: TzKTAccountDelegate?, delegationLevel: Decimal?)  
+
+
+

Full init

+ +
+
+

Properties

@@ -139,6 +193,78 @@

All the wallets NFT's, grouped into parent FA2 objects so they can be displayed in groups or individaully

+
+

+
+

+ recent​NFTs +

+
+
public var recentNFTs: [NFT] 
+
+
+

10 most recent NFTs to hit the wallet

+ +
+
+
+

+ liquidity​Tokens +

+
+
public let liquidityTokens: [DipDupPositionData] 
+
+
+

All the wallets Defi, Liquidity Tokens

+ +
+
+
+

+ delegate +

+
+
public let delegate: TzKTAccountDelegate? 
+
+
+

TzKT object containing baker details + status

+ +
+
+
+

+ delegation​Level +

+
+
public let delegationLevel: Decimal? 
+
+
+

The block level that the delegate was set

+ +
+
+
+

+ id +

+
+
public var id: String  
+
+
+ +
+

Methods

+ +
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable to enable working with UITableViewDiffableDataSource

+
@@ -150,7 +276,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/AggregateRewardInformation/index.html b/AggregateRewardInformation/index.html new file mode 100644 index 00000000..364d55df --- /dev/null +++ b/AggregateRewardInformation/index.html @@ -0,0 +1,220 @@ + + + + + + KukaiCoreSwift - AggregateRewardInformation + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Aggregate​Reward​Information +

+ +
+
public struct AggregateRewardInformation: Codable, Hashable, Equatable  
+
+
+

Object ot abstract away a significatn amount of logic involved in computing estimated reward payments from a baker

+ +
+
+ +
+ + + + + + +%183 + + + +AggregateRewardInformation + + +AggregateRewardInformation + + + + + +Hashable + +Hashable + + + +AggregateRewardInformation->Hashable + + + + + +Equatable + +Equatable + + + +AggregateRewardInformation->Equatable + + + + + +Codable + +Codable + + + +AggregateRewardInformation->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
Hashable
+
+
+
+

Initializers

+ +
+

+ init(previous​Reward:​estimated​Previous​Reward:​estimated​Next​Reward:​) +

+
+
public init(previousReward: RewardDetails?, estimatedPreviousReward: RewardDetails?, estimatedNextReward: RewardDetails?)  
+
+
+
+
+

Properties

+ +
+

+ previous​Reward +

+
+
public let previousReward: RewardDetails? 
+
+
+
+

+ estimated​Previous​Reward +

+
+
public let estimatedPreviousReward: RewardDetails? 
+
+
+
+

+ estimated​Next​Reward +

+
+
public let estimatedNextReward: RewardDetails? 
+
+
+
+
+

Methods

+ +
+

+ is​Out​OfDate() +

+
+
public func isOutOfDate() -> Bool  
+
+
+

Creating this object involves many expensive requests, but produces a result that is valid for up to ~3 days. +This function can be used to determine if its ok to read a previous object from a cache, or if it needs to be refreshed

+ +
+
+
+

+ more​Than1Cycle​Between​Preious​And​Next() +

+
+
public func moreThan1CycleBetweenPreiousAndNext() -> Bool  
+
+
+

When previousReward is present, it is possible that due to a delay in payment being received, that we may cache an object before the last payment was received +In this case, if we only relied on isOutOfDate() we would not update again for ~3 days. Both checks will be needed

+ +
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: AggregateRewardInformation, rhs: AggregateRewardInformation) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/AnyPublisher/index.html b/AnyPublisher/index.html new file mode 100644 index 00000000..45940290 --- /dev/null +++ b/AnyPublisher/index.html @@ -0,0 +1,99 @@ + + + + + + KukaiCoreSwift - AnyPublisher + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + AnyPublisher +

+
+

Methods

+ +
+

+ just(_:​) +

+
+
static func just(_ output: Output) -> Self  
+
+
+

Helper for returning a Just publisher, with the appropriate Failure type and erased to AnyPublisher

+ +
+
+
+

+ fail(with:​) +

+
+
static func fail(with error: Failure) -> Self  
+
+
+

Helper for returning a Fail publisher, erased to AnyPublisher

+ +
+
+
+

+ on​Receive​Output(_:​) +

+
+
func onReceiveOutput(_ callback: @escaping ((Self.Output) -> Void)) -> Publishers.HandleEvents<Self>  
+
+
+

Call .handleEvents, but only use the receiveOutput callback as a shorthand way of running some logic or clean up code

+ +
+
+
+

+ sink(on​Error:​on​Success:​on​Complete:​) +

+
+
func sink(onError: @escaping ((Failure) -> Void), onSuccess: @escaping ((Output) -> Void), onComplete: (() -> Void)? = nil) -> AnyCancellable  
+
+
+

Custom sink implementation breaking each piece into a seperate dedicated callback, avoiding the need to call a switch or unwrap an error

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Array/index.html b/Array/index.html index 9757beab..8c20b4ce 100644 --- a/Array/index.html +++ b/Array/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -35,27 +35,76 @@

Extensions on Array

-
-

Initializers

+
+

Methods

-
+

- init(hex:​) + copy​Operations()

-
public init(hex: String)  
-
+
public func copyOperations() -> [Operation]  
-
-
-

Methods

+
+

Operation's are classes, passed by reference, but often require making copies so that you can manipulate them before sending to be estimated. +Function make it easy by converting the array to JSON and recreating, avoiding issues where construnctors manipulate inputs before storing

-
+
+
+
+

+ michelson​Int(at​Index:​) +

+
+
func michelsonInt(atIndex index: Int) -> String?  
+
+
+
+

+ michelson​String(at​Index:​) +

+
+
func michelsonString(atIndex index: Int) -> String?  
+
+
+
+

+ michelson​Pair(at​Index:​) +

+
+
func michelsonPair(atIndex index: Int) -> [String: Any]?  
+
+
+
+

+ michelson​Int(at​Index:​) +

+
+
func michelsonInt(atIndex index: Int) -> String?  
+
+
+
+

+ michelson​String(at​Index:​) +

+
+
func michelsonString(atIndex index: Int) -> String?  
+
+
+
+

+ michelson​Pair(at​Index:​) +

+
+
func michelsonPair(atIndex index: Int) -> [String: Any]?  
+
+
+

- to​Hex​String() + michelson​Array(at​Index:​)

-
public func toHexString() -> String  
+
func michelsonArray(atIndex index: Int) -> [Any]?  
@@ -64,7 +113,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/BalanceUpdate/index.html b/BalanceUpdate/index.html index a0368377..1e24e6bc 100644 --- a/BalanceUpdate/index.html +++ b/BalanceUpdate/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%3 +%341 @@ -98,7 +98,7 @@

Conforms To

diff --git a/Base58/index.html b/Base58/index.html deleted file mode 100644 index 2bc17778..00000000 --- a/Base58/index.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - KukaiCoreSwift - Base58 - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Extensions on - Base58 -

-
-

Methods

- -
-

- encode(message:​elliptical​Curve:​) -

-
-
public static func encode(message: [UInt8], ellipticalCurve: EllipticalCurve) -> String  
-
-
-

Base58 encode an array of bytes and add the appropriate prefix base on the ellipticalCurve

- -
-
-
-

- encode(message:​prefix:​) -

-
-
public static func encode(message: [UInt8], prefix: [UInt8]) -> String  
-
-
-

Base58 encode an array of bytes and add the supplied prefix

- -
-
-
-

- decode(string:​prefix:​) -

-
-
public static func decode(string: String, prefix: [UInt8]) -> [UInt8]?  
-
-
-

Base58 decode a message, removing the supplied prefix

- -
-
-
-
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/BetterCallDevClient/index.html b/BetterCallDevClient/index.html index 91a9acc0..ee0dedc1 100644 --- a/BetterCallDevClient/index.html +++ b/BetterCallDevClient/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -40,8 +40,8 @@

public class BetterCallDevClient  
-

BetterCallDev (BCD) is an indexing/smart contract debugging tool, used for the Tezos blockchain. -This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app

+

BetterCallDev (BCD) is an indexer/smart contract debugging tool, used for the Tezos blockchain. +This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app to fetch from the Tezos RPC

@@ -52,9 +52,6 @@

Nested Types

BetterCallDevClient.BetterCallDevClientError

Dedicated BCD errors

-
BetterCallDevClient.Constants
-

Constants for dealing with BCD API and cached data

-
@@ -106,7 +103,7 @@

get​More​Detailed​Error(by​Hash:​completion:​)

-
public func getMoreDetailedError(byHash hash: String, completion: @escaping ((BetterCallDevOperationError?, ErrorResponse?) -> Void))  
+
public func getMoreDetailedError(byHash hash: String, completion: @escaping ((BetterCallDevOperationError?, KukaiError?) -> Void))  

Primarily the TzKTClient is used to fetch details on operations. However for more complex calls involving smart contracts, TzKT will only return limited error message info. @@ -132,425 +129,12 @@

Parameters

completion - @escaping ((Better​Call​Dev​Operation​Error?, Error​Response?) -> Void) + @escaping ((Better​Call​Dev​Operation​Error?, Kukai​Error?) -> Void)

Called with the result.

-
-
-

- account(for​Address:​completion:​) -

-
-
public func account(forAddress address: String, completion: @escaping ((Result<BetterCallDevAccount, ErrorResponse>) -> Void))  
-
-
-

Fetches v1/account/<network>/<address> and returns the result. <network> is handled automatically by the config object passed into the constructor. -This call returns information about the wallet such as its XTZ balance.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​AddressString

The address of the wallet to fetch info for.

-
completion@escaping ((Result<Better​Call​Dev​Account, Error​Response>) -> Void)

Called when call finished.

-
-
-
-

- account​Token​Count(for​Address:​completion:​) -

-
-
public func accountTokenCount(forAddress address: String, completion: @escaping ((Result<[String: Int], ErrorResponse>) -> Void))  
-
-
-

Fetches v1/account/<network>/<address>/count and returns the result. <network> is handled automatically by the config object passed into the constructor. -This call returns a list of every token contract address that the given wallet owns at least 1 of. The request also includes the number of instances the user owns. -For fungible tokens, the number will always be 1. For non-fungible, the number will the count of how many of this NFT collection the user owns

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​AddressString

The address of the wallet to fetch info for.

-
completion@escaping ((Result<[String:​ Int], Error​Response>) -> Void)

Called when call finished.

-
-
-
-

- token​Balances(for​Address:​offset:​completion:​) -

-
-
public func tokenBalances(forAddress address: String, offset: Int = 0, completion: @escaping ((Result<BetterCallDevTokenBalances, ErrorResponse>) -> Void))  
-
-
-

Fetches v1/account/<network>/<address>/token_balances and returns the result. <network> is handled automatically by the config object passed into the constructor. -This call returns a page of up to 10 token balances, that the user owns. It will contain both fungible and non-fungible, there is no way to request these separately.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
for​AddressString

The address of the wallet to fetch info for.

-
offsetInt

The page number to request.

-
completion@escaping ((Result<Better​Call​Dev​Token​Balances, Error​Response>) -> Void)

Called when call finished.

-
-
-
-

- token​Metadata(for​Token​Address:​completion:​) -

-
-
public func tokenMetadata(forTokenAddress token: String, completion: @escaping ((Result<BetterCallDevTokenMetadata?, ErrorResponse>) -> Void))  
-
-
-

Fetches v1/tokens/<network>/metadata and returns the result. <network> is handled automatically by the config object passed into the constructor. -This call returns metadata information on the given token contract.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​Token​AddressString

The token address to query data for..

-
completion@escaping ((Result<Better​Call​Dev​Token​Metadata?, Error​Response>) -> Void)

Called when call finished.

-
-
-
-

- contract​Metdata(for​Contract​Address:​completion:​) -

-
-
public func contractMetdata(forContractAddress contract: String, completion: @escaping ((Result<BetterCallDevContract, ErrorResponse>) -> Void))  
-
-
-

Fetches v1/contract/<network>/<contract-address> and returns the result. <network> is handled automatically by the config object passed into the constructor. -This call returns information about the given contract address

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​Contract​AddressString

The address of the contract to fetch info for.

-
completion@escaping ((Result<Better​Call​Dev​Contract, Error​Response>) -> Void)

Called when call finished.

-
-
-
-

- cached​Account​Info() -

-
-
public func cachedAccountInfo() -> Account?  
-
-
-

Query the last cached Acount instance (if available)

- -
-
-
-

- fetch​Account​Info(for​Address:​completion:​) -

-
-
public func fetchAccountInfo(forAddress address: String, completion: @escaping ((Result<Account, ErrorResponse>) -> Void))  
-
-
-

Getting the users balance, token balances and NFT's is a very complex and invloved task. Even using BCD it requires many many networking requests, to fetch the balances, fetch them all 1 page at a time, fetch the metadata etc. -This one request queries everything, and caches all the data to speed up subsequent calls. Applications should use this to drive their UI for 99% of use cases. -Due to the level of caching, it is safe to call this method somewhat frequently, but no more often that once per block on the chain. -What it does: -- Queries the users XTZ balance via self.account(forAddress: ...) -- Queries the tokenCount and every page of token balances via self.fetchTokenCountAndBalances(forAddress: ... ) -- Queries and caches all metadata for unknown tokens via self.fetchAllTokenMetadata(forTokenCount: ...) -- Separates out NFT's and groups them under their parent collection -- Fetches Token icon images using Kingfisher -- Creates a readable Account object out of all of this data for easier consumption -- Caches the Account object so it can be retrieved by cachedAccountInfo() for instant loading next time the app is opened

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​AddressString

The address to request all this information for.

-
completion@escaping ((Result<Account, Error​Response>) -> Void)

Called when calls are finished.

-
-
-
-

- fetch​Token​Count​And​Balances(for​Address:​completion:​) -

-
-
public func fetchTokenCountAndBalances(forAddress address: String, completion: @escaping ((Result<(count: [String: Int], balances: BetterCallDevTokenBalances), ErrorResponse>) -> Void))  
-
-
-

Calls self.accountTokenCount(forAddress: ...) to get the list of tokens the user owns, and then queries all the balances in batches of 10

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​AddressString

The wallet address to query info for.

-
completion@escaping ((Result<(count:​ [String:​ Int], balances:​ Better​Call​Dev​Token​Balances), Error​Response>) -> Void)

Called when all calls finsihed.

-
-
-
-

- fetch​All​Token​Metadata(for​Token​Count:​completion:​) -

-
-
public func fetchAllTokenMetadata(forTokenCount tokenCount: [String: Int], completion: @escaping ((Result<[String: BetterCallDevTokenMetadata], ErrorResponse>) -> Void))  
-
-
-

Fetching all of the necessary token method data requires 2 things. 1) Query the token contract from BCD to be able to see the FaVersion. 2) Query the token metadata itself to find out the rest of the info.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​Token​Count[String:​ Int]

The tokenCount return from accountTokenCount(forAddress: ...).

-
completion@escaping ((Result<[String:​ Better​Call​Dev​Token​Metadata], Error​Response>) -> Void)

Called after all calls finished.

-
-
-
-

- download​And​Cache​Images(for​Token​Count:​completion:​) -

-
-
public func downloadAndCacheImages(forTokenCount tokenCount: [String: Int], completion: @escaping ((Bool) -> Void))  
-
-
-

Use Kingfisher to bulk download the token icons for all the tokens the user owns, allowing them to be called much easier. -Developers can use https://github.com/onevcat/Kingfisher to display the images then throughout the app. -E.g. imageView.kf.setImage(with: URL)

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
for​Token​Count[String:​ Int]

The tokenCount return from accountTokenCount(forAddress: ...).

-
completion@escaping ((Bool) -> Void)

Called after all calls finished.

-
-
-
-

- image​URL(for​Token:​) -

-
-
public func imageURL(forToken token: String) -> URL?  
-
-
-

In order to access the cached images, you need the URL it was downloaded from. This can either be found inside the Token objects returned as part of Account from the fetchAccountInfo func. -Or, if you need to use it seperately, given the token address you can use this function

- -
-

Parameters

- - - - - - - - - - - - - - - - -
for​TokenString

The token address who's image you are looking for.

-
-
-
-

- clear​Cached​Images() -

-
-
public func clearCachedImages()  
-
-
-

Used to manually clear the images cached on disk, to force them to be refreshed next time.

- -
@@ -561,7 +145,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/BetterCallDevClient_BetterCallDevClientError/index.html b/BetterCallDevClient_BetterCallDevClientError/index.html index 7d61250f..733dbc67 100644 --- a/BetterCallDevClient_BetterCallDevClientError/index.html +++ b/BetterCallDevClient_BetterCallDevClientError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%297 +%807 @@ -87,8 +87,8 @@

Member Of

BetterCallDevClient
-

BetterCallDev (BCD) is an indexing/smart contract debugging tool, used for the Tezos blockchain. -This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app

+

BetterCallDev (BCD) is an indexer/smart contract debugging tool, used for the Tezos blockchain. +This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app to fetch from the Tezos RPC

Conforms To

@@ -124,7 +124,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/BetterCallDevClient_Constants/index.html b/BetterCallDevClient_Constants/index.html deleted file mode 100644 index b06cad3f..00000000 --- a/BetterCallDevClient_Constants/index.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - KukaiCoreSwift - BetterCallDevClient.Constants - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Better​Call​Dev​Client.​Constants -

- -
-
public struct Constants  
-
-
-

Constants for dealing with BCD API and cached data

- -
-
- - -

Member Of

-
-
BetterCallDevClient
-

BetterCallDev (BCD) is an indexing/smart contract debugging tool, used for the Tezos blockchain. -This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app

-
-
-
-
-

Properties

- -
-

- token​Balance​Query​Size -

-
-
public static let tokenBalanceQuerySize = 10
-
-
-
-

- token​Metadata​Filename -

-
-
public static let tokenMetadataFilename = "bcd-token_metadata"
-
-
-
-

- parsed​Account​Filename -

-
-
public static let parsedAccountFilename = "bcd-parsed_account"
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/BetterCallDevOperation/index.html b/BetterCallDevOperation/index.html index 361752ce..3ca0c9b4 100644 --- a/BetterCallDevOperation/index.html +++ b/BetterCallDevOperation/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%197 +%13 @@ -202,7 +202,7 @@

diff --git a/BetterCallDevOperationError/index.html b/BetterCallDevOperationError/index.html index 969a0308..a090fe43 100644 --- a/BetterCallDevOperationError/index.html +++ b/BetterCallDevOperationError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%313 +%389 @@ -149,7 +149,7 @@

diff --git a/BetterCallDevTokenBalances/index.html b/BetterCallDevTokenBalances/index.html deleted file mode 100644 index 6b8a4ac8..00000000 --- a/BetterCallDevTokenBalances/index.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - KukaiCoreSwift - BetterCallDevTokenBalances - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Better​Call​Dev​Token​Balances -

- -
-
public struct BetterCallDevTokenBalances: Codable  
-
-
-

A model matching the response that comes back from BetterCallDev's API: v1/account/<network>/<address>/token_balances

- -
-
- -
- - - - - - -%143 - - - -BetterCallDevTokenBalances - - -BetterCallDevTokenBalances - - - - - -Codable - -Codable - - - -BetterCallDevTokenBalances->Codable - - - - - - - - -
-

Conforms To

-
-
Codable
-
-
-
-

Properties

- -
-

- balances -

-
-
public var balances: [BetterCallDevTokenBalance] 
-
-
-
-

- total -

-
-
public let total: Int
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/BetterCallDevTokenMetadata/index.html b/BetterCallDevTokenMetadata/index.html index cca1e0ab..575552b0 100644 --- a/BetterCallDevTokenMetadata/index.html +++ b/BetterCallDevTokenMetadata/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%7 +%593 @@ -165,7 +165,7 @@

diff --git a/BiometricType/index.html b/BiometricType/index.html new file mode 100644 index 00000000..63face2d --- /dev/null +++ b/BiometricType/index.html @@ -0,0 +1,91 @@ + + + + + + KukaiCoreSwift - BiometricType + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Biometric​Type +

+ +
+
public enum BiometricType  
+
+ +
+

Enumeration Cases

+ +
+

+ unavailable +

+
+
case unavailable
+
+
+
+

+ none +

+
+
case none
+
+
+
+

+ touch​ID +

+
+
case touchID
+
+
+
+

+ face​ID +

+
+
case faceID
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/BlockchainHead/index.html b/BlockchainHead/index.html index 405608b7..8dfb4067 100644 --- a/BlockchainHead/index.html +++ b/BlockchainHead/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%135 +%609 @@ -137,7 +137,7 @@

diff --git a/CacheType/index.html b/CacheType/index.html new file mode 100644 index 00000000..e2dd57ed --- /dev/null +++ b/CacheType/index.html @@ -0,0 +1,75 @@ + + + + + + KukaiCoreSwift - CacheType + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Cache​Type +

+ +
+
public enum CacheType  
+
+ +
+

Enumeration Cases

+ +
+

+ temporary +

+
+
case temporary
+
+
+
+

+ permanent +

+
+
case permanent
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Collection/index.html b/Collection/index.html new file mode 100644 index 00000000..1e218ee9 --- /dev/null +++ b/Collection/index.html @@ -0,0 +1,63 @@ + + + + + + KukaiCoreSwift - Collection + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + Collection +

+
+

Methods

+ +
+

+ concatenate​Publishers() +

+
+
func concatenatePublishers() -> AnyPublisher<Element.Output, Element.Failure>?  
+
+
+

Convert an array of publishers into a concatenation, so that they will all run sequentually. Code from: https://www.apeth.com/UnderstandingCombine/operators/operatorsJoiners/operatorsappend.html

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ContentTypeCheckingImageDownloader/index.html b/ContentTypeCheckingImageDownloader/index.html new file mode 100644 index 00000000..14846bff --- /dev/null +++ b/ContentTypeCheckingImageDownloader/index.html @@ -0,0 +1,112 @@ + + + + + + KukaiCoreSwift - ContentTypeCheckingImageDownloader + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Content​Type​Checking​Image​Downloader +

+ +
+
public class ContentTypeCheckingImageDownloader: ImageDownloader  
+
+
+ +
+ + + + + + +%549 + + + +ContentTypeCheckingImageDownloader + + +ContentTypeCheckingImageDownloader + + + + + +ImageDownloader + +ImageDownloader + + + +ContentTypeCheckingImageDownloader->ImageDownloader + + + + + + + + +
+

Conforms To

+
+
ImageDownloader
+
+
+
+

Methods

+ +
+

+ start​Download​Task(context:​callback:​) +

+
+
public override func startDownloadTask(context: DownloadingContext, callback: SessionDataTask.TaskCallback) -> DownloadTask  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/CurrentDevice/index.html b/CurrentDevice/index.html new file mode 100644 index 00000000..3b4cb9ae --- /dev/null +++ b/CurrentDevice/index.html @@ -0,0 +1,107 @@ + + + + + + KukaiCoreSwift - CurrentDevice + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Current​Device +

+ +
+
public enum CurrentDevice  
+
+
+

Enum used to get details about the current device's capabilities

+ +
+ +
+

Properties

+ +
+

+ has​Secure​Enclave +

+
+
public static var hasSecureEnclave: Bool  
+
+
+

Does the current device have a secure enclave

+ +
+
+
+

+ is​Simulator +

+
+
public static var isSimulator: Bool  
+
+
+

Is the current device a simulator

+ +
+
+
+
+

Methods

+ +
+

+ biometric​Type​Authorized() +

+
+
public static func biometricTypeAuthorized() -> BiometricType  
+
+
+
+

+ biometric​Type​Supported() +

+
+
public static func biometricTypeSupported() -> BiometricType  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DApp/index.html b/DApp/index.html new file mode 100644 index 00000000..b61c5682 --- /dev/null +++ b/DApp/index.html @@ -0,0 +1,56 @@ + + + + + + KukaiCoreSwift - DApp + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + DApp +

+ +
+
public struct DApp  
+
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DAppAccessType/index.html b/DAppAccessType/index.html new file mode 100644 index 00000000..b05c9ed1 --- /dev/null +++ b/DAppAccessType/index.html @@ -0,0 +1,83 @@ + + + + + + KukaiCoreSwift - DAppAccessType + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + DApp​Access​Type +

+ +
+
public enum DAppAccessType  
+
+ +
+

Enumeration Cases

+ +
+

+ all +

+
+
case all
+
+
+
+

+ direct​Auth​Only +

+
+
case directAuthOnly
+
+
+
+

+ none +

+
+
case none
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DAppCategory/index.html b/DAppCategory/index.html new file mode 100644 index 00000000..70e15975 --- /dev/null +++ b/DAppCategory/index.html @@ -0,0 +1,83 @@ + + + + + + KukaiCoreSwift - DAppCategory + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + DApp​Category +

+ +
+
public enum DAppCategory  
+
+ +
+

Enumeration Cases

+ +
+

+ marketplace +

+
+
case marketplace
+
+
+
+

+ exchange +

+
+
case exchange
+
+
+
+

+ collectible +

+
+
case collectible
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Prefix/index.html b/DAppHelperService/index.html similarity index 55% rename from Prefix/index.html rename to DAppHelperService/index.html index a5b2cd80..16272294 100644 --- a/Prefix/index.html +++ b/DAppHelperService/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - Prefix + KukaiCoreSwift - DAppHelperService
- + KukaiCoreSwift @@ -32,15 +32,15 @@

On This Page

- Enumeration - Prefix + Class + DApp​Helper​Service

-
public enum Prefix  
+
public class DAppHelperService  
-

Prefixes needed to add to hex strings to denote elliptical curves

+

A Helper service to simply combine multiple calls from other services, and/or map to specific responses, in order to expose a piece of functionality provided by a dApp

@@ -48,12 +48,9 @@

Nested Types

-
Prefix.Watermark
-
-
Prefix.Keys
-
-
Prefix.Address
-
+
DAppHelperService.Quipuswap
+

All functions related to Quipuswap

+
@@ -65,7 +62,7 @@

Nested Types

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/DAppHelperService_Quipuswap/index.html b/DAppHelperService_Quipuswap/index.html new file mode 100644 index 00000000..98b4a269 --- /dev/null +++ b/DAppHelperService_Quipuswap/index.html @@ -0,0 +1,160 @@ + + + + + + KukaiCoreSwift - DAppHelperService.Quipuswap + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + DApp​Helper​Service.​Quipuswap +

+ +
+
public struct Quipuswap  
+
+
+

All functions related to Quipuswap

+ +
+
+ + +

Member Of

+
+
DAppHelperService
+

A Helper service to simply combine multiple calls from other services, and/or map to specific responses, in order to expose a piece of functionality provided by a dApp

+
+
+
+
+

Properties

+ +
+

+ FEE_FACTOR +

+
+
public static let FEE_FACTOR = 997
+
+
+

Constant pulled from: https://github.com/madfish-solutions/quipuswap-sdk/blob/4c38ce4a44d7c15da197ecb28e6521f3ac8ff527/src/defaults.ts

+ +
+
+
+

+ VETO_PERIOD +

+
+
public static let VETO_PERIOD  
+
+
+

Constant pulled from: https://github.com/madfish-solutions/quipuswap-sdk/blob/4c38ce4a44d7c15da197ecb28e6521f3ac8ff527/src/defaults.ts

+ +
+
+
+

+ VOTING_PERIOD +

+
+
public static let VOTING_PERIOD  
+
+
+

Constant pulled from:https://github.com/madfish-solutions/quipuswap-sdk/blob/4c38ce4a44d7c15da197ecb28e6521f3ac8ff527/src/defaults.ts

+ +
+
+
+

+ ACCURANCY_MULTIPLIER +

+
+
public static let ACCURANCY_MULTIPLIER  
+
+
+

Constant pulled from: https://github.com/madfish-solutions/quipuswap-sdk/blob/4c38ce4a44d7c15da197ecb28e6521f3ac8ff527/src/defaults.ts

+ +
+
+
+
+

Methods

+ +
+

+ get​Pending​Rewards(from​Exchange:​for​Address:​tz​KTClient:​completion:​) +

+
+
public static func getPendingRewards(fromExchange exchange: String, forAddress address: String, tzKTClient: TzKTClient, completion: @escaping ((Result<XTZAmount, KukaiError>) -> Void))  
+
+
+

Use TzKTClient's methods of storage and bigmap queries, to extract any recorded pending rewards the user might be due, for providing liquidity to a pool

+ +
+
+
+

+ get​Pending​Rewards(from​Exchange:​for​Address:​tz​KTClient:​) +

+
+
public static func getPendingRewards(fromExchange exchange: String, forAddress address: String, tzKTClient: TzKTClient) -> Future<(exchange: String, rewards: XTZAmount), KukaiError>  
+
+
+

Wrapper around getPendingRewards(..., completion: ) to make it easier to create bulk queries, through combine

+ +
+
+
+

+ get​Bulk​Pending​Rewards(from​Exchanges:​for​Address:​tz​KTClient:​completion:​) +

+
+
public static func getBulkPendingRewards(fromExchanges exchanges: [String], forAddress address: String, tzKTClient: TzKTClient, completion: @escaping ((Result<[(exchange: String, rewards: XTZAmount)], KukaiError>) -> Void))  
+
+
+

Use TzKTClient's methods of storage and bigmap queries, to extract any recorded pending rewards the user might be due, for providing liquidity to a pool

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Data/index.html b/Data/index.html deleted file mode 100644 index 1e15274a..00000000 --- a/Data/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - KukaiCoreSwift - Data - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Extensions on - Data -

-
-

Properties

- -
-

- bytes -

-
-
var bytes: Array<UInt8>  
-
-
-
-
-

Methods

- -
-

- to​Hex​String() -

-
-
func toHexString() -> String  
-
-
-
-
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Date/index.html b/Date/index.html new file mode 100644 index 00000000..d86ff7dd --- /dev/null +++ b/Date/index.html @@ -0,0 +1,63 @@ + + + + + + KukaiCoreSwift - Date + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + Date +

+
+

Methods

+ +
+

+ time​Ago​Display() +

+
+
func timeAgoDisplay() -> String  
+
+
+

Helper to return strings like "15 seconds ago", "1 minute ago" etc, from a Date

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DateFormatter/index.html b/DateFormatter/index.html new file mode 100644 index 00000000..420ea7ac --- /dev/null +++ b/DateFormatter/index.html @@ -0,0 +1,63 @@ + + + + + + KukaiCoreSwift - DateFormatter + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + DateFormatter +

+
+

Initializers

+ +
+

+ init(with​Format:​) +

+
+
convenience init(withFormat: String)  
+
+
+

Helper to create a DateFormatter with a format in 1 call

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Decimal/index.html b/Decimal/index.html index 2f490369..2d0035a0 100644 --- a/Decimal/index.html +++ b/Decimal/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -48,6 +48,18 @@

Wrapper around the Objective-c code needed to round a Decimal

+
+ +
+

+ int​Value() +

+
+
func intValue() -> Int  
+
+
+

Wrapper around the Objective-c code needed to return an Int from a decimal

+

@@ -56,7 +68,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/DexAddCalculationResult/index.html b/DexAddCalculationResult/index.html new file mode 100644 index 00000000..99b01ae3 --- /dev/null +++ b/DexAddCalculationResult/index.html @@ -0,0 +1,107 @@ + + + + + + KukaiCoreSwift - DexAddCalculationResult + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dex​Add​Calculation​Result +

+ +
+
public struct DexAddCalculationResult  
+
+
+

A struct to hold all the necessary calculations for adding liquidity to a dex contract

+ +
+ +
+

Initializers

+ +
+

+ init(expected​Liquidity:​minimum​Liquidity:​token​Required:​exchange​Rate:​) +

+
+
public init(expectedLiquidity: TokenAmount, minimumLiquidity: TokenAmount, tokenRequired: TokenAmount, exchangeRate: Decimal)  
+
+
+
+
+

Properties

+ +
+

+ expected​Liquidity +

+
+
public let expectedLiquidity: TokenAmount
+
+
+
+

+ minimum​Liquidity +

+
+
public let minimumLiquidity: TokenAmount
+
+
+
+

+ token​Required +

+
+
public let tokenRequired: TokenAmount
+
+
+
+

+ exchange​Rate +

+
+
public let exchangeRate: Decimal
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DexCalculationService/index.html b/DexCalculationService/index.html new file mode 100644 index 00000000..4616742f --- /dev/null +++ b/DexCalculationService/index.html @@ -0,0 +1,1267 @@ + + + + + + KukaiCoreSwift - DexCalculationService + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Dex​Calculation​Service +

+ +
+
public class DexCalculationService  
+
+
+

Wrapper around the kukai-dex-calculations JS library for performing calculations: https://github.com/kukai-wallet/kukai-dex-calculations

+ +
+ +
+

Properties

+ +
+

+ shared +

+
+
public static let shared  
+
+
+

Public shared instace to avoid having multiple copies of the underlying JSContext created

+ +
+
+
+
+

Methods

+ +
+

+ calculate​Xtz​ToToken(xtz​ToSell:​xtz​Pool:​token​Pool:​max​Slippage:​dex:​) +

+
+
public func calculateXtzToToken(xtzToSell: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, maxSlippage: Double, dex: DipDupExchangeName) -> DexSwapCalculationResult?  
+
+
+

A helper function to create all the necessary calculations for a xtzToToken exchange, to perform the operation and display the info to the user in a confirmation screen.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToSellXTZAmount

The XTZAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex contract holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
max​SlippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

DexSwapCalculationResult containing the results of all the necessary calculations.

+ +
+
+

+ calculate​Token​ToXTZ(token​ToSell:​xtz​Pool:​token​Pool:​max​Slippage:​dex:​) +

+
+
public func calculateTokenToXTZ(tokenToSell: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, maxSlippage: Double, dex: DipDupExchangeName) -> DexSwapCalculationResult?  
+
+
+

A helper function to create all the necessary calculations for a tokenToXtz exchange, to perform the operation and display the info to the user in a confirmation screen.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
token​ToSellToken​Amount

The TokenAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex contract holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
max​SlippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

DexSwapCalculationResult containing the results of all the necessary calculations.

+ +
+
+

+ calculate​Add​Liquidity(xtz:​xtz​Pool:​token​Pool:​total​Liquidity:​max​Slippage:​dex:​) +

+
+
public func calculateAddLiquidity(xtz: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, totalLiquidity: TokenAmount, maxSlippage: Double, dex: DipDupExchangeName) -> DexAddCalculationResult?  
+
+
+

A helper function to create all the necessary calculations for adding liquidity, with an XTZ input

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xtzXTZAmount

The amount of XTZ to deposit

+
xtz​PoolXTZAmount

The total XTZ held in the dex contract

+
token​PoolToken​Amount

The total token held in the dex contract

+
total​LiquidityToken​Amount

The ttotal liquidity held in the liquidity contract

+
max​SlippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

(tokenRequired: TokenAmount, liquidity: TokenAmount) containing the results of all the necessary calculations.

+ +
+
+

+ calculate​Add​Liquidity(token:​xtz​Pool:​token​Pool:​total​Liquidity:​max​Slippage:​dex:​) +

+
+
public func calculateAddLiquidity(token: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, totalLiquidity: TokenAmount, maxSlippage: Double, dex: DipDupExchangeName) -> DexAddCalculationResult?  
+
+
+

A helper function to create all the necessary calculations for adding liquidity, with an Token input

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tokenToken​Amount

The amount of Token to deposit

+
xtz​PoolXTZAmount

The total XTZ held in the dex contract

+
token​PoolToken​Amount

The total token held in the dex contract

+
total​LiquidityToken​Amount

The ttotal liquidity held in the liquidity contract

+
max​SlippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

(xtzRequired: XTZAmount, liquidity: TokenAmount) containing the results of all the necessary calculations.

+ +
+
+

+ calculate​Remove​Liquidity(liquidity​Burned:​total​Liquidity:​xtz​Pool:​token​Pool:​max​Slippage:​dex:​) +

+
+
public func calculateRemoveLiquidity(liquidityBurned: TokenAmount, totalLiquidity: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, maxSlippage: Double, dex: DipDupExchangeName) -> DexRemoveCalculationResult?  
+
+
+

A helper function to create all the necessary calculations for removing liquidity, to return everything the user will get out

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
liquidity​BurnedToken​Amount

The amount of Liquidity tokens the user wants to burn or sell

+
total​LiquidityToken​Amount

The total volume of liquidity held in the contract

+
xtz​PoolXTZAmount

The xtz pool held in the dex contract

+
token​PoolToken​Amount

The token pool held in the dex contract

+
max​SlippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

(xtz: XTZAmount, token: TokenAmount) containing the results of all the necessary calculations.

+ +
+
+

+ settings(for​Dex:​) +

+
+
public static func settings(forDex dex: DipDupExchangeName) -> (fee: Double, burn: Double, includeSubsidy: Bool)  
+
+
+
+

+ xtz​ToToken​Expected​Return(xtz​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func xtzToTokenExpectedReturn(xtzToSell: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> TokenAmount?  
+
+
+

The TokenAmount expected to be returned for the supplied XTZAmount, given the dex contract xtzPool and tokenPool.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToSellXTZAmount

The XTZAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

TokenAmount containing the amount the user can expect in return for their XTZ

+ +
+
+

+ xtz​ToToken​Minimum​Return(token​Amount:​slippage:​) +

+
+
public func xtzToTokenMinimumReturn(tokenAmount: TokenAmount, slippage: Double) -> TokenAmount?  
+
+
+

The minimum possible TokenAmount returned, taking into account slippage.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
token​AmountToken​Amount

The TokenAmount returned from xtzToTokenExpectedReturn().

+
slippageDouble

A double value between 0 and 1, indicating the maximum percentage of slippage a user will accept.

+
+

Returns

+

TokenAmount containing the minimum amount the user can expect in return for their XTZ

+ +
+
+

+ xtz​ToToken​Required​Xtz​For(token​Amount:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func xtzToTokenRequiredXtzFor(tokenAmount: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> XTZAmount?  
+
+
+

Calculate the XTZAmount required in order to receive the supplied TokenAmount.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
token​AmountToken​Amount

The TokenAmount the user wants to receive.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

XTZAmount containing the amount of XTZ required in order to recieve the amount of token.

+ +
+
+

+ xtz​ToToken​Exchange​Rate(xtz​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func xtzToTokenExchangeRate(xtzToSell: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> Decimal?  
+
+
+

The exchange rate for a given trade, taking into account slippage and fees

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToSellXTZAmount

The XTZAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the exchange rate from 1 XTZ to the requested Token

+ +
+
+

+ xtz​ToToken​Exchange​Rate​Display(xtz​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func xtzToTokenExchangeRateDisplay(xtzToSell: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> Decimal?  
+
+
+

The exchange rate for a given trade, taking into account slippage and fees, formatted and truncated for easier display in the UI.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToSellXTZAmount

The XTZAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the exchange rate from 1 XTZ to the requested Token

+ +
+
+

+ xtz​ToToken​Market​Rate(xtz​Pool:​token​Pool:​) +

+
+
public func xtzToTokenMarketRate(xtzPool: XTZAmount, tokenPool: TokenAmount) -> Decimal?  
+
+
+

Before a user has entered in an amount to trade, its useful to show them the base exchange rate, ignoring slippage.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the exchange rate from 1 XTZ to the requested Token

+ +
+
+

+ xtz​ToToken​Price​Impact(xtz​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func xtzToTokenPriceImpact(xtzToSell: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> Decimal?  
+
+
+

Calcualte the percentage the price impact the given trade would incur. Since this is already taken into account for the other functions, this function returns in the scale of 0 - 100, for display purposes.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToSellXTZAmount

The XTZAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the slippage percentage, 0 - 100.

+ +
+
+

+ token​ToXtz​Expected​Return(token​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func tokenToXtzExpectedReturn(tokenToSell: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> XTZAmount?  
+
+
+

The XTZAmount expected to be returned for the supplied TokenAmount, given the dex contracts xtzPool and tokenPool.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
token​ToSellToken​Amount

The TokenAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

XTZAmount containing the amount the user can expect in return for their Token

+ +
+
+

+ token​ToXtz​Minimum​Return(xtz​Amount:​slippage:​) +

+
+
public func tokenToXtzMinimumReturn(xtzAmount: XTZAmount, slippage: Double) -> XTZAmount?  
+
+
+

The minimum possible XTZAmount returned, taking into account slippage.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
xtz​AmountXTZAmount

The XTZAmount returned from tokenToXtzExpectedReturn().

+
slippageDouble

A double value between 0 and 1, indicating the maximum percentage of slippage a user will accept.

+
+

Returns

+

XTZAmount containing the minimum amount the user can expect in return for their Token

+ +
+
+

+ token​ToXtz​Required​Token​For(xtz​Amount:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func tokenToXtzRequiredTokenFor(xtzAmount: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> TokenAmount?  
+
+
+

Calculate the TokenAmount required in order to receive the supplied XTZAmount.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​AmountXTZAmount

The XTZAmount the user wants to receive.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

TokenAmount containing the amount of Token required in order to recieve the amount of XTZ.

+ +
+
+

+ token​ToXtz​Exchange​Rate(token​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func tokenToXtzExchangeRate(tokenToSell: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> Decimal?  
+
+
+

The exchange rate for a given trade, taking into account slippage and fees

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
token​ToSellToken​Amount

The TokenAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the exchange rate from 1 of the given Token to XTZ

+ +
+
+

+ token​ToXtz​Exchange​Rate​Display(token​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func tokenToXtzExchangeRateDisplay(tokenToSell: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> Decimal?  
+
+
+

The exchange rate for a given trade, taking into account slippage and fees, formatted and truncated for easier display in the UI.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
token​ToSellToken​Amount

The TokenAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the exchange rate from 1 of the given Token to XTZ

+ +
+
+

+ token​ToXtz​Market​Rate(xtz​Pool:​token​Pool:​) +

+
+
public func tokenToXtzMarketRate(xtzPool: XTZAmount, tokenPool: TokenAmount) -> Decimal?  
+
+
+

Before a user has entered in an amount to trade, its useful to show them the base exchange rate, ignoring slippage.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the exchange rate from 1 of the given Token to XTZ

+ +
+
+

+ token​ToXtz​Price​Impact(token​ToSell:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func tokenToXtzPriceImpact(tokenToSell: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> Decimal?  
+
+
+

Calcualte the percentage slippage the given trade would incur. Since this is already taken into account for the other functions, this function returns in the scale of 0 - 100, for display purposes.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
token​ToSellToken​Amount

The TokenAmount to sell.

+
xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dex holds. Can be fetched with xxxxx.

+
token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dex holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

+
+

Returns

+

Decimal containing the slippage percentage, 0 - 100.

+ +
+
+

+ add​Liquidity​Return(xtz​ToDeposit:​xtz​Pool:​total​Liquidity:​slippage:​dex:​) +

+
+
public func addLiquidityReturn(xtzToDeposit: XTZAmount, xtzPool: XTZAmount, totalLiquidity: TokenAmount, slippage: Double, dex: DipDupExchangeName) -> (expected: TokenAmount, minimum: TokenAmount)?  
+
+
+

Calculate the amount of liquidity tokens a user can expect back for an amount of XTZ and Token

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToDepositXTZAmount

The XTZ to send to the dex contract

+
token​ToDeposit

The Token to send to the dex contract

+
total​LiquidityToken​Amount

The total liquidity already in the contract

+
slippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

TokenAmount an amount of Liquidity token you will receive

+ +
+
+

+ add​Liquidity​Token​Required(xtz​ToDeposit:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func addLiquidityTokenRequired(xtzToDeposit: XTZAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> TokenAmount?  
+
+
+

Calculate the amount of Token that is required to send along side your XTZ

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xtz​ToDepositXTZAmount

The amount of XTZ to send

+
xtz​PoolXTZAmount

The XTZ currently held in the dex contract

+
token​PoolToken​Amount

The Token currently held in the dex contract

+
+

Returns

+

TokenAmount The amount of token required to send with the given amount of XTZ

+ +
+
+

+ add​Liquidity​Xtz​Required(token​ToDeposit:​xtz​Pool:​token​Pool:​dex:​) +

+
+
public func addLiquidityXtzRequired(tokenToDeposit: TokenAmount, xtzPool: XTZAmount, tokenPool: TokenAmount, dex: DipDupExchangeName) -> XTZAmount?  
+
+
+

Calculate the amount of XTZ that is required to send along side your Token

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
token​ToDepositToken​Amount

The amount of Token to send

+
xtz​PoolXTZAmount

The XTZ currently held in the dex contract

+
token​PoolToken​Amount

The Token currently held in the dex contract

+
+

Returns

+

XTZAmount The amount of XTZ required to send with the given amount of Token

+ +
+
+

+ remove​Liquidity​Token​Received(liquidity​Burned:​total​Liquidity:​token​Pool:​slippage:​) +

+
+
public func removeLiquidityTokenReceived(liquidityBurned: TokenAmount, totalLiquidity: TokenAmount, tokenPool: TokenAmount, slippage: Double) -> (expected: TokenAmount, minimum: TokenAmount)?  
+
+
+

Calculate the amount of token a user would revice back if they burned X liquidity

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
liquidity​BurnedToken​Amount

The amount of liquidity to burn

+
total​LiquidityToken​Amount

The totla liquidity held in the dex contract

+
token​PoolToken​Amount

The total token held in the dex contract

+
slippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

TokenAmount The amount of Token that would be returned

+ +
+
+

+ remove​Liquidity​Xtz​Received(liquidity​Burned:​total​Liquidity:​xtz​Pool:​slippage:​dex:​) +

+
+
public func removeLiquidityXtzReceived(liquidityBurned: TokenAmount, totalLiquidity: TokenAmount, xtzPool: XTZAmount, slippage: Double, dex: DipDupExchangeName) -> (expected: XTZAmount, minimum: XTZAmount)?  
+
+
+

Calculate the amount of XTZ a user would revice back if they burned X liquidity

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
liquidity​BurnedToken​Amount

The amount of liquidity to burn

+
total​LiquidityToken​Amount

The totla liquidity held in the dex contract

+
xtz​PoolXTZAmount

The total XTZ held in the dex contract

+
slippageDouble

Percentage (must be between 0 and 1) of maximum amount of slippage the user is willing to accept

+
+

Returns

+

XTZAmount The amount of XTZ that would be returned

+ +
+
+

+ estimate​Liquidity​Baking​APY(xtz​Pool:​) +

+
+
public func estimateLiquidityBakingAPY(xtzPool: XTZAmount) -> Decimal?  
+
+
+

Estimate the APY of liquidity baking contract, as it has a known income.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
xtz​PoolXTZAmount

The total XTZ held in the dex contract

+
+

Returns

+

Decimal The estimated percentage APY

+ +
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DexRemoveCalculationResult/index.html b/DexRemoveCalculationResult/index.html new file mode 100644 index 00000000..f3c1951b --- /dev/null +++ b/DexRemoveCalculationResult/index.html @@ -0,0 +1,115 @@ + + + + + + KukaiCoreSwift - DexRemoveCalculationResult + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dex​Remove​Calculation​Result +

+ +
+
public struct DexRemoveCalculationResult  
+
+
+

A struct to hold all the necessary calculations for removing liquidity from a dex contract

+ +
+ +
+

Initializers

+ +
+

+ init(expected​XTZ:​minimum​XTZ:​expected​Token:​minimum​Token:​exchange​Rate:​) +

+
+
public init(expectedXTZ: XTZAmount, minimumXTZ: XTZAmount, expectedToken: TokenAmount, minimumToken: TokenAmount, exchangeRate: Decimal)  
+
+
+
+
+

Properties

+ +
+

+ expected​XTZ +

+
+
public let expectedXTZ: XTZAmount
+
+
+
+

+ minimum​XTZ +

+
+
public let minimumXTZ: XTZAmount
+
+
+
+

+ expected​Token +

+
+
public let expectedToken: TokenAmount
+
+
+
+

+ minimum​Token +

+
+
public let minimumToken: TokenAmount
+
+
+
+

+ exchange​Rate +

+
+
public let exchangeRate: Decimal
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DexSwapCalculationResult/index.html b/DexSwapCalculationResult/index.html new file mode 100644 index 00000000..9ca656cb --- /dev/null +++ b/DexSwapCalculationResult/index.html @@ -0,0 +1,107 @@ + + + + + + KukaiCoreSwift - DexSwapCalculationResult + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dex​Swap​Calculation​Result +

+ +
+
public struct DexSwapCalculationResult  
+
+
+

A struct to hold all the necessary calculations for a dex trade

+ +
+ +
+

Initializers

+ +
+

+ init(expected:​minimum:​display​Exchange​Rate:​display​Price​Impact:​) +

+
+
public init(expected: TokenAmount, minimum: TokenAmount, displayExchangeRate: Decimal, displayPriceImpact: Double)  
+
+
+
+
+

Properties

+ +
+

+ expected +

+
+
public let expected: TokenAmount
+
+
+
+

+ minimum +

+
+
public let minimum: TokenAmount
+
+
+
+

+ display​Exchange​Rate +

+
+
public let displayExchangeRate: Decimal
+
+
+
+

+ display​Price​Impact +

+
+
public let displayPriceImpact: Double
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DexterCalculationResult/index.html b/DexterCalculationResult/index.html deleted file mode 100644 index 8c1a3597..00000000 --- a/DexterCalculationResult/index.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - KukaiCoreSwift - DexterCalculationResult - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Dexter​Calculation​Result -

- -
-
public struct DexterCalculationResult  
-
-
-

A struct to hold all the necessary calculations for a Dexter trade

- -
- -
-

Initializers

- -
-

- init(expected:​minimum:​liquidity​Fee:​display​Exchange​Rate:​display​Price​Impact:​) -

-
-
public init(expected: TokenAmount, minimum: TokenAmount, liquidityFee: TokenAmount, displayExchangeRate: Decimal, displayPriceImpact: Double)  
-
-
-
-
-

Properties

- -
-

- expected -

-
-
public let expected: TokenAmount
-
-
-
-

- minimum -

-
-
public let minimum: TokenAmount
-
-
-
-

- liquidity​Fee -

-
-
public let liquidityFee: TokenAmount
-
-
-
-

- display​Exchange​Rate -

-
-
public let displayExchangeRate: Decimal
-
-
-
-

- display​Price​Impact -

-
-
public let displayPriceImpact: Double
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/DexterCalculationService/index.html b/DexterCalculationService/index.html deleted file mode 100644 index d2ee0b04..00000000 --- a/DexterCalculationService/index.html +++ /dev/null @@ -1,803 +0,0 @@ - - - - - - KukaiCoreSwift - DexterCalculationService - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Dexter​Calculation​Service -

- -
-
public class DexterCalculationService  
-
-
-

Wrapper around the Dexter JS library for performing calculations: https://gitlab.com/camlcase-dev/dexter-calculations/

- -
- -
-

Properties

- -
-

- shared -

-
-
public static let shared  
-
-
-

Public shared instace to avoid having multiple copies of the underlying JSContext created

- -
-
-
-
-

Methods

- -
-

- calculate​Xtz​ToToken(xtz​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​max​Slippage:​) -

-
-
public func calculateXtzToToken(xtzToSell: XTZAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount, maxSlippage: Double) -> DexterCalculationResult?  
-
-
-

A helper function to create all the necessary calculations for a xtzToToken exchange, to perform the operation and display the info to the user in a confirmation screen.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
xtz​ToSellXTZAmount

The XTZAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
max​SlippageDouble

Double containing the max slippage a user will accept for their trade.

-
-

Returns

-

DexterCalculationResult containing the results of all the necessary calculations.

- -
-
-

- calcualte​Token​ToXTZ(token​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​max​Slippage:​) -

-
-
public func calcualteTokenToXTZ(tokenToSell: TokenAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount, maxSlippage: Double) -> DexterCalculationResult?  
-
-
-

A helper function to create all the necessary calculations for a tokenToXtz exchange, to perform the operation and display the info to the user in a confirmation screen.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
token​ToSellToken​Amount

The TokenAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
max​SlippageDouble

Double containing the max slippage a user will accept for their trade.

-
-

Returns

-

DexterCalculationResult containing the results of all the necessary calculations.

- -
-
-

- xtz​ToToken​Expected​Return(xtz​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func xtzToTokenExpectedReturn(xtzToSell: XTZAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> TokenAmount?  
-
-
-

The TokenAmount expected to be returned for the supplied XTZAmount, given the dexter contracts xtzPool and tokenPool.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
xtz​ToSellXTZAmount

The XTZAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

TokenAmount containing the amount the user can expect in return for their XTZ

- -
-
-

- xtz​ToToken​Minimum​Return(token​Amount:​slippage:​) -

-
-
public func xtzToTokenMinimumReturn(tokenAmount: TokenAmount, slippage: Double) -> TokenAmount?  
-
-
-

The minimum possible TokenAmount returned, taking into account slippage.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
token​AmountToken​Amount

The TokenAmount returned from xtzToTokenExpectedReturn().

-
slippageDouble

A double value between 0 and 1, indicating the maximum percentage of slippage a user will accept.

-
-

Returns

-

TokenAmount containing the minimum amount the user can expect in return for their XTZ

- -
-
-

- xtz​ToToken​Required​Xtz​For(token​Amount:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func xtzToTokenRequiredXtzFor(tokenAmount: TokenAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> XTZAmount?  
-
-
-

Calculate the XTZAmount required in order to receive the supplied TokenAmount.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
token​AmountToken​Amount

The TokenAmount the user wants to receive.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

XTZAmount containing the amount of XTZ required in order to recieve the amount of token.

- -
-
-

- xtz​ToToken​Exchange​Rate(xtz​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func xtzToTokenExchangeRate(xtzToSell: XTZAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

The exchange rate for a given trade, taking into account slippage and fees

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
xtz​ToSellXTZAmount

The XTZAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the exchange rate from 1 XTZ to the requested Token

- -
-
-

- xtz​ToToken​Exchange​Rate​Display(xtz​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func xtzToTokenExchangeRateDisplay(xtzToSell: XTZAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

The exchange rate for a given trade, taking into account slippage and fees, formatted and truncated for easier display in the UI.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
xtz​ToSellXTZAmount

The XTZAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the exchange rate from 1 XTZ to the requested Token

- -
-
-

- xtz​ToToken​Market​Rate(dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func xtzToTokenMarketRate(dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

Before a user has entered in an amount to trade, its useful to show them the base exchange rate, ignoring slippage.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the exchange rate from 1 XTZ to the requested Token

- -
-
-

- xtz​ToToken​Price​Impact(xtz​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func xtzToTokenPriceImpact(xtzToSell: XTZAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

Calcualte the percentage the price impact the given trade would incur. Since this is already taken into account for the other functions, this function returns in the scale of 0 - 100, for display purposes.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
xtz​ToSellXTZAmount

The XTZAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the slippage percentage, 0 - 100.

- -
-
-

- token​ToXtz​Expected​Return(token​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func tokenToXtzExpectedReturn(tokenToSell: TokenAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> XTZAmount?  
-
-
-

The XTZAmount expected to be returned for the supplied TokenAmount, given the dexter contracts xtzPool and tokenPool.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
token​ToSellToken​Amount

The TokenAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

XTZAmount containing the amount the user can expect in return for their Token

- -
-
-

- token​ToXtz​Minimum​Return(xtz​Amount:​slippage:​) -

-
-
public func tokenToXtzMinimumReturn(xtzAmount: XTZAmount, slippage: Double) -> XTZAmount?  
-
-
-

The minimum possible XTZAmount returned, taking into account slippage.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
xtz​AmountXTZAmount

The XTZAmount returned from tokenToXtzExpectedReturn().

-
slippageDouble

A double value between 0 and 1, indicating the maximum percentage of slippage a user will accept.

-
-

Returns

-

XTZAmount containing the minimum amount the user can expect in return for their Token

- -
-
-

- token​ToXtz​Required​Token​For(xtz​Amount:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func tokenToXtzRequiredTokenFor(xtzAmount: XTZAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> TokenAmount?  
-
-
-

Calculate the TokenAmount required in order to receive the supplied XTZAmount.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
xtz​AmountXTZAmount

The XTZAmount the user wants to receive.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

TokenAmount containing the amount of Token required in order to recieve the amount of XTZ.

- -
-
-

- token​ToXtz​Exchange​Rate(token​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func tokenToXtzExchangeRate(tokenToSell: TokenAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

The exchange rate for a given trade, taking into account slippage and fees

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
token​ToSellToken​Amount

The TokenAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the exchange rate from 1 of the given Token to XTZ

- -
-
-

- token​ToXtz​Exchange​Rate​Display(token​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func tokenToXtzExchangeRateDisplay(tokenToSell: TokenAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

The exchange rate for a given trade, taking into account slippage and fees, formatted and truncated for easier display in the UI.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
token​ToSellToken​Amount

The TokenAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the exchange rate from 1 of the given Token to XTZ

- -
-
-

- token​ToXtz​Market​Rate(dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func tokenToXtzMarketRate(dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

Before a user has entered in an amount to trade, its useful to show them the base exchange rate, ignoring slippage.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the exchange rate from 1 of the given Token to XTZ

- -
-
-

- token​ToXtz​Price​Impact(token​ToSell:​dexter​Xtz​Pool:​dexter​Token​Pool:​) -

-
-
public func tokenToXtzPriceImpact(tokenToSell: TokenAmount, dexterXtzPool: XTZAmount, dexterTokenPool: TokenAmount) -> Decimal?  
-
-
-

Calcualte the percentage slippage the given trade would incur. Since this is already taken into account for the other functions, this function returns in the scale of 0 - 100, for display purposes.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
token​ToSellToken​Amount

The TokenAmount to sell.

-
dexter​Xtz​PoolXTZAmount

The XTZAmount representing the current pool of XTZ that the dexter contract holds. Can be fetched with xxxxx.

-
dexter​Token​PoolToken​Amount

The TokenAmount representing the current pool of the given Token that the dexter contract holds. Must have the same number of decimalPlaces as the token it represents. Can be fetched with xxxxx.

-
-

Returns

-

Decimal containing the slippage percentage, 0 - 100.

- -
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Dictionary/index.html b/Dictionary/index.html new file mode 100644 index 00000000..881390da --- /dev/null +++ b/Dictionary/index.html @@ -0,0 +1,99 @@ + + + + + + KukaiCoreSwift - Dictionary + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + Dictionary +

+
+

Methods

+ +
+

+ michelson​Value() +

+
+
func michelsonValue() -> [String: Any]?  
+
+
+
+

+ michelson​Value​Array() +

+
+
func michelsonValueArray() -> [[String: Any]]?  
+
+
+
+

+ michelson​Args​Array() +

+
+
func michelsonArgsArray() -> [[String: Any]]?  
+
+
+
+

+ michelson​Args​Unknown​Array() +

+
+
func michelsonArgsUnknownArray() -> [Any]?  
+
+
+
+

+ michelson​Int() +

+
+
func michelsonInt() -> String?  
+
+
+
+

+ michelson​String() +

+
+
func michelsonString() -> String?  
+
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/BetterCallDevContract/index.html b/DipDupChartData/index.html similarity index 59% rename from BetterCallDevContract/index.html rename to DipDupChartData/index.html index 383eeb92..a0e33c39 100644 --- a/BetterCallDevContract/index.html +++ b/DipDupChartData/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - BetterCallDevContract + KukaiCoreSwift - DipDupChartData
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Structure - Better​Call​Dev​Contract + Dip​Dup​Chart​Data

-
public struct BetterCallDevContract: Codable  
+
public struct DipDupChartData: Codable  
-

A model matching the response that comes back from BetterCallDev's API: v1/contract/<network>/<address>

+

Struct to hold 4 arrays of data, each one mapping to a different timeline of data, to allow the display of graphs

@@ -51,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%277 +%43 - + -BetterCallDevContract - +DipDupChartData + -BetterCallDevContract +DipDupChartData @@ -72,9 +72,9 @@ Codable - + -BetterCallDevContract->Codable +DipDupChartData->Codable @@ -82,7 +82,7 @@ - +

Conforms To

@@ -92,51 +92,51 @@

Conforms To

Properties

-
+

- network + quotes15mNogaps

-
public let network: String
+
public let quotes15mNogaps: [DipDupChartObject] 
-

The network the contract is active on

+

Contains the last 24 hours of data at 15 min intervals

-
+

- address + quotes1hNogaps

-
public let address: String
+
public let quotes1hNogaps: [DipDupChartObject] 
-

The KT1 address of the contract

+

Contains every hour for past 7 days

-
+

- manager + quotes1dNogaps

-
public let manager: String
+
public let quotes1dNogaps: [DipDupChartObject] 
-

The manager address of the contract

+

Contains every day for 30 days

-
+

- tags + quotes1wNogaps

-
public let tags: [String] 
+
public let quotes1wNogaps: [DipDupChartObject] 
-

string tags to denote useful infomration about the contract. Currently used to denote which FA version the contract supports

+

Contains every week for 52 weeks

@@ -149,7 +149,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/DipDupChartObject/index.html b/DipDupChartObject/index.html new file mode 100644 index 00000000..84c8a740 --- /dev/null +++ b/DipDupChartObject/index.html @@ -0,0 +1,220 @@ + + + + + + KukaiCoreSwift - DipDupChartObject + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Chart​Object +

+ +
+
public struct DipDupChartObject: Codable  
+
+
+

Structure holding a data slice

+ +
+
+ +
+ + + + + + +%21 + + + +DipDupChartObject + + +DipDupChartObject + + + + + +Codable + +Codable + + + +DipDupChartObject->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ average +

+
+
public let average: Decimal
+
+
+

The average price at the given time

+ +
+
+
+

+ exchange​Id +

+
+
public let exchangeId: String
+
+
+

The address of the contract

+ +
+
+
+

+ bucket +

+
+
public let bucket: String
+
+
+

String representing the date and time the slice is for

+ +
+
+
+

+ high +

+
+
public let high: String
+
+
+

The highest value reached in this slice

+ +
+
+
+

+ low +

+
+
public let low: String
+
+
+

The lowest value reached in this slice

+ +
+
+
+
+

Methods

+ +
+

+ date() +

+
+
public func date() -> Date?  
+
+
+

Convert the bucket string into a Date object

+ +
+
+
+

+ average​Double() +

+
+
public func averageDouble() -> Double  
+
+
+

Convert the average value into a Double

+ +
+
+
+

+ high​Double() +

+
+
public func highDouble() -> Double  
+
+
+

Convert the high value into a Double

+ +
+
+
+

+ low​Double() +

+
+
public func lowDouble() -> Double  
+
+
+

Convert the low value into a Double

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupClient/index.html b/DipDupClient/index.html new file mode 100644 index 00000000..475a5107 --- /dev/null +++ b/DipDupClient/index.html @@ -0,0 +1,269 @@ + + + + + + KukaiCoreSwift - DipDupClient + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Dip​Dup​Client +

+ +
+
public class DipDupClient  
+
+
+

This client exposes functions to allow communication to the indexer platform DipDup ( https://dipdup.net/ ). +DipDup is composed of many small, dedicated indexers, powered by GraphQL. This client tries to exposes userflow functions, allowing users to accomplish tasks without having to worry about the underlying complexities

+ +
+ +
+

Initializers

+ +
+

+ init(network​Service:​config:​) +

+
+
public init(networkService: NetworkService, config: TezosNodeClientConfig)  
+
+
+

Init a DipDupClient with a NetworkService and a TezosNodeClientConfig.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
network​ServiceNetwork​Service

NetworkService used to manage network communication.

+
configTezos​Node​Client​Config

TezosNodeClientConfig used to apss in settings.

+
+
+
+
+

Properties

+ +
+

+ dex​Max​Query​Size +

+
+
public static let dexMaxQuerySize = 100
+
+
+

Max enteries to return per request

+ +
+
+
+
+

Methods

+ +
+

+ get​Exchanges​And​Tokens(limit:​offset:​completion:​) +

+
+
public func getExchangesAndTokens(limit: Int = DipDupClient.dexMaxQuerySize, offset: Int = 0, completion: @escaping ((Result<GraphQLResponse<DipDupExchangesAndTokensResponse>, KukaiError>) -> Void))  
+
+
+

Get a list of all the tokens available and on what excahnges (including their prices and pool data)

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
limitInt

Int, How many results to reuturn 100 Max)

+
offsetInt

Int, How many positions to move the cursor

+
completion@escaping ((Result<Graph​QLResponse<Dip​Dup​Exchanges​And​Tokens​Response>, Kukai​Error>) -> Void)

Block returning a GraphQL response or an KukaiError

+
+
+
+

+ get​All​Exchanges​And​Tokens(completion:​) +

+
+
public func getAllExchangesAndTokens(completion: @escaping ((Result<[DipDupExchangesAndTokens], KukaiError>) -> Void))  
+
+
+

Recurrsively call getExchangesAndTokens(...) until we have found all the tokens

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
completion@escaping ((Result<[Dip​Dup​Exchanges​And​Tokens], Kukai​Error>) -> Void)

Block returning a GraphQL response or an KukaiError

+
+
+
+

+ get​Liquidity​For(address:​completion:​) +

+
+
public func getLiquidityFor(address: String, completion: @escaping ((Result<GraphQLResponse<DipDupPosition>, KukaiError>) -> Void))  
+
+
+

Query a given addresses liquidity token balances

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
addressString

The TZ address to query for

+
completion@escaping ((Result<Graph​QLResponse<Dip​Dup​Position>, Kukai​Error>) -> Void)

Block returning a GraphQL response or an KukaiError

+
+
+
+

+ get​Chart​Data​For(exchange​Contract:​now​Date:​completion:​) +

+
+
public func getChartDataFor(exchangeContract: String, nowDate: Date = Date(), completion: @escaping ((Result<GraphQLResponse<DipDupChartData>, KukaiError>) -> Void))  
+
+
+

Query a given contract address for pricing data for the given token

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
exchange​ContractString

The KT address of the dex contract to query data for

+
completion@escaping ((Result<Graph​QLResponse<Dip​Dup​Chart​Data>, Kukai​Error>) -> Void)

Block returning a GraphQL response or an KukaiError

+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupExchange/index.html b/DipDupExchange/index.html new file mode 100644 index 00000000..92f0da93 --- /dev/null +++ b/DipDupExchange/index.html @@ -0,0 +1,310 @@ + + + + + + KukaiCoreSwift - DipDupExchange + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Exchange +

+ +
+
public struct DipDupExchange: Codable, Hashable, Equatable  
+
+
+

A DipDup Exchange object with all the necessary pieces for checking liquidity and performing Swaps

+ +
+
+ +
+ + + + + + +%105 + + + +DipDupExchange + + +DipDupExchange + + + + + +Equatable + +Equatable + + + +DipDupExchange->Equatable + + + + + +Codable + +Codable + + + +DipDupExchange->Codable + + + + + +Hashable + +Hashable + + + +DipDupExchange->Hashable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
Hashable
+
+
+
+

Properties

+ +
+

+ name +

+
+
public let name: DipDupExchangeName
+
+
+

Enum to denote the type of Exchange (e.g. Liquidity Baking, Quipuswap)

+ +
+
+
+

+ address +

+
+
public let address: String
+
+
+

The KT address of the exchange contract

+ +
+
+
+

+ tez​Pool +

+
+
public let tezPool: String
+
+
+

String representation of the Exchanges TezPool

+ +
+
+
+

+ token​Pool +

+
+
public let tokenPool: String
+
+
+

String representation of the Exchanges TokenPool

+ +
+
+
+

+ shares​Total +

+
+
public let sharesTotal: String
+
+
+

The total liquidity available (RPC representation, no decimals)

+ +
+
+
+

+ mid​Price +

+
+
public let midPrice: String
+
+
+

The daily middle price

+ +
+
+
+

+ token +

+
+
public let token: DipDupToken
+
+
+

The token object containing all the token info (decimals, contract address, symbol etc,)

+ +
+
+
+
+

Methods

+ +
+

+ xtz​Pool​Amount() +

+
+
public func xtzPoolAmount() -> XTZAmount  
+
+
+

Return the XTZ pool as an XTZAmount object

+ +
+
+
+

+ token​Pool​Amount() +

+
+
public func tokenPoolAmount() -> TokenAmount  
+
+
+

Return the Token pool as an TokenAmount object

+ +
+
+
+

+ liquidity​Token​Decimal​Places() +

+
+
public func liquidityTokenDecimalPlaces() -> Int  
+
+
+

Retrieving the liquidity token decimals is currently not supported. Hardcode the numbers for now

+ +
+
+
+

+ total​Liquidity() +

+
+
public func totalLiquidity() -> TokenAmount  
+
+
+

Return the total liquidity as an TokenAmount object

+ +
+
+
+

+ are​Pools​Empty() +

+
+
public func arePoolsEmpty() -> Bool  
+
+
+

Helper to detect if the pools are empty (determiens if the next addLiquidity will be setting the exchange rate)

+ +
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable to enable working with UITableViewDiffableDataSource

+ +
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: DipDupExchange, rhs: DipDupExchange) -> Bool  
+
+
+

Conforming to Equatable to enable working with UITableViewDiffableDataSource

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupExchangeName/index.html b/DipDupExchangeName/index.html new file mode 100644 index 00000000..c956643e --- /dev/null +++ b/DipDupExchangeName/index.html @@ -0,0 +1,157 @@ + + + + + + KukaiCoreSwift - DipDupExchangeName + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Dip​Dup​Exchange​Name +

+ +
+
public enum DipDupExchangeName: String, Codable  
+
+
+

Enum to wrap up the available types of Exchange on DipDup

+ +
+
+ +
+ + + + + + +%667 + + + +DipDupExchangeName + + +DipDupExchangeName + + + + + +Codable + +Codable + + + +DipDupExchangeName->Codable + + + + + +String + +String + + + +DipDupExchangeName->String + + + + + + + + +
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Initializers

+ +
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+
+
+

Enumeration Cases

+ +
+

+ quipuswap +

+
+
case quipuswap
+
+
+
+

+ lb +

+
+
case lb
+
+
+
+

+ unknown +

+
+
case unknown
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupExchangesAndTokens/index.html b/DipDupExchangesAndTokens/index.html new file mode 100644 index 00000000..593490b8 --- /dev/null +++ b/DipDupExchangesAndTokens/index.html @@ -0,0 +1,156 @@ + + + + + + KukaiCoreSwift - DipDupExchangesAndTokens + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Exchanges​And​Tokens +

+ +
+
public struct DipDupExchangesAndTokens: Codable  
+
+
+

Wrapper object to map to network response type

+ +
+
+ +
+ + + + + + +%381 + + + +DipDupExchangesAndTokens + + +DipDupExchangesAndTokens + + + + + +Codable + +Codable + + + +DipDupExchangesAndTokens->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ symbol +

+
+
public let symbol: String
+
+
+
+

+ address +

+
+
public let address: String
+
+
+
+

+ token​Id +

+
+
public let tokenId: Decimal
+
+
+
+

+ exchanges +

+
+
public let exchanges: [DipDupExchange] 
+
+
+
+
+

Methods

+ +
+

+ total​Exchange​Xtz​Pool() +

+
+
public func totalExchangeXtzPool() -> XTZAmount  
+
+
+

Get the total XTZ pool amount from all the exchanges, useful for sorting

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupExchangesAndTokensResponse/index.html b/DipDupExchangesAndTokensResponse/index.html new file mode 100644 index 00000000..d46e6654 --- /dev/null +++ b/DipDupExchangesAndTokensResponse/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - DipDupExchangesAndTokensResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Exchanges​And​Tokens​Response +

+ +
+
public struct DipDupExchangesAndTokensResponse: Codable  
+
+
+

Wrapper object to map to network response type

+ +
+
+ +
+ + + + + + +%493 + + + +DipDupExchangesAndTokensResponse + + +DipDupExchangesAndTokensResponse + + + + + +Codable + +Codable + + + +DipDupExchangesAndTokensResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ token +

+
+
public let token: [DipDupExchangesAndTokens] 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupPosition/index.html b/DipDupPosition/index.html new file mode 100644 index 00000000..7e8f87d1 --- /dev/null +++ b/DipDupPosition/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - DipDupPosition + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Position +

+ +
+
public struct DipDupPosition: Codable  
+
+
+

Wrapper object to match network response type

+ +
+
+ +
+ + + + + + +%337 + + + +DipDupPosition + + +DipDupPosition + + + + + +Codable + +Codable + + + +DipDupPosition->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ position +

+
+
public let position: [DipDupPositionData] 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupPositionData/index.html b/DipDupPositionData/index.html new file mode 100644 index 00000000..75886f6a --- /dev/null +++ b/DipDupPositionData/index.html @@ -0,0 +1,202 @@ + + + + + + KukaiCoreSwift - DipDupPositionData + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Position​Data +

+ +
+
public struct DipDupPositionData: Codable, Hashable, Equatable  
+
+
+

A position on DipDup corresponds to liquidity token ownership. Each of these objects represents an amount of Liquidity tokens in an exchange for the given address

+ +
+
+ +
+ + + + + + +%785 + + + +DipDupPositionData + + +DipDupPositionData + + + + + +Hashable + +Hashable + + + +DipDupPositionData->Hashable + + + + + +Codable + +Codable + + + +DipDupPositionData->Codable + + + + + +Equatable + +Equatable + + + +DipDupPositionData->Equatable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
Hashable
+
+
+
+

Properties

+ +
+

+ shares​Qty +

+
+
public let sharesQty: String
+
+
+

The liquidity token balance (rpc representation)

+ +
+
+
+

+ exchange +

+
+
public let exchange: DipDupExchange
+
+
+

The exchange the token belongs too

+ +
+
+
+
+

Methods

+ +
+

+ token​Amount() +

+
+
public func tokenAmount() -> TokenAmount  
+
+
+

Convert the token data into a TokenAmount

+ +
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable to enable working with UITableViewDiffableDataSource

+ +
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: DipDupPositionData, rhs: DipDupPositionData) -> Bool  
+
+
+

Conforming to Equatable to enable working with UITableViewDiffableDataSource

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupToken/index.html b/DipDupToken/index.html new file mode 100644 index 00000000..e9f514d2 --- /dev/null +++ b/DipDupToken/index.html @@ -0,0 +1,226 @@ + + + + + + KukaiCoreSwift - DipDupToken + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Dip​Dup​Token +

+ +
+
public struct DipDupToken: Codable, Hashable, Equatable  
+
+
+

DipDup representation of a Token

+ +
+
+ +
+ + + + + + +%29 + + + +DipDupToken + + +DipDupToken + + + + + +Hashable + +Hashable + + + +DipDupToken->Hashable + + + + + +Equatable + +Equatable + + + +DipDupToken->Equatable + + + + + +Codable + +Codable + + + +DipDupToken->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
Hashable
+
+
+
+

Properties

+ +
+

+ symbol +

+
+
public let symbol: String
+
+
+

The user facing symbol of the token

+ +
+
+
+

+ address +

+
+
public let address: String
+
+
+

The TZ address of the token

+ +
+
+
+

+ token​Id +

+
+
public let tokenId: Decimal
+
+
+

The token ID of the token (always 0 for FA1.2 tokens)

+ +
+
+
+

+ decimals +

+
+
public let decimals: Int
+
+
+

The number of decimals for the token

+ +
+
+
+

+ standard +

+
+
public let standard: DipDupTokenStandard
+
+
+

Which standard the token follows

+ +
+
+
+
+

Methods

+ +
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable to enable working with UITableViewDiffableDataSource

+ +
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: DipDupToken, rhs: DipDupToken) -> Bool  
+
+
+

Conforming to Equatable to enable working with UITableViewDiffableDataSource

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DipDupTokenStandard/index.html b/DipDupTokenStandard/index.html new file mode 100644 index 00000000..3137202f --- /dev/null +++ b/DipDupTokenStandard/index.html @@ -0,0 +1,157 @@ + + + + + + KukaiCoreSwift - DipDupTokenStandard + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Dip​Dup​Token​Standard +

+ +
+
public enum DipDupTokenStandard: String, Codable  
+
+
+

Wrapping up the FA standards into an enum

+ +
+
+ +
+ + + + + + +%411 + + + +DipDupTokenStandard + + +DipDupTokenStandard + + + + + +String + +String + + + +DipDupTokenStandard->String + + + + + +Codable + +Codable + + + +DipDupTokenStandard->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Initializers

+ +
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+
+
+

Enumeration Cases

+ +
+

+ fa12 +

+
+
case fa12
+
+
+
+

+ fa2 +

+
+
case fa2
+
+
+
+

+ unknown +

+
+
case unknown
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/DiskService/index.html b/DiskService/index.html index c05be52c..dd80c124 100644 --- a/DiskService/index.html +++ b/DiskService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -121,6 +121,14 @@

Returns

Bool, indicating if the operation was successful

+

+
+

+ delete(file​Names:​) +

+
+
public static func delete(fileNames: [String]) -> Bool  
+

@@ -144,6 +152,18 @@

Check if a fileName exists in the documents directory or not

+
+

+
+

+ all​File​Names​With(prefix:​) +

+
+
public static func allFileNamesWith(prefix: String) -> [String]  
+
+
+

Find all files in documents directory begining with prefix

+
@@ -155,7 +175,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/Error/index.html b/Error/index.html new file mode 100644 index 00000000..3200f15f --- /dev/null +++ b/Error/index.html @@ -0,0 +1,99 @@ + + + + + + KukaiCoreSwift - Error + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + Error +

+
+

Properties

+ +
+

+ code +

+
+
var code: Int  
+
+
+

Access NSError.code

+ +
+
+
+

+ domain +

+
+
var domain: String  
+
+
+

Access NSError.domain

+ +
+
+
+

+ user​Info +

+
+
var userInfo: [String: Any]  
+
+
+

Access NSError.userInfo

+ +
+
+
+

+ underlying​Error +

+
+
var underlyingError: NSError?  
+
+
+

Access NSError.userInfo[NSUnderlyingErrorKey] and cast to swift Error

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ErrorHandlingService/index.html b/ErrorHandlingService/index.html index ceb98fcf..469677aa 100644 --- a/ErrorHandlingService/index.html +++ b/ErrorHandlingService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -64,7 +64,7 @@

error​Event​Closure

-
public var errorEventClosure: ((ErrorResponse) -> Void)? = nil
+
public var errorEventClosure: ((KukaiError) -> Void)? = nil

Called everytime an error is parsed. Extremely useful to track / log errors globally, in order to run logic or record to external service

@@ -75,205 +75,53 @@

Methods

-
+

- parse(string:​and​Log:​) + from​Operation​Error(_:​and​Log:​)

-
public class func parse(string: String, andLog: Bool = true) -> ErrorResponse  
+
public static func fromOperationError(_ opError: OperationResponseInternalResultError, andLog: Bool = true) -> KukaiError  
-

Take in a string and check if it contains a known error string, if so parse into an ErrorResponse object. -Errors from the Tezos RPC will come down inside a large block of JSON, with the error being a string containing the protocol version that the server was running, -some other technical info depending on the circumstances and then a string constant detailing the type of error. THis function was created primarily to just take those -error strings and check to see which constant was present inside it. Its now grown to be more of a general purpose error catcher.

+

Convert an OperationResponseInternalResultError into a KukaiError and optionally log it to the central logger

-
-
    -
  • -

    returns ErrorResponse

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
stringString

A string containing some kind of error, whether it be from Tezos RPC or a string version of a Swift error object

-
and​Long

A bool used to decide whether or not to trigger a console log and the global event callback. Tezos responses often include many errors, some of which are extremely generic. In some cases we will run this function many times on one response and only log the meaningful error we care about.

-
-
+

- parse(data:​response:​network​Error:​request​URL:​request​Data:​) + search​Operation​Response​For​Errors(_:​and​Log:​)

-
public class func parse(data: Data?, response: URLResponse?, networkError: Error?, requestURL: URL, requestData: Data?) -> ErrorResponse?  
+
public static func searchOperationResponseForErrors(_ opResponse: OperationResponse, andLog: Bool = true) -> KukaiError?  
-

Helper method to wrap around parse(string: ...) in order to process generic network responses.

+

Search an OperationResponse to see does it contain any errors, if so return the last one as a KukaiError and optionally log it to the central logger

-
-
    -
  • -

    returns ErrorResponse

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dataData?

A data object returned from URLSession task

-
responseURLResponse?

A URLResponse returned from URLSession task

-
network​ErrorError?

A swift error object returned by the URLSession task

-
request​URLURL

The URL that was requested

-
request​DataData?

The request Data() that was sent to the URL

-
-
+

- contains​Errors(tzkt​Operations:​) + search​Operation​Response​For​Errors(_:​and​Log:​)

-
public class func containsErrors(tzktOperations: [TzKTOperation]) -> Bool  
+
public static func searchOperationResponseForErrors(_ opResponse: [OperationResponse], andLog: Bool = true) -> KukaiError?  
-

Process an array of TzKTOperation to determine if they contain a tezos error object

+

Search an [OperationResponse] to see does it contain any errors, if so return the last one as aKukaiError and optionally log it to the central logger

-
-
    -
  • -

    returns Bool

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - -
tzkt​Operations[TzKTOperation]

An array of operations returned from TzKT

-
-
+

- extract​Meaningful​Errors(from​TzKTOperations:​) + search​For​System​Error(data:​response:​network​Error:​request​URL:​request​Data:​and​Log:​)

-
public class func extractMeaningfulErrors(fromTzKTOperations operations: [TzKTOperation]) -> ErrorResponse?  
+
public static func searchForSystemError(data: Data?, response: URLResponse?, networkError: Error?, requestURL: URL, requestData: Data?, andLog: Bool = true) -> KukaiError?  
-

There are 2 types of high level errors in Tezos.

+

Take in network response data and see does it contain an error, if so return create aKukaiErrorfrom it and optionally log it to the central logger

-
-
    -
  1. Account state errors: These errors are global across the entire ecosystem, and will effect any application, or product. Examples: insufficent balance, invalid address, invalid baker.
  2. -
  3. Script errors: These errors are specific to each application. Examples: Dexter-invalid requested exchange operation, TNS-the requested domain name is unavailable. -When working with smart contracts on Tezos, operations may have internal child operations, each of which can have an error. When an error of type 2 mentioned above, -occurs the array of operations will contain many generic "a unknown script error occured" messages, with one of the operations containing the detailed, application specific error. This function is an -attempt to abstract this logic away from developers, by simply taking in an array of operations, and returning the most meaningful error it can, to reduce time and effort.
  4. -
- -
-

Returns

-

nil if no errors found, useful for checking status, .unknownError if no meaningful errors can be found, or some ErrorResponseType matching the meaningful error

- -
-
-

- extract​Meaningful​Errors(from​RPCOperations:​with​Request​URL:​request​Payload:​response​Payload:​http​Status​Code:​) -

-
-
public class func extractMeaningfulErrors(fromRPCOperations operations: [OperationResponse], withRequestURL: URL?, requestPayload: Data?, responsePayload: Data?, httpStatusCode: Int?) -> ErrorResponse?  
-
-
-

There are 2 types of high level errors in Tezos.

- -
-
-
    -
  1. Account state errors: These errors are global across the entire ecosystem, and will effect any application, or product. Examples: insufficent balance, invalid address, invalid baker.
  2. -
  3. Script errors: These errors are specific to each application. Examples: Dexter-invalid requested exchange operation, TNS-the requested domain name is unavailable. -When working with smart contracts on Tezos, operations may have internal child operations, each of which can have an error. When an error of type 2 mentioned above occurs, -the array of operations will contain many generic "a unknown script error occured" messages, with one of the operations containing the detailed, application specific error. This function is an -attempt to abstract this logic away from developers, by simply taking in an array of operations, and returning the most meaningful error it can, to reduce time and effort.
  4. -
- -
-

Returns

-

nil if no errors found, useful for checking status, .unknownError if no meaningful errors can be found, or some ErrorResponseType matching the meaningful error

-
@@ -284,7 +132,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/ErrorResponse/index.html b/ErrorResponse/index.html deleted file mode 100644 index 7567d4fa..00000000 --- a/ErrorResponse/index.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - KukaiCoreSwift - ErrorResponse - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Error​Response -

- -
-
public struct ErrorResponse: CustomStringConvertible, Error  
-
-
-

This library deals with Errors in many forms that are cumbersome to handle in client applications if passed directly. -This object seeks to wrap up all the necessary data into a single source of truth and provide access to all the necessary pieces of information

- -
-
- -
- - - - - - -%213 - - - -ErrorResponse - - -ErrorResponse - - - - - -CustomStringConvertible - -CustomStringConvertible - - - -ErrorResponse->CustomStringConvertible - - - - - -Error - -Error - - - -ErrorResponse->Error - - - - - - - - -
-

Conforms To

-
-
CustomStringConvertible
-
Error
-
-
-
-

Initializers

- -
-

- init(request​URL:​request​JSON:​response​JSON:​http​Status​Code:​error​Object:​error​String:​error​Type:​) -

-
-
public init(requestURL: URL?, requestJSON: String?, responseJSON: String?, httpStatusCode: Int?, errorObject: Error?, errorString: String?, errorType: ErrorResponseType)  
-
-
-

Create an instance of ErrorResponse with the ability to set every property

- -
-
-
-
-

Properties

- -
-

- request​URL -

-
-
public var requestURL: URL? 
-
-
-

The requested URL that returned the error

- -
-
-
-

- request​JSON -

-
-
public var requestJSON: String? 
-
-
-

The JSON that was sent as part of the request

- -
-
-
-

- response​JSON -

-
-
public var responseJSON: String? 
-
-
-

The raw JSON that was returned

- -
-
-
-

- http​Status​Code -

-
-
public var httpStatusCode: Int? 
-
-
-

The HTTP status code returned

- -
-
-
-

- error​Object -

-
-
public var errorObject: Error? 
-
-
-

The raw Swift error object returned (e.g. to indicate the internet connection is offline, codable failed etc.)

- -
-
-
-

- error​String -

-
-
public var errorString: String? 
-
-
-

A meaningful string containing error information (e.g. in some cases a full string version of a swift error, as opposed to Error.localizedDescription which usually contains nothing useful)

- -
-
-
-

- error​Type -

-
-
public var errorType: ErrorResponseType
-
-
-

An enum to help differeniate high level error catgeories, to quickly and easily display generic error messages to users

- -
-
-
-

- description -

-
-
public var description: String  
-
-
-

Returns detailed error info inside a string, denoting whether it was a network related error, or an internal application error (e.g. couldn't find a file).

- -
-
-
-
-

Methods

- -
-

- error(string:​error​Type:​) -

-
-
public static func error(string: String, errorType: ErrorResponseType) -> ErrorResponse  
-
-
-

Helper to quickly create an instance of ErrorResponse with just a string and a type

- -
-
-
    -
  • -

    returns ErrorResponse

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
stringString

useful error information as a string

-
error​TypeError​Response​Type

enum indicating the type of error

-
-
-
-

- internal​Application​Error(error:​) -

-
-
public static func internalApplicationError(error: Error) -> ErrorResponse  
-
-
-

Helper to quickly create an instance of ErrorResponse indicating an internal application error (e.g. couldn't find file, invalid URL etc.)

- -
-
-
    -
  • -

    returns ErrorResponse

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - -
errorError

the error object indicating the issue

-
-
-
-

- unknown​Parse​Error(error:​) -

-
-
public static func unknownParseError(error: Error) -> ErrorResponse  
-
-
-

Helper to quickly create an instance of ErrorResponse indicating an unknown parsing error occured. (e.g. invalid JSON, wrong model, missing data etc)

- -
-
-
    -
  • -

    returns ErrorResponse

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - -
errorError

the error object thrown by JSONCoder or JSONSerialisation

-
-
-
-

- unknown​Error() -

-
-
public static func unknownError() -> ErrorResponse  
-
-
-

Helper to quickly create an instance of ErrorResponse to use as a fallback for cases wihere the issue is a rare occurence that doesn't fit into one of the main types

- -
-
-
    -
  • -

    returns ErrorResponse

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - -
error

the error object thrown by JSONCoder or JSONSerialisation

-
-
-
-

- error​ToString(_:​) -

-
-
public static func errorToString(_ error: Error?) -> String  
-
-
-

Certian versions of iOS have issues calling "(error)". Return that if possible, or anything else avilable if not

- -
-
-
    -
  • -

    returns full error object as a string

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - -
errorError?

the error object to convert

-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/ErrorResponseType/index.html b/ErrorResponseType/index.html deleted file mode 100644 index 315ceeb7..00000000 --- a/ErrorResponseType/index.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - KukaiCoreSwift - ErrorResponseType - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Enumeration - Error​Response​Type -

- -
-
public enum ErrorResponseType: String, Codable  
-
-
-

High level error types, used to quickly categoise Tezos or system errors, in order to display error messages to user

- -
-
- -
- - - - - - -%181 - - - -ErrorResponseType - - -ErrorResponseType - - - - - -Codable - -Codable - - - -ErrorResponseType->Codable - - - - - -String - -String - - - -ErrorResponseType->String - - - - - - - - -
-

Conforms To

-
-
Codable
-
String
-
-
-
-

Enumeration Cases

- -
-

- unknown​Error -

-
-
case unknownError
-
-
-
-

- unknown​Wallet -

-
-
case unknownWallet
-
-
-
-

- unknown​Balance -

-
-
case unknownBalance
-
-
-
-

- unknown​Parse​Error -

-
-
case unknownParseError
-
-
-
-

- internal​Application​Error -

-
-
case internalApplicationError
-
-
-
-

- no​Internet​Connection -

-
-
case noInternetConnection
-
-
-
-

- request​Time​Out -

-
-
case requestTimeOut
-
-
-
-

- too​Many​Redirects -

-
-
case tooManyRedirects
-
-
-
-

- ats​Unsecure​Connection -

-
-
case atsUnsecureConnection
-
-
-
-

- exchange​Data​Out​OfSync -

-
-
case exchangeDataOutOfSync
-
-
-
-

- exchange​Higher​Than​Zero -

-
-
case exchangeHigherThanZero
-
-
-
-

- insufficient​Funds -

-
-
case insufficientFunds
-
-
-
-

- insufficient​Funds​Delegation -

-
-
case insufficientFundsDelegation
-
-
-
-

- delegation​Unchanged -

-
-
case delegationUnchanged
-
-
-
-

- empty​Transaction -

-
-
case emptyTransaction
-
-
-
-

- invalid​Address -

-
-
case invalidAddress
-
-
-
-

- baker​Cant​Delegate -

-
-
case bakerCantDelegate
-
-
-
-

- invalid​Baker -

-
-
case invalidBaker
-
-
-
-

- exchange​Timeout -

-
-
case exchangeTimeout
-
-
-
-

- exchange​Not​Enough​Fa -

-
-
case exchangeNotEnoughFa
-
-
-
-

- exchange​Not​Enough​Tez -

-
-
case exchangeNotEnoughTez
-
-
-
-

- token​ToToken​Unavailable -

-
-
case tokenToTokenUnavailable
-
-
-
-

- counter​Error -

-
-
case counterError
-
-
-
-

- dexter​Not​Enough​FA -

-
-
case dexterNotEnoughFA
-
-
-
-

- dexter​Not​Enough​Tez -

-
-
case dexterNotEnoughTez
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/FaVersion/index.html b/FaVersion/index.html index d6f38f90..0e07f3d1 100644 --- a/FaVersion/index.html +++ b/FaVersion/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%235 +%119 @@ -66,27 +66,27 @@ - + -Codable +String -Codable +String - - -FaVersion->Codable + + +FaVersion->String - + -String +Codable -String +Codable - - -FaVersion->String + + +FaVersion->Codable @@ -102,6 +102,18 @@

Conforms To

String

+
+

Initializers

+ +
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+

Enumeration Cases

@@ -110,7 +122,7 @@

fa1_2

-
case fa1_2 = "fa1-2"
+
case fa1_2 = "fa1.2"
@@ -138,7 +150,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/FailWith/index.html b/FailWith/index.html new file mode 100644 index 00000000..23512f74 --- /dev/null +++ b/FailWith/index.html @@ -0,0 +1,165 @@ + + + + + + KukaiCoreSwift - FailWith + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Fail​With +

+ +
+
public struct FailWith: Codable, Equatable  
+
+
+

The error string, error int (code), or micheline error object returned inside FailWith

+ +
+
+ +
+ + + + + + +%199 + + + +FailWith + + +FailWith + + + + + +Codable + +Codable + + + +FailWith->Codable + + + + + +Equatable + +Equatable + + + +FailWith->Equatable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
+
+
+

Initializers

+ +
+

+ init(string:​int:​args:​) +

+
+
public init(string: String?, int: String?, args: [[String: String]]?)  
+
+
+
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ string +

+
+
public let string: String? 
+
+
+
+

+ int +

+
+
public let int: String? 
+
+
+
+

+ args +

+
+
public let args: [[String: String]]? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/FailWithParser/index.html b/FailWithParser/index.html new file mode 100644 index 00000000..59a140a9 --- /dev/null +++ b/FailWithParser/index.html @@ -0,0 +1,125 @@ + + + + + + KukaiCoreSwift - FailWithParser + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Protocol + Fail​With​Parser +

+ +
+
public protocol FailWithParser  
+
+
+

Protocol to allow defining multiple dedicated structs, one for each dApp, that knows how to convert the specific failWith cases into more human readable error messages

+ +
+
+ +
+ + + + + + +%433 + + + +FailWithParser + + +FailWithParser + + + + + +FailWithParserLiquidityBaking + + +FailWithParserLiquidityBaking + + + + + +FailWithParserLiquidityBaking->FailWithParser + + + + + + + + +
+

Types Conforming to Fail​With​Parser

+
+
FailWithParserLiquidityBaking
+

Dedicated "FailWith" parser for the codes received from Liquidity Baking contract

+
+
+
+ + + +
+

Requirements

+ +
+

+ parse(fail​With:​) +

+
+
func parse(failWith: FailWith?) -> String? 
+
+
+

Take in a failWith and return a message

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/FailWithParserLiquidityBaking/index.html b/FailWithParserLiquidityBaking/index.html new file mode 100644 index 00000000..22dc5dea --- /dev/null +++ b/FailWithParserLiquidityBaking/index.html @@ -0,0 +1,121 @@ + + + + + + KukaiCoreSwift - FailWithParserLiquidityBaking + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Fail​With​Parser​Liquidity​Baking +

+ +
+
public struct FailWithParserLiquidityBaking: FailWithParser  
+
+
+

Dedicated "FailWith" parser for the codes received from Liquidity Baking contract

+ +
+
+ +
+ + + + + + +%681 + + + +FailWithParserLiquidityBaking + + +FailWithParserLiquidityBaking + + + + + +FailWithParser + + +FailWithParser + + + + + +FailWithParserLiquidityBaking->FailWithParser + + + + + + + + +
+

Conforms To

+
+
FailWithParser
+

Protocol to allow defining multiple dedicated structs, one for each dApp, that knows how to convert the specific failWith cases into more human readable error messages

+
+
+
+
+

Methods

+ +
+

+ parse(fail​With:​) +

+
+
public func parse(failWith: FailWith?) -> String?  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/FeeEstimatorService/index.html b/FeeEstimatorService/index.html index 35017480..fe069abe 100644 --- a/FeeEstimatorService/index.html +++ b/FeeEstimatorService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -55,6 +55,8 @@

Nested Types

FeeEstimatorService.FeeEstimatorServiceError

Various possible errors that can occur during an Estimation

+
FeeEstimatorService.EstimationResult
+

@@ -161,15 +163,16 @@

Methods

-
+

- estimate(operations:​operation​Metadata:​constants:​with​Wallet:​completion:​) + estimate(operations:​operation​Metadata:​constants:​wallet​Address:​base58Encoded​Public​Key:​completion:​)

-
public func estimate(operations: [Operation], operationMetadata: OperationMetadata, constants: NetworkConstants, withWallet wallet: Wallet, completion: @escaping ((Result<[Operation], ErrorResponse>) -> Void))  
+
public func estimate(operations: [Operation], operationMetadata: OperationMetadata, constants: NetworkConstants, walletAddress: String, base58EncodedPublicKey: String, completion: @escaping ((Result<EstimationResult, KukaiError>) -> Void))  
-

Pass in an array of Operation subclasses (use OperationFacotry to create) to have the library estimate the cost of sending the transaction. Function will use local or remote forging based off config passed in.

+

Pass in an array of Operation subclasses (use OperationFacotry to create) to have the library estimate the cost of sending the transaction. Function will use local or remote forging based off config passed in. +If the supplied operations contain suggested fees (e.g. from a dApp) this function will estimate the fee and pick which ever is higher

Parameters

@@ -203,13 +206,13 @@

Parameters

with​Wallet - Wallet +

The Wallet object used for signing the transaction.

completion - @escaping ((Result<[Operation], Error​Response>) -> Void) + @escaping ((Result<Estimation​Result, Kukai​Error>) -> Void)

A callback containing the same operations passed in, modified to include fees.

@@ -255,6 +258,70 @@

Parameters

Returns

An array of OperationFees

+
+
+

+ fee​For​Gas(_:​) +

+
+
public static func feeForGas(_ gas: Int) -> XTZAmount  
+
+
+

Calculate the fee to add for the given amount of gas

+ +
+
+
+

+ fee​For​Storage(_:​number​OfOperations:​) +

+
+
public static func feeForStorage(_ forgedHexString: String, numberOfOperations: Int) -> XTZAmount  
+
+
+

Calculate the fee to add based on the size of the forged string

+ +
+
+
+

+ fee​For​Burn(_:​with​Constants:​) +

+
+
public static func feeForBurn(_ burn: Int, withConstants contants: NetworkConstants) -> XTZAmount  
+
+
+

Calculate the fee to add based on how many bytes of storage where needed

+ +
+
+
+

+ nano​Tezto​XTZ(_:​) +

+
+
public static func nanoTeztoXTZ(_ nanoTez: NanoTez) -> XTZAmount  
+
+
+

Most calcualtions are documented in NanoTez, which is not accpeted by the network RPC calls. Needs to be converted to Mutez / XTZ

+ +
+
+
+

+ fee(for​Gas​Limit:​forged​Hex​String:​number​OfOperations:​) +

+
+
public static func fee(forGasLimit gasLimit: Int, forgedHexString: String, numberOfOperations: Int) -> XTZAmount  
+
+
+
+

+ add​Gas​Safety​Margin​To(gas​Used:​) +

+
+
public static func addGasSafetyMarginTo(gasUsed: Int) -> Int  
+
@@ -265,7 +332,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/FeeEstimatorService_EstimationResult/index.html b/FeeEstimatorService_EstimationResult/index.html new file mode 100644 index 00000000..02703aa6 --- /dev/null +++ b/FeeEstimatorService_EstimationResult/index.html @@ -0,0 +1,127 @@ + + + + + + KukaiCoreSwift - FeeEstimatorService.EstimationResult + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Fee​Estimator​Service.​Estimation​Result +

+ +
+
public struct EstimationResult: Codable  
+
+
+ +
+ + + + + + +%211 + + + +FeeEstimatorService.EstimationResult + + +FeeEstimatorService.EstimationResult + + + + + +Codable + +Codable + + + +FeeEstimatorService.EstimationResult->Codable + + + + + + + + +
+

Member Of

+
+
FeeEstimatorService
+

An object allowing developers to automatically estimate the necessary fee per Operation to ensure it will be accpeted by a Baker. +This avoids the need to ask users to enter a fee, which is not a very user friendly approach as most users wouldn't know what is required.

+
+
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ operations +

+
+
public let operations: [Operation] 
+
+
+
+

+ forged​String +

+
+
public let forgedString: String
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/FeeEstimatorService_FeeConstants/index.html b/FeeEstimatorService_FeeConstants/index.html index bf8a97a0..f45fc2fb 100644 --- a/FeeEstimatorService_FeeConstants/index.html +++ b/FeeEstimatorService_FeeConstants/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -54,7 +54,50 @@

Member Of

+
+

Properties

+
+

+ nano​Tez​Per​Mutez +

+
+
public static let nanoTezPerMutez: Int = 1000
+
+
+
+

+ minimal​Fee +

+
+
public static let minimalFee: NanoTez = 100_000
+
+
+
+

+ fee​Per​Gas​Unit +

+
+
public static let feePerGasUnit: NanoTez = 100
+
+
+
+

+ fee​Per​Storage​Byte +

+
+
public static let feePerStorageByte: NanoTez = 1000
+
+
+
+

+ base​Fee +

+
+
public static let baseFee  
+
+
+
@@ -63,7 +106,7 @@

Member Of

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/FeeEstimatorService_FeeEstimatorServiceError/index.html b/FeeEstimatorService_FeeEstimatorServiceError/index.html index 2e656698..51c51168 100644 --- a/FeeEstimatorService_FeeEstimatorServiceError/index.html +++ b/FeeEstimatorService_FeeEstimatorServiceError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%249 +%803 @@ -123,6 +123,14 @@

case invalidNumberOfFeesReturned
+
+

+ failed​ToCopy​Operations +

+
+
case failedToCopyOperations
+
+

estimation​Remote​Error @@ -140,7 +148,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/GraphQLError/index.html b/GraphQLError/index.html new file mode 100644 index 00000000..08348692 --- /dev/null +++ b/GraphQLError/index.html @@ -0,0 +1,144 @@ + + + + + + KukaiCoreSwift - GraphQLError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Graph​QLError +

+ +
+
public struct GraphQLError: Codable  
+
+
+

GraphQL error object

+ +
+
+ +
+ + + + + + +%743 + + + +GraphQLError + + +GraphQLError + + + + + +Codable + +Codable + + + +GraphQLError->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ message +

+
+
public let message: String
+
+
+

Message sent from the server explaining the issue

+ +
+
+
+

+ locations +

+
+
public let locations: [String: String]? 
+
+
+

Identifying the location fo the issue. E.g. codefile and line, or location of unexpected character/symbol in request string

+ +
+
+
+

+ extenstions +

+
+
public let extenstions: [String: String]? 
+
+
+

Not sure, but it shows up sometimes

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/GraphQLResponse/index.html b/GraphQLResponse/index.html new file mode 100644 index 00000000..963362d6 --- /dev/null +++ b/GraphQLResponse/index.html @@ -0,0 +1,132 @@ + + + + + + KukaiCoreSwift - GraphQLResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Graph​QLResponse +

+ +
+
public struct GraphQLResponse<T: Codable>: Codable  
+
+
+

Simple model object to wrap a GraphQL response to expose a Codable response without having to use large GraphQL libraries

+ +
+
+ +
+ + + + + + +%489 + + + +GraphQLResponse + + +GraphQLResponse + + + + + +Codable + +Codable + + + +GraphQLResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ errors +

+
+
public let errors: [GraphQLError]? 
+
+
+

Array of errors returned from the server

+ +
+
+
+

+ data +

+
+
public let data: T? 
+
+
+

Generic data type matching the user supplied type

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/HDWallet/index.html b/HDWallet/index.html index 3e3c6df6..f4526b31 100644 --- a/HDWallet/index.html +++ b/HDWallet/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -57,35 +57,59 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%27 - + + + +%601 + HDWallet - -HDWallet + +HDWallet + + +Hashable + +Hashable + + + +HDWallet->Hashable + + + + + +Equatable + +Equatable + + + +HDWallet->Equatable + + + - + Wallet - - -Wallet + + +Wallet - + HDWallet->Wallet - - + + @@ -98,80 +122,148 @@

Conforms To

Wallet

Wallet protocol to allow generic handling of all wallets types for signing operations and caching data locally.

+
Equatable
+
Hashable
-
-

Properties

+
+

Initializers

-
+

- default​Derivation​Path + init?(with​Mnemonic:​passphrase:​derivation​Path:​)

-
public static let defaultDerivationPath = "m/44'/1729'/0'/0'"
+
public init?(withMnemonic mnemonic: Mnemonic, passphrase: String, derivationPath: String = HD.defaultDerivationPath)  
-

The default derivation path used by this library

+

Create a HDWallet by supplying a mnemonic string and a passphrase (or "" if none).

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
with​MnemonicMnemonic

A Mnemonic representing a BIP39 menmonic

+
passphraseString

String contianing a passphrase, or empty string if none

+
derivation​PathString

Optional: use a different derivation path to the default HDWallet.defaultDerivationPath

+
-
+

- type + init?(with​Mnemonic​Length:​passphrase:​derivation​Path:​)

-
public let type: WalletType = .hd
+
public convenience init?(withMnemonicLength length: Mnemonic.NumberOfWords, passphrase: String, derivationPath: String = HD.defaultDerivationPath)  
-

The underlying wallet type, set to .hd

+

Create a HDWallet by asking for a mnemonic of a given number of words and a passphrase (or "" if none).

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
with​Mnemonic​LengthMnemonic.​Number​OfWords

Mnemonic.NumberOfWords the number of words to use when creating a mnemonic

+
passphraseString

String contianing a passphrase, or empty string if none

+
derivation​PathString

Optional: use a different derivation path to the default HDWallet.defaultDerivationPath

+
-
+
+
+

Properties

+ +

- seed + type

-
public var seed: String
+
public let type: WalletType
-

The cryptographic seed string, used to generate the key pairs

+

The underlying wallet type, set to .hd

-
+

- private​Key + address

-
public var privateKey: WalletCore.PrivateKey
+
public var address: String
-

An WalletCore object representing the PrivateKey used to generate the wallet

+

The public TZ1 address of the wallet

-
+

- public​Key + private​Key

-
public var publicKey: WalletCore.PublicKey
+
public var privateKey: PrivateKey
-

An WalletCore object representing the PublicKey used to generate the wallet address

+

An WalletCore object representing the PrivateKey used to generate the wallet

-
+

- address + public​Key

-
public var address: String
+
public var publicKey: PublicKey
-

The public TZ1 address of the wallet

+

An WalletCore object representing the PublicKey used to generate the wallet address

@@ -180,7 +272,7 @@

mnemonic

-
public var mnemonic: String
+
public var mnemonic: Mnemonic

The Bip39 mnemonic used to generate the wallet

@@ -203,136 +295,86 @@

Methods

-
+

- create(with​Mnemonic:​passphrase:​derivation​Path:​) + sign(_:​is​Operation:​completion:​)

-
public static func create(withMnemonic mnemonic: String, passphrase: String, derivationPath: String = HDWallet.defaultDerivationPath) -> HDWallet?  
+
public func sign(_ hex: String, isOperation: Bool, completion: @escaping ((Result<[UInt8], KukaiError>) -> Void))  
-

Create a HDWallet by supplying a mnemonic string and a passphrase (or "" if none).

+

Sign a hex payload with the private key

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
with​MnemonicString

String contianing a Bip39 mnemonic

-
passphraseString

String contianing a passphrase, or empty string if none

-
derivation​PathString

Optional: use a different derivation path to the default HDWallet.defaultDerivationPath

-
-
+

- create(with​Mnemonic​Length:​passphrase:​derivation​Path:​) + private​Key​Curve()

-
public static func create(withMnemonicLength length: MnemonicPhraseLength, passphrase: String, derivationPath: String = HDWallet.defaultDerivationPath) -> HDWallet?  
+
public func privateKeyCurve() -> EllipticalCurve  
-

Create a HDWallet by asking for a mnemonic of a given number of words and a passphrase (or "" if none).

+

Return the curve used to create the key

-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
with​Mnemonic

String contianing a Bip39 mnemonic

-
passphraseString

String contianing a passphrase, or empty string if none

-
derivation​PathString

Optional: use a different derivation path to the default HDWallet.defaultDerivationPath

-
-
+

- sign(_:​) + public​Key​Base58encoded()

-
public func sign(_ hex: String) -> [UInt8]?  
+
public func publicKeyBase58encoded() -> String  
-

Takes in a forged operation hex string, and signs it with the underlying privateKey.

+

Get a Base58 encoded version of the public key, in order to reveal the address on the network

-

Returns

-

An array of UInt8 bytes

-
-
+

- private​Key​Curve() + create​Child(account​Index:​)

-
public func privateKeyCurve() -> EllipticalCurve  
+
public func createChild(accountIndex: Int) -> HDWallet?  
-

Return the EllipticalCurve used to create the wallet

+

The default implementation in Ledger is to not give users the option to provide their own derivation path, but instead increment the "account" field by 1 each time. +This function will create a new HDWallet, by taking the default derivation path and changing the account to the index supplied, and using the same key

-

Returns

-

The given elliptical curve

-
-
+

- public​Key​Base58encoded() + create​Child(derivation​Path:​)

-
public func publicKeyBase58encoded() -> String  
+
public func createChild(derivationPath: String) -> HDWallet?  
-

Get a Base58 encoded version of the publicKey, used for performing a reveal operation

+

This function will create a new HDWallet, by using the same key combined with the supplied derivationPath

-

Returns

-

String contianing a Base58 encoded publicKey

+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+
+
+

Operators

+
+

+ == +

+
+
public static func == (lhs: HDWallet, rhs: HDWallet) -> Bool  
+
@@ -343,7 +385,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/MichelsonParseError/index.html b/HDWalletError/index.html similarity index 70% rename from MichelsonParseError/index.html rename to HDWalletError/index.html index 33be8ad6..cef98224 100644 --- a/MichelsonParseError/index.html +++ b/HDWalletError/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - MichelsonParseError + KukaiCoreSwift - HDWalletError
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Enumeration - Michelson​Parse​Error + HDWallet​Error

-
public enum MichelsonParseError: Error  
+
public enum HDWalletError: Error  
-

Custom Errors that can be returned by the decode or encode functions

+

Error types that can be passed by failable inits

@@ -51,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%177 +%165 - + -MichelsonParseError - +HDWalletError + -MichelsonParseError +HDWalletError @@ -72,9 +72,9 @@ Error - + -MichelsonParseError->Error +HDWalletError->Error @@ -82,7 +82,7 @@ - +

Conforms To

@@ -92,12 +92,12 @@

Conforms To

Enumeration Cases

-
+

- NoKeys​Matching​Constants​Found + invalid​Wallet​Core​Wallet

-
case NoKeysMatchingConstantsFound
+
case invalidWalletCoreWallet
@@ -109,7 +109,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/KeyedDecodingContainer/index.html b/KeyedDecodingContainer/index.html new file mode 100644 index 00000000..55ceaa97 --- /dev/null +++ b/KeyedDecodingContainer/index.html @@ -0,0 +1,71 @@ + + + + + + KukaiCoreSwift - KeyedDecodingContainer + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + KeyedDecodingContainer +

+
+

Methods

+ +
+

+ decode(_:​for​Key:​) +

+
+
func decode<T>(_ type: NilOnDecodingError<T>.Type, forKey key: Self.Key) throws -> NilOnDecodingError<T> where T: Decodable  
+
+
+
+

+ decode​IfPresent(_:​for​Key:​or​Backup​Key:​) +

+
+
func decodeIfPresent<T>(_ type: T.Type, forKey key: Self.Key, orBackupKey: Self.Key) throws -> T? where T: Decodable  
+
+
+

In case where people have not followed the spec correctly, and named keys slightly differently, allow a second key to be used so that, for example, we could check for artifcatUri or artifact_uri in one call

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/KukaiError/index.html b/KukaiError/index.html new file mode 100644 index 00000000..2e9a0b0e --- /dev/null +++ b/KukaiError/index.html @@ -0,0 +1,312 @@ + + + + + + KukaiCoreSwift - KukaiError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Kukai​Error +

+ +
+
public struct KukaiError: CustomStringConvertible, Error  
+
+
+

A struct conforming to Error, attempting to handle errors from all sources (RPC, network, OS, other services/components/libraries), without the implementing code having to deal with each layer themselves. +Comes with helpers to extract meaning from RPC errors, optionally includes all the network data that caused the error for easier retrieval, and a fallback human readbale description to ensure something useful is always shown to the user.

+ +
+
+ +
+ + + + + + +%47 + + + +KukaiError + + +KukaiError + + + + + +Error + +Error + + + +KukaiError->Error + + + + + +CustomStringConvertible + +CustomStringConvertible + + + +KukaiError->CustomStringConvertible + + + + + + + + +
+

Nested Types

+
+
KukaiError.ErrorType
+

Categories of errors that are possible

+
+
+

Conforms To

+
+
CustomStringConvertible
+
Error
+
+
+
+

Properties

+ +
+

+ error​Type +

+
+
public let errorType: ErrorType
+
+
+

The error category

+ +
+
+
+

+ sub​Type +

+
+
public let subType: Error? 
+
+
+

Optional error subType coming from another source (the OS, URLSession, another library etc)

+ +
+
+
+

+ rpc​Error​String +

+
+
public let rpcErrorString: String? 
+
+
+

Optional string containing only the relvant portion of an RPC error (e.g instead of "proto.xxxxxxxx.gas_exhausted.operation", it would contain "gas_exhausted.operation") to make parsing easier

+ +
+
+
+

+ fail​With +

+
+
public let failWith: FailWith? 
+
+
+

Optional object containing smart contract failure casues. May contain an Int (error code), a String (semi human readbale error message), and/or a dictionary containing metadata

+ +
+
+
+

+ request​URL +

+
+
public var requestURL: URL? 
+
+
+

The requested URL that returned the error

+ +
+
+
+

+ request​JSON +

+
+
public var requestJSON: String? 
+
+
+

The JSON that was sent as part of the request

+ +
+
+
+

+ response​JSON +

+
+
public var responseJSON: String? 
+
+
+

The raw JSON that was returned

+ +
+
+
+

+ http​Status​Code +

+
+
public var httpStatusCode: Int? 
+
+
+

The HTTP status code returned

+ +
+
+
+

+ description +

+
+
public var description: String  
+
+
+

Prints the underlying error type with either an RPC string, or an underlying Error object contents

+ +
+
+
+
+

Methods

+ +
+

+ rpc​Error(rpc​Error​String:​and​Fail​With:​) +

+
+
public static func rpcError(rpcErrorString: String, andFailWith: FailWith?) -> KukaiError  
+
+
+

Create a KukaiError from an RPC string (will not be validated). You can use the string extension .removeLeadingProtocolFromRPCError() to strip the leading poriton of the error

+ +
+
+
+

+ system​Error(sub​Type:​) +

+
+
public static func systemError(subType: Error) -> KukaiError  
+
+
+

Create a KukaiError denoting a sytem issue from the OS, by passing in the system Error type

+ +
+
+
+

+ network​Error(status​Code:​) +

+
+
public static func networkError(statusCode: Int) -> KukaiError  
+
+
+

Create a KukaiError denoting a network issue, by passing in the HTTP status code

+ +
+
+
+

+ internal​Application​Error(error:​) +

+
+
public static func internalApplicationError(error: Error) -> KukaiError  
+
+
+

Create a KukaiError denoting an issue from some other component or library, by passing in the error that piece of code returned

+ +
+
+
+

+ unknown(with​String:​) +

+
+
public static func unknown(withString: String? = nil) -> KukaiError  
+
+
+

Create an unknown KukaiError

+ +
+
+
+

+ add​Network​Data(request​URL:​request​JSON:​response​JSON:​http​Status​Code:​) +

+
+
public mutating func addNetworkData(requestURL: URL?, requestJSON: Data?, responseJSON: Data?, httpStatusCode: Int?)  
+
+
+

For network errors, attach all the necessary network data that may be needed in order to debug the issue, or log to a tool such as sentry

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/KukaiError_ErrorType/index.html b/KukaiError_ErrorType/index.html new file mode 100644 index 00000000..9b2a8074 --- /dev/null +++ b/KukaiError_ErrorType/index.html @@ -0,0 +1,175 @@ + + + + + + KukaiCoreSwift - KukaiError.ErrorType + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Kukai​Error.​Error​Type +

+ +
+
public enum ErrorType: Equatable  
+
+
+

Categories of errors that are possible

+ +
+
+ +
+ + + + + + +%377 + + + +KukaiError.ErrorType + + +KukaiError.ErrorType + + + + + +Equatable + +Equatable + + + +KukaiError.ErrorType->Equatable + + + + + + + + +
+

Member Of

+
+
KukaiError
+

A struct conforming to Error, attempting to handle errors from all sources (RPC, network, OS, other services/components/libraries), without the implementing code having to deal with each layer themselves. +Comes with helpers to extract meaning from RPC errors, optionally includes all the network data that caused the error for easier retrieval, and a fallback human readbale description to ensure something useful is always shown to the user.

+
+
+

Conforms To

+
+
Equatable
+
+
+
+

Enumeration Cases

+ +
+

+ rpc +

+
+
case rpc
+
+
+

RPC errors come directly from the Tezos RPC, but with the massive JSON object filtered down to the most meraningful part

+ +
+
+
+

+ system +

+
+
case system
+
+
+

System errors are ones coming from the OS, e.g. "No internet connection"

+ +
+
+
+

+ network +

+
+
case network(Int) 
+
+
+

Network errors are returned by a server, such as HTTP 404's and 500's

+ +
+
+
+

+ internal​Application +

+
+
case internalApplication
+
+
+

Internal application errors are errors from other services, components, libraiers etc, wrapped up so that they don't require extra parsing

+ +
+
+
+

+ unknown +

+
+
case unknown
+
+
+

Used as a fallback for strange edge cases where we can't easily idenitfiy the issue

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/LedgerService/index.html b/LedgerService/index.html new file mode 100644 index 00000000..a95f7841 --- /dev/null +++ b/LedgerService/index.html @@ -0,0 +1,459 @@ + + + + + + KukaiCoreSwift - LedgerService + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Ledger​Service +

+ +
+
public class LedgerService: NSObject, CBPeripheralDelegate, CBCentralManagerDelegate  
+
+
+

A service class to wrap up all the complicated interactions with CoreBluetooth and the modified version of ledgerjs, needed to communicate with a Ledger Nano X.

+ +
+
+

Ledger only provide a ReactNative module for third parties to integrate with. The architecture of the module also makes it very difficult to +integrate with native mobile (if it can be packaged up) as it relies heavily on long observable chains passing through many classes and functions. +To overcome this, I copied the base logic from multiple ledgerjs classes into a single typescript file and split the functions up into more of a utility style class, where +each function returns a result, that must be passed into another function. This allowed the creation of a swift class to sit in the middle of these +functions and decide what to do with the responses.

+ +

The modified typescript can be found in this file (under a fork of the main repo) https://github.com/simonmcl/ledgerjs/blob/native-mobile/packages/hw-app-tezos/src/NativeMobileTezos.ts . +The containing package also includes a webpack file, which will package up the typescript and its dependencies into mobile friendly JS file, which +needs to be included in the swift project. Usage of the JS can be seen below.

+ +

NOTE: this modified typescript is Tezos only as I was unable to find a way to simply subclass their Transport class, to produce a re-usable +NativeMobile transport. The changes required modifiying the app and other class logic which became impossible to refactor back into the project, without rewriting everything.

+ +
+
+ +
+ + + + + + +%229 + + + +LedgerService + + +LedgerService + + + + + +NSObject + +NSObject + + + +LedgerService->NSObject + + + + + +CBCentralManagerDelegate + +CBCentralManagerDelegate + + + +LedgerService->CBCentralManagerDelegate + + + + + +CBPeripheralDelegate + +CBPeripheralDelegate + + + +LedgerService->CBPeripheralDelegate + + + + + + + + +
+

Nested Types

+
+
LedgerService.GeneralErrorCodes
+

General Ledger error codes, pulled from the source, and some additional ones added for native swift issues

+
+
LedgerService.TezosAppErrorCodes
+

Dedicated error codes pulled from the Ledger tezos app

+
+
+

Conforms To

+
+
CBCentralManagerDelegate
+
CBPeripheralDelegate
+
NSObject
+
+
+
+

Properties

+ +
+

+ success​Code +

+
+
public static let successCode = "9000"
+
+
+

Instead of returning data, sometimes ledger returns a code to indicate that so far the message have been received successfully

+ +
+
+
+

+ partial​Success​Message​Received +

+
+
@Published public var partialSuccessMessageReceived: Bool = false
+
+
+

Be notified when the ledger device returns a success message, part way through the process. +This can be useful to indicate to users that the request has succeed, but s waiting on input on the Ledger device to continue

+ +
+
+
+

+ shared +

+
+
public static let shared  
+
+
+

Public shared instace to avoid having multiple copies of the underlying JSContext created

+ +
+
+
+
+

Methods

+ +
+

+ listen​For​Devices() +

+
+
public func listenForDevices() -> AnyPublisher<[String: String], KukaiError>  
+
+
+

Start listening for ledger devices

+ +
+

Returns

+

Publisher with a dictionary of [UUID: deviceName] or an KukaiError

+ +
+
+

+ stop​Listening() +

+
+
public func stopListening()  
+
+
+

Stop listening for and reporting new ledger devices found

+ +
+
+
+

+ connect​To(uuid:​) +

+
+
public func connectTo(uuid: String) -> AnyPublisher<Bool, KukaiError>  
+
+
+

Connect to a ledger device by a given UUID

+ +
+

Returns

+

Publisher which will indicate true / false, or return an KukaiError if it can't connect to bluetooth

+ +
+
+

+ disconnect​From​Device() +

+
+
public func disconnectFromDevice()  
+
+
+

Disconnect from the current Ledger device

+ +
+

Returns

+

A Publisher with a boolean, or KukaiError if soemthing goes wrong

+ +
+
+

+ get​Connected​Device​UUID() +

+
+
public func getConnectedDeviceUUID() -> String?  
+
+
+

Get the UUID of the connected device

+ +
+

Returns

+

a string if it can be found

+ +
+
+

+ get​Address(for​Derivation​Path:​curve:​verify:​) +

+
+
public func getAddress(forDerivationPath derivationPath: String = HD.defaultDerivationPath, curve: EllipticalCurve = .ed25519, verify: Bool) -> AnyPublisher<(address: String, publicKey: String), KukaiError>  
+
+
+

Get a TZ address and public key from the current connected Ledger device

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
for​Derivation​PathString

Optional. The derivation path to use to extract the address from the underlying HD wallet

+
curveElliptical​Curve

Optional. The EllipticalCurve to use to extract the address

+
verifyBool

Whether or not to ask the ledger device to prompt the user to show them what the TZ address should be, to ensure the mobile matches

+
+

Returns

+

A publisher which will return a tuple containing the address and publicKey, or an KukaiError

+ +
+
+

+ sign(hex:​for​Derivation​Path:​parse:​) +

+
+
public func sign(hex: String, forDerivationPath derivationPath: String = HD.defaultDerivationPath, parse: Bool) -> AnyPublisher<String, KukaiError>   
+
+
+

Sign an operation payload with the underlying secret key, returning the signature

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
hexString

An operation converted to JSON, forged and watermarked, converted to a hex string. (Note: there are some issues with the ledger app signing batch transactions. May simply return no result at all. Can't run REVEAL and TRANSACTION together for example)

+
for​Derivation​PathString

Optional. The derivation path to use to extract the address from the underlying HD wallet

+
parseBool

Ledger can parse non-hashed (blake2b) hex data and display operation data to user (e.g. transfer 1 XTZ to TZ1abc, for fee: 0.001). There are many limitations around what can be parsed. Frequnetly it will require passing in false

+
+

Returns

+

A Publisher which will return a string containing the hex signature, or an KukaiError

+ +
+
+

+ central​Manager​Did​Update​State(_:​) +

+
+
public func centralManagerDidUpdateState(_ central: CBCentralManager)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ central​Manager(_:​did​Discover:​advertisement​Data:​rssi:​) +

+
+
public func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ central​Manager(_:​did​Connect:​) +

+
+
public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ central​Manager(_:​did​Fail​ToConnect:​error:​) +

+
+
public func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ peripheral(_:​did​Discover​Services:​) +

+
+
public func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ peripheral(_:​did​Discover​Characteristics​For:​error:​) +

+
+
public func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ peripheral(_:​did​Write​Value​For:​error:​) +

+
+
public func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+

+ peripheral(_:​did​Update​Value​For:​error:​) +

+
+
public func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?)  
+
+
+

CBCentralManagerDelegate function, must be marked public because of protocol definition

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/LedgerService_GeneralErrorCodes/index.html b/LedgerService_GeneralErrorCodes/index.html new file mode 100644 index 00000000..eefbc46e --- /dev/null +++ b/LedgerService_GeneralErrorCodes/index.html @@ -0,0 +1,404 @@ + + + + + + KukaiCoreSwift - LedgerService.GeneralErrorCodes + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Ledger​Service.​General​Error​Codes +

+ +
+
public enum GeneralErrorCodes: String, Error, Codable  
+
+
+

General Ledger error codes, pulled from the source, and some additional ones added for native swift issues

+ +
+
+ +
+ + + + + + +%541 + + + +LedgerService.GeneralErrorCodes + + +LedgerService.GeneralErrorCodes + + + + + +String + +String + + + +LedgerService.GeneralErrorCodes->String + + + + + +Error + +Error + + + +LedgerService.GeneralErrorCodes->Error + + + + + +Codable + +Codable + + + +LedgerService.GeneralErrorCodes->Codable + + + + + + + + +
+

Member Of

+
+
LedgerService
+

A service class to wrap up all the complicated interactions with CoreBluetooth and the modified version of ledgerjs, needed to communicate with a Ledger Nano X.

+
+
+

Conforms To

+
+
Codable
+
Error
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ PIN_REMAINING_ATTEMPTS +

+
+
case PIN_REMAINING_ATTEMPTS = "63c0"
+
+
+
+

+ INCORRECT_LENGTH +

+
+
case INCORRECT_LENGTH = "6700"
+
+
+
+

+ MISSING_CRITICAL_PARAMETER +

+
+
case MISSING_CRITICAL_PARAMETER = "6800"
+
+
+
+

+ COMMAND_INCOMPATIBLE_FILE_STRUCTURE +

+
+
case COMMAND_INCOMPATIBLE_FILE_STRUCTURE = "6981"
+
+
+
+

+ SECURITY_STATUS_NOT_SATISFIED +

+
+
case SECURITY_STATUS_NOT_SATISFIED = "6982"
+
+
+
+

+ CONDITIONS_OF_USE_NOT_SATISFIED +

+
+
case CONDITIONS_OF_USE_NOT_SATISFIED = "6985"
+
+
+
+

+ INCORRECT_DATA +

+
+
case INCORRECT_DATA = "6a80"
+
+
+
+

+ NOT_ENOUGH_MEMORY_SPACE +

+
+
case NOT_ENOUGH_MEMORY_SPACE = "6a84"
+
+
+
+

+ REFERENCED_DATA_NOT_FOUND +

+
+
case REFERENCED_DATA_NOT_FOUND = "6a88"
+
+
+
+

+ FILE_ALREADY_EXISTS +

+
+
case FILE_ALREADY_EXISTS = "6a89"
+
+
+
+

+ INCORRECT_P1_P2 +

+
+
case INCORRECT_P1_P2 = "6b00"
+
+
+
+

+ INS_NOT_SUPPORTED +

+
+
case INS_NOT_SUPPORTED = "6d00"
+
+
+
+

+ CLA_NOT_SUPPORTED +

+
+
case CLA_NOT_SUPPORTED = "6e00"
+
+
+
+

+ TECHNICAL_PROBLEM +

+
+
case TECHNICAL_PROBLEM = "6f00"
+
+
+
+

+ MEMORY_PROBLEM +

+
+
case MEMORY_PROBLEM = "9240"
+
+
+
+

+ NO_EF_SELECTED +

+
+
case NO_EF_SELECTED = "9400"
+
+
+
+

+ INVALID_OFFSET +

+
+
case INVALID_OFFSET = "9402"
+
+
+
+

+ FILE_NOT_FOUND +

+
+
case FILE_NOT_FOUND = "9404"
+
+
+
+

+ INCONSISTENT_FILE +

+
+
case INCONSISTENT_FILE = "9408"
+
+
+
+

+ ALGORITHM_NOT_SUPPORTED +

+
+
case ALGORITHM_NOT_SUPPORTED = "9484"
+
+
+
+

+ INVALID_KCV +

+
+
case INVALID_KCV = "9485"
+
+
+
+

+ CODE_NOT_INITIALIZED +

+
+
case CODE_NOT_INITIALIZED = "9802"
+
+
+
+

+ ACCESS_CONDITION_NOT_FULFILLED +

+
+
case ACCESS_CONDITION_NOT_FULFILLED = "9804"
+
+
+
+

+ CONTRADICTION_SECRET_CODE_STATUS +

+
+
case CONTRADICTION_SECRET_CODE_STATUS = "9808"
+
+
+
+

+ CONTRADICTION_INVALIDATION +

+
+
case CONTRADICTION_INVALIDATION = "9810"
+
+
+
+

+ CODE_BLOCKED +

+
+
case CODE_BLOCKED = "9840"
+
+
+
+

+ MAX_VALUE_REACHED +

+
+
case MAX_VALUE_REACHED = "9850"
+
+
+
+

+ GP_AUTH_FAILED +

+
+
case GP_AUTH_FAILED = "6300"
+
+
+
+

+ LICENSING +

+
+
case LICENSING = "6f42"
+
+
+
+

+ HALTED +

+
+
case HALTED = "6faa"
+
+
+
+

+ DEVICE_LOCKED +

+
+
case DEVICE_LOCKED = "009000"
+
+
+
+

+ UNKNOWN +

+
+
case UNKNOWN = "99999999"
+
+
+
+

+ NO_WRITE_CHARACTERISTIC +

+
+
case NO_WRITE_CHARACTERISTIC = "99999996"
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/LedgerService_TezosAppErrorCodes/index.html b/LedgerService_TezosAppErrorCodes/index.html new file mode 100644 index 00000000..87c6a199 --- /dev/null +++ b/LedgerService_TezosAppErrorCodes/index.html @@ -0,0 +1,236 @@ + + + + + + KukaiCoreSwift - LedgerService.TezosAppErrorCodes + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Ledger​Service.​Tezos​App​Error​Codes +

+ +
+
public enum TezosAppErrorCodes: String, Error, Codable  
+
+
+

Dedicated error codes pulled from the Ledger tezos app

+ +
+
+ +
+ + + + + + +%67 + + + +LedgerService.TezosAppErrorCodes + + +LedgerService.TezosAppErrorCodes + + + + + +String + +String + + + +LedgerService.TezosAppErrorCodes->String + + + + + +Error + +Error + + + +LedgerService.TezosAppErrorCodes->Error + + + + + +Codable + +Codable + + + +LedgerService.TezosAppErrorCodes->Codable + + + + + + + + +
+

Member Of

+
+
LedgerService
+

A service class to wrap up all the complicated interactions with CoreBluetooth and the modified version of ledgerjs, needed to communicate with a Ledger Nano X.

+
+
+

Conforms To

+
+
Codable
+
Error
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ EXC_WRONG_PARAM +

+
+
case EXC_WRONG_PARAM = "6B00"
+
+
+
+

+ EXC_WRONG_LENGTH +

+
+
case EXC_WRONG_LENGTH = "6C00"
+
+
+
+

+ EXC_INVALID_INS +

+
+
case EXC_INVALID_INS = "6D00"
+
+
+
+

+ EXC_WRONG_LENGTH_FOR_INS +

+
+
case EXC_WRONG_LENGTH_FOR_INS = "917E"
+
+
+
+

+ EXC_REJECT +

+
+
case EXC_REJECT = "6985"
+
+
+
+

+ EXC_PARSE_ERROR +

+
+
case EXC_PARSE_ERROR = "9405"
+
+
+
+

+ EXC_REFERENCED_DATA_NOT_FOUND +

+
+
case EXC_REFERENCED_DATA_NOT_FOUND = "6A88"
+
+
+
+

+ EXC_WRONG_VALUES +

+
+
case EXC_WRONG_VALUES = "6A80"
+
+
+
+

+ EXC_SECURITY +

+
+
case EXC_SECURITY = "6982"
+
+
+
+

+ EXC_HID_REQUIRED +

+
+
case EXC_HID_REQUIRED = "6983"
+
+
+
+

+ EXC_CLASS +

+
+
case EXC_CLASS = "6E00"
+
+
+
+

+ EXC_MEMORY_ERROR +

+
+
case EXC_MEMORY_ERROR = "9200"
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/LedgerWallet/index.html b/LedgerWallet/index.html new file mode 100644 index 00000000..d146bc0c --- /dev/null +++ b/LedgerWallet/index.html @@ -0,0 +1,293 @@ + + + + + + KukaiCoreSwift - LedgerWallet + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Ledger​Wallet +

+ +
+
public class LedgerWallet: Wallet  
+
+
+

A Tezos wallet class, used to cache infomration regarding the paired ledger device used to sign the payload. +This class can only be created by fetching data from a Ledger device and supplying this data to the constructor.

+ +
+
+

It is not possible to call the async sign function of this class, it will return null. Signing with a ledger is a complicated async process. +Please use the LedgerService class to setup a bluetooth connection, connect to the device and request a payload signing.

+ +
+
+ +
+ + + + + + +%697 + + + +LedgerWallet + + +LedgerWallet + + + + + +Wallet + + +Wallet + + + + + +LedgerWallet->Wallet + + + + + + + + +
+

Conforms To

+
+
Wallet
+

Wallet protocol to allow generic handling of all wallets types for signing operations and caching data locally.

+
+
+
+
+

Initializers

+ +
+

+ init?(address:​public​Key:​derivation​Path:​curve:​ledger​UUID:​) +

+
+
public init?(address: String, publicKey: String, derivationPath: String, curve: EllipticalCurve, ledgerUUID: String)  
+
+
+

Create an instance of a LedgerWallet. Can return nil if invalid public key supplied

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addressString

The TZ address pulled from the Ledger device

+
public​KeyString

The hex string denoting the public key, pulled from the ledger device

+
derivation​PathString

The derivation path used to fetch the address / publicKey

+
curveElliptical​Curve

The elliptical curve used to fetch the address / public key

+
ledger​UUIDString

The unique Ledger UUID to identify the Ledger

+
+
+
+
+

Properties

+ +
+

+ type +

+
+
public var type = WalletType.ledger
+
+
+

The wallet type, hardcoded to always be WalletType.ledger

+ +
+
+
+

+ address +

+
+
public var address: String
+
+
+

The TZ address pulled from the Ledger device, cached to avoid complex retrieval when fetching balances etc.

+ +
+
+
+

+ public​Key +

+
+
public var publicKey: String
+
+
+

The raw hex public key extracted from the Ledger, needed in order to perform REVEAL operations

+ +
+
+
+

+ derivation​Path +

+
+
public var derivationPath: String
+
+
+

The derivation path used to fetch the address and public key

+ +
+
+
+

+ curve +

+
+
public var curve: EllipticalCurve
+
+
+

The elliptical curve used to fetch the address and public key

+ +
+
+
+

+ ledger​UUID +

+
+
public var ledgerUUID: String
+
+
+

The unique ledger UUID, that corresponds to this wallet address

+ +
+
+
+
+

Methods

+ +
+

+ sign(_:​is​Operation:​completion:​) +

+
+
public func sign(_ hex: String, isOperation: Bool, completion: @escaping ((Result<[UInt8], KukaiError>) -> Void))  
+
+
+

Sign a hex string. +If the string starts with "03" and is not 32 characters long, it will be treated as a watermarked operation and Ledger will be asked to parse + display the operation details. +Else it will be treated as an unknown operation and will simply display the Blake2b hash. +Please be careful when asking the Ledger to parse (passing in an operation), Ledgers have very limited display ability. Keep it to a single operation, not invoking a smart contract

+ +
+
+
+

+ private​Key​Curve() +

+
+
public func privateKeyCurve() -> EllipticalCurve  
+
+
+

Function to extract the curve used to create the public key

+ +
+
+
+

+ public​Key​Base58encoded() +

+
+
public func publicKeyBase58encoded() -> String  
+
+
+

Function to convert the public key into a Base58 encoded string

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/LinearWallet/index.html b/LinearWallet/index.html deleted file mode 100644 index e277f5b0..00000000 --- a/LinearWallet/index.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - KukaiCoreSwift - LinearWallet - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Linear​Wallet -

- -
-
public class LinearWallet: Wallet  
-
-
-

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. -You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. -In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

- -
-
-

This wallet is a non-HD wallet, sometimes referred to as a "legacy" wallet. It follows the Bip39 standard for generation via menmonic.

- -
-
- -
- - - - - - -%341 - - - -LinearWallet - - -LinearWallet - - - - - -Wallet - - -Wallet - - - - - -LinearWallet->Wallet - - - - - - - - -
-

Conforms To

-
-
Wallet
-

Wallet protocol to allow generic handling of all wallets types for signing operations and caching data locally.

-
-
-
-
-

Initializers

- -
-

- init(with​Private​Key:​elliptical​Curve:​) -

-
-
public init(withPrivateKey: String, ellipticalCurve: EllipticalCurve)  
-
-
-
-
-

Properties

- -
-

- type -

-
-
public let type: WalletType = .linear
-
-
-

The underlying wallet type, set to .linear

- -
-
-
-

- seed -

-
-
public var seed: String
-
-
-

The cryptographic seed string, used to generate the key pairs

- -
-
-
-

- private​Key -

-
-
public var privateKey: SecretKey
-
-
-

An object representing the PrivateKey used to generate the wallet

- -
-
-
-

- public​Key -

-
-
public var publicKey: PublicKey
-
-
-

An object representing the PublicKey used to generate the wallet address

- -
-
-
-

- address -

-
-
public var address: String
-
-
-

The public TZ1 or TZ2 address of the wallet

- -
-
-
-

- mnemonic -

-
-
public var mnemonic: String
-
-
-

The Bip39 mnemonic used to generate the wallet

- -
-
-
-
-

Methods

- -
-

- create(with​Mnemonic:​passphrase:​elliptical​Curve:​) -

-
-
public static func create(withMnemonic mnemonic: String, passphrase: String, ellipticalCurve: EllipticalCurve = .ed25519) -> LinearWallet?  
-
-
-

Create a LinearWallet by supplying a mnemonic string and a passphrase (or "" if none).

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
with​MnemonicString

String contianing a Bip39 mnemonic

-
passphraseString

String contianing a passphrase, or empty string if none

-
elliptical​CurveElliptical​Curve

Optional: Choose the EllipticalCurve used to generate the wallet address

-
-
-
-

- create(with​Mnemonic​Length:​passphrase:​elliptical​Curve:​) -

-
-
public static func create(withMnemonicLength length: MnemonicPhraseLength, passphrase: String, ellipticalCurve: EllipticalCurve = .ed25519) -> LinearWallet?   
-
-
-

Create a LinearWallet by asking for a mnemonic of a given number of words and a passphrase (or "" if none).

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
with​Mnemonic​LengthMnemonic​Phrase​Length

MnemonicPhraseLength the number of words to use when creating a mnemonic

-
passphraseString

String contianing a passphrase, or empty string if none

-
elliptical​CurveElliptical​Curve

Optional: Choose the EllipticalCurve used to generate the wallet address

-
-
-
-

- sign(_:​) -

-
-
public func sign(_ hex: String) -> [UInt8]?  
-
-
-

Takes in a forged operation hex string, and signs it with the underlying privateKey.

- -
-

Returns

-

An array of UInt8 bytes

- -
-
-

- private​Key​Curve() -

-
-
public func privateKeyCurve() -> EllipticalCurve  
-
-
-

Return the EllipticalCurve used to create the wallet

- -
-

Returns

-

The given elliptical curve

- -
-
-

- public​Key​Base58encoded() -

-
-
public func publicKeyBase58encoded() -> String  
-
-
-

Get a Base58 encoded version of the publicKey, used for performing a reveal operation

- -
-

Returns

-

String contianing a Base58 encoded publicKey

- -
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/BetterCallDevAccount/index.html b/LiquidityBakingData/index.html similarity index 54% rename from BetterCallDevAccount/index.html rename to LiquidityBakingData/index.html index c72237de..3dd967d9 100644 --- a/BetterCallDevAccount/index.html +++ b/LiquidityBakingData/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - BetterCallDevAccount + KukaiCoreSwift - LiquidityBakingData
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Structure - Better​Call​Dev​Account + Liquidity​Baking​Data

-
public struct BetterCallDevAccount: Codable  
+
public struct LiquidityBakingData: Codable  
-

A model matching the response that comes back from BetterCallDev's API: v1/account/<network>/<address>

+

Wrapper object to hold onto all the necessary data in order to work with liquidity baking contract (swap, add or remove liqudity)

@@ -51,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%227 +%569 - + -BetterCallDevAccount - +LiquidityBakingData + -BetterCallDevAccount +LiquidityBakingData @@ -72,9 +72,9 @@ Codable - + -BetterCallDevAccount->Codable +LiquidityBakingData->Codable @@ -82,74 +82,74 @@ - +

Conforms To

Codable
-
-

Initializers

+
+

Properties

-
+

- init(from:​) + xtz​Pool

-
public init(from decoder: Decoder) throws  
+
public let xtzPool: XTZAmount
-
-
-
-

Properties

+
+

The total amount of XTZ in the contract

-
+
+
+

- address + token​Pool

-
public let address: String
+
public let tokenPool: TokenAmount
-

The wallet address

+

The total amount of the token in the contract (currently tzBTC)

-
+

- balance + total​Liquidity

-
public let balance: XTZAmount
+
public let totalLiquidity: TokenAmount
-

The wallet's XTZ balance

+

The total amount of liquidity tokens in circulation

-
+

- network + token​Contract​Address

-
public let network: TezosChainName
+
public let tokenContractAddress: String
-

The network chain name the wallet is active on

+

The address of the dex contract

-
-
-

Methods

- -
+

- encode(to:​) + liquidity​Token​Contract​Address

-
public func encode(to encoder: Encoder) throws  
+
public let liquidityTokenContractAddress: String
+
+
+

The address of the liquidty token contract

+
@@ -161,7 +161,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/LoggingConfig/index.html b/LoggingConfig/index.html index 79896d45..cce747a6 100644 --- a/LoggingConfig/index.html +++ b/LoggingConfig/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -76,7 +76,7 @@

diff --git a/MediaProxyService/index.html b/MediaProxyService/index.html new file mode 100644 index 00000000..6082b460 --- /dev/null +++ b/MediaProxyService/index.html @@ -0,0 +1,592 @@ + + + + + + KukaiCoreSwift - MediaProxyService + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Media​Proxy​Service +

+ +
+
public class MediaProxyService: NSObject  
+
+
+

A service class for interacting with the TC infrastructure to proxy NFT images, videos and audio files

+ +
+
+ +
+ + + + + + +%75 + + + +MediaProxyService + + +MediaProxyService + + + + + +URLSessionDownloadDelegate + +URLSessionDownloadDelegate + + + +MediaProxyService->URLSessionDownloadDelegate + + + + + +NSObject + +NSObject + + + +MediaProxyService->NSObject + + + + + + + + +
+

Nested Types

+
+
MediaProxyService.Format
+

Enum denoting the avaialble sizes for media

+
+
MediaProxyService.Source
+

Supported source types for proxied media

+
+
MediaProxyService.MediaType
+

Supported media types

+
+
MediaProxyService.AggregatedMediaType
+

Helper to parse a collection of media types to understand its contents

+
+
+

Conforms To

+
+
NSObject
+
URLSessionDownloadDelegate
+
+
+
+

Methods

+ +
+

+ url(from​Uri​String:​of​Format:​keep​Gif:​) +

+
+
public static func url(fromUriString uri: String?, ofFormat format: Format, keepGif: Bool = false) -> URL?  
+
+
+

Take a URI from a token metadata response and convert it to a useable media proxy URL

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
from​Uri​StringString?

String containing a URI (supports IPFS URIs)

+
of​FormatFormat

The requested format from the proxy

+
+

Returns

+

An optional URL

+ +
+
+

+ url(from​Uri:​of​Format:​keep​Gif:​) +

+
+
public static func url(fromUri uri: URL?, ofFormat format: Format, keepGif: Bool = false) -> URL?  
+
+
+

Take a URI from a token metadata response and convert it to a useable media proxy URL

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
from​UriURL?

URL object containing a URI (supports IPFS URIs)

+
of​FormatFormat

The requested format from the proxy

+
+

Returns

+

An optional URL

+ +
+
+

+ thumbnail​URL(for​NFT:​keep​Gif:​) +

+
+
public static func thumbnailURL(forNFT nft: NFT, keepGif: Bool = false) -> URL?  
+
+
+

Helper method to return a standard thumbnail URL for a NFT, taking into account some custom logic / known workarounds

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
from​NFT

NFT object

+
+

Returns

+

An optional URL

+ +
+
+

+ display​URL(for​NFT:​keep​Gif:​) +

+
+
public static func displayURL(forNFT nft: NFT, keepGif: Bool = false) -> URL?  
+
+
+

Helper method to return a standard larger display URL for a NFT

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
from​NFT

NFT object

+
+

Returns

+

An optional URL

+ +
+
+

+ get​Media​Type(from​Formats:​) +

+
+
public static func getMediaType(fromFormats formats: [TzKTBalanceMetadataFormat]) -> [MediaType]  
+
+
+

Using only info from TzKTBalanceMetadataFormat determine the media type(s) of the object

+ +
+
+
+

+ get​Media​Type(from​Formats:​or​URL:​url​Session:​completion:​) +

+
+
public func getMediaType(fromFormats formats: [TzKTBalanceMetadataFormat], orURL url: URL?, urlSession: URLSession = .shared, completion: @escaping ((Result<[MediaType], KukaiError>) -> Void))  
+
+
+

Given multiple sources of information, attempt to find the media type the url is pointing too

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
from​Formats[TzKTBalance​Metadata​Format]

An array of TzKTBalanceMetadataFormat that comes down with the TzKTClient's balancing fetching code. It MAY contain infomration on the media type

+
or​URLURL?

The URL for the record. It MAY contain a file extension dennoting the file type

+
url​SessionURLSession

If type can't be found via URL or metadata, download the first packet, examine the headers for Content-Type using this session. (HEAD requests aren't currently supported if the asset hasn't been already cached)

+
completion@escaping ((Result<[Media​Type], Kukai​Error>) -> Void)

A block to run when a type can be found, or an error encountered

+
+
+
+

+ types​Contents(_:​) +

+
+
public static func typesContents(_ types: [MediaType]) -> AggregatedMediaType?  
+
+
+

Helper method to parse an array of MediaType to quickly determine its content type so UI can be easily arraged

+ +
+
+
+

+ remove​All​Images(completion:​) +

+
+
public static func removeAllImages(completion: @escaping (() -> Void))  
+
+
+

Clear all images from all caches

+ +
+
+
+

+ remove​All​Images(from​Cache:​completion:​) +

+
+
public static func removeAllImages(fromCache: CacheType, completion: @escaping (() -> Void))  
+
+
+
+

+ clear​Expired​Images() +

+
+
public static func clearExpiredImages()  
+
+
+

Clear only iamges from cahce that have expired

+ +
+
+
+

+ size​Of(cache:​) +

+
+
public static func sizeOf(cache: CacheType) -> UInt  
+
+
+

Get size in bytes

+ +
+
+
+

+ load(url:​to:​with​Cache​Type:​fallback:​down​Sample​Size:​completion:​) +

+
+
public static func load(url: URL?, to imageView: UIImageView, withCacheType cacheType: CacheType, fallback: UIImage, downSampleSize: CGSize? = nil, completion: ((CGSize?) -> Void)? = nil)  
+
+
+

Attempt to use KingFisher library to load an image from a URL, into an UIImageView, with support for downsampling, displaying loading spinner, svgs, gifs and the permanent / temporary caching system

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
urlURL?

Media proxy URL pointing to an image

+
toUIImage​View

The UIImageView to load the image into

+
from​Cache

Which cahce to search for the image, or load it into if not found and needs to be downloaded

+
fallbackUIImage

If an error occurs and an image can't be downloaded/loaded in, display this image instead

+
down​Sample​SizeCGSize?

Supply the dimensions you wish the image to be resized to fit

+
completion((CGSize?) -> Void)?

returns when operation finished, if successful it will return the downloaded image's CGSize

+
+
+
+

+ image​Cache(for​Type:​) +

+
+
public static func imageCache(forType: CacheType) -> ImageCache  
+
+
+
+

+ cache​Image(url:​cache​Type:​completion:​) +

+
+
public static func cacheImage(url: URL?, cacheType: CacheType = .temporary, completion: @escaping ((CGSize?) -> Void))  
+
+
+

Attempt to use KingFisher library to load an image from a URL, and store it directly in the cache for later usage. Also optional return the downloaded size via a completion block, useful for preparing table/collection view

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
urlURL?

Media proxy URL pointing to an image

+
from​Cache

Which cahce to search for the image, or load it into if not found and needs to be downloaded

+
completion@escaping ((CGSize?) -> Void)

returns when operation finished, if successful it will return the downloaded image's CGSize

+
+
+
+

+ is​Cached(url:​cache​Type:​) +

+
+
public static func isCached(url: URL?, cacheType: CacheType = .temporary) -> Bool  
+
+
+

Check if a given url is already cached

+ +
+
+
+

+ size​For​Image​IfCached(url:​cache​Type:​completion:​) +

+
+
public static func sizeForImageIfCached(url: URL?, cacheType: CacheType = .temporary, completion: @escaping ((CGSize?) -> Void) )  
+
+
+

Check if an image is cached, and return its size if so. Useful for preparing table/collection view

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
urlURL?

Media proxy URL pointing to an image

+
from​Cache

Which cahce to search for the image, or load it into if not found and needs to be downloaded

+
completion@escaping ((CGSize?) -> Void)

returns when operation finished, if successful it will return the downloaded image's CGSize

+
+
+
+

+ url​Session(_:​download​Task:​did​Finish​Downloading​To:​) +

+
+
public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL)  
+
+
+
+

+ url​Session(_:​task:​did​Complete​With​Error:​) +

+
+
public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?)  
+
+
+
+

+ url​Session(_:​download​Task:​did​Write​Data:​total​Bytes​Written:​total​Bytes​Expected​ToWrite:​) +

+
+
public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64)  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/MediaProxyServiceError/index.html b/MediaProxyServiceError/index.html new file mode 100644 index 00000000..f6881df2 --- /dev/null +++ b/MediaProxyServiceError/index.html @@ -0,0 +1,133 @@ + + + + + + KukaiCoreSwift - MediaProxyServiceError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Media​Proxy​Service​Error +

+ +
+
public enum MediaProxyServiceError: String, Error  
+
+
+ +
+ + + + + + +%535 + + + +MediaProxyServiceError + + +MediaProxyServiceError + + + + + +Error + +Error + + + +MediaProxyServiceError->Error + + + + + +String + +String + + + +MediaProxyServiceError->String + + + + + + + + +
+

Conforms To

+
+
Error
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ no​Mime​Type​Found​Inside​Formats +

+
+
case noMimeTypeFoundInsideFormats
+
+
+
+

+ unable​ToParse​Content​Type +

+
+
case unableToParseContentType
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/MediaProxyService_AggregatedMediaType/index.html b/MediaProxyService_AggregatedMediaType/index.html new file mode 100644 index 00000000..16cced84 --- /dev/null +++ b/MediaProxyService_AggregatedMediaType/index.html @@ -0,0 +1,167 @@ + + + + + + KukaiCoreSwift - MediaProxyService.AggregatedMediaType + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Media​Proxy​Service.​Aggregated​Media​Type +

+ +
+
public enum AggregatedMediaType: String, Codable  
+
+
+

Helper to parse a collection of media types to understand its contents

+ +
+
+ +
+ + + + + + +%649 + + + +MediaProxyService.AggregatedMediaType + + +MediaProxyService.AggregatedMediaType + + + + + +Codable + +Codable + + + +MediaProxyService.AggregatedMediaType->Codable + + + + + +String + +String + + + +MediaProxyService.AggregatedMediaType->String + + + + + + + + +
+

Member Of

+
+
MediaProxyService
+

A service class for interacting with the TC infrastructure to proxy NFT images, videos and audio files

+
+
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ image​Only +

+
+
case imageOnly
+
+
+
+

+ audio​Only +

+
+
case audioOnly
+
+
+
+

+ video​Only +

+
+
case videoOnly
+
+
+
+

+ gif​Only +

+
+
case gifOnly
+
+
+
+

+ image​And​Audio +

+
+
case imageAndAudio
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/MediaProxyService_Format/index.html b/MediaProxyService_Format/index.html new file mode 100644 index 00000000..0ffe24d2 --- /dev/null +++ b/MediaProxyService_Format/index.html @@ -0,0 +1,167 @@ + + + + + + KukaiCoreSwift - MediaProxyService.Format + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Media​Proxy​Service.​Format +

+ +
+
public enum Format: String, Codable  
+
+
+

Enum denoting the avaialble sizes for media

+ +
+
+ +
+ + + + + + +%625 + + + +MediaProxyService.Format + + +MediaProxyService.Format + + + + + +Codable + +Codable + + + +MediaProxyService.Format->Codable + + + + + +String + +String + + + +MediaProxyService.Format->String + + + + + + + + +
+

Member Of

+
+
MediaProxyService
+

A service class for interacting with the TC infrastructure to proxy NFT images, videos and audio files

+
+
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ icon +

+
+
case icon
+
+
+
+

+ small +

+
+
case small
+
+
+
+

+ medium +

+
+
case medium
+
+
+
+

+ gallery +

+
+
case gallery
+
+
+
+

+ raw +

+
+
case raw
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/MediaProxyService_MediaType/index.html b/MediaProxyService_MediaType/index.html new file mode 100644 index 00000000..540c854a --- /dev/null +++ b/MediaProxyService_MediaType/index.html @@ -0,0 +1,159 @@ + + + + + + KukaiCoreSwift - MediaProxyService.MediaType + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Media​Proxy​Service.​Media​Type +

+ +
+
public enum MediaType: String, Codable  
+
+
+

Supported media types

+ +
+
+ +
+ + + + + + +%303 + + + +MediaProxyService.MediaType + + +MediaProxyService.MediaType + + + + + +Codable + +Codable + + + +MediaProxyService.MediaType->Codable + + + + + +String + +String + + + +MediaProxyService.MediaType->String + + + + + + + + +
+

Member Of

+
+
MediaProxyService
+

A service class for interacting with the TC infrastructure to proxy NFT images, videos and audio files

+
+
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ image +

+
+
case image
+
+
+
+

+ audio +

+
+
case audio
+
+
+
+

+ video +

+
+
case video
+
+
+
+

+ gif +

+
+
case gif
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/MediaProxyService_Source/index.html b/MediaProxyService_Source/index.html new file mode 100644 index 00000000..a1b8274e --- /dev/null +++ b/MediaProxyService_Source/index.html @@ -0,0 +1,143 @@ + + + + + + KukaiCoreSwift - MediaProxyService.Source + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Media​Proxy​Service.​Source +

+ +
+
public enum Source: String, Codable  
+
+
+

Supported source types for proxied media

+ +
+
+ +
+ + + + + + +%265 + + + +MediaProxyService.Source + + +MediaProxyService.Source + + + + + +Codable + +Codable + + + +MediaProxyService.Source->Codable + + + + + +String + +String + + + +MediaProxyService.Source->String + + + + + + + + +
+

Member Of

+
+
MediaProxyService
+

A service class for interacting with the TC infrastructure to proxy NFT images, videos and audio files

+
+
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ ipfs +

+
+
case ipfs
+
+
+
+

+ web +

+
+
case web
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/MichelsonFactory/index.html b/MichelsonFactory/index.html deleted file mode 100644 index 23b2d585..00000000 --- a/MichelsonFactory/index.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - KukaiCoreSwift - MichelsonFactory - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Michelson​Factory -

- -
-
public class MichelsonFactory  
-
-
-

A temporary factory class (until a better solution can be found) with some helper methods for parsing / Creating Michelson objects. -Also includes quicker functions to just extract values from raw JSON, useful for processing transaction history without having to implement the entire Michelson spec

- -
- -
-

Methods

- -
-

- is​Pair(_:​) -

-
-
public static func isPair(_ obj: [String: Any]) -> Bool  
-
-
-

Take in undecoded JSON and reutrn true if it matches a Michelson Pair type

- -
-
-
-

- is​Int(_:​) -

-
-
public static func isInt(_ obj: [String: Any]) -> Bool  
-
-
-

Take in undecoded JSON and reutrn true if it matches a Michelson Int type

- -
-
-
-

- is​String(_:​) -

-
-
public static func isString(_ obj: [String: Any]) -> Bool  
-
-
-

Take in undecoded JSON and reutrn true if it matches a Michelson String type

- -
-
-
-

- left(_:​) -

-
-
public static func left(_ obj: [String: Any]?) -> [String: Any]?  
-
-
-

Take in undecoded JSON, check its a valid Pair type, and return the left side of the pair

- -
-
-
-

- right(_:​) -

-
-
public static func right(_ obj: [String: Any]?) -> [String: Any]?  
-
-
-

Take in undecoded JSON, check its a valid Pair type, and return the right side of the pair

- -
-
-
-

- int(_:​) -

-
-
public static func int(_ obj: [String: Any]?) -> Decimal?  
-
-
-

Take in undecoded JSON, check its a valid Int type, and return the underlying value as a Decimal

- -
-
-
-

- string(_:​) -

-
-
public static func string(_ obj: [String: Any]?) -> String?  
-
-
-

Take in undecoded JSON, check its a valid String type, and return the underlying value

- -
-
-
-

- create​Int(_:​) -

-
-
public static func createInt(_ value: TokenAmount) -> MichelsonValue  
-
-
-

Helper to create a Michelson compliant object, containing an Int value. Passing in a TokenAmount, it will be converted to the appropriate RPC format -The returned object can be passed into a MichelsonPair object, in order to send as part of a smart contract call

- -
-
-
-

- create​String(_:​) -

-
-
public static func createString(_ value: String) -> MichelsonValue  
-
-
-

Helper to create a Michelson compliant object, containing an String value. -The returned object can be passed into a MichelsonPair object, in order to send as part of a smart contract call

- -
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/MichelsonPair/index.html b/MichelsonPair/index.html deleted file mode 100644 index 5f384f04..00000000 --- a/MichelsonPair/index.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - KukaiCoreSwift - MichelsonPair - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Michelson​Pair -

- -
-
public class MichelsonPair: AbstractMichelson  
-
-
- -
- - - - - - -%253 - - - -MichelsonPair - - -MichelsonPair - - - - - -AbstractMichelson - - -AbstractMichelson - - - - - -MichelsonPair->AbstractMichelson - - - - - - - - -
-

Superclass

-
-
AbstractMichelson
-

Base Michelson type, only used for polymorphism inside MichelsonPair objects

-
-
-
-
-

Initializers

- -
-

- init(args:​) -

-
-
public init(args: [AbstractMichelson])  
-
-
-

Init accepting any combination of MichelsonValue or MichelsonPair

- -
-
-
-

- init(from:​) -

-
-
public required init(from decoder: Decoder) throws  
-
-
-
-
-

Properties

- -
-

- prim -

-
-
public let prim: String
-
-
-

The primitive type, in this case will always be Pair

- -
-
-
-

- args -

-
-
public let args: [AbstractMichelson] 
-
-
-

An array of key / value objects, MichelsonPair's or combination of both

- -
-
-
-

- description -

-
-
public override var description: String  
-
-
-

Customized description to allow object to be logged to console, how it is returned from the RPC

- -
-
-
-
-

Methods

- -
-

- create(from​Dictionary:​) -

-
-
public class func create(fromDictionary dictionary: [String: Any]?) -> MichelsonPair?  
-
-
-

Create a MichelsonPair from a Dictionary of type [String: Any], if possible

- -
-
-
-

- arg​Index(_:​) -

-
-
public func argIndex(_ index: Int) -> AbstractMichelson?  
-
-
-

Michelson Pairs are no longer confined to 2 args (left and right). Fetch an underlying arg by its index

- -
-
-
-

- arg​Index​AsPair(_:​) -

-
-
public func argIndexAsPair(_ index: Int) -> MichelsonPair?  
-
-
-

Michelson Pairs are no longer confined to 2 args (left and right). Fetch an underlying arg by its index and attempt to convert to a MichelsonPair

- -
-
-
-

- arg​Index​AsValue(_:​) -

-
-
public func argIndexAsValue(_ index: Int) -> MichelsonValue?  
-
-
-

Michelson Pairs are no longer confined to 2 args (left and right). Fetch an underlying arg by its index and attempt to convert to a MichelsonValue

- -
-
-
-

- encode(to:​) -

-
-
public override func encode(to encoder: Encoder) throws  
-
-
-

Adhearing to Encodable

- -
-
-
-
-

Operators

- -
-

- == -

-
-
public static func == (lhs: MichelsonPair, rhs: MichelsonPair) -> Bool  
-
-
-

Adhearing to Equatable

- -
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/MnemonicPhraseLength/index.html b/MnemonicPhraseLength/index.html deleted file mode 100644 index fd2f6163..00000000 --- a/MnemonicPhraseLength/index.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - KukaiCoreSwift - MnemonicPhraseLength - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Enumeration - Mnemonic​Phrase​Length -

- -
-
public enum MnemonicPhraseLength: Int  
-
-
-

Helper enum used to choose the number of words for a mnemonic

- -
-
- -
- - - - - - -%173 - - - -MnemonicPhraseLength - - -MnemonicPhraseLength - - - - - -Int - -Int - - - -MnemonicPhraseLength->Int - - - - - - - - -
-

Conforms To

-
-
Int
-
-
-
-

Enumeration Cases

- -
-

- twelve -

-
-
case twelve = 128
-
-
-
-

- fifteen -

-
-
case fifteen = 160
-
-
-
-

- eighteen -

-
-
case eighteen = 192
-
-
-
-

- twenty​One -

-
-
case twentyOne = 224
-
-
-
-

- twenty​Four -

-
-
case twentyFour = 256
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/NFT/index.html b/NFT/index.html index 4ac5f836..c36ed999 100644 --- a/NFT/index.html +++ b/NFT/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -37,7 +37,7 @@

-
public struct NFT: Codable  
+
public struct NFT: Codable, Hashable  

An indiviual NFT (not the parent token/collection) holding a URI to an asset somewhere on the internet

@@ -51,32 +51,56 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%305 - + + + +%125 + NFT - -NFT + +NFT Codable - -Codable + +Codable - + NFT->Codable - - + + + + + +Identifiable + +Identifiable + + + +NFT->Identifiable + + + + + +Hashable + +Hashable + + + +NFT->Hashable + + @@ -87,20 +111,22 @@

Conforms To

Codable
+
Hashable
+
Identifiable

Initializers

-
+

- init(from​Bcd​Balance:​) + init(from​TzKTBalance:​)

-
public init(fromBcdBalance bcd: BetterCallDevTokenBalance)  
+
public init(fromTzKTBalance tzkt: TzKTBalance)  
-

Create a more developer friednly NFT from a generic BetterCallDevTokenBalance object

+

Create a more developer friednly NFT from a generic TzKTBalance object

Parameters

@@ -115,9 +141,9 @@

Parameters

- from​Bcd​Balance - Better​Call​Dev​Token​Balance -

An instance of BetterCallDevTokenBalance containing data about an NFT

+ from​TzKTBalance + TzKTBalance +

An instance of TzKTBalance containing data about an NFT

@@ -132,11 +158,24 @@

token​Id

-
public let tokenId: Int
+
public let tokenId: Decimal

Each NFT of a token has a unique ID

+
+
+
+

+ duplicate​ID +

+
+
public var duplicateID: Int? = 0
+
+
+

In order to display in a tablview, the element must be hashable. But in cases where you want to show duplciates (e.g. recents), the computed hash needs to be slightly different +This property can be used as a quick hack a copy of the NFT struct slightly different, without affecting the data

+
@@ -149,6 +188,54 @@

The address of the FA2 contract that created this NFT

+
+

+
+

+ parent​Alias +

+
+
public let parentAlias: String? 
+
+
+

The human readable alias of the parent contract (e.g. "Mooncakes")

+ +
+
+
+

+ fa​Version +

+
+
public let faVersion: FaVersion
+
+
+

The FaVersion of the token contrac

+ +
+
+
+

+ decimal​Places +

+
+
public var decimalPlaces: Int
+
+
+

Get the underlying number of decimal places that this token represents

+ +
+
+
+

+ balance +

+
+
public let balance: Decimal
+
+
+

Number of duplicate items of this NFT

+
@@ -168,7 +255,7 @@

symbol

-
public let symbol: String
+
public let symbol: String? 

Human readbale symbol (e.g. "XTZ")

@@ -192,7 +279,7 @@

artifact​URI

-
public let artifactURI: String? 
+
public let artifactURI: URL? 

A URI to the asset the NFT is controlling ownership of

@@ -204,7 +291,7 @@

display​URI

-
public let displayURI: String? 
+
public let displayURI: URL? 

A URI used to display media of the artifact

@@ -216,11 +303,95 @@

thumbnail​URI

-
public let thumbnailURI: String? 
+
public let thumbnailURI: URL? 

A smaller thumbnail used to display meda of the artifact

+
+
+
+

+ metadata +

+
+
public var metadata: TzKTBalanceMetadata? = nil
+
+
+

Metadata object containing useful information about the nft and its contents

+ +
+
+
+

+ is​Hidden +

+
+
public var isHidden: Bool = false
+
+
+

Recording if the user has marked the token as hidden

+ +
+
+
+

+ favourite​Sort​Index +

+
+
public var favouriteSortIndex: Int? = nil
+
+
+

Recording if the position the index the user chose for the favourite token to appear

+ +
+
+
+

+ is​Favourite +

+
+
public var isFavourite: Bool  
+
+
+
+

+ id +

+
+
public var id: String  
+
+
+
+
+

Methods

+ +
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable

+ +
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: NFT, rhs: NFT) -> Bool  
+
+
+

Confomring to Equatable

+
@@ -232,7 +403,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/NanoTez/index.html b/NanoTez/index.html index 98a7fc82..0d56ad8a 100644 --- a/NanoTez/index.html +++ b/NanoTez/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -48,7 +48,7 @@

diff --git a/NetworkConstants/index.html b/NetworkConstants/index.html index 1ba25291..1308d98d 100644 --- a/NetworkConstants/index.html +++ b/NetworkConstants/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%267 +%215 @@ -92,12 +92,12 @@

Conforms To

Properties

-
+

- time_between_blocks + minimal_block_delay

-
public let time_between_blocks: [String] 
+
public let minimal_block_delay: String
@@ -176,6 +176,14 @@

public func maxGasPerOperation() -> Int  

+
+

+ max​Gas​Per​Block() +

+
+
public func maxGasPerBlock() -> Int  
+
+

max​Storage​Per​Operation() @@ -209,7 +217,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/NetworkService/index.html b/NetworkService/index.html index b5cbf40c..01571b63 100644 --- a/NetworkService/index.html +++ b/NetworkService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -124,7 +124,7 @@

send(rpc:​with​Base​URL:​completion:​)

-
public func send<T: Decodable>(rpc: RPC<T>, withBaseURL baseURL: URL, completion: @escaping ((Result<T, ErrorResponse>) -> Void))  
+
public func send<T: Decodable>(rpc: RPC<T>, withBaseURL baseURL: URL, completion: @escaping ((Result<T, KukaiError>) -> Void))  

A generic send function that takes an RPC, with a generic type conforming to Decodable, executes the request and returns the result.

@@ -155,7 +155,7 @@

Parameters

completion - @escaping ((Result<T, Error​Response>) -> Void) + @escaping ((Result<T, Kukai​Error>) -> Void)

A completion callback that will be executed on the main thread.

@@ -170,10 +170,10 @@

request(url:​is​POST:​with​Body:​for​Return​Type:​completion:​)

-
public func request<T: Decodable>(url: URL, isPOST: Bool, withBody body: Data?, forReturnType: T.Type, completion: @escaping ((Result<T, ErrorResponse>) -> Void))  
+
public func request<T: Decodable>(url: URL, isPOST: Bool, withBody body: Data?, forReturnType: T.Type, completion: @escaping ((Result<T, KukaiError>) -> Void))  
-

A generic network request function that takes a URL, optional payload and a Decodable response type. Function will execute teh request and attempt to parse the response. +

A generic network request function that takes a URL, optional payload and a Decodable response type. Function will execute the request and attempt to parse the response. Using the Logging config, will auto log (or not) urls, response outputs, or fails to the console

@@ -214,14 +214,64 @@

Parameters

completion - @escaping ((Result<T, Error​Response>) -> Void) + @escaping ((Result<T, Kukai​Error>) -> Void)

A completion block with a Result<T, Error> T being the supplied decoable type

+ + + +
+
+

+ request(url:​is​POST:​with​Body:​for​Return​Type:​) +

+
+
public func request<T: Decodable>(url: URL, isPOST: Bool, withBody body: Data?, forReturnType: T.Type) -> AnyPublisher<T, KukaiError>  
+
+
+

A generic network request function that takes a URL, optional payload and a Decodable response type. Function will execute the request and attempt to parse the response, returning it as a combine publisher. +Using the Logging config, will auto log (or not) urls, response outputs, or fails to the console

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
urlURL

The full url, including query parameters to execute.

+
is​POSTBool

Bool indicating if its a POST or GET request.

+
with​BodyData?

Optional Data to be passed as the body.

+
for​Return​TypeT.​Type

The Type to parse the response as.

+

Returns

-

Void

+

A publisher of the supplied return type, or error response

@@ -269,7 +319,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/NetworkService_NetworkError/index.html b/NetworkService_NetworkError/index.html index f0b600a0..a60b0d23 100644 --- a/NetworkService_NetworkError/index.html +++ b/NetworkService_NetworkError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%59 +%685 @@ -139,7 +139,7 @@

diff --git a/NetworkVersion/index.html b/NetworkVersion/index.html index 53ff4613..27421e8a 100644 --- a/NetworkVersion/index.html +++ b/NetworkVersion/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%45 +%747 @@ -89,6 +89,18 @@

Conforms To

Codable

+
+

Properties

+ +
+

+ chain​Name_mainnet +

+
+
public static let chainName_mainnet = "mainnet"
+
+
+

Methods

@@ -97,7 +109,7 @@

chain​Name()

-
public func chainName() -> TezosChainName  
+
public func chainName() -> String  
@@ -117,7 +129,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/NilOnDecodingError/index.html b/NilOnDecodingError/index.html new file mode 100644 index 00000000..34394344 --- /dev/null +++ b/NilOnDecodingError/index.html @@ -0,0 +1,142 @@ + + + + + + KukaiCoreSwift - NilOnDecodingError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Nil​OnDecoding​Error +

+ +
+
@propertyWrapper
+public struct NilOnDecodingError<Wrapped>  
+
+
+

property wrapper to easily handle a situation where we don't want decoding to fail for 1 property which may be problematic. Instead just default it to nil

+ +
+
+ +
+ + + + + + +%81 + + + +NilOnDecodingError + + +NilOnDecodingError + + + + + +Decodable + +Decodable + + + +NilOnDecodingError->Decodable + + + + + +Encodable + +Encodable + + + +NilOnDecodingError->Encodable + + + + + + + + +
+

Conforms To

+
+
Decodable
+
Encodable
+
+
+
+

Initializers

+ +
+

+ init(wrapped​Value:​) +

+
+
public init(wrappedValue: Wrapped?)  
+
+
+
+
+

Properties

+ +
+

+ wrapped​Value +

+
+
public var wrappedValue: Wrapped? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktAttribute/index.html b/ObjktAttribute/index.html new file mode 100644 index 00000000..b951ff27 --- /dev/null +++ b/ObjktAttribute/index.html @@ -0,0 +1,112 @@ + + + + + + KukaiCoreSwift - ObjktAttribute + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Attribute +

+ +
+
public struct ObjktAttribute: Codable  
+
+
+ +
+ + + + + + +%361 + + + +ObjktAttribute + + +ObjktAttribute + + + + + +Codable + +Codable + + + +ObjktAttribute->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ attribute +

+
+
public let attribute: ObjktAttributeData
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktAttributeCounts/index.html b/ObjktAttributeCounts/index.html new file mode 100644 index 00000000..1ac91583 --- /dev/null +++ b/ObjktAttributeCounts/index.html @@ -0,0 +1,112 @@ + + + + + + KukaiCoreSwift - ObjktAttributeCounts + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Attribute​Counts +

+ +
+
public struct ObjktAttributeCounts: Codable  
+
+
+ +
+ + + + + + +%505 + + + +ObjktAttributeCounts + + +ObjktAttributeCounts + + + + + +Codable + +Codable + + + +ObjktAttributeCounts->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ editions +

+
+
public let editions: Decimal
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktAttributeData/index.html b/ObjktAttributeData/index.html new file mode 100644 index 00000000..81179dcc --- /dev/null +++ b/ObjktAttributeData/index.html @@ -0,0 +1,128 @@ + + + + + + KukaiCoreSwift - ObjktAttributeData + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Attribute​Data +

+ +
+
public struct ObjktAttributeData: Codable  
+
+
+ +
+ + + + + + +%739 + + + +ObjktAttributeData + + +ObjktAttributeData + + + + + +Codable + +Codable + + + +ObjktAttributeData->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ name +

+
+
public let name: String
+
+
+
+

+ value +

+
+
public let value: String
+
+
+
+

+ attribute_counts +

+
+
public let attribute_counts: [ObjktAttributeCounts] 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktClient/index.html b/ObjktClient/index.html new file mode 100644 index 00000000..87921c16 --- /dev/null +++ b/ObjktClient/index.html @@ -0,0 +1,205 @@ + + + + + + KukaiCoreSwift - ObjktClient + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Objkt​Client +

+ +
+
public class ObjktClient  
+
+
+

Client for interacting with the API of the popular NFT marketplace, OBJKT.com +Client exposes functions for fetching metadata, pricing, purchase offers, listing etc

+ +
+ +
+

Initializers

+ +
+

+ init(network​Service:​config:​) +

+
+
public init(networkService: NetworkService, config: TezosNodeClientConfig)  
+
+
+

Init a ObjktClient with a NetworkService and a TezosNodeClientConfig.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
network​ServiceNetwork​Service

NetworkService used to manage network communication.

+
configTezos​Node​Client​Config

TezosNodeClientConfig used to apss in settings.

+
+
+
+
+

Properties

+ +
+

+ collections +

+
+
public var collections: [String: ObjktCollection] 
+
+
+

Cached metadata of NFT collections, e.g. name, thumbnailURL etc

+ +
+
+
+

+ tokens +

+
+
public var tokens: [String: ObjktTokenReponse] 
+
+
+

Cached metadata of specific tokens, e.g. prices, offers etc

+ +
+
+
+
+

Methods

+ +
+

+ unresolved​Collections(addresses:​) +

+
+
public func unresolvedCollections(addresses: [String]) -> [String]  
+
+
+

Take in an array of contract addresses, and return a list of the ones that we currently have no metadata for

+ +
+
+
+

+ resolve​Collections​All(addresses:​completion:​) +

+
+
public func resolveCollectionsAll(addresses: [String], completion: @escaping ((Result<Bool, KukaiError>) -> Void))  
+
+
+

Search OBJKT to find metadata on the list of addresses provided

+ +
+
+
+

+ resolve​Collections​Page(addresses:​completion:​) +

+
+
public func resolveCollectionsPage(addresses: ArraySlice<String>, completion: @escaping ((Result<GraphQLResponse<ObjktCollections>, KukaiError>) -> Void))  
+
+
+

Find the metadata of a list of contracts, used recurrisvely to find all collections while limited to request query size

+ +
+
+
+

+ resolve​Token(address:​token​Id:​for​Owner​Wallet​Address:​completion:​) +

+
+
public func resolveToken(address: String, tokenId: Decimal, forOwnerWalletAddress walletAddress: String, completion: @escaping ((Result<GraphQLResponse<ObjktTokenReponse>, KukaiError>) -> Void))  
+
+
+

Find the meatdata of a specific token

+ +
+
+
+

+ token​Response(for​Address:​token​Id:​) +

+
+
public func tokenResponse(forAddress: String, tokenId: Int) -> ObjktTokenReponse?  
+
+
+

Helper to fetch a specific token metadata from the cache

+ +
+
+
+

+ delete​Cache() +

+
+
public func deleteCache()  
+
+
+

Clear all the cached data

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/BetterCallDevTokenBalance/index.html b/ObjktCollection/index.html similarity index 53% rename from BetterCallDevTokenBalance/index.html rename to ObjktCollection/index.html index 5cc75d16..b2d57196 100644 --- a/BetterCallDevTokenBalance/index.html +++ b/ObjktCollection/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - BetterCallDevTokenBalance + KukaiCoreSwift - ObjktCollection
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Structure - Better​Call​Dev​Token​Balance + Objkt​Collection

-
public struct BetterCallDevTokenBalance: Codable  
+
public struct ObjktCollection: Codable  
-

A model matching the internal array type that comes back from BetterCallDev's API: v1/account/<network>/<address>/token_balances

+

Single collection item

@@ -51,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%355 +%613 - + -BetterCallDevTokenBalance - +ObjktCollection + -BetterCallDevTokenBalance +ObjktCollection @@ -72,9 +72,9 @@ Codable - + -BetterCallDevTokenBalance->Codable +ObjktCollection->Codable @@ -82,7 +82,7 @@ - +

Conforms To

@@ -92,104 +92,104 @@

Conforms To

Properties

-
+

- token_id + contract

-
public let token_id: Int
+
public let contract: String
-
+

- contract + name

-
public let contract: String
+
public let name: String? 
-
+ -
+

- `description` + floor_price

-
public let `description`: String? 
+
public let floor_price: Decimal? 
-
+

- symbol + twitter

-
public let symbol: String? 
+
public let twitter: String? 
-
+

- artifact_uri + website

-
public let artifact_uri: String? 
+
public let website: String? 
-
+

- display_uri + owners

-
public let display_uri: String? 
+
public let owners: Decimal? 
-
+

- thumbnail_uri + editions

-
public let thumbnail_uri: String? 
+
public let editions: Decimal? 
-
+

- is_boolean_amount + creator

-
public let is_boolean_amount: Bool? 
+
public let creator: ObjktCreator? 

Methods

-
+

- is​NFT() + website​URL()

-
public func isNFT() -> Bool  
-
-
-

Make shift attempt to determine if the balance belongs to an NFT or not, until a better solution can be found

- +
public func websiteURL() -> URL?  
-
+

- amount() + twitter​URL()

-
public func amount() -> TokenAmount  
+
public func twitterURL() -> URL?  
-
-

Process the returned amount as a TokenAmount

- +
+
+

+ floor​Price() +

+
+
public func floorPrice() -> XTZAmount?  
@@ -201,7 +201,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/ObjktCollections/index.html b/ObjktCollections/index.html new file mode 100644 index 00000000..8e36cda8 --- /dev/null +++ b/ObjktCollections/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - ObjktCollections + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Collections +

+ +
+
public struct ObjktCollections: Codable  
+
+
+

GarpQL bulk response for a group of collections

+ +
+
+ +
+ + + + + + +%485 + + + +ObjktCollections + + +ObjktCollections + + + + + +Codable + +Codable + + + +ObjktCollections->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ fa +

+
+
public let fa: [ObjktCollection] 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktCreator/index.html b/ObjktCreator/index.html new file mode 100644 index 00000000..e61c0ffb --- /dev/null +++ b/ObjktCreator/index.html @@ -0,0 +1,136 @@ + + + + + + KukaiCoreSwift - ObjktCreator + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Creator +

+ +
+
public struct ObjktCreator: Codable  
+
+
+ +
+ + + + + + +%721 + + + +ObjktCreator + + +ObjktCreator + + + + + +Codable + +Codable + + + +ObjktCreator->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ address +

+
+
public let address: String? 
+
+
+
+

+ alias +

+
+
public let alias: String? 
+
+
+
+

+ webiste +

+
+
public let webiste: String? 
+
+
+
+

+ twitter +

+
+
public let twitter: String? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktEvent/index.html b/ObjktEvent/index.html new file mode 100644 index 00000000..b920293e --- /dev/null +++ b/ObjktEvent/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - ObjktEvent + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Event +

+ +
+
public struct ObjktEvent: Codable  
+
+
+

Single event item

+ +
+
+ +
+ + + + + + +%169 + + + +ObjktEvent + + +ObjktEvent + + + + + +Codable + +Codable + + + +ObjktEvent->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ price_xtz +

+
+
public let price_xtz: Decimal? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktFa/index.html b/ObjktFa/index.html new file mode 100644 index 00000000..f6bc7fb9 --- /dev/null +++ b/ObjktFa/index.html @@ -0,0 +1,124 @@ + + + + + + KukaiCoreSwift - ObjktFa + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Fa +

+ +
+
public struct ObjktFa: Codable  
+
+
+

Single FA item

+ +
+
+ +
+ + + + + + +%329 + + + +ObjktFa + + +ObjktFa + + + + + +Codable + +Codable + + + +ObjktFa->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ editions +

+
+
public let editions: Decimal? 
+
+
+
+

+ floor_price +

+
+
public let floor_price: Decimal? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktListing/index.html b/ObjktListing/index.html new file mode 100644 index 00000000..2394d495 --- /dev/null +++ b/ObjktListing/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - ObjktListing + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Listing +

+ +
+
public struct ObjktListing: Codable  
+
+
+ +
+ + + + + + +%155 + + + +ObjktListing + + +ObjktListing + + + + + +Codable + +Codable + + + +ObjktListing->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ seller_address +

+
+
public let seller_address: String? 
+
+
+
+

+ price_xtz +

+
+
public let price_xtz: Decimal? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktSale/index.html b/ObjktSale/index.html new file mode 100644 index 00000000..0cd7878b --- /dev/null +++ b/ObjktSale/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - ObjktSale + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Sale +

+ +
+
public struct ObjktSale: Codable  
+
+
+ +
+ + + + + + +%407 + + + +ObjktSale + + +ObjktSale + + + + + +Codable + +Codable + + + +ObjktSale->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ price_xtz +

+
+
public let price_xtz: Decimal? 
+
+
+
+

+ timestamp +

+
+
public let timestamp: String? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktToken/index.html b/ObjktToken/index.html new file mode 100644 index 00000000..f6f0eedb --- /dev/null +++ b/ObjktToken/index.html @@ -0,0 +1,164 @@ + + + + + + KukaiCoreSwift - ObjktToken + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Token +

+ +
+
public struct ObjktToken: Codable  
+
+
+

Single token item

+ +
+
+ +
+ + + + + + +%751 + + + +ObjktToken + + +ObjktToken + + + + + +Codable + +Codable + + + +ObjktToken->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ highest_offer +

+
+
public let highest_offer: Decimal? 
+
+
+
+

+ lowest_ask +

+
+
public let lowest_ask: Decimal? 
+
+
+
+

+ metadata +

+
+
public let metadata: String? 
+
+
+
+

+ name +

+
+
public let name: String? 
+
+
+
+

+ attributes +

+
+
public let attributes: [ObjktAttribute] 
+
+
+
+

+ listing_sales +

+
+
public let listing_sales: [ObjktSale] 
+
+
+
+

+ listings_active +

+
+
public let listings_active: [ObjktListing] 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ObjktTokenReponse/index.html b/ObjktTokenReponse/index.html new file mode 100644 index 00000000..363f380b --- /dev/null +++ b/ObjktTokenReponse/index.html @@ -0,0 +1,168 @@ + + + + + + KukaiCoreSwift - ObjktTokenReponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Objkt​Token​Reponse +

+ +
+
public struct ObjktTokenReponse: Codable  
+
+
+

GarpQL response for required data for a given token

+ +
+
+ +
+ + + + + + +%693 + + + +ObjktTokenReponse + + +ObjktTokenReponse + + + + + +Codable + +Codable + + + +ObjktTokenReponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ token +

+
+
public let token: [ObjktToken] 
+
+
+
+

+ event +

+
+
public let event: [ObjktEvent] 
+
+
+
+

+ fa +

+
+
public let fa: [ObjktFa] 
+
+
+
+
+

Methods

+ +
+

+ is​OnSale() +

+
+
public func isOnSale() -> Bool  
+
+
+
+

+ on​Sale​Price() +

+
+
public func onSalePrice() -> XTZAmount?  
+
+
+
+

+ last​Sale​Price() +

+
+
public func lastSalePrice() -> XTZAmount?  
+
+
+
+

+ floor​Price() +

+
+
public func floorPrice() -> XTZAmount?  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OfflineConstants/index.html b/OfflineConstants/index.html new file mode 100644 index 00000000..ff6ff4d9 --- /dev/null +++ b/OfflineConstants/index.html @@ -0,0 +1,56 @@ + + + + + + KukaiCoreSwift - OfflineConstants + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Offline​Constants +

+ +
+
public struct OfflineConstants  
+
+ + + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Operation/index.html b/Operation/index.html index d5c1819b..8bd41d0c 100644 --- a/Operation/index.html +++ b/Operation/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,122 +51,197 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%77 - + + + +%755 + Operation - -Operation + +Operation - + Codable - -Codable + +Codable - + Operation->Codable - - + + + + + +OperationSeedNonceRevelation + + +OperationSeedNonceRevelation + + + + + +OperationSeedNonceRevelation->Operation + + + + + +OperationBallot + + +OperationBallot + + + + + +OperationBallot->Operation + + + + + +OperationDoubleEndorsementEvidence + + +OperationDoubleEndorsementEvidence + + + + + +OperationDoubleEndorsementEvidence->Operation + + - + OperationTransaction - - -OperationTransaction + + +OperationTransaction - + OperationTransaction->Operation - - + + + + + +OperationDoubleBakingEvidence + + +OperationDoubleBakingEvidence + + + + + +OperationDoubleBakingEvidence->Operation + + - + OperationActivateAccount - - -OperationActivateAccount + + +OperationActivateAccount - + OperationActivateAccount->Operation - - + + - + OperationDelegation - - -OperationDelegation + + +OperationDelegation - + OperationDelegation->Operation - - + + - + OperationReveal - - -OperationReveal + + +OperationReveal - + OperationReveal->Operation - - + + - - -OperationSmartContractInvocation - - -OperationSmartContractInvocation + + +OperationProposals + + +OperationProposals - - -OperationSmartContractInvocation->Operation - - + + +OperationProposals->Operation + + + + + +OperationEndorsement + + +OperationEndorsement + + + + + +OperationEndorsement->Operation + + - + OperationOrigination - - -OperationOrigination + + +OperationOrigination - + OperationOrigination->Operation - - + + @@ -179,17 +254,31 @@

Subclasses

OperationActivateAccount

Operation subclass for revealing a publickey to the network.

+
OperationBallot
+

Operation to submit a ballot on an upcoming proposal

+
OperationDelegation

Operation subclass for delegating an account to a baker

+
OperationDoubleBakingEvidence
+

Operation to report a baking of baking the same block twice

+
+
OperationDoubleEndorsementEvidence
+

Operation to report a baker trying to endorse a block twice

+
+
OperationEndorsement
+

Operation for endorsing a block

+
OperationOrigination

Operation subclass for originating a contract on the Tezos network

+
OperationProposals
+
OperationReveal

Operation subclass for revealing a publickey to the network.

-
OperationSmartContractInvocation
-

Operation subclass for calling an entrypoint of a smart contract on the Tezos network

+
OperationSeedNonceRevelation
+

Operation to reveal seed nonce to blockchain

OperationTransaction

Operation subclass for sending XTZ to a destination

@@ -292,7 +381,7 @@

source

-
public let source: String? 
+
public var source: String? 

The source address for the operation

@@ -316,7 +405,7 @@

operation​Fees

-
public var operationFees: OperationFees?  
+
public var operationFees: OperationFees  

Object representing the various fees, storage and compute required to fulfil this operation

@@ -390,7 +479,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationActivateAccount/index.html b/OperationActivateAccount/index.html index 264e3576..058918f2 100644 --- a/OperationActivateAccount/index.html +++ b/OperationActivateAccount/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%223 +%373 @@ -252,7 +252,7 @@

Returns

diff --git a/OperationBallot/index.html b/OperationBallot/index.html new file mode 100644 index 00000000..6274917d --- /dev/null +++ b/OperationBallot/index.html @@ -0,0 +1,199 @@ + + + + + + KukaiCoreSwift - OperationBallot + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Operation​Ballot +

+ +
+
public class OperationBallot: Operation  
+
+
+

Operation to submit a ballot on an upcoming proposal

+ +
+
+ +
+ + + + + + +%709 + + + +OperationBallot + + +OperationBallot + + + + + +Operation + + +Operation + + + + + +OperationBallot->Operation + + + + + + + + +
+

Nested Types

+
+
OperationBallot.Ballot
+

Enum matching the available ballot options

+
+
+

Superclass

+
+
Operation
+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

+
+
+
+
+

Initializers

+ +
+

+ init(wallet:​period:​proposal:​ballot:​) +

+
+
public init(wallet: Wallet, period: Int, proposal: String, ballot: Ballot)  
+
+
+

Init with wallet, period, proposal and ballot

+ +
+
+
+

+ init(from:​) +

+
+
public required init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ period +

+
+
public let period: Int
+
+
+

The voting period

+ +
+
+
+

+ proposal +

+
+
public let proposal: String
+
+
+

The identifier of the proposa;

+ +
+
+
+

+ ballot +

+
+
public let ballot: Ballot
+
+
+

The wallet holders vote

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public override func encode(to encoder: Encoder) throws  
+
+
+
+

+ is​Equal(_:​) +

+
+
public func isEqual(_ op: OperationBallot) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationBallot_Ballot/index.html b/OperationBallot_Ballot/index.html new file mode 100644 index 00000000..63771e8d --- /dev/null +++ b/OperationBallot_Ballot/index.html @@ -0,0 +1,151 @@ + + + + + + KukaiCoreSwift - OperationBallot.Ballot + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Operation​Ballot.​Ballot +

+ +
+
public enum Ballot: String, Codable  
+
+
+

Enum matching the available ballot options

+ +
+
+ +
+ + + + + + +%277 + + + +OperationBallot.Ballot + + +OperationBallot.Ballot + + + + + +String + +String + + + +OperationBallot.Ballot->String + + + + + +Codable + +Codable + + + +OperationBallot.Ballot->Codable + + + + + + + + +
+

Member Of

+
+
OperationBallot
+

Operation to submit a ballot on an upcoming proposal

+
+
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ nay +

+
+
case nay
+
+
+
+

+ yay +

+
+
case yay
+
+
+
+

+ pass +

+
+
case pass
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationBlockHeader/index.html b/OperationBlockHeader/index.html new file mode 100644 index 00000000..16b85c8e --- /dev/null +++ b/OperationBlockHeader/index.html @@ -0,0 +1,238 @@ + + + + + + KukaiCoreSwift - OperationBlockHeader + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Operation​Block​Header +

+ +
+
public struct OperationBlockHeader: Codable, Equatable  
+
+
+ +
+ + + + + + +%643 + + + +OperationBlockHeader + + +OperationBlockHeader + + + + + +Codable + +Codable + + + +OperationBlockHeader->Codable + + + + + +Equatable + +Equatable + + + +OperationBlockHeader->Equatable + + + + + + + + +
+

Nested Types

+
+
OperationBlockHeader.CodingKeys
+
+
+

Conforms To

+
+
Codable
+
Equatable
+
+
+
+

Initializers

+ +
+

+ init(level:​proto:​predecessor:​timestamp:​validation​Pass:​operations​Hash:​fitness:​context:​priority:​proof​OfWork​Nonce:​seed​Nonce​Hash:​signature:​) +

+
+
public init(level: Int, proto: Int, predecessor: String, timestamp: Date, validationPass: Int, operationsHash: String, fitness: [String], context: String, priority: Int, proofOfWorkNonce: String, seedNonceHash: String?, signature: String)  
+
+
+
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ level +

+
+
public let level: Int
+
+
+
+

+ proto +

+
+
public let proto: Int
+
+
+
+

+ predecessor +

+
+
public let predecessor: String
+
+
+
+

+ timestamp +

+
+
public let timestamp: Date
+
+
+
+

+ validation​Pass +

+
+
public let validationPass: Int
+
+
+
+

+ operations​Hash +

+
+
public let operationsHash: String
+
+
+
+

+ fitness +

+
+
public let fitness: [String] 
+
+
+
+

+ context +

+
+
public let context: String
+
+
+
+

+ priority +

+
+
public let priority: Int
+
+
+
+

+ proof​OfWork​Nonce +

+
+
public let proofOfWorkNonce: String
+
+
+
+

+ seed​Nonce​Hash +

+
+
public let seedNonceHash: String? 
+
+
+
+

+ signature +

+
+
public let signature: String
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationBlockHeader_CodingKeys/index.html b/OperationBlockHeader_CodingKeys/index.html new file mode 100644 index 00000000..c5505397 --- /dev/null +++ b/OperationBlockHeader_CodingKeys/index.html @@ -0,0 +1,218 @@ + + + + + + KukaiCoreSwift - OperationBlockHeader.CodingKeys + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Operation​Block​Header.​Coding​Keys +

+ +
+
public enum CodingKeys: String, CodingKey  
+
+
+ +
+ + + + + + +%417 + + + +OperationBlockHeader.CodingKeys + + +OperationBlockHeader.CodingKeys + + + + + +CodingKey + +CodingKey + + + +OperationBlockHeader.CodingKeys->CodingKey + + + + + +String + +String + + + +OperationBlockHeader.CodingKeys->String + + + + + + + + +
+

Member Of

+
+
OperationBlockHeader
+
+
+

Conforms To

+
+
CodingKey
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ level +

+
+
case level
+
+
+
+

+ proto +

+
+
case proto
+
+
+
+

+ predecessor +

+
+
case predecessor
+
+
+
+

+ timestamp +

+
+
case timestamp
+
+
+
+

+ validation​Pass +

+
+
case validationPass = "validation_pass"
+
+
+
+

+ operations​Hash +

+
+
case operationsHash = "operations_hash"
+
+
+
+

+ fitness +

+
+
case fitness
+
+
+
+

+ context +

+
+
case context
+
+
+
+

+ priority +

+
+
case priority
+
+
+
+

+ proof​OfWork​Nonce +

+
+
case proofOfWorkNonce = "proof_of_work_nonce"
+
+
+
+

+ seed​Nonce​Hash +

+
+
case seedNonceHash = "seed_nonce_hash"
+
+
+
+

+ signature +

+
+
case signature
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationDelegation/index.html b/OperationDelegation/index.html index ec8c1837..977a082c 100644 --- a/OperationDelegation/index.html +++ b/OperationDelegation/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%245 +%357 @@ -248,7 +248,7 @@

Returns

diff --git a/OperationDoubleBakingEvidence/index.html b/OperationDoubleBakingEvidence/index.html new file mode 100644 index 00000000..fc5cd6fc --- /dev/null +++ b/OperationDoubleBakingEvidence/index.html @@ -0,0 +1,181 @@ + + + + + + KukaiCoreSwift - OperationDoubleBakingEvidence + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Operation​Double​Baking​Evidence +

+ +
+
public class OperationDoubleBakingEvidence: Operation  
+
+
+

Operation to report a baking of baking the same block twice

+ +
+
+ +
+ + + + + + +%291 + + + +OperationDoubleBakingEvidence + + +OperationDoubleBakingEvidence + + + + + +Operation + + +Operation + + + + + +OperationDoubleBakingEvidence->Operation + + + + + + + + +
+

Superclass

+
+
Operation
+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

+
+
+
+
+

Initializers

+ +
+

+ init(wallet:​bh1:​bh2:​) +

+
+
public init(wallet: Wallet, bh1: OperationBlockHeader, bh2: OperationBlockHeader)  
+
+
+

Init with wallet and two block headers

+ +
+
+
+

+ init(from:​) +

+
+
public required init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ bh1 +

+
+
public let bh1: OperationBlockHeader
+
+
+

The block header of the first baked block

+ +
+
+
+

+ bh2 +

+
+
public let bh2: OperationBlockHeader
+
+
+

The block header of the second baked block

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public override func encode(to encoder: Encoder) throws  
+
+
+
+

+ is​Equal(_:​) +

+
+
public func isEqual(_ op: OperationDoubleBakingEvidence) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationDoubleEndorsementEvidence/index.html b/OperationDoubleEndorsementEvidence/index.html new file mode 100644 index 00000000..135e66fb --- /dev/null +++ b/OperationDoubleEndorsementEvidence/index.html @@ -0,0 +1,187 @@ + + + + + + KukaiCoreSwift - OperationDoubleEndorsementEvidence + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Operation​Double​Endorsement​Evidence +

+ +
+
public class OperationDoubleEndorsementEvidence: Operation  
+
+
+

Operation to report a baker trying to endorse a block twice

+ +
+
+ +
+ + + + + + +%283 + + + +OperationDoubleEndorsementEvidence + + +OperationDoubleEndorsementEvidence + + + + + +Operation + + +Operation + + + + + +OperationDoubleEndorsementEvidence->Operation + + + + + + + + +
+

Nested Types

+
+
OperationDoubleEndorsementEvidence.InlinedEndorsement
+

Internal struct used to amtch expected struct of data

+
+
+

Superclass

+
+
Operation
+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

+
+
+
+
+

Initializers

+ +
+

+ init(wallet:​op1:​op2:​) +

+
+
public init(wallet: Wallet, op1: InlinedEndorsement, op2: InlinedEndorsement)  
+
+
+

Init with wallet and 2 suspected endorsements

+ +
+
+
+

+ init(from:​) +

+
+
public required init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ op1 +

+
+
public let op1: InlinedEndorsement
+
+
+

The first endorsement

+ +
+
+
+

+ op2 +

+
+
public let op2: InlinedEndorsement
+
+
+

The second endorsement (should be matching details of first)

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public override func encode(to encoder: Encoder) throws  
+
+
+
+

+ is​Equal(_:​) +

+
+
public func isEqual(_ op: OperationDoubleEndorsementEvidence) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationDoubleEndorsementEvidence_InlinedEndorsement/index.html b/OperationDoubleEndorsementEvidence_InlinedEndorsement/index.html new file mode 100644 index 00000000..998317c4 --- /dev/null +++ b/OperationDoubleEndorsementEvidence_InlinedEndorsement/index.html @@ -0,0 +1,156 @@ + + + + + + KukaiCoreSwift - OperationDoubleEndorsementEvidence.InlinedEndorsement + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Operation​Double​Endorsement​Evidence.​Inlined​Endorsement +

+ +
+
public struct InlinedEndorsement: Codable, Equatable  
+
+
+

Internal struct used to amtch expected struct of data

+ +
+
+ +
+ + + + + + +%223 + + + +OperationDoubleEndorsementEvidence.InlinedEndorsement + + +OperationDoubleEndorsementEvidence.InlinedEndorsement + + + + + +Equatable + +Equatable + + + +OperationDoubleEndorsementEvidence.InlinedEndorsement->Equatable + + + + + +Codable + +Codable + + + +OperationDoubleEndorsementEvidence.InlinedEndorsement->Codable + + + + + + + + +
+

Member Of

+
+
OperationDoubleEndorsementEvidence
+

Operation to report a baker trying to endorse a block twice

+
+
+

Nested Types

+
+
OperationDoubleEndorsementEvidence.InlinedEndorsement.Content
+
+
+

Conforms To

+
+
Codable
+
Equatable
+
+
+
+

Properties

+ +
+

+ branch +

+
+
public let branch: String
+
+
+
+

+ operations +

+
+
public let operations: Content
+
+
+
+

+ signature +

+
+
public let signature: String? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationDoubleEndorsementEvidence_InlinedEndorsement_Content/index.html b/OperationDoubleEndorsementEvidence_InlinedEndorsement_Content/index.html new file mode 100644 index 00000000..6003ec86 --- /dev/null +++ b/OperationDoubleEndorsementEvidence_InlinedEndorsement_Content/index.html @@ -0,0 +1,139 @@ + + + + + + KukaiCoreSwift - OperationDoubleEndorsementEvidence.InlinedEndorsement.Content + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Operation​Double​Endorsement​Evidence.​Inlined​Endorsement.​Content +

+ +
+
public struct Content: Codable, Equatable  
+
+
+ +
+ + + + + + +%149 + + + +OperationDoubleEndorsementEvidence.InlinedEndorsement.Content + + +OperationDoubleEndorsementEvidence.InlinedEndorsement.Content + + + + + +Codable + +Codable + + + +OperationDoubleEndorsementEvidence.InlinedEndorsement.Content->Codable + + + + + +Equatable + +Equatable + + + +OperationDoubleEndorsementEvidence.InlinedEndorsement.Content->Equatable + + + + + + + + +
+

Member Of

+
+
OperationDoubleEndorsementEvidence.InlinedEndorsement
+

Internal struct used to amtch expected struct of data

+
+
+

Conforms To

+
+
Codable
+
Equatable
+
+
+
+

Properties

+ +
+

+ kind +

+
+
public let kind: OperationKind
+
+
+
+

+ level +

+
+
public let level: Int
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationEndorsement/index.html b/OperationEndorsement/index.html new file mode 100644 index 00000000..edfa229c --- /dev/null +++ b/OperationEndorsement/index.html @@ -0,0 +1,169 @@ + + + + + + KukaiCoreSwift - OperationEndorsement + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Operation​Endorsement +

+ +
+
public class OperationEndorsement: Operation  
+
+
+

Operation for endorsing a block

+ +
+
+ +
+ + + + + + +%403 + + + +OperationEndorsement + + +OperationEndorsement + + + + + +Operation + + +Operation + + + + + +OperationEndorsement->Operation + + + + + + + + +
+

Superclass

+
+
Operation
+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

+
+
+
+
+

Initializers

+ +
+

+ init(wallet:​level:​) +

+
+
public init(wallet: Wallet, level: Int)  
+
+
+

Init with wallet and block level

+ +
+
+
+

+ init(from:​) +

+
+
public required init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ level +

+
+
public let level: Int
+
+
+

Block level

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public override func encode(to encoder: Encoder) throws  
+
+
+
+

+ is​Equal(_:​) +

+
+
public func isEqual(_ op: OperationEndorsement) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationFactory/index.html b/OperationFactory/index.html index d2944016..abd3fba0 100644 --- a/OperationFactory/index.html +++ b/OperationFactory/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -44,7 +44,16 @@

Although not every action requires more than one operation, all functions will return an array, for consistency.

- +
+ + +

Nested Types

+
+
OperationFactory.Extractor
+

Internal Struct to encapsulate helpers methods needed to extract critical information from an array of operations, needed for processing decisions like "do i display a send token screen, or a send NFt screen", fetching total XTZ sent in 1 action etc

+
+
+

Methods

@@ -101,6 +110,58 @@

Parameters

Returns

An array of Operation subclasses.

+
+
+

+ send​Operation(_:​of​Nft:​from:​to:​) +

+
+
public static func sendOperation(_ amount: Decimal, ofNft nft: NFT, from: String, to: String) -> [Operation]  
+
+
+

Create the operations necessary to send aan NFT

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parameter

The amount of the given token to send.

+
of​NftNFT

The NFT type that will be sent.

+
fromString

The address to deduct the funds from.

+
toString

The destination address that will recieve the funds.

+
+

Returns

+

An array of Operation subclasses.

+

@@ -176,15 +237,131 @@

Returns

An array of Operation subclasses.

-
+

- allowance​Operation(token​Address:​spender​Address:​allowance:​wallet:​) + swap​Xtz​ToToken(with​Dex:​xtz​Amount:​min​Token​Amount:​wallet​Address:​timeout:​)

-
public static func allowanceOperation(tokenAddress: String, spenderAddress: String, allowance: TokenAmount, wallet: Wallet) -> Operation  
+
public static func swapXtzToToken(withDex dex: DipDupExchange, xtzAmount: XTZAmount, minTokenAmount: TokenAmount, walletAddress: String, timeout: TimeInterval) -> [Operation]  
-

Create the operations necessary to register an allowance, allowing another address to send FA tokens on your behalf. +

Create the operations necessary to perform an exchange of XTZ for a given FA token, using a given dex

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
with​DexDip​Dup​Exchange

Enum controling which dex to use to perform the swap

+
xtz​AmountXTZAmount

The amount of XTZ to be swaped

+
min​Token​AmountToken​Amount

The minimum token amount you will accept

+
wallet

The wallet signing the operation

+
timeoutTime​Interval

Max amount of time to wait before asking the node to cancel the operation

+
+

Returns

+

An array of Operation subclasses.

+ +
+
+

+ swap​Token​ToXTZ(with​Dex:​token​Amount:​min​XTZAmount:​wallet​Address:​timeout:​) +

+
+
public static func swapTokenToXTZ(withDex dex: DipDupExchange, tokenAmount: TokenAmount, minXTZAmount: XTZAmount, walletAddress: String, timeout: TimeInterval) -> [Operation]  
+
+
+

Create the operations necessary to perform an exchange of a given FA token for XTZ, using dex contracts

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
with​DexDip​Dup​Exchange

DipDupExchange instance providing information about the exchange

+
token​AmountToken​Amount

The amount of Token to be swapped

+
min​XTZAmountXTZAmount

The minimum xtz amount you will accept

+
wallet

The wallet signing the operation

+
timeoutTime​Interval

Max amount of time to wait before asking the node to cancel the operation

+
+

Returns

+

An array of Operation subclasses.

+ +
+
+

+ approve​Operation(token​Address:​spender​Address:​allowance:​wallet​Address:​) +

+
+
public static func approveOperation(tokenAddress: String, spenderAddress: String, allowance: TokenAmount, walletAddress: String) -> Operation  
+
+
+

Create an operation to call the entrypoint approve, to allow another address to spend some of your token (only FA1.2) Used when interacting with smart contract applications like Dexter or QuipuSwap

@@ -200,9 +377,273 @@

Parameters

- xxxxx + token​Address + String +

The address of the token contract

+ + + + spender​Address + String +

The address that is being given permission to spend the users balance

+ + + + allowance + Token​Amount +

The allowance to set for the given contract

+ + + + wallet -

yyyyy

+

The wallet signing the operation

+ + + + +

Returns

+

An OperationTransaction which will invoke a smart contract call

+ +
+
+

+ update​Operators​Operation(token​Address:​spender​Address:​allowance:​wallet​Address:​) +

+
+
public static func updateOperatorsOperation(tokenAddress: String, spenderAddress: String, allowance: TokenAmount, walletAddress: String) -> Operation  
+
+
+

Create an operation to call the entrypoint update_operators, to allow another address to spend some of your token (only FA2) +Used when interacting with smart contract applications like Dexter or QuipuSwap

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
token​AddressString

The address of the token contract

+
spender​AddressString

The address that is being given permission to spend the users balance

+
allowanceToken​Amount

The allowance to set for the given contract

+
wallet

The wallet signing the operation

+
+

Returns

+

An OperationTransaction which will invoke a smart contract call

+ +
+
+

+ allowance​Operation(standard:​token​Address:​spender​Address:​allowance:​wallet​Address:​) +

+
+
public static func allowanceOperation(standard: DipDupTokenStandard, tokenAddress: String, spenderAddress: String, allowance: TokenAmount, walletAddress: String) -> Operation  
+
+
+

Return the operation necessary to register an allowance (either calling apporve or update_operators) depending on the token standard version. Removing the need to check manually +Used when interacting with smart contract applications like Dexter or QuipuSwap

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
standardDip​Dup​Token​Standard

The FA standard that the token conforms too

+
token​AddressString

The address of the token contract

+
spender​AddressString

The address that is being given permission to spend the users balance

+
allowanceToken​Amount

The allowance to set for the given contract

+
wallet

The wallet signing the operation

+
+

Returns

+

An OperationTransaction which will invoke a smart contract call

+ +
+
+

+ add​Liquidity(with​Dex:​xtz:​token:​min​Liquidty:​is​Initial​Liquidity:​wallet​Address:​timeout:​) +

+
+
public static func addLiquidity(withDex dex: DipDupExchange, xtz: XTZAmount, token: TokenAmount, minLiquidty: TokenAmount, isInitialLiquidity: Bool, walletAddress: String, timeout: TimeInterval) -> [Operation]  
+
+
+

Create the operations necessary to add liquidity to a dex contract. Use DexCalculationService to figure out the numbers required

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
with​DexDip​Dup​Exchange

DipDupExchange instance providing information about the exchange

+
xtzXTZAmount

The amount of XTZ to deposit

+
tokenToken​Amount

The amount of Token to deposit

+
min​LiquidtyToken​Amount

The minimum amount of liquidity tokens you will accept

+
is​Initial​LiquidityBool

Is this the xtzPool and tokenPool empty? If so, the operation needs to set the exchange rate for the dex. Some dex's require extra logic here

+
wallet

The wallet that will sign the operation

+
timeoutTime​Interval

The timeout in seconds, before the dex contract should cancel the operation

+
+

Returns

+

An array of Operation subclasses.

+ +
+
+

+ remove​Liquidity(with​Dex:​min​XTZ:​min​Token:​liquidity​ToBurn:​wallet​Address:​timeout:​) +

+
+
public static func removeLiquidity(withDex dex: DipDupExchange, minXTZ: XTZAmount, minToken: TokenAmount, liquidityToBurn: TokenAmount, walletAddress: String, timeout: TimeInterval) -> [Operation]  
+
+
+

Create the operations necessary to remove liquidity from a dex contract, also withdraw pending rewards if applicable. Use DexCalculationService to figure out the numbers required

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -211,12 +652,52 @@

Returns

An array of Operation subclasses.

-
+

- operation​Payload(from​Metadata:​and​Operations:​with​Wallet:​) + withdraw​Rewards(with​Dex:​wallet​Address:​)

-
public static func operationPayload(fromMetadata metadata: OperationMetadata, andOperations operations: [Operation], withWallet wallet: Wallet) -> OperationPayload  
+
public static func withdrawRewards(withDex dex: DipDupExchange, walletAddress: String) -> [Operation]  
+
+
+

Create the operations necessary to withdraw rewards from a dex contract. For example in quipuswap, XTZ provided as liquidity will earn baking rewards. This can been withdrawn at any time while leaving liquidity in palce

+ +
+

Parameters

+ +
with​DexDip​Dup​Exchange

DipDupExchange instance providing information about the exchange

+
min​XTZXTZAmount

The minimum XTZ to accept in return for the burned amount of Liquidity

+
min​TokenToken​Amount

The minimum Token to accept in return for the burned amount of Liquidity

+
liquidity​ToBurnToken​Amount

The amount of Liqudity to burn

+
wallet

The wallet that will sign the operation

+
timeoutTime​Interval

The timeout in seconds, before the dex contract should cancel the operation

+ + + + + + + + + + + + + + + + + + + +
with​DexDip​Dup​Exchange

DipDupExchange instance providing information about the exchange

+
wallet

The wallet that will sign the operation

+
+

Returns

+

An array of Operation subclasses.

+ +
+
+

+ operation​Payload(from​Metadata:​and​Operations:​wallet​Address:​base58Encoded​Public​Key:​) +

+
+
public static func operationPayload(fromMetadata metadata: OperationMetadata, andOperations operations: [Operation], walletAddress: String, base58EncodedPublicKey: String) -> OperationPayload  

Convert an array of operations into the format expected by the RPC. Will also inject a OperationReveal if the sender has not yet revealed their public key.

@@ -247,7 +728,7 @@

Parameters

with​Wallet - Wallet +

The Wallet instance that will be responsible for these operations.

@@ -291,6 +772,14 @@

Parameters

Returns

A formatted date String

+
+
+

+ send​Token​Michelson(for​FaVersion:​token​Amount:​token​Id:​to:​from:​) +

+
+
public static func sendTokenMichelson(forFaVersion faVersion: FaVersion, tokenAmount: TokenAmount, tokenId: Decimal, to: String, from: String) -> [String: Any]  
+

@@ -301,7 +790,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationFactory_Extractor/index.html b/OperationFactory_Extractor/index.html new file mode 100644 index 00000000..d8d3b622 --- /dev/null +++ b/OperationFactory_Extractor/index.html @@ -0,0 +1,177 @@ + + + + + + KukaiCoreSwift - OperationFactory.Extractor + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Operation​Factory.​Extractor +

+ +
+
public struct Extractor  
+
+
+

Internal Struct to encapsulate helpers methods needed to extract critical information from an array of operations, needed for processing decisions like "do i display a send token screen, or a send NFt screen", fetching total XTZ sent in 1 action etc

+ +
+
+ + +

Member Of

+
+
OperationFactory
+

Class responsible for creating operations necessary to perform a given action, and converting those operations into the single payload expected by the RPC. +Although not every action requires more than one operation, all functions will return an array, for consistency.

+
+
+
+
+

Methods

+ +
+

+ token​IdAnd​Amount​From​Send​Michelson(michelson:​) +

+
+
public static func tokenIdAndAmountFromSendMichelson(michelson: Any) -> (rpcAmount: String, tokenId: Decimal?, destination: String)?  
+
+
+

Extract rpc amount (without decimal info) a tokenId, and the destination from a michelson FA1.2 / FA2 transfer payload

+ +
+
+
+

+ fa​Token​Details​From(transaction:​) +

+
+
public static func faTokenDetailsFrom(transaction: OperationTransaction) -> (tokenContract: String, rpcAmount: String, tokenId: Decimal?, destination: String)?  
+
+
+

Extract details from a payload in order to present to the user what it is they are trying to send

+ +
+
+
+

+ fa​Token​Details​From(operations:​) +

+
+
public static func faTokenDetailsFrom(operations: [Operation]) -> (tokenContract: String, rpcAmount: String, tokenId: Decimal?, destination: String)?  
+
+
+

Helper to call faTokenDetailsFrom(transaction: OperationTransaction) on the first OperationTransaction in an array of operations. Allows to more easily parse an array of operations that may include approval's or update_operator calls

+ +
+
+
+

+ is​Tez​Transfer(operations:​) +

+
+
public static func isTezTransfer(operations: [Operation]) -> Bool  
+
+
+

Return true if

+ +
+
+
    +
  • +

    contains 1 operation with a non-zero amount, with no parameters

    +
  • +
+ +
+
+
+

+ first​Transfer​Entrypoint​Operation(operations:​) +

+
+
public static func firstTransferEntrypointOperation(operations: [Operation]) -> OperationTransaction?  
+
+
+

Easy way to extract the first non-approval or update_operator transaction

+ +
+
+
+

+ is​Contract​Call(operations:​) +

+
+
public static func isContractCall(operations: [Operation]) -> (entrypoint: String, address: String)?  
+
+
+

Return the entrypoint and address of the first operation, that doesn't equal approve, update_operator or transfer

+ +
+
+
+

+ first​Contract​Call​Operation(operations:​) +

+
+
public static func firstContractCallOperation(operations: [Operation]) -> OperationTransaction?  
+
+
+

Return the first operation where entrypoint doesn't equal approve, update_operator or transfer

+ +
+
+
+

+ total​XTZAmount​For​Contract​Call(operations:​) +

+
+
public static func totalXTZAmountForContractCall(operations: [Operation]) -> XTZAmount  
+
+
+

Run through list of operations and extract .amount from any OperationTransaction

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationFees/index.html b/OperationFees/index.html index fc2e918a..ce0b7333 100644 --- a/OperationFees/index.html +++ b/OperationFees/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%287 +%799 @@ -117,7 +117,7 @@

network​Fees

-
public var networkFees: [[NetworkFeeType: XTZAmount]] = [] 
+
public var networkFees: [NetworkFeeType: XTZAmount] = [:] 

Additional fees the account will have to pay in order to send this operation. Such as allocating space for an unrevealed account.

@@ -174,6 +174,18 @@

Add together all the network fees and transaction fees

+
+

+
+

+ zero() +

+
+
public static func zero() -> OperationFees  
+
+
+

Creates an OperationFees object, with everything set to zero. Primarly used as a default / placeholder until an estimation can be performed

+
@@ -199,8 +211,8 @@

Parameters

- operation​King - + operation​Kind + Operation​Kind

enum to denote the type of Operation

@@ -235,7 +247,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationFees_NetworkFeeType/index.html b/OperationFees_NetworkFeeType/index.html index 81e36912..8dcd10c9 100644 --- a/OperationFees_NetworkFeeType/index.html +++ b/OperationFees_NetworkFeeType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%231 +%295 @@ -123,7 +123,7 @@

diff --git a/OperationKind/index.html b/OperationKind/index.html index 7a64c5fb..2c2c0821 100644 --- a/OperationKind/index.html +++ b/OperationKind/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%111 +%133 @@ -66,27 +66,27 @@ - + -Codable +String -Codable +String - - -OperationKind->Codable + + +OperationKind->String - + -String +Codable -String +Codable - - -OperationKind->String + + +OperationKind->Codable @@ -180,6 +180,54 @@

case activate_account

+
+

+ endorsement +

+
+
case endorsement
+
+
+
+

+ seed_nonce_revelation +

+
+
case seed_nonce_revelation
+
+
+
+

+ double_endorsement_evidence +

+
+
case double_endorsement_evidence
+
+
+
+

+ double_baking_evidence +

+
+
case double_baking_evidence
+
+
+
+

+ proposals +

+
+
case proposals
+
+
+
+

+ ballot +

+
+
case ballot
+
+

unknown @@ -232,7 +280,7 @@

Parameters

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationMetadata/index.html b/OperationMetadata/index.html index 574c4d5a..1383c89e 100644 --- a/OperationMetadata/index.html +++ b/OperationMetadata/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%351 +%299 @@ -183,7 +183,7 @@

public let branch: String

-

The current Tezos network branch to use for Operation's

+

The current branch used by the head block, used for estiamting and running preapply, to ensure the latest state information is available

@@ -208,7 +208,7 @@

diff --git a/OperationOrigination/index.html b/OperationOrigination/index.html index 1448bd9a..13a4ae88 100644 --- a/OperationOrigination/index.html +++ b/OperationOrigination/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%257 +%513 @@ -272,7 +272,7 @@

Returns

diff --git a/OperationPayload/index.html b/OperationPayload/index.html index e0c4d5bc..c0c2a2df 100644 --- a/OperationPayload/index.html +++ b/OperationPayload/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%323 +%397 @@ -66,27 +66,27 @@ - + -Equatable +Codable -Equatable +Codable - - -OperationPayload->Equatable + + +OperationPayload->Codable - + -Codable +Equatable -Codable +Equatable - - -OperationPayload->Codable + + +OperationPayload->Equatable @@ -110,7 +110,7 @@

branch

-
public let branch: String
+
public var branch: String

The bracnh to use when sending

@@ -122,7 +122,7 @@

contents

-
public let contents: [Operation] 
+
public var contents: [Operation] 

An array of Operation's to be sent together in 1 request.

@@ -138,7 +138,7 @@

add​Signature(_:​signing​Curve:​)

-
public mutating func addSignature(_ binarySignature: [UInt8], signingCurve: EllipticalCurve)  
+
public mutating func addSignature(_ binarySignature: [UInt8], signingCurve: EllipticalCurve)  

Add the signature and the protocol to the operation so that it can be injected to the blockchain

@@ -209,7 +209,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/MichelsonValue/index.html b/OperationProposals/index.html similarity index 50% rename from MichelsonValue/index.html rename to OperationProposals/index.html index bc7e3f87..9d20c787 100644 --- a/MichelsonValue/index.html +++ b/OperationProposals/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - MichelsonValue + KukaiCoreSwift - OperationProposals
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,15 +33,11 @@

On This Page

Class - Michelson​Value + Operation​Proposals

-
public class MichelsonValue: AbstractMichelson  
-
-
-

A polymophic warpper around a key value pair, used in conjuction with MichelsonPair to leverage automatice JSON serialisation through Codable

- +
public class OperationProposals: Operation  
@@ -51,33 +47,33 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%35 +%451 - + -MichelsonValue - +OperationProposals + -MichelsonValue +OperationProposals - + -AbstractMichelson - +Operation + -AbstractMichelson +Operation - + -MichelsonValue->AbstractMichelson +OperationProposals->Operation @@ -85,67 +81,63 @@ - +

Superclass

-
AbstractMichelson
-

Base Michelson type, only used for polymorphism inside MichelsonPair objects

+
Operation
+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

Initializers

-
+

- init(key:​value:​) + init(wallet:​period:​proposals:​)

-
public init(key: MichelsonConstant, value: String)  
+
public init(wallet: Wallet, period: Int, proposals: [String])  
-

Init accepting a contant and a string to act as the key and value

+

Init with wallet, voting period and list of proposal identifiers

-
-
-

Properties

- -
+

- key + init(from:​)

-
public let key: MichelsonConstant
+
public required init(from decoder: Decoder) throws  
-
-

The key denoting the Michelson type

-
-
-
+
+
+

Properties

+ +

- value + period

-
public let value: String
+
public let period: Int
-

A string containing the Michelson type's value

+

The voting period

-
+

- description + proposals

-
public override var description: String  
+
public let proposals: [String] 
-

Customized description to allow object to be logged to console, how it is returned from the RPC

+

List of proposal identifiers

@@ -153,32 +145,20 @@

Methods

-
+

- encode(to:​) + encode(to:​)

public override func encode(to encoder: Encoder) throws  
-
-
-

Adhearing to Encodable

-
-
-
-

Operators

- -
+

- == + is​Equal(_:​)

-
public static func == (lhs: MichelsonValue, rhs: MichelsonValue) -> Bool  
-
-
-

Adhearing to Equatable

- +
public func isEqual(_ op: OperationProposals) -> Bool  
@@ -190,7 +170,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationResponse/index.html b/OperationResponse/index.html index 336e632f..95675043 100644 --- a/OperationResponse/index.html +++ b/OperationResponse/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%139 +%455 @@ -137,7 +137,7 @@

diff --git a/OperationResponseContent/index.html b/OperationResponseContent/index.html index cdafa70f..a8bc2815 100644 --- a/OperationResponseContent/index.html +++ b/OperationResponseContent/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%63 +%469 @@ -98,7 +98,7 @@

Conforms To

diff --git a/OperationResponseInternalOperation/index.html b/OperationResponseInternalOperation/index.html index 827ead47..315e5e76 100644 --- a/OperationResponseInternalOperation/index.html +++ b/OperationResponseInternalOperation/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%329 +%673 @@ -98,7 +98,7 @@

Conforms To

diff --git a/OperationResponseInternalResultError/index.html b/OperationResponseInternalResultError/index.html index 58c83684..90d6beeb 100644 --- a/OperationResponseInternalResultError/index.html +++ b/OperationResponseInternalResultError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%49 +%733 @@ -66,27 +66,27 @@ - + -Codable +Equatable -Codable +Equatable - - -OperationResponseInternalResultError->Codable + + +OperationResponseInternalResultError->Equatable - + -Equatable +Codable -Equatable +Codable - - -OperationResponseInternalResultError->Equatable + + +OperationResponseInternalResultError->Codable @@ -121,6 +121,30 @@

public let id: String

+
+

+ contract +

+
+
public let contract: String? 
+
+
+
+

+ expected +

+
+
public let expected: String? 
+
+
+
+

+ found +

+
+
public let found: String? 
+
+

location @@ -134,7 +158,7 @@

with

-
public let with: OperationResponseInternalResultErrorWith? 
+
public let with: FailWith? 

@@ -146,7 +170,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationResponseMetadata/index.html b/OperationResponseMetadata/index.html index df007ad3..1bb24321 100644 --- a/OperationResponseMetadata/index.html +++ b/OperationResponseMetadata/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%219 +%261 @@ -98,7 +98,7 @@

Conforms To

diff --git a/OperationResponseResult/index.html b/OperationResponseResult/index.html index a8500177..cae5e7d0 100644 --- a/OperationResponseResult/index.html +++ b/OperationResponseResult/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%205 +%237 @@ -98,7 +98,7 @@

Conforms To

diff --git a/OperationReveal/index.html b/OperationReveal/index.html index a7d195ce..d8ffc823 100644 --- a/OperationReveal/index.html +++ b/OperationReveal/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%209 +%705 @@ -128,6 +128,43 @@

Parameters

+
+

+ init(base58Encoded​Public​Key:​wallet​Address:​) +

+
+
public init(base58EncodedPublicKey: String, walletAddress: String)  
+
+
+

Create an OperationReveal.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
base58Encoded​Public​KeyString

The Wallet object, whose publicKey needs to be revealed.

+
wallet​AddressString

The Wallet object, whose publicKey needs to be revealed.

+
+

init(from:​) @@ -238,7 +275,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationSeedNonceRevelation/index.html b/OperationSeedNonceRevelation/index.html new file mode 100644 index 00000000..fabc1329 --- /dev/null +++ b/OperationSeedNonceRevelation/index.html @@ -0,0 +1,177 @@ + + + + + + KukaiCoreSwift - OperationSeedNonceRevelation + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Operation​Seed​Nonce​Revelation +

+ +
+
public class OperationSeedNonceRevelation: Operation  
+
+
+

Operation to reveal seed nonce to blockchain

+ +
+
+ +
+ + + + + + +%617 + + + +OperationSeedNonceRevelation + + +OperationSeedNonceRevelation + + + + + +Operation + + +Operation + + + + + +OperationSeedNonceRevelation->Operation + + + + + + + + +
+

Superclass

+
+
Operation
+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

+
+
+
+
+

Initializers

+ +
+

+ init(wallet:​level:​nonce:​) +

+
+
public init(wallet: Wallet, level: Int, nonce: String)  
+
+
+

Init with wallet object, block level, and nonce

+ +
+
+
+

+ init(from:​) +

+
+
public required init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ level +

+
+
public let level: Int
+
+
+

Block level

+ +
+
+
+

+ nonce +

+
+
public let nonce: String
+
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public override func encode(to encoder: Encoder) throws  
+
+
+
+

+ is​Equal(_:​) +

+
+
public func isEqual(_ op: OperationSeedNonceRevelation) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationService/index.html b/OperationService/index.html index 08938e86..7530b1e0 100644 --- a/OperationService/index.html +++ b/OperationService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,6 +51,9 @@

Nested Types

OperationService.OperationServiceError

Errors that the OperationService is capable of returning

+
OperationService.LedgerPayloadPrepResponse
+

Used to return a bunch of formatted data, to make interacting with ledger sign operation easier

+
@@ -124,7 +127,7 @@

remote​Forge​Parse​Sign​Preapply​Inject(operation​Metadata:​operation​Payload:​wallet:​completion:​)

-
public func remoteForgeParseSignPreapplyInject(operationMetadata: OperationMetadata, operationPayload: OperationPayload, wallet: Wallet, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func remoteForgeParseSignPreapplyInject(operationMetadata: OperationMetadata, operationPayload: OperationPayload, wallet: Wallet, completion: @escaping ((Result<String, KukaiError>) -> Void))  

When using remote forging, every Operation needs to be Forged, Parsed, Signed, Preapply'd and Injected to make its way into the blockchain. @@ -162,7 +165,7 @@

Parameters

completion - @escaping ((Result<String, Error​Response>) -> Void) + @escaping ((Result<String, Kukai​Error>) -> Void)

Completion block either returning a String containing an OperationHash of the injected Operation, or an Error

@@ -174,7 +177,7 @@

local​Forge​Sign​Preapply​Inject(operation​Metadata:​operation​Payload:​wallet:​completion:​)

-
public func localForgeSignPreapplyInject(operationMetadata: OperationMetadata, operationPayload: OperationPayload, wallet: Wallet, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func localForgeSignPreapplyInject(operationMetadata: OperationMetadata, operationPayload: OperationPayload, wallet: Wallet, completion: @escaping ((Result<String, KukaiError>) -> Void))  

When using local forging, every Operation needs to be Forged, Signed, Preapply'd and Injected to make its way into the blockchain. @@ -212,22 +215,36 @@

Parameters

completion - @escaping ((Result<String, Error​Response>) -> Void) + @escaping ((Result<String, Kukai​Error>) -> Void)

Completion block either returning a String containing an OperationHash of the injected Operation, or an Error

-
+

- remote​Forge(operation​Metadata:​operation​Payload:​wallet:​completion:​) + ledger​String​ToSign(forged​Hash:​operation​Payload:​)

-
public func remoteForge(operationMetadata: OperationMetadata, operationPayload: OperationPayload, wallet: Wallet, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func ledgerStringToSign(forgedHash: String, operationPayload: OperationPayload) -> String  
-

Forge an OperationPayload remotely, so it can be sent to the RPC.

+

Ledger can only parse operations under certain conditions. These conditions are not documented well. This function will attempt to determine whether the payload can be parsed or not, and returnt he appropriate string for the LedgerWallet sign function +It seems to be able to parse the payload if it contains 1 operation, of the below types. Combining types (like Reveal + Transation) causes a parse error +If the payload structure passes the conditions we are aware of, allow parsing to take place. If not, sign blake2b hash instead

+ +
+
+
+

+ preapply​And​Inject(forged​Operation:​signature:​signature​Curve:​operation​Payload:​operation​Metadata:​completion:​) +

+
+
public func preapplyAndInject(forgedOperation: String, signature: [UInt8], signatureCurve: EllipticalCurve, operationPayload: OperationPayload, operationMetadata: OperationMetadata, completion: @escaping ((Result<String, KukaiError>) -> Void))  
+
+
+

Preapply and Inject wrapped up as one function, for situations like Ledger Wallets, where signing is a complately different process, and must be done elsewhere

Parameters

@@ -242,12 +259,67 @@

Parameters

+ forged​Operation + String +

The forged operation hex without a watermark.

+ + + + signature + [UInt8] +

Binary representation of the signed operation forge.

+ + + + signature​Curve + Elliptical​Curve +

The curve used to sign the forge.

+ + + + operation​Payload + Operation​Payload +

The payload to be sent.

+ + + operation​Metadata Operation​Metadata -

fetched from getOperationMetadata(...).

+

The metadata required to send the payload.

+ completion + @escaping ((Result<String, Kukai​Error>) -> Void) +

callback with a forged hash or an error.

+ + + + +
+
+

+ remote​Forge(operation​Payload:​completion:​) +

+
+
public func remoteForge(operationPayload: OperationPayload, completion: @escaping ((Result<String, KukaiError>) -> Void))  
+
+
+

Forge an OperationPayload remotely, so it can be sent to the RPC.

+ +
+

Parameters

+ + + + + + + + + + + - + - + @@ -273,7 +345,7 @@

remote​Parse(forge​Result:​operation​Metadata:​operation​Payload:​completion:​)

-
public func remoteParse(forgeResult: Result<String, ErrorResponse>, operationMetadata: OperationMetadata, operationPayload: OperationPayload, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func remoteParse(forgeResult: Result<String, KukaiError>, operationMetadata: OperationMetadata, operationPayload: OperationPayload, completion: @escaping ((Result<String, KukaiError>) -> Void))  

Parse a forged OperationPayload on a different server to ensure nobody maliciously tampared with the request.

@@ -292,7 +364,7 @@

Parameters

- + @@ -310,19 +382,19 @@

Parameters

- +
operation​Payload Operation​Payload

created from OperationFactory.operationPayload().

@@ -255,13 +327,13 @@

Parameters

walletWallet

The Wallet object that will sign the operations.

completion@escaping ((Result<String, Error​Response>) -> Void)@escaping ((Result<String, Kukai​Error>) -> Void)

callback with a forged hash or an error.

forge​ResultResult<String, Error​Response>Result<String, Kukai​Error>

The Result object from the forge(...) function.

completion@escaping ((Result<String, Error​Response>) -> Void)@escaping ((Result<String, Kukai​Error>) -> Void)

callback which just returns success or failure with an error.

-
+

- preapply(operation​Metadata:​operation​Payload:​completion:​) + preapply(operation​Payload:​completion:​)

-
public func preapply(operationMetadata: OperationMetadata, operationPayload: OperationPayload, completion: @escaping ((Result<[OperationResponse], ErrorResponse>) -> Void))  
+
public func preapply(operationPayload: OperationPayload, completion: @escaping ((Result<[OperationResponse], KukaiError>) -> Void))  

Preapply a signed OperationPayload to check for any errors.

@@ -341,7 +413,7 @@

Parameters

operation​Metadata - Operation​Metadata +

Fetched from getOperationMetadata(...).

@@ -353,7 +425,7 @@

Parameters

completion - @escaping ((Result<[Operation​Response], Error​Response>) -> Void) + @escaping ((Result<[Operation​Response], Kukai​Error>) -> Void)

Callback which just returns success or failure with an error.

@@ -365,7 +437,7 @@

inject(signed​Bytes:​handle​Preapply​Result:​completion:​)

-
public func inject(signedBytes: String, handlePreapplyResult: Result<[OperationResponse], ErrorResponse>?, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func inject(signedBytes: String, handlePreapplyResult: Result<[OperationResponse], KukaiError>?, completion: @escaping ((Result<String, KukaiError>) -> Void))  

Inject a signed bytes to become part of the next block on the blockchain

@@ -390,7 +462,7 @@

Parameters

handle​Preapply​Result - Result<[Operation​Response], Error​Response>? + Result<[Operation​Response], Kukai​Error>?

Optionally pass in the result of the preapply function to reduce the indentation required to perform the full set of operations. Any error will be returned via the injection Result object.

@@ -406,7 +478,7 @@

Parameters

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationService_LedgerPayloadPrepResponse/index.html b/OperationService_LedgerPayloadPrepResponse/index.html new file mode 100644 index 00000000..5655cf48 --- /dev/null +++ b/OperationService_LedgerPayloadPrepResponse/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - OperationService.LedgerPayloadPrepResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Operation​Service.​Ledger​Payload​Prep​Response +

+ +
+
public struct LedgerPayloadPrepResponse  
+
+
+

Used to return a bunch of formatted data, to make interacting with ledger sign operation easier

+ +
+
+ + +

Member Of

+
+
OperationService
+

Several classes need to use pieces of the forge-sign-parse-preapply-inject flow. This class abstracts those functions away so that it can be shared throughout the library.

+
+
+
+
+

Properties

+ +
+

+ payload +

+
+
public let payload: OperationPayload
+
+
+
+

+ forged​Op +

+
+
public let forgedOp: String
+
+
+
+

+ watermarked​Op +

+
+
public let watermarkedOp: String
+
+
+
+

+ blake2bHash +

+
+
public let blake2bHash: String
+
+
+
+

+ metadata +

+
+
public let metadata: OperationMetadata
+
+
+
+

+ can​Ledger​Parse +

+
+
public let canLedgerParse: Bool
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationService_OperationServiceError/index.html b/OperationService_OperationServiceError/index.html index 48ba3bfe..34a140dc 100644 --- a/OperationService_OperationServiceError/index.html +++ b/OperationService_OperationServiceError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%187 +%393 @@ -171,7 +171,7 @@

diff --git a/OperationSmartContractInvocation/index.html b/OperationSmartContractInvocation/index.html deleted file mode 100644 index 61c91967..00000000 --- a/OperationSmartContractInvocation/index.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - KukaiCoreSwift - OperationSmartContractInvocation - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Operation​Smart​Contract​Invocation -

- -
-
public class OperationSmartContractInvocation: Operation  
-
-
-

Operation subclass for calling an entrypoint of a smart contract on the Tezos network

- -
-
- -
- - - - - - -%201 - - - -OperationSmartContractInvocation - - -OperationSmartContractInvocation - - - - - -Operation - - -Operation - - - - - -OperationSmartContractInvocation->Operation - - - - - - - - -
-

Superclass

-
-
Operation
-

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

-
-
-
-
-

Initializers

- -
-

- init(source:​amount:​destination​Contract:​entrypoint:​value:​) -

-
-
public init(source: String, amount: TokenAmount = TokenAmount.zeroBalance(decimalPlaces: 0), destinationContract: String, entrypoint: String, value: MichelsonPair?)  
-
-
-

Create an OperationOrigination.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
entrypointString

A String containing the name of the entrypoint to call.

-
valueMichelson​Pair?

A String containing the JSON Michelson/Micheline needed by the given entrypoint.

-
-
-
-

- init(from:​) -

-
-
public required init(from decoder: Decoder) throws  
-
-
-

Create a base operation.

- -
-

Parameters

- - - - - - - - - - - - - - - - -
fromDecoder

A decoder used to convert a data fromat (such as JSON) into the model object.

-
-
-
-
-

Properties

- -
-

- amount -

-
-
public var amount: String = "0"
-
-
-

The amount sent to the contract, usually zero, requirement of the network. Usually the amount is specified in the michelson

- -
-
-
-

- destination -

-
-
public let destination: String
-
-
-

The address of the contract that will be called

- -
-
-
-

- parameters -

-
-
public let parameters: [String: Encodable] 
-
-
-

Dictionary holding the entrypoint and value of the contract call

- -
-
-
-
-

Methods

- -
-

- encode(to:​) -

-
-
public override func encode(to encoder: Encoder) throws  
-
-
-

Convert the object into a data format, such as JSON.

- -
-

Parameters

- - - - - - - - - - - - - - - - -
toEncoder

An encoder that will allow conversions to multipel data formats.

-
-
-
-

- is​Equal(_:​) -

-
-
public func isEqual(_ op: OperationSmartContractInvocation) -> Bool  
-
-
-

A function to check if two operations are equal.

- -
-
-
    -
  • -

    parameter _: An Operation to compare against

    -
  • -
- -
-

Returns

-

A Bool indicating the result.

- -
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/OperationSubscription/index.html b/OperationSubscription/index.html new file mode 100644 index 00000000..4caef710 --- /dev/null +++ b/OperationSubscription/index.html @@ -0,0 +1,105 @@ + + + + + + KukaiCoreSwift - OperationSubscription + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Operation​Subscription +

+ +
+
public struct OperationSubscription: Codable  
+
+
+

Object for sending a request through SignalR to listen to operations for a given account

+ +
+
+ +
+ + + + + + +%689 + + + +OperationSubscription + + +OperationSubscription + + + + + +Codable + +Codable + + + +OperationSubscription->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+ + + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationTransaction/index.html b/OperationTransaction/index.html index 52b781aa..a0432d29 100644 --- a/OperationTransaction/index.html +++ b/OperationTransaction/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%127 +%581 @@ -105,7 +105,7 @@

public init(amount: TokenAmount, source: String, destination: String)  

-

Create an OperationTransaction.

+

Create an OperationTransaction, to send an amount of token to a destination

Parameters

@@ -140,15 +140,15 @@

Parameters

-
+

- init(from:​) + init(amount:​source:​destination:​parameters:​)

-
public required init(from decoder: Decoder) throws  
+
public init(amount: TokenAmount, source: String, destination: String, parameters: [String: Any])  
-

Create a base operation.

+

Create an OperationTransaction, to invoke a smart contract call

Parameters

@@ -163,13 +163,39 @@

Parameters

- from - Decoder -

A decoder used to convert a data fromat (such as JSON) into the model object.

+ amount + Token​Amount +

The amount of XTZ to send. Use TokenAmount().rpcRepresentation to create this value.

+ + + + source + String +

The address of the acocunt sending the operation.

+ + + + parameters + [String:​ Any] +

A dictionary containing the michlelson JSON representation needed to invoke a smart contract. Should contain a key entrypoint with a string and value which can either be a dictionary of anything, or an array of dicitonaries of anything

+ + + + destination + String +

The destination address to recieve the funds.

+
+
+

+ init(from:​) +

+
+
public required init(from decoder: Decoder) throws  
+
@@ -193,6 +219,18 @@

public let destination: String
+
+
+
+

+ parameters +

+
+
public let parameters: [String: Any]? 
+
+
+

Dictionary holding the entrypoint and value of the contract call

+
@@ -206,29 +244,6 @@

public override func encode(to encoder: Encoder) throws  
-
-

Convert the object into a data format, such as JSON.

- -
-

Parameters

- - - - - - - - - - - - - - - - -
toEncoder

An encoder that will allow conversions to multipel data formats.

-

@@ -262,7 +277,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/OperationTransactionError/index.html b/OperationTransactionError/index.html new file mode 100644 index 00000000..f4023496 --- /dev/null +++ b/OperationTransactionError/index.html @@ -0,0 +1,112 @@ + + + + + + KukaiCoreSwift - OperationTransactionError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Operation​Transaction​Error +

+ +
+
public enum OperationTransactionError: Error  
+
+
+ +
+ + + + + + +%25 + + + +OperationTransactionError + + +OperationTransactionError + + + + + +Error + +Error + + + +OperationTransactionError->Error + + + + + + + + +
+

Conforms To

+
+
Error
+
+
+
+

Enumeration Cases

+ +
+

+ invalid​Michelson​Value +

+
+
case invalidMichelsonValue
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Prefix_Address/index.html b/Prefix_Address/index.html deleted file mode 100644 index 2b1b175a..00000000 --- a/Prefix_Address/index.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - KukaiCoreSwift - Prefix.Address - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Enumeration - Prefix.​Address -

- -
-
public enum Address  
-
-
- - -

Member Of

-
-
Prefix
-

Prefixes needed to add to hex strings to denote elliptical curves

-
-
-
-
-

Properties

- -
-

- tz1 -

-
-
public static let tz1: [UInt8] = [6, 161, 159]  
-
-
-
-

- tz2 -

-
-
public static let tz2: [UInt8] = [6, 161, 161]  
-
-
-
-

- tz3 -

-
-
public static let tz3: [UInt8] = [6, 161, 164]  
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Prefix_Keys/index.html b/Prefix_Keys/index.html deleted file mode 100644 index 6603e81d..00000000 --- a/Prefix_Keys/index.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - KukaiCoreSwift - Prefix.Keys - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
- -
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Prefix_Keys_Ed25519/index.html b/Prefix_Keys_Ed25519/index.html deleted file mode 100644 index 50d0a9dc..00000000 --- a/Prefix_Keys_Ed25519/index.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - KukaiCoreSwift - Prefix.Keys.Ed25519 - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Enumeration - Prefix.​Keys.​Ed25519 -

- -
-
public enum Ed25519  
-
-
- - -

Member Of

-
-
Prefix.Keys
-
-
-
-
-

Properties

- -
-

- `public` -

-
-
public static let `public`: [UInt8] = [13, 15, 37, 217]  
-
-
-
-

- secret -

-
-
public static let secret: [UInt8] = [43, 246, 78, 7]     
-
-
-
-

- seed -

-
-
public static let seed: [UInt8] = [13, 15, 58, 7]  
-
-
-
-

- signature -

-
-
public static let signature: [UInt8] = [9, 245, 205, 134, 18]  
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Prefix_Keys_P256/index.html b/Prefix_Keys_P256/index.html deleted file mode 100644 index 2d9ccb78..00000000 --- a/Prefix_Keys_P256/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - KukaiCoreSwift - Prefix.Keys.P256 - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Enumeration - Prefix.​Keys.​P256 -

- -
-
public enum P256  
-
-
- - -

Member Of

-
-
Prefix.Keys
-
-
-
-
-

Properties

- -
-

- secret -

-
-
public static let secret: [UInt8] = [16, 81, 238, 189]   
-
-
-
-

- `public` -

-
-
public static let `public`: [UInt8] = [3, 178, 139, 127]  
-
-
-
-

- signature -

-
-
public static let signature: [UInt8] = [54, 240, 44, 52]  
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Prefix_Keys_Secp256k1/index.html b/Prefix_Keys_Secp256k1/index.html deleted file mode 100644 index bbdb5122..00000000 --- a/Prefix_Keys_Secp256k1/index.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - KukaiCoreSwift - Prefix.Keys.Secp256k1 - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Enumeration - Prefix.​Keys.​Secp256k1 -

- -
-
public enum Secp256k1  
-
-
- - -

Member Of

-
-
Prefix.Keys
-
-
-
-
-

Properties

- -
-

- `public` -

-
-
public static let `public`: [UInt8] = [3, 254, 226, 86]  
-
-
-
-

- secret -

-
-
public static let secret: [UInt8] = [17, 162, 224, 201]   
-
-
-
-

- signature -

-
-
public static let signature: [UInt8] = [13, 115, 101, 19, 63]  
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/PublicKey/index.html b/PublicKey/index.html deleted file mode 100644 index 3d76c5f9..00000000 --- a/PublicKey/index.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - KukaiCoreSwift - PublicKey - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Public​Key -

- -
-
public struct PublicKey  
-
-
-

A struct representing a PublicKey for LinearWallet classes

- -
-
- -
- - - - - - -%121 - - - -PublicKey - - -PublicKey - - - - - -CustomStringConvertible - -CustomStringConvertible - - - -PublicKey->CustomStringConvertible - - - - - -Equatable - -Equatable - - - -PublicKey->Equatable - - - - - - - - -
-

Conforms To

-
-
CustomStringConvertible
-
Equatable
-
-
-
-

Initializers

- -
-

- init(bytes:​signing​Curve:​) -

-
-
public init(bytes: [UInt8], signingCurve: EllipticalCurve)  
-
-
-

Initialize a key with the given bytes and signing curve.

- -
-
-
-

- init?(string:​signing​Curve:​) -

-
-
public init?(string: String, signingCurve: EllipticalCurve)  
-
-
-

Initialize a public key with the given base58check encoded string.

- -
-
-
-

- init?(secret​Key:​) -

-
-
public init?(secretKey: SecretKey)  
-
-
-

Initialize a key from the given secret key with the given signing curve.

- -
-
-
-
-

Properties

- -
-

- bytes -

-
-
public var bytes: [UInt8] 
-
-
-

The raw bytes of the public key

- -
-
-
-

- signing​Curve -

-
-
public let signingCurve: EllipticalCurve
-
-
-

The signing curve used by the public key, to generate a wallet address

- -
-
-
-

- base58Check​Representation -

-
-
public var base58CheckRepresentation: String  
-
-
-

Return a Base58 encoded version of the publicKey

- -
-
-
-

- public​Key​Hash -

-
-
public var publicKeyHash: String?  
-
-
-

Return a hash of the publicKey with the appropriate address prefix

- -
-
-
-

- description -

-
-
public var description: String  
-
-
-
-
-

Methods

- -
-

- verify(signature:​hex:​) -

-
-
public func verify(signature: [UInt8], hex: String) -> Bool  
-
-
-

Verify that the given signature matches the given input hex.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
hexString

The hex to check.

-
signature[UInt8]

The proposed signature of the bytes.

-
public​Key

The proposed public key.

-
-

Returns

-

True if the public key and signature match the given bytes.

- -
-
-

- verify(signature:​bytes:​) -

-
-
public func verify(signature: [UInt8], bytes: [UInt8]) -> Bool  
-
-
-

Verify that the given signature matches the given input bytes.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
bytes[UInt8]

The bytes to check.

-
signature[UInt8]

The proposed signature of the bytes.

-
public​Key

The proposed public key.

-
-

Returns

-

True if the public key and signature match the given bytes.

- -
-
-
-

Operators

- -
-

- == -

-
-
public static func == (lhs: PublicKey, rhs: PublicKey) -> Bool  
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/Publisher/index.html b/Publisher/index.html new file mode 100644 index 00000000..6d10ee9d --- /dev/null +++ b/Publisher/index.html @@ -0,0 +1,111 @@ + + + + + + KukaiCoreSwift - Publisher + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + Publisher +

+
+

Methods

+ +
+

+ as​Future() +

+
+
func asFuture() -> Future<Output, Never>  
+
+
+

Wrap a Publisher in a Future of type <Output, Never>

+ +
+
+
+

+ as​Deferred​Future() +

+
+
func asDeferredFuture() -> Deferred<Future<Output, Never>>  
+
+
+

Wrap a Publisher in a Deferred Future of type <Output, Never>

+ +
+
+
+

+ convert​ToResult() +

+
+
func convertToResult() -> AnyPublisher<Result<Output, Failure>, Never>  
+
+
+

Convert a publisher output into a swift Resultobject to make handling sink's easier

+ +
+
+
+

+ on​Receive​Output(_:​) +

+
+
func onReceiveOutput(_ callback: @escaping ((Self.Output) -> Void)) -> Publishers.HandleEvents<Self>  
+
+
+

Call .handleEvents, but only use the receiveOutput callback as a shorthand way of running some logic or clean up code

+ +
+
+
+

+ sink(on​Error:​on​Success:​on​Complete:​) +

+
+
func sink(onError: @escaping ((Failure) -> Void), onSuccess: @escaping ((Output) -> Void), onComplete: (() -> Void)? = nil) -> AnyCancellable  
+
+
+

Custom sink implementation breaking each piece into a seperate dedicated callback, avoiding the need to call a switch or unwrap an error

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeLedger/index.html b/QuipuswapExchangeLedger/index.html new file mode 100644 index 00000000..227c359b --- /dev/null +++ b/QuipuswapExchangeLedger/index.html @@ -0,0 +1,132 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeLedger + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Quipuswap​Exchange​Ledger +

+ +
+
public struct QuipuswapExchangeLedger: Codable  
+
+
+

The unique data inside the Ledger BigMap

+ +
+
+ +
+ + + + + + +%429 + + + +QuipuswapExchangeLedger + + +QuipuswapExchangeLedger + + + + + +Codable + +Codable + + + +QuipuswapExchangeLedger->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ balance +

+
+
public let balance: String
+
+
+

Usable balance of the token owned

+ +
+
+
+

+ frozen_balance +

+
+
public let frozen_balance: String
+
+
+

Currently unaccessible balance of the token owned

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeLedgerKey/index.html b/QuipuswapExchangeLedgerKey/index.html new file mode 100644 index 00000000..ffc66dd6 --- /dev/null +++ b/QuipuswapExchangeLedgerKey/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeLedgerKey + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Quipuswap​Exchange​Ledger​Key +

+ +
+
public struct QuipuswapExchangeLedgerKey: Codable  
+
+
+

The gneric container object holding the raw data

+ +
+
+ +
+ + + + + + +%345 + + + +QuipuswapExchangeLedgerKey + + +QuipuswapExchangeLedgerKey + + + + + +Codable + +Codable + + + +QuipuswapExchangeLedgerKey->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ value +

+
+
public let value: QuipuswapExchangeLedger
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeLedgerKeyResponse/index.html b/QuipuswapExchangeLedgerKeyResponse/index.html new file mode 100644 index 00000000..511b4f63 --- /dev/null +++ b/QuipuswapExchangeLedgerKeyResponse/index.html @@ -0,0 +1,55 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeLedgerKeyResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Typealias + Quipuswap​Exchange​Ledger​Key​Response +

+ +
+
public typealias QuipuswapExchangeLedgerKeyResponse = [QuipuswapExchangeLedgerKey] 
+
+
+

Wrapper object around the network response

+ +
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeStorage/index.html b/QuipuswapExchangeStorage/index.html new file mode 100644 index 00000000..abeb8b69 --- /dev/null +++ b/QuipuswapExchangeStorage/index.html @@ -0,0 +1,244 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeStorage + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Quipuswap​Exchange​Storage +

+ +
+
public struct QuipuswapExchangeStorage: Codable  
+
+
+

Unique Quipuswap contract storage object

+ +
+
+ +
+ + + + + + +%589 + + + +QuipuswapExchangeStorage + + +QuipuswapExchangeStorage + + + + + +Codable + +Codable + + + +QuipuswapExchangeStorage->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ ledger +

+
+
public let ledger: Int
+
+
+

Ledger bigmap id

+ +
+
+
+

+ user_rewards +

+
+
public let user_rewards: Int
+
+
+

user rewards bigmap id

+ +
+
+
+

+ reward +

+
+
public let reward: String
+
+
+

The current reward

+ +
+
+
+

+ reward_paid +

+
+
public let reward_paid: String
+
+
+

The amount of rewards paid out

+ +
+
+
+

+ total_reward +

+
+
public let total_reward: String
+
+
+

Total reward

+ +
+
+
+

+ total_supply +

+
+
public let total_supply: String
+
+
+

Totoal supply of this token

+ +
+
+
+

+ period_finish +

+
+
public let period_finish: String
+
+
+

Date/Time the period will finish

+ +
+
+
+

+ reward_per_sec +

+
+
public let reward_per_sec: String
+
+
+

The reward per second

+ +
+
+
+

+ last_update_time +

+
+
public let last_update_time: String
+
+
+

Date/Time of the last recorded update to the sotrage

+ +
+
+
+

+ reward_per_share +

+
+
public let reward_per_share: String
+
+
+

The entitled reward per 1 share owned

+ +
+
+
+
+

Methods

+ +
+

+ date(from:​) +

+
+
public func date(from: String) -> Date?  
+
+
+

Convert a string to a Date object using Zulu time format

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeStorageResponse/index.html b/QuipuswapExchangeStorageResponse/index.html new file mode 100644 index 00000000..c71da12a --- /dev/null +++ b/QuipuswapExchangeStorageResponse/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeStorageResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Quipuswap​Exchange​Storage​Response +

+ +
+
public struct QuipuswapExchangeStorageResponse: Codable  
+
+
+

Network wrapper object

+ +
+
+ +
+ + + + + + +%677 + + + +QuipuswapExchangeStorageResponse + + +QuipuswapExchangeStorageResponse + + + + + +Codable + +Codable + + + +QuipuswapExchangeStorageResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ storage +

+
+
public let storage: QuipuswapExchangeStorage
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeUserRewards/index.html b/QuipuswapExchangeUserRewards/index.html new file mode 100644 index 00000000..f58299c4 --- /dev/null +++ b/QuipuswapExchangeUserRewards/index.html @@ -0,0 +1,132 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeUserRewards + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Quipuswap​Exchange​User​Rewards +

+ +
+
public struct QuipuswapExchangeUserRewards: Codable  
+
+
+

The unique data inside the User Rewards BigMap

+ +
+
+ +
+ + + + + + +%701 + + + +QuipuswapExchangeUserRewards + + +QuipuswapExchangeUserRewards + + + + + +Codable + +Codable + + + +QuipuswapExchangeUserRewards->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ reward +

+
+
public let reward: String
+
+
+

Total reward the user has earned

+ +
+
+
+

+ reward_paid +

+
+
public let reward_paid: String
+
+
+

Total rewards that have been paid out to the user

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeUserRewardsKey/index.html b/QuipuswapExchangeUserRewardsKey/index.html new file mode 100644 index 00000000..44a37438 --- /dev/null +++ b/QuipuswapExchangeUserRewardsKey/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeUserRewardsKey + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Quipuswap​Exchange​User​Rewards​Key +

+ +
+
public struct QuipuswapExchangeUserRewardsKey: Codable  
+
+
+

The gneric container object holding the raw data

+ +
+
+ +
+ + + + + + +%465 + + + +QuipuswapExchangeUserRewardsKey + + +QuipuswapExchangeUserRewardsKey + + + + + +Codable + +Codable + + + +QuipuswapExchangeUserRewardsKey->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ value +

+
+
public let value: QuipuswapExchangeUserRewards
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/QuipuswapExchangeUserRewardsKeyResponse/index.html b/QuipuswapExchangeUserRewardsKeyResponse/index.html new file mode 100644 index 00000000..93d9ceb1 --- /dev/null +++ b/QuipuswapExchangeUserRewardsKeyResponse/index.html @@ -0,0 +1,55 @@ + + + + + + KukaiCoreSwift - QuipuswapExchangeUserRewardsKeyResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Typealias + Quipuswap​Exchange​User​Rewards​Key​Response +

+ +
+
public typealias QuipuswapExchangeUserRewardsKeyResponse = [QuipuswapExchangeUserRewardsKey] 
+
+
+

Wrapper object around the network response

+ +
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/RPC/index.html b/RPC/index.html index 78e46805..7e11f03e 100644 --- a/RPC/index.html +++ b/RPC/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -168,7 +168,7 @@

diff --git a/RegularWallet/index.html b/RegularWallet/index.html new file mode 100644 index 00000000..5f6562e9 --- /dev/null +++ b/RegularWallet/index.html @@ -0,0 +1,421 @@ + + + + + + KukaiCoreSwift - RegularWallet + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Regular​Wallet +

+ +
+
public class RegularWallet: Wallet  
+
+
+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+ +
+
+

This wallet is a non-HD wallet, sometimes referred to as a "legacy" wallet. It follows the Bip39 standard for generation via menmonic.

+ +
+
+ +
+ + + + + + +%553 + + + +RegularWallet + + +RegularWallet + + + + + +Hashable + +Hashable + + + +RegularWallet->Hashable + + + + + +Wallet + + +Wallet + + + + + +RegularWallet->Wallet + + + + + +Equatable + +Equatable + + + +RegularWallet->Equatable + + + + + +TorusWallet + + +TorusWallet + + + + + +TorusWallet->RegularWallet + + + + + + + + +
+

Subclasses

+
+
TorusWallet
+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+
+
+

Conforms To

+
+
Wallet
+

Wallet protocol to allow generic handling of all wallets types for signing operations and caching data locally.

+
+
Equatable
+
Hashable
+
+
+
+

Initializers

+ +
+

+ init?(with​Base58String:​elliptical​Curve:​type:​) +

+
+
public init?(withBase58String: String, ellipticalCurve: EllipticalCurve, type: WalletType)  
+
+
+

Attempt to create an instance of a RegularWallet from an encoded string containing a private key

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
with​Base58StringString

String containing the Base58 encoded private key, prefixed with the curve's secret

+
elliptical​CurveElliptical​Curve

The ellipcatical curve used to create the key

+
typeWallet​Type

WalletType indicating the top most type of wallet

+
+
+
+

+ init?(with​Mnemonic:​passphrase:​elliptical​Curve:​) +

+
+
public init?(withMnemonic mnemonic: Mnemonic, passphrase: String, ellipticalCurve: EllipticalCurve = .ed25519)  
+
+
+

Create a RegularWallet by supplying a Mnemonic and a passphrase (or "" if none).

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
with​MnemonicMnemonic

A Mnemonic representing a BIP39 menmonic

+
passphraseString

String contianing a passphrase, or empty string if none

+
elliptical​CurveElliptical​Curve

Optional: Choose the EllipticalCurve used to generate the wallet address

+
+
+
+

+ init?(with​Mnemonic​Length:​passphrase:​elliptical​Curve:​) +

+
+
public convenience init?(withMnemonicLength length: Mnemonic.NumberOfWords, passphrase: String, ellipticalCurve: EllipticalCurve = .ed25519)  
+
+
+

Create a RegularWallet by asking for a mnemonic of a given number of words and a passphrase (or "" if none).

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
with​Mnemonic​LengthMnemonic.​Number​OfWords

Mnemonic.NumberOfWords the number of words to use when creating a mnemonic

+
passphraseString

String contianing a passphrase, or empty string if none

+
elliptical​CurveElliptical​Curve

Optional: Choose the EllipticalCurve used to generate the wallet address

+
+
+
+
+

Properties

+ +
+

+ type +

+
+
public let type: WalletType
+
+
+

enum used to differientate wallet class types. Needed for applications that allow users to create many different types of wallets

+ +
+
+
+

+ address +

+
+
public let address: String
+
+
+

The TZ1 or TZ2 address of the wallet

+ +
+
+
+

+ private​Key +

+
+
public var privateKey: PrivateKey
+
+
+

An object representing the PrivateKey used to generate the wallet

+ +
+
+
+

+ public​Key +

+
+
public var publicKey: PublicKey
+
+
+

An object representing the PublicKey used to generate the wallet address

+ +
+
+
+

+ mnemonic +

+
+
public var mnemonic: Mnemonic? 
+
+
+

Optional Bip39 mnemonic used to generate the wallet

+ +
+
+
+
+

Methods

+ +
+

+ sign(_:​is​Operation:​completion:​) +

+
+
public func sign(_ hex: String, isOperation: Bool, completion: @escaping ((Result<[UInt8], KukaiError>) -> Void))  
+
+
+

Sign a hex payload with the private key

+ +
+
+
+

+ private​Key​Curve() +

+
+
public func privateKeyCurve() -> EllipticalCurve  
+
+
+

Return the curve used to create the key

+ +
+
+
+

+ public​Key​Base58encoded() +

+
+
public func publicKeyBase58encoded() -> String  
+
+
+

Get a Base58 encoded version of the public key, in order to reveal the address on the network

+ +
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: RegularWallet, rhs: RegularWallet) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/Result/index.html b/Result/index.html new file mode 100644 index 00000000..9a4f505c --- /dev/null +++ b/Result/index.html @@ -0,0 +1,75 @@ + + + + + + KukaiCoreSwift - Result + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + Result +

+
+

Methods

+ +
+

+ get​Error() +

+
+
func getError() throws -> Failure  
+
+
+

Similar to Result.get(), getError returns the failure case or throws

+ +
+
+
+

+ get​Failure() +

+
+
func getFailure() -> Failure  
+
+
+

Similar to Result.get(), getFailure returns the kukai-core-specific KukaiError case or throws

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/ResultExtensionError/index.html b/ResultExtensionError/index.html new file mode 100644 index 00000000..e33f23bf --- /dev/null +++ b/ResultExtensionError/index.html @@ -0,0 +1,112 @@ + + + + + + KukaiCoreSwift - ResultExtensionError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Result​Extension​Error +

+ +
+
public enum ResultExtensionError: Error  
+
+
+ +
+ + + + + + +%725 + + + +ResultExtensionError + + +ResultExtensionError + + + + + +Error + +Error + + + +ResultExtensionError->Error + + + + + + + + +
+

Conforms To

+
+
Error
+
+
+
+

Enumeration Cases

+ +
+

+ no​Error​Found +

+
+
case noErrorFound
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/RewardDetails/index.html b/RewardDetails/index.html new file mode 100644 index 00000000..e4a20a80 --- /dev/null +++ b/RewardDetails/index.html @@ -0,0 +1,184 @@ + + + + + + KukaiCoreSwift - RewardDetails + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Reward​Details +

+ +
+
public struct RewardDetails: Codable  
+
+
+

An individual payment record denoting some payment in the past or future

+ +
+
+ +
+ + + + + + +%621 + + + +RewardDetails + + +RewardDetails + + + + + +Codable + +Codable + + + +RewardDetails->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(baker​Alias:​baker​Logo:​payment​Address:​amount:​cycle:​fee:​date:​meets​Min​Delegation:​) +

+
+
public init(bakerAlias: String?, bakerLogo: URL?, paymentAddress: String, amount: XTZAmount, cycle: Int, fee: Double, date: Date, meetsMinDelegation: Bool)  
+
+
+
+
+

Properties

+ +
+

+ baker​Alias +

+
+
public let bakerAlias: String? 
+
+
+ +
+

+ payment​Address +

+
+
public let paymentAddress: String
+
+
+
+

+ amount +

+
+
public let amount: XTZAmount
+
+
+
+

+ cycle +

+
+
public let cycle: Int
+
+
+
+

+ fee +

+
+
public let fee: Double
+
+
+
+

+ date​OfPayment +

+
+
public let dateOfPayment: Date
+
+
+
+

+ meets​Min​Delegation +

+
+
public let meetsMinDelegation: Bool
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/RunOperationPayload/index.html b/RunOperationPayload/index.html index 40442465..fb0af50e 100644 --- a/RunOperationPayload/index.html +++ b/RunOperationPayload/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%241 +%635 @@ -98,7 +98,7 @@

Conforms To

diff --git a/SVGImgProcessor/index.html b/SVGImgProcessor/index.html new file mode 100644 index 00000000..f2abad9b --- /dev/null +++ b/SVGImgProcessor/index.html @@ -0,0 +1,128 @@ + + + + + + KukaiCoreSwift - SVGImgProcessor + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + SVGImg​Processor +

+ +
+
public struct SVGImgProcessor: ImageProcessor  
+
+
+

SVG image processor for Kingfisher library

+ +
+
+ +
+ + + + + + +%531 + + + +SVGImgProcessor + + +SVGImgProcessor + + + + + +ImageProcessor + +ImageProcessor + + + +SVGImgProcessor->ImageProcessor + + + + + + + + +
+

Conforms To

+
+
ImageProcessor
+
+
+
+

Properties

+ +
+

+ identifier +

+
+
public var identifier: String = "app.kukai.mobile.webpprocessor"
+
+
+
+
+

Methods

+ +
+

+ process(item:​options:​) +

+
+
public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage?  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/SecretKey/index.html b/SecretKey/index.html deleted file mode 100644 index 7506cbda..00000000 --- a/SecretKey/index.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - KukaiCoreSwift - SecretKey - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Secret​Key -

- -
-
public struct SecretKey  
-
-
-

A struct representing a PrivateKey for LinearWallet classes

- -
-
- -
- - - - - - -%281 - - - -SecretKey - - -SecretKey - - - - - -Equatable - -Equatable - - - -SecretKey->Equatable - - - - - -CustomStringConvertible - -CustomStringConvertible - - - -SecretKey->CustomStringConvertible - - - - - - - - -
-

Conforms To

-
-
CustomStringConvertible
-
Equatable
-
-
-
-

Initializers

- -
-

- init?(seed​String:​signing​Curve:​) -

-
-
public init?(seedString: String, signingCurve: EllipticalCurve = .ed25519)  
-
-
-

Initialize a key with the given hex seed string.

- -
-
-
    -
  • -

    seedString a hex encoded seed string.

    -
  • -
- -
-

Parameters

- - - - - - - - - - - - - - - - -
signing​CurveElliptical​Curve

The elliptical curve to use for the key. Defaults to ed25519.

-
-

Returns

-

A representative secret key, or nil if the seed string was in an unexpected format.

- -
-
-

- init?(_:​signing​Curve:​) -

-
-
public init?(_ string: String, signingCurve: EllipticalCurve = .ed25519)  
-
-
-

Initialize a secret key with the given base58check encoded string.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
stringString

A base58check encoded string.

-
signing​CurveElliptical​Curve

The elliptical curve to use for the key. Defaults to ed25519.

-
-
-
-

- init(_:​signing​Curve:​) -

-
-
public init(_ bytes: [UInt8], signingCurve: EllipticalCurve = .ed25519)  
-
-
-

Initialize a key with the given bytes.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
bytes[UInt8]

Raw bytes of the private key.

-
signing​CurveElliptical​Curve

The elliptical curve to use for the key. Defaults to ed25519.

-
-
-
-
-

Properties

- -
-

- bytes -

-
-
public var bytes: [UInt8] 
-
-
-

The raw bytes of the private key

- -
-
-
-

- signing​Curve -

-
-
public let signingCurve: EllipticalCurve
-
-
-

The signing curve used by the public key, to generate a wallet address

- -
-
-
-

- base58Check​Representation -

-
-
public var base58CheckRepresentation: String  
-
-
-

Return a Base58 encoded version of the privateKey

- -
-
-
-

- description -

-
-
public var description: String  
-
-
-
-
-

Methods

- -
-

- sign(hex:​) -

-
-
public func sign(hex: String) -> [UInt8]?  
-
-
-

Sign the given hex encoded string with the given key.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
hexString

The hex string to sign.

-
secret​Key

The secret key to sign with.

-
-

Returns

-

A signature from the input.

- -
-
-

- sign(bytes:​) -

-
-
public func sign(bytes: [UInt8]) -> [UInt8]?  
-
-
-

Sign the given bytes.

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
bytes[UInt8]

The raw bytes to sign.

-
secret​Key

The secret key to sign with.

-
-

Returns

-

A signature from the input.

- -
-
-
-

Operators

- -
-

- == -

-
-
public static func == (lhs: SecretKey, rhs: SecretKey) -> Bool  
-
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/String/index.html b/String/index.html new file mode 100644 index 00000000..95ba6d44 --- /dev/null +++ b/String/index.html @@ -0,0 +1,87 @@ + + + + + + KukaiCoreSwift - String + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Extensions on + String +

+
+

Methods

+ +
+

+ md5() +

+
+
func md5() -> String  
+
+
+

Generate an MD5 hash from the string

+ +
+
+
+

+ indexes​Of(string:​) +

+
+
func indexesOf(string: String) -> [String.Index]  
+
+
+

Return the starting indexes of each occurnace of the supplied string

+ +
+
+
+

+ remove​Leading​Protocol​From​RPCError() +

+
+
func removeLeadingProtocolFromRPCError() -> String?  
+
+
+

When an error is returned in the format proto.012-Psithaca.gas_exhausted.operation, in many cases we only care about the bit after the protocol. This function returns only that piece

+ +
+
+
+
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/SubverifierWrapper/index.html b/SubverifierWrapper/index.html new file mode 100644 index 00000000..fea49cd2 --- /dev/null +++ b/SubverifierWrapper/index.html @@ -0,0 +1,115 @@ + + + + + + KukaiCoreSwift - SubverifierWrapper + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Subverifier​Wrapper +

+ +
+
public struct SubverifierWrapper  
+
+
+

SDK requires information about the verifer that can't be stored inside the verifier, add a wrapper object to allow passing of all the data

+ +
+ +
+

Initializers

+ +
+

+ init(aggregate​Verifier​Name:​network​Type:​subverifier:​) +

+
+
public init(aggregateVerifierName: String?, networkType: TezosNodeClientConfig.NetworkType, subverifier: SubVerifierDetails)  
+
+
+

Create an instance of the object with an option string for the aggregate verifier name, and a SubVerifierDetails object

+ +
+
+
+
+

Properties

+ +
+

+ aggregate​Verifier​Name +

+
+
public let aggregateVerifierName: String? 
+
+
+

The name of the aggregated verifier

+ +
+
+
+

+ network​Type +

+
+
public let networkType: TezosNodeClientConfig.NetworkType
+
+
+

Unlike seed based wallets, Torus verifiers are bound to a network and generate different addresses. In order to give the same experience on Tezos, we need to supply the network for each verifier

+ +
+
+
+

+ subverifier +

+
+
public let subverifier: SubVerifierDetails
+
+
+

The matching SubVerifierDetails object

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TaquitoService/index.html b/TaquitoService/index.html index cdb0c330..e9dff82c 100644 --- a/TaquitoService/index.html +++ b/TaquitoService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -42,7 +42,8 @@

Taquito (https://github.com/ecadlabs/taquito) is a popular open source Tezos library written in Typescript and Javascript. Taquito is made up of many separate packages that deal with various aspects of Tezos RPC and Michelson. -This serivce class is a wrapper around a small piece of the Taquito library to expose funtionality that would otherwise be time consuming/risky/dangerous to re-implement natively.

+This serivce class is a wrapper around a small piece of the Taquito library to expose funtionality that would otherwise be time consuming/risky/dangerous to re-implement natively. +The JS can now be found on each github release here: https://github.com/ecadlabs/taquito/releases/, by extracting the zip named "taquito-local-forging-vanilla.zip"

@@ -79,7 +80,7 @@

forge(operation​Payload:​completion:​)

-
public func forge(operationPayload: OperationPayload, completion: @escaping((Result<String, ErrorResponse>) -> Void))  
+
public func forge(operationPayload: OperationPayload, completion: @escaping((Result<String, KukaiError>) -> Void))  

Wrapper around the node package @taquito/local-forging's forge method. Giving the ability to locally forge an OperationPayload without using an RPC, and avoiding the need to do an RPC parse against a second server. @@ -106,7 +107,7 @@

Parameters

completion - @escaping((Result<String, Error​Response>) -> Void) + @escaping((Result<String, Kukai​Error>) -> Void)

The underlying javascript code uses a Promise. In order to wrap this up into native Swift, we need to provide a completion callback to return the resulting hex string.

@@ -118,7 +119,7 @@

parse(hex:​completion:​)

-
public func parse(hex: String, completion: @escaping((Result<OperationPayload, ErrorResponse>) -> Void))  
+
public func parse(hex: String, completion: @escaping((Result<OperationPayload, KukaiError>) -> Void))  

Wrapper around the node package @taquito/local-forging's prase method. Giving the ability to locally parse a hex string back into an OperationPayload, without the need to use an RPC on a tezos node. @@ -145,7 +146,7 @@

Parameters

completion - @escaping((Result<Operation​Payload, Error​Response>) -> Void) + @escaping((Result<Operation​Payload, Kukai​Error>) -> Void)

The underlying javascript code uses a Promise. In order to wrap this up into native Swift, we need to provide a completion callback to return the resulting object

@@ -161,7 +162,7 @@

Parameters

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TaquitoService_TaquitoServiceError/index.html b/TaquitoService_TaquitoServiceError/index.html index ecef80de..7dc4d06d 100644 --- a/TaquitoService_TaquitoServiceError/index.html +++ b/TaquitoService_TaquitoServiceError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%131 +%781 @@ -89,7 +89,8 @@

Member Of

TaquitoService

Taquito (https://github.com/ecadlabs/taquito) is a popular open source Tezos library written in Typescript and Javascript. Taquito is made up of many separate packages that deal with various aspects of Tezos RPC and Michelson. -This serivce class is a wrapper around a small piece of the Taquito library to expose funtionality that would otherwise be time consuming/risky/dangerous to re-implement natively.

+This serivce class is a wrapper around a small piece of the Taquito library to expose funtionality that would otherwise be time consuming/risky/dangerous to re-implement natively. +The JS can now be found on each github release here: https://github.com/ecadlabs/taquito/releases/, by extracting the zip named "taquito-local-forging-vanilla.zip"

Conforms To

@@ -125,7 +126,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosDomainsAddressBulkResponse/index.html b/TezosDomainsAddressBulkResponse/index.html new file mode 100644 index 00000000..97fac77d --- /dev/null +++ b/TezosDomainsAddressBulkResponse/index.html @@ -0,0 +1,136 @@ + + + + + + KukaiCoreSwift - TezosDomainsAddressBulkResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Address​Bulk​Response +

+ +
+
public struct TezosDomainsAddressBulkResponse: Codable  
+
+
+

Response object wrapper for querying an address in bulk

+ +
+
+ +
+ + + + + + +%53 + + + +TezosDomainsAddressBulkResponse + + +TezosDomainsAddressBulkResponse + + + + + +Codable + +Codable + + + +TezosDomainsAddressBulkResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(domains:​) +

+
+
public init(domains: TezosDomainsDomains?)  
+
+
+

Default init

+ +
+
+
+
+

Properties

+ +
+

+ domains +

+
+
public let domains: TezosDomainsDomains? 
+
+
+

Object containing all the info of the record

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsAddressResponse/index.html b/TezosDomainsAddressResponse/index.html new file mode 100644 index 00000000..3d0739a6 --- /dev/null +++ b/TezosDomainsAddressResponse/index.html @@ -0,0 +1,136 @@ + + + + + + KukaiCoreSwift - TezosDomainsAddressResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Address​Response +

+ +
+
public struct TezosDomainsAddressResponse: Codable  
+
+
+

Response object wrapper for querying an address

+ +
+
+ +
+ + + + + + +%639 + + + +TezosDomainsAddressResponse + + +TezosDomainsAddressResponse + + + + + +Codable + +Codable + + + +TezosDomainsAddressResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(domain:​) +

+
+
public init(domain: TezosDomainsDomain)  
+
+
+

Default init

+ +
+
+
+
+

Properties

+ +
+

+ domain +

+
+
public let domain: TezosDomainsDomain
+
+
+

Domain object containing details about the domain

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsClient/index.html b/TezosDomainsClient/index.html new file mode 100644 index 00000000..f2d18bed --- /dev/null +++ b/TezosDomainsClient/index.html @@ -0,0 +1,185 @@ + + + + + + KukaiCoreSwift - TezosDomainsClient + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Tezos​Domains​Client +

+ +
+
public class TezosDomainsClient  
+
+
+

A client class allowing integration with the tezos domains GraphQL API. See more here: https://tezos.domains/

+ +
+
+ + +

Nested Types

+
+
TezosDomainsClient.BothNetworkReverseRecord
+

Object to wrap up a response fomr both networks

+
+
+
+
+

Initializers

+ +
+

+ init(network​Service:​config:​) +

+
+
public init(networkService: NetworkService, config: TezosNodeClientConfig)  
+
+
+

Init a TezosDomainsClient with a NetworkService and a TezosNodeClientConfig.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
network​ServiceNetwork​Service

NetworkService used to manage network communication.

+
configTezos​Node​Client​Config

TezosNodeClientConfig used to apss in settings.

+
+
+
+
+

Methods

+ +
+

+ get​Domain​For(address:​url:​completion:​) +

+
+
public func getDomainFor(address: String, url: URL? = nil, completion: @escaping ((Result<GraphQLResponse<TezosDomainsDomainResponse>, KukaiError>) -> Void))  
+
+
+

Get Tezos domain response for a given address

+ +
+
+
+

+ get​Main​And​Ghost​Domain​For(address:​completion:​) +

+
+
public func getMainAndGhostDomainFor(address: String, completion: @escaping (( Result<BothNetworkReverseRecord, KukaiError> ) -> Void))  
+
+
+

Query both mainnet and ghostnet versions of Tezos domains to find all records for the given address

+ +
+
+
+

+ get​Address​For(domain:​completion:​) +

+
+
public func getAddressFor(domain: String, completion: @escaping ((Result<GraphQLResponse<TezosDomainsAddressResponse>, KukaiError>) -> Void))  
+
+
+

Find the tz address of a given domain

+ +
+
+
+

+ get​Domains​For(addresses:​url:​completion:​) +

+
+
public func getDomainsFor(addresses: [String], url: URL? = nil, completion: @escaping ((Result<GraphQLResponse<TezosDomainsDomainBulkResponse>, KukaiError>) -> Void))  
+
+
+

Bulk function for fetching domains for an array of addresses

+ +
+
+
+

+ get​Main​And​Ghost​Domains​For(addresses:​completion:​) +

+
+
public func getMainAndGhostDomainsFor(addresses: [String], completion: @escaping (( Result<[String: BothNetworkReverseRecord], KukaiError> ) -> Void))  
+
+
+

Bulk function for fetching domains for an array of addresses, check ghostnet and mainnet for each

+ +
+
+
+

+ get​Addresses​For(domains:​completion:​) +

+
+
public func getAddressesFor(domains: [String], completion: @escaping ((Result<GraphQLResponse<TezosDomainsAddressBulkResponse>, KukaiError>) -> Void))  
+
+
+

Bulk function to find all domains for a list of addresses

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsClient_BothNetworkReverseRecord/index.html b/TezosDomainsClient_BothNetworkReverseRecord/index.html new file mode 100644 index 00000000..36243af7 --- /dev/null +++ b/TezosDomainsClient_BothNetworkReverseRecord/index.html @@ -0,0 +1,100 @@ + + + + + + KukaiCoreSwift - TezosDomainsClient.BothNetworkReverseRecord + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Client.​Both​Network​Reverse​Record +

+ +
+
public struct BothNetworkReverseRecord  
+
+
+

Object to wrap up a response fomr both networks

+ +
+
+ + +

Member Of

+
+
TezosDomainsClient
+

A client class allowing integration with the tezos domains GraphQL API. See more here: https://tezos.domains/

+
+
+
+
+

Initializers

+ + +
+
+

Properties

+ +
+

+ mainnet +

+
+
public var mainnet: TezosDomainsReverseRecord? 
+
+
+
+

+ ghostnet +

+
+
public var ghostnet: TezosDomainsReverseRecord? 
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTTransaction_TransactionParameter/index.html b/TezosDomainsDomain/index.html similarity index 50% rename from TzKTTransaction_TransactionParameter/index.html rename to TezosDomainsDomain/index.html index b11066ca..5e1ffed2 100644 --- a/TzKTTransaction_TransactionParameter/index.html +++ b/TezosDomainsDomain/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - TzKTTransaction.TransactionParameter + KukaiCoreSwift - TezosDomainsDomain
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,11 +33,15 @@

On This Page

Structure - TzKTTransaction.​Transaction​Parameter + Tezos​Domains​Domain

-
public struct TransactionParameter: Codable  
+
public struct TezosDomainsDomain: Codable  
+
+
+

Domain object containing details about the domain

+
@@ -47,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%11 +%219 - + -TzKTTransaction.TransactionParameter - - -TzKTTransaction.TransactionParameter +TezosDomainsDomain + + +TezosDomainsDomain @@ -68,9 +72,9 @@ Codable - + -TzKTTransaction.TransactionParameter->Codable +TezosDomainsDomain->Codable @@ -78,15 +82,9 @@ - + -

Member Of

-
-
TzKTTransaction
-

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

-
-
-

Conforms To

+

Conforms To

Codable
@@ -94,32 +92,44 @@

Conforms To

Initializers

-
+

- init(entrypoint:​value:​) + init(name:​address:​)

-
public init(entrypoint: String, value: [String: String])  
+
public init(name: String, address: String)  
+
+
+

Default init

+

Properties

-
+

- entrypoint + name

-
public let entrypoint: String
+
public let name: String
+
+
+

The domain name e.g. example.tez

+
-
+

- value + address

-
public let value: [String: String] 
+
public let address: String
+
+
+

The Tezos address that the domain points too

+
@@ -131,7 +141,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosDomainsDomainBulkResponse/index.html b/TezosDomainsDomainBulkResponse/index.html new file mode 100644 index 00000000..d4557427 --- /dev/null +++ b/TezosDomainsDomainBulkResponse/index.html @@ -0,0 +1,136 @@ + + + + + + KukaiCoreSwift - TezosDomainsDomainBulkResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Domain​Bulk​Response +

+ +
+
public struct TezosDomainsDomainBulkResponse: Codable  
+
+
+

Response object wrapper for querying a reverse record in bulk

+ +
+
+ +
+ + + + + + +%195 + + + +TezosDomainsDomainBulkResponse + + +TezosDomainsDomainBulkResponse + + + + + +Codable + +Codable + + + +TezosDomainsDomainBulkResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(reverse​Records:​) +

+
+
public init(reverseRecords: TezosDomainsReverseRecords?)  
+
+
+

Default init

+ +
+
+
+
+

Properties

+ +
+

+ reverse​Records +

+
+
public let reverseRecords: TezosDomainsReverseRecords? 
+
+
+

Object containing all the info of the record

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsDomainResponse/index.html b/TezosDomainsDomainResponse/index.html new file mode 100644 index 00000000..d51d96e5 --- /dev/null +++ b/TezosDomainsDomainResponse/index.html @@ -0,0 +1,152 @@ + + + + + + KukaiCoreSwift - TezosDomainsDomainResponse + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Domain​Response +

+ +
+
public struct TezosDomainsDomainResponse: Codable  
+
+
+

Response object wrapper for querying a reverse record

+ +
+
+ +
+ + + + + + +%365 + + + +TezosDomainsDomainResponse + + +TezosDomainsDomainResponse + + + + + +Codable + +Codable + + + +TezosDomainsDomainResponse->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(reverse​Record:​) +

+
+
public init(reverseRecord: TezosDomainsReverseRecord?)  
+
+
+

Default init

+ +
+
+
+
+

Properties

+ +
+

+ reverse​Record +

+
+
public let reverseRecord: TezosDomainsReverseRecord? 
+
+
+

Object containing all the info of the record

+ +
+
+
+
+

Methods

+ +
+

+ domain() +

+
+
public func domain() -> String?  
+
+
+

Helper to extract the domain name more easily

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsDomains/index.html b/TezosDomainsDomains/index.html new file mode 100644 index 00000000..c7d48692 --- /dev/null +++ b/TezosDomainsDomains/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - TezosDomainsDomains + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Domains +

+ +
+
public struct TezosDomainsDomains: Codable  
+
+
+

Object containing an array of domains

+ +
+
+ +
+ + + + + + +%287 + + + +TezosDomainsDomains + + +TezosDomainsDomains + + + + + +Codable + +Codable + + + +TezosDomainsDomains->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(items:​) +

+
+
public init(items: [TezosDomainsDomain])  
+
+
+

Default init

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsReverseRecord/index.html b/TezosDomainsReverseRecord/index.html new file mode 100644 index 00000000..c2022522 --- /dev/null +++ b/TezosDomainsReverseRecord/index.html @@ -0,0 +1,184 @@ + + + + + + KukaiCoreSwift - TezosDomainsReverseRecord + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Reverse​Record +

+ +
+
public struct TezosDomainsReverseRecord: Codable  
+
+
+

Object containing all the info of the tezos domains record

+ +
+
+ +
+ + + + + + +%369 + + + +TezosDomainsReverseRecord + + +TezosDomainsReverseRecord + + + + + +Codable + +Codable + + + +TezosDomainsReverseRecord->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(id:​address:​owner:​expires​AtUtc:​domain:​) +

+
+
public init(id: String, address: String, owner: String, expiresAtUtc: String?, domain: TezosDomainsDomain)  
+
+
+

Default init

+ +
+
+
+
+

Properties

+ +
+

+ id +

+
+
public let id: String
+
+
+

Uniquie id of the domain

+ +
+
+
+

+ address +

+
+
public let address: String
+
+
+

The address that the domain points too

+ +
+
+
+

+ owner +

+
+
public let owner: String
+
+
+

The address that owns the domain

+ +
+
+
+

+ expires​AtUtc +

+
+
public let expiresAtUtc: String? 
+
+
+

Expiration date

+ +
+
+
+

+ domain +

+
+
public let domain: TezosDomainsDomain
+
+
+

The domain object continaing the name and address

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosDomainsReverseRecords/index.html b/TezosDomainsReverseRecords/index.html new file mode 100644 index 00000000..a9957299 --- /dev/null +++ b/TezosDomainsReverseRecords/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - TezosDomainsReverseRecords + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Tezos​Domains​Reverse​Records +

+ +
+
public struct TezosDomainsReverseRecords: Codable  
+
+
+

Object containing an array of reverse records

+ +
+
+ +
+ + + + + + +%145 + + + +TezosDomainsReverseRecords + + +TezosDomainsReverseRecords + + + + + +Codable + +Codable + + + +TezosDomainsReverseRecords->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(items:​) +

+
+
public init(items: [TezosDomainsReverseRecord])  
+
+
+

Default init

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TezosNodeClient/index.html b/TezosNodeClient/index.html index fd3f2789..e4cca65a 100644 --- a/TezosNodeClient/index.html +++ b/TezosNodeClient/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -174,7 +174,7 @@

get​Balance(for​Address:​completion:​)

-
public func getBalance(forAddress address: String, completion: @escaping ((Result<XTZAmount, ErrorResponse>) -> Void))  
+
public func getBalance(forAddress address: String, completion: @escaping ((Result<XTZAmount, KukaiError>) -> Void))  

Gets the xtz balance for a given Address.

@@ -199,7 +199,7 @@

Parameters

completion - @escaping ((Result<XTZAmount, Error​Response>) -> Void) + @escaping ((Result<XTZAmount, Kukai​Error>) -> Void)

A callback containing a new Token object matching the xtz standard, or an error.

@@ -211,7 +211,7 @@

get​Delegate(for​Address:​completion:​)

-
public func getDelegate(forAddress address: String, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func getDelegate(forAddress address: String, completion: @escaping ((Result<String, KukaiError>) -> Void))  

Gets the delegate for the given address.

@@ -236,22 +236,23 @@

Parameters

completion - @escaping ((Result<String, Error​Response>) -> Void) + @escaping ((Result<String, Kukai​Error>) -> Void)

A callback containing a String with the delegate/baker's address, or an error.

-
+

- estimate(operations:​with​Wallet:​completion:​) + estimate(operations:​wallet​Address:​base58Encoded​Public​Key:​completion:​)

-
public func estimate(operations: [Operation], withWallet wallet: Wallet, completion: @escaping ((Result<[Operation], ErrorResponse>) -> Void))  
+
public func estimate(operations: [Operation], walletAddress: String, base58EncodedPublicKey: String, completion: @escaping ((Result<FeeEstimatorService.EstimationResult, KukaiError>) -> Void))  
-

Take an array of operations and estimate the gas, storage, baker fee and burn fees required to inject it onto the network

+

Take an array of operations and estimate the gas, storage, baker fee and burn fees required to inject it onto the network +If the supplied operations contain suggested fees (e.g. from a dApp) this function will estimate the fee and pick which ever is higher

Parameters

@@ -273,13 +274,13 @@

Parameters

wallet - Wallet +

The Wallet that will sign the operation

completion - @escaping ((Result<[Operation], Error​Response>) -> Void) + @escaping ((Result<Fee​Estimator​Service.​Estimation​Result, Kukai​Error>) -> Void)

A callback containing an updated array of Operation's with fees set correctly, or an error.

@@ -291,7 +292,7 @@

send(operations:​with​Wallet:​completion:​)

-
public func send(operations: [Operation], withWallet wallet: Wallet, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func send(operations: [Operation], withWallet wallet: Wallet, completion: @escaping ((Result<String, KukaiError>) -> Void))  

Send an array of Operation's to the blockchain. Use OperationFactory to help create this array for common use cases.

@@ -322,7 +323,7 @@

Parameters

completion - @escaping ((Result<String, Error​Response>) -> Void) + @escaping ((Result<String, Kukai​Error>) -> Void)

A completion closure that will either return the opertionID of an injected operation, or an error.

@@ -334,7 +335,7 @@

send(operation​Payload:​operation​Metadata:​with​Wallet:​completion:​)

-
public func send(operationPayload: OperationPayload, operationMetadata: OperationMetadata, withWallet wallet: Wallet, completion: @escaping ((Result<String, ErrorResponse>) -> Void))  
+
public func send(operationPayload: OperationPayload, operationMetadata: OperationMetadata, withWallet wallet: Wallet, completion: @escaping ((Result<String, KukaiError>) -> Void))  

Send an already contrsutructed OperationPayload with the necessary OperationMetadata without having to fetch metadata again.

@@ -371,19 +372,19 @@

Parameters

completion - @escaping ((Result<String, Error​Response>) -> Void) + @escaping ((Result<String, Kukai​Error>) -> Void)

A completion closure that will either return the opertionID of an injected operation, or an error.

-
+

- get​Operation​Metadata(for​Wallet:​completion:​) + get​Operation​Metadata(for​Wallet​Address:​completion:​)

-
public func getOperationMetadata(forWallet wallet: Wallet, completion: @escaping ((Result<OperationMetadata, ErrorResponse>) -> Void))  
+
public func getOperationMetadata(forWalletAddress: String, completion: @escaping ((Result<OperationMetadata, KukaiError>) -> Void))  

Get all the metadata necessary from the network to perform operations.

@@ -402,13 +403,13 @@

Parameters

for​Wallet - Wallet +

The Wallet object that will be sending the operations.

completion - @escaping ((Result<Operation​Metadata, Error​Response>) -> Void) + @escaping ((Result<Operation​Metadata, Kukai​Error>) -> Void)

A callback that will be executed when the network requests finish.

@@ -420,7 +421,7 @@

get​Contract​Storage(contract​Address:​completion:​)

-
public func getContractStorage(contractAddress: String, completion: @escaping ((Result<MichelsonPair, ErrorResponse>) -> Void))  
+
public func getContractStorage(contractAddress: String, completion: @escaping ((Result<[String: Any], KukaiError>) -> Void))  

Get the Michelson storage of a given contract from the blockchain.

@@ -445,8 +446,45 @@

Parameters

completion - @escaping ((Result<Michelson​Pair, Error​Response>) -> Void) -

A callback with a Result object, with either a MichelsonPair or an Error

+ @escaping ((Result<[String:​ Any], Kukai​Error>) -> Void) +

A callback with a Result object, with either a [String: Any] or an Error

+ + + + +
+
+

+ get​Big​Map(id:​completion:​) +

+
+
public func getBigMap(id: String, completion: @escaping ((Result<[String: Any], KukaiError>) -> Void))  
+
+
+

Get the Michelson big map contents, from a given id

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + @@ -457,7 +495,7 @@

get​Network​Information(completion:​)

-
public func getNetworkInformation(completion: @escaping ((Bool, ErrorResponse?) -> Void))  
+
public func getNetworkInformation(completion: @escaping ((Bool, KukaiError?) -> Void))  

Query the server for the NetworkVersion and NetworkConstants, and store the responses in the tezosNodeClient properties networkVersion and networkConstants, @@ -477,7 +515,7 @@

Parameters

- + @@ -493,7 +531,7 @@

Parameters

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosNodeClientConfig/index.html b/TezosNodeClientConfig/index.html index 7020e5b3..fff41979 100644 --- a/TezosNodeClientConfig/index.html +++ b/TezosNodeClientConfig/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -134,18 +134,6 @@

Controls whether to use local forging or remote forging+parsing

-
- -
-

- tezos​Chain​Name -

-
-
public let tezosChainName: TezosChainName
-
-
-

Which chain to use for inDEXter queries

-
@@ -170,6 +158,30 @@

The URL to use for BetterCallDevClient

+
+

+
+

+ tezos​Domains​URL +

+
+
public let tezosDomainsURL: URL
+
+
+

The URL to use for TezosDomainsClient

+ +
+
+
+

+ objkt​Api​URL +

+
+
public let objktApiURL: URL
+
+
+

The URL to use for TezosDomainsClient

+
@@ -212,12 +224,12 @@

Methods

-
+

- config​With​Local​Forge(primary​Node​URL:​tezos​Chain​Name:​tzkt​URL:​better​Call​Dev​URL:​url​Session:​network​Type:​) + config​With​Local​Forge(primary​Node​URL:​tzkt​URL:​better​Call​Dev​URL:​tezos​Domains​URL:​objkt​Api​URL:​url​Session:​network​Type:​)

-
public static func configWithLocalForge(primaryNodeURL: URL, tezosChainName: TezosChainName, tzktURL: URL, betterCallDevURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig  
+
public static func configWithLocalForge(primaryNodeURL: URL, tzktURL: URL, betterCallDevURL: URL, tezosDomainsURL: URL, objktApiURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig  

Creates an instance of TezosNodeClientConfig with only the required properties needed when using local forge.

@@ -248,12 +260,6 @@

Parameters

- - - - - @@ -281,12 +287,12 @@

Parameters

idString

The big map id.

+
completion@escaping ((Result<[String:​ Any], Kukai​Error>) -> Void)

A callback with a Result object, with either a [String: Any] or an Error

completion@escaping ((Bool, Error​Response?) -> Void)@escaping ((Bool, Kukai​Error?) -> Void)

A callback with a Bool indicating success and an optional Error

The URL of the primary node that will perform the majority of the network operations.

tezos​Chain​NameTezos​Chain​Name

The chain name used by services such Better call dev, when deciding which network to use

-
tzkt​URL URL
-
+

- config​With​Remote​Forge(primary​Node​URL:​parse​Node​URL:​tezos​Chain​Name:​tzkt​URL:​better​Call​Dev​URL:​url​Session:​network​Type:​) + config​With​Remote​Forge(primary​Node​URL:​parse​Node​URL:​tzkt​URL:​better​Call​Dev​URL:​tezos​Domains​URL:​objkt​Api​URL:​url​Session:​network​Type:​)

-
public static func configWithRemoteForge(primaryNodeURL: URL, parseNodeURL: URL, tezosChainName: TezosChainName, tzktURL: URL, betterCallDevURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig  
+
public static func configWithRemoteForge(primaryNodeURL: URL, parseNodeURL: URL, tzktURL: URL, betterCallDevURL: URL, tezosDomainsURL: URL, objktApiURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig  

Creates an instance of TezosNodeClientConfig with the required properties for remote forging. Note: function will casue a fatalError is users attempt to set primaryNodeURL and parseNodeURL to the same destination

@@ -323,12 +329,6 @@

Parameters

The URL to use to parse and verify a remote forge. Must be a different server to primary node.

- - tezos​Chain​Name - Tezos​Chain​Name -

The chain name used by services such Better call dev, when deciding which network to use

- - tzkt​URL URL @@ -365,7 +365,7 @@

Parameters

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosNodeClientConfig_ForgingType/index.html b/TezosNodeClientConfig_ForgingType/index.html index 9eb7c11e..0d3b31ef 100644 --- a/TezosNodeClientConfig_ForgingType/index.html +++ b/TezosNodeClientConfig_ForgingType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -37,7 +37,7 @@

-
public enum ForgingType  
+
public enum ForgingType: String  

Allow switching between local forging or remote forging+parsing

@@ -45,13 +45,55 @@

- +
+ + + + + + +%477 + + + +TezosNodeClientConfig.ForgingType + + +TezosNodeClientConfig.ForgingType + + + + + +String + +String + + + +TezosNodeClientConfig.ForgingType->String + + + + + + + + +

Member Of

TezosNodeClientConfig

A configuration object used to provide settings to the TezosNodeClient

+

Conforms To

+
+
String
+

Enumeration Cases

@@ -81,7 +123,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosNodeClientConfig_NetworkType/index.html b/TezosNodeClientConfig_NetworkType/index.html index ee9e81e2..31d3a353 100644 --- a/TezosNodeClientConfig_NetworkType/index.html +++ b/TezosNodeClientConfig_NetworkType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -37,7 +37,7 @@

-
public enum NetworkType  
+
public enum NetworkType: String  

An enum indicating whether the network is mainnet or testnet

@@ -45,13 +45,55 @@

- +
+ + + + + + +%3 + + + +TezosNodeClientConfig.NetworkType + + +TezosNodeClientConfig.NetworkType + + + + + +String + +String + + + +TezosNodeClientConfig.NetworkType->String + + + + + + + + +

Member Of

TezosNodeClientConfig

A configuration object used to provide settings to the TezosNodeClient

+

Conforms To

+
+
String
+

Enumeration Cases

@@ -81,7 +123,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosNodeClientConfig_defaultMainnetURLs/index.html b/TezosNodeClientConfig_defaultMainnetURLs/index.html index 889ecb19..768c9869 100644 --- a/TezosNodeClientConfig_defaultMainnetURLs/index.html +++ b/TezosNodeClientConfig_defaultMainnetURLs/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -102,6 +102,30 @@

The default mainnet URL to use for betterCallDevURL, For more information on this service, see: https://api.better-call.dev/v1/docs/index.html

+
+

+
+

+ tezos​Domains​URL +

+
+
public static let tezosDomainsURL = URL(string: "https://api.tezos.domains/graphql")! 
+
+
+

The default mainnet URL to use for tezosDomainsURL, For more information on this service, see: https://tezos.domains/

+ +
+
+
+

+ objkt​Api​URL +

+
+
public static let objktApiURL = URL(string: "https://data.objkt.com/v3/graphql")! 
+
+
+

The default mainnet URL to use for objktApiURL, For more information on this service, see: https://public-api-v3-20221206.objkt.com/docs/

+

@@ -113,7 +137,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosNodeClientConfig_defaultTestnetURLs/index.html b/TezosNodeClientConfig_defaultTestnetURLs/index.html index c8982d20..d6182709 100644 --- a/TezosNodeClientConfig_defaultTestnetURLs/index.html +++ b/TezosNodeClientConfig_defaultTestnetURLs/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -61,10 +61,10 @@

primary​Node​URL

-
public static let primaryNodeURL = URL(string: "https://florence-tezos.giganode.io/")! 
+
public static let primaryNodeURL = URL(string: "https://rpc.ghostnet.teztnets.xyz")! 
-

The default testnet URL to use for primaryNodeURL, For more information on this service, see: https://tezos.giganode.io/

+

The default mainnet URL to use for primaryNodeURL, For more information on Ghostnet, see: https://teztnets.xyz/ghostnet-about

@@ -73,10 +73,11 @@

parse​Node​URL

-
public static let parseNodeURL = URL(string: "https://api.tez.ie/rpc/florencenet")! 
+
public static let parseNodeURL = URL(string: "https://rpc.ghostnet.teztnets.xyz")! 
-

The default testnet URL to use for parseNodeURL

+

The default testnet URL to use for parseNodeURL, For more information on Ghostnet, see: https://teztnets.xyz/ghostnet-about +When using remote forging on mainnet, you should use two seperate servers on seperate networks for security reasons

@@ -85,7 +86,7 @@

tzkt​URL

-
public static let tzktURL = URL(string: "https://api.florencenet.tzkt.io/")! 
+
public static let tzktURL = URL(string: "https://api.ghostnet.tzkt.io/")! 

The default testnet URL to use for tzktURL, For more information on this service, see: https://api.tzkt.io/

@@ -102,6 +103,30 @@

The default testnet URL to use for betterCallDevURL, For more information on this service, see: https://api.better-call.dev/v1/docs/index.html

+
+

+
+

+ tezos​Domains​URL +

+
+
public static let tezosDomainsURL = URL(string: "https://ghostnet-api.tezos.domains/graphql")! 
+
+
+

The default testnet URL to use for tezosDomainsURL, For more information on this service, see: https://tezos.domains/

+ +
+
+
+

+ objkt​Api​URL +

+
+
public static let objktApiURL = URL(string: "https://data.objkt.com/v3/graphql")! 
+
+
+

The default testnet URL to use for objktApiURL, For more information on this service, see: https://public-api-v3-20221206.objkt.com/docs/

+
@@ -113,7 +138,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosNodeClient_TezosNodeClientError/index.html b/TezosNodeClient_TezosNodeClientError/index.html index 2f8f889d..59cd7144 100644 --- a/TezosNodeClient_TezosNodeClientError/index.html +++ b/TezosNodeClient_TezosNodeClientError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%153 +%101 @@ -125,7 +125,7 @@

diff --git a/Sodium/index.html b/Thread/index.html similarity index 53% rename from Sodium/index.html rename to Thread/index.html index 77f1dc1a..a4fab859 100644 --- a/Sodium/index.html +++ b/Thread/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - Sodium + KukaiCoreSwift - Thread
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,17 +33,21 @@

On This Page

Extensions on - Sodium + Thread

Properties

-
+

- shared + is​Running​XCTest

-
public static let shared  
+
var isRunningXCTest: Bool  
+
+
+

Check if the given thread is being run from inside an XCTest bundle

+
@@ -52,7 +56,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/Token/index.html b/Token/index.html index 6722d12f..fea4fd7f 100644 --- a/Token/index.html +++ b/Token/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -52,44 +52,80 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%21 - + + + +%241 + Token - -Token + +Token - + -CustomStringConvertible - -CustomStringConvertible +Identifiable + +Identifiable - - -Token->CustomStringConvertible - - + + +Token->Identifiable + + Codable - -Codable + +Codable Token->Codable - - + + + + + +CustomStringConvertible + +CustomStringConvertible + + + +Token->CustomStringConvertible + + + + + +Equatable + +Equatable + + + +Token->Equatable + + + + + +Hashable + +Hashable + + + +Token->Hashable + + @@ -108,17 +144,20 @@

Conforms To

Codable
CustomStringConvertible
+
Equatable
+
Hashable
+
Identifiable

Initializers

-
+

- init(icon:​name:​symbol:​token​Type:​fa​Version:​balance:​token​Contract​Address:​nfts:​) + init(name:​symbol:​token​Type:​fa​Version:​balance:​thumbnail​URL:​token​Contract​Address:​token​Id:​nfts:​minting​Tool:​)

-
public init(icon: URL?, name: String?, symbol: String?, tokenType: TokenType, faVersion: FaVersion?, balance: TokenAmount, tokenContractAddress: String?, nfts: [NFT]?)  
+
public init(name: String?, symbol: String, tokenType: TokenType, faVersion: FaVersion?, balance: TokenAmount, thumbnailURL: URL?, tokenContractAddress: String?, tokenId: Decimal?, nfts: [NFT]?, mintingTool: String?)  

Init a Token object that will hold all the necessary data to interact with the Tezos network, and the Dexter exchange

@@ -136,12 +175,6 @@

Parameters

- icon - URL? -

An image used to denote the token.

- - - name String?

The long name of the token. e.g. "Tezos"

@@ -149,7 +182,7 @@

Parameters

symbol - String? + String

The short name of the token, or the symbol. e.g. "XTZ"

@@ -171,12 +204,24 @@

Parameters

The number of decimal places this token contains.

+ + thumbnail​URI + +

URI to network asset to use to display an icon for the token

+ + token​Contract​Address String?

The KT1 address of the contract (nil if xtz).

+ + token​Id + Decimal? +

The token id if the token is an FA2 token, nil otherwise.

+ + nfts [NFT]? @@ -186,23 +231,35 @@

Parameters

-
-
-

Properties

+
+

+ init(from:​and​Token​Amount:​) +

+
+
public init(from: TzKTBalanceToken, andTokenAmount: TokenAmount)  
+
+
+

Init a Token from an object returned by the TzKT API

-
+
+
+

- icon + init(from:​)

-
public var icon: URL? 
+
public init(from: TzKTTokenTransfer)  
-

The icon used to display next to a given token.

+

Init a Token from an object returned by the TzKT API

-
+
+
+

Properties

+ +

name

@@ -219,7 +276,7 @@

symbol

-
public let symbol: String? 
+
public let symbol: String

The short name or the symbol of a token. e.g. "XTZ".

@@ -272,6 +329,18 @@

Get the underlying number of decimal places that this token represents

+
+

+
+

+ thumbnail​URL +

+
+
public var thumbnailURL: URL? = nil
+
+
+

The URL to a cached version of the asset (data that we add later on through other service calls)

+
@@ -296,6 +365,42 @@

In the case of FA1.2 or higher, we need to know the KT1 address for the token so we can fetch balances and make trades. (should be empty for xtz).

+
+

+
+

+ token​Id +

+
+
public var tokenId: Decimal? 
+
+
+

Each token type on a contract will have a unique token_id

+ +
+
+
+

+ is​Hidden +

+
+
public var isHidden: Bool = false
+
+
+

Recording if the user has marked the token as hidden

+ +
+
+
+

+ favourite​Sort​Index +

+
+
public var favouriteSortIndex: Int? = nil
+
+
+

Recording if the position the index the user chose for the favourite token to appear

+
@@ -303,11 +408,31 @@

nfts

-
public let nfts: [NFT]? 
+
public var nfts: [NFT]? 

The individual NFT's owned of this token type

+
+
+
+

+ minting​Tool +

+
+
public var mintingTool: String? 
+
+
+

The URL of the tool used to mint the item

+ +
+
+
+

+ is​Favourite +

+
+
public var isFavourite: Bool  
@@ -320,6 +445,19 @@

Conforming to CustomStringConvertible to print a number, giving the appearence of a numeric type

+
+

+
+

+ id +

+
+
public var id: String  
+
+
+

Conforming to Identifiable to enable working with ForEach and similiar looping functions +if faVersion present, use that to follow the standard of either tokenAddress or combination of tokenAddress + token id, fallback to using symbol if type is unknown

+
@@ -374,6 +512,58 @@

Parameters

Returns

Token.

+

+
+

+ placeholder(from​NFT:​amount:​thumbnail​URL:​) +

+
+
public static func placeholder(fromNFT nft: NFT, amount: TokenAmount, thumbnailURL: URL?) -> Token  
+
+
+

Useful for creating placeholders for pending activity items

+ +
+
+
+

+ is​XTZ() +

+
+
public func isXTZ() -> Bool  
+
+
+

Helper function to check if the Token instance being passed aroun is pointing to XTZ. As many functions will require different functionality for fa token versus XTZ

+ +
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable to enable working with UITableViewDiffableDataSource

+ +
+
+ +
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: Token, rhs: Token) -> Bool  
+
+
+

Conforming to Equatable to enable working with UITableViewDiffableDataSource

+ +
@@ -384,7 +574,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TokenAmount/index.html b/TokenAmount/index.html index 92ec187e..ee905e92 100644 --- a/TokenAmount/index.html +++ b/TokenAmount/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -52,83 +52,95 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%161 - + + + +%517 + TokenAmount - -TokenAmount + +TokenAmount - + CustomStringConvertible - -CustomStringConvertible + +CustomStringConvertible TokenAmount->CustomStringConvertible - - + + + + + +Comparable + +Comparable + + + +TokenAmount->Comparable + + - + Equatable - -Equatable + +Equatable - + TokenAmount->Equatable - - + + - + Codable - -Codable + +Codable - + TokenAmount->Codable - - + + - - -Comparable - -Comparable + + +Hashable + +Hashable - - -TokenAmount->Comparable - - + + +TokenAmount->Hashable + + - + XTZAmount - - -XTZAmount + + +XTZAmount - + XTZAmount->TokenAmount - - + + @@ -154,6 +166,7 @@

Conforms To

Comparable
CustomStringConvertible
Equatable
+
Hashable
@@ -453,6 +466,18 @@

Currently we are unable to cast directly from TokenAmount to XTZAmount. This function will create a new XTZAmount object from the TokenAmount. THis is useful in situations where an amount is passed in a generic manner as a TokenAmount, but its required to be an XTZAmount

+ + +
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

Conforming to Hashable to enable working with UITableViewDiffableDataSource

+

@@ -564,7 +589,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TokenAmount_TokenAmountError/index.html b/TokenAmount_TokenAmountError/index.html index db432cc8..b9328830 100644 --- a/TokenAmount_TokenAmountError/index.html +++ b/TokenAmount_TokenAmountError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -47,11 +47,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%333 +%191 @@ -112,7 +112,7 @@

diff --git a/Token_TokenType/index.html b/Token_TokenType/index.html index 05e06a1c..b67b0471 100644 --- a/Token_TokenType/index.html +++ b/Token_TokenType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -52,11 +52,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%147 +%113 @@ -67,27 +67,27 @@ - + -String +Codable -String +Codable - + -Token.TokenType->String +Token.TokenType->Codable - + -Codable +String -Codable +String - + -Token.TokenType->Codable +Token.TokenType->String @@ -146,7 +146,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TezosChainName/index.html b/TorusAuthError/index.html similarity index 53% rename from TezosChainName/index.html rename to TorusAuthError/index.html index 28eb5bfd..5cb8447b 100644 --- a/TezosChainName/index.html +++ b/TorusAuthError/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - TezosChainName + KukaiCoreSwift - TorusAuthError
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Enumeration - Tezos​Chain​Name + Torus​Auth​Error

-
public enum TezosChainName: String  
+
public enum TorusAuthError: Error  
-

A enum representing the chain name for Tezos nodes, denoting the protocol version being run or mainnet

+

Custom TorusAuthService errors that cna be thrown

@@ -51,30 +51,30 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%157 +%385 - + -TezosChainName - +TorusAuthError + -TezosChainName +TorusAuthError - + -String +Error -String +Error - + -TezosChainName->String +TorusAuthError->Error @@ -82,78 +82,70 @@ - +

Conforms To

-
String
+
Error

Enumeration Cases

-
+

- mainnet + missing​Verifier

-
case mainnet
+
case missingVerifier
-
+

- alphanet + invalid​Torus​Response

-
case alphanet
+
case invalidTorusResponse
-
+

- babylonnet + crypto​Error

-
case babylonnet
+
case cryptoError
-
+

- carthagenet + invalid​Node​Details

-
case carthagenet
+
case invalidNodeDetails
-
+

- delphinet + invalid​Twitter​URL

-
case delphinet
+
case invalidTwitterURL
-
+

- edonet + no​Twiiter​User​IdFound

-
case edonet = "edo2net"
+
case noTwiiterUserIdFound
-
+

- florencenet + invalid​Apple​Response

-
case florencenet
-
-
-
-

- unknwon -

-
-
case unknwon
+
case invalidAppleResponse
@@ -165,7 +157,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/MichelsonConstant/index.html b/TorusAuthProvider/index.html similarity index 55% rename from MichelsonConstant/index.html rename to TorusAuthProvider/index.html index 43c795f1..71a1b9f8 100644 --- a/MichelsonConstant/index.html +++ b/TorusAuthProvider/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - MichelsonConstant + KukaiCoreSwift - TorusAuthProvider
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Enumeration - Michelson​Constant + Torus​Auth​Provider

-
public enum MichelsonConstant: String, CodingKey  
+
public enum TorusAuthProvider: String, Codable  
-

Michelson constants used to denote types and values

+

List of providers currently supported and available on the Tezos network

@@ -51,42 +51,42 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%291 +%159 - + -MichelsonConstant - +TorusAuthProvider + -MichelsonConstant +TorusAuthProvider - + -CodingKey +String -CodingKey +String - + -MichelsonConstant->CodingKey +TorusAuthProvider->String - + -String +Codable -String +Codable - + -MichelsonConstant->String +TorusAuthProvider->Codable @@ -94,87 +94,87 @@ - +

Conforms To

-
CodingKey
+
Codable
String

Enumeration Cases

-
+

- prim + apple

-
case prim
+
case apple
-
+

- args + google

-
case args
+
case google
-
+

- bytes + facebook

-
case bytes
+
case facebook
-
+

- int + twitter

-
case int
+
case twitter
-
+

- string + reddit

-
case string
+
case reddit
-
+

- pair + discord

-
case pair = "Pair"
+
case discord
-
+

- elt + twitch

-
case elt = "Elt"
+
case twitch
-
+

- `false` + line

-
case `false` = "False"
+
case line
-
+

- `true` + github

-
case `true` = "True"
+
case github
@@ -186,7 +186,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TorusAuthService/index.html b/TorusAuthService/index.html new file mode 100644 index 00000000..255f4944 --- /dev/null +++ b/TorusAuthService/index.html @@ -0,0 +1,331 @@ + + + + + + KukaiCoreSwift - TorusAuthService + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Torus​Auth​Service +

+ +
+
public class TorusAuthService: NSObject  
+
+
+

TorusAuthService is a wrapper around the SDK provided by: https://tor.us/ to allow the creation of TorusWallet's. +This allows users to create a wallet from their social media accounts without having to use a seed phrase / mnemonic. +TorusAuthService allows Tezos apps to leverage this service for a number of providers, and also has the ability to query the network for someone else's wallet address, +based on their social profile. This allows you to send XTZ or tokens to your friend based on their twitter username for example

+ +
+
+ +
+ + + + + + +%573 + + + +TorusAuthService + + +TorusAuthService + + + + + +NSObject + +NSObject + + + +TorusAuthService->NSObject + + + + + +ASAuthorizationControllerPresentationContextProviding + +ASAuthorizationControllerPresentationContextProviding + + + +TorusAuthService->ASAuthorizationControllerPresentationContextProviding + + + + + +ASAuthorizationControllerDelegate + +ASAuthorizationControllerDelegate + + + +TorusAuthService->ASAuthorizationControllerDelegate + + + + + + + + +
+

Conforms To

+
+
ASAuthorizationControllerDelegate
+
ASAuthorizationControllerPresentationContextProviding
+
NSObject
+
+
+
+

Initializers

+ +
+

+ init(network​Service:​verifiers:​) +

+
+
public init(networkService: NetworkService, verifiers: [TorusAuthProvider: SubverifierWrapper])  
+
+
+

Setup the TorusAuthService verifiers and networking clients for testnet and mainnet, so they can be queried easier.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
network​ServiceNetwork​Service

A networking service instance used for converting twitter handles into twitter id's

+
verifiers[Torus​Auth​Provider:​ Subverifier​Wrapper]

List of verifiers available to the library for the given app context

+
+
+
+
+

Methods

+ +
+

+ create​Wallet(from:​display​Over:​mocked​Torus:​completion:​) +

+
+
public func createWallet(from authType: TorusAuthProvider, displayOver: UIViewController?, mockedTorus: CustomAuth? = nil, completion: @escaping ((Result<TorusWallet, KukaiError>) -> Void))  
+
+
+

Create a TorusWallet insteace from a social media provider

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fromTorus​Auth​Provider

The TorusAuthProvider that you want to invoke

+
display​OverUIView​Controller?

The UIViewController that the webpage will display on top of

+
mocked​TorusCustom​Auth?

To avoid issues attempting to stub aspects of the Torus SDK, a mocked version of the SDK can be supplied instead

+
completion@escaping ((Result<Torus​Wallet, Kukai​Error>) -> Void)

The callback returned when all the networking and cryptography is complete

+
+
+
+

+ get​Address(from:​for:​completion:​) +

+
+
public func getAddress(from authType: TorusAuthProvider, for socialUsername: String, completion: @escaping ((Result<String, KukaiError>) -> Void))  
+
+
+

Get a TZ2 address from a social media user name. If Twitter, will first convert the username to a userid and then query

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
fromTorus​Auth​Provider

The TorusAuthProvider that you want to invoke

+
forString

The social media username to search for

+
completion@escaping ((Result<String, Kukai​Error>) -> Void)

The callback returned when all the networking and cryptography is complete

+
+
+
+

+ twitter​Lookup(username:​completion:​) +

+
+
public func twitterLookup(username: String, completion: @escaping ((Result<String, KukaiError>) -> Void))  
+
+
+

Take in a Twitter username and fetch the Twitter userId instead.

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
usernameString

The users username. Can contain an @ symbol, but will be stripped out by the code as its not required

+
completion@escaping ((Result<String, Kukai​Error>) -> Void)

The callback fired when the userId has been found

+
+
+
+

+ presentation​Anchor(for:​) +

+
+
public func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor  
+
+
+
+

+ authorization​Controller(controller:​did​Complete​With​Error:​) +

+
+
public func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error)  
+
+
+
+

+ authorization​Controller(controller:​did​Complete​With​Authorization:​) +

+
+
public func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization)  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TorusWallet/index.html b/TorusWallet/index.html new file mode 100644 index 00000000..02dc2b99 --- /dev/null +++ b/TorusWallet/index.html @@ -0,0 +1,245 @@ + + + + + + KukaiCoreSwift - TorusWallet + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Class + Torus​Wallet +

+ +
+
public class TorusWallet: RegularWallet  
+
+
+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+ +
+
+

This wallet is a subclass of LinearWallet created by using the Torus network to generate wallets from social media accounts. +This class is equivalent to a LinearWallet producing a TZ2 address via secp256k1, without the use of a mnemonic, and instead including the social profile of the user.

+ +
+
+ +
+ + + + + + +%509 + + + +TorusWallet + + +TorusWallet + + + + + +RegularWallet + + +RegularWallet + + + + + +TorusWallet->RegularWallet + + + + + + + + +
+

Superclass

+
+
RegularWallet
+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+
+
+
+
+

Initializers

+ +
+

+ init?(auth​Provider:​username:​user​Id:​profile​Picture:​torus​Private​Key:​) +

+
+
public init?(authProvider: TorusAuthProvider, username: String?, userId: String?, profilePicture: String?, torusPrivateKey: String)  
+
+
+

Create an instace of the wallet from the data provided by the Torus network, using TorusAuthService

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
auth​ProviderTorus​Auth​Provider

The supported provider used to create the private key

+
usernameString?

Optional, the users social profile username

+
user​IdString?

Optional, the users social profile unique id

+
profile​PictureString?

Optional, the users social profile display image

+
torus​Private​KeyString

The hex encoded private key from the Torus network

+
+
+
+
+

Properties

+ +
+

+ auth​Provider +

+
+
public let authProvider: TorusAuthProvider
+
+
+

The type of service used to generate the provide key

+ +
+
+
+

+ social​Username +

+
+
public let socialUsername: String? 
+
+
+

The raw social media username displayed on the users account. In the case of Twitter, it will not be prefix with an @

+ +
+
+
+

+ social​User​Id +

+
+
public let socialUserId: String? 
+
+
+

The unique id the social media platform has assigned to the users account. Used for querying account details

+ +
+
+
+

+ social​Profile​Picture​URL +

+
+
public let socialProfilePictureURL: URL? 
+
+
+

A URL to the users profile picture on the given social meida platform

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public override func encode(to encoder: Encoder) throws  
+
+
+

Encodable encode func

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTAccount/index.html b/TzKTAccount/index.html new file mode 100644 index 00000000..f2b9bef2 --- /dev/null +++ b/TzKTAccount/index.html @@ -0,0 +1,249 @@ + + + + + + KukaiCoreSwift - TzKTAccount + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTAccount +

+ +
+
public struct TzKTAccount: Codable, Equatable  
+
+
+

Model mapping to TzKT.io's Account object

+ +
+
+ +
+ + + + + + +%655 + + + +TzKTAccount + + +TzKTAccount + + + + + +Codable + +Codable + + + +TzKTAccount->Codable + + + + + +Equatable + +Equatable + + + +TzKTAccount->Equatable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
+
+
+

Initializers

+ +
+

+ init(balance:​type:​address:​public​Key:​revealed:​delegate:​delegation​Level:​active​Tokens​Count:​token​Balances​Count:​) +

+
+
public init(balance: Decimal?, type: String, address: String, publicKey: String, revealed: Bool, delegate: TzKTAccountDelegate?, delegationLevel: Decimal?, activeTokensCount: Decimal?, tokenBalancesCount: Decimal?)  
+
+
+

Generic init

+ +
+
+
+
+

Properties

+ +
+

+ balance +

+
+
public let balance: Decimal? 
+
+
+

The address XTZ balance in RPC format

+ +
+
+
+

+ type +

+
+
public let type: String
+
+
+

type of account e.g. "user" or "empty"

+ +
+
+
+

+ address +

+
+
public let address: String
+
+
+

tz1/2/3 kt1 address

+ +
+
+
+

+ public​Key +

+
+
public let publicKey: String? 
+
+
+

prefixed public key

+ +
+
+
+

+ revealed +

+
+
public let revealed: Bool? 
+
+
+

whether or not the account has performed a reveal operation

+ +
+
+
+

+ delegate +

+
+
public let delegate: TzKTAccountDelegate? 
+
+
+

The addresses delegation status

+ +
+
+
+

+ delegation​Level +

+
+
public let delegationLevel: Decimal? 
+
+
+

The block level the delegate address was set

+ +
+
+
+

+ active​Tokens​Count +

+
+
public let activeTokensCount: Decimal? 
+
+
+
+

+ token​Balances​Count +

+
+
public let tokenBalancesCount: Decimal? 
+
+
+
+

+ xtz​Balance +

+
+
public var xtzBalance: XTZAmount  
+
+
+

Helper method to convert the RPC balance into an XTZAmount

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTAccountDelegate/index.html b/TzKTAccountDelegate/index.html new file mode 100644 index 00000000..5c11b7a0 --- /dev/null +++ b/TzKTAccountDelegate/index.html @@ -0,0 +1,169 @@ + + + + + + KukaiCoreSwift - TzKTAccountDelegate + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTAccount​Delegate +

+ +
+
public struct TzKTAccountDelegate: Codable, Equatable  
+
+
+

Model mapping to TzKT.io's Account.Delegate Object

+ +
+
+ +
+ + + + + + +%459 + + + +TzKTAccountDelegate + + +TzKTAccountDelegate + + + + + +Equatable + +Equatable + + + +TzKTAccountDelegate->Equatable + + + + + +Codable + +Codable + + + +TzKTAccountDelegate->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Equatable
+
+
+
+

Initializers

+ +
+

+ init(alias:​address:​active:​) +

+
+
public init(alias: String?, address: String, active: Bool)  
+
+
+
+
+

Properties

+ +
+

+ alias +

+
+
public let alias: String? 
+
+
+

Bakers may have an alias (human readbale) name for their service

+ +
+
+
+

+ address +

+
+
public let address: String
+
+
+

Bakers must have a valid address

+ +
+
+
+

+ active +

+
+
public let active: Bool
+
+
+

Bool indicating whether or not the baker is currently active

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTTransaction_TransactionLocation/index.html b/TzKTAddress/index.html similarity index 56% rename from TzKTTransaction_TransactionLocation/index.html rename to TzKTAddress/index.html index e8c4d800..5010f048 100644 --- a/TzKTTransaction_TransactionLocation/index.html +++ b/TzKTAddress/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - TzKTTransaction.TransactionLocation + KukaiCoreSwift - TzKTAddress
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,11 +33,15 @@

On This Page

Structure - TzKTTransaction.​Transaction​Location + TzKTAddress

-
public struct TransactionLocation: Codable  
+
public struct TzKTAddress: Codable  
+
+
+

Details about a given contract

+
@@ -47,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%31 +%57 - + -TzKTTransaction.TransactionLocation - - -TzKTTransaction.TransactionLocation +TzKTAddress + + +TzKTAddress @@ -68,9 +72,9 @@ Codable - + -TzKTTransaction.TransactionLocation->Codable +TzKTAddress->Codable @@ -78,15 +82,9 @@ - + -

Member Of

-
-
TzKTTransaction
-

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

-
-
-

Conforms To

+

Conforms To

Codable
@@ -94,9 +92,9 @@

Conforms To

Initializers

-
+

- init(alias:​address:​) + init(alias:​address:​)

public init(alias: String?, address: String)  
@@ -106,20 +104,28 @@

Properties

-
+

- alias + alias

public let alias: String? 
+
+
+

Contract addresses may have an alias (human readbale) name, to denote a person or service

+
-
+

- address + address

public let address: String
+
+
+

The KT1 address of the contract

+
@@ -131,7 +137,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTBaker/index.html b/TzKTBaker/index.html new file mode 100644 index 00000000..d6ca6248 --- /dev/null +++ b/TzKTBaker/index.html @@ -0,0 +1,338 @@ + + + + + + KukaiCoreSwift - TzKTBaker + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBaker +

+ +
+
public struct TzKTBaker: Codable, Hashable  
+
+
+

Data representing a baker from TzKT or Baking-Bad

+ +
+
+ +
+ + + + + + +%61 + + + +TzKTBaker + + +TzKTBaker + + + + + +Hashable + +Hashable + + + +TzKTBaker->Hashable + + + + + +Codable + +Codable + + + +TzKTBaker->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Hashable
+
+
+
+

Initializers

+ +
+

+ init(address:​name:​logo:​) +

+
+
public init(address: String, name: String?, logo: String?)  
+
+
+

Helper to create a TzKTBaker from the data available from the Account object

+ +
+
+
+

+ init(address:​name:​logo:​balance:​staking​Balance:​staking​Capacity:​max​Staking​Balance:​free​Space:​fee:​min​Delegation:​payout​Delay:​payout​Period:​open​For​Delegation:​estimated​Roi:​service​Health:​payout​Timing:​payout​Accuracy:​config:​) +

+
+
public init(address: String, name: String?, logo: String?, balance: Decimal, stakingBalance: Decimal, stakingCapacity: Decimal, maxStakingBalance: Decimal, freeSpace: Decimal, fee: Double, minDelegation: Decimal, payoutDelay: Int, payoutPeriod: Int, openForDelegation: Bool, estimatedRoi: Decimal, serviceHealth: TzKTBakerHealth, payoutTiming: TzKTBakerTiming, payoutAccuracy: TzKTBakerAccuracy, config: TzKTBakerConfig?)  
+
+
+
+
+

Properties

+ +
+

+ address +

+
+
public let address: String
+
+
+
+

+ name +

+
+
public let name: String? 
+
+
+ +
+

+ balance +

+
+
public let balance: Decimal
+
+
+
+

+ staking​Balance +

+
+
public let stakingBalance: Decimal
+
+
+
+

+ staking​Capacity +

+
+
public let stakingCapacity: Decimal
+
+
+
+

+ max​Staking​Balance +

+
+
public let maxStakingBalance: Decimal
+
+
+
+

+ free​Space +

+
+
public let freeSpace: Decimal
+
+
+
+

+ fee +

+
+
public let fee: Double
+
+
+
+

+ min​Delegation +

+
+
public let minDelegation: Decimal
+
+
+
+

+ payout​Delay +

+
+
public let payoutDelay: Int
+
+
+
+

+ payout​Period +

+
+
public let payoutPeriod: Int
+
+
+
+

+ open​For​Delegation +

+
+
public let openForDelegation: Bool
+
+
+
+

+ estimated​Roi +

+
+
public let estimatedRoi: Decimal
+
+
+
+

+ service​Health +

+
+
public let serviceHealth: TzKTBakerHealth
+
+
+
+

+ payout​Timing +

+
+
public let payoutTiming: TzKTBakerTiming
+
+
+
+

+ payout​Accuracy +

+
+
public let payoutAccuracy: TzKTBakerAccuracy
+
+
+
+

+ config +

+
+
public let config: TzKTBakerConfig? 
+
+
+
+
+

Methods

+ +
+

+ from​Testnet​Array(_:​) +

+
+
public static func fromTestnetArray(_ data: [Any]) -> TzKTBaker?  
+
+
+

Ghostnet has a different setup for bakers, but we need to display and interact with them the same way. +So this helper extract what it can from the API and creates semi-real baker objects to help users deal with Ghostnet

+ +
+
+
+

+ reward​Struct() +

+
+
public func rewardStruct() -> TzKTBakerConfigRewardStruct?  
+
+
+

Convert con-chain data into a meaningful, readable object

+ +
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: TzKTBaker, rhs: TzKTBaker) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBakerAccuracy/index.html b/TzKTBakerAccuracy/index.html new file mode 100644 index 00000000..5fe9d959 --- /dev/null +++ b/TzKTBakerAccuracy/index.html @@ -0,0 +1,153 @@ + + + + + + KukaiCoreSwift - TzKTBakerAccuracy + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + TzKTBaker​Accuracy +

+ +
+
public enum TzKTBakerAccuracy: String, Codable  
+
+
+

The accuracy of the bakers payments

+ +
+
+ +
+ + + + + + +%37 + + + +TzKTBakerAccuracy + + +TzKTBakerAccuracy + + + + + +String + +String + + + +TzKTBakerAccuracy->String + + + + + +Codable + +Codable + + + +TzKTBakerAccuracy->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ precise +

+
+
case precise
+
+
+
+

+ inaccurate +

+
+
case inaccurate
+
+
+
+

+ suspicious +

+
+
case suspicious
+
+
+
+

+ no_data +

+
+
case no_data
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBakerConfig/index.html b/TzKTBakerConfig/index.html new file mode 100644 index 00000000..01a73c3f --- /dev/null +++ b/TzKTBakerConfig/index.html @@ -0,0 +1,192 @@ + + + + + + KukaiCoreSwift - TzKTBakerConfig + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBaker​Config +

+ +
+
public struct TzKTBakerConfig: Codable  
+
+
+

The bakers config file for details on when fees, min delegation etc change

+ +
+
+ +
+ + + + + + +%585 + + + +TzKTBakerConfig + + +TzKTBakerConfig + + + + + +Codable + +Codable + + + +TzKTBakerConfig->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ address +

+
+
public let address: String
+
+
+
+

+ fee +

+
+
public let fee: [TzKTBakerConfigDoubleValue] 
+
+
+
+

+ min​Delegation +

+
+
public let minDelegation: [TzKTBakerConfigDoubleValue] 
+
+
+
+

+ payout​Delay +

+
+
public let payoutDelay: [TzKTBakerConfigIntValue] 
+
+
+
+

+ reward​Struct +

+
+
public let rewardStruct: [TzKTBakerConfigIntValue] 
+
+
+
+
+

Methods

+ +
+

+ lateset​Fee() +

+
+
public func latesetFee() -> Double  
+
+
+
+

+ fee​For​Cycle(cycle:​) +

+
+
public func feeForCycle(cycle: Int) -> Double  
+
+
+
+

+ latest​Payout​Delay() +

+
+
public func latestPayoutDelay() -> Int  
+
+
+
+

+ payout​Delay​For​Cycle(cycle:​) +

+
+
public func payoutDelayForCycle(cycle: Int) -> Int  
+
+
+
+

+ latest​Reward​Struct() +

+
+
public func latestRewardStruct() -> Int?  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBakerConfigDoubleValue/index.html b/TzKTBakerConfigDoubleValue/index.html new file mode 100644 index 00000000..470a28fb --- /dev/null +++ b/TzKTBakerConfigDoubleValue/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - TzKTBakerConfigDoubleValue + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBaker​Config​Double​Value +

+ +
+
public struct TzKTBakerConfigDoubleValue: Codable  
+
+
+ +
+ + + + + + +%349 + + + +TzKTBakerConfigDoubleValue + + +TzKTBakerConfigDoubleValue + + + + + +Codable + +Codable + + + +TzKTBakerConfigDoubleValue->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ cycle +

+
+
public let cycle: Int
+
+
+
+

+ value +

+
+
public let value: Double
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBakerConfigIntValue/index.html b/TzKTBakerConfigIntValue/index.html new file mode 100644 index 00000000..a048e15d --- /dev/null +++ b/TzKTBakerConfigIntValue/index.html @@ -0,0 +1,120 @@ + + + + + + KukaiCoreSwift - TzKTBakerConfigIntValue + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBaker​Config​Int​Value +

+ +
+
public struct TzKTBakerConfigIntValue: Codable  
+
+
+ +
+ + + + + + +%481 + + + +TzKTBakerConfigIntValue + + +TzKTBakerConfigIntValue + + + + + +Codable + +Codable + + + +TzKTBakerConfigIntValue->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ cycle +

+
+
public let cycle: Int
+
+
+
+

+ value +

+
+
public let value: Int
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBakerConfigRewardStruct/index.html b/TzKTBakerConfigRewardStruct/index.html new file mode 100644 index 00000000..fc963555 --- /dev/null +++ b/TzKTBakerConfigRewardStruct/index.html @@ -0,0 +1,204 @@ + + + + + + KukaiCoreSwift - TzKTBakerConfigRewardStruct + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBaker​Config​Reward​Struct +

+ +
+
public struct TzKTBakerConfigRewardStruct: Codable  
+
+
+

Baker config payout flags

+ +
+
+ +
+ + + + + + +%17 + + + +TzKTBakerConfigRewardStruct + + +TzKTBakerConfigRewardStruct + + + + + +Codable + +Codable + + + +TzKTBakerConfigRewardStruct->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ blocks +

+
+
public let blocks: Bool
+
+
+
+

+ missed​Blocks +

+
+
public let missedBlocks: Bool
+
+
+
+

+ endorsements +

+
+
public let endorsements: Bool
+
+
+
+

+ missed​Endorsements +

+
+
public let missedEndorsements: Bool
+
+
+
+

+ fees +

+
+
public let fees: Bool
+
+
+
+

+ missed​Fees +

+
+
public let missedFees: Bool
+
+
+
+

+ accusation​Rewards +

+
+
public let accusationRewards: Bool
+
+
+
+

+ accusation​Losses +

+
+
public let accusationLosses: Bool
+
+
+
+

+ revelation​Rewards +

+
+
public let revelationRewards: Bool
+
+
+
+

+ revelation​Losses +

+
+
public let revelationLosses: Bool
+
+
+
+
+

Methods

+ +
+

+ from​Config​Int(_:​) +

+
+
public static func fromConfigInt(_ config: Int) -> TzKTBakerConfigRewardStruct  
+
+
+

Convert the 14-bit number in the baker config, to the equivalent set of flags

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/EllipticalCurve/index.html b/TzKTBakerHealth/index.html similarity index 69% rename from EllipticalCurve/index.html rename to TzKTBakerHealth/index.html index 6eea5426..55af1954 100644 --- a/EllipticalCurve/index.html +++ b/TzKTBakerHealth/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - EllipticalCurve + KukaiCoreSwift - TzKTBakerHealth
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Enumeration - Elliptical​Curve + TzKTBaker​Health

-
public enum EllipticalCurve: String, Codable  
+
public enum TzKTBakerHealth: String, Codable  
-

Distingush between ed25519 (TZ1...) and secp256k1 (TZ2...) curves for creating and using wallet addresses

+

The stability of the bakers server

@@ -51,18 +51,18 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%317 +%177 - + -EllipticalCurve - +TzKTBakerHealth + -EllipticalCurve +TzKTBakerHealth @@ -72,9 +72,9 @@ String - - -EllipticalCurve->String + + +TzKTBakerHealth->String @@ -84,9 +84,9 @@ Codable - - -EllipticalCurve->Codable + + +TzKTBakerHealth->Codable @@ -94,7 +94,7 @@ - +

Conforms To

@@ -105,20 +105,28 @@

Conforms To

Enumeration Cases

-
+
+

+ active +

+
+
case active
+
+
+

- ed25519 + closed

-
case ed25519
+
case closed
-
+

- secp256k1 + dead

-
case secp256k1
+
case dead
@@ -130,7 +138,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTBakerTiming/index.html b/TzKTBakerTiming/index.html new file mode 100644 index 00000000..24d7fb21 --- /dev/null +++ b/TzKTBakerTiming/index.html @@ -0,0 +1,153 @@ + + + + + + KukaiCoreSwift - TzKTBakerTiming + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + TzKTBaker​Timing +

+ +
+
public enum TzKTBakerTiming: String, Codable  
+
+
+

The reliability of the bakers payouts

+ +
+
+ +
+ + + + + + +%793 + + + +TzKTBakerTiming + + +TzKTBakerTiming + + + + + +Codable + +Codable + + + +TzKTBakerTiming->Codable + + + + + +String + +String + + + +TzKTBakerTiming->String + + + + + + + + +
+

Conforms To

+
+
Codable
+
String
+
+
+
+

Enumeration Cases

+ +
+

+ stable +

+
+
case stable
+
+
+
+

+ unstable +

+
+
case unstable
+
+
+
+

+ suspicious +

+
+
case suspicious
+
+
+
+

+ no_data +

+
+
case no_data
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBalance/index.html b/TzKTBalance/index.html new file mode 100644 index 00000000..a0761db1 --- /dev/null +++ b/TzKTBalance/index.html @@ -0,0 +1,178 @@ + + + + + + KukaiCoreSwift - TzKTBalance + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBalance +

+ +
+
public struct TzKTBalance: Codable  
+
+
+

Model mapping to the Balance object returned from the new TzKT API, resulting from the merge of BCD and TzKT

+ +
+
+ +
+ + + + + + +%501 + + + +TzKTBalance + + +TzKTBalance + + + + + +Codable + +Codable + + + +TzKTBalance->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ exception​List​NFT +

+
+
public static let exceptionListNFT = [
+		"KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS" // Tezos domains
+	] 
+
+
+
+

+ balance +

+
+
public let balance: String
+
+
+

String containing the RPC respresetnation of the balance of the given token

+ +
+
+
+

+ token +

+
+
public let token: TzKTBalanceToken
+
+
+

Details about the Token

+ +
+
+
+

+ token​Amount +

+
+
public var tokenAmount: TokenAmount  
+
+
+

Helper to convert the RPC token balance to a TokenAmount object

+ +
+
+
+
+

Methods

+ +
+

+ is​NFT() +

+
+
public func isNFT() -> Bool  
+
+
+

Basic check to see if token is an NFT or not. May not be 100% successful, needs research

+ +
+
+
+

+ is​OnNFTException​List() +

+
+
public func isOnNFTExceptionList() -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBalanceMetadata/index.html b/TzKTBalanceMetadata/index.html new file mode 100644 index 00000000..8918235f --- /dev/null +++ b/TzKTBalanceMetadata/index.html @@ -0,0 +1,359 @@ + + + + + + KukaiCoreSwift - TzKTBalanceMetadata + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBalance​Metadata +

+ +
+
public struct TzKTBalanceMetadata: Codable  
+
+
+

Metadata object for the token

+ +
+
+ +
+ + + + + + +%257 + + + +TzKTBalanceMetadata + + +TzKTBalanceMetadata + + + + + +Codable + +Codable + + + +TzKTBalanceMetadata->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(name:​symbol:​decimals:​formats:​display​Uri:​artifact​Uri:​thumbnail​Uri:​description:​minting​Tool:​tags:​minter:​should​Prefer​Symbol:​attributes:​ttl:​) +

+
+
public init(name: String?, symbol: String?, decimals: String, formats: [TzKTBalanceMetadataFormat]?, displayUri: String?, artifactUri: String?, thumbnailUri: String?, description: String?, mintingTool: String?, tags: [String]?, minter: String?, shouldPreferSymbol: Bool?, attributes: [Any]?, ttl: Int?)  
+
+
+
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ name +

+
+
public var name: String? 
+
+
+

A human readbale name

+ +
+
+
+

+ symbol +

+
+
public var symbol: String? 
+
+
+

The tokens symbol

+ +
+
+
+

+ decimals +

+
+
public var decimals: String
+
+
+

The number of decimals the token has

+ +
+
+
+

+ decimals​Int +

+
+
public var decimalsInt: Int  
+
+
+

Helper to convert the decimals to an Int

+ +
+
+
+

+ formats +

+
+
public var formats: [TzKTBalanceMetadataFormat]? 
+
+
+

Details of the available formats that the media is available in

+ +
+
+
+

+ display​Uri +

+
+
public var displayUri: String? 
+
+
+

URI to an medium/large image owned by the contract

+ +
+
+
+

+ artifact​Uri +

+
+
public var artifactUri: String? 
+
+
+

URI to the raw media artifact owned by the token

+ +
+
+
+

+ thumbnail​Uri +

+
+
public var thumbnailUri: String? 
+
+
+

URI to an small image for the token, ususally used as an icon when displayed in lists

+ +
+
+
+

+ description +

+
+
public var description: String? 
+
+
+

Description of the token or NFT

+ +
+
+
+

+ minting​Tool +

+
+
public var mintingTool: String? 
+
+
+

URL to the tool that was used to mint the item

+ +
+
+
+

+ tags +

+
+
public var tags: [String]? 
+
+
+

A list of tags to categorize the token / NFT

+ +
+
+
+

+ minter +

+
+
public var minter: String? 
+
+
+

The address responsible for creating the token / NFT

+ +
+
+
+

+ should​Prefer​Symbol +

+
+
public var shouldPreferSymbol: Bool? 
+
+
+

Whether or not the symbol or the name is prefered when displaying the token / NFT in a list

+ +
+
+
+

+ attributes +

+
+
public var attributes: [Any]? 
+
+
+

A collection of attributes about the token/NFT. Although TZIP-16 intended for this to be filled with info such as license, version, possible error messages etc, +It has been adopted by NFT creators as a more free-form dictionary. An example would be for gaming NFT's, this might be a list of attack/defensive moves the character is able to use +It is extremely likely that the actual type will be [[String: String]], however due to various issues and complexities of using a strongly typed language like Swift, +the easiest solution was to use [Any] with a custom decoder

+ +
+
+
+

+ ttl +

+
+
public let ttl: Int? 
+
+
+

Flag, in seconds, indicating how long to wait before refreshing the token to update its metadata. E.g. fxHash will inject a token with a name "[Waiting to be Signed]". and then, all things going well, 30 seconds later its updated to the correct attributes

+ +
+
+
+

+ thumbnail​URL +

+
+
public var thumbnailURL: URL?  
+
+
+

Helper to run the URI through the MediaProxyService to generate a useable URL for the thumbnail (if available)

+ +
+
+
+

+ display​URL +

+
+
public var displayURL: URL?  
+
+
+

Helper to run the URI through the MediaProxyService to generate a useable URL for the display image (if available)

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public func encode(to encoder: Encoder) throws  
+
+
+
+

+ get​Key​Values​From​Attributes() +

+
+
public func getKeyValuesFromAttributes() -> [TzKTBalanceMetadataAttributeKeyValue]  
+
+
+

Attributes is a complex free-form object. In a lot of cases when NFT's are games / collectibles, it should be possible to convert most if not all the elements into more simple String: String key value pairs, which will be easier to manage in table / collection views

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/OperationResponseInternalResultErrorWith/index.html b/TzKTBalanceMetadataAttributeKeyValue/index.html similarity index 54% rename from OperationResponseInternalResultErrorWith/index.html rename to TzKTBalanceMetadataAttributeKeyValue/index.html index 8be0dd34..77b6bf66 100644 --- a/OperationResponseInternalResultErrorWith/index.html +++ b/TzKTBalanceMetadataAttributeKeyValue/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - OperationResponseInternalResultErrorWith + KukaiCoreSwift - TzKTBalanceMetadataAttributeKeyValue
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -33,14 +33,14 @@

On This Page

Structure - Operation​Response​Internal​Result​Error​With + TzKTBalance​Metadata​Attribute​Key​Value

-
public struct OperationResponseInternalResultErrorWith: Codable, Equatable  
+
public struct TzKTBalanceMetadataAttributeKeyValue: Codable, Hashable  
-

The error string, or micheline error object returned inside OperationResponseInternalResultError

+

Wrapper / Helper to extract metadata attribute content

@@ -51,30 +51,30 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%105 +%205 - + -OperationResponseInternalResultErrorWith - - -OperationResponseInternalResultErrorWith +TzKTBalanceMetadataAttributeKeyValue + + +TzKTBalanceMetadataAttributeKeyValue - + -Equatable +Hashable -Equatable +Hashable - - -OperationResponseInternalResultErrorWith->Equatable + + +TzKTBalanceMetadataAttributeKeyValue->Hashable @@ -84,9 +84,9 @@ Codable - - -OperationResponseInternalResultErrorWith->Codable + + +TzKTBalanceMetadataAttributeKeyValue->Codable @@ -94,31 +94,43 @@ - +

Conforms To

Codable
-
Equatable
+
Hashable
+
+

Initializers

+ +
+

+ init(key:​value:​) +

+
+
public init(key: String, value: String)  
+
+
+

Properties

-
+

- string + key

-
public let string: String? 
+
public let key: String
-
+

- args + value

-
public let args: [[String: String]]? 
+
public let value: String
@@ -130,7 +142,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTBalanceMetadataDimensions/index.html b/TzKTBalanceMetadataDimensions/index.html new file mode 100644 index 00000000..759feb39 --- /dev/null +++ b/TzKTBalanceMetadataDimensions/index.html @@ -0,0 +1,148 @@ + + + + + + KukaiCoreSwift - TzKTBalanceMetadataDimensions + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBalance​Metadata​Dimensions +

+ +
+
public struct TzKTBalanceMetadataDimensions: Codable  
+
+
+

Object containing information about the dimensions of a given piece of media

+ +
+
+ +
+ + + + + + +%597 + + + +TzKTBalanceMetadataDimensions + + +TzKTBalanceMetadataDimensions + + + + + +Codable + +Codable + + + +TzKTBalanceMetadataDimensions->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(unit:​value:​) +

+
+
public init(unit: String, value: String)  
+
+
+

Init to manaually create an instance, mostly for testing

+ +
+
+
+
+

Properties

+ +
+

+ unit +

+
+
public let unit: String? 
+
+
+

The unit of measurement (e.g. px for pixels)

+ +
+
+
+

+ value +

+
+
public let value: String? 
+
+
+

String containing the resolution or size (e.g. 1024x787)

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBalanceMetadataFormat/index.html b/TzKTBalanceMetadataFormat/index.html new file mode 100644 index 00000000..e8c85da9 --- /dev/null +++ b/TzKTBalanceMetadataFormat/index.html @@ -0,0 +1,160 @@ + + + + + + KukaiCoreSwift - TzKTBalanceMetadataFormat + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBalance​Metadata​Format +

+ +
+
public struct TzKTBalanceMetadataFormat: Codable  
+
+
+

Object containing information about the various formats the media is available in

+ +
+
+ +
+ + + + + + +%253 + + + +TzKTBalanceMetadataFormat + + +TzKTBalanceMetadataFormat + + + + + +Codable + +Codable + + + +TzKTBalanceMetadataFormat->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(uri:​mime​Type:​dimensions:​) +

+
+
public init(uri: String, mimeType: String, dimensions: TzKTBalanceMetadataDimensions?)  
+
+
+

Init to manaually create an instance, mostly for testing

+ +
+
+
+
+

Properties

+ +
+

+ uri +

+
+
public let uri: String
+
+
+

The URI to this specific format

+ +
+
+
+

+ mime​Type +

+
+
public let mimeType: String
+
+
+

The mimetype of this version

+ +
+
+
+

+ dimensions +

+
+
public let dimensions: TzKTBalanceMetadataDimensions? 
+
+
+

The display dimensions

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTBalanceToken/index.html b/TzKTBalanceToken/index.html new file mode 100644 index 00000000..bd494d55 --- /dev/null +++ b/TzKTBalanceToken/index.html @@ -0,0 +1,220 @@ + + + + + + KukaiCoreSwift - TzKTBalanceToken + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTBalance​Token +

+ +
+
public struct TzKTBalanceToken: Codable  
+
+
+

Model encapsulating information about the token itself

+ +
+
+ +
+ + + + + + +%473 + + + +TzKTBalanceToken + + +TzKTBalanceToken + + + + + +Codable + +Codable + + + +TzKTBalanceToken->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Initializers

+ +
+

+ init(contract:​token​Id:​standard:​total​Supply:​metadata:​) +

+
+
public init(contract: TzKTAddress, tokenId: String, standard: FaVersion, totalSupply: String?, metadata: TzKTBalanceMetadata?)  
+
+
+
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  
+
+
+
+
+

Properties

+ +
+

+ contract +

+
+
public let contract: TzKTAddress
+
+
+

Details of the contract (e.g. address)

+ +
+
+
+

+ token​Id +

+
+
public let tokenId: String
+
+
+

The FA2 token ID of the token

+ +
+
+
+

+ standard +

+
+
public let standard: FaVersion
+
+
+

Which FA version the token conforms too

+ +
+
+
+

+ total​Supply +

+
+
public let totalSupply: String? 
+
+
+

Total avaialble supply of this address + token id combo

+ +
+
+
+

+ metadata +

+
+
public var metadata: TzKTBalanceMetadata? 
+
+
+

Metadata about the token

+ +
+
+
+

+ malformed​Metadata +

+
+
public var malformedMetadata: Bool
+
+
+
+

+ display​Symbol +

+
+
public var displaySymbol: String  
+
+
+

Helper to determine what string is used as the symbol for display purposes

+ +
+
+
+
+

Methods

+ +
+

+ encode(to:​) +

+
+
public func encode(to encoder: Encoder) throws  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTClient/index.html b/TzKTClient/index.html index 72beb2bc..edbb804b 100644 --- a/TzKTClient/index.html +++ b/TzKTClient/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -40,28 +40,73 @@

public class TzKTClient  

-

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, and transactions

+

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, transactions, bakers, account status etc

- +
+ + + + + + +%325 + + + +TzKTClient + + +TzKTClient + + + + + +HubConnectionDelegate + +HubConnectionDelegate + + + +TzKTClient->HubConnectionDelegate + + + + + + + + +

Nested Types

TzKTClient.TzKTServiceError

Unique Errors that TzKTClient can throw

+
TzKTClient.Constants
+

Constants needed for interacting with the API

+
+
+

Conforms To

+
+
HubConnectionDelegate

Initializers

-
+

- init(network​Service:​config:​better​Call​Dev​Client:​) + init(network​Service:​config:​better​Call​Dev​Client:​dip​Dup​Client:​)

-
public init(networkService: NetworkService, config: TezosNodeClientConfig, betterCallDevClient: BetterCallDevClient)  
+
public init(networkService: NetworkService, config: TezosNodeClientConfig, betterCallDevClient: BetterCallDevClient, dipDupClient: DipDupClient)  

Init a TzKTClient with a NetworkService and a TezosNodeClientConfig and a BetterCallDevClient.

@@ -95,23 +140,57 @@

Parameters

Better​Call​Dev​Client

BetterCallDevClient used to fetch more detailed errors about operation failures involving smart contracts.

+ + + dip​Dup​Client + Dip​Dup​Client +

DipDupClient used to fetch additional information about the tokens owned.

+ +
+
+
+

Properties

+ +
+

+ is​Listening +

+
+
public var isListening = false
+
+
+

Is currently monitoring an address for update notifications

+ +
+
+
+

+ account​Did​Change +

+
+
@Published public var accountDidChange: [String] = [] 
+
+
+

Notifications of monitored addresses that have changed

+ +

Methods

-
+

- get​Operation(by​Hash:​completion:​) + get​Storage(for​Contract:​of​Type:​completion:​)

-
public func getOperation(byHash hash: String, completion: @escaping (([TzKTOperation]?, ErrorResponse?) -> Void))  
+
public func getStorage<T: Codable>(forContract contract: String, ofType: T.Type, completion: @escaping ((Result<T, KukaiError>) -> Void))  
-

Query details about the given operation

+

Get the storage of a given contract and parse it to a supplied model type

Parameters

@@ -126,29 +205,78 @@

Parameters

- by​Hash + for​Contract String -

The operation hash to query.

+

The KT1 contract address to query

+ + + + of​Type + T.​Type +

The Codable compliant model to parse the response as

completion - @escaping (([TzKTOperation]?, Error​Response?) -> Void) -

A completion colsure called when the request is done.

+ @escaping ((Result<T, Kukai​Error>) -> Void) +

A completion block called, returning a Swift Result type

+ + + + +
+
+

+ get​Big​Map(for​Id:​of​Type:​completion:​) +

+
+
public func getBigMap<T: Codable>(forId id: String, ofType: T.Type, completion: @escaping ((Result<T, KukaiError>) -> Void))  
+
+
+

Get the keys of a big map, by ID and parse it to a model

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + +
for​IdString

The numeric ID of the big map

+
of​TypeT.​Type

The Codable compliant model to parse the response as

+
completion@escaping ((Result<T, Kukai​Error>) -> Void)

A completion block called, returning a Swift Result type

-
+

- wait​For​Injection(of​Hash:​completion:​) + get​Big​Map​Key(for​Id:​key:​of​Type:​completion:​)

-
public func waitForInjection(ofHash hash: String, completion: @escaping ((Bool, Error?, ErrorResponse?) -> Void))  
+
public func getBigMapKey<T: Codable>(forId id: String, key: String, ofType: T.Type, completion: @escaping ((Result<T, KukaiError>) -> Void))  
-

Poll the TzKT APi until a record of the given operation is found

+

Get the keys of a big map, but filtered to only one specific key. Parse the response as the supplied model

Parameters

@@ -163,61 +291,230 @@

Parameters

- of​Hash + for​Id + String +

The numeric ID of the big map

+ + + + key + String +

The key to filter by

+ + + + of​Type + T.​Type +

The Codable compliant model to parse the response as

+ + + + completion + @escaping ((Result<T, Kukai​Error>) -> Void) +

A completion block called, returning a Swift Result type

+ + + + +
+
+

+ suggest​Account(for​String:​completion:​) +

+
+
public func suggestAccount(forString: String, completion: @escaping ((Result<TzKTAddress?, KukaiError>) -> Void))  
+
+
+

Call https://api.tzkt.io/v1/suggest/accounts/... appending the supplied string, in an attempt to search for an account with a known alias

+ +
+
+
+

+ bakers(completion:​) +

+
+
public func bakers(completion: @escaping ((Result<[TzKTBaker], KukaiError>) -> Void))  
+
+
+

Call https://api.baking-bad.org/v2/bakers/ for a list of public bakers if on mainnet, else search for all accounts self delegating on testnet

+ +
+
+
+

+ baker​Config(for​Address:​completion:​) +

+
+
public func bakerConfig(forAddress: String, completion: @escaping ((Result<TzKTBaker, KukaiError>) -> Void))  
+
+
+

Call https://api.baking-bad.org/v2/bakers/...?configs=true to get the config settings for the given baker

+ +
+
+
+

+ delegator​Rewards(for​Address:​limit:​completion:​) +

+
+
public func delegatorRewards(forAddress: String, limit: Int = 25, completion: @escaping ((Result<[TzKTDelegatorReward], KukaiError>) -> Void))  
+
+
+

Call https://api.tzkt.io/v1/rewards/delegators/...?limit=... to get the config settings for the given baker

+ +
+
+
+

+ estimate​Last​And​Next​Reward(for​Address:​delegate:​completion:​) +

+
+
public func estimateLastAndNextReward(forAddress: String, delegate: TzKTAccountDelegate, completion: @escaping ((Result<AggregateRewardInformation, KukaiError>) -> Void))  
+
+
+

Make many different calls to attempt to figure out the previous reward the user should have received, and the next potential reward

+ +
+
+
+

+ get​Last​Reward(for​Address:​unique​Bakers:​payout​Addresses:​completion:​) +

+
+
public func getLastReward(forAddress: String, uniqueBakers: [TzKTAddress], payoutAddresses: [String: TzKTAddress], completion: @escaping ((Result<[TzKTTransaction], KukaiError>) -> Void))  
+
+
+

Take all the baker addresses and payout addresses and find the last transaction (if any) received from any of them

+ +
+
+
+

+ cycles(limit:​completion:​) +

+
+
public func cycles(limit: Int = 25, completion: @escaping ((Result<[TzKTCycle], KukaiError>) -> Void))  
+
+
+

Call https://api.tzkt.io/v1/cycles?limit=... to get the 10 most recent cycles

+ +
+
+
+

+ cycle​For​Level(cycles:​level:​) +

+
+
public func cycleForLevel(cycles: [TzKTCycle], level: Decimal) -> TzKTCycle?  
+
+
+

Given a list of cycles, search through them to find what cycle a given block level appeared in +If leveled supplied is less than the firstLevel of the last cycle, return the last

+ +
+
+
+

+ get​Operation(by​Hash:​completion:​) +

+
+
public func getOperation(byHash hash: String, completion: @escaping (([TzKTOperation]?, KukaiError?) -> Void))  
+
+
+

Query details about the given operation

+ +
+

Parameters

+ + + + + + + + + + + + - - +
by​Hash String

The operation hash to query.

completion@escaping ((Bool, Error?, Error​Response?) -> Void)

A completion colsure called when the API returns a valid operation response, or an error indicating a problem with the service.

+
@escaping (([TzKTOperation]?, Kukai​Error?) -> Void)

A completion colsure called when the request is done.

-
+

- cancel​Wait() + listen​For​Account​Changes(addresses:​with​Debugging:​)

-
public func cancelWait()  
+
public func listenForAccountChanges(addresses: [String], withDebugging: Bool = false)  
-

Cancel the polling operation from waitForInjection

+

Open a websocket connection to request a notification for any changes to the given account. The @Published var accountDidChange will be notified if something occurs

+

Parameters

+ + + + + + + + + + + + + + + + +
address

The Tz address of the account to monitor

+
-
+

- clear​History() + stop​Listening​For​Account​Changes()

-
public func clearHistory()  
+
public func stopListeningForAccountChanges()  
-

Clear the in RAM copy of transaction history

+

Close the websocket from listenForAccountChanges

-
+

- current​Transaction​History(filter​ByToken:​or​Filter​ByAddress:​) + change​Address​ToListen​For​Changes(addresses:​)

-
public func currentTransactionHistory(filterByToken: Token?, orFilterByAddress: String?) -> [TimeInterval: [TzKTTransaction]]  
+
public func changeAddressToListenForChanges(addresses: [String])  
-

Get the current in RAM transation history, with optional filters

+

Close the current connection and open another

-
-
    -
  • -

    returns transactions grouped by day in a dictionary with a key of TimeInterval.

    -
  • -
+
+
+

+ get​Balance​Count(for​Address:​completion:​) +

+
+
public func getBalanceCount(forAddress: String, completion: @escaping (Result<Int, KukaiError>) -> Void)  
+
+
+

Get the count of tokens the given address has balances for (excluding zero balances)

Parameters

@@ -232,29 +529,29 @@

Parameters

- filter​ByToken - Token? -

only retuns transactions where the primary or secondary token is of this type.

+ for​Address + String +

The tz address to search for

- or​Filter​ByAddress - String? -

only retuns transactions where the source or destination address matches this string

+ completion + @escaping (Result<Int, Kukai​Error>) -> Void +

The completion block called with a Result containing the number or an error

-
+

- refresh​Transaction​History(for​Address:​and​Supported​Tokens:​completion:​) + get​Balance​Page(for​Address:​offset:​completion:​)

-
public func refreshTransactionHistory(forAddress address: String, andSupportedTokens: [Token], completion: @escaping (() -> Void))  
+
public func getBalancePage(forAddress: String, offset: Int = 0, completion: @escaping ((Result<[TzKTBalance], KukaiError>) -> Void))  
-

Query the lastest transaction history and store in RAM. Get access to the data via currentTransactionHistory(...)

+

Tokens balances and metadata need to be fetch from a paginated API. THis function calls a sinlerequest or 1 page of balances / metadata

Parameters

@@ -271,23 +568,177 @@

Parameters

for​Address String -

the wallet address to query the history for.

+

The tz address to search for

- and​Supported​Tokens - [Token] -

a list of known tokens, used to add more detail to the transaction objects.

+ offset + Int +

The starting position

completion - @escaping (() -> Void) -

a closure indicating the request and processing has finished.

+ @escaping ((Result<[TzKTBalance], Kukai​Error>) -> Void) +

The completion block called with a Result containing an array of balances or an error

+
+
+

+ get​Account(for​Address:​completion:​) +

+
+
public func getAccount(forAddress: String, completion: @escaping ((Result<TzKTAccount, KukaiError>) -> Void))  
+
+
+

Get the account object from TzKT caontaining information about the address, its balance and baker

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
for​AddressString

The tz address to search for

+
completion@escaping ((Result<TzKTAccount, Kukai​Error>) -> Void)

The completion block called with a Result containing an object or an error

+
+
+
+

+ get​All​Balances(for​Address:​completion:​) +

+
+
public func getAllBalances(forAddress address: String, completion: @escaping ((Result<Account, KukaiError>) -> Void))  
+
+
+

Get all balances from one function call, by fetching the result from getBalanceCount and using that to decide how many pages should be called

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
for​AddressString

The tz address to search for

+
completion@escaping ((Result<Account, Kukai​Error>) -> Void)

The completion block called with a Result containing an object or an error

+
+
+
+

+ avatar​URL(for​Token:​) +

+
+
public static func avatarURL(forToken token: String) -> URL?  
+
+
+

In order to access the cached images, you need the URL it was downloaded from. This can either be found inside the Token objects returned as part of Account from the fetchAccountInfo func. +Or, if you need to use it seperately, given the token address you can use this function

+ +
+

Parameters

+ + + + + + + + + + + + + + + + +
for​TokenString

The token address who's image you are looking for.

+
+
+
+

+ fetch​Transactions(for​Address:​limit:​completion:​) +

+
+
public func fetchTransactions(forAddress address: String, limit: Int = 50, completion: @escaping (([TzKTTransaction]) -> Void))  
+
+
+

Fetch all transactions, both account operations, and token transfers, and combine them into 1 response

+ +
+
+
+

+ group​Transactions(transactions:​current​Wallet​Address:​) +

+
+
public func groupTransactions(transactions: [TzKTTransaction], currentWalletAddress: String) -> [TzKTTransactionGroup]  
+
+
+

Group transactions into logical groups, so user doesn't see N enteries for 1 contract call resulting in many internal operations

+ +
+
+
+

+ connection​Did​Open(hub​Connection:​) +

+
+
public func connectionDidOpen(hubConnection: HubConnection)  
+
+
+
+

+ connection​Did​Close(error:​) +

+
+
public func connectionDidClose(error: Error?)  
+
+
+
+

+ connection​Did​Fail​ToOpen(error:​) +

+
+
public func connectionDidFailToOpen(error: Error)  
+
@@ -298,7 +749,7 @@

Parameters

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/Prefix_Watermark/index.html b/TzKTClient_Constants/index.html similarity index 52% rename from Prefix_Watermark/index.html rename to TzKTClient_Constants/index.html index 04a30ca8..ec4ee613 100644 --- a/Prefix_Watermark/index.html +++ b/TzKTClient_Constants/index.html @@ -3,12 +3,12 @@ - KukaiCoreSwift - Prefix.Watermark + KukaiCoreSwift - TzKTClient.Constants
- + KukaiCoreSwift @@ -25,39 +25,43 @@

- Enumeration - Prefix.​Watermark + Structure + TzKTClient.​Constants

-
public enum Watermark  
+
public struct Constants  
+
+
+

Constants needed for interacting with the API

+

Member Of

-
Prefix
-

Prefixes needed to add to hex strings to denote elliptical curves

+
TzKTClient
+

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, transactions, bakers, account status etc

Properties

-
+

- operation + token​Balance​Query​Size

-
public static let operation: [UInt8] = [ 3 ]  
+
public static let tokenBalanceQuerySize = 10000
@@ -69,7 +73,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTClient_TzKTServiceError/index.html b/TzKTClient_TzKTServiceError/index.html index a82c577d..8a5d4549 100644 --- a/TzKTClient_TzKTServiceError/index.html +++ b/TzKTClient_TzKTServiceError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%301 +%353 @@ -87,7 +87,7 @@

Member Of

TzKTClient
-

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, and transactions

+

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, transactions, bakers, account status etc

Conforms To

@@ -123,7 +123,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTCycle/index.html b/TzKTCycle/index.html new file mode 100644 index 00000000..d3486c95 --- /dev/null +++ b/TzKTCycle/index.html @@ -0,0 +1,164 @@ + + + + + + KukaiCoreSwift - TzKTCycle + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTCycle +

+ +
+
public struct TzKTCycle: Codable  
+
+
+

The blockchain is broken down into cycles that last 2.7 days. Baker payment logic resolves around cycles instead of blocks

+ +
+
+ +
+ + + + + + +%729 + + + +TzKTCycle + + +TzKTCycle + + + + + +Codable + +Codable + + + +TzKTCycle->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ index +

+
+
public let index: Int
+
+
+
+

+ start​Time +

+
+
public let startTime: String
+
+
+
+

+ first​Level +

+
+
public let firstLevel: Decimal
+
+
+
+

+ end​Time +

+
+
public let endTime: String
+
+
+
+

+ last​Level +

+
+
public let lastLevel: Decimal
+
+
+
+

+ state​Date +

+
+
public var stateDate: Date?  
+
+
+
+

+ end​Date +

+
+
public var endDate: Date?  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTDelegatorReward/index.html b/TzKTDelegatorReward/index.html new file mode 100644 index 00000000..c0a99ca2 --- /dev/null +++ b/TzKTDelegatorReward/index.html @@ -0,0 +1,236 @@ + + + + + + KukaiCoreSwift - TzKTDelegatorReward + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTDelegator​Reward +

+ +
+
public struct TzKTDelegatorReward: Codable  
+
+
+

An object containing info on the reward a delegator should receive from a baker

+ +
+
+ +
+ + + + + + +%87 + + + +TzKTDelegatorReward + + +TzKTDelegatorReward + + + + + +Codable + +Codable + + + +TzKTDelegatorReward->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ cycle +

+
+
public let cycle: Int
+
+
+
+

+ balance +

+
+
public let balance: Decimal
+
+
+
+

+ baker +

+
+
public let baker: TzKTAddress
+
+
+
+

+ staking​Balance +

+
+
public let stakingBalance: Decimal
+
+
+
+

+ block​Rewards +

+
+
public let blockRewards: Decimal
+
+
+
+

+ missed​Block​Rewards +

+
+
public let missedBlockRewards: Decimal
+
+
+
+

+ endorsement​Rewards +

+
+
public let endorsementRewards: Decimal
+
+
+
+

+ missed​Endorsement​Rewards +

+
+
public let missedEndorsementRewards: Decimal
+
+
+
+

+ block​Fees +

+
+
public let blockFees: Decimal
+
+
+
+

+ missed​Block​Fees +

+
+
public let missedBlockFees: Decimal
+
+
+
+

+ extra​Block​Rewards +

+
+
public let extraBlockRewards: Decimal
+
+
+
+

+ missed​Extra​Block​Rewards +

+
+
public let missedExtraBlockRewards: Decimal
+
+
+
+

+ future​Block​Rewards +

+
+
public let futureBlockRewards: Decimal
+
+
+
+

+ future​Endorsement​Rewards +

+
+
public let futureEndorsementRewards: Decimal
+
+
+
+
+

Methods

+ +
+

+ estimated​Reward(with​Fee:​and​Reward​Struct:​) +

+
+
public func estimatedReward(withFee fee: Double, andRewardStruct: TzKTBakerConfigRewardStruct?) -> XTZAmount  
+
+
+

Return an estimated either for potential future or actual rewards

+ +
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTOperation/index.html b/TzKTOperation/index.html index 74dce470..643276ec 100644 --- a/TzKTOperation/index.html +++ b/TzKTOperation/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%117 +%631 @@ -98,6 +98,10 @@

public let type: String
+
+
+

Type of operation (e.g. transaction, delegation, reveal etc)

+

@@ -106,6 +110,10 @@

public let id: Int
+
+
+

Unique id to denote the operation

+
@@ -114,6 +122,10 @@

public let level: Int
+
+
+

The block level it was injected at

+
@@ -122,6 +134,10 @@

public let timestamp: String
+
+
+

Timestamp it was injected at

+
@@ -130,6 +146,10 @@

public let block: String
+
+
+

The hash of the injected block

+
@@ -138,6 +158,10 @@

public let hash: String
+
+
+

The operation hash

+
@@ -146,6 +170,10 @@

public let counter: Int
+
+
+

The users numerical counter of the operation

+
@@ -154,6 +182,10 @@

public let status: String
+
+
+

Status of the operation (e.g. applied or failed)

+
@@ -162,6 +194,10 @@

+
+

Optional array of errors encountered while trying to inject the operation

+
@@ -174,6 +210,10 @@

public func isFailed() -> Bool  
+
+
+

Helper to detect a failed transation by searching for a status of "failed", "backtracked" or "skipped"

+
@@ -182,6 +222,10 @@

public func containsError() -> Bool  
+
+
+

Helper to detect if this operation contains an error

+
@@ -193,7 +237,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTOperationError/index.html b/TzKTOperationError/index.html index 97c6f5f3..9c6725c2 100644 --- a/TzKTOperationError/index.html +++ b/TzKTOperationError/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%73 +%437 @@ -98,6 +98,10 @@

public let type: String
+
+
+

The RPC error type string

+
@@ -109,7 +113,7 @@

diff --git a/TzKTTokenTransfer/index.html b/TzKTTokenTransfer/index.html new file mode 100644 index 00000000..7a70627d --- /dev/null +++ b/TzKTTokenTransfer/index.html @@ -0,0 +1,200 @@ + + + + + + KukaiCoreSwift - TzKTTokenTransfer + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTToken​Transfer +

+ +
+
public struct TzKTTokenTransfer: Codable  
+
+
+

FA1.2 / FA2 token transafers are treated differently from transactions. This object is used when fetching data form the API, as a temporary placeholder, ultimately to be merged into the transactions

+ +
+
+ +
+ + + + + + +%333 + + + +TzKTTokenTransfer + + +TzKTTokenTransfer + + + + + +Codable + +Codable + + + +TzKTTokenTransfer->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
+
+
+

Properties

+ +
+

+ id +

+
+
public let id: Decimal
+
+
+
+

+ hash +

+
+
public var hash: String?  
+
+
+
+

+ level +

+
+
public let level: Decimal
+
+
+
+

+ timestamp +

+
+
public let timestamp: String
+
+
+
+

+ token +

+
+
public let token: TzKTBalanceToken
+
+
+
+

+ to +

+
+
public let to: TzKTAddress? 
+
+
+
+

+ from +

+
+
public let from: TzKTAddress? 
+
+
+
+

+ amount +

+
+
public let amount: String
+
+
+
+

+ transaction​Id +

+
+
public let transactionId: Decimal
+
+
+
+

+ minting​Tool +

+
+
public let mintingTool: String? 
+
+
+
+
+

Methods

+ +
+

+ token​Amount() +

+
+
public func tokenAmount() -> TokenAmount  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTTransaction/index.html b/TzKTTransaction/index.html index f357b124..dbcb62de 100644 --- a/TzKTTransaction/index.html +++ b/TzKTTransaction/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,19 +25,19 @@

- Class + Structure TzKTTransaction

-
public class TzKTTransaction: Decodable, CustomStringConvertible  
+
public struct TzKTTransaction: Codable, CustomStringConvertible, Hashable, Identifiable  

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

@@ -51,44 +51,68 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%191 - + + + +%91 + - + TzKTTransaction - -TzKTTransaction + +TzKTTransaction - + -Decodable - -Decodable +Hashable + +Hashable - - -TzKTTransaction->Decodable - - + + +TzKTTransaction->Hashable + + CustomStringConvertible - -CustomStringConvertible + +CustomStringConvertible - + TzKTTransaction->CustomStringConvertible - - + + + + + +Codable + +Codable + + + +TzKTTransaction->Codable + + + + + +Identifiable + +Identifiable + + + +TzKTTransaction->Identifiable + + @@ -104,28 +128,30 @@

Nested Types

TzKTTransaction.TransactionSubType
-
TzKTTransaction.TransactionLocation
-
-
TzKTTransaction.TransactionParameter
-
TzKTTransaction.CodingKeys

Conforms To

-
CustomStringConvertible
-
Decodable
+
Codable
+
CustomStringConvertible
+
Hashable
+
Identifiable

Initializers

-
+

- init(type:​id:​level:​timestamp:​hash:​counter:​initiater:​sender:​baker​Fee:​storage​Fee:​allocation​Fee:​target:​prev​Delegate:​new​Delegate:​amount:​parameter:​status:​) + init(type:​id:​level:​timestamp:​hash:​counter:​initiater:​sender:​baker​Fee:​storage​Fee:​allocation​Fee:​target:​prev​Delegate:​new​Delegate:​amount:​parameter:​status:​has​Internals:​token​Transfers​Count:​)

-
public init(type: TransactionType, id: Int, level: Int, timestamp: String, hash: String, counter: Int, initiater: TransactionLocation?, sender: TransactionLocation, bakerFee: XTZAmount, storageFee: XTZAmount, allocationFee: XTZAmount, target: TransactionLocation?, prevDelegate: TransactionLocation?, newDelegate: TransactionLocation?, amount: TokenAmount, parameter: TransactionParameter?, status: TransactionStatus)  
+
public init(type: TransactionType, id: Decimal, level: Decimal, timestamp: String, hash: String, counter: Decimal, initiater: TzKTAddress?, sender: TzKTAddress, bakerFee: XTZAmount, storageFee: XTZAmount, allocationFee: XTZAmount, target: TzKTAddress?, prevDelegate: TzKTAddress?, newDelegate: TzKTAddress?, amount: TokenAmount, parameter: [String: String]?, status: TransactionStatus, hasInternals: Bool, tokenTransfersCount: Decimal?)  
+
+
+

Manually init a TzKTTransaction

+
@@ -133,14 +159,34 @@

init(from:​)

-
public required init(from decoder: Decoder) throws  
+
public init(from: TzKTTokenTransfer)  
+
+
+

Convert a TzKTTokenTransfer into a TzKTTransaction

+ +
+
+
+

+ init(from:​) +

+
+
public init(from decoder: Decoder) throws  

Properties

-
+
+

+ date​Formatter +

+
+
public static let dateFormatter  
+
+
+

type

@@ -153,7 +199,7 @@

id

-
public let id: Int
+
public let id: Decimal
@@ -161,7 +207,7 @@

level

-
public let level: Int
+
public let level: Decimal
@@ -185,7 +231,7 @@

counter

-
public let counter: Int
+
public let counter: Decimal
@@ -193,7 +239,7 @@

initiater

-
public let initiater: TransactionLocation? 
+
public let initiater: TzKTAddress? 
@@ -201,7 +247,7 @@

sender

-
public let sender: TransactionLocation
+
public let sender: TzKTAddress
@@ -233,7 +279,7 @@

target

-
public let target: TransactionLocation? 
+
public var target: TzKTAddress? 
@@ -241,7 +287,7 @@

prev​Delegate

-
public let prevDelegate: TransactionLocation? 
+
public let prevDelegate: TzKTAddress? 
@@ -249,7 +295,7 @@

new​Delegate

-
public let newDelegate: TransactionLocation? 
+
public let newDelegate: TzKTAddress? 
@@ -265,7 +311,7 @@

parameter

-
public let parameter: TransactionParameter? 
+
public let parameter: [String: String]? 
@@ -276,60 +322,60 @@

public let status: TransactionStatus

-
+

- sub​Type + has​Internals

-
public var subType: TransactionSubType = .unknown
+
public let hasInternals: Bool
-
+

- truncated​Time​Interval + token​Transfers​Count

-
public var truncatedTimeInterval: TimeInterval = 0
+
public let tokenTransfersCount: Decimal? 
-
+

- token + date

-
public var token: Token? 
+
public let date: Date? 
-
+

- secondary​Token + tzkt​Token​Transfer

-
public var secondaryToken: Token? 
+
public var tzktTokenTransfer: TzKTTokenTransfer? = nil  
-
+

- secondary​Amount + sub​Type

-
public var secondaryAmount: TokenAmount? 
+
public var subType: TransactionSubType? = nil
-
+

- native​Token​Send​Destination + entrypoint​Called

-
public var nativeTokenSendDestination: String? 
+
public var entrypointCalled: String? = nil
-
+

- network​Fee + primary​Token

-
public var networkFee: XTZAmount  
+
public var primaryToken: Token? = nil
@@ -344,87 +390,135 @@

Methods

-
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+

- augment​Transaction(with​Users​Address:​and​Tokens:​) + encode(to:​)

-
public func augmentTransaction(withUsersAddress usersAddress: String, andTokens tokens: [Token])  
+
public func encode(to encoder: Encoder) throws  
+
+
+
+

+ placeholder(with​Status:​op​Hash:​type:​counter:​from​Wallet:​destination:​xtz​Amount:​parameters:​primary​Token:​) +

+
+
public static func placeholder(withStatus status: TransactionStatus, opHash: String, type: TransactionType, counter: Decimal, fromWallet: WalletMetadata, destination: TzKTAddress, xtzAmount: TokenAmount, parameters: [String: String]?, primaryToken: Token?) -> TzKTTransaction  
-

Take in some details outside the scope of this model (the current wallet address and list of tokens), and do all the necessary processing to determine:

+

Used for creating "Pending" transactions

-
-
    -
  • -

    Is this type: transaction belonging to a send, receive, dexter exchange etc. event?

    -
  • -
  • -

    Extracting values from Michelson via the parameters such as the amount of an FA1.2 token sent

    -
  • -
  • -

    Exchange's become much more complex, as each piece is spread over multple seperate transactions. We will grab each piece belonging to each transaction, -then later outside the scope of this model, the transactions will be merged together (they will all have the same counter as it is 1 operation, with multiple internal operations). -e.g. in the case of XtzToToken, we will see two transactions, 1 of subtype .exchangeXtzToToken and another with the same counter of type .nativeTokenReceive. -We will delete the .nativeTokenReceive, and copy the value into the exchange so as we only display 1 transaction item of "Exchange ... XTZ for ... Token", for easier handling of the data

    -
  • -
+
+
+

+ placeholder(with​Status:​op​Hash:​type:​counter:​from​Wallet:​new​Delegate:​) +

+
+
public static func placeholder(withStatus status: TransactionStatus, opHash: String, type: TransactionType, counter: Decimal, fromWallet: WalletMetadata, newDelegate: TzKTAddress?) -> TzKTTransaction  
+
+
+

Used for createing a "Pending" delegation transaction

-
+

- token​For​Target(address:​tokens:​) + parameter​Value​AsArray()

-
public func tokenForTarget(address: String?, tokens: [Token]) -> Token?  
+
public func parameterValueAsArray() -> [Any]?  
-
+

- token​Transfer​Amount(of​Token:​) + parameter​Value​AsDict()

-
public func tokenTransferAmount(ofToken: Token?) -> TokenAmount?  
+
public func parameterValueAsDict() -> [String: Any]?  
-
+

- secondary​Amount​For​XTZToToken(of​Token:​) + parameter​Value​AsArray​OfDictionary()

-
public func secondaryAmountForXTZToToken(ofToken: Token?) -> TokenAmount?  
+
public func parameterValueAsArrayOfDictionary() -> [[String: Any]]?  
-
-

There will be 2 transactions for XtzToToken and 3 for TokenToXTZ -When doing XtzToToken, the returned token amount is in the Michelson of the second, internal transaction -When doing tokenToXTZ, the XTZ is the amount of the third transaction, with the token amount being in the Michelson of the second (and the first, but easier to extract from second)

- +
+
+

+ parameter​Value​AsType(type:​) +

+
+
public func parameterValueAsType<T>(type: T.Type) -> T?  
-
+

- primary​Amount​For​Token​ToXTZ() + get​Entrypoint()

-
public func primaryAmountForTokenToXTZ() -> TokenAmount  
+
public func getEntrypoint() -> String?  
-
+

- secondary​Amount​For​Token​ToXTZ(users​Address:​) + process​Additional​Data(with​Current​Wallet​Address:​)

-
public func secondaryAmountForTokenToXTZ(usersAddress: String) -> TokenAmount?  
+
public mutating func processAdditionalData(withCurrentWalletAddress currentWalletAddress: String)  
-
+
+

+ create​Primary​Token() +

+
+
public func createPrimaryToken() -> Token?  
+
+
+
+

+ get​FaToken​Transfer​Data() +

+
+
public func getFaTokenTransferData() -> Token?  
+
+
+

The TzKT transaction API doesn't provide all the info needed to normalise Token amounts. It only gives address and rpc amount. +Burried inside the michelson, the dex contract needs to be told the token id, and the target will contain the address. +This function will try to extract address, token id and rpc amount and return them in the standard objects, so that they can be used in conjuction with other functions to fetch the decimal data. +e.g. DipDup client can fetch all tokens from dexes, containing all token info. Using the address and id, the rest could be found via that, assuming zero for anything else (such as NFTs)

+ +
+
+
+

+ get​Token​Transfer​Destination() +

+
+
public func getTokenTransferDestination() -> String?  
+
+
+
+
+

Operators

+ +

- fa​Token​Send​Destination() + ==

-
public func faTokenSendDestination() -> String?  
+
public static func == (lhs: TzKTTransaction, rhs: TzKTTransaction) -> Bool  
@@ -436,7 +530,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTTransactionGroup/index.html b/TzKTTransactionGroup/index.html new file mode 100644 index 00000000..7c1cb30c --- /dev/null +++ b/TzKTTransactionGroup/index.html @@ -0,0 +1,248 @@ + + + + + + KukaiCoreSwift - TzKTTransactionGroup + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + TzKTTransaction​Group +

+ +
+
public struct TzKTTransactionGroup: Codable, Hashable, Identifiable, CustomStringConvertible  
+
+
+

Artifical object used to group related transactions into a more user friendly display +For example, 1 contract call can reuslt in many transactions being returned. To avoid the users UI being clogged, we group all them into 1 group, so the user only needs to see 1 item for 1 action they performed

+ +
+
+ +
+ + + + + + +%441 + + + +TzKTTransactionGroup + + +TzKTTransactionGroup + + + + + +Identifiable + +Identifiable + + + +TzKTTransactionGroup->Identifiable + + + + + +Codable + +Codable + + + +TzKTTransactionGroup->Codable + + + + + +Hashable + +Hashable + + + +TzKTTransactionGroup->Hashable + + + + + +CustomStringConvertible + +CustomStringConvertible + + + +TzKTTransactionGroup->CustomStringConvertible + + + + + + + + +
+

Conforms To

+
+
Codable
+
CustomStringConvertible
+
Hashable
+
Identifiable
+
+
+
+

Initializers

+ +
+

+ init?(with​Transactions:​current​Wallet​Address:​) +

+
+
public init?(withTransactions transactions: [TzKTTransaction], currentWalletAddress: String)  
+
+
+
+
+

Properties

+ +
+

+ group​Type +

+
+
public var groupType: TzKTTransaction.TransactionSubType
+
+
+
+

+ hash +

+
+
public let hash: String
+
+
+
+

+ transactions +

+
+
public let transactions: [TzKTTransaction] 
+
+
+
+

+ primary​Token +

+
+
public var primaryToken: Token? = nil
+
+
+
+

+ secondary​Token +

+
+
public var secondaryToken: Token? = nil
+
+
+
+

+ entrypoint​Called +

+
+
public var entrypointCalled: String? = nil
+
+
+
+

+ id +

+
+
public var id: Decimal  
+
+
+
+

+ description +

+
+
public var description: String  
+
+
+
+
+

Methods

+ +
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: TzKTTransactionGroup, rhs: TzKTTransactionGroup) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/TzKTTransaction_CodingKeys/index.html b/TzKTTransaction_CodingKeys/index.html index 3b630059..9068d3a7 100644 --- a/TzKTTransaction_CodingKeys/index.html +++ b/TzKTTransaction_CodingKeys/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -47,11 +47,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%345 +%139 @@ -94,7 +94,7 @@

Member Of

-
TzKTTransaction
+
TzKTTransaction

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

@@ -107,28 +107,36 @@

Conforms To

Enumeration Cases

-
+

- hash + prev​Delegate

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- new​Delegate + target

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- parameter + primary​Token

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
+
+
+
+

+ level +

+
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
@@ -136,7 +144,23 @@

storage​Fee

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
+
+
+
+

+ timestamp +

+
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
+
+
+
+

+ parameter +

+
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
@@ -144,79 +168,79 @@

baker​Fee

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- initiater + amount

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- prev​Delegate + sub​Type

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- level + token​Transfers​Count

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- allocation​Fee + entrypoint​Called

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- status + has​Internals

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- counter + allocation​Fee

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- target + type

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- id + new​Delegate

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- timestamp + id

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
@@ -224,31 +248,39 @@

sender

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- sub​Type + initiater

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- amount + counter

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
-
+

- type + status +

+
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
+
+
+
+

+ hash

-
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType
+
case type, id, level, timestamp, hash, counter, initiater, sender, bakerFee, storageFee, allocationFee, target, prevDelegate, newDelegate, amount, parameter, status, subType, entrypointCalled, primaryToken, hasInternals, tokenTransfersCount
@@ -260,7 +292,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTTransaction_TransactionStatus/index.html b/TzKTTransaction_TransactionStatus/index.html index 9cf1228b..c8843263 100644 --- a/TzKTTransaction_TransactionStatus/index.html +++ b/TzKTTransaction_TransactionStatus/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -47,11 +47,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%271 +%309 @@ -69,7 +69,7 @@ Codable - + TzKTTransaction.TransactionStatus->Codable @@ -81,7 +81,7 @@ String - + TzKTTransaction.TransactionStatus->String @@ -94,7 +94,7 @@

Member Of

-
TzKTTransaction
+
TzKTTransaction

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

@@ -131,6 +131,30 @@

case backtracked

+
+

+ unconfirmed +

+
+
case unconfirmed
+
+
+
+

+ partially​Confirmed +

+
+
case partiallyConfirmed
+
+
+
+

+ confirmed +

+
+
case confirmed
+
+

unknown @@ -148,7 +172,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTTransaction_TransactionSubType/index.html b/TzKTTransaction_TransactionSubType/index.html index e0c09544..b40d9d2f 100644 --- a/TzKTTransaction_TransactionSubType/index.html +++ b/TzKTTransaction_TransactionSubType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -47,11 +47,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%67 +%563 @@ -62,27 +62,27 @@ - + -String +Codable -String +Codable - + -TzKTTransaction.TransactionSubType->String +TzKTTransaction.TransactionSubType->Codable - + -Codable +String -Codable +String - + -TzKTTransaction.TransactionSubType->Codable +TzKTTransaction.TransactionSubType->String @@ -94,7 +94,7 @@

Member Of

-
TzKTTransaction
+
TzKTTransaction

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

@@ -115,14 +115,6 @@

case send

-
-

- native​Token​Send -

-
-
case nativeTokenSend
-
-

receive @@ -131,44 +123,12 @@

case receive

-
-

- native​Token​Receive -

-
-
case nativeTokenReceive
-
-
-
-

- exchange​XTZToToken -

-
-
case exchangeXTZToToken
-
-
-
-

- exchange​Token​ToXTZ -

-
-
case exchangeTokenToXTZ
-
-
-
-

- exchange​Token​ToXTZ_Internal -

-
-
case exchangeTokenToXTZ_Internal
-
-
-
+

- delegation + delegate

-
case delegation
+
case delegate
@@ -179,20 +139,20 @@

case reveal

-
+

- orignation + exchange

-
case orignation
+
case exchange
-
+

- approve + contract​Call

-
case approve
+
case contractCall
@@ -212,7 +172,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/TzKTTransaction_TransactionType/index.html b/TzKTTransaction_TransactionType/index.html index 440f625e..a3b747b6 100644 --- a/TzKTTransaction_TransactionType/index.html +++ b/TzKTTransaction_TransactionType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -47,11 +47,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%39 +%661 @@ -62,27 +62,27 @@ - + -String +Codable -String +Codable - + -TzKTTransaction.TransactionType->String +TzKTTransaction.TransactionType->Codable - + -Codable +String -Codable +String - + -TzKTTransaction.TransactionType->Codable +TzKTTransaction.TransactionType->String @@ -94,7 +94,7 @@

Member Of

-
TzKTTransaction
+
TzKTTransaction

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

@@ -156,7 +156,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/UIImage/index.html b/UIImage/index.html index 0381011e..29f677c1 100644 --- a/UIImage/index.html +++ b/UIImage/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -48,7 +48,7 @@

diff --git a/Wallet/index.html b/Wallet/index.html index 1fba6c73..6465664e 100644 --- a/Wallet/index.html +++ b/Wallet/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -37,7 +37,7 @@

-
public protocol Wallet  
+
public protocol Wallet: Codable  

Wallet protocol to allow generic handling of all wallets types for signing operations and caching data locally.

@@ -51,50 +51,77 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - - -%15 - + + + +%315 + Wallet - -Wallet + +Wallet - + + +Codable + +Codable + + + +Wallet->Codable + + + + +LedgerWallet + + +LedgerWallet + + + + + +LedgerWallet->Wallet + + + + + HDWallet - - -HDWallet + + +HDWallet - + HDWallet->Wallet - - + + - - -LinearWallet - - -LinearWallet + + +RegularWallet + + +RegularWallet - - -LinearWallet->Wallet - - + + +RegularWallet->Wallet + + @@ -102,14 +129,22 @@ -

Types Conforming to Wallet

+

Conforms To

+
+
Codable
+
+

Types Conforming to Wallet

HDWallet

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

-
LinearWallet
+
LedgerWallet
+

A Tezos wallet class, used to cache infomration regarding the paired ledger device used to sign the payload. +This class can only be created by fetching data from a Ledger device and supplying this data to the constructor.

+
+
RegularWallet

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

@@ -132,18 +167,6 @@

Which underlying WalletType is the wallet using

-
-

-
-

- seed -

-
-
var seed: String  
-
-
-

The cryptographic seed string, used to generate the key pairs

-
@@ -158,36 +181,49 @@

-
+

- mnemonic + sign(_:​is​Operation:​completion:​)

-
var mnemonic: String  
+
func sign(_ hex: String, isOperation: Bool, completion: @escaping ((Result<[UInt8], KukaiError>) -> Void)) 
-

The Bip39 mnemonic used to generate the wallet

- -
-
-
-

- sign(_:​) -

-
-
func sign(_ hex: String) -> [UInt8]? 
-
-
-

Take in a forged operation hex string, and sign it with the private key

- -
+

Sign a hex string with the wallets private key

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
hexString

A hex encoded string, representing a forged operation payload.

+
completion@escaping ((Result<[UInt8], Kukai​Error>) -> Void)

A completion block to run with the resulting signature, needs to be done async in order to support usecases such as signing with an external ledger.

+

private​Key​Curve()

-
func privateKeyCurve() -> EllipticalCurve
+
func privateKeyCurve() -> EllipticalCurve

Query which curve the given wallet is using

@@ -212,7 +248,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/WalletCacheItem/index.html b/WalletCacheItem/index.html deleted file mode 100644 index 58c7aae8..00000000 --- a/WalletCacheItem/index.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - KukaiCoreSwift - WalletCacheItem - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Class - Wallet​Cache​Item -

- -
-
public class WalletCacheItem: Codable  
-
-
-

A model to represent a Wallet in the encrypted cache

- -
-
- -
- - - - - - -%309 - - - -WalletCacheItem - - -WalletCacheItem - - - - - -Codable - -Codable - - - -WalletCacheItem->Codable - - - - - - - - -
-

Conforms To

-
-
Codable
-
-
-
-

Initializers

- -
-

- init(address:​mnemonic:​passphrase:​sort​Index:​type:​elliptical​Curve:​derivation​Path:​) -

-
-
public init(address: String, mnemonic: String, passphrase: String?, sortIndex: Int, type: WalletType, ellipticalCurve: EllipticalCurve, derivationPath: String?)  
-
-
-

Create a WalletCacheItem

- -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addressString

String containing TZ1 or TZ2 address of the Wallet

-
mnemonicString

String containing the mnemonic used to create the Wallet

-
passphraseString?

String containing the passphrase used to create the Wallet

-
sort​IndexInt

The sort index the wallet should appear in, when returned

-
typeWallet​Type

The underlying WalletType of the stored Wallet

-
elliptical​CurveElliptical​Curve

The EllipticalCurve used to create the wallet

-
derivation​PathString?

An optional derivationPath is type == .hd

-
-
-
-

- init(from:​) -

-
-
public required init(from decoder: Decoder) throws  
-
-
-

Codable: init fromDecoder

- -
-
-
-
-

Properties

- -
-

- address -

-
-
public var address: String
-
-
-

The wallets TZ1 or TZ2 address

- -
-
-
-

- mnemonic -

-
-
public var mnemonic: String
-
-
-

A string contianing the mnemonic used to create the wallet

- -
-
-
-

- passphrase -

-
-
public var passphrase: String? 
-
-
-

A string contianing the passphrase used to create the wallet

- -
-
-
-

- sort​Index -

-
-
public var sortIndex: Int
-
-
-

The index the wallet should appear in when returned by the cache service. Pureply for UI purposes and continuatity

- -
-
-
-

- type -

-
-
public var type: WalletType
-
-
-

The underlying WalletType

- -
-
-
-

- elliptical​Curve -

-
-
public var ellipticalCurve: EllipticalCurve
-
-
-

The ellipcatcal curve used to genreate the wallet

- -
-
-
-

- derivation​Path -

-
-
public var derivationPath: String? 
-
-
-

Opitional derivation path, if the type == .hd

- -
-
-
-
-

Methods

- -
-

- encode(to:​) -

-
-
public func encode(to encoder: Encoder) throws  
-
-
-

Codable: encode toEncoder

- -
-
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/WalletCacheService/index.html b/WalletCacheService/index.html index b098f751..88dd0c27 100644 --- a/WalletCacheService/index.html +++ b/WalletCacheService/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -40,9 +40,9 @@

public class WalletCacheService  

-

A service class used to store and retrieve Wallet objects such as LinearWallet and HDWallet from the devices disk. +

A service class used to store and retrieve Wallet objects such as RegularWallet, HDWallet, LedgerWallet and TorusWallet from the devices disk. This class will use the secure enclave (keychain if not available) to generate a key used to encrypt the contents locally, and retrieve. -The class can be used to take the decrypted JSON and convert it back into Wallet classes, ready to be used.

+This class will also store non senstiivve "metadata" about wallets, to allow storage of UI related data users might want to add, without cluttering up the wallet objects themselves

@@ -65,15 +65,15 @@

Methods

-
+

- cache(wallet:​and​Passphrase:​) + cache(wallet:​child​OfIndex:​backed​Up:​)

-
public func cache(wallet: Wallet, andPassphrase: String?) -> Bool  
+
public func cache<T: Wallet>(wallet: T, childOfIndex: Int?, backedUp: Bool) -> Bool  
-

Add a Wallet object to the local encrypted storage

+

Securely cache a walelt object, and record a default metadata object

Parameters

@@ -89,14 +89,14 @@

Parameters

wallet - Wallet + T

An object conforming to Wallet to be stored

- and​Passphrase - String? -

The passphrase the user entered to create the wallet

+ child​OfIndex + Int? +

An optional Int to denote the index of the HD wallet that this wallet is a child of

@@ -105,95 +105,153 @@

Returns

Bool, indicating if the storage was successful or not

-
+

- encrypt​And​Write​ToDisk(wallet​Items:​) + cache​Watch​Wallet(metadata:​)

-
public func encryptAndWriteToDisk(walletItems: [WalletCacheItem]) -> Bool  
+
public func cacheWatchWallet(metadata: WalletMetadata) -> Bool  
-

Take an array of WalletCacheItem serialise to JSON, encrypt and then write to disk

+

Cahce a watch wallet metadata obj, only. Metadata cahcing handled via wallet cache method

+
+
+

+ delete​Wallet(with​Address:​parent​Index:​) +

+
+
public func deleteWallet(withAddress: String, parentIndex: Int?) -> Bool  
+
+
+

Delete both a secure wallet entry and its related metadata object

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
with​AddressString

The address of the wallet

+
parent​IndexInt?

An optional Int to denote the index of the HD wallet that this wallet is a child of

+

Returns

-

Bool, indicating if the process was successful

+

Bool, indicating if the storage was successful or not

-
+

- read​From​Disk​And​Decrypt() + delete​Watch​Wallet(address:​) +

+
+
public func deleteWatchWallet(address: String) -> Bool  
+
+
+

Clear a watch wallet meatadata obj from the metadata cache only, does not affect actual wallet cache

+ +
+
+
+

+ fetch​Wallet(for​Address:​)

-
public func readFromDiskAndDecrypt() -> [WalletCacheItem]?  
+
public func fetchWallet(forAddress address: String) -> Wallet?  
-

Go to the file on disk (if present), decrypt its contents and retrieve an array of WalletCacheItem

+

Find and return the secure object for a given address

Returns

-

An array of WalletCacheItem if present on disk

+

Optional object confirming to Wallet protocol

-
+

- fetch​Wallets() + delete​All​Cache​And​Keys()

-
public func fetchWallets() -> [Wallet]?  
+
public func deleteAllCacheAndKeys() -> Bool  
-

Read, decrypt and re-create the Wallet objects from the stored cache

+

Delete the cached files and the assoicate keys used to encrypt it

Returns

-

An array of Wallet objects if present on disk

+

Bool, indicating if the process was successful or not

-
+

- fetch​Primary​Wallet() + encrypt​And​Write​ToDisk(wallets:​)

-
public func fetchPrimaryWallet() -> Wallet?  
+
public func encryptAndWriteToDisk(wallets: [String: Wallet]) -> Bool  
-

A shorthand function to avoid unnecessary processing. It will read, decrypt and re-create the first Wallet object present on disk

+

Take a dictionary of Wallet objects with their addresses as the key, serialise to JSON, encrypt and then write to disk

Returns

-

A Wallet object if present on disk

+

Bool, indicating if the process was successful

-
+

- parse(cache​Items:​) + read​From​Disk​And​Decrypt()

-
public func parse(cacheItems: [WalletCacheItem]) -> [Wallet]  
+
public func readFromDiskAndDecrypt() -> [String: Wallet]?  
-

Convert an array of WalletCacheItem's to Wallet's by performing the various private / public key operations

+

Go to the file on disk (if present), decrypt its contents and retrieve a dictionary of `Wallet's with the key being the wallet address

Returns

-

An array of Wallet objects

+

A dictionary of Wallet if present on disk

-
+

- delete​Cache​And​Keys() + write​Nonsensitive(_:​)

-
public func deleteCacheAndKeys() -> Bool  
+
public func writeNonsensitive(_ metadata: WalletMetadataList) -> Bool  
-

Delete the cached file and the assoicate keys used to encrypt it

+

Write an ordered array of WalletMetadata to disk, replacing existing file if exists

-

Returns

-

Bool, indicating if the process was successful or not

+
+
+

+ read​Nonsensitive() +

+
+
public func readNonsensitive() -> WalletMetadataList  
+
+
+

Return an ordered array of WalletMetadata if present on disk

+

@@ -317,7 +375,7 @@

Returns

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/WalletError/index.html b/WalletError/index.html new file mode 100644 index 00000000..c9a799bb --- /dev/null +++ b/WalletError/index.html @@ -0,0 +1,116 @@ + + + + + + KukaiCoreSwift - WalletError + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Enumeration + Wallet​Error +

+ +
+
public enum WalletError: Error  
+
+
+

Possible error types that can occur when using the LedgerWallet

+ +
+
+ +
+ + + + + + +%173 + + + +WalletError + + +WalletError + + + + + +Error + +Error + + + +WalletError->Error + + + + + + + + +
+

Conforms To

+
+
Error
+
+
+
+

Enumeration Cases

+ +
+

+ signature​Error +

+
+
case signatureError
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/WalletMetadata/index.html b/WalletMetadata/index.html new file mode 100644 index 00000000..a33ef844 --- /dev/null +++ b/WalletMetadata/index.html @@ -0,0 +1,309 @@ + + + + + + KukaiCoreSwift - WalletMetadata + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Wallet​Metadata +

+ +
+
public struct WalletMetadata: Codable, Hashable  
+
+
+

Object to store UI related info about wallets, seperated from the wallet object itself to avoid issues merging together

+ +
+
+ +
+ + + + + + +%271 + + + +WalletMetadata + + +WalletMetadata + + + + + +Hashable + +Hashable + + + +WalletMetadata->Hashable + + + + + +Codable + +Codable + + + +WalletMetadata->Codable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Hashable
+
+
+
+

Initializers

+ +
+

+ init(address:​hd​Wallet​Group​Name:​wallet​Nickname:​social​Username:​mainnet​Domains:​ghostnet​Domains:​social​Type:​type:​children:​is​Child:​is​Watch​Only:​bas58Encoded​Public​Key:​backed​Up:​) +

+
+
public init(address: String, hdWalletGroupName: String?, walletNickname: String? = nil, socialUsername: String? = nil, mainnetDomains: [TezosDomainsReverseRecord]? = nil, ghostnetDomains: [TezosDomainsReverseRecord]? = nil, socialType: TorusAuthProvider? = nil, type: WalletType, children: [WalletMetadata], isChild: Bool, isWatchOnly: Bool, bas58EncodedPublicKey: String, backedUp: Bool)  
+
+
+
+
+

Properties

+ +
+

+ address +

+
+
public var address: String
+
+
+
+

+ hd​Wallet​Group​Name +

+
+
public var hdWalletGroupName: String? 
+
+
+
+

+ wallet​Nickname +

+
+
public var walletNickname: String? 
+
+
+
+

+ social​Username +

+
+
public var socialUsername: String? 
+
+
+
+

+ mainnet​Domains +

+
+
public var mainnetDomains: [TezosDomainsReverseRecord]? 
+
+
+
+

+ ghostnet​Domains +

+
+
public var ghostnetDomains: [TezosDomainsReverseRecord]? 
+
+
+
+

+ social​Type +

+
+
public var socialType: TorusAuthProvider? 
+
+
+
+

+ type +

+
+
public var type: WalletType
+
+
+
+

+ children +

+
+
public var children: [WalletMetadata] 
+
+
+
+

+ is​Child +

+
+
public var isChild: Bool
+
+
+
+

+ is​Watch​Only +

+
+
public var isWatchOnly: Bool
+
+
+
+

+ bas58Encoded​Public​Key +

+
+
public var bas58EncodedPublicKey: String
+
+
+
+

+ backed​Up +

+
+
public var backedUp: Bool
+
+
+
+
+

Methods

+ +
+

+ has​Mainnet​Domain() +

+
+
public func hasMainnetDomain() -> Bool  
+
+
+
+

+ has​Ghostnet​Domain() +

+
+
public func hasGhostnetDomain() -> Bool  
+
+
+
+

+ has​Domain(on​Network:​) +

+
+
public func hasDomain(onNetwork network: TezosNodeClientConfig.NetworkType) -> Bool  
+
+
+
+

+ primary​Mainnet​Domain() +

+
+
public func primaryMainnetDomain() -> TezosDomainsReverseRecord?  
+
+
+
+

+ primary​Ghostnet​Domain() +

+
+
public func primaryGhostnetDomain() -> TezosDomainsReverseRecord?  
+
+
+
+

+ primary​Domain(on​Network:​) +

+
+
public func primaryDomain(onNetwork network: TezosNodeClientConfig.NetworkType) -> TezosDomainsReverseRecord?  
+
+
+
+

+ hash(into:​) +

+
+
public func hash(into hasher: inout Hasher)  
+
+
+
+
+

Operators

+ +
+

+ == +

+
+
public static func == (lhs: WalletMetadata, rhs: WalletMetadata) -> Bool  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/WalletMetadataList/index.html b/WalletMetadataList/index.html new file mode 100644 index 00000000..77981af0 --- /dev/null +++ b/WalletMetadataList/index.html @@ -0,0 +1,257 @@ + + + + + + KukaiCoreSwift - WalletMetadataList + + + +
+ + + KukaiCoreSwift + + Documentation + +
+ + + + + +
+
+

+ Structure + Wallet​Metadata​List +

+ +
+
public struct WalletMetadataList: Codable, Hashable  
+
+
+

Container to store groups of WalletMetadata based on type

+ +
+
+ +
+ + + + + + +%423 + + + +WalletMetadataList + + +WalletMetadataList + + + + + +Codable + +Codable + + + +WalletMetadataList->Codable + + + + + +Hashable + +Hashable + + + +WalletMetadataList->Hashable + + + + + + + + +
+

Conforms To

+
+
Codable
+
Hashable
+
+
+
+

Initializers

+ +
+

+ init(social​Wallets:​hd​Wallets:​linear​Wallets:​ledger​Wallets:​watch​Wallets:​) +

+
+
public init(socialWallets: [WalletMetadata], hdWallets: [WalletMetadata], linearWallets: [WalletMetadata], ledgerWallets: [WalletMetadata], watchWallets: [WalletMetadata])  
+
+
+
+
+

Properties

+ +
+

+ social​Wallets +

+
+
public var socialWallets: [WalletMetadata] 
+
+
+
+

+ hd​Wallets +

+
+
public var hdWallets: [WalletMetadata] 
+
+
+
+

+ linear​Wallets +

+
+
public var linearWallets: [WalletMetadata] 
+
+
+
+

+ ledger​Wallets +

+
+
public var ledgerWallets: [WalletMetadata] 
+
+
+
+

+ watch​Wallets +

+
+
public var watchWallets: [WalletMetadata] 
+
+
+
+
+

Methods

+ +
+

+ is​Empty() +

+
+
public func isEmpty() -> Bool  
+
+
+
+

+ first​Metadata() +

+
+
public func firstMetadata() -> WalletMetadata?  
+
+
+
+

+ metadata(for​Address:​) +

+
+
public func metadata(forAddress address: String) -> WalletMetadata?  
+
+
+
+

+ update(address:​with:​) +

+
+
public mutating func update(address: String, with newMetadata: WalletMetadata) -> Bool  
+
+
+
+

+ set(mainnet​Domain:​ghostnet​Domain:​for​Address:​) +

+
+
public mutating func set(mainnetDomain: TezosDomainsReverseRecord?, ghostnetDomain: TezosDomainsReverseRecord?, forAddress address: String) -> Bool  
+
+
+
+

+ set(nickname:​for​Address:​) +

+
+
public mutating func set(nickname: String?, forAddress address: String) -> Bool  
+
+
+
+

+ set(hd​Wallet​Group​Name:​for​Address:​) +

+
+
public mutating func set(hdWalletGroupName: String, forAddress address: String) -> Bool  
+
+
+
+

+ count() +

+
+
public func count() -> Int  
+
+
+
+

+ addresses() +

+
+
public func addresses() -> [String]  
+
+
+
+

+ all​Metadata(only​Seed​Based:​) +

+
+
public func allMetadata(onlySeedBased: Bool = false) -> [WalletMetadata]  
+
+
+
+ + + +
+
+ +
+

+ Generated on using swift-doc 1.0.0-rc.1. +

+
+ + diff --git a/WalletType/index.html b/WalletType/index.html index 02cb8521..58472bc1 100644 --- a/WalletType/index.html +++ b/WalletType/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -25,7 +25,7 @@ @@ -51,11 +51,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%261 +%7 @@ -105,12 +105,12 @@

Conforms To

Enumeration Cases

-
+

- linear + regular

-
case linear
+
case regular
@@ -120,6 +120,22 @@

case hd
+

+
+

+ social +

+
+
case social
+
+
+
+

+ ledger +

+
+
case ledger
+
@@ -130,7 +146,7 @@

- Generated on using swift-doc 1.0.0-rc.1. + Generated on using swift-doc 1.0.0-rc.1.

diff --git a/WalletUtils/index.html b/WalletUtils/index.html deleted file mode 100644 index 5a029d9d..00000000 --- a/WalletUtils/index.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - KukaiCoreSwift - WalletUtils - - - -
- - - KukaiCoreSwift - - Documentation - -
- - - - - -
-
-

- Structure - Wallet​Utils -

- -
-
public struct WalletUtils  
-
-
-

A collection of utility functions, not unique to any given wallet type

- -
- -
-

Methods

- -
-

- is​Mnemonic​Valid(mnemonic:​) -

-
-
public static func isMnemonicValid(mnemonic: String) -> Bool  
-
-
-

A function to check does a given mnemonic string, match the Bip39 standard.

- -
-

Parameters

- - - - - - - - - - - - - - - - -
mnemonicString

A String containing a user supplied mnemonic

-
-

Returns

-

Bool

- -
-
- - - -
-
- -
-

- Generated on using swift-doc 1.0.0-rc.1. -

-
- - diff --git a/XTZAmount/index.html b/XTZAmount/index.html index 51463042..2d94bbfd 100644 --- a/XTZAmount/index.html +++ b/XTZAmount/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -52,11 +52,11 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - + -%337 +%497 @@ -337,7 +337,7 @@

diff --git a/index.html b/index.html index a710b7af..a61fd991 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@
- + KukaiCoreSwift @@ -40,8 +40,37 @@

Classes

-

BetterCallDev (BCD) is an indexing/smart contract debugging tool, used for the Tezos blockchain. -This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app

+

BetterCallDev (BCD) is an indexer/smart contract debugging tool, used for the Tezos blockchain. +This class allows developers to interact with their API, to fetch data that would otherwise be impossible for a mobile app to fetch from the Tezos RPC

+ +
+
+ + Dip​Dup​Client + +
+
+

This client exposes functions to allow communication to the indexer platform DipDup ( https://dipdup.net/ ). +DipDup is composed of many small, dedicated indexers, powered by GraphQL. This client tries to exposes userflow functions, allowing users to accomplish tasks without having to worry about the underlying complexities

+ +
+
+ + Objkt​Client + +
+
+

Client for interacting with the API of the popular NFT marketplace, OBJKT.com +Client exposes functions for fetching metadata, pricing, purchase offers, listing etc

+ +
+
+ + Tezos​Domains​Client + +
+
+

A client class allowing integration with the tezos domains GraphQL API. See more here: https://tezos.domains/

@@ -61,17 +90,7 @@

Classes

-

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, and transactions

- -
-
- - Michelson​Factory - -
-
-

A temporary factory class (until a better solution can be found) with some helper methods for parsing / Creating Michelson objects. -Also includes quicker functions to just extract values from raw JSON, useful for processing transaction history without having to implement the entire Michelson spec

+

TzKT is an indexer for Tezos, who's API allows developers to query details about wallets, transactions, bakers, account status etc

@@ -94,87 +113,87 @@

Classes

- - TzKTTransaction + + HDWallet
-

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

- - HDWallet + + Ledger​Wallet
-

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. -You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. -In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+

A Tezos wallet class, used to cache infomration regarding the paired ledger device used to sign the payload. +This class can only be created by fetching data from a Ledger device and supplying this data to the constructor.

- - Linear​Wallet + + Operation
-

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. -You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. -In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

- - Abstract​Michelson + + Operation​Activate​Account
-

Base Michelson type, only used for polymorphism inside MichelsonPair objects

+

Operation subclass for revealing a publickey to the network.

- - Michelson​Value + + Operation​Ballot
-

A polymophic warpper around a key value pair, used in conjuction with MichelsonPair to leverage automatice JSON serialisation through Codable

+

Operation to submit a ballot on an upcoming proposal

- - Michelson​Pair + + Operation​Delegation
- +

Operation subclass for delegating an account to a baker

+
- - Operation + + Operation​Double​Baking​Evidence
-

Base class representing an Operation on the Tezos network. On its own this class can't be sent to the network. See its subclasses for more info.

+

Operation to report a baking of baking the same block twice

- - Operation​Activate​Account + + Operation​Double​Endorsement​Evidence
-

Operation subclass for revealing a publickey to the network.

+

Operation to report a baker trying to endorse a block twice

- - Operation​Delegation + + Operation​Endorsement
-

Operation subclass for delegating an account to a baker

+

Operation for endorsing a block

@@ -185,6 +204,14 @@

Classes

Operation subclass for originating a contract on the Tezos network

+
+
+ + Operation​Proposals + +
+
+
@@ -196,12 +223,12 @@

Classes

- - Operation​Smart​Contract​Invocation + + Operation​Seed​Nonce​Revelation
-

Operation subclass for calling an entrypoint of a smart contract on the Tezos network

+

Operation to reveal seed nonce to blockchain

@@ -222,6 +249,17 @@

Classes

A generic class representing an RPC call to the Tezos network. A type must be passed in when creating an instance of this object, this will be used by the network layer to parse the response and detect errors.

+ +
+ + Regular​Wallet + +
+
+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

+
@@ -244,12 +282,14 @@

Classes

- - Wallet​Cache​Item + + Torus​Wallet
-

A model to represent a Wallet in the encrypted cache

+

A Tezos Wallet used for signing transactions before sending to the Tezos network. This object holds the public and private key used to create the contained Tezos address. +You should NOT store a copy of this class in a singleton or gloabl variable of any kind. it should be created as needed and nil'd when not. +In order to help developers achieve this, use the WalletCacheService to store/retreive an encrypted copy of the wallet on disk, and recreate the Wallet.

@@ -263,12 +303,21 @@

Classes

- - Dexter​Calculation​Service + + DApp​Helper​Service + +
+
+

A Helper service to simply combine multiple calls from other services, and/or map to specific responses, in order to expose a piece of functionality provided by a dApp

+ +
+
+ + Dex​Calculation​Service
-

Wrapper around the Dexter JS library for performing calculations: https://gitlab.com/camlcase-dev/dexter-calculations/

+

Wrapper around the kukai-dex-calculations JS library for performing calculations: https://github.com/kukai-wallet/kukai-dex-calculations

@@ -298,6 +347,32 @@

Classes

An object allowing developers to automatically estimate the necessary fee per Operation to ensure it will be accpeted by a Baker. This avoids the need to ask users to enter a fee, which is not a very user friendly approach as most users wouldn't know what is required.

+ +
+ + Ledger​Service + +
+
+

A service class to wrap up all the complicated interactions with CoreBluetooth and the modified version of ledgerjs, needed to communicate with a Ledger Nano X.

+ +
+
+ + Media​Proxy​Service + +
+
+

A service class for interacting with the TC infrastructure to proxy NFT images, videos and audio files

+ +
+
+ + Content​Type​Checking​Image​Downloader + +
+
+
@@ -325,7 +400,20 @@

Classes

Taquito (https://github.com/ecadlabs/taquito) is a popular open source Tezos library written in Typescript and Javascript. Taquito is made up of many separate packages that deal with various aspects of Tezos RPC and Michelson. -This serivce class is a wrapper around a small piece of the Taquito library to expose funtionality that would otherwise be time consuming/risky/dangerous to re-implement natively.

+This serivce class is a wrapper around a small piece of the Taquito library to expose funtionality that would otherwise be time consuming/risky/dangerous to re-implement natively. +The JS can now be found on each github release here: https://github.com/ecadlabs/taquito/releases/, by extracting the zip named "taquito-local-forging-vanilla.zip"

+ +
+
+ + Torus​Auth​Service + +
+
+

TorusAuthService is a wrapper around the SDK provided by: https://tor.us/ to allow the creation of TorusWallet's. +This allows users to create a wallet from their social media accounts without having to use a seed phrase / mnemonic. +TorusAuthService allows Tezos apps to leverage this service for a number of providers, and also has the ability to query the network for someone else's wallet address, +based on their social profile. This allows you to send XTZ or tokens to your friend based on their twitter username for example

@@ -334,9 +422,9 @@

Classes

-

A service class used to store and retrieve Wallet objects such as LinearWallet and HDWallet from the devices disk. +

A service class used to store and retrieve Wallet objects such as RegularWallet, HDWallet, LedgerWallet and TorusWallet from the devices disk. This class will use the secure enclave (keychain if not available) to generate a key used to encrypt the contents locally, and retrieve. -The class can be used to take the decrypted JSON and convert it back into Wallet classes, ready to be used.

+This class will also store non senstiivve "metadata" about wallets, to allow storage of UI related data users might want to add, without cluttering up the wallet objects themselves

@@ -345,30 +433,30 @@

Classes

Structures

- - Better​Call​Dev​Client.​Constants + + Tezos​Domains​Client.​Both​Network​Reverse​Record
-

Constants for dealing with BCD API and cached data

+

Object to wrap up a response fomr both networks

- - Public​Key + + TzKTClient.​Constants
-

A struct representing a PublicKey for LinearWallet classes

+

Constants needed for interacting with the API

- - Secret​Key + + Operation​Factory.​Extractor
-

A struct representing a PrivateKey for LinearWallet classes

+

Internal Struct to encapsulate helpers methods needed to extract critical information from an array of operations, needed for processing decisions like "do i display a send token screen, or a send NFt screen", fetching total XTZ sent in 1 action etc

@@ -382,21 +470,21 @@

Structures

- - Better​Call​Dev​Account + + Aggregate​Reward​Information
-

A model matching the response that comes back from BetterCallDev's API: v1/account/<network>/<address>

+

Object ot abstract away a significatn amount of logic involved in computing estimated reward payments from a baker

- - Better​Call​Dev​Contract + + Reward​Details
-

A model matching the response that comes back from BetterCallDev's API: v1/contract/<network>/<address>

+

An individual payment record denoting some payment in the past or future

@@ -418,370 +506,968 @@

Structures

- - Better​Call​Dev​Token​Balances + + Dip​Dup​Chart​Data
-

A model matching the response that comes back from BetterCallDev's API: v1/account/<network>/<address>/token_balances

+

Struct to hold 4 arrays of data, each one mapping to a different timeline of data, to allow the display of graphs

- - Better​Call​Dev​Token​Balance + + Dip​Dup​Chart​Object
-

A model matching the internal array type that comes back from BetterCallDev's API: v1/account/<network>/<address>/token_balances

+

Structure holding a data slice

- - TzKTOperation + + Dip​Dup​Exchanges​And​Tokens​Response
-

A model matching the response that comes back from TzKT's API: v1/operations/<operation-hash>

+

Wrapper object to map to network response type

- - TzKTOperation​Error + + Dip​Dup​Exchanges​And​Tokens
-

TzKT's more basic error object response

+

Wrapper object to map to network response type

- - TzKTTransaction.​Transaction​Location + + Dip​Dup​Exchange
- +

A DipDup Exchange object with all the necessary pieces for checking liquidity and performing Swaps

+
- - TzKTTransaction.​Transaction​Parameter + + Dip​Dup​Position
- +

Wrapper object to match network response type

+
- - Blockchain​Head + + Dip​Dup​Position​Data
-

Structure representing the HEAD of the blockchain

+

A position on DipDup corresponds to liquidity token ownership. Each of these objects represents an amount of Liquidity tokens in an exchange for the given address

- - Logging​Config + + Dip​Dup​Token
-

A struct to control what messages get logged

+

DipDup representation of a Token

- - Tezos​Node​Client​Config + + TzKTAccount
-

A configuration object used to provide settings to the TezosNodeClient

+

Model mapping to TzKT.io's Account object

- - Tezos​Node​Client​Config.​default​Mainnet​URLs + + TzKTAccount​Delegate
-

Preconfigured struct with all the URL's needed to work with Tezos mainnet

+

Model mapping to TzKT.io's Account.Delegate Object

- - Tezos​Node​Client​Config.​default​Testnet​URLs + + TzKTAddress
-

Preconfigured struct with all the URL's needed to work with Tezos testnet

+

Details about a given contract

- - NFT + + TzKTBaker
-

An indiviual NFT (not the parent token/collection) holding a URI to an asset somewhere on the internet

+

Data representing a baker from TzKT or Baking-Bad

- - Network​Constants + + TzKTBaker​Config
-

The contants that a given Tezos node is using for block times, blakc size etc

+

The bakers config file for details on when fees, min delegation etc change

- - Network​Version + + TzKTBaker​Config​Double​Value
-

The version of the Tezos code being run by the given node

- +
- - Operation​Fees + + TzKTBaker​Config​Int​Value
-

A structure representing all the fees, storage and computation needed to perform an Operation

- +
- - Operation​Metadata + + TzKTBaker​Config​Reward​Struct
-

Structure representing the metadata needed by Operation's in order to comply with the RPC standards

+

Baker config payout flags

- - Operation​Payload + + TzKTBalance
-

A structure representing the request that needs to be made when sending Opertion's to the RPC

+

Model mapping to the Balance object returned from the new TzKT API, resulting from the merge of BCD and TzKT

- - Operation​Response + + TzKTBalance​Token
-

Structure representing the response returned from RPC endpoints such as .../preapply/operations

+

Model encapsulating information about the token itself

- - Operation​Response​Content + + TzKTBalance​Metadata
-

The main content of the JSON returned

+

Metadata object for the token

- - Operation​Response​Metadata + + TzKTBalance​Metadata​Attribute​Key​Value
-

The metadata belonging to the OperationResponse

+

Wrapper / Helper to extract metadata attribute content

- - Balance​Update + + TzKTBalance​Metadata​Format
-

Struct representing a change to the balance of the sender, destination or intermediary contract

+

Object containing information about the various formats the media is available in

- - Operation​Response​Result + + TzKTBalance​Metadata​Dimensions
-

The inner result key from the OeprationResponse

+

Object containing information about the dimensions of a given piece of media

- - Operation​Response​Internal​Operation + + TzKTCycle
-

Definition of the internal operation found inside OperationResponse

+

The blockchain is broken down into cycles that last 2.7 days. Baker payment logic resolves around cycles instead of blocks

- - Operation​Response​Internal​Result​Error + + TzKTDelegator​Reward
-

Definition of the outer Error object found inside OperationResponseInternalResult

+

An object containing info on the reward a delegator should receive from a baker

- - Operation​Response​Internal​Result​Error​With + + TzKTOperation
-

The error string, or micheline error object returned inside OperationResponseInternalResultError

+

A model matching the response that comes back from TzKT's API: v1/operations/<operation-hash>

- - Run​Operation​Payload + + TzKTOperation​Error
-

Payload object needed when sending operations to .../run_operation

+

TzKT's more basic error object response

- - Wallet​Utils + + TzKTToken​Transfer
-

A collection of utility functions, not unique to any given wallet type

+

FA1.2 / FA2 token transafers are treated differently from transactions. This object is used when fetching data form the API, as a temporary placeholder, ultimately to be merged into the transactions

- - Dexter​Calculation​Result + + TzKTTransaction
-

A struct to hold all the necessary calculations for a Dexter trade

+

A model matching the response that comes back from TzKT's API: v1/accounts/<address>/operations

- - Error​Response + + TzKTTransaction​Group
-

This library deals with Errors in many forms that are cumbersome to handle in client applications if passed directly. -This object seeks to wrap up all the necessary data into a single source of truth and provide access to all the necessary pieces of information

+

Artifical object used to group related transactions into a more user friendly display +For example, 1 contract call can reuslt in many transactions being returned. To avoid the users UI being clogged, we group all them into 1 group, so the user only needs to see 1 item for 1 action they performed

- - Fee​Estimator​Service.​Fee​Constants + + Blockchain​Head
-

Constants needed to compute a fee

+

Structure representing the HEAD of the blockchain

-
-

-
-

Enumerations

-
-
- - Better​Call​Dev​Client.​Better​Call​Dev​Client​Error +
+ + Logging​Config
-

Dedicated BCD errors

+

A struct to control what messages get logged

-
- - Tezos​Node​Client.​Tezos​Node​Client​Error +
+ + Tezos​Node​Client​Config
-

Types of errors

+

A configuration object used to provide settings to the TezosNodeClient

-
- - TzKTClient.​TzKTService​Error +
+ + Tezos​Node​Client​Config.​default​Mainnet​URLs
-

Unique Errors that TzKTClient can throw

+

Preconfigured struct with all the URL's needed to work with Tezos mainnet

-
- - Prefix +
+ + Tezos​Node​Client​Config.​default​Testnet​URLs
-

Prefixes needed to add to hex strings to denote elliptical curves

+

Preconfigured struct with all the URL's needed to work with Tezos testnet

-
- - Prefix.​Watermark +
+ + Quipuswap​Exchange​Ledger​Key
- +

The gneric container object holding the raw data

+
-
- - Prefix.​Keys +
+ + Quipuswap​Exchange​Ledger
- +

The unique data inside the Ledger BigMap

+
-
- - Prefix.​Keys.​Ed25519 +
+ + Quipuswap​Exchange​Storage​Response
- +

Network wrapper object

+
-
- - Prefix.​Keys.​P256 +
+ + Quipuswap​Exchange​Storage
- +

Unique Quipuswap contract storage object

+
-
- - Prefix.​Keys.​Secp256k1 +
+ + Quipuswap​Exchange​User​Rewards​Key
- +

The gneric container object holding the raw data

+
-
- - Prefix.​Address +
+ + Quipuswap​Exchange​User​Rewards
- +

The unique data inside the User Rewards BigMap

+
-
- - TzKTTransaction.​Transaction​Status +
+ + Fail​With​Parser​Liquidity​Baking
- +

Dedicated "FailWith" parser for the codes received from Liquidity Baking contract

+ +
+
+ + Graph​QLError + +
+
+

GraphQL error object

+ +
+
+ + Graph​QLResponse + +
+
+

Simple model object to wrap a GraphQL response to expose a Codable response without having to use large GraphQL libraries

+ +
+
+ + Objkt​Collections + +
+
+

GarpQL bulk response for a group of collections

+ +
+
+ + Objkt​Collection + +
+
+

Single collection item

+ +
+
+ + Objkt​Creator + +
+
+ +
+
+ + Objkt​Token​Reponse + +
+
+

GarpQL response for required data for a given token

+ +
+
+ + Objkt​Token + +
+
+

Single token item

+ +
+
+ + Objkt​Attribute + +
+
+ +
+
+ + Objkt​Attribute​Data + +
+
+ +
+
+ + Objkt​Attribute​Counts + +
+
+ +
+
+ + Objkt​Sale + +
+
+ +
+
+ + Objkt​Listing + +
+
+ +
+
+ + Objkt​Event + +
+
+

Single event item

+ +
+
+ + Objkt​Fa + +
+
+

Single FA item

+ +
+
+ + Tezos​Domains​Address​Bulk​Response + +
+
+

Response object wrapper for querying an address in bulk

+ +
+
+ + Tezos​Domains​Domains + +
+
+

Object containing an array of domains

+ +
+
+ + Tezos​Domains​Address​Response + +
+
+

Response object wrapper for querying an address

+ +
+
+ + Tezos​Domains​Domain + +
+
+

Domain object containing details about the domain

+ +
+
+ + Tezos​Domains​Domain​Response + +
+
+

Response object wrapper for querying a reverse record

+ +
+
+ + Tezos​Domains​Domain​Bulk​Response + +
+
+

Response object wrapper for querying a reverse record in bulk

+ +
+
+ + Tezos​Domains​Reverse​Records + +
+
+

Object containing an array of reverse records

+ +
+
+ + Tezos​Domains​Reverse​Record + +
+
+

Object containing all the info of the tezos domains record

+ +
+
+ + Liquidity​Baking​Data + +
+
+

Wrapper object to hold onto all the necessary data in order to work with liquidity baking contract (swap, add or remove liqudity)

+ +
+
+ + NFT + +
+
+

An indiviual NFT (not the parent token/collection) holding a URI to an asset somewhere on the internet

+ +
+
+ + Network​Constants + +
+
+

The contants that a given Tezos node is using for block times, blakc size etc

+ +
+
+ + Network​Version + +
+
+

The version of the Tezos code being run by the given node

+ +
+
+ + Nil​OnDecoding​Error + +
+
+

property wrapper to easily handle a situation where we don't want decoding to fail for 1 property which may be problematic. Instead just default it to nil

+ +
+
+ + Operation​Block​Header + +
+
+ +
+
+ + Operation​Double​Endorsement​Evidence.​Inlined​Endorsement + +
+
+

Internal struct used to amtch expected struct of data

+ +
+
+ + Operation​Double​Endorsement​Evidence.​Inlined​Endorsement.​Content + +
+
+ +
+
+ + Operation​Fees + +
+
+

A structure representing all the fees, storage and computation needed to perform an Operation

+ +
+
+ + Operation​Metadata + +
+
+

Structure representing the metadata needed by Operation's in order to comply with the RPC standards

+ +
+
+ + Operation​Payload + +
+
+

A structure representing the request that needs to be made when sending Opertion's to the RPC

+ +
+
+ + Operation​Response + +
+
+

Structure representing the response returned from RPC endpoints such as .../preapply/operations

+ +
+
+ + Operation​Response​Content + +
+
+

The main content of the JSON returned

+ +
+
+ + Operation​Response​Metadata + +
+
+

The metadata belonging to the OperationResponse

+ +
+
+ + Balance​Update + +
+
+

Struct representing a change to the balance of the sender, destination or intermediary contract

+ +
+
+ + Operation​Response​Result + +
+
+

The inner result key from the OeprationResponse

+ +
+
+ + Operation​Response​Internal​Operation + +
+
+

Definition of the internal operation found inside OperationResponse

+ +
+
+ + Operation​Response​Internal​Result​Error + +
+
+

Definition of the outer Error object found inside OperationResponseInternalResult

+ +
+
+ + Fail​With + +
+
+

The error string, error int (code), or micheline error object returned inside FailWith

+ +
+
+ + Run​Operation​Payload + +
+
+

Payload object needed when sending operations to .../run_operation

+ +
+
+ + SVGImg​Processor + +
+
+

SVG image processor for Kingfisher library

+ +
+
+ + Operation​Subscription + +
+
+

Object for sending a request through SignalR to listen to operations for a given account

+ +
+
+ + DApp​Helper​Service.​Quipuswap + +
+
+

All functions related to Quipuswap

+ +
+
+ + Dex​Swap​Calculation​Result + +
+
+

A struct to hold all the necessary calculations for a dex trade

+ +
+
+ + Dex​Add​Calculation​Result + +
+
+

A struct to hold all the necessary calculations for adding liquidity to a dex contract

+ +
+
+ + Dex​Remove​Calculation​Result + +
+
+

A struct to hold all the necessary calculations for removing liquidity from a dex contract

+ +
+
+ + Kukai​Error + +
+
+

A struct conforming to Error, attempting to handle errors from all sources (RPC, network, OS, other services/components/libraries), without the implementing code having to deal with each layer themselves. +Comes with helpers to extract meaning from RPC errors, optionally includes all the network data that caused the error for easier retrieval, and a fallback human readbale description to ensure something useful is always shown to the user.

+ +
+
+ + Fee​Estimator​Service.​Fee​Constants + +
+
+

Constants needed to compute a fee

+ +
+
+ + Fee​Estimator​Service.​Estimation​Result + +
+
+ +
+
+ + DApp + +
+
+ +
+
+ + Offline​Constants + +
+
+ +
+
+ + Operation​Service.​Ledger​Payload​Prep​Response + +
+
+

Used to return a bunch of formatted data, to make interacting with ledger sign operation easier

+ +
+
+ + Subverifier​Wrapper + +
+
+

SDK requires information about the verifer that can't be stored inside the verifier, add a wrapper object to allow passing of all the data

+ +
+
+ + Wallet​Metadata​List + +
+
+

Container to store groups of WalletMetadata based on type

+ +
+
+ + Wallet​Metadata + +
+
+

Object to store UI related info about wallets, seperated from the wallet object itself to avoid issues merging together

+ +
+
+
+
+

Enumerations

+
+
+ + Better​Call​Dev​Client.​Better​Call​Dev​Client​Error + +
+
+

Dedicated BCD errors

+ +
+
+ + Tezos​Node​Client.​Tezos​Node​Client​Error + +
+
+

Types of errors

+ +
+
+ + TzKTClient.​TzKTService​Error + +
+
+

Unique Errors that TzKTClient can throw

+ +
+
+ + Result​Extension​Error + +
+
+ +
+
+ + Dip​Dup​Exchange​Name + +
+
+

Enum to wrap up the available types of Exchange on DipDup

+ +
+
+ + Dip​Dup​Token​Standard + +
+
+

Wrapping up the FA standards into an enum

+ +
+
+ + TzKTBaker​Health + +
+
+

The stability of the bakers server

+ +
+
+ + TzKTBaker​Accuracy + +
+
+

The accuracy of the bakers payments

+ +
+
+ + TzKTBaker​Timing + +
+
+

The reliability of the bakers payouts

+ +
+
+ + TzKTTransaction.​Transaction​Status + +
+
+
@@ -826,31 +1512,47 @@

Enumerations

- - Michelson​Constant + + Biometric​Type + +
+
+ +
+
+ + Current​Device
-

Michelson constants used to denote types and values

+

Enum used to get details about the current device's capabilities

- - Michelson​Parse​Error + + HDWallet​Error
-

Custom Errors that can be returned by the decode or encode functions

+

Error types that can be passed by failable inits

- - Tezos​Chain​Name + + Operation​Ballot.​Ballot
-

A enum representing the chain name for Tezos nodes, denoting the protocol version being run or mainnet

+

Enum matching the available ballot options

+
+
+ + Operation​Block​Header.​Coding​Keys + +
+
+
@@ -869,6 +1571,14 @@

Enumerations

Enum representing the various kinds of supported Operation's

+
+
+ + Operation​Transaction​Error + +
+
+
@@ -907,39 +1617,100 @@

Enumerations

- - Mnemonic​Phrase​Length + + Wallet​Error + +
+
+

Possible error types that can occur when using the LedgerWallet

+ +
+
+ + Kukai​Error.​Error​Type
-

Helper enum used to choose the number of words for a mnemonic

+

Categories of errors that are possible

- - Elliptical​Curve + + Fee​Estimator​Service.​Fee​Estimator​Service​Error
-

Distingush between ed25519 (TZ1...) and secp256k1 (TZ2...) curves for creating and using wallet addresses

+

Various possible errors that can occur during an Estimation

- - Error​Response​Type + + Ledger​Service.​General​Error​Codes
-

High level error types, used to quickly categoise Tezos or system errors, in order to display error messages to user

+

General Ledger error codes, pulled from the source, and some additional ones added for native swift issues

- - Fee​Estimator​Service.​Fee​Estimator​Service​Error + + Ledger​Service.​Tezos​App​Error​Codes
-

Various possible errors that can occur during an Estimation

+

Dedicated error codes pulled from the Ledger tezos app

+ +
+
+ + Media​Proxy​Service​Error + +
+
+ +
+
+ + Cache​Type + +
+
+ +
+
+ + Media​Proxy​Service.​Format + +
+
+

Enum denoting the avaialble sizes for media

+ +
+
+ + Media​Proxy​Service.​Source + +
+
+

Supported source types for proxied media

+ +
+
+ + Media​Proxy​Service.​Media​Type + +
+
+

Supported media types

+ +
+
+ + Media​Proxy​Service.​Aggregated​Media​Type + +
+
+

Helper to parse a collection of media types to understand its contents

@@ -950,6 +1721,22 @@

Enumerations

Errors that can be returned by the NetworkService

+
+
+ + DApp​Category + +
+
+ +
+
+ + DApp​Access​Type + +
+
+
@@ -968,6 +1755,24 @@

Enumerations

Unique TaquitoService errors

+
+
+ + Torus​Auth​Provider + +
+
+

List of providers currently supported and available on the Tezos network

+ +
+
+ + Torus​Auth​Error + +
+
+

Custom TorusAuthService errors that cna be thrown

+
@@ -975,6 +1780,15 @@

Enumerations

Protocols

+ + Fail​With​Parser + +
+
+

Protocol to allow defining multiple dedicated structs, one for each dApp, that knows how to convert the specific failWith cases into more human readable error messages

+ +
+
Wallet @@ -996,6 +1810,24 @@

Typealiases

Create "UIImage" as typealias of NSImage

+
+
+ + Quipuswap​Exchange​Ledger​Key​Response + +
+
+

Wrapper object around the network response

+ +
+
+ + Quipuswap​Exchange​User​Rewards​Key​Response + +
+
+

Wrapper object around the network response

+
@@ -1012,15 +1844,23 @@

Typealiases

Extensions

+ AnyPublisher +
+
+
Array
- Base58 + Collection +
+
+
+ Date
- Data + DateFormatter
@@ -1028,7 +1868,31 @@

Extensions

- Sodium + Dictionary +
+
+
+ Error +
+
+
+ KeyedDecodingContainer +
+
+
+ Publisher +
+
+
+ Result +
+
+
+ String +
+
+
+ Thread
@@ -1038,7 +1902,7 @@

Extensions