psibase
NAME
psibase - The psibase blockchain command line client
SYNOPSIS
psibase [-a url] boot [-p name] [-k public-key]
psibase [-a url] create [-i | -k public-key] [-S sender] name
psibase [-a url] deploy [-p] account filename
psibase [-a url] modify [-i | -k public-key] account
psibase [-a url] upload service dest content-type source
psibase [-a url] upload-tree service dest source
psibase create-token [-e expiration] [-m mode]
DESCRIPTION
psibase is the command-line tool for interacting with psibase blockchains.
OPTIONS
-
-a,--apiurlpsinodeAPI Endpoint. The default ishttp://psibase.127.0.0.1.sslip.io/ -
-h,--helpPrint help information
-
-s,--signprivate-keySign transactions with this key
COMMANDS
boot
psibase [-a url] boot [-p name] [-k public-key]
The boot command deploys a set of system services and web interfaces suitable for development. The chain will have a single block producer. The chain can only be booted once.
-
-k,--keypublic-keySet all accounts to authenticate using this key. The key will also be used for block production. If no key is provided, the accounts will not require authentication.
-
-p,--producernameSet the name of the block producer.
psinodeshould be configured to use the same name.
create
psibase [-a url] create [-i | -k public-key] [-S sender] name
Create or modify an account
-
-i,--insecureThe account won't be secured; anyone can authorize as this account without signing. This option does nothing if the account already exists. Caution: this option should not be used on production or public chains.
-
-k,--keypublic-keySet the account to authenticate using this key. Also works if the account already exists.
-
-S,--senderaccountSender to use when creating the account [default: account-sys].
deploy
psibase [-a url] deploy [-p] account filename
Deploy a service
-
account
Account to deploy the service on
-
filename
A wasm file containing the service
-
-c,--create-accountpublic-keyCreate the account if it doesn't exist. Also set the account to authenticate using this key, even if the account already existed
-
-i,--create-insecure-accountCreate the account if it doesn't exist. The account won't be secured; anyone can authorize as this account without signing. Caution: this option should not be used on production or public.
-
-p,--register-proxyRegister the service with ProxySys. This allows the service to host a website, serve RPC requests, and serve GraphQL requests.
-
-S,--sendersenderSender to use when creating the account [default: account-sys]
modify
psibase [-a url] modify [-i | -k public-key] account
Modify an account
-
-i,--insecureMake the account insecure, even if it has been previously secured. Anyone will be able to authorize as this account without signing. Caution: this option should not be used on production or public chains
-
-k,--keySet the account to authenticate using this key
upload
psibase [-a url] upload service dest content-type source
Upload a file to a service. The service must provide a storeSys action.
-
service
Service to upload to
-
dest
Destination path within service
-
content-type
MIME Content-Type of the file
-
source
Source filename to upload
-
-S,--sendersenderAccount to use as the sender of the transaction. Defaults to the service account.
upload-tree
psibase [-a url] upload-tree service dest source
Upload a directory tree to a service. The service must provide a storeSys action. The files may be split across multiple transactions if they are too large to fit in a single transaction.
-
service
Service to upload to
-
dest
Destination path within service
-
source
Source directory to upload
-
-S,--sendersenderAccount to use as the sender of the transaction. Defaults to the service account.
create-token
psibase create-token [-e expiration] [-m mode]
Create an access token. psibase will prompt for the key to use to sign the token. For the token to be useful, the server must enable bearer tokens with the same key.
-
-e,--expires-aftersecondsLifetime of the token in seconds. The default is 1 hour.
-
-m,--modemodeThe permissions granted by the token. Should be
rorrw. The default isrw.