Create & Manage Digital Passport

Methods related to digital passports management.

Reserve Digital Passport

⚠️

Your wallet must own at least 1 certificate credit. The credit is spent once the digital passport has been minted and claimed by another wallet.

Method

creator.reserveSmartAssetId(smartAssetId?, overrideTransaction?:NonPayableOverrides)
ParameterTypeRequiredDescription
smartAssetIdNumberIf ID defined → Checked if ID is free.
If ID undefined → Get a free ID.
overridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

promise returns reserved smartAssetId is returned.


Check if a digital passport ID is available for reservation or creation

Method to check if the passed digital passport ID is available.

Method

creator.isSmartAssetIdAvailable(id)
ParameterTypeRequiredDescription
idStringDigital passport identification number to be checked.

Return Payload

promise returns boolean.

BooleanDescription
trueID available.
falseID is already linked to a digital passport.

Get a random available ID

Smart Asset

Method

creator.getAvailableSmartAssetId()

Return Payload

promise returns number corresponding to the smarAssetId.

All types

Method

creator.getAvailableId(idType)
ParameterTypeRequiredDescription
idTypesmartAsset, message, eventType of ID required.

Return Payload

promise returns number corresponding to the id.


Create & Hydrate Digital Passport

Create a digital passport and store its content on the Arianee Privacy Gateway.

Method

creator.createAndStoreSmartAsset(data:hydrateTokenParameters, overrideTransaction?:NonPayableOverrides)

Option 1 → You have a registered & verified identity:

ParameterTypeRequiredDescription
smartAssetIdNumberDigital passport identitication number.
tokenAccessStringWallet address generated through the passphrase.
tokenRecoveryTimestampNumberPeriod during which the digital passport can be recovered by its issuer.
Default value if empty: 5 years.
sameRequestOwnershipPassphraseBooleantrue: Transferable digital passport
false: Non-transferable digital passport
contentObjectContent mandatory if no uri and imprint.
uriStringDigital passport uri. Mandatory with imprint if no content.
imprintStringDigital passport imprint. Mandatory with uri if no content.
overridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Option 2 → You have not a registered & verified identity:

ParameterTypeRequiredDescription
uriStringDigital passport uri.

Return Payload

promise returns LinkObject. The digital passport has been created, as well as the deeplink, smartAssetId and passphrase.

{
	deeplink:"https://test.arianee.net/440105186,v6lsj4vhg5dx", // except if address was provided instead of passphrase
	smartAssetId:"440105186",
	passphrase:"v6lsj4vhg5dx" // except if address was provided instead of passphrase
}

Errors

Error typeDescription
UnavailableSmartAssetIdErrorThe digital passport identification number is not available.
InsufficientSmartAssetCreditsErrorThe core address does not have enough smart asset credits.
NoIdentityErrorThe core address does not have an identity URI.
ArianeePrivacyGatewayErrorAn error occurred while interacting with the Arianee Privacy Gateway.

Create digital passport without content storing

Create a digital passport without storing the content on the Arianee Privacy Gateway.

Method - For test purposes only

creator.createSmartAsset(smartAssetId, overrideTransaction?:NonPayableOverrides) 
ParameterTypeRequiredDescription
smartAssetIdNumberDigital passport identification number.
tokenAccessStringWallet address generated through the passphrase.
tokenRecoveryTimestampNumberPeriod during which the digital passport can be recovered by its issuer.
Default value if empty: 5 years.
sameRequestOwnershipPassphraseBooleantrue: Transferable digital passport
false: Non-transferable digital passport
contentObjectContent mandatory if no uri and imprint.
uriStringDigital passport uri. Mandatory with imprint if no content.
overridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

promise returns LinkObject. The digital passport has been created, as well as the deeplink, smartAssetId and passphrase.

{
	deeplink:"https://test.arianee.net/440105186,v6lsj4vhg5dx", 
	smartAssetId:"440105186",
	passphrase:"v6lsj4vhg5dx"
}

Errors

Error typeDescription
UnavailableSmartAssetIdErrorThe digital passport identification number is not available.
InsufficientSmartAssetCreditsErrorThe core address does not have enough smart asset credits.

Recover digital passport

The digital passport issuer can recover a distributed digital passport, in other words, the issuer gets back the ownership of the digital passport.

⚠️

  • The wallet must be the digital passport issuer.
  • The tokenRecoveryTimestamp must not be outdated.

Method

creator.recoverSmartAsset(id, overrideTransaction?:NonPayableOverrides) 
ParameterTypeRequiredDescription
idNumberID of the digital passport to recover.
overridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

The receipt of the transaction is returned.


Destroy digital passport

⚠️

The destroy process transfers the given digital passport ID to the wallet address 0x000000000000000000000000000000000000dead.

Method

creator.destroySmartAsset(id, overrideTransaction?:NonPayableOverrides)
ParameterTypeRequiredDescription
idStringID of the digital passport to destroy.
overridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

The receipt of the transaction is returned.


Set token access

Method to set the token access,requestKeyorviewKey, of a smart asset owned by the core wallet address.

Method

creator.setTokenAccess(smartAssetId, tokenAccessType, tokenAccess?, overrrides?)
ParameterTypeRequiredDescription
smartAssetIdNumberArianee token ID of the digital passport.
tokenAccessType- 0 - viewKey - 1 - requestKeyType of key.
tokenAccessStringWallet address generated through the passphrase.
overrridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

The token type has been set on the given smartAssetId.

Error

Error typeDescription
NotOwnerOfThe core wallet address is not the owner of the digital passport.

Set request key

Method to set the requestKey of a smart asset owned by the core wallet address.

Method

creator.setRequestKey(smartAssetId, tokenAccess?, overrrides?)
ParameterTypeRequiredDescription
smartAssetIdNumberArianee token ID of the digital passport.
tokenAccessStringWallet address generated through the passphrase.
overrridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

The requestKey is set on the given smartAssetId.

Errors

Error typeDescription
NotOwnerOfThe core wallet address is not the owner of the digital passport.

Update token URI

Method

creator.updateTokenURI(smartAssetId, uri, overrides)
ParameterTypeRequiredDescription
smartAssetIdNumberArianee token ID of the digital passport.
uriStringDigital passport uri.
overrridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

The token URI is updated.

Errors

Error typeDescription
NotIssuerErrorThe wallet core address is not the issuer of the smart asset.
InvalidURIErrorThe uri is not valid.

Update digital passport

Update the content of a digital passport in the Arianee Privacy Gateway and update its imprint on-chain. Returns the imprint of the new content.

⚠️

The wallet core address requires an Identity URI.

Method

creator.updateSmartAsset(smartAssetId, content, overrides)
ParameterTypeRequiredDescription
smartAssetIdNumberArianee token ID of the digital passport.
contentObjectContent of the digital passport.
overrridesgasPrice, gasLimit, maxFeePerGas, maxPriorityPerGasAllows you to override the gas/gasprice part to be able to move transactions through more quickly if needed.

Return Payload

The digital passport has been updated.

Errors

Error typeDescription
InsufficientUpdateCreditsErrorThe wallet core address does not have enough update credits.
NoIdentityErrorThe wallet core address does not have an identity URI.
ArianeePrivacyGatewayErrorAn error occurred while interacting with the Arianee Privacy Gateway.

Fetch digital passport owner

Retrieve the owner of a given digital passport.

Method

creator.getSmartAssetOwner(id)
ParameterTypeRequiredDescription
idNumberArianee token ID of the digital passport.

Return Payload

promise returns string corresponding to the wallet owner.


Fetch digital passport issuer

Retrieve the issuer of a given digital passport.

Method

creator.getSmartAssetIssuer(id: string)
ParameterTypeRequiredDescription
idNumberArianee token ID of the digital passport.

Return Payload

promise returns string corresponding to the digital passport wallet issuer.