Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SmartWeaveGlobal

This class is be exposed as a global for contracts as 'SmartWeave' and provides an API for getting further information or using utility and crypto functions from inside the contracts execution.

It provides an api:

  • SmartWeave.transaction.id
  • SmartWeave.transaction.reward
  • SmartWeave.block.height
  • SmartWeave.block.timestamp
  • etc

and access to some of the arweave utils:

  • SmartWeave.arweave.utils
  • SmartWeave.arweave.crypto
  • SmartWeave.arweave.wallets
  • SmartWeave.arweave.ar

as well as access to the potentially non-deterministic full client:

  • SmartWeave.unsafeClient

Hierarchy

  • SmartWeaveGlobal

Index

Constructors

constructor

  • new SmartWeaveGlobal(arweave: default, contract: { id: string; owner: string }): SmartWeaveGlobal

Properties

Optional _activeTx

_activeTx: InteractionTx

arweave

arweave: Pick<default, "ar" | "wallets" | "utils" | "crypto">

block

block: Block

contract

contract: { id: string; owner: string }

Type declaration

  • id: string
  • owner: string

contracts

contracts: { readContractState: any; viewContractState: any }

Type declaration

transaction

transaction: Transaction

unsafeClient

unsafeClient: default

Accessors

_isDryRunning

  • get _isDryRunning(): boolean

Generated using TypeDoc