-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0ab8d5
commit bac2355
Showing
7 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// SONARE: Runtime environment for formally-verifiable distributed software | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Designed in 2019-2024 by Dr Maxim Orlovsky <[email protected]> | ||
// Written in 2024-2025 by Dr Maxim Orlovsky <[email protected]> | ||
// | ||
// Copyright (C) 2019-2025 LNP/BP Standards Association, Switzerland. | ||
// Copyright (C) 2024-2025 Laboratories for Ubiquitous Deterministic Computing (UBIDECO), | ||
// Institute for Distributed and Cognitive Systems (InDCS), Switzerland. | ||
// Copyright (C) 2019-2025 Dr Maxim Orlovsky. | ||
// All rights under the above copyrights are reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software distributed under the License | ||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
// or implied. See the License for the specific language governing permissions and limitations under | ||
// the License. | ||
|
||
use aluvm::Vm; | ||
use amplify::confinement::{TinyOrdMap, TinyString}; | ||
use ultrasonic::{CallId, Ffv}; | ||
|
||
use super::{MethodName, StateApi, StateName, VmType}; | ||
|
||
/// Issuer is a form of API which issues a contract. It is a non-interface specific though. | ||
pub struct Issuer { | ||
pub version: Ffv, | ||
|
||
pub codex: CodexId, | ||
|
||
// TODO: Add developer etc. | ||
/// Virtual machine used by `state` and `readers`. | ||
/// | ||
/// NB: `verifiers` always use VM type defined by the contract itself (currently zk-AluVM). | ||
pub vm: VmType, | ||
|
||
/// State API defines how specific state types (both append-only and destructible) are | ||
/// constructed out of (and converted into) UltraSONIC memory cells. | ||
pub issued_state: TinyOrdMap<StateName, StateApi<Vm>>, | ||
|
||
/// Links between named transaction methods defined in the interface - and corresponding | ||
/// verifier call ids defined by the contract. | ||
/// | ||
/// NB: Multiple methods from the interface may call to the came verifier. | ||
pub issue_verifiers: TinyOrdMap<MethodName, CallId>, | ||
|
||
/// Maps error type reported by a contract verifier via `EA` value to an error description taken | ||
/// from the interfaces. | ||
pub issue_errors: TinyOrdMap<u128, TinyString>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters