April 10th, 2024

This release includes support for React Native SDK for User-Controlled Wallet.

Added

React Native SDK

React Native SDK available on npm.

  • init: (configuration: Configuration) => Promise<void>
    • Configure the Circle endpoint for SDK to connect, reject Promise if the endpoint and appId’s format are invalid.
  • setSecurityQuestions: (securityQuestions: SecurityQuestion[]) => void
    • Set the security question list, throw Throwable when the SecurityQuestion array is empty or contains any question whose title length is not 2~512.
  • addListener: (listener: EventListener) => void
    • Register an EventListener for the app to handle events, e.g. forgot PIN.
  • removeAllListeners: () => void
    • Unregister all EventListener.
  • execute: ( userToken: string, encryptionKey: string, challengeIds: string[], successCallback: SuccessCallback, errorCallback: ErrorCallback ) => void
    • Execute the operations by challengeId and trigger the SuccessCallback with SuccessResult after sending the request to Circle endpoint successfully.
      ErrorCallback will be triggered when parameters are null or invalid.
  • executeWithKeyShare: ( userToken: string, encryptionKey: string, pinCodeDeviceShare: string, challengeIds: string[], successCallback: SuccessCallback, errorCallback: ErrorCallback ) => void
    • Execute the operations by challengeId and PIN code device share and trigger the SuccessCallback with SuccessResult after sending the request to Circle endpoint successfully.
      ErrorCallback will be triggered when parameters are null or invalid.
  • getDeviceId: () => string?
  • setDismissOnCallbackMap: (map: Map<ErrorCode, boolean>) => void
    • The SDK UI can be dismissed if there's an error or warning during execute() and setBiometricsPin(). App can specify ErrorCode as true in the map to dismiss.
  • moveTaskToFront: () => void
    • Bring the SDK UI to foreground. After calling moveRnTaskToFront() and finishing the flow on React Native UI, e.g. forgot PIN flow, apps can back to SDK UI by calling moveTaskToFront() and continue the SDK task.
  • moveRnTaskToFront: () => void
    • Bring the React Native Activity / ViewController to front. In some cases, apps may need to go back to React Native UI during execute() or setBiometricsPin, e.g., receive an error, warning or event like forgotPin.
  • setTextConfigsMap: (map: Map<TextsKey, TextConfig[]>) => void
    • Define strings with specific configurations for special text customization.
      All keys are listed in A Index Table.`
  • setIconTextConfigsMap: ( map: Map<IconTextsKey, Array<IconTextConfig>> ) => void
    • Define icon and string sets with specific configurations for icon text list item customization.
  • setTextConfigMap: (map: Map<TextKey, TextConfig>) => void
    • Define strings with specific configurations for general string customization. It will replace values.
  • setImageMap: (map: Map<ImageKey, ImageSourcePropType>) => void
    • Define image resource for image customization.
  • setDateFormat: (format: DateFormat) => void
    • Set display date format, e.g. the answer of a security question in which inputType is datePicker.
    • The default format is “YYYY-MM-DD”.
  • setDebugging: (debugging: boolean) => void
    • Android only.
    • True: default value, check customization map value and print warn level log.
    • False: skip checking and turn off the log.
  • setCustomUserAgent: (userAgent: string) => void
    • Set custom user agent value.
  • setErrorStringMap: (map: Map<ErrorCode, string) => void
    • Define error message for customization.

Updated

iOS SDK