Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

fish2chain

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fish2chain

# 使用说明

latest
npmnpm
Version
2.1.4
Version published
Maintainers
1
Created
Source

fish2chain

使用说明

安装

npm install fish2chain

使用

//ton
import {TonConnector} from "fish2chain"
const connecter = new TonConnector(  )
connecter.init(connectUi, function(address:string){}, function(err:error){})

//line
import {LineConnector} from "fish2chain"

const isInline = LineConnector.isInLineClient()

const connecter = new LineConnector(  )
await connecter.init("liffid", function(address:string){}, function(err:error){})

//load https://static.kaiawallet.io/js/dapp-portal-sdk-1.2.5.js
const sdk = await window.DappPortalSdk.init({clientId:"xxxxx", chainId:"1001"})
connecter.setDappPortalSdk(sdk)


const accessToken = connecter.getAccessToken()

支付crypto

//在line上,金额无用,可传空字符串
chainTool.payCrypto("0.1(金额)", "订单号或其他表示该次付款的唯一标识" ).then((hash)=>{

}).catch((er)=>{

})

地址转换

chainTool.addressToFriendly("hexAddress")

claim

chainTool.checkin(tgid) //等待后端checkin成功回调通知,没通知就没有成功

withdraw

chainTool.withdraw(payload, withdrawAmount, nonce, expireTime, signure) //调用参数由后端返回

FAQs

Package last updated on 27 May 2025

Did you know?

Socket

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.

Install

Related posts