mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
18 lines
543 B
JavaScript
18 lines
543 B
JavaScript
const fixtures = require("./fixtures/slp/ecpair.json")
|
|
const assert = require("assert")
|
|
|
|
const SLP = require("../../src/slp/slp")
|
|
const slp = new SLP({ restURL: "http://fakeurl.com/" })
|
|
|
|
describe("#SLP ECPair", () => {
|
|
describe("#toSLPAddress", () => {
|
|
it(`should return slp address for ecpair`, async () => {
|
|
fixtures.wif.forEach((wif, index) => {
|
|
const ecpair = slp.ECPair.fromWIF(wif)
|
|
const slpAddr = slp.ECPair.toSLPAddress(ecpair)
|
|
assert.equal(slpAddr, fixtures.address[index])
|
|
})
|
|
})
|
|
})
|
|
})
|