@onramper/onramper-react-native 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +2 -0
  3. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  4. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftinterface +28 -3
  5. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK +0 -0
  6. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/PrivacyInfo.xcprivacy +36 -0
  7. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/PrivacyInfo.xcprivacy +36 -0
  8. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
  9. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2660 -2517
  10. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  11. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +28 -3
  12. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  13. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +28 -3
  14. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK +0 -0
  15. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/PrivacyInfo.xcprivacy +36 -0
  16. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/PrivacyInfo.xcprivacy +36 -0
  17. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
  18. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2660 -2517
  19. package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/OnramperSDK.yml +2627 -2484
  20. package/ios/HybridOnramperNitro.swift +20 -4
  21. package/ios/OnramperCheckoutBridge.swift +33 -0
  22. package/lib/commonjs/OnramperClient.js +12 -2
  23. package/lib/commonjs/OnramperClient.js.map +1 -1
  24. package/lib/module/OnramperClient.js +12 -2
  25. package/lib/module/OnramperClient.js.map +1 -1
  26. package/lib/typescript/commonjs/src/OnramperClient.d.ts +12 -2
  27. package/lib/typescript/commonjs/src/OnramperClient.d.ts.map +1 -1
  28. package/lib/typescript/commonjs/src/index.d.ts +1 -1
  29. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  30. package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts +1 -1
  31. package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
  32. package/lib/typescript/commonjs/src/types.d.ts +7 -0
  33. package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
  34. package/lib/typescript/module/src/OnramperCheckoutButtonView.d.ts +1 -1
  35. package/lib/typescript/module/src/OnramperCheckoutButtonView.d.ts.map +1 -1
  36. package/lib/typescript/module/src/OnramperClient.d.ts +14 -4
  37. package/lib/typescript/module/src/OnramperClient.d.ts.map +1 -1
  38. package/lib/typescript/module/src/OnramperNative.d.ts +1 -1
  39. package/lib/typescript/module/src/OnramperNative.d.ts.map +1 -1
  40. package/lib/typescript/module/src/events.d.ts +2 -2
  41. package/lib/typescript/module/src/events.d.ts.map +1 -1
  42. package/lib/typescript/module/src/index.d.ts +8 -8
  43. package/lib/typescript/module/src/index.d.ts.map +1 -1
  44. package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts +1 -1
  45. package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
  46. package/lib/typescript/module/src/types.d.ts +8 -1
  47. package/lib/typescript/module/src/types.d.ts.map +1 -1
  48. package/nitrogen/generated/ios/c++/HybridOnramperNitroSpecSwift.hpp +2 -2
  49. package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec.swift +1 -1
  50. package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec_cxx.swift +2 -2
  51. package/nitrogen/generated/shared/c++/HybridOnramperNitroSpec.hpp +1 -1
  52. package/package.json +3 -3
  53. package/src/OnramperClient.ts +17 -1
  54. package/src/index.ts +1 -0
  55. package/src/specs/OnramperNitro.nitro.ts +5 -2
  56. package/src/types.ts +25 -0
@@ -42,8 +42,11 @@ export interface OnramperNitro extends HybridObject<{ ios: 'swift' }> {
42
42
  // Fetches checkout requirements + quote, stores the SDK's SwiftUI checkout
43
43
  // button under a handle, and returns the handle + JSON-encoded quote. The
44
44
  // OnramperCheckoutButton Nitro view renders the stored button by handle.
45
- // `requestJson` is a JSON CheckoutRequest; `styleJson` a JSON CheckoutButtonStyle.
46
- getCheckoutRequirements(requestJson: string, styleJson: string): Promise<PreparedIntentResult>;
45
+ // `requestJson` is a JSON CheckoutRequest; `prefillJson` a JSON
46
+ // OnramperUserPrefill (`{}` when the caller supplied none); `styleJson` a JSON
47
+ // CheckoutButtonStyle. Argument order mirrors the SDK's
48
+ // `getCheckoutRequirements(_:prefill:buttonStyle:)`.
49
+ getCheckoutRequirements(requestJson: string, prefillJson: string, styleJson: string): Promise<PreparedIntentResult>;
47
50
  cancelPreparedIntent(intentHandle: string): Promise<void>;
48
51
 
49
52
  // Single native callback per stream; the JS wrapper fans out to multiple listeners.
package/src/types.ts CHANGED
@@ -69,6 +69,31 @@ export interface QuoteResponse {
69
69
  recommendations?: string[];
70
70
  }
71
71
 
72
+ // Mirrors Swift `OnramperUserPrefill`. Values you already know about the user,
73
+ // used to pre-populate the OnramperID sign-in and additional-info screens.
74
+ // Every field is optional — supply only what you know.
75
+ //
76
+ // Prefill is **best-effort and never blocks sign-in**: if it can't be applied,
77
+ // the login flow opens without it. Nothing surfaces to your app, and there is
78
+ // no error to handle.
79
+ //
80
+ // `email` is the *binding identity*, not merely another prefilled value. When
81
+ // it matches the account that signs in, the remaining values may be applied
82
+ // automatically; when it does not match, the whole prefill is dropped — which
83
+ // is strictly worse than omitting `email`, where the values are still offered
84
+ // to the user for confirmation. Supply it only when you're confident it's the
85
+ // address the user will sign in with.
86
+ //
87
+ // Prefill is enabled per integration — talk to your Onramper representative
88
+ // before relying on it.
89
+ export interface OnramperUserPrefill {
90
+ email?: string;
91
+ firstName?: string;
92
+ lastName?: string;
93
+ /** E.164 format, e.g. `+3712345678`. Always a candidate — the user still verifies it. */
94
+ phoneNumber?: string;
95
+ }
96
+
72
97
  export interface CheckoutButtonStyle {
73
98
  backgroundColor?: string; // hex #RRGGBB or #RRGGBBAA
74
99
  foregroundColor?: string;