Skip to content

blocklessnetwork/extension-lit-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lit-protocol-extension

this is a lit protocol extension built for CLI / Blockless Runtime using @blocklessnetwork/dllify

Usage Lit as a CLI

build the binary

$ yarn build

then execute a test method directly against the exe on the command line

$ yarn test verifyJWT eyJhbGciOiJCTFMxMi0zODEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJMSVQiLCJzdWIiOiIweDUwZTJkYWM1ZTc4YjU5MDVjYjA5NDk1NTQ3NDUyY2VlNjQ0MjZkYjIiLCJjaGFpbiI6InBvbHlnb24iLCJpYXQiOjE2NjgwMjg3OTIsImV4cCI6MTY2ODA3MTk5MiwiYmFzZVVybCI6Im15LWR5bmFtaWMtY29udGVudC1zZXJ2ZXIuY29tIiwicGF0aCI6Ii9haXh3emhuc2hoc3cxMTliNWU0c2tlIiwib3JnSWQiOiIiLCJyb2xlIjoiIiwiZXh0cmFEYXRhIjoiIn0.ocHC0tcGUcHaweEuZXdXRgYNFUFXrsNZmxA-q49mhNehPfXrU1wGo7To6Jbtz_mNALpJ7Hf8_vQ_Vg-Qb1-uIIIG-EPt2Pg1tX5OA-aDeyU0F12xwGu8nGjJCkZI8jfJ

output

{"verified":true,"header":{"alg":"BLS12-381","typ":"JWT"},"payload":{"iss":"LIT","sub":"0x50e2dac5e78b5905cb09495547452cee64426db2","chain":"polygon","iat":1668028792,"exp":1668071992,"baseUrl":"my-dynamic-content-server.com","path":"/aixwzhnshhsw119b5e4ske","orgId":"","role":"","extraData":""}}

WASM Function with Lit as a Blockless Extension

building the example

test-extension is the source for a WASM function. Build using

(cd test-extension && npm run build:release)

executing the example

depends on the blockless runtime. a precompiled version of the runtime can be found on github https://github.com/blocklessnetwork/bls-runtime/releases

bls-runtime --drivers-root-path=$PWD/build $PWD/test-extension/build/release.wasm