@txdev/0x-js
v3.1.2
Published
Javascript SDK for the NFT Market
Downloads
6
Readme
0x-js
清理代码,清理ABI文件
hh node --fork https://bsc-dataseed1.defibit.io/ --fork-block-number 14272336
参考: https://polygonscan.com/address/0x1119e3e8919d68366f56b74445ea2d10670ac9ef#code Exchange: https://rinkeby.etherscan.io/address/0x0721be0636eaff1e5198da70e8280edff14f6939#code
参考: https://polygonscan.com/address/0xf715beb51ec8f63317d66f491e37e7bb048fcc2d#code ZeroExFeeWrapper: https://rinkeby.etherscan.io/address/0x94686a117550b1ca14e8eaf55aff5088e4ea59ff#code
npm publish --access public
tsc --out mylib.js --declaration app.ts
依赖
"@0x/assert": "file:src/assert",
"@0x/types": "file:src/types",
"@0x/utils": "file:src/utils",
webpack
alias: {
'@0x/assert': path.resolve(__dirname, '../src/assert/'),
'@0x/utils': path.resolve(__dirname, '../src/utils/'),
'@0x/types': path.resolve(__dirname, '../src/types/types'),
process: 'process/browser'
},
RPC
// export const apiHostTest = 'api-test.element.market' // 测试服外网接口香港入口
// export const apiHostTestChina = 'element-api-test.eossql.com' // 测试服外网接口大陆入口
// export const apiHostEth = 'api.element.market' // 正式服外网接口香港入口
// /api/v1/jsonrpc
// /https://api-test.element.market/api/bsc/jsonrpc
// https://data-seed-prebsc-1-s1.binance.org:8545
const custom: { [chainId: number]: string } = {
1: 'https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
4: 'https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
56: 'https://bsc-dataseed1.defibit.io/', // BSC
97: 'https://api-test.element.market/api/bsc/jsonrpc', //BSC TEST
137: 'https://rpc-mainnet.maticvigil.com', //
80001: 'https://rpc-mumbai.matic.today'
}
bridge
// public bridge="https://element-api-test.eossql.com/bridge/walletconnect"
public bridge = 'https://element-api.eossql.com/bridge/walletconnect'
// public bridge='https://bridge.walletconnect.org'