1.1.8 • Published 10 months ago
vvbridge v1.1.8
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
- Arrange 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 requestreturn( <FetcchButton requestId="" action="" name="" secretKey="" /> )
- Import FetcchButton component from the package
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
Troubleshooting
Demo
Changelog
License
1.1.8
10 months ago
1.1.7
10 months ago
1.1.6
10 months ago
1.1.5
10 months ago
1.1.4
10 months ago
1.1.3
10 months ago
1.1.2
10 months ago
1.1.1
10 months ago
1.1.0
10 months ago
1.0.9
10 months ago
1.0.8
10 months ago
1.0.7
10 months ago
1.0.6
10 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago
0.0.4
10 months ago
0.0.3
10 months ago
0.0.2
10 months ago
0.0.1
10 months ago