AccountApi
@interface AccountApi : NodeDependant
Provides access to Textile account related APIs
-
Declaration
Objective-C
- (nonnull NSString *)address;
Swift
func address() -> String
Return Value
The address of the Textile account
-
Declaration
Objective-C
- (nonnull NSString *)seed;
Swift
func seed() -> String
Return Value
The seed of the Textile account
-
Encrypt raw data with the account private key
Declaration
Objective-C
- (nullable NSData *)encrypt:(nonnull NSData *)data error:(NSError *_Nullable *_Nullable)error;
Swift
func encrypt(_ data: Data) throws -> Data
Parameters
data
The data to encrypt
error
A reference to an error pointer that will be set in the case of an error
Return Value
The encrypted data
-
Decrypt encrypted data using the account private key
Declaration
Objective-C
- (nullable NSData *)decrypt:(nonnull NSData *)data error:(NSError *_Nullable *_Nullable)error;
Swift
func decrypt(_ data: Data) throws -> Data
Parameters
data
The encrypted data
error
A reference to an error pointer that will be set in the case of an error
Return Value
The decrypted data
-
Declaration
Objective-C
- (id)contact:(NSError *_Nullable *_Nullable)error;
Swift
func contact() throws -> Any
Parameters
error
Error a reference to an error pointer that will be set in the case of an error
Return Value
The Contact object representing the Textile account
-
Syncs the local node account with all thread snapshots found on the network
Declaration
Objective-C
- (id)sync:(id)options error:(NSError *_Nullable *_Nullable)error;
Swift
func sync(_ options: Any!) throws -> Any
Parameters
options
The query options to configure the behavior of the account sync
error
A reference to an error pointer that will be set in the case of an error
Return Value
A handle that can be used to cancel the account sync