Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Device dApp is a blockchain account representing a physical entity - an IoT device, car, gate, or something else connected to the Internet.
Data are listed bellow:
Data properties:
Data properties:
Data properties:
NOTE: all properties in Device details
and Physical address
are optional.
Key | Type | Required | Default value | |
---|---|---|---|---|
name
string
Name of the device
description
string
Device description
type
string
required
“device”
Type of entity
supplier
string
required
Supplier blockchain address
owner
string
required
Owner blockchain address
active
boolean
required
Flag signalling if Device is active
visible
boolean
required
Flag signalling if Device is visible
connected
boolean
required
Flag signalling if Device is connected
version
string
required
“1”
Device dApp version
lat
string
Device latitude
lng
string
Device longitude
alt
string
Device altitude
custom
object as stringified JSON
Custom Device properties
key_<assetId>
string - “active” or “inactive”
Key allowed to perform actions
details
Object as stringified JSON
Device details - see schema below
deviceType
Enum string
Device type
Supported values:
'car barrier' | 'human barrier' | 'elevator' | 'human' | 'mobile' | 'other'
deviceModel
string
Device model
additionalDescription
string
Additional description
assetUrl
string
URL to an optional asset(like an image)
url
string
URL related to the Device
contactInfo
string
Contact info to the owner of the Device
physicalAddress
object
Physical Address of the Device - see schema below
Key
Type
Description
addressLine1
string
Device address
addressLine2
string
Device address cd.
city
string
City
postcode
string
Postcode
state
string
State
country
string
Country
number
string
Building number
floor
string
Building floor
Functions are listed bellow:
Adds an existing NFT Key to device whitelist.
keyID
- id of NFT
Invoking wallet must be owner of device or main dApp
Key issued by Supplier dApp
[E102] Wrong key issuerr
- issuer of asset is other than Supplier
[E103] Not permitted
- user is not a device owner
[E104] This key is banned
- key is banned by Supplier
[E105] This key is already assigned
Updates data in device wallet.
List of actions written as string (max. 15 entries at once) in schema: action#type#key#value
. Types of action set/delete.
action
- set (create new/update old entry), delete (remove entry)
type
- type of entry (int/string/bool), skip for delete
value
- value of entry or delete#key, skip for delete
key
- key of entry
[E103] Not permitted
- user is not device's Supplier
Skey Network allows users to create and manage dApps. DApps(shorthand for “decentralised applications”) are scripts uploaded to a blockchain account allowing other accounts to perform actions on the dApp with invokable functions defined in the script.
Skey Network has created multiple dApps to ease the process of implementing blockchain capacities to your IoT devices.
The dApps are as follows:
Name | Value | Description |
---|---|---|
device_<address>
string
Registered Device
device_counter_<address>
number
Actions counter for registered Device - created and updated automatically
org_<address>
string
Registered Organisation allowed to perform actions on Devices
dapp_father
string
Address to dApp Father - used for account recharge
This dApp can be used by Suppliers to manage Devices accounts on the blockchain. When dAppFather is defined and Supplier is added in the dAppFather, actions performed by users will be refunded up to an amount set in the dAppFather.
Name | Type | Required | Value | |
---|---|---|---|---|
refill_amount
number
required
Amount to refill in Skeylets
supplier_<address>
string
“active”
Supplier allowed to refill
org_<address>
string
“active”
Organisation allowed to refill
Carries out some action on device (tries to refill account on success).
keyID
- id of nft token
action
- action to be carried out
Valid key (timestamp, issuer)
Key whitelisted in device's wallet
Asset (key) in invoking user's wallet
[E1] Key not owned
- Key not found in user's wallet
[E3] Wrong key issuer
- Key issuer is other than Supplier
[E4] No such device
- There is no such device in Supplier dApp
[E5]Key not whitelisted
- Key is not whitelisted in device's data
[E6]Device not connected
[E7] Device not active
[E8] Key expired
[E19] Not a key
- there is no asset with given id
[E20] Not a device key
- there is no device info in key
Transfers key to other user (DAppFather tries to refill both accounts on success).
recipient
- address of recipient
key as payment
- key to send
valid key (issuer, timestamp)
key in users wallet
[E3] Wrong key issuerr
- asset issuer is other than Supplier
[E8] Key expired
- timestamp in key description expired
[E15] Wrong payments count
- more or less than one asset provided as payment
Functions are listed bellow:
Carries out some action on device using a Key owned by an Organisation (tries to refill account on success).
keyID - id of nft token
action - action to be carried out
keyOwner - address of Organisation owning the key
mobileId - mobile ID of User performing the action
Valid key (timestamp, issuer)
Key whitelisted in device's wallet
Asset (key) in invoking user's wallet
Account performing the action needs to be added to Organisation
User account and Mobile ID in Organisation must match
Organisation has to be added in Supplier data
[E1] Key not owned - Key not found in user's wallet
[E3] Wrong key issuer - Key issuer is other than Supplier
[E4] No such device - There is no such device in Supplier dApp
[E5] Key not whitelisted - Key is not whitelisted in device's data
[E6] Device not connected
[E7] Device not active
[E8] Key expired
[E9] Not permitted by organization - User invoking the function is not a member of the Organisation
[E10] Mobile id not set - User invoking the function does not have Mobile ID set in Organisation
[E11] Id mismatch - Mobile ID of User does not match Mobile ID set in Organisation
[E12] Organization not permitted - Organisation not added to Supplier
[E19] Not a key - there is no asset with given id
[E20] Not a device key - there is no device info in key
[E1] Key not owned
[E2] Not permitted by key owner
[E3] Wrong key issuer
[E4] No such device
[E5] Key not whitelisted
[E6] Device not connected
[E7] Device not active
[E8] Key expired
[E9] Not permitted by organization
[E10] Mobile id not set
[E11] Id mismatch
[E12] Organization not permitted
[E13] Not an owner
[E14] Wrong price
[E15] Wrong payments count
[E16] Wrong payment - supported only native token
[E17] Wrong payment value, expected <dd>
[E18] Unknown asset id
[E19] Not a key
[E20] Not a device key
[E21] Price not specified in device
[E22] Owner not specified in device
As part of the popularisation of the Skey Network application, the blockchain account has been extended with features (dApp) to extend its usability. dApps in the SmartKey ecosystem are accounts not only for Suppliers but also for Organisations.
The Organisation account allows multiple users to use keys that are contained in that account. Access to the keys is secured through an ACL. A user can add themselves to the ACL by calling a method in the Organisation dApp attaching an activation token in the transaction.
An ACL (Access Control List) is a whitelist of wallet addresses that have access to Organisation keys.
The dAppFather in this case represents an account on the blockchain storing a list of all the Organisation audited and described decentralised applications.
Activation tokens
- these are licence tokens generated by the Organisation, giving you the ability to add your account to the Organisation's ACL. They are generated by the Organisation in any quantity and then distributed to end users’ wallets.
Data properties:
Key | Type | Required | Default value | Description |
---|---|---|---|---|
user_<address>
string
no
mobile id
Rgistered user, value is mobile Id, '?' when not set, otherwise device id string or wildcard '*'
user_note_<address>
string
no
encrypted note
Encrypted note about the account set by Organisation used for identification of blockchain addresses.
token_<assetId>
string
no
active
Activation token, value: 'active'/'inactive'
manager_<address> => <publicKey>
string
no
binary address of manager
Binary entry containing blockchain address and public key of a Manager
Creates key for device if possible.
If no price is specified in the "key_price" entry, such a key cannot be purchased
Can only be purchased by the owner of the device ('owner' entry in the device)
A default token payment equal to <key_price> * <time in minutes>
is required
The validity of such a key is calculated from the date of purchase
deviceAddr
- address of device
duration
- time in minutes
price per minute defined in device
user is owner of device
the payment amount is equal
[E13] Not an owner
- device not owned by user
[E14] Wrong price
- wrong amount of asset
[E16] Wrong payment
- supported only native token
[E17] Wrong payment value, expected <value>
[E21] Price not specified in device
[E22] Owner not specified in device
Functions are listed bellow:
activates organisation user, writes its mobile id
activation token
activation token must be whitelisted
mobile id must be string other than '?' and '*'
[E202] Wrong payments count - more or less than 1 payments attached
[E203] Wrong asset - wrong asset sent as payment
[E207] Forbidden id string - id string cannotcant be * or ?
[E208] Activation failed, token is inactivee - asset was deactivated
Removes key to device from organisation’s wallet
keyID - id of nft token
Invoked by owner of device or supplier
[E201] Not a key" - there is no token with given asset id
[E204] Not a device key - asset is not a device key
[E205] Not an owner address - owner address in token is incorrect
[E206] Owner not specified in device - device has no owner address specified
[E209] Not permitted - if invoking user is not supplier/owner of device
Functions are listed bellow:
Adds user to organisation as a Manager
mamanager
- Address of manager performing the action
address
- Address of user to add
mobileId
- Mobile ID of user to add
note
- Note about added account. For security reasons we recommend encrypting this value beforehand. It will be stored on the blockchain as-is. Provide an empty string to not set one.
Manager has to be added to the Organisation
Address cannot be added already
Mobile ID needs to be unique
[E209] Not permitted
[E212] Incorrect user address
Transfer Activation Token(s) as a Manager.
manager
- Address of Manager performing the action
token
- Asset ID of Activation Token to send
recipient
- Address of Activation Token Recipient
amount
- Amount of Activation Tokens to send
Manager has to be added to the Organisation
Amount has to be a positive number
Organisation has to have sufficient amount of Activation Tokens on it’s wallet
[E209] Not permitted
[E212] Incorrect user address
[E213] Not an asset
[E214] Not issued by organisation
Functions are listed bellow:
[E201] Not a key
[E202] Wrong payments count
[E203] Wrong asset
[E204] Not a device key
[E205] Not an owner address
[E206] Owner not specified in device
[E207] Forbidden id string
[E208] Activation failed, token is inactive
[E209] Not permitted
[E210] Not a member
[E211] Cant change existing id
[E212] Incorrect user address
[E213] Not an asset
[E214] Not issued by organization
Sets mobile id if user is added to organisation and has no id specified.
user written in organisation with '?' as mobile id
[E207] Forbidden id string - mobile id is forbidden string (?/*)
[E210] Not a memberr - organisation has no such user
[E211] Cant change existing id - id was already set