2.0.0 • Published 4 months ago

holonym-wasm-issuer v2.0.0

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

To use

const { issue } = require("holonym-wasm-issuer")

// This script will convert to a safer version of thoe private key inside the modulus
const privateKey = crypto.randomBytes(32)

// The user generates a random secret and provides the issuanceNullifier which is set by 
// PoseidonHash(secret, 0x194ee5653c27cb200f64d0bd1ade2b4734e3341ea37712c6a5a4bd30870c33f1)
// 0x194ee5653c27cb200f64d0bd1ade2b4734e3341ea37712c6a5a4bd30870c33f1 is the public salt, a nothing-up-my-sleeve value equal to SHA256(\"Holonym Issuance\")
const issuanceNullifier = "123456789"

// Field 1 is some custom value the issuer wants to include in the credentials. If you want to include more values in `field1`, you can set `field1` to a hash of multiple values
const field1 = "5555555555555555555555555555"

// Field 2 is some custom value the issuer wants to include in the credentials. If you want to include more values in `field2`, you can set `field2` to a hash of multiple values
const field2 = "6666666666666666789"


issuer(privateKey, issuanceNullifier, field1, field)

Example return value

'{"credentials":{"address":"17452778546612284841311285923007828457519849114758929118101790154989181357987","isusance_nullifier":"123","custom_fields":["456","789"],"iat":"3912695745","scope":"0"},"leaf":"Fr(0x1ccb08fe58cf68e9a4e88e1a9ef8f5fe410c1b6593234bede96e2c7d60785e1d)","pubkey":{"x":"16003805019320757968260925948214345382871117349903511721497214338214881283461","y":"1211567564782129944539956892693917522526551007204649738937647460834237741531"},"signature_r8":{"x":"1267462639657973467509727148699289199109220101014975208155967540417688763687","y":"15269156096953569064177396808572247541427104811274671894203657974305304561353"},"signature_s":"533113860752561091979648376524424605565918986931275825188137857795294051741"}' 
2.0.0

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.1.4

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago

0.3.0

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago