2.1.2 • Published 6 months ago

fish2chain v2.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 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

6 months ago

2.1.1

6 months ago

2.0.9

6 months ago

2.1.0

6 months ago

2.0.8

6 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.5

6 months ago

2.0.4

6 months ago

2.0.7

6 months ago

2.0.6

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

12 months ago

1.1.4

12 months ago

1.1.3

12 months ago

1.1.2

12 months ago

1.1.1

12 months ago

1.1.0

12 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago