Crate psibase

Source

Re-exports§

pub use fracpack;
pub use ::anyhow;
pub use native::*;
pub use semver::*;
pub use tester::*;

Modules§

native
Wrapped native functions for services to use
native_raw
Raw native functions for services to use
semver
server_action_structs
These structs produce the same JSON and fracpack formats that the actions do.
server_interface
Interface for services which serve http
services
Interfaces for standard services
tester
Wrapped native functions for tests to use
tester_raw
Raw native functions for tests to use

Macros§

account
account_raw
anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
component_name
method
method_raw
plugin_error
subjective_tx
The subjective_tx macro creates a scope in which the subjective database is accessible. It is necessary to use this scope for any reads or writes to the subjective database.
table_query
table_query_subindex

Structs§

AccountNumber
An account number.
Action
A synchronous call
ActionPacker
ActionTrace
AnyPrivateKey
AnyPublicKey
AutoAbort
BftConsensus
Block
BlockDataRow
BlockHeader
BlockHeaderAuthAccount
BlockHeaderCode
BlockInfo
BoundMethod
CftConsensus
Claim
CodeByHashRow
where code is actually stored, duplicate services are reused
CodeRow
ConfigRow
Consensus
ConsensusBytes
ConsensusChangeRow
ConsoleTrace
DatabaseStatusRow
DepGraph
DirectoryRegistry
EmptyDatabase
Error
The Error type, a wrapper around a dynamic error type.
EssentialServices
EventQuery
GraphQL Pagination through Event tables
EventTrace
ExactAccountNumber
Like AccountNumber, except FromStr and deserializing JSON require exact round-trip conversion
FieldId
FileSetRegistry
GenesisActionData
The genesis action is the first action of the first transaction of the first block. The action struct’s fields are ignored, except rawData, which contains this struct.
GenesisService
HTTPRegistry
Hex
Represent inner type as hex in JSON.
HttpBody
HttpHeader
An HTTP header
HttpReply
An HTTP reply
HttpRequest
An HTTP Request
HttpSocketInfo
InnerTrace
InstalledPackageInfo
JointConsensus
JointRegistry
JustSchema
KeyView
A serialized key (not owning)
LogTruncateRow
Meta
MethodNumber
A contract method number.
MethodString
MicroSeconds
NotifyRow
PackageDataFile
PackageDisposition
PackageInfo
PackageList
PackageManifest
PackageRef
PackagedService
PendingConsensus
PrettyAction
Producer
ProducerMultiCastSocketInfo
RawKey
A serialized key
RunMode
RunRow
ScheduledSnapshotRow
Schema
Seconds
ServerActions
Interface for services which serve http
ServerWrapper
Simplifies calling into the service
ServiceCaller
ServiceInfo
SharedAction
SharedGenesisActionData
SharedGenesisService
SignedBlock
SignedTransaction
SingletonKey
SnapshotRow
SnapshotStateItem
SocketRow
StagedUpload
StateChecksum
StateSignature
StatusRow
TableIndex
TableInfo
TableIter
TableQuery
GraphQL Pagination through TableIndex
Tapos
Rules for TAPOS:
TaposRefBlock
TimePointSec
TimePointUSec
TraceConsole
Transaction
TransactionBuilder
TransactionTrace
VMOptions
WasmConfigRow

Enums§

AccountNumberError
ConsensusData
DbId
Identify database to operate on
InnerTraceEnum
K1Error
MethodNumberError
PackageOp
PackageOrigin
PackagePreference
SocketInfo
TraceFormat

Constants§

BLOCK_DATA_TABLE
CODE_BY_HASH_TABLE
CODE_TABLE
CONFIG_TABLE
CONSENSUS_CHANGE_TABLE
DATABASE_STATUS_TABLE
LOG_TRUNCATE_TABLE
NATIVE_TABLE_PRIMARY_INDEX
NOTIFY_TABLE
PROOF_WASM_CONFIG_TABLE
RUN_TABLE
SCHEDULED_SNAPSHOT_TABLE
SNAPSHOT_TABLE
SOCKET_TABLE
STATUS_TABLE
TRANSACTION_WASM_CONFIG_TABLE

Traits§

ActionGroup
ActionSink
Caller
ChainUrl
DecodeEvent
EventDb
NamedEvent
PackageRegistry
ProcessActionStruct
ServiceTablesWrapper
Signer
Table
TableRecord
ToActionsSchema
ToDatabaseSchema
ToEventsSchema
ToIndexSchema
ToKey
ToKey defines a conversion from a type to a sequence of bytes whose lexicographical ordering is the same as the ordering of the original type.
ToServiceSchema
WithActionStruct

Functions§

apply_proxy
as_json
compress_content
create_boot_transactions
Create boot transactions
create_schema
db_name
decode_event_data
from_bin
crate::from_bin() and crate::to_bin() are incomplete. They’ll disappear when switch to fracpack is complete.
generate_action_templates
get_accounts_to_create
get_essential_packages
get_event
get_event_in_db
get_initial_actions
Get initial actions
get_installed_manifest
get_manifest
get_package_sources
get_schemas
get_sender
Get sender of currently-executing action
get_service
Get currently-executing service
get_tapos_for_head
gql_query
load_private_key
login_action
make_ref
make_refs
new_account_action
print_schema_impl
push_transaction
push_transaction_optimistic
push_transactions
reg_server
schema_types
serve_action_templates
Handle /action_templates request
serve_graphiql
Serve GraphiQL UI
serve_graphql
Handle /graphql request
serve_pack_action
Handle /pack_action/ request
serve_simple_index
Serve index.html for a developer UI
serve_simple_ui
Serve a developer UI
set_auth_service_action
set_code_action
set_key_action
sign_transaction
solve_dependencies
status_key
to_bin
crate::from_bin() and crate::to_bin() are incomplete. They’ll disappear when switch to fracpack is complete.
validate_dependencies

Type Aliases§

BlockNum
BlockTime
Checksum256
HexBytes
IndexInfo
NamedBit
NativeIndex
NativeTable
RunToken
SchemaMap

Attribute Macros§

queries
service
Define a psibase service interface.
service_tables
test_case
Define a psibase test case.

Derive Macros§

Fracpack
Pack
ToKey
ToSchema
Unpack