Package

A psibase package is a zip archive that contains the following files:

meta.json

FieldTypeDescription
nameStringThe name of the package
versionStringThe package version. Must conform to Semantic Versioning 2.0.0.
descriptionStringThe package description
dependsArrayOther packages that this package depends on
depends[n].nameStringThe name of the other package
depends[n].versionStringAn expression that describes the compatible versions of the dependency
accountsArrayAccounts that are created by this package

Semantic version matching

The version field in the dependency list is a string that holds a comma separated list of patterns: [op] version, [op] version, .... The version can be a be a full semantic version, the major and minor versions, or just the major version. If the components of a prefix match the corresponding components of a non-prerelease version, it is considered an exact match.

  • ^ matches any compatible version that is not older than the version given. This is the default.
  • ~ only allows patch updates.
  • Comparison operators =, != , <, <=, >, <= are evaluated according to semantic version precedence.
  • Logical operators && and || can be used to combine multiple expressions. && has higher precedence than ||
  • Expressions can be grouped with ()

Examples:

  • 1: matches 1.0.0 and 1.3.1, but not 2.0.0 or 1.2.0-rc1
  • >=1.1.2, <2.0.0 matches 1.1.3 and 2.0.0-beta
  • >1, <3 matches all versions with major version 2, including prereleases

service/<service>.wasm

A wasm file that will be deployed to the service account.

service/<service>.json

Properties associated with a service.

FieldTypeDescription
flagsArrayCan contain the following strings: "allowSudo", "allowWriteNative", "isSubjective", "allowWriteSubjective", "canNotTimeOut", "canSetTimeLimit", "isAuthService"
serverStringThe account that will handle HTTP requests for the service

data/<service>/*

Files that will be uploaded using the storeSys action.

script/postinstall.json

Contains an array of actions that will be executed after the service is deployed.