Operator

operator.setSigner

Set signer for write operation. For some secnarios, like frontend, we are not able to get the private key of the user, so we need to set signer for write operation.

Input:

Example:

communitiesidSDK.operator.setSigner(signer)

operator.getMintUserDIDPrice

Get the price of minting a user DID

Input:

Example:

const res = await operator.getMintUserDIDPrice('test.did')
const brandDID = await collector.searchBrandDID('did')
const res = await operator.getMintUserDIDPrice('test.did', { brandDID })

operator.mintUserDID

Mint a user DID (This is a write method, the generateSigner function of the chain which this user DID on is required)

Input:

Example:

const res = await operator.mintUserDID('test.did', '0x123456')

operator.getRenewUserDIDPrice

Get the price of renew a user DID

Input:

Example:

const res = await operator.getRenewUserDIDPrice('test.did')
const userDID = await collector.searchUserDID('test.did')
const res = await operator.getRenewUserDIDPrice('test.did', { userDID })

operator.renewUserDID

Mint a user DID (This is a write method, the generateSigner function of the chain which this user DID on is required)

Input:

Example:

const res = await operator.renewUserDID('test.did')

operator.burnUserDID

Burn a user DID (This is a write method, the generateSigner function of the chain which this user DID on is required)

Input:

Example:

const res = await operator.burnUserDID('test.did')

operator.setAsPrimary

Set a user DID as primary (This is a write method, the generateSigner function of the chain which this user DID on is required)

Input:

Example:

const res = await operator.setAsPrimary('test.did')

Last updated