TKMember

@interface TKMember : NSObject <TKRepresentable>

Represents a Member in the Token system. Each member has an active secret and public key pair that is used to perform authentication.

The class provides async API

  • id

    Member ID.

    Declaration

    Objective-C

    @property (readonly, retain, atomic) NSString *id;

    Swift

    var id: String! { get }
  • Convenience access to aliases[0].

    Declaration

    Objective-C

    @property (readonly, retain, atomic) Alias *firstAlias;

    Swift

    var firstAlias: Alias! { get }
  • Member’s aliases: emails, etc. In UI, user normally refers to member by alias.

    Declaration

    Objective-C

    @property (readonly, retain, atomic) NSArray<Alias *> *aliases;

    Swift

    var aliases: [Alias]! { get }
  • Customized authorization browser creation block.

    Declaration

    Objective-C

    @property (readonly, retain, atomic) TKBrowserFactory browserFactory;

    Swift

    var browserFactory: TKBrowserFactory! { get }
  • Creates new member instance. The method is not meant to be invoked directly. Use TokenIO or TokenIOSync to obtain an instance of this class.

    Declaration

    Objective-C

    + (TKMember *)member:(Member *)member
             tokenCluster:(TokenCluster *)tokenCluster
                useClient:(TKClient *)client
        useBrowserFactory:(TKBrowserFactory)browserFactory
                  aliases:(NSMutableArray<Alias *> *)aliases;

    Swift

    /*not inherited*/ init!(_ member: Member!, tokenCluster: TokenCluster!, use client: TKClient!, useBrowserFactory browserFactory: TKBrowserFactory!, aliases: NSMutableArray!)
  • Undocumented

    Declaration

    Objective-C

    - (TKClient *)getClient;

    Swift

    func getClient() -> TKClient!
  • Creates a representable that acts as another member using an access token.

    Declaration

    Objective-C

    - (id<TKRepresentable>)forAccessToken:(NSString *)accessTokenId;

    Swift

    func forAccessToken(_ accessTokenId: String!) -> TKRepresentable!

    Parameters

    accessTokenId

    the access token id

  • Gets public keys Array for the member.

    Declaration

    Objective-C

    - (void)getKeys:(OnSuccessWithKeys)onSuccess onError:(OnError)onError;

    Swift

    func getKeys(_ onSuccess: @escaping OnSuccessWithKeys, onError: @escaping OnError)

    Parameters

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Approves a key owned by this member. The key is added to the list of valid keys for the member.

    Declaration

    Objective-C

    - (void)approveKey:(Key *)key
             onSuccess:(OnSuccess)onSuccess
               onError:(OnError)onError;

    Swift

    func approve(_ key: Key!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    key

    to add to the approved list

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Adds a set of keys owned by this member. The keys are added to the list of valid keys for the member.

    Declaration

    Objective-C

    - (void)approveKeys:(NSArray<Key *> *)keys
              onSuccess:(OnSuccess)onSuccess
                onError:(OnError)onError;

    Swift

    func approve(_ keys: [Key]!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    keys

    to add to the approved list

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Removes a key owned by this member.

    Declaration

    Objective-C

    - (void)removeKey:(NSString *)keyId
            onSuccess:(OnSuccess)onSuccess
              onError:(OnError)onError;

    Swift

    func removeKey(_ keyId: String!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    keyId

    key ID of the key to remove

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Removes a set of keys owned by this member.

    Declaration

    Objective-C

    - (void)removeKeys:(NSArray<NSString *> *)keyIds
             onSuccess:(OnSuccess)onSuccess
               onError:(OnError)onError;

    Swift

    func removeKeys(_ keyIds: [String]!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    keyIds

    key IDs of the key to remove

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Removes all public keys that do not have a corresponding private key stored on the current device from tke member.

    Declaration

    Objective-C

    - (void)removeNonStoredKeys:(OnSuccess)onSuccess onError:(OnError)onError;

    Swift

    func removeNonStoredKeys(_ onSuccess: @escaping OnSuccess, onError: @escaping OnError)
  • Resend alias verification message (email, text, etc.).

    Declaration

    Objective-C

    - (void)resendAliasVerification:(Alias *)alias
                          onSuccess:(OnSuccessWithString)onSuccess
                            onError:(OnError)onError;

    Swift

    func resendAliasVerification(_ alias: Alias!, onSuccess: @escaping OnSuccessWithString, onError: @escaping OnError)

    Parameters

    alias

    resend verification message for this alias

    onSuccess

    invoked on success with verification ID

  • Gets aliases Array for the member.

    Declaration

    Objective-C

    - (void)getAliases:(OnSuccessWithAliases)onSuccess onError:(OnError)onError;

    Swift

    func getAliases(_ onSuccess: @escaping OnSuccessWithAliases, onError: @escaping OnError)

    Parameters

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Adds a new alias for the member.

    Declaration

    Objective-C

    - (void)addAlias:(Alias *)alias
           onSuccess:(OnSuccess)onSuccess
             onError:(OnError)onError;

    Swift

    func addAlias(_ alias: Alias!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    alias

    alias, e.g. ‘john’, must be unique

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Adds a set of aliases for the member.

    Declaration

    Objective-C

    - (void)addAliases:(NSArray<Alias *> *)aliases
             onSuccess:(OnSuccess)onSuccess
               onError:(OnError)onError;

    Swift

    func addAliases(_ aliases: [Alias]!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    aliases

    set of aliases

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Removes an alias for the member.

    Declaration

    Objective-C

    - (void)removeAlias:(Alias *)alias
              onSuccess:(OnSuccess)onSuccess
                onError:(OnError)onError;

    Swift

    func removeAlias(_ alias: Alias!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    alias

    alias, e.g. ‘john’

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Removes a set of aliases for the member.

    Declaration

    Objective-C

    - (void)removeAliases:(NSArray<Alias *> *)aliases
                onSuccess:(OnSuccess)onSuccess
                  onError:(OnError)onError;

    Swift

    func removeAliases(_ aliases: [Alias]!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    aliases

    set of aliases

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Delete the member.

    Declaration

    Objective-C

    - (void)deleteMember:(OnSuccess)onSuccess onError:(OnError)onError;

    Swift

    func delete(_ onSuccess: @escaping OnSuccess, onError: @escaping OnError)
  • Subscribes a device to receive push notifications

    Declaration

    Objective-C

    - (void)subscribeToNotifications:(NSString *)handler
                 handlerInstructions:(NSMutableDictionary<NSString *, NSString *> *)
                                         handlerInstructions
                           onSuccess:(OnSuccessWithSubscriber)onSuccess
                             onError:(OnError)onError;

    Swift

    func subscribe(toNotifications handler: String!, handlerInstructions: NSMutableDictionary!, onSuccess: @escaping OnSuccessWithSubscriber, onError: @escaping OnError)

    Parameters

    handler

    handler that will send the notifications to this subscriber

    handlerInstructions

    instructions on how to send the notification

  • Get all subscribers

    Declaration

    Objective-C

    - (void)getSubscribers:(OnSuccessWithSubscribers)onSuccess
                   onError:(OnError)onError;

    Swift

    func getSubscribers(_ onSuccess: @escaping OnSuccessWithSubscribers, onError: @escaping OnError)
  • Get a subscriber by Id

    Declaration

    Objective-C

    - (void)getSubscriber:(NSString *)subscriberId
                onSuccess:(OnSuccessWithSubscriber)onSuccess
                  onError:(OnError)onError;

    Swift

    func getSubscriber(_ subscriberId: String!, onSuccess: @escaping OnSuccessWithSubscriber, onError: @escaping OnError)

    Parameters

    subscriberId

    id of subscriber to get

  • Get all notifications

    Declaration

    Objective-C

    - (void)getNotificationsOffset:(NSString *)offset
                             limit:(int)limit
                         onSuccess:(OnSuccessWithNotifications)onSuccess
                           onError:(OnError)onError;

    Swift

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

    Parameters

    offset

    offset to start at (NULL for none)

    limit

    max number of records to return

  • Get a notification by Id

    Declaration

    Objective-C

    - (void)getNotification:(NSString *)notificationId
                  onSuccess:(OnSuccessWithNotification)onSuccess
                    onError:(OnError)onError;

    Swift

    func getNotification(_ notificationId: String!, onSuccess: @escaping OnSuccessWithNotification, onError: @escaping OnError)

    Parameters

    notificationId

    id of notification to get

  • Unsubscribes a device from push notifications

    Declaration

    Objective-C

    - (void)unsubscribeFromNotifications:(NSString *)subscriberId
                               onSuccess:(OnSuccess)onSuccess
                                 onError:(OnError)onError;

    Swift

    func unsubscribe(fromNotifications subscriberId: String!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    subscriberId

    if of subscriber to remove

  • Initiates the account linking process. The authorization browser will present and the accounts selected by user will be linked.

    Declaration

    Objective-C

    - (void)initiateAccountLinking:(NSString *)bankId
                         onSuccess:(OnSuccessWithTKAccounts)onSuccess
                           onError:(OnError)onError;

    Swift

    func initiateAccountLinking(_ bankId: String!, onSuccess: @escaping OnSuccessWithTKAccounts, onError: @escaping OnError)

    Parameters

    bankId

    bank Id

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Links a set of funding bank accounts to Token and returns it to the caller.

    Declaration

    Objective-C

    - (void)linkAccounts:(NSString *)bankId
             accessToken:(NSString *)accessToken
               onSuccess:(OnSuccessWithTKAccounts)onSuccess
                 onError:(OnError)onError;

    Swift

    func linkAccounts(_ bankId: String!, accessToken: String!, onSuccess: @escaping OnSuccessWithTKAccounts, onError: @escaping OnError)

    Parameters

    bankId

    bank ID to link

    accessToken

    bank access token, generated by the bank

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Links a set of funding bank accounts to Token and returns it to the caller.

    Declaration

    Objective-C

    - (void)linkAccounts:(BankAuthorization *)bankAuthorization
               onSuccess:(OnSuccessWithTKAccounts)onSuccess
                 onError:(OnError)onError;

    Swift

    func linkAccounts(_ bankAuthorization: BankAuthorization!, onSuccess: @escaping OnSuccessWithTKAccounts, onError: @escaping OnError)

    Parameters

    bankAuthorization

    bank authorization, generated by the bank

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Unlinks bank accounts previously linked via linkAccounts call.

    Declaration

    Objective-C

    - (void)unlinkAccounts:(NSArray<NSString *> *)accountIds
                 onSuccess:(OnSuccess)onSuccess
                   onError:(OnError)onError;

    Swift

    func unlinkAccounts(_ accountIds: [String]!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    accountIds

    account ids to unlink

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Looks up a member’s default account

    Declaration

    Objective-C

    - (void)getDefaultAccount:(OnSuccessWithTKAccount)onSuccess
                      onError:(OnError)onError;

    Swift

    func getDefaultAccount(_ onSuccess: @escaping OnSuccessWithTKAccount, onError: @escaping OnError)
  • Updates member’s default account

    Declaration

    Objective-C

    - (void)setDefaultAccount:(NSString *)accountId
                    onSuccess:(OnSuccess)onSuccess
                      onError:(OnError)onError;

    Swift

    func setDefaultAccount(_ accountId: String!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    accountId

    id of account to set to default

    onSuccess

    invoked on success

    onError

    invoked on error

  • Looks up an existing token transfer.

    Declaration

    Objective-C

    - (void)getTransfer:(NSString *)transferId
              onSuccess:(OnSuccessWithTransfer)onSuccess
                onError:(OnError)onError;

    Swift

    func getTransfer(_ transferId: String!, onSuccess: @escaping OnSuccessWithTransfer, onError: @escaping OnError)

    Parameters

    transferId

    ID of the transfer record

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Looks up existing token transfers.

    Declaration

    Objective-C

    - (void)getTransfersOffset:(NSString *)offset
                         limit:(int)limit
                     onSuccess:(OnSuccessWithTransfers)onSuccess
                       onError:(OnError)onError;

    Swift

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

    Parameters

    offset

    offset to start at (NULL for none)

    limit

    max number of records to return

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Looks up existing token transfers.

    Declaration

    Objective-C

    - (void)getTransfersOffset:(NSString *)offset
                         limit:(int)limit
                       tokenId:(NSString *)tokenId
                     onSuccess:(OnSuccessWithTransfers)onSuccess
                       onError:(OnError)onError;

    Swift

    func getTransfersOffset(_ offset: String!, limit: Int32, tokenId: String!, onSuccess: @escaping OnSuccessWithTransfers, onError: @escaping OnError)

    Parameters

    offset

    offset to start at (NULL for none)

    limit

    max number of records to return

    tokenId

    optional token id to restrict the search

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Creates a new member address.

    Declaration

    Objective-C

    - (void)addAddress:(Address *)address
              withName:(NSString *)name
             onSuccess:(OnSuccessWithAddress)onSuccess
               onError:(OnError)onError;

    Swift

    func add(_ address: Address!, withName name: String!, onSuccess: @escaping OnSuccessWithAddress, onError: @escaping OnError)

    Parameters

    name

    the name of the address

    address

    the address json

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Deletes a member address by its id.

    Declaration

    Objective-C

    - (void)deleteAddressWithId:(NSString *)addressId
                      onSuccess:(OnSuccess)onSuccess
                        onError:(OnError)onError;

    Swift

    func deleteAddress(withId addressId: String!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    addressId

    the id of the address

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Creates a new transfer token builder.

    Declaration

    Objective-C

    - (TransferTokenBuilder *)createTransferToken:(NSDecimalNumber *)amount
                                         currency:(NSString *)currency;

    Swift

    func createTransferToken(_ amount: NSDecimalNumber!, currency: String!) -> TransferTokenBuilder!

    Parameters

    amount

    lifetime amount of the token

    currency

    currency code, e.g. USD

    Return Value

    the transfer token builder

  • Creates a new access token for a list of resources.

    Declaration

    Objective-C

    - (void)createAccessToken:(AccessTokenConfig *)accessTokenConfig
                    onSuccess:(OnSuccessWithToken)onSuccess
                      onError:(OnError)onError;

    Swift

    func createAccessToken(_ accessTokenConfig: AccessTokenConfig!, onSuccess: @escaping OnSuccessWithToken, onError: @escaping OnError)

    Parameters

    accessTokenConfig

    the access token configuration object

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Cancels the existing access token and creates a replacement for it.

    Declaration

    Objective-C

    - (void)replaceAccessToken:(Token *)tokenToCancel
             accessTokenConfig:(AccessTokenConfig *)accessTokenConfig
                     onSuccess:(OnSuccessWithTokenOperationResult)onSuccess
                       onError:(OnError)onError;

    Swift

    func replaceAccessToken(_ tokenToCancel: Token!, accessTokenConfig: AccessTokenConfig!, onSuccess: @escaping OnSuccessWithTokenOperationResult, onError: @escaping OnError)

    Parameters

    tokenToCancel

    old token to cancel

    accessTokenConfig

    access token configuration to create a new token from

  • Cancels the existing access token, creates a replacement, and endorses it.

    Declaration

    Objective-C

    - (void)replaceAndEndorseAccessToken:(Token *)tokenToCancel
                       accessTokenConfig:(AccessTokenConfig *)accessTokenConfig
                               onSuccess:
                                   (OnSuccessWithTokenOperationResult)onSuccess
                                 onError:(OnError)onError;

    Swift

    func replaceAndEndorseAccessToken(_ tokenToCancel: Token!, accessTokenConfig: AccessTokenConfig!, onSuccess: @escaping OnSuccessWithTokenOperationResult, onError: @escaping OnError)

    Parameters

    tokenToCancel

    old token to cancel

    accessTokenConfig

    access token configuration to create a new token from

  • Looks up a existing transfer token.

    Declaration

    Objective-C

    - (void)getToken:(NSString *)tokenId
           onSuccess:(OnSuccessWithToken)onSuccess
             onError:(OnError)onError;

    Swift

    func getToken(_ tokenId: String!, onSuccess: @escaping OnSuccessWithToken, onError: @escaping OnError)

    Parameters

    tokenId

    token id

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Looks up a existing access token where the calling member is the grantor and the given member is the grantee.

    Declaration

    Objective-C

    - (void)getActiveAccessToken:(NSString *)toMemberId
                       onSuccess:(OnSuccessWithToken)onSuccess
                         onError:(OnError)onError;

    Swift

    func getActiveAccessToken(_ toMemberId: String!, onSuccess: @escaping OnSuccessWithToken, onError: @escaping OnError)

    Parameters

    toMemberId

    grantee of the active access token

  • Looks up transfer tokens owned by the member.

    Declaration

    Objective-C

    - (void)getTransferTokensOffset:(NSString *)offset
                              limit:(int)limit
                          onSuccess:(OnSuccessWithTokens)onSuccess
                            onError:(OnError)onError;

    Swift

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

    Parameters

    offset

    offset to start at (NULL for none)

    limit

    max number of records to return

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Looks up access tokens owned by the member.

    Declaration

    Objective-C

    - (void)getAccessTokensOffset:(NSString *)offset
                            limit:(int)limit
                        onSuccess:(OnSuccessWithTokens)onSuccess
                          onError:(OnError)onError;

    Swift

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

    Parameters

    offset

    offset to start at (NULL for none)

    limit

    max number of records to return

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Endorses the transfer token by signing it. The signature is persisted along with the token. If the member doesn’t have a sufficiently high-privilege key, this gets status TokenOperationResult_Status_MoreSignaturesNeeded and the system pushes a notification to the member prompting them to use a higher-privilege key.

    Declaration

    Objective-C

    - (void)endorseToken:(Token *)token
                 withKey:(id)keyLevel
               onSuccess:(OnSuccessWithTokenOperationResult)onSuccess
                 onError:(OnError)onError;

    Swift

    func endorseToken(_ token: Token!, withKey keyLevel: Any!, onSuccess: @escaping OnSuccessWithTokenOperationResult, onError: @escaping OnError)

    Parameters

    token

    token to endorse

    keyLevel

    key to use

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Cancels the transfer token by signing it. The signature is persisted along with the token.

    Declaration

    Objective-C

    - (void)cancelToken:(Token *)token
              onSuccess:(OnSuccessWithTokenOperationResult)onSuccess
                onError:(OnError)onError;

    Swift

    func cancel(_ token: Token!, onSuccess: @escaping OnSuccessWithTokenOperationResult, onError: @escaping OnError)

    Parameters

    token

    token to cancel

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Redeems a transfer token.

    Declaration

    Objective-C

    - (void)redeemToken:(Token *)token
              onSuccess:(OnSuccessWithTransfer)onSuccess
                onError:(OnError)onError;

    Swift

    func redeemToken(_ token: Token!, onSuccess: @escaping OnSuccessWithTransfer, onError: @escaping OnError)

    Parameters

    token

    transfer token to redeem

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Redeems a transfer token.

    Declaration

    Objective-C

    - (void)redeemToken:(Token *)token
                 amount:(NSDecimalNumber *)amount
               currency:(NSString *)currency
            description:(NSString *)description
            destination:(TransferEndpoint *)destination
              onSuccess:(OnSuccessWithTransfer)onSuccess
                onError:(OnError)onError;

    Swift

    func redeemToken(_ token: Token!, amount: NSDecimalNumber!, currency: String!, description: String!, destination: TransferEndpoint!, onSuccess: @escaping OnSuccessWithTransfer, onError: @escaping OnError)

    Parameters

    token

    transfer token to redeem

    amount

    transfer amount

    currency

    transfer currency code, e.g. EUR

    description

    transfer description

    destination

    transfer destination

    onSuccess

    callback invoked on success

    onError

    callback invoked on error

  • Uploads a blob to the server.

    Declaration

    Objective-C

    - (void)createBlob:(NSString *)ownerId
              withType:(NSString *)type
              withName:(NSString *)name
              withData:(NSData *)data
             onSuccess:(OnSuccessWithAttachment)onSuccess
               onError:(OnError)onError;

    Swift

    func createBlob(_ ownerId: String!, withType type: String!, withName name: String!, with data: Data!, onSuccess: @escaping OnSuccessWithAttachment, onError: @escaping OnError)

    Parameters

    ownerId

    owner of the blob

    type

    MIME type of the file

    name

    name of the file

    data

    binary data

    onSuccess

    invoked on success

    onError

    invoked on error

  • Gets a blob.

    Declaration

    Objective-C

    - (void)getBlob:(NSString *)blobId
          onSuccess:(OnSuccessWithBlob)onSuccess
            onError:(OnError)onError;

    Swift

    func getBlob(_ blobId: String!, onSuccess: @escaping OnSuccessWithBlob, onError: @escaping OnError)

    Parameters

    blobId

    id of the blob

    onSuccess

    invoked on success

    onError

    invoked on error

  • Gets a blob attached to a token.

    Declaration

    Objective-C

    - (void)getTokenBlob:(NSString *)tokenId
              withBlobId:(NSString *)blobId
               onSuccess:(OnSuccessWithBlob)onSuccess
                 onError:(OnError)onError;

    Swift

    func getTokenBlob(_ tokenId: String!, withBlobId blobId: String!, onSuccess: @escaping OnSuccessWithBlob, onError: @escaping OnError)

    Parameters

    tokenId

    id of the token

    blobId

    id of the blob

    onSuccess

    invoked on success

    onError

    invoked on error

  • Returns linking information for the specified bank id.

    Declaration

    Objective-C

    - (void)getBankInfo:(NSString *)bankId
              onSuccess:(OnSuccessWithBankInfo)onSuccess
                onError:(OnError)onError;

    Swift

    func getBankInfo(_ bankId: String!, onSuccess: @escaping OnSuccessWithBankInfo, onError: @escaping OnError)

    Parameters

    bankId

    the bank id

    onSuccess

    invoked on success

    onError

    invoked on error

  • Creates a fake test bank account, returns BankAuthorization for linking. Only works in test environments, not in production.

    Declaration

    Objective-C

    - (void)createTestBankAccount:(Money *)balance
                        onSuccess:(OnSuccessWithOauthBankAuthorization)onSuccess
                          onError:(OnError)onError;

    Swift

    func createTestBankAccount(_ balance: Money!, onSuccess: @escaping OnSuccessWithOauthBankAuthorization, onError: @escaping OnError)

    Parameters

    balance

    starting balance

    onSuccess

    invoked on success

    onError

    invoked on error

  • Returns profile for the given member id.

    Declaration

    Objective-C

    - (void)getProfile:(NSString *)ownerId
             onSuccess:(OnSuccessWithProfile)onSuccess
               onError:(OnError)onError;

    Swift

    func getProfile(_ ownerId: String!, onSuccess: @escaping OnSuccessWithProfile, onError: @escaping OnError)

    Parameters

    ownerId

    of the member to lookup the profile for

    onSuccess

    invoked on success

    onError

    invoked on error

  • Updates caller profile.

    Declaration

    Objective-C

    - (void)setProfile:(Profile *)profile
             onSuccess:(OnSuccessWithProfile)onSuccess
               onError:(OnError)onError;

    Swift

    func setProfile(_ profile: Profile!, onSuccess: @escaping OnSuccessWithProfile, onError: @escaping OnError)

    Parameters

    profile

    to set

    onSuccess

    invoked on success

    onError

    invoked on error

  • Returns profile picture of a given member id and size

    Declaration

    Objective-C

    - (void)getProfilePicture:(NSString *)ownerId
                         size:(id)size
                    onSuccess:(OnSuccessWithBlob)onSuccess
                      onError:(OnError)onError;

    Swift

    func getProfilePicture(_ ownerId: String!, size: Any!, onSuccess: @escaping OnSuccessWithBlob, onError: @escaping OnError)

    Parameters

    ownerId

    onwer member id

    size

    image size

    onSuccess

    invoked on success

    onError

    invoked on error

  • Set profile picture for the current user

    Declaration

    Objective-C

    - (void)setProfilePicture:(NSString *)ownerId
                     withType:(NSString *)type
                     withName:(NSString *)name
                     withData:(NSData *)data
                    onSuccess:(OnSuccess)onSuccess
                      onError:(OnError)onError;

    Swift

    func setProfilePicture(_ ownerId: String!, withType type: String!, withName name: String!, with data: Data!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    ownerId

    owner of the picture

    type

    MIME type of the file

    name

    name of the file

    data

    binary data

    onSuccess

    invoked on success

    onError

    invoked on error

  • Returns a list of paired devices for the current user

    Declaration

    Objective-C

    - (void)getPairedDevices:(OnSuccessWithPairedDevices)onSuccess
                     onError:(OnError)onError;

    Swift

    func getPairedDevices(_ onSuccess: @escaping OnSuccessWithPairedDevices, onError: @escaping OnError)

    Parameters

    onSuccess

    invoked on success with a list of paired devices

  • If more signatures is needed after endorsing a token, calls this method to notify the user to endorse the token. We expect this to happen if user tried to endorse with a low privilege key on another device.

    Declaration

    Objective-C

    - (void)triggerStepUpNotification:(NSString *)tokenId
                            onSuccess:(OnSuccessWithNotifyStatus)onSuccess
                              onError:(OnError)onError;

    Parameters

    tokenId

    id of the token to endorse

    onSuccess

    invoked on success with notify status

  • If more signatures is needed after getting balance, calls this method to notify the user to renew the access. We expect this to happen if user tried to get balance with a low privilege key on another device.

    Declaration

    Objective-C

    - (void)triggerBalanceStepUpNotification:(NSArray<NSString *> *)accountIds
                                   onSuccess:(OnSuccessWithNotifyStatus)onSuccess
                                     onError:(OnError)onError;

    Parameters

    accountIds

    ids of the accounts to get balances

    onSuccess

    invoked on success with notify status

  • If more signatures is needed after getting transaction, calls this method to notify the user to renew the access. We expect this to happen if user tried to get transaction with a low privilege key on another device.

    Declaration

    Objective-C

    - (void)triggerTransactionStepUpNotification:(NSString *)transactionId
                                       accountID:(NSString *)accountId
                                       onSuccess:
                                           (OnSuccessWithNotifyStatus)onSuccess
                                         onError:(OnError)onError;

    Parameters

    transactionId

    id of the transaction to get transaction

    accountId

    the account id of transaction to get transaction

    onSuccess

    invoked on success with notify status

  • To grant access to balances or transactions, a device will need to apply SCA with standard key.

    Declaration

    Objective-C

    - (void)ApplySca:(NSArray<NSString *> *)accountIds
           onSuccess:(OnSuccess)onSuccess
             onError:(OnError)onError;

    Swift

    func applySca(_ accountIds: [String]!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    accountIds

    account ids for applying SCA

  • Sign with a Token signature a token request state payload.

    Declaration

    Objective-C

    - (void)signTokenRequestState:(NSString *)tokenRequestId
                          tokenId:(NSString *)tokenId
                            state:(NSString *)state
                        onSuccess:(OnSuccessWithSignature)onSuccess
                          onError:(OnError)onError;

    Swift

    func signTokenRequestState(_ tokenRequestId: String!, tokenId: String!, state: String!, onSuccess: @escaping OnSuccessWithSignature, onError: @escaping OnError)

    Parameters

    tokenRequestId

    token request id

    tokenId

    token id

    state

    state

  • Stores a token request.

    Declaration

    Objective-C

    - (void)storeTokenRequest:(TokenPayload *)tokenPayload
                      options:(NSDictionary<NSString *, NSString *> *)options
                    onSuccess:(OnSuccessWithString)onSuccess
                      onError:(OnError)onError;

    Swift

    func storeTokenRequest(_ tokenPayload: TokenPayload!, options: [String : String]! = [:], onSuccess: @escaping OnSuccessWithString, onError: @escaping OnError)

    Parameters

    tokenPayload

    transfer token payload

    options

    map of options

  • Replaces the member’s receipt contact.

    Declaration

    Objective-C

    - (void)setReceiptContact:(ReceiptContact *)receiptContact
                    onSuccess:(OnSuccess)onSuccess
                      onError:(OnError)onError;

    Swift

    func setReceiptContact(_ receiptContact: ReceiptContact!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)

    Parameters

    receiptContact

    receipt contact to set

  • Gets the member’s receipt contact.

    Declaration

    Objective-C

    - (void)getReceiptContact:(OnSuccessWithReceiptContact)onSuccess
                      onError:(OnError)onError;

    Swift

    func getReceiptContact(_ onSuccess: @escaping OnSuccessWithReceiptContact, onError: @escaping OnError)
  • Marks a member as a trusted beneficiary.

    Declaration

    Objective-C

    - (void)addTrustedBeneficiary:(NSString *)memberId
                        onSuccess:(OnSuccess)onSuccess
                          onError:(OnError)onError;

    Swift

    func addTrustedBeneficiary(_ memberId: String!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)
  • Removes a trusted beneficiary.

    Declaration

    Objective-C

    - (void)removeTrustedBeneficiary:(NSString *)memberId
                           onSuccess:(OnSuccess)onSuccess
                             onError:(OnError)onError;

    Swift

    func removeTrustedBeneficiary(_ memberId: String!, onSuccess: @escaping OnSuccess, onError: @escaping OnError)
  • Gets a list of all the user’s trusted beneficiaries.

    Declaration

    Objective-C

    - (void)getTrustedBeneficiaries:(OnSuccessWithTrustedBeneficiaries)onSuccess
                            onError:(OnError)onError;

    Swift

    func getTrustedBeneficiaries(_ onSuccess: @escaping OnSuccessWithTrustedBeneficiaries, onError: @escaping OnError)