@funkit/connect-rn 4.0.0 → 4.1.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.
- package/CHANGELOG.md +35 -0
- package/dist/{chunk-V4LN3XNI.js → chunk-EZBXZZJG.js} +2 -2
- package/dist/{chunk-OI54J6E6.js → chunk-SCMY3DZK.js} +2 -2
- package/dist/chunk-SCMY3DZK.js.map +7 -0
- package/dist/clients/lighter.js +1 -1
- package/dist/clients/nado.js +2 -2
- package/dist/index.js +557 -449
- package/dist/index.js.map +4 -4
- package/dist/src/fiat/providers/adapter.d.ts +21 -0
- package/dist/src/fiat/providers/adapter.d.ts.map +1 -0
- package/dist/src/fiat/providers/transakApplePay.d.ts +4 -0
- package/dist/src/fiat/providers/transakApplePay.d.ts.map +1 -0
- package/dist/src/fiat/renderCaptureSurface.d.ts +3 -7
- package/dist/src/fiat/renderCaptureSurface.d.ts.map +1 -1
- package/dist/src/fiat/stepDetails.d.ts +9 -0
- package/dist/src/fiat/stepDetails.d.ts.map +1 -1
- package/dist/src/flow/DepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/FeeDetailsSheet.d.ts +18 -0
- package/dist/src/flow/FeeDetailsSheet.d.ts.map +1 -0
- package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/depositFlowConfig.d.ts +4 -4
- package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
- package/dist/src/identity/IdentityContext.d.ts +4 -4
- package/dist/src/identity/IdentityContext.d.ts.map +1 -1
- package/dist/src/utils/formatAmount.d.ts +2 -0
- package/dist/src/utils/formatAmount.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-OI54J6E6.js.map +0 -7
- /package/dist/{chunk-V4LN3XNI.js.map → chunk-EZBXZZJG.js.map} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Surface, SurfaceResult } from '@funkit/connect-core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/** What the screen lends a surface for as long as it runs. */
|
|
4
|
+
export interface SurfaceContext {
|
|
5
|
+
placement: 'INLINE' | 'SCREEN';
|
|
6
|
+
onReady: () => void;
|
|
7
|
+
/** The provider gave up on this attempt; its machine will not recover. */
|
|
8
|
+
onFailed: (code: string) => void;
|
|
9
|
+
report: (result: SurfaceResult) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Claims a surface and returns its renderer, or declines it.
|
|
13
|
+
*
|
|
14
|
+
* Each adapter narrows `params` itself: the contract says `provider` never
|
|
15
|
+
* narrows their shape, so one vendor can carry two vocabularies and the pair
|
|
16
|
+
* `(kind, provider)` plus a shape check is the whole match. Returning the
|
|
17
|
+
* renderer bound to the narrowed params is what keeps that type inside the
|
|
18
|
+
* adapter instead of in a union the registry would have to carry.
|
|
19
|
+
*/
|
|
20
|
+
export type SurfaceAdapter = (surface: Surface) => ((context: SurfaceContext) => ReactNode) | undefined;
|
|
21
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/fiat/providers/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,0EAA0E;IAC1E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;CACxC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,OAAO,KACb,CAAC,CAAC,OAAO,EAAE,cAAc,KAAK,SAAS,CAAC,GAAG,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transakApplePay.d.ts","sourceRoot":"","sources":["../../../../src/fiat/providers/transakApplePay.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AA6C/C,mEAAmE;AACnE,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAA"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import type { Surface
|
|
1
|
+
import type { Surface } from '@funkit/connect-core';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import type { SurfaceContext } from './providers/adapter';
|
|
3
4
|
export declare function supportsCaptureSurface(surface: Surface): boolean;
|
|
4
|
-
export declare function renderCaptureSurface({ surface,
|
|
5
|
+
export declare function renderCaptureSurface({ surface, ...context }: SurfaceContext & {
|
|
5
6
|
surface: Surface;
|
|
6
|
-
placement: 'INLINE' | 'SCREEN';
|
|
7
|
-
onReady: () => void;
|
|
8
|
-
/** The provider gave up on this attempt; its machine will not recover. */
|
|
9
|
-
onFailed: (code: string) => void;
|
|
10
|
-
report: (result: SurfaceResult) => void;
|
|
11
7
|
}): ReactNode;
|
|
12
8
|
//# sourceMappingURL=renderCaptureSurface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderCaptureSurface.d.ts","sourceRoot":"","sources":["../../../src/fiat/renderCaptureSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"renderCaptureSurface.d.ts","sourceRoot":"","sources":["../../../src/fiat/renderCaptureSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAkB,cAAc,EAAE,MAAM,qBAAqB,CAAA;AA0BzE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEhE;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,GAAG,OAAO,EACX,EAAE,cAAc,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAEnD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FiatFlow, Quote } from '@funkit/connect-core';
|
|
2
2
|
import type { TFunction } from 'i18next';
|
|
3
|
+
import type { FeeDetailsRow } from '../screens/FeeDetailsScreen';
|
|
3
4
|
/**
|
|
4
5
|
* The live quote's fee, worded exactly as the static step words its computed
|
|
5
6
|
* one. The screen fades the whole line while a re-quote is due, so there is
|
|
@@ -15,4 +16,12 @@ export declare function recoveryCta(flow: FiatFlow, t: TFunction): {
|
|
|
15
16
|
} | undefined;
|
|
16
17
|
/** The refreshed price a post-KYC review carries. */
|
|
17
18
|
export declare function reviewDetail(flow: FiatFlow): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The quote's fee breakdown, as the disclosure drawer's rows. The fee is inside
|
|
21
|
+
* the charge, not added to it: `fiat.amount` is what the card is billed and the
|
|
22
|
+
* crypto is priced on what's left, so the amount row is the remainder and the
|
|
23
|
+
* total is the charge itself. The provider's own labels render — the ids it
|
|
24
|
+
* keys them by have no entry in this package's catalogue.
|
|
25
|
+
*/
|
|
26
|
+
export declare function quoteFeeRows(quote: Quote | undefined, t: TFunction): FeeDetailsRow[];
|
|
18
27
|
//# sourceMappingURL=stepDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepDetails.d.ts","sourceRoot":"","sources":["../../../src/fiat/stepDetails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"stepDetails.d.ts","sourceRoot":"","sources":["../../../src/fiat/stepDetails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIhE;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,SAAS,CAQpB;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CACzB,IAAI,EAAE,QAAQ,EACd,CAAC,EAAE,SAAS,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,GAAG,SAAS,CASpD;AAED,qDAAqD;AACrD,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAM/D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,CAAC,EAAE,SAAS,GACX,aAAa,EAAE,CAoCjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositAmountStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositAmountStep.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAU5B;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,wBAAwB,CAAA;IAChC,SAAS,EAAE,oBAAoB,CAAA;CAChC,+BAoHA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type NestedSheet } from '../hooks/useNestedSheet';
|
|
2
|
+
import { type FeeDetailsRow } from '../screens/FeeDetailsScreen';
|
|
3
|
+
/** The drawer's own state, plus the fee line's press handler. */
|
|
4
|
+
export declare function useFeeDetailsSheet(): {
|
|
5
|
+
sheet: NestedSheet<'feeDetails'>;
|
|
6
|
+
openFeeDetails: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The fee-disclosure drawer as the amount screens present it: a nested sheet
|
|
10
|
+
* over the entry screen, opened from its fee line.
|
|
11
|
+
*/
|
|
12
|
+
export declare function FeeDetailsSheet({ sheet, rows, summary, }: {
|
|
13
|
+
sheet: NestedSheet<'feeDetails'>;
|
|
14
|
+
rows: FeeDetailsRow[];
|
|
15
|
+
/** Omitted when the rail's fee can't be worded (no method name, no rate). */
|
|
16
|
+
summary?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=FeeDetailsSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeeDetailsSheet.d.ts","sourceRoot":"","sources":["../../../src/flow/FeeDetailsSheet.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,yBAAyB,CAAA;AAE1E,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAA;AAUpC,iEAAiE;AACjE,wBAAgB,kBAAkB,IAAI;IACpC,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;IAChC,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B,CAWA;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,OAAO,GACR,EAAE;IACD,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;IAChC,IAAI,EAAE,aAAa,EAAE,CAAA;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,+BA2DA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FiatDepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/FiatDepositAmountStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FiatDepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/FiatDepositAmountStep.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACf,MAAM,qBAAqB,CAAA;AAiB5B,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,IAAI,EACJ,cAAc,EACd,gBAAgB,EAChB,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,wBAAwB,CAAA;IAChC,IAAI,EAAE,cAAc,CAAA;IACpB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,+BAiBA"}
|
|
@@ -51,11 +51,11 @@ export interface ChainOption {
|
|
|
51
51
|
*/
|
|
52
52
|
export interface DepositAmountEntryConfig {
|
|
53
53
|
/**
|
|
54
|
-
* Fee charged on the entered amount, as a fraction (0.005 = 0.5%).
|
|
55
|
-
* {@link fiat} configured the displayed fee comes from live quotes
|
|
56
|
-
*
|
|
54
|
+
* Fee charged on the entered amount, as a fraction (0.005 = 0.5%). Omit it
|
|
55
|
+
* with {@link fiat} configured — the displayed fee comes from live quotes
|
|
56
|
+
* there. Without `fiat` an omitted rate shows no fee at all.
|
|
57
57
|
*/
|
|
58
|
-
feeRate
|
|
58
|
+
feeRate?: number;
|
|
59
59
|
/**
|
|
60
60
|
* The payment rail the fee belongs to, e.g. `Apple Pay`. Names the rail in
|
|
61
61
|
* the fee-details drawer's written summary; without it the drawer opens on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAA;AAE5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,2BAA2B,EAAE,GAAG,SAAS,EACrD,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,2BAA2B,GAAG,SAAS,CAczC;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAA;AAE5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,2BAA2B,EAAE,GAAG,SAAS,EACrD,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,2BAA2B,GAAG,SAAS,CAczC;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAA;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,qEAAqE;IACrE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,MAAM,CAAA;QACb,kDAAkD;QAClD,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,SAAS,CAAA;QAClB,kEAAkE;QAClE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACrB,CAAA;IACD,oDAAoD;IACpD,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,wDAAwD;IACxD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,2BAA2B,EAAE,CAAA;IAC5D;;;;;OAKG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,yDAAyD;AACzD,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7C"}
|
|
@@ -18,8 +18,8 @@ export interface FunkitIdentity {
|
|
|
18
18
|
prefillFiatEmail?: string;
|
|
19
19
|
/** See {@link FunkitConfig.hideCryptoDeposit}. Defaulted to false here. */
|
|
20
20
|
hideCryptoDeposit: boolean;
|
|
21
|
-
/** See {@link FunkitConfig.
|
|
22
|
-
|
|
21
|
+
/** See {@link FunkitConfig.getIdentityAssertion}. */
|
|
22
|
+
getIdentityAssertion?: () => Promise<string>;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Host-facing identity config, mirroring the identity-relevant subset of the
|
|
@@ -59,8 +59,8 @@ export interface FunkitConfig {
|
|
|
59
59
|
* Read through `useFunkitBranding`, not identity.
|
|
60
60
|
*/
|
|
61
61
|
hideAttribution?: boolean;
|
|
62
|
-
/** Mints the short-lived
|
|
63
|
-
|
|
62
|
+
/** Mints the short-lived identity assertion required by fiat requests. */
|
|
63
|
+
getIdentityAssertion?: () => Promise<string>;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Stands in for `walletAddress` when the host supplies none. Not a valid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityContext.d.ts","sourceRoot":"","sources":["../../../src/identity/IdentityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAIjE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAA;IACrB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,2EAA2E;IAC3E,iBAAiB,EAAE,OAAO,CAAA;IAC1B,
|
|
1
|
+
{"version":3,"file":"IdentityContext.d.ts","sourceRoot":"","sources":["../../../src/identity/IdentityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAIjE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAA;IACrB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,2EAA2E;IAC3E,iBAAiB,EAAE,OAAO,CAAA;IAC1B,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAC7C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAC7C;AAgBD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAA;AASxC;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAQ1E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,cAAc,CAchB;AAID,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,cAAc,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACpB,+BAMA;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAQlD"}
|
|
@@ -23,4 +23,6 @@ export declare const ASSET_DECIMALS = 5;
|
|
|
23
23
|
export declare function formatTokenAmount(amount: string, maxDecimals?: number): string;
|
|
24
24
|
/** `99.94` → `$99.94`. Two decimals, as every USD figure in the design is. */
|
|
25
25
|
export declare function formatUsd(value: number): string;
|
|
26
|
+
/** `99.94, 'AUD'` → `A$99.94`. Fiat amounts are not always dollars. */
|
|
27
|
+
export declare function formatFiat(value: number, currency: string): string;
|
|
26
28
|
//# sourceMappingURL=formatAmount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatAmount.d.ts","sourceRoot":"","sources":["../../../src/utils/formatAmount.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIrD;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,MAAuB,GACnC,MAAM,CAKR;AAED,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
|
1
|
+
{"version":3,"file":"formatAmount.d.ts","sourceRoot":"","sources":["../../../src/utils/formatAmount.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIrD;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,MAAuB,GACnC,MAAM,CAKR;AAED,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAcD,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIlE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect-rn",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "React Native bindings for @funkit/connect. Re-exports the headless @funkit/connect-core logic; the RN platform halves (Restyle theme, WebView Swapped transport, Transfer/Swapped screens, logging) land in later releases.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@shopify/restyle": "^2.4.5",
|
|
39
39
|
"@transak/ui-components-core": "0.5.0",
|
|
40
40
|
"colord": "2.10.0",
|
|
41
|
-
"@funkit/
|
|
42
|
-
"@funkit/connect-core": "
|
|
43
|
-
"@funkit/
|
|
41
|
+
"@funkit/api-base": "8.0.0",
|
|
42
|
+
"@funkit/connect-core": "5.0.0",
|
|
43
|
+
"@funkit/chains": "2.3.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@gorhom/bottom-sheet": ">=5",
|