![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@front-finance/frontfinance-rn-sdk
Advanced tools
As of Dec 7, 2023 this package is no longer maintained and has been superseded by a new version. For the latest features, improvements, and bug fixes, please use our updated package: mesh-react-native-sdk.
We encourage all users to migrate to the new package for continued support and updates.
With npm
:
npm install --save @front-finance/frontfinance-rn-sdk
With yarn
:
yarn add @front-finance/frontfinance-rn-sdk
💡 This package requires react-native-webview
to be installed in your project. Although it is listed as direct dependency, some times it is not installed automatically (This is a known npm issue). You should install it manually via following command in this case:
npm install --save react-native-webview@11.26.0
# or with yarn
yarn add react-native-webview@11.26.0
linkToken
The connection link token should be obtained from the Get link token endpoint. Request must be performed from the server side because it requires the client secret. You will get the response in the following format:
You should use content --> linkToken
from this response to run the FrontFinance
component.
here is an example http request using request
API in JS:
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/*+json',
'X-Client-Secret': 'XXXX', // replace with your client secret
'X-Client-Id': 'XXXX' // replace with your client id
},
body: '{"userId":"XXXX"}' // replace with your user id (could be user email or phone number)
};
const getLinkToken = async () => {
const response = await fetch('https://integration-api.getfront.com/api/v1/linktoken', options);
const json = await response.json();
return json?.content?.linkToken;
};
You will get a response in the following structure:
{
"content": {
"linkToken": "REQUESTED_LINK_TOKEN"
},
"status": "ok",
"message": "",
"errorType": ""
}
FrontFinance
componentimport React from 'react';
import {
FrontFinance,
FrontPayload,
TransferFinishedPayload,
TransferFinishedSuccessPayload,
TransferFinishedErrorPayload
} from '@front-finance/frontfinance-rn-sdk';
export const App = () => {
return (
<FrontFinance
linkToken={"YOUR_LINKTOKEN"}
onBrokerConnected={(payload: FrontPayload) => {
// use broker account data
}}
onTransferFinished={(payload: TransferFinishedPayload) => {
if (payload.status === 'success') {
const successPayload = payload as TransferFinishedSuccessPayload
// use transfer finished data
} else {
const errorPayload = payload as TransferFinishedErrorPayload
// handle transfer error
}
}}
onClose={() => {
// use close event
}}
onError={(err: string) => {
// use error message
}}
/>
)
}
export default App;
ℹ️ See full source code examples at examples/.
FrontFinance
component argumentskey | type | Required/Optional | description |
---|---|---|---|
url | string @deprecated (use linkToken instead) | required (if linkToken is not provided) | Connection catalog link |
linkToken | string | required | link token |
onBrokerConnected | (payload: FrontPayload) => void | optional | Callback called when users connects their accounts |
onTransferFinished | (payload: TransferFinishedPayload) => void | optional | Callback called when a crypto transfer is executed |
onError | (err: string) => void) | optional | Called if connection not happened. Returns an error message |
onClose | () => void | optional | Called at the end of the connection, or when user closed the connection page |
You can use broker tokens to perform requests to get current balance, assets and execute transactions. Full API reference can be found here.
Typescript definitions for @front-finance/frontfinance-rn-sdk
are built into the npm package.
FAQs
Front Finance React Native SDK.
The npm package @front-finance/frontfinance-rn-sdk receives a total of 12 weekly downloads. As such, @front-finance/frontfinance-rn-sdk popularity was classified as not popular.
We found that @front-finance/frontfinance-rn-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.