1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00
squid-js/src/ocean/IdGenerator.ts

13 lines
275 B
TypeScript
Raw Normal View History

2018-10-26 13:37:09 +02:00
import * as v4 from "uuid/v4"
export default class IdGenerator {
public static generateId(): string {
const id = `${v4()}${v4()}`
return id.replace(/-/g, "")
}
2018-11-07 09:35:47 +01:00
public static generatePrefixedId() {
return "0x" + this.generateId()
}
2018-10-26 13:37:09 +02:00
}