TKAccount

@interface TKAccount : NSObject

Represents a funding account in the Token system.

The class provides async API

  • Owner member.

    Declaration

    Objective-C

    @property (readonly, nonatomic) TKMemberSync *member;

    Swift

    var member: TKMemberSync! { get }
  • id

    Id by which Token system identifies this account.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *id;

    Swift

    var id: String! { get }
  • Human-readable name. For example, could be Checking account with number ending -2718.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *name;

    Swift

    var name: String! { get }
  • Id by which Token system identifies this account’s bank.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *bankId;

    Swift

    var bankId: String! { get }
  • Flag indicating whether the account needs re-linking.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isLocked;

    Swift

    var isLocked: Bool { get }
  • Flag indicating whether the account can send payments.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL supportsSendPayment;

    Swift

    var supportsSendPayment: Bool { get }
  • Flag indicating whether the account can receive payments.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL supportsReceivePayment;

    Swift

    var supportsReceivePayment: Bool { get set }
  • Flag indicating whether the account allows for retrieval of information.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL supportsInformation;

    Swift

    var supportsInformation: Bool { get }
  • Flag indicating whether the account requires external authorization for creating transfers.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL requiresExternalAuth;

    Swift

    var requiresExternalAuth: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    + (TKAccount *)account:(Account *)account
                        of:(TKMemberSync *)member
                 useClient:(TKClient *)client;

    Swift

    /*not inherited*/ init!(_ account: Account!, of member: TKMemberSync!, use client: TKClient!)
  • Looks up account balance.

    Declaration

    Objective-C

    - (void)getBalance:(OnSuccessWithTKBalance)onSuccess onError:(OnError)onError;

    Swift

    func getBalance(_ onSuccess: @escaping OnSuccessWithTKBalance, onError: @escaping OnError)

    Parameters

    onSuccess

    invoked on success

    onError

    invoked on error

  • Looks up an existing transaction. Doesn’t have to be a transaction for a token transfer.

    Declaration

    Objective-C

    - (void)getTransaction:(NSString *)transactionId
                 onSuccess:(OnSuccessWithTransaction)onSuccess
                   onError:(OnError)onError;

    Swift

    func getTransaction(_ transactionId: String!, onSuccess: @escaping OnSuccessWithTransaction, onError: @escaping OnError)

    Parameters

    transactionId

    ID of the transaction

    onSuccess

    invoked on success

    onError

    invoked on error

  • Looks up existing transactions. This is a full list of transactions with token transfers being a subset.

    Declaration

    Objective-C

    - (void)getTransactionsOffset:(NSString *)offset
                            limit:(int)limit
                        onSuccess:(OnSuccessWithTransactions)onSuccess
                          onError:(OnError)onError;

    Swift

    func getTransactionsOffset(_ offset: String!, limit: Int32, onSuccess: @escaping OnSuccessWithTransactions, onError: @escaping OnError)

    Parameters

    offset

    offset to start at (NULL for none)

    limit

    max number of records to return

    onSuccess

    invoked on success

    onError

    invoked on error