2.1.2 • Published 5 months ago

fish2chain v2.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

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) //调用参数由后端返回
2.1.2

5 months ago

2.1.1

5 months ago

2.0.9

5 months ago

2.1.0

5 months ago

2.0.8

5 months ago

2.0.3

5 months ago

2.0.2

5 months ago

2.0.5

5 months ago

2.0.4

5 months ago

2.0.7

5 months ago

2.0.6

5 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.1.7

5 months ago

1.1.6

5 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

11 months ago

1.1.0

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago