More on Packages

A deeper dive into an example of a package being registered

DAPP Service providers register their package with the dappservices:regpkg command. Examples can be seen on the eosq block explorerarrow-up-right.

Below we can see the structure of a new package that is created.

{
   "newpackage": {
      # API endpoint the DSP is reachable at, default PORT 3115
      "api_endpoint": "https://node1.dappfund.io",
      # packages are disabled when created and require the dappservices:enablepkg command
      "enabled": 0,
      # id
      "id": 0,
      # minimum stake required to receive designated QUOTA per package period
      "min_stake_quantity": "10.0000 DAPP",
      # min time in seconds before a stake can be refunded
      "min_unstake_period": 3600,
      # package name, must be 1-12 characters a-z, eosio name format
      "package_id": "fairfund1",
      # url of DSP JSON file, similar to BP JSON
      "package_json_uri": "https://dappfund.io/dsp-package.json",
      # period in seconds where QUOTA refills to 100%, example has 1 day in seconds, each day user will have 1 QUOTA
      "package_period": 86400,
      # DSP account name
      "provider": "thedappfund1",
      # QUOTA to provide per package period, more on QUOTA below
      "quota": "1.0000 QUOTA",
      # service name, more on this and where to find this below
      "service": "stakeservice"
   }
}
circle-info

The following go into more detail on the settings above.

enabled

To enable you can visit bloks.io's block explorer herearrow-up-right to submit the dappservices:enablepkg action, this requires the package id, DSP name, and service name

min_unstake_period

The greater of this and the remaining time in thepackage_period is the total unstake time. For example if you are 12 hours into a 24 hour package period and the min_unstake_period is an hour, you have to wait 12 hours to refund your stake.

package_json_uri

This is the link to the package json information to be standardized and used by DAPP Service Provider portals.

quota

Each DSP service action, fetching a vRAM table row, performing an oracle request, scheduling a re-occurring action, each of these are examples where by default 0.0001 QUOTA is used. Let's show

service

The service name can be found in the model file of the service, let's go to the directory of services on Githubarrow-up-right. If we go into the /models/dapp-services/oracle.json we will see the following:

Last updated

Was this helpful?