ZcashSDK
public class ZcashSDK
Wrapper for all the constant values in the SDK. It is important that these values stay fixed for all users of the SDK. Otherwise, if individual wallet makers are using different values, it becomes easier to reduce privacy by segmenting the anonymity set of users, particularly as it relates to network requests.
-
Miner’s fee in zatoshi.
Declaration
Swift
public static let MINERS_FEE_ZATOSHI: BlockHeight
-
The number of zatoshi that equal 1 ZEC.
Declaration
Swift
public static let ZATOSHI_PER_ZEC: BlockHeight
-
The height of the first sapling block. When it comes to shielded transactions, we do not need to consider any blocks prior to this height, at all.
Declaration
Swift
public static let SAPLING_ACTIVATION_HEIGHT: BlockHeight
-
The theoretical maximum number of blocks in a reorg, due to other bottlenecks in the protocol design.
Declaration
Swift
public static let MAX_REORG_SIZE: Int
-
The amount of blocks ahead of the current height where new transactions are set to expire. This value is controlled by the rust backend but it is helpful to know what it is set to and should be kept in sync.
Declaration
Swift
public static let EXPIRY_OFFSET: Int
-
Default size of batches of blocks to request from the compact block service.
Declaration
Swift
public static let DEFAULT_BATCH_SIZE: Int
-
Default amount of time, in in seconds, to poll for new blocks. Typically, this should be about half the average block time.
Declaration
Swift
public static let DEFAULT_POLL_INTERVAL: TimeInterval
-
Default attempts at retrying.
Declaration
Swift
public static let DEFAULT_RETRIES: Int
-
The default maximum amount of time to wait during retry backoff intervals. Failed loops will never wait longer than this before retyring.
Declaration
Swift
public static let DEFAULT_MAX_BACKOFF_INTERVAL: TimeInterval
-
Default number of blocks to rewind when a chain reorg is detected. This should be large enough to recover from the reorg but smaller than the theoretical max reorg size of 100.
Declaration
Swift
public static let DEFAULT_REWIND_DISTANCE: Int
-
The number of blocks to allow before considering our data to be stale. This usually helps with what to do when returning from the background and is exposed via the Synchronizer’s isStale function.
Declaration
Swift
public static let DEFAULT_STALE_TOLERANCE: Int
-
Default Name for LibRustZcash data.db
Declaration
Swift
public static let DEFAULT_DATA_DB_NAME: String
-
Default Name for Compact Block caches db
Declaration
Swift
public static let DEFAULT_CACHES_DB_NAME: String
-
Default name for pending transactions db
Declaration
Swift
public static let DEFAULT_PENDING_DB_NAME: String
-
Undocumented
Declaration
Swift
public static let DEFAULT_DB_NAME_PREFIX: String
-
File name for the sapling spend params
Declaration
Swift
public static let SPEND_PARAM_FILE_NAME: String
-
File name for the sapling output params
Declaration
Swift
public static let OUTPUT_PARAM_FILE_NAME: String
-
The Url that is used by default in zcashd. We’ll want to make this externally configurable, rather than baking it into the SDK but this will do for now, since we’re using a cloudfront URL that already redirects.
Declaration
Swift
public static let CLOUD_PARAM_DIR_URL: String
-
Undocumented
Declaration
Swift
public static let isMainnet: Bool