mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
correct random did creation
This commit is contained in:
parent
e259b70170
commit
cd7cd1e337
@ -110,7 +110,7 @@ describe("libDDO", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('DDO validate proof', () => {
|
||||
describe('DDO validate proof from JSON', () => {
|
||||
it("should have a valid ddo proof", async () => {
|
||||
var ddo = new DDO(jsonDDO)
|
||||
assert(ddo)
|
||||
@ -128,8 +128,9 @@ describe("libDDO", () => {
|
||||
const privateKey = ddo.addSignature()
|
||||
assert(privateKey.match('-----BEGIN RSA PRIVATE KEY-----'))
|
||||
})
|
||||
|
||||
it("should add a service", async () => {
|
||||
const did = 'did:op:' + Web3.utils.randomHex(64)
|
||||
const did = 'did:op:' + Web3.utils.randomHex(32).substr(2)
|
||||
var ddo = new DDO(did)
|
||||
assert(ddo)
|
||||
const service = ddo.addService({type: 'metatrippy', serviceEndpoint: 'http://localhost:5000'})
|
||||
|
Loading…
Reference in New Issue
Block a user