vvbridge
v1.1.8
Published
- Crypto deposits are a serious vulnerability since they entail numerous actions such as selecting an asset, copying the address, manually pasting the address, inputting the deposit amount, and finally depositing. Fetcch kit substitutes this slow paced mu
Downloads
58
Readme
fetcch-kit
Introduction
- Crypto deposits are a serious vulnerability since they entail numerous actions such as selecting an asset, copying the address, manually pasting the address, inputting the deposit amount, and finally depositing. Fetcch kit substitutes this slow paced multi-step deposit with quick secure deposits enabled by links, qr codes and requests directly to ids. Fetcch provides a deposit widget that may be used to receive deposits in a secure manner by centralised exchanges, institutional clients, otc, and so on.
Installation
Install via npm:
npm i @fetcch/kit
Install via pnpm:
pnpm i @fetcch/kit
Install via yarn:
yarn add @fetcch/kit
Usage
- Acquire Secret Key (contact @sk1122_ on twitter)
- Creating transaction request
Arrange transaction request
{ "receiver": "string", "payer": "string", //optional "actions": [ { "type": "PAYMENT", "data": { "token": "string", "chain": number, "receiver": "string", "amount": { "amount": "string" // in lowest denominator, "currency": "CRYPTO" } } } ], "message": "string", "label": "string" }
Generate message by making post call to
https://staging-api.fetcch.xyz/v1/transaction-request/generate-message
Create transaction request by making post call to
https://staging-api.fetcch.xyz/v1/transaction-request
Detailed guide - https://docs.fetcch.xyz/how-to-integrate/guides/transaction-requests/how-to-create-transaction-request
- Integrating deposit widget
Import FetcchButton component from the package
import FetcchButton from "@fetcch/kit"
Render FetcchButton component and configure it with following params
requestId
: Id of transaction request createdaction
: Type of operation to be performedname
: Label or identifier for the specific use casesecretKey
: API keys for authenticating request
return( <FetcchButton requestId="" action="" name="" secretKey="" /> )
Example
"use client"
import FetcchButton from "@fetcch/kit"
export const FButton = (params: { id: string }) => {
return (
<FetcchButton requestId={params.id} action="Deposit" name="Fetcch OTC" secretKey={process.env.NEXT_PUBLIC_FETCCH_API_KEY as string} />
)
}
Contributing
- Create a issue followed by a pull request on → https://github.com/fetcchx/fetcch-kit
API Documentation
- https://docs.fetcch.xyz/how-to-integrate/quickstart
Troubleshooting
- https://docs.fetcch.xyz/how-to-integrate/api-reference/troubleshooting-errors
Demo
- https://institutions.fetcch.xyz/
Changelog
- https://www.npmjs.com/package/@fetcch/kit?activeTab=versions