""" An account """ scalar Account """ A non-negative amount of tokens. """ scalar Amount """ A unique identifier for a user application """ scalar ApplicationId type ApplicationOverview { id: ApplicationId! description: UserApplicationDescription! link: String! } """ Permissions for applications on a chain. """ input ApplicationPermissions { """ If this is `None`, all system operations and application operations are allowed. If it is `Some`, only operations from the specified applications are allowed, and no system operations. """ executeOperations: [ApplicationId!] """ At least one operation or incoming message from each of these applications must occur in every block. """ mandatoryApplications: [ApplicationId!]! = [] """ These applications are allowed to close the current chain using the system API. """ closeChain: [ApplicationId!]! = [] } """ A block containing operations to apply on a given chain, as well as the acknowledgment of a number of incoming messages from other chains. * Incoming messages must be selected in the order they were produced by the sending chain, but can be skipped. * When a block is proposed to a validator, all cross-chain messages must have been received ahead of time in the inbox of the chain. * This constraint does not apply to the execution of confirmed blocks. """ type Block { """ The chain to which this block belongs. """ chainId: ChainId! """ The number identifying the current configuration. """ epoch: Epoch! """ A selection of incoming messages to be executed first. Successive messages of same sender and height are grouped together for conciseness. """ incomingBundles: [IncomingBundle!]! """ The operations to execute. """ operations: [Operation!]! """ The block height. """ height: BlockHeight! """ The timestamp when this block was created. This must be later than all messages received in this block, but no later than the current time. """ timestamp: Timestamp! """ The user signing for the operations in the block and paying for their execution fees. If set, this must be the `owner` in the block proposal. `None` means that the default account of the chain is used. This value is also used as recipient of potential refunds for the message grants created by the operations. """ authenticatedSigner: Owner """ Certified hash (see `Certificate` below) of the previous block in the chain, if any. """ previousBlockHash: CryptoHash } """ The messages and the state hash resulting from a [`Block`]'s execution. """ type BlockExecutionOutcome { """ The list of outgoing messages for each transaction. """ messages: [[OutgoingMessage!]!]! """ The hash of the chain's execution state after this block. """ stateHash: CryptoHash! """ The record of oracle responses for each transaction. """ oracleResponses: [[OracleResponse!]!]! """ The list of events produced by each transaction. """ events: [[EventRecord!]!]! } """ A block height to identify blocks in a chain """ scalar BlockHeight """ An origin and cursor of a unskippable bundle that is no longer in our inbox. """ type BundleInInbox { """ The origin from which we received the bundle. """ origin: Origin! """ The cursor of the bundle in the inbox. """ cursor: Cursor! } """ A WebAssembly module's bytecode """ scalar Bytecode """ A unique identifier for an application bytecode """ scalar BytecodeId type CertificateValue { executedBlock: ExecutedBlock status: String! } """ A chain ID with a block height. """ type ChainAndHeight { chainId: ChainId! height: BlockHeight! } """ How to create a chain """ scalar ChainDescription """ The unique identifier (UID) of a chain. This is currently computed as the hash value of a ChainDescription. """ scalar ChainId """ The state of the certification process for a chain's next block """ scalar ChainManager """ Represents the owner(s) of a chain """ scalar ChainOwnership type ChainStateExtendedView { chainId: ChainId! """ Execution state, including system and user applications. """ executionState: ExecutionStateView! """ Hash of the execution state. """ executionStateHash: CryptoHash """ Block-chaining state. """ tipState: ChainTipState! """ Consensus state. """ manager: ChainManager! """ Hashes of all certified blocks for this sender. This ends with `block_hash` and has length `usize::from(next_block_height)`. """ confirmedLog: LogView_CryptoHash_5f6ab77f! """ Sender chain and height of all certified blocks known as a receiver (local ordering). """ receivedLog: LogView_ChainAndHeight_7af83576! """ Mailboxes used to receive messages indexed by their origin. """ inboxes: ReentrantCollectionView_Origin_InboxStateView_3699835794! """ A queue of unskippable bundles, with the timestamp when we added them to the inbox. """ unskippableBundles: QueueView_TimestampedBundleInInbox_5a630c55! """ Unskippable bundles that have been removed but are still in the queue. """ removedUnskippableBundles: [BundleInInbox!]! """ Mailboxes used to send messages, indexed by their target. """ outboxes: ReentrantCollectionView_Target_OutboxStateView_2789119133! """ Number of outgoing messages in flight for each block height. We use a `RegisterView` to prioritize speed for small maps. """ outboxCounters: JSONObject! """ Channels able to multicast messages to subscribers. """ channels: ReentrantCollectionView_ChannelFullName_ChannelStateView_629706216! } """ Block-chaining state. """ type ChainTipState { """ Hash of the latest certified block in this chain, if any. """ blockHash: CryptoHash """ Sequence number tracking blocks. """ nextBlockHeight: BlockHeight! """ Number of incoming message bundles. """ numIncomingBundles: Int! """ Number of operations. """ numOperations: Int! """ Number of outgoing messages. """ numOutgoingMessages: Int! } type Chains { list: [ChainId!]! default: ChainId } """ A channel name together with its application ID. """ scalar ChannelFullName """ The name of a subscription channel """ scalar ChannelName """ The state of a channel followed by subscribers. """ type ChannelStateView { """ The current subscribers. """ subscribers: [ChainId!]! """ The block heights so far, to be sent to future subscribers. """ blockHeights: LogView_BlockHeight_e824a938! } """ The identifier of a channel, relative to a particular application. """ type ChannelSubscription { """ The chain ID broadcasting on this channel. """ chainId: ChainId! """ The name of the channel. """ name: ChannelName! } """ A set of validators (identified by their public keys) and their voting rights. """ input Committee { """ The validators in the committee. """ validators: JSONObject! """ The sum of all voting rights. """ totalVotes: Int! """ The threshold to form a quorum. """ quorumThreshold: Int! """ The threshold to prove the validity of a statement. """ validityThreshold: Int! """ The policy agreed on for this epoch. """ policy: ResourceControlPolicy! } """ The version of the Linera crates used in this build """ scalar CrateVersion """ A Sha3-256 value """ scalar CryptoHash type Cursor { height: BlockHeight! index: Int! } """ The destination of a message, relative to a particular application. """ scalar Destination """ A GraphQL-visible map item, complete with key. """ type Entry_ChannelFullName_ChannelStateView_ef52a064 { key: ChannelFullName! value: ChannelStateView! } """ A GraphQL-visible map item, complete with key. """ type Entry_Origin_InboxStateView_c4db01d6 { key: Origin! value: InboxStateView! } """ A GraphQL-visible map item, complete with key. """ type Entry_Owner_Amount_202623bd { key: Owner! value: Amount } """ A GraphQL-visible map item, complete with key. """ type Entry_Target_OutboxStateView_50a86149 { key: Target! value: OutboxStateView! } """ A number identifying the configuration of the chain (aka the committee) """ scalar Epoch """ An event recorded in an executed block. """ type EventRecord { """ The ID of the stream this event belongs to. """ streamId: StreamId! """ The event key. """ key: [Int!]! """ The payload data. """ value: [Int!]! } """ A [`Block`], together with the outcome from its execution. """ type ExecutedBlock { block: Block! outcome: BlockExecutionOutcome! } type ExecutionStateView { system: SystemExecutionStateView! } """ A unique identifier for a user application or for the system application """ scalar GenericApplicationId type HashedCertificateValue { hash: CryptoHash! value: CertificateValue! } """ The state of an inbox. * An inbox is used to track bundles received and executed locally. * A `MessageBundle` consists of a logical cursor `(height, index)` and some message content `messages`. * On the surface, an inbox looks like a FIFO queue: the main APIs are `add_bundle` and `remove_bundle`. * However, bundles can also be removed before they are added. When this happens, the bundles removed by anticipation are tracked in a separate queue. Any bundle added later will be required to match the first removed bundle and so on. * The cursors of added bundles (resp. removed bundles) must be increasing over time. * Reconciliation of added and removed bundles is allowed to skip some added bundles. However, the opposite is not true: every removed bundle must be eventually added. """ type InboxStateView { """ We have already added all the messages below this height and index. """ nextCursorToAdd: Cursor! """ We have already removed all the messages below this height and index. """ nextCursorToRemove: Cursor! """ These bundles have been added and are waiting to be removed. """ addedBundles: QueueView_MessageBundle_f4399f0b! """ These bundles have been removed by anticipation and are waiting to be added. At least one of `added_bundles` and `removed_bundles` should be empty. """ removedBundles: QueueView_MessageBundle_f4399f0b! } """ A bundle of cross-chain messages. """ type IncomingBundle { """ The origin of the messages (chain and channel if any). """ origin: Origin! """ The messages to be delivered to the inbox identified by `origin`. """ bundle: MessageBundle! """ What to do with the message. """ action: MessageAction! } """ A scalar that can represent any JSON Object value. """ scalar JSONObject type LogView_BlockHeight_e824a938 { entries(start: Int, end: Int): [BlockHeight!]! } type LogView_ChainAndHeight_7af83576 { entries(start: Int, end: Int): [ChainAndHeight!]! } type LogView_CryptoHash_5f6ab77f { entries(start: Int, end: Int): [CryptoHash!]! } input MapFilters_ChannelFullName_3b59bf69 { keys: [ChannelFullName!] } input MapFilters_Origin_742d451b { keys: [Origin!] } input MapFilters_Owner_6898ce22 { keys: [Owner!] } input MapFilters_Target_7aac1e1c { keys: [Target!] } input MapInput_ChannelFullName_3b59bf69 { filters: MapFilters_ChannelFullName_3b59bf69 } input MapInput_Origin_742d451b { filters: MapFilters_Origin_742d451b } input MapInput_Owner_6898ce22 { filters: MapFilters_Owner_6898ce22 } input MapInput_Target_7aac1e1c { filters: MapFilters_Target_7aac1e1c } type MapView_Owner_Amount_ef5edbab { keys(count: Int): [Owner!]! entry(key: Owner!): Entry_Owner_Amount_202623bd! entries(input: MapInput_Owner_6898ce22): [Entry_Owner_Amount_202623bd!]! } """ An message to be sent and possibly executed in the receiver's block. """ scalar Message """ Whether an incoming message is accepted or rejected. """ scalar MessageAction """ A set of messages from a single block, for a single destination. """ type MessageBundle { """ The block height. """ height: BlockHeight! """ The block's timestamp. """ timestamp: Timestamp! """ The confirmed block certificate hash. """ certificateHash: CryptoHash! """ The index of the transaction in the block that is sending this bundle. """ transactionIndex: Int! """ The relevant messages. """ messages: [PostedMessage!]! } """ The kind of outgoing message being sent """ scalar MessageKind type MutationRoot { """ Processes the inbox and returns the lists of certificate hashes that were created, if any. """ processInbox(chainId: ChainId!): [CryptoHash!]! """ Retries the pending block that was unsuccessfully proposed earlier. """ retryPendingBlock(chainId: ChainId!): CryptoHash """ Transfers `amount` units of value from the given owner's account to the recipient. If no owner is given, try to take the units out of the unattributed account. """ transfer(chainId: ChainId!, owner: Owner, recipient: Recipient!, amount: Amount!): CryptoHash! """ Claims `amount` units of value from the given owner's account in the remote `target` chain. Depending on its configuration, the `target` chain may refuse to process the message. """ claim(chainId: ChainId!, owner: Owner!, targetId: ChainId!, recipient: Recipient!, amount: Amount!): CryptoHash! """ Test if a data blob is readable from a transaction in the current chain. """ readDataBlob(chainId: ChainId!, hash: CryptoHash!): CryptoHash! """ Creates (or activates) a new chain by installing the given authentication key. This will automatically subscribe to the future committees created by `admin_id`. """ openChain(chainId: ChainId!, publicKey: PublicKey!, balance: Amount): ChainId! """ Creates (or activates) a new chain by installing the given authentication keys. This will automatically subscribe to the future committees created by `admin_id`. """ openMultiOwnerChain( chainId: ChainId!, applicationPermissions: ApplicationPermissions, publicKeys: [PublicKey!]!, weights: [Int!], multiLeaderRounds: Int, balance: Amount, """ The duration of the fast round, in milliseconds; default: no timeout """ fastRoundMs: Int, """ The duration of the first single-leader and all multi-leader rounds """ baseTimeoutMs: Int! = 10000, """ The number of milliseconds by which the timeout increases after each single-leader round """ timeoutIncrementMs: Int! = 1000, """ The age of an incoming tracked or protected message after which the validators start transitioning the chain to fallback mode, in milliseconds. """ fallbackDurationMs: Int! = 86400000 ): ChainId! """ Closes the chain. """ closeChain(chainId: ChainId!): CryptoHash! """ Changes the authentication key of the chain. """ changeOwner(chainId: ChainId!, newPublicKey: PublicKey!): CryptoHash! """ Changes the authentication key of the chain. """ changeMultipleOwners( chainId: ChainId!, newPublicKeys: [PublicKey!]!, newWeights: [Int!]!, multiLeaderRounds: Int!, """ The duration of the fast round, in milliseconds; default: no timeout """ fastRoundMs: Int, """ The duration of the first single-leader and all multi-leader rounds """ baseTimeoutMs: Int! = 10000, """ The number of milliseconds by which the timeout increases after each single-leader round """ timeoutIncrementMs: Int! = 1000, """ The age of an incoming tracked or protected message after which the validators start transitioning the chain to fallback mode, in milliseconds. """ fallbackDurationMs: Int! = 86400000 ): CryptoHash! """ Changes the application permissions configuration on this chain. """ changeApplicationPermissions(chainId: ChainId!, closeChain: [ApplicationId!]!, executeOperations: [ApplicationId!], mandatoryApplications: [ApplicationId!]!): CryptoHash! """ (admin chain only) Registers a new committee. This will notify the subscribers of the admin chain so that they can migrate to the new epoch (by accepting the notification as an "incoming message" in a next block). """ createCommittee(chainId: ChainId!, epoch: Epoch!, committee: Committee!): CryptoHash! """ Subscribes to a system channel. """ subscribe(subscriberChainId: ChainId!, publisherChainId: ChainId!, channel: SystemChannel!): CryptoHash! """ Unsubscribes from a system channel. """ unsubscribe(subscriberChainId: ChainId!, publisherChainId: ChainId!, channel: SystemChannel!): CryptoHash! """ (admin chain only) Removes a committee. Once this message is accepted by a chain, blocks from the retired epoch will not be accepted until they are followed (hence re-certified) by a block certified by a recent committee. """ removeCommittee(chainId: ChainId!, epoch: Epoch!): CryptoHash! """ Publishes a new application bytecode. """ publishBytecode(chainId: ChainId!, contract: Bytecode!, service: Bytecode!): BytecodeId! """ Publishes a new data blob. """ publishDataBlob(chainId: ChainId!, bytes: [Int!]!): CryptoHash! """ Creates a new application. """ createApplication(chainId: ChainId!, bytecodeId: BytecodeId!, parameters: String!, instantiationArgument: String!, requiredApplicationIds: [ApplicationId!]!): ApplicationId! """ Requests a `RegisterApplications` message from another chain so the application can be used on this one. """ requestApplication(chainId: ChainId!, applicationId: ApplicationId!, targetChainId: ChainId): CryptoHash! } """ Notify that a chain has a new certified block or a new message """ scalar Notification """ An operation to be executed in a block """ scalar Operation """ A record of a single oracle response. """ scalar OracleResponse """ The origin of a message, relative to a particular application. Used to identify each inbox. """ scalar Origin """ The state of an outbox * An outbox is used to send messages to another chain. * Internally, this is implemented as a FIFO queue of (increasing) block heights. Messages are contained in blocks, together with destination information, so currently we just send the certified blocks over and let the receivers figure out what were the messages for them. * When marking block heights as received, messages at lower heights are also marked (ie. dequeued). """ type OutboxStateView { """ The minimum block height accepted in the future. """ nextHeightToSchedule: BlockHeight! """ Keep sending these certified blocks of ours until they are acknowledged by receivers. """ queue: QueueView_BlockHeight_e824a938! } """ A posted message together with routing information. """ type OutgoingMessage { """ The destination of the message. """ destination: Destination! """ The user authentication carried by the message, if any. """ authenticatedSigner: Owner """ A grant to pay for the message execution. """ grant: Amount! """ Where to send a refund for the unused part of the grant after execution, if any. """ refundGrantTo: Account """ The kind of message being sent. """ kind: MessageKind! """ The message itself. """ message: Message! } """ The owner of a chain. This is currently the hash of the owner's public key used to verify signatures. """ scalar Owner """ A message together with kind, authentication and grant information. """ type PostedMessage { """ The user authentication carried by the message, if any. """ authenticatedSigner: Owner """ A grant to pay for the message execution. """ grant: Amount! """ Where to send a refund for the unused part of the grant after execution, if any. """ refundGrantTo: Account """ The kind of message being sent. """ kind: MessageKind! """ The index of the message in the sending block. """ index: Int! """ The message itself. """ message: Message! } """ A signature public key """ scalar PublicKey type QueryRoot { chain(chainId: ChainId!): ChainStateExtendedView! applications(chainId: ChainId!): [ApplicationOverview!]! chains: Chains! block(hash: CryptoHash, chainId: ChainId!): HashedCertificateValue blocks(from: CryptoHash, chainId: ChainId!, limit: Int): [HashedCertificateValue!]! """ Returns the version information on this node service. """ version: VersionInfo! } type QueueView_BlockHeight_e824a938 { entries(count: Int): [BlockHeight!]! } type QueueView_MessageBundle_f4399f0b { entries(count: Int): [MessageBundle!]! } type QueueView_TimestampedBundleInInbox_5a630c55 { entries(count: Int): [TimestampedBundleInInbox!]! } """ The recipient of a transfer """ scalar Recipient type ReentrantCollectionView_ChannelFullName_ChannelStateView_629706216 { keys: [ChannelFullName!]! entry(key: ChannelFullName!): Entry_ChannelFullName_ChannelStateView_ef52a064! entries(input: MapInput_ChannelFullName_3b59bf69): [Entry_ChannelFullName_ChannelStateView_ef52a064!]! } type ReentrantCollectionView_Origin_InboxStateView_3699835794 { keys: [Origin!]! entry(key: Origin!): Entry_Origin_InboxStateView_c4db01d6! entries(input: MapInput_Origin_742d451b): [Entry_Origin_InboxStateView_c4db01d6!]! } type ReentrantCollectionView_Target_OutboxStateView_2789119133 { keys: [Target!]! entry(key: Target!): Entry_Target_OutboxStateView_50a86149! entries(input: MapInput_Target_7aac1e1c): [Entry_Target_OutboxStateView_50a86149!]! } """ A collection of prices and limits associated with block execution. """ input ResourceControlPolicy { """ The base price for creating a new block. """ block: Amount! """ The price per unit of fuel (aka gas) for VM execution. """ fuelUnit: Amount! """ The price of one read operation. """ readOperation: Amount! """ The price of one write operation. """ writeOperation: Amount! """ The price of reading a byte. """ byteRead: Amount! """ The price of writing a byte """ byteWritten: Amount! """ The price of increasing storage by a byte. """ byteStored: Amount! """ The base price of adding an operation to a block. """ operation: Amount! """ The additional price for each byte in the argument of a user operation. """ operationByte: Amount! """ The base price of sending a message from a block. """ message: Amount! """ The additional price for each byte in the argument of a user message. """ messageByte: Amount! """ The maximum amount of fuel a block can consume. """ maximumFuelPerBlock: Int! """ The maximum size of an executed block. This includes the block proposal itself as well as the execution outcome. """ maximumExecutedBlockSize: Int! """ The maximum data to read per block """ maximumBytesReadPerBlock: Int! """ The maximum data to write per block """ maximumBytesWrittenPerBlock: Int! } """ An event stream ID. """ type StreamId { """ The application that can add events to this stream. """ applicationId: GenericApplicationId! """ The name of this stream: an application can have multiple streams with different names. """ streamName: StreamName! } """ The name of an event stream """ scalar StreamName type SubscriptionRoot { """ Subscribes to notifications from the specified chain. """ notifications(chainId: ChainId!): Notification! } """ The channels available in the system application. """ enum SystemChannel { """ Channel used to broadcast reconfigurations. """ ADMIN } type SystemExecutionStateView { description: ChainDescription epoch: Epoch adminId: ChainId subscriptions: [ChannelSubscription!]! committees: JSONObject! ownership: ChainOwnership! balance: Amount! balances: MapView_Owner_Amount_ef5edbab! timestamp: Timestamp! } """ The target of a message, relative to a particular application. Used to identify each outbox. """ scalar Target """ A timestamp, in microseconds since the Unix epoch """ scalar Timestamp """ An origin, cursor and timestamp of a unskippable bundle in our inbox. """ type TimestampedBundleInInbox { """ The origin and cursor of the bundle. """ entry: BundleInInbox! """ The timestamp when the bundle was added to the inbox. """ seen: Timestamp! } """ Description of the necessary information to run a user application """ scalar UserApplicationDescription """ The version info of a build of Linera. """ type VersionInfo { """ The crate version """ crateVersion: CrateVersion! """ The git commit hash """ gitCommit: String! """ Whether the git checkout was dirty """ gitDirty: Boolean! """ A hash of the RPC API """ rpcHash: String! """ A hash of the GraphQL API """ graphqlHash: String! """ A hash of the WIT API """ witHash: String! } directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT schema { query: QueryRoot mutation: MutationRoot subscription: SubscriptionRoot }