""" 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! } """ 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. """ incomingMessages: [IncomingMessage!]! """ 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 } """ A block height to identify blocks in a chain """ scalar BlockHeight """ 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! """ Sender chain and height of all certified blocks known as a receiver (local ordering). """ receivedLog: LogView_ChainAndHeight! """ Mailboxes used to receive messages indexed by their origin. """ inboxes: ReentrantCollectionView_Origin_InboxStateView! """ Mailboxes used to send messages, indexed by their target. """ outboxes: ReentrantCollectionView_Target_OutboxStateView! """ 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! } """ 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 messages. """ numIncomingMessages: 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 latest block height, if any, to be sent to future subscribers. """ blockHeight: BlockHeight } """ 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 { key: ChannelFullName! value: ChannelStateView! } """ A GraphQL-visible map item, complete with key. """ type Entry_Origin_InboxStateView { key: Origin! value: InboxStateView! } """ A GraphQL-visible map item, complete with key. """ type Entry_Owner_Amount { key: Owner! value: Amount } """ A GraphQL-visible map item, complete with key. """ type Entry_Target_OutboxStateView { key: Target! value: OutboxStateView! } """ A number identifying the configuration of the chain (aka the committee) """ scalar Epoch """ A message together with non replayable information to ensure uniqueness in a particular inbox """ scalar Event """ A block, together with the messages and the state hash resulting from its execution. """ type ExecutedBlock { block: Block! messages: [OutgoingMessage!]! """ For each transaction, the cumulative number of messages created by this and all previous transactions, i.e. `message_counts[i]` is the index of the first message created by transaction `i + 1` or later. """ messageCounts: [Int!]! stateHash: CryptoHash! } type ExecutionStateView { system: SystemExecutionStateView! } type HashedValue { hash: CryptoHash! value: CertificateValue! } """ The state of a inbox. * An inbox is used to track events received and executed locally. * An `Event` consists of a logical cursor `(height, index)` and some message content `message`. * On the surface, an inbox looks like a FIFO queue: the main APIs are `add_event` and `remove_event`. * However, events can also be removed before they are added. When this happens, the events removed by anticipation are tracked in a separate queue. Any event added later will be required to match the first removed event and so on. * The cursors of added events (resp. removed events) must be increasing over time. * Reconciliation of added and removed events is allowed to skip some added events. However, the opposite is not true: every removed event 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 events have been added and are waiting to be removed. """ addedEvents: QueueView_Event! """ These events have been removed by anticipation and are waiting to be added. At least one of `added_events` and `removed_events` should be empty. """ removedEvents: QueueView_Event! } """ A message received from a block of another chain. """ type IncomingMessage { """ The origin of the message (chain and channel if any). """ origin: Origin! """ The content of the message to be delivered to the inbox identified by `origin`. """ event: Event! """ What to do with the message. """ action: MessageAction! } """ A scalar that can represent any JSON Object value. """ scalar JSONObject type LogView_ChainAndHeight { entries(start: Int, end: Int): [ChainAndHeight!]! } type LogView_CryptoHash { entries(start: Int, end: Int): [CryptoHash!]! } input MapFilters_ChannelFullName { keys: [ChannelFullName!] } input MapFilters_Origin { keys: [Origin!] } input MapFilters_Owner { keys: [Owner!] } input MapFilters_Target { keys: [Target!] } input MapInput_ChannelFullName { filters: MapFilters_ChannelFullName } input MapInput_Origin { filters: MapFilters_Origin } input MapInput_Owner { filters: MapFilters_Owner } input MapInput_Target { filters: MapFilters_Target } type MapView_Owner_Amount { keys(count: Int): [Owner!]! entry(key: Owner!): Entry_Owner_Amount! entries(input: MapInput_Owner): [Entry_Owner_Amount!]! } """ 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 """ 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!, userData: UserData): 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!, userData: UserData): 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!, 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 ): 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 ): CryptoHash! """ Changes the application permissions configuration on this chain. """ changeApplicationPermissions(chainId: ChainId!, closeChain: [ApplicationId!]!, executeOperations: [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! """ Creates a new application. """ createApplication(chainId: ChainId!, bytecodeId: BytecodeId!, parameters: String!, initializationArgument: 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 """ 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! } """ A 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 event 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 signature public key """ scalar PublicKey type QueryRoot { chain(chainId: ChainId!): ChainStateExtendedView! applications(chainId: ChainId!): [ApplicationOverview!]! chains: Chains! block(hash: CryptoHash, chainId: ChainId!): HashedValue blocks(from: CryptoHash, chainId: ChainId!, limit: Int): [HashedValue!]! """ Returns the version information on this node service. """ version: VersionInfo! } type QueueView_BlockHeight { entries(count: Int): [BlockHeight!]! } type QueueView_Event { entries(count: Int): [Event!]! } """ The recipient of a transfer """ scalar Recipient type ReentrantCollectionView_ChannelFullName_ChannelStateView { keys: [ChannelFullName!]! entry(key: ChannelFullName!): Entry_ChannelFullName_ChannelStateView! entries(input: MapInput_ChannelFullName): [Entry_ChannelFullName_ChannelStateView!]! } type ReentrantCollectionView_Origin_InboxStateView { keys: [Origin!]! entry(key: Origin!): Entry_Origin_InboxStateView! entries(input: MapInput_Origin): [Entry_Origin_InboxStateView!]! } type ReentrantCollectionView_Target_OutboxStateView { keys: [Target!]! entry(key: Target!): Entry_Target_OutboxStateView! entries(input: MapInput_Target): [Entry_Target_OutboxStateView!]! } """ 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 data to read per block """ maximumBytesReadPerBlock: Int! """ The maximum data to write per block """ maximumBytesWrittenPerBlock: Int! } 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 """ Channel used to broadcast new published bytecodes. """ PUBLISHED_BYTECODES } type SystemExecutionStateView { description: ChainDescription epoch: Epoch adminId: ChainId subscriptions: [ChannelSubscription!]! committees: JSONObject! ownership: ChainOwnership! balance: Amount! balances: MapView_Owner_Amount! 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 """ Description of the necessary information to run a user application """ scalar UserApplicationDescription """ Optional user message attached to a transfer """ scalar UserData """ 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 }