Total Flashcards
REST
Representation State Transfer
REST Use Case
Used in DApps for retrieving blockchain data
Triggering smart contract actions form front end
SOAP
Simple Object Access Protocol
SOAP Use Case
Less common in modern apps but still used in legacy systems requireing strict message security
RPC
Remote Procedure Call
Local Use Case
Often used for communication between software components on the same machine, like desktop applications accessing system resources
RPC Use Case
Common in DApps to interact with smart contracts on blockchain nodes, facilitating communication across distributed systems
API Acronym
Application Programming Interface (API)
API Purpose
APIs enable decentralised applications (DApps) to interact with blockchains and off-chain systems
Advantages of API’s
Modularity
Scalability
Reusability
Security
Interoperability
How API’s work
Act as intermediaries between clients (e.g., frontend apps) and servers. Clients send requests in a predefined format; APIs process these and return responses, often in JSON or XML, enabling seamless data exchange between systems.
Modularity
Allow modular development by separating backend and frontend components, enabling faster, independent development.
Scalability
APIs make it easier to scale applications by allowing microservices to interact seamlessly, improving performance.
Reusability
APIs enable code reuse, allowing developers to use existing functionality without building from scratch.
Security
APIs often include authentication and authorization, ensuring secure access to data and services.
Interoperability
APIs facilitate communication between different platforms, devices, or services, allowing integration across systems.
Whats is Blockchain
distributed database that maintains a growing list of ordered records called blocks.
How are Blocks linked
Uisng cryptography. Each block contains a hash of the previous block, a timestamp, and transaction data.
Smart Contract
Self-Executing contract with terms directly written into code
Smart Contract (Automation?)
Automatically enforces rules and conditions once pre-defined criteria are met
Key Features
Automation: Transactions occur based on pre-defined rules.
Immutable: Once deployed, can’t be altered
Decentralised: Contracts run on a blockchain, eliminating intermediaries
Transparetn and Secure: Data is visible but tamper proof, due to the blockchain.
Workflow
1: Written in solidity and deployed in ethereum
2: Listens for external events
3: Wehn conditions are met. Contract automatically executes its functions
4: Result is recorded on blockchain, ensuring transparency
Registry
when a contract is promoted to an environment it is installed in the smart contract registry that is shared between all participants
Registry (Contains)
bytecode,
ABI,
developer Docs,
critical information
Registry (Avaialable)
Available at runtime to all participants
Address Book
Used to manage ethereum strings of Hex.
A managed wallet.
A particular token.
A verified instance of a contract.
Address Book (How it works)
when a new instance of a contract is detected it is added to the book with a link to the contract.
all instances of a contract are listed and a REST API for each os auto-generated.
REST API can be used from any node.
Testing
Truffle is an automated testing framework to test msart contracts.
Ways to write a test
Javascript and Typescript: for testing contracts from the outside world
Solidity: for testing your contracts in advanced bare-to-the-metal scenarios.
All files in ./test directory
Truffle will only run .js, .ts, .es, .es6, .jsx, and .sol.
Encryption
The use of a key to encode information so that it cannot be read by nodes without the corresponding decryption key.