Create & Manage Arianee Events
Methods related to event management.
Create Arianee Event
Create and link an Arianee Event to a digital passport and store its content on the Arianee Privacy Gateway.
Your wallet must own at least 1
arianeeEvent
credit. The credit is spent when the Arianee Event is accepted.
Method
creator.createAndStoreEvent(data, overrideTransaction?:NonPayableOverrides)
Parameter | Type | Required | Description |
---|---|---|---|
data → uri | String | ❌ | Arianee event uri. |
data → smartAssetId | String | ✅ | Identification number of the recipient digital passport. |
data → arianeeEventId | String | ❌ | Identification number of the Arianee Event. If not defined, a random ID is generated. |
data → imprint | String | ❌ | Arianee event imprint. |
data → content | Object | ❌ | Content of the Arianee Event. |
overrrides | gasPrice , gasLimit , maxFeePerGas , maxPriorityPerGas | ❌ | Allows you to override the gas/gasprice part to be able to move transactions through more quickly if needed. |
const core = Core.fromRandom();
const creator = new Creator({
creatorAddress: '',
core: core,
});
const isConnected = await creator.connect('polygon');
if (isConnected) {
await creator.buyCredit(CreditType.event, 1);
await creator.events.createAndStoreEvent({
smartAssetId: 12343,
eventId: 1232143,
content: {},
}); // return message imprint + messageId
}
Return Payload
The Arianee Event has been created.
Errors
Error type | Description |
---|---|
InsufficientMessageCreditsError | The core wallet address does not have enough message credits. |
UnavailableEventIdError | The eventId is not available. |
NoIdentityError | The core wallet address does not have an Identity URI. |
ArianeePrivacyGatewayError | Error while interacting with the Arianee Privacy Gateway. |
Create Arianee Event without content storing
Method for test purposes.
Your wallet must own at least 1
arianeeEvent
credit. The credit is spent when the Arianee Event is accepted.
Method
creator.createAndStoreEvent(CreateEventParameter, overrideTransaction?:NonPayableOverrides)
Parameter | Type | Required | Description |
---|---|---|---|
uri | String | ❌ | Arianee event uri. |
smartAssetId | String | ✅ | Identification number of the recipient digital passport. |
arianeeEventId | String | ❌ | Identification number of the Arianee Event. If not defined, a random ID is generated. |
imprint | String | ❌ | Arianee event imprint. |
overrrides | gasPrice , gasLimit , maxFeePerGas , maxPriorityPerGas | ❌ | Allows you to override the gas/gasprice part to be able to move transactions through more quickly if needed. |
Return Payload
The Arianee Event has been created and linked to the smartAssetId
.
Errors
Error type | Description |
---|---|
InsufficientEventCreditsError | The wallet core address does not have enough event credits. |
UnavailableEventIdError | The eventId is not available. |
Updated about 2 months ago