Socket
Socket
Sign inDemoInstall

@weavery/clarity

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weavery/clarity

Clarity smart contract runtime for JavaScript.


Version published
Weekly downloads
7.1K
decreased by-0.43%
Maintainers
1
Weekly downloads
 
Created
Source

Clarity Runtime for JavaScript

Project license Discord

Acknowledgments

We thank Arweave and Blockstack for sponsoring the development of this project as part of the development of Sworn.

Status

Mapping of Clarity types

ClarityTypeScriptJavaScriptNotes
boolbooleanboolean
(buff N)Uint8ArrayUint8Array
errErr<T>Err
intnumber or bigintnumber or BigInt
(list N T)Array<T>Array
(optional T)T or nullT or null
principalStringString
(response T E)T or Err<E>T or Err
(string-ascii N)StringString
(string-utf8 N)StringString
(tuple ...)Map<String, any>Map
uintnumber or bigintnumber or BigInt

Supported Clarity features

ClarityTypeTypeScriptStatusNotes
*functionmul()
+functionadd()
-functionsub()
/functiondiv()
<functionlt<T>()
<=functionle<T>()
>functiongt<T>()
>=functionge<T>()
appendfunctionappend()
as-contractsyntaxasContract<A>()
as-max-len?syntaxasMaxLen<T>()
at-blocksyntaxatBlock<A>()Not supported by SmartWeave.
block-heightkeywordblockHeight()
concatfunctionconcat()
contract-call?functioncontractCall<A, B>()Not supported by SmartWeave.
contract-callerkeywordcontractCaller()
contract-offunctioncontractOf()Not supported by SmartWeave.
default-tofunctiondefaultTo<T>()
errfunctionerr<T()
filterfunctionfilter<A>()
foldfunctionfold<A, B>()
ft-get-balancefunctionftGetBalance()🚧
ft-mint?functionftMint()🚧
ft-transfer?functionftTransfer()🚧
getfunctionget<T>()
get-block-info?functiongetBlockInfo()Not supported by SmartWeave.
hash160functionhash160()
is-eqfunctionisEq()
is-errfunctionisErr()
is-nonefunctionisNone()
is-okfunctionisOk()
is-somefunctionisSome()
keccak256functionkeccak256()
lenfunctionlen<T>()
listfunctionlist<T>()
mapfunctionmap<A, B>()
map-deletefunctionmapDelete()
map-get?functionmapGet()
map-insertfunctionmapInsert()
map-setfunctionmapSet()
matchsyntaxmatch<T, E>()
modfunctionmod()
nft-get-owner?functionnftGetOwner()🚧
nft-mint?functionnftMint()🚧
nft-transfer?functionnftTransfer()🚧
noneconstantnone
notfunctionnot()
okfunctionok<T, E>()
powfunctionpow()
printfunctionprint<T>()
sha256functionsha256()
sha512functionsha512()
sha512/256functionsha512_256()
somefunctionsome()
to-intfunctiontoInt()🚧
to-uintfunctiontoUint()🚧
try!syntaxtryUnwrap<A, B>()
tuplefunctiontuple()
tx-senderkeywordtxSender()
unwrap!syntaxunwrap<A, B>()
unwrap-err!syntaxunwrapErr<A, B>()
unwrap-err-panicfunctionunwrapErrPanic<A, B>()
unwrap-panicfunctionunwrapPanic<A, B>()
xorfunctionxor()

Legend: ❌ = not supported. 🚧 = work in progress. ✅ = supported. ⓐ = supported on SmartWeave (Arweave).

Keywords

FAQs

Package last updated on 17 Oct 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc