Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@meshconnect/react-native-link-sdk
Advanced tools
Readme
React Native library for integrating with Mesh Connect.
With npm
:
npm install --save @meshconnect/react-native-link-sdk
With yarn
:
yarn add @meshconnect/react-native-link-sdk
💡 This package requires react-native-webview
to be installed in your project. 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
# or with yarn
yarn add react-native-webview
Link token should be obtained from the POST /api/v1/linktoken endpoint. API reference for this request is available here. The request must be performed from the server side because it requires the client's secret. You will get the response in the following format:
{
"content": {
"linkToken": "{linkToken}"
},
"status": "ok",
"message": ""
}
import React from 'react';
import {
LinkConnect,
LinkPayload,
LinkSettings,
LinkEventType,
IntegrationAccessToken,
TransferFinishedPayload,
TransferFinishedSuccessPayload,
TransferFinishedErrorPayload
} from '@meshconnect/react-native-link-sdk';
const accessTokens: IntegrationAccessToken = [
/* Your access tokens */
];
const transferDestinationTokens: IntegrationAccessToken = [
/* Your transfer destination tokens */
];
const linkSettings: LinkSettings = {
accessTokens,
transferDestinationTokens,
};
export const App = () => {
return (
<LinkConnect
linkToken={"YOUR_LINKTOKEN"}
settings={linkSettings}
onIntegrationConnected={(payload: LinkPayload) => {
// 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
}
}}
onEvent={(event: LinkEventType) => {
console.log(event);
}}
onExit={(err?: string) => {
// use error message
}}
/>
)
}
export default App;
ℹ️ See full source code examples at examples/.
LinkConnect
component argumentskey | type | Required/Optional | description |
---|---|---|---|
linkToken | string | required | Link token |
settings | LinkSettings | optional | Settings object |
onIntegrationConnected | (payload: LinkPayload) => void | optional | Callback called when users connects their accounts |
onTransferFinished | (payload: TransferFinishedPayload) => void | optional | Callback called when a crypto transfer is executed |
onExit | (err: string) => void) | optional | Called if connection not happened. Returns an error message |
onEvent | (event: LinkEventType) => void | optional | Callback called when an event is triggered |
The LinkSettings
option allows to configure the Link behaviour:
accessTokens
- an array of IntegrationAccessToken
objects that is used as an origin for crypto transfer flow.transferDestinationTokens
- an array of IntegrationAccessToken
objects that is used as a destination for crypto transfer flow.In Mesh Connect React Native SDK v2, url
prop is removed from LinkConnect
component. You should use linkToken
prop instead of url
prop.
orError
and onClose
props are combined with onExit
callback with an optional error message argument.
Following are the renamed props:
onBrokerConnected
-> onIntegrationConnected
FrontPayload
-> LinkPayload
The component FrontFinance
is renamed to LinkConnect
.
Typescript definitions for @meshconnect/react-native-link-sdk
are built into the npm package.
FAQs
Mesh Connect React Native SDK.
The npm package @meshconnect/react-native-link-sdk receives a total of 18 weekly downloads. As such, @meshconnect/react-native-link-sdk popularity was classified as not popular.
We found that @meshconnect/react-native-link-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.