@massalabs/massa-web3
Version:
massa's web3 sdk client
35 lines (34 loc) • 1.19 kB
TypeScript
import { Mas } from './mas';
/**
* Calculates the cost of a given number of bytes.
*
* @param numberOfBytes - The number of bytes.
*
* @returns The cost in the smallest unit of the Massa currency.
*/
export declare function bytes(numberOfBytes: number): Mas;
/**
* Calculates the cost of creating a new account.
*
* @returns The cost in the smallest unit of the Massa currency.
*/
export declare function account(): Mas;
/**
* Calculates the cost of deploying a smart contract.
*
* @remarks
* The cost of deploying a smart contract includes the cost of creating a new account.
*
* @param numberOfBytes - The number of bytes of the smart contract.
*
* @returns The cost in the smallest unit of the Massa currency.
*/
export declare function smartContractDeploy(numberOfBytes: number): Mas;
/**
* Compute the storage cost for a given key and value size based on the documentation at:
* https://docs.massa.net/docs/learn/storage-costs
* @param key- The key to store
* @param value - The value to store
* @returns the storage cost for the given key and value size
*/
export declare function datastoreEntry(key: Uint8Array | string, value: Uint8Array | string): bigint;