@onramper/onramper-react-native 1.0.1 → 1.1.1
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.
- package/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/ios/Frameworks/OnramperSDK.xcframework/Info.plist +5 -5
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftinterface +57 -26
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2578 -2513
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +57 -26
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +57 -26
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2578 -2513
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/OnramperSDK.yml +2545 -2482
- package/ios/OnramperCheckoutBridge.swift +3 -1
- package/ios/OnramperSDKBridge.swift +39 -2
- package/lib/typescript/commonjs/src/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +19 -14
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperCheckoutButtonView.d.ts +1 -1
- package/lib/typescript/module/src/OnramperCheckoutButtonView.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperClient.d.ts +3 -3
- package/lib/typescript/module/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperNative.d.ts +1 -1
- package/lib/typescript/module/src/OnramperNative.d.ts.map +1 -1
- package/lib/typescript/module/src/events.d.ts +2 -2
- package/lib/typescript/module/src/events.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +8 -8
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +20 -15
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +2 -1
- package/src/types.ts +50 -23
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.1.0]
|
|
6
|
+
|
|
7
|
+
Bundles `OnramperSDK@1.1.0`. The SDK is pre-adoption, so breaking changes ship within the 1.x line.
|
|
8
|
+
|
|
9
|
+
### Changed (breaking)
|
|
10
|
+
- `QuoteResponse` is now success-only: `quoteId`, `ramp`, `rate`, `payout`, `paymentMethod`, `networkFee`, and `transactionFee` are non-optional, and `errors` / the `QuoteError` type are removed. `getCheckoutRequirements()` rejects with `OnramperError` (e.g. `quoteUnavailable`) when a quote can't be priced, rather than resolving with a partial quote.
|
|
11
|
+
- `CheckoutRequest.destination` is now required (was optional).
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Phone **reverification**: a `reverification` member on the `CheckoutRequirement` union (`field`, `requiredRecencyDays`, `lastVerifiedAt`), surfaced through the existing OnramperID flow — the native button handles it automatically. `requirementSatisfied` reports each resolved requirement type.
|
|
15
|
+
- `amountLimitSatisfied` on the `amount_limit` requirement.
|
|
16
|
+
- `UserInfoField.satisfied` and the typed `UserInfoFieldType` union (was `string`).
|
|
17
|
+
- New `docs/TYPE_REFERENCE.md` consolidating every client-facing type.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- `CheckoutRequirement` is now serialized by the native bridge in the flat `{ type, ...fields }` shape the TypeScript union declares (previously the Swift `Codable` nesting `{ type, requirement: {...} }` leaked through).
|
|
21
|
+
|
|
5
22
|
## [1.0.0] — 2026-05-20
|
|
6
23
|
|
|
7
24
|
### Added
|
package/README.md
CHANGED
|
@@ -10,15 +10,18 @@
|
|
|
10
10
|
<key>DebugSymbolsPath</key>
|
|
11
11
|
<string>dSYMs</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>ios-
|
|
13
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>OnramperSDK.framework</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
17
17
|
<array>
|
|
18
18
|
<string>arm64</string>
|
|
19
|
+
<string>x86_64</string>
|
|
19
20
|
</array>
|
|
20
21
|
<key>SupportedPlatform</key>
|
|
21
22
|
<string>ios</string>
|
|
23
|
+
<key>SupportedPlatformVariant</key>
|
|
24
|
+
<string>simulator</string>
|
|
22
25
|
</dict>
|
|
23
26
|
<dict>
|
|
24
27
|
<key>BinaryPath</key>
|
|
@@ -26,18 +29,15 @@
|
|
|
26
29
|
<key>DebugSymbolsPath</key>
|
|
27
30
|
<string>dSYMs</string>
|
|
28
31
|
<key>LibraryIdentifier</key>
|
|
29
|
-
<string>ios-
|
|
32
|
+
<string>ios-arm64</string>
|
|
30
33
|
<key>LibraryPath</key>
|
|
31
34
|
<string>OnramperSDK.framework</string>
|
|
32
35
|
<key>SupportedArchitectures</key>
|
|
33
36
|
<array>
|
|
34
37
|
<string>arm64</string>
|
|
35
|
-
<string>x86_64</string>
|
|
36
38
|
</array>
|
|
37
39
|
<key>SupportedPlatform</key>
|
|
38
40
|
<string>ios</string>
|
|
39
|
-
<key>SupportedPlatformVariant</key>
|
|
40
|
-
<string>simulator</string>
|
|
41
41
|
</dict>
|
|
42
42
|
</array>
|
|
43
43
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -119,11 +119,12 @@ extension OnramperSDK.OnramperDelegate {
|
|
|
119
119
|
public struct CheckoutFinalizeRequest : Swift.Codable, Swift.Sendable {
|
|
120
120
|
public let headlessCheckoutId: Swift.String
|
|
121
121
|
public let quote: OnramperSDK.QuoteResponse
|
|
122
|
+
public let encryption: OnramperSDK.EncryptedPayload
|
|
122
123
|
public let onramperTransactionData: OnramperSDK.OnramperTransactionData
|
|
123
124
|
public var requirementCompletions: [OnramperSDK.RequirementCompletion]?
|
|
124
125
|
public var partnerContext: Swift.String?
|
|
125
126
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
126
|
-
public init(headlessCheckoutId: Swift.String, quote: OnramperSDK.QuoteResponse, onramperTransactionData: OnramperSDK.OnramperTransactionData, requirementCompletions: [OnramperSDK.RequirementCompletion]? = nil, partnerContext: Swift.String? = nil)
|
|
127
|
+
public init(headlessCheckoutId: Swift.String, quote: OnramperSDK.QuoteResponse, encryption: OnramperSDK.EncryptedPayload, onramperTransactionData: OnramperSDK.OnramperTransactionData, requirementCompletions: [OnramperSDK.RequirementCompletion]? = nil, partnerContext: Swift.String? = nil)
|
|
127
128
|
#endif
|
|
128
129
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
129
130
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -184,7 +185,7 @@ public struct CheckoutIntentRequest : Swift.Codable, Swift.Sendable {
|
|
|
184
185
|
}
|
|
185
186
|
public struct OnramperTransactionData : Swift.Codable, Swift.Sendable {
|
|
186
187
|
public let source: Swift.String
|
|
187
|
-
public var destination: Swift.String
|
|
188
|
+
public var destination: Swift.String
|
|
188
189
|
public let amount: Swift.Double
|
|
189
190
|
public let type: OnramperSDK.TransactionType
|
|
190
191
|
public let country: Swift.String?
|
|
@@ -192,7 +193,7 @@ public struct OnramperTransactionData : Swift.Codable, Swift.Sendable {
|
|
|
192
193
|
public let paymentMethod: Swift.String
|
|
193
194
|
public let wallet: OnramperSDK.WalletInfo
|
|
194
195
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
195
|
-
public init(source: Swift.String, destination: Swift.String
|
|
196
|
+
public init(source: Swift.String, destination: Swift.String, amount: Swift.Double, type: OnramperSDK.TransactionType, country: Swift.String? = nil, subdivision: Swift.String? = nil, paymentMethod: Swift.String, wallet: OnramperSDK.WalletInfo)
|
|
196
197
|
#endif
|
|
197
198
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
198
199
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -210,9 +211,10 @@ public struct WalletInfo : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
|
210
211
|
}
|
|
211
212
|
public struct CheckoutIntentResponse : Swift.Codable, Swift.Sendable {
|
|
212
213
|
public let quote: OnramperSDK.QuoteResponse
|
|
214
|
+
public let encryption: OnramperSDK.EncryptedPayload
|
|
213
215
|
public let headlessCheckoutId: Swift.String
|
|
214
216
|
public let checkoutRequirements: [OnramperSDK.CheckoutRequirement]
|
|
215
|
-
public init(quote: OnramperSDK.QuoteResponse, headlessCheckoutId: Swift.String, checkoutRequirements: [OnramperSDK.CheckoutRequirement])
|
|
217
|
+
public init(quote: OnramperSDK.QuoteResponse, encryption: OnramperSDK.EncryptedPayload, headlessCheckoutId: Swift.String, checkoutRequirements: [OnramperSDK.CheckoutRequirement])
|
|
216
218
|
public init(from decoder: any Swift.Decoder) throws
|
|
217
219
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
218
220
|
}
|
|
@@ -220,6 +222,7 @@ public enum CheckoutRequirementType : Swift.String, Swift.Codable, Swift.Sendabl
|
|
|
220
222
|
case tos
|
|
221
223
|
case amountLimit
|
|
222
224
|
case userInfo
|
|
225
|
+
case reverification
|
|
223
226
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
224
227
|
public init?(rawValue: Swift.String)
|
|
225
228
|
#endif
|
|
@@ -268,12 +271,13 @@ public struct AmountLimitRequirement : Swift.Codable, Swift.Sendable, Swift.Equa
|
|
|
268
271
|
public let providerId: Swift.String
|
|
269
272
|
public let minAmountLimit: Swift.Double?
|
|
270
273
|
public let maxAmountLimit: Swift.Double?
|
|
274
|
+
public let amountLimitSatisfied: Swift.Bool
|
|
271
275
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
272
|
-
public init(providerId: Swift.String, minAmountLimit: Swift.Double? = nil, maxAmountLimit: Swift.Double? = nil)
|
|
276
|
+
public init(providerId: Swift.String, minAmountLimit: Swift.Double? = nil, maxAmountLimit: Swift.Double? = nil, amountLimitSatisfied: Swift.Bool)
|
|
273
277
|
#endif
|
|
278
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
274
279
|
public static func == (a: OnramperSDK.AmountLimitRequirement, b: OnramperSDK.AmountLimitRequirement) -> Swift.Bool
|
|
275
280
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
276
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
277
281
|
}
|
|
278
282
|
public enum UserInfoFieldType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
279
283
|
case firstName
|
|
@@ -312,10 +316,34 @@ public struct UserInfoRequirement : Swift.Codable, Swift.Sendable, Swift.Equatab
|
|
|
312
316
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
313
317
|
public init(from decoder: any Swift.Decoder) throws
|
|
314
318
|
}
|
|
319
|
+
public enum ReverificationField : Swift.String, Swift.Codable, Swift.Sendable {
|
|
320
|
+
case email
|
|
321
|
+
case phone
|
|
322
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
323
|
+
public init?(rawValue: Swift.String)
|
|
324
|
+
#endif
|
|
325
|
+
public typealias RawValue = Swift.String
|
|
326
|
+
public var rawValue: Swift.String {
|
|
327
|
+
get
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
public struct ReverificationRequirement : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
331
|
+
public let providerId: Swift.String
|
|
332
|
+
public let field: OnramperSDK.ReverificationField
|
|
333
|
+
public let requiredRecencyDays: Swift.Int
|
|
334
|
+
public let lastVerifiedAt: Swift.String?
|
|
335
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
336
|
+
public init(providerId: Swift.String, field: OnramperSDK.ReverificationField, requiredRecencyDays: Swift.Int, lastVerifiedAt: Swift.String? = nil)
|
|
337
|
+
#endif
|
|
338
|
+
public static func == (a: OnramperSDK.ReverificationRequirement, b: OnramperSDK.ReverificationRequirement) -> Swift.Bool
|
|
339
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
340
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
341
|
+
}
|
|
315
342
|
public enum CheckoutRequirement : Swift.Sendable, Swift.Equatable {
|
|
316
343
|
case tos(OnramperSDK.ToSRequirement)
|
|
317
344
|
case amountLimit(OnramperSDK.AmountLimitRequirement)
|
|
318
345
|
case userInfo(OnramperSDK.UserInfoRequirement)
|
|
346
|
+
case reverification(OnramperSDK.ReverificationRequirement)
|
|
319
347
|
public var type: OnramperSDK.CheckoutRequirementType {
|
|
320
348
|
get
|
|
321
349
|
}
|
|
@@ -325,18 +353,28 @@ extension OnramperSDK.CheckoutRequirement : Swift.Codable {
|
|
|
325
353
|
public init(from decoder: any Swift.Decoder) throws
|
|
326
354
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
327
355
|
}
|
|
356
|
+
public struct EncryptedPayload : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
357
|
+
public let v: Swift.Int
|
|
358
|
+
public let alg: Swift.String
|
|
359
|
+
public let iv: Swift.String
|
|
360
|
+
public let ciphertext: Swift.String
|
|
361
|
+
public let authTag: Swift.String
|
|
362
|
+
public init(v: Swift.Int, alg: Swift.String, iv: Swift.String, ciphertext: Swift.String, authTag: Swift.String)
|
|
363
|
+
public static func == (a: OnramperSDK.EncryptedPayload, b: OnramperSDK.EncryptedPayload) -> Swift.Bool
|
|
364
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
365
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
366
|
+
}
|
|
328
367
|
public struct QuoteResponse : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
329
|
-
public let quoteId: Swift.String
|
|
330
|
-
public let ramp: Swift.String
|
|
331
|
-
public let rate: Swift.Double
|
|
332
|
-
public let
|
|
333
|
-
public let
|
|
334
|
-
public let
|
|
335
|
-
public let
|
|
368
|
+
public let quoteId: Swift.String
|
|
369
|
+
public let ramp: Swift.String
|
|
370
|
+
public let rate: Swift.Double
|
|
371
|
+
public let payout: Swift.Double
|
|
372
|
+
public let paymentMethod: Swift.String
|
|
373
|
+
public let networkFee: Swift.Double
|
|
374
|
+
public let transactionFee: Swift.Double
|
|
336
375
|
public let recommendations: [Swift.String]?
|
|
337
|
-
public let errors: [OnramperSDK.QuoteError]?
|
|
338
376
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
339
|
-
public init(quoteId: Swift.String
|
|
377
|
+
public init(quoteId: Swift.String, ramp: Swift.String, rate: Swift.Double, payout: Swift.Double, paymentMethod: Swift.String, networkFee: Swift.Double, transactionFee: Swift.Double, recommendations: [Swift.String]? = nil)
|
|
340
378
|
#endif
|
|
341
379
|
public static func == (a: OnramperSDK.QuoteResponse, b: OnramperSDK.QuoteResponse) -> Swift.Bool
|
|
342
380
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
@@ -353,16 +391,6 @@ public enum TransactionType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
|
353
391
|
get
|
|
354
392
|
}
|
|
355
393
|
}
|
|
356
|
-
public struct QuoteError : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
357
|
-
public let type: Swift.String?
|
|
358
|
-
public let message: Swift.String?
|
|
359
|
-
#if compiler(>=5.3) && $NonescapableTypes
|
|
360
|
-
public init(type: Swift.String? = nil, message: Swift.String? = nil)
|
|
361
|
-
#endif
|
|
362
|
-
public static func == (a: OnramperSDK.QuoteError, b: OnramperSDK.QuoteError) -> Swift.Bool
|
|
363
|
-
public func encode(to encoder: any Swift.Encoder) throws
|
|
364
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
365
|
-
}
|
|
366
394
|
public enum CheckoutPaymentType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
367
395
|
case applePay
|
|
368
396
|
case revolutPay
|
|
@@ -385,7 +413,7 @@ public enum RenderType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
|
385
413
|
get
|
|
386
414
|
}
|
|
387
415
|
}
|
|
388
|
-
@_hasMissingDesignatedInitializers @_Concurrency.MainActor final public class OnramperClient :
|
|
416
|
+
@_hasMissingDesignatedInitializers @_Concurrency.MainActor final public class OnramperClient : Combine.ObservableObject {
|
|
389
417
|
@Combine.Published @_projectedValueProperty($state) @_Concurrency.MainActor final public var state: OnramperSDK.OnramperState {
|
|
390
418
|
get
|
|
391
419
|
}
|
|
@@ -530,6 +558,9 @@ extension OnramperSDK.CheckoutRequirementType : Swift.RawRepresentable {}
|
|
|
530
558
|
extension OnramperSDK.UserInfoFieldType : Swift.Equatable {}
|
|
531
559
|
extension OnramperSDK.UserInfoFieldType : Swift.Hashable {}
|
|
532
560
|
extension OnramperSDK.UserInfoFieldType : Swift.RawRepresentable {}
|
|
561
|
+
extension OnramperSDK.ReverificationField : Swift.Equatable {}
|
|
562
|
+
extension OnramperSDK.ReverificationField : Swift.Hashable {}
|
|
563
|
+
extension OnramperSDK.ReverificationField : Swift.RawRepresentable {}
|
|
533
564
|
extension OnramperSDK.TransactionType : Swift.Equatable {}
|
|
534
565
|
extension OnramperSDK.TransactionType : Swift.Hashable {}
|
|
535
566
|
extension OnramperSDK.TransactionType : Swift.RawRepresentable {}
|
|
Binary file
|