Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@alien-worlds/aw-antelope
Advanced tools
The AW-Antelope is part of the AlienWorlds open source project. This repository consists of three main components: **Blockchain Service**, **Smart Contract Service**, and **Serializer**.
The AW-Antelope is part of the AlienWorlds open source project. This repository consists of three main components: Blockchain Service, Smart Contract Service, and Serializer.
To install the @alien-worlds/aw-antelope
package, use the following command:
yarn add @alien-worlds/aw-antelope
Block Reader is responsible for managing the connection to a block reader service and handling block retrieval. It plays a crucial role in ensuring the correct interaction with the blockchain, retrieving all necessary information, and forwarding it to the appropriate handlers.
AntelopeBlockReaderSource
instance.AntelopeShipAbiRepository
instance.Serializer
instance.The Blockchain Service is responsible for handling various blockchain-related operations. This service exposes three main methods:
getInfo()
: Retrieves the blockchain information.getHeadBlockNumber()
: Retrieves the block number of the head block.getLastIrreversibleBlockNumber()
: Retrieves the block number of the last irreversible block.The Smart Contract Service manages operations related to smart contracts. The service currently implements the following method:
getStats(contract: string)
: Retrieves the statistics of the given smart contract.Smart Contract Service is designed not only to fetch contract statistics. The service has protected methods to fetch table data (getOne
, getMany
and getAll
). Thanks to these methods, you can write your own to retrieve data from each of the tables contained in the contract. Examples of use can be found in dedicated contract packages such as aw-contract-dao-worlds
// example of retrieving table data "Candidates"
public readonly fetchCandidates = async (
options?: GetTableRowsOptions
): Promise<Result<CandidatesRawModel[], Error>> => {
return await this.getAll<CandidatesRawModel>('candidate_name', {
...options,
code: 'dao.worlds',
table: 'candidates',
table_key: 'candidate_name',
});
};
The Serializer is responsible for the serialization and deserialization of various data types. It provides the following methods:
getAbiFromHex(hex: string)
: Deserializes ABI from hexadecimal representation.getHexFromAbi(abi: AbiType)
: Converts ABI to hexadecimal string.getTypesFromAbi(abi: UnknownObject)
: Gets types from provided ABI.serialize(value: unknown, type: string, types: Map<string, unknown>)
: Serializes a value to Uint8Array based on the given type.deserialize(value: Uint8Array, type: string, types: Map<string, unknown>)
: Deserializes a value from Uint8Array based on the given type.deserializeActionData(contract: string, action: string, data: Uint8Array, abi: string | UnknownObject)
: Deserializes the action data for a specific account and action.deserializeTableRow(row: Uint8Array, abi: string | UnknownObject)
: Deserializes the table row.deserializeTableRowData(table: string, data: Uint8Array, abi: string | UnknownObject)
: Deserializes a table delta for a specific table.deserializeTransaction(contract: string, data: Uint8Array, abi: string | UnknownObject)
: Deserializes a transaction for a specific contract.deserializeBlock(data: DataType, abi?: string | UnknownObject)
: Deserializes a block.hexToUint8Array(value: string)
: Converts a hexadecimal string to Uint8Array.uint8ArrayToHex(value: Uint8Array)
: Converts a Uint8Array to a hexadecimal string.We welcome contributions from the community. Before contributing, please read through the existing issues on this repository to prevent duplicate submissions. New feature requests and bug reports can be submitted as an issue. If you would like to contribute code, please open a pull request.
This project is licensed under the terms of the MIT license. For more information, refer to the LICENSE file.
FAQs
The AW-Antelope is part of the AlienWorlds open source project. This repository consists of three main components: **Blockchain Service**, **Smart Contract Service**, and **Serializer**.
We found that @alien-worlds/aw-antelope demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.