diff --git a/.github/workflows/test_branch.yml b/.github/workflows/test_branch.yml index 3b5bd52b..eaf31bf5 100644 --- a/.github/workflows/test_branch.yml +++ b/.github/workflows/test_branch.yml @@ -55,6 +55,7 @@ jobs: mv cli/.js/target/scala-3.1.0/cli-fastopt.js npm/aqua.js cd npm npm i + npm run build cd ../aqua-playground npm i --save-dev ../npm npm i diff --git a/aqua/app.aqua b/aqua/app.aqua deleted file mode 100644 index 26065b92..00000000 --- a/aqua/app.aqua +++ /dev/null @@ -1,9 +0,0 @@ -import "chatApp.aqua" -import "service.aqua" -import "builtin.aqua" -import "demo.aqua" - -func createUser(nickname: string): - on nickname: - AppConfig.getApp() - AppConfig.getApp() \ No newline at end of file diff --git a/aqua/chatApp.aqua b/aqua/chatApp.aqua deleted file mode 100644 index d7e3643c..00000000 --- a/aqua/chatApp.aqua +++ /dev/null @@ -1,3 +0,0 @@ -service AppConfig("affinidi/get-config"): - getApp: -> string - getLocalService: -> string diff --git a/aqua/error.aqua b/aqua/error.aqua deleted file mode 100644 index b71abb95..00000000 --- a/aqua/error.aqua +++ /dev/null @@ -1,45 +0,0 @@ -module Err declares Peer, Op, include - -service Peer("peer"): - is_connected: string -> bool - -service Op("op"): - identity: -> () - -data User: - peer_id: string - relay_id: string - name: string - -service Test("test"): - getUserList: -> []User - doSomething: -> bool - -func include(opt: ?string) -> string: - Peer.is_connected(opt!) - for i <- opt: - Peer.is_connected(i) - <- opt! - -func betterMessage(relay: string, arr: []string, opt: ?string, str: *string) -> ?string: - on relay: - Peer.is_connected("something") - par isOnline <- Peer.is_connected(relay) - par on "quray" via arr: - Peer.is_connected("qurara") - - stream: *string - - localOpt: ?string - - if isOnline: - try: - Test.doSomething() - else: - Peer.is_connected(stream!) - - x <- include(arr) - y <- include(opt) - localOpt <- include(str) - - <- opt \ No newline at end of file diff --git a/aqua/service.aqua b/aqua/service.aqua deleted file mode 100644 index 62425f52..00000000 --- a/aqua/service.aqua +++ /dev/null @@ -1,7 +0,0 @@ -module Srv declares * - -import "chatApp.aqua" - -service Service("affinidi/chat"): - create_user(peer_id: string, relay_id: string, nickname: string) -> string - chats_by_peer_id(peer_id: string) -> string \ No newline at end of file diff --git a/aqua/test/bug-app.aqua b/aqua/test/bug-app.aqua deleted file mode 100644 index c6922147..00000000 --- a/aqua/test/bug-app.aqua +++ /dev/null @@ -1,40 +0,0 @@ -data ServiceInstance: - peer_id: string - service_id: string - - -data App: - history: ServiceInstance - user_list: ServiceInstance - -service UserList: - leave: string -> u32 - -func in(xap: App) -> u32: - UserList xap.user_list.service_id - res <- UserList.leave("line in in()") - <- res - - -func bug(app: App, smth: bool, callback: bool -> ()): - UserList app.user_list.service_id - UserList.leave("line in bug()") - x <- in(app) - callback(smth) - -func addEntry(entry: string, selfPeerId: string) -> AddServiceResult: - app <- AppConfig.getApp() - relay <- AppConfig.get_init_relay() - on relay: - Op.identity() - authRes <- auth() - on app.history.peer_id: - History app.history.service_id - res <- History.add(entry, authRes.is_authenticated) - allUsers <- getUserList() - for user <- allUsers: - on user.relay_id: - Op.identity() - par on user.peer_id: - FluentPad.notifyTextUpdate(entry, selfPeerId, authRes.is_authenticated) - <- res diff --git a/aqua/test/experimental.aqua b/aqua/test/experimental.aqua deleted file mode 100644 index c16013a6..00000000 --- a/aqua/test/experimental.aqua +++ /dev/null @@ -1,36 +0,0 @@ --- This is some data --- With a comment on first lines -data Smth: - a: B - c: []D - oloolo: Akaka - -service MySrv: - func: A, u32 -> u32 - -- We can have comments inside - pure: -> []Cdef - -func do_smth( a: X, b: -> Z ): -- And comments after the line - a <- b() - x(a) - arrCdef <- MySrv.pure() - PoorAbility a - y <- PoorAbility.func() - -func do_smth2( a: X, b: -> Z ): -- And comments after the line - b() - on 32: - OnAb "something" - OnAb.call() - par y <- ParAbb.call() - par on 43: - t <- ParOnAbb.call() - b(a, z) - shouldBeA <- MySrv.func() - -alias Akaka : u32 - -alias Akaka : bool - -service Json("json"): - getString: string, string -> string diff --git a/aqua/test/fluentpad.aqua b/aqua/test/fluentpad.aqua deleted file mode 100644 index 1f6f3396..00000000 --- a/aqua/test/fluentpad.aqua +++ /dev/null @@ -1,18 +0,0 @@ -data User: - peer_id: string - relay_id: string - name: string - -data GetUsersServiceResult: - users: []User - ret_code: s32 - err_msg: string - -service UserList: - get_users: -> GetUsersServiceResult - -func getUserList() -> []User: - on "userlist_node": - UserList "userlist_id" - allUsers <- UserList.get_users() - <- allUsers.users diff --git a/aqua/test/for-par.aqua b/aqua/test/for-par.aqua deleted file mode 100644 index a077d4b2..00000000 --- a/aqua/test/for-par.aqua +++ /dev/null @@ -1,17 +0,0 @@ -service SomeThing("smth"): - callU32: string -> u32 - callBool: string -> bool - getList: -> []string - -func tryFor(): - peers <- SomeThing.getList() - - if false: - SomeThing.callBool("just to have smth before the for") - - par for p <- peers par: - SomeThing.callU32("call u32 inside") - SomeThing.callBool("call bool inside") - - else: - SomeThing.callBool("just to have smth after the for") diff --git a/aqua/test/generate.aqua b/aqua/test/generate.aqua deleted file mode 100644 index 1c3a429d..00000000 --- a/aqua/test/generate.aqua +++ /dev/null @@ -1,39 +0,0 @@ -service Local("local"): - gt: u32, u32 -> bool - onIn: string -> () - onBoolean: bool -> () - -func tryGen(in1: u32, in2: string) -> bool: - on in2: - Local.onIn(in2) - v <- Local.gt(in1, 25) - <- v - -func generateComplex(value: string) -> bool: - on "smth": - Local "other" - b <- tryGen(23, value) - t <- tryGen(24, "should be omitted") - Local.onIn("Should be on other") - Local.onIn("Should be on root") - Local.onBoolean(t) - <- b - -func genArrows(arr: string -> bool): - arr("hi there") - -func genFold(vals: []string): - Local.onIn("hi there") - for v <- vals: - par on v: - Local.onIn(v) - Local.onBoolean(true) - -func wrapGenArrows() -> bool: - on "some peer": - genArrows(generateComplex) - if true == false: - x <- generateComplex("hello there!") - else: - y <- generateComplex("else do this!") - <- x diff --git a/aqua/test/rescope.aqua b/aqua/test/rescope.aqua deleted file mode 100644 index 6cdcc348..00000000 --- a/aqua/test/rescope.aqua +++ /dev/null @@ -1,21 +0,0 @@ -service Exp("exp"): - foo: -> u32 - bar: string -> () - -func expInner() -> u32: - a <- Exp.foo() - b <- Exp.foo() - <- a - -func expInput(v: string) -> u32: - a <- Exp.foo() - Exp.bar(v) - <- a - -func expOuter(input: string, callback: u32 -> ()): - a <- expInner() - b <- Exp.foo() - relay <- expInner() - Exp.bar(input) - expInput(input) - callback(relay) diff --git a/aqua/test/typecheck.aqua b/aqua/test/typecheck.aqua deleted file mode 100644 index 83761b5b..00000000 --- a/aqua/test/typecheck.aqua +++ /dev/null @@ -1,20 +0,0 @@ -data Inside: - foo: u32 - bar: bool - -data Wrapping: - inside: Inside - value: string - -data Enclosing: - wrap: Wrapping - arr: []Wrapping - flag: bool - -func call(enc: Enclosing, oni32: u32 -> (), onString: string -> (), onBool: bool -> (), onInside: Inside -> Inside) -> Inside: - onBool(enc.flag) - onBool(enc.wrap) - if enc.flag == enc.wrap: - oni32(22) - <- enc.wrap.inside - diff --git a/cli/.js/src/main/scala/aqua/PlatformOpts.scala b/cli/.js/src/main/scala/aqua/PlatformOpts.scala index 9f0eaaa7..d09f7157 100644 --- a/cli/.js/src/main/scala/aqua/PlatformOpts.scala +++ b/cli/.js/src/main/scala/aqua/PlatformOpts.scala @@ -1,5 +1,6 @@ package aqua +import aqua.ipfs.IpfsOpts import aqua.js.{Meta, Module} import cats.effect.ExitCode import cats.effect.kernel.Async @@ -18,7 +19,8 @@ object PlatformOpts extends Logging { def opts[F[_]: Files: AquaIO: Async](implicit ec: ExecutionContext): Opts[F[ExitCode]] = Opts.subcommand(RunOpts.runCommand[F]) orElse - Opts.subcommand(KeyPairOpts.createKeypair[F]) + Opts.subcommand(KeyPairOpts.createKeypair[F]) orElse + Opts.subcommand(IpfsOpts.upload[F]) // get path to node modules if there is `aqua-lib` module with `builtin.aqua` in it def getGlobalNodeModulePath: Option[Path] = { diff --git a/cli/.js/src/main/scala/aqua/builder/ArgumentGetter.scala b/cli/.js/src/main/scala/aqua/builder/ArgumentGetter.scala index 567220ef..fa8b4e06 100644 --- a/cli/.js/src/main/scala/aqua/builder/ArgumentGetter.scala +++ b/cli/.js/src/main/scala/aqua/builder/ArgumentGetter.scala @@ -1,22 +1,32 @@ package aqua.builder +import aqua.backend.{ArgDefinition, PrimitiveType, ServiceDef, ServiceFunctionDef} import aqua.js.{CallJsFunction, CallServiceHandler, FluencePeer} import aqua.model.func.Call import aqua.model.func.raw.CallServiceTag import aqua.model.{LiteralModel, VarModel} +import scalajs.js import scala.concurrent.Promise // Service that can return argument to use it from a code case class ArgumentGetter(serviceId: String, value: VarModel, arg: scalajs.js.Dynamic) extends ServiceFunction { - def registerService(peer: FluencePeer): CallServiceHandler = { + def registerService(peer: FluencePeer): Unit = { CallJsFunction.registerService( peer, serviceId, value.name, - _ => arg + _ => js.Promise.resolve(arg), + ServiceDef( + None, + ServiceFunctionDef( + value.name, + Nil, + PrimitiveType + ) :: Nil + ) ) } diff --git a/cli/.js/src/main/scala/aqua/builder/Console.scala b/cli/.js/src/main/scala/aqua/builder/Console.scala index cd0f7aaa..f46e7dc2 100644 --- a/cli/.js/src/main/scala/aqua/builder/Console.scala +++ b/cli/.js/src/main/scala/aqua/builder/Console.scala @@ -1,15 +1,18 @@ package aqua.builder +import aqua.backend.{ArgDefinition, PrimitiveType, ServiceDef, ServiceFunctionDef, VoidType} import aqua.io.OutputPrinter import aqua.js.{CallJsFunction, CallServiceHandler, FluencePeer} import aqua.model.func.Call import aqua.model.func.raw.CallServiceTag import aqua.model.{LiteralModel, VarModel} -import scala.scalajs.js.JSON +import scala.scalajs.js +import scala.scalajs.js.{Dynamic, JSON} // Function to print any variables that passed as arguments -class Console(serviceId: String, fnName: String) extends ServiceFunction { +class Console(serviceId: String, fnName: String, resultNames: List[String]) + extends ServiceFunction { def callTag(variables: List[VarModel]): CallServiceTag = { CallServiceTag( @@ -19,17 +22,33 @@ class Console(serviceId: String, fnName: String) extends ServiceFunction { ) } - def registerService(peer: FluencePeer): CallServiceHandler = { - CallJsFunction.registerUnitService( + def registerService(peer: FluencePeer): Unit = { + CallJsFunction.registerService( peer, serviceId, fnName, - args => { - val str = JSON.stringify(args, space = 2) + varArgs => { + // drop last argument (tetraplets) + val args: Seq[js.Any] = varArgs.init + val toPrint = args.toList match { + case arg :: Nil => JSON.stringify(arg, space = 2) + case _ => args.map(a => JSON.stringify(a, space = 2)).mkString("[\n", ",\n", "\n]") + } + // if an input function returns a result, our success will be after it is printed // otherwise finish after JS SDK will finish sending a request - OutputPrinter.print(str) - } + OutputPrinter.print(toPrint) + // empty JS object + js.Promise.resolve(ServiceFunction.emptyObject) + }, + ServiceDef( + None, + ServiceFunctionDef( + fnName, + resultNames.map(n => ArgDefinition(n, PrimitiveType)), + VoidType + ) :: Nil + ) ) } } diff --git a/cli/.js/src/main/scala/aqua/builder/Finisher.scala b/cli/.js/src/main/scala/aqua/builder/Finisher.scala index eee7d856..b40c9df2 100644 --- a/cli/.js/src/main/scala/aqua/builder/Finisher.scala +++ b/cli/.js/src/main/scala/aqua/builder/Finisher.scala @@ -1,5 +1,6 @@ package aqua.builder +import aqua.backend.{ServiceDef, ServiceFunctionDef, VoidType} import aqua.io.OutputPrinter import aqua.js.{CallJsFunction, FluencePeer} import aqua.model.func.Call @@ -7,7 +8,9 @@ import aqua.model.func.raw.CallServiceTag import aqua.model.{LiteralModel, VarModel} import scala.concurrent.Promise +import scala.scalajs.js import scala.scalajs.js.JSON +import scala.scalajs.js.Dynamic // Will finish promise on service call case class Finisher private ( @@ -25,13 +28,22 @@ case class Finisher private ( } def registerService(peer: FluencePeer) = { - CallJsFunction.registerUnitService( + CallJsFunction.registerService( peer, serviceId, fnName, _ => { promise.success(()) - } + js.Promise.resolve(ServiceFunction.emptyObject) + }, + ServiceDef( + None, + ServiceFunctionDef( + fnName, + Nil, + VoidType + ) :: Nil + ) ) } } diff --git a/cli/.js/src/main/scala/aqua/builder/IPFSUploader.scala b/cli/.js/src/main/scala/aqua/builder/IPFSUploader.scala new file mode 100644 index 00000000..d0cb5ce1 --- /dev/null +++ b/cli/.js/src/main/scala/aqua/builder/IPFSUploader.scala @@ -0,0 +1,35 @@ +package aqua.builder + +import aqua.backend.{ArgDefinition, PrimitiveType, ServiceDef, ServiceFunctionDef, VoidType} +import aqua.ipfs.js.IpfsApi +import aqua.js.{CallJsFunction, CallServiceHandler, FluencePeer} +import scribe.Logging +import scalajs.js + +class IPFSUploader(serviceId: String, fnName: String) extends ServiceFunction with Logging { + + def registerService(peer: FluencePeer): Unit = { + CallJsFunction.registerService( + peer, + serviceId, + fnName, + args => { + + IpfsApi + .uploadFile(args(0), args(1), logger.info: String => Unit, logger.error: String => Unit) + .`catch` { err => + js.Dynamic.literal(error = "Error on uploading file: " + err) + } + + }, + ServiceDef( + None, + ServiceFunctionDef( + fnName, + ArgDefinition("path", PrimitiveType) :: ArgDefinition("multiaddr", PrimitiveType) :: Nil, + PrimitiveType + ) :: Nil + ) + ) + } +} diff --git a/cli/.js/src/main/scala/aqua/builder/ServiceFunction.scala b/cli/.js/src/main/scala/aqua/builder/ServiceFunction.scala index c7ca6f9b..9f46eee7 100644 --- a/cli/.js/src/main/scala/aqua/builder/ServiceFunction.scala +++ b/cli/.js/src/main/scala/aqua/builder/ServiceFunction.scala @@ -1,7 +1,12 @@ package aqua.builder import aqua.js.{CallServiceHandler, FluencePeer} +import scalajs.js.Dynamic trait ServiceFunction { - def registerService(peer: FluencePeer): CallServiceHandler + def registerService(peer: FluencePeer): Unit +} + +object ServiceFunction { + val emptyObject: Dynamic = Dynamic.literal() } diff --git a/cli/.js/src/main/scala/aqua/ipfs/IpfsOpts.scala b/cli/.js/src/main/scala/aqua/ipfs/IpfsOpts.scala new file mode 100644 index 00000000..9f1d5fb1 --- /dev/null +++ b/cli/.js/src/main/scala/aqua/ipfs/IpfsOpts.scala @@ -0,0 +1,69 @@ +package aqua.ipfs + +import aqua.{AppOpts, AquaIO, FluenceOpts, LogFormatter, LogLevelTransformer} +import aqua.io.OutputPrinter +import aqua.js.{Fluence, PeerConfig} +import aqua.keypair.KeyPairShow.show +import cats.data.{NonEmptyChain, NonEmptyList, Validated, ValidatedNec, ValidatedNel} +import Validated.{invalid, invalidNec, valid, validNec, validNel} +import aqua.builder.IPFSUploader +import aqua.files.AquaFilesIO +import aqua.ipfs.js.IpfsApi +import aqua.model.LiteralModel +import aqua.run.RunCommand.createKeyPair +import aqua.run.{RunCommand, RunConfig, RunOpts} +import cats.effect.{Concurrent, ExitCode, Resource, Sync} +import cats.syntax.flatMap.* +import cats.syntax.functor.* +import cats.syntax.applicative.* +import cats.syntax.apply.* +import cats.effect.kernel.Async +import cats.syntax.show.* +import cats.{Applicative, Monad} +import com.monovore.decline.{Command, Opts} +import fs2.io.file.{Files, Path} +import scribe.Logging + +import scala.concurrent.{ExecutionContext, Future} +import scala.scalajs.js + +// Options and commands to work with IPFS +object IpfsOpts extends Logging { + + val IpfsAquaPath = "aqua/ipfs.aqua" + val UploadFuncName = "uploadFile" + + def pathOpt[F[_]: Files: Concurrent]: Opts[String] = + Opts + .option[String]("path", "Path to file", "p") + + // Uploads a file to IPFS + def upload[F[_]: Async](implicit ec: ExecutionContext): Command[F[ExitCode]] = + Command( + name = "upload", + header = "Upload a file to IPFS" + ) { + ( + pathOpt, + FluenceOpts.multiaddrOpt, + AppOpts.logLevelOpt, + AppOpts.wrapWithOption(FluenceOpts.secretKeyOpt), + RunOpts.timeoutOpt, + FluenceOpts.printAir + ).mapN { (path, multiaddr, logLevel, secretKey, timeout, printAir) => + LogFormatter.initLogger(Some(logLevel)) + val ipfsUploader = new IPFSUploader("ipfs", "uploadFile") + implicit val aio: AquaIO[F] = new AquaFilesIO[F] + RunCommand + .run[F]( + multiaddr, + UploadFuncName, + LiteralModel.quote(path) :: Nil, + Path(IpfsAquaPath), + Nil, + RunConfig(timeout, logLevel, printAir, secretKey, Map.empty, ipfsUploader :: Nil) + ) + .map(_ => ExitCode.Success) + } + } +} diff --git a/cli/.js/src/main/scala/aqua/ipfs/js/IpfsApi.scala b/cli/.js/src/main/scala/aqua/ipfs/js/IpfsApi.scala new file mode 100644 index 00000000..292042e7 --- /dev/null +++ b/cli/.js/src/main/scala/aqua/ipfs/js/IpfsApi.scala @@ -0,0 +1,18 @@ +package aqua.ipfs.js + +import aqua.js.FluencePeer + +import scala.scalajs.js +import scala.scalajs.js.annotation.{JSExportAll, JSImport} + +object IpfsApi { + + @js.native + @JSImport("./dist/ipfs.js", "uploadFile") + def uploadFile( + path: js.Any, + multiaddrResult: js.Any, + infoLogger: js.Any, + errorLogger: js.Any + ): js.Promise[js.Dynamic] = js.native +} diff --git a/cli/.js/src/main/scala/aqua/js/CallJsFunction.scala b/cli/.js/src/main/scala/aqua/js/CallJsFunction.scala index 20ce8d94..86566bb0 100644 --- a/cli/.js/src/main/scala/aqua/js/CallJsFunction.scala +++ b/cli/.js/src/main/scala/aqua/js/CallJsFunction.scala @@ -1,6 +1,6 @@ package aqua.js -import aqua.backend.{ArgDefinition, FunctionDef, NamesConfig, TypeDefinition} +import aqua.backend.{ArgDefinition, FunctionDef, NamesConfig, ServiceDef, TypeDefinition} import aqua.model.transform.TransformConfig import aqua.model.transform.res.FuncRes import aqua.types.Type @@ -9,41 +9,24 @@ import scala.concurrent.{ExecutionContext, Future, Promise} import scala.scalajs.js import scala.scalajs.js.JSConverters.* +trait ServiceHandler extends js.Function { + def apply(args: js.Any*): js.Promise[js.Dynamic] +} + object CallJsFunction { def registerService( peer: FluencePeer, serviceId: String, fnName: String, - handler: js.Array[js.Any] => js.Dynamic - ): CallServiceHandler = { - peer.internals.callServiceHandler.use((req, resp, next) => { - if (req.serviceId == serviceId && req.fnName == fnName) { - val result = handler(req.args) - resp.retCode = ResultCodes.success - resp.result = result - } - - next() - }) - } - - // Register a service that returns no result - def registerUnitService( - peer: FluencePeer, - serviceId: String, - fnName: String, - handler: js.Array[js.Any] => Unit - ): CallServiceHandler = { - registerService( - peer, - serviceId, - fnName, - arr => { - handler(arr) - js.Dynamic.literal() - } - ) + handler: ServiceHandler, + servideDef: ServiceDef + ): Unit = { + js.Function + val func = js.Dynamic.literal(fnName -> handler) + val args: js.Array[js.Any] = + js.Array(peer, serviceId, func) + V2.registerService(args, ServiceDefJs(servideDef)) } // Call a function with generated air script diff --git a/cli/.js/src/main/scala/aqua/js/FluenceJsTypes.scala b/cli/.js/src/main/scala/aqua/js/FluenceJsTypes.scala index 9a9bb5d2..e71e915e 100644 --- a/cli/.js/src/main/scala/aqua/js/FluenceJsTypes.scala +++ b/cli/.js/src/main/scala/aqua/js/FluenceJsTypes.scala @@ -1,7 +1,7 @@ package aqua.js import aqua.* -import aqua.backend.{ArgDefinition, FunctionDef, NamesConfig, TypeDefinition} +import aqua.backend.{ArgDefinition, FunctionDef, NamesConfig, ServiceDef, ServiceFunctionDef, TypeDefinition} import scala.concurrent.Promise import scala.scalajs.js @@ -70,15 +70,54 @@ trait PeerStatus extends js.Object { @JSExportAll case class FunctionDefJs( functionName: String, - returnType: TypeDefinition, - argDefs: js.Array[ArgDefinition], + returnType: TypeDefinitionJs, + argDefs: js.Array[ArgDefinitionJs], names: NamesConfigJs ) object FunctionDefJs { def apply(fd: FunctionDef): FunctionDefJs = { - FunctionDefJs(fd.functionName, fd.returnType, fd.argDefs.toJSArray, NamesConfigJs(fd.names)) + FunctionDefJs(fd.functionName, TypeDefinitionJs(fd.returnType), fd.argDefs.map(ArgDefinitionJs.apply).toJSArray, NamesConfigJs(fd.names)) + } +} + +@JSExportAll +case class ArgDefinitionJs( + name: String, + argType: TypeDefinitionJs +) + +object ArgDefinitionJs { + def apply(ad: ArgDefinition): ArgDefinitionJs = ArgDefinitionJs(ad.name, TypeDefinitionJs(ad.argType)) +} + +@JSExportAll +case class TypeDefinitionJs(tag: String) + +object TypeDefinitionJs { + def apply(td: TypeDefinition): TypeDefinitionJs = TypeDefinitionJs(td.tag) +} + +@JSExportAll +case class ServiceFunctionDefJs( + functionName: String, + argDefs: js.Array[ArgDefinitionJs], + returnType: TypeDefinitionJs +) + +object ServiceFunctionDefJs { + def apply(sd: ServiceFunctionDef): ServiceFunctionDefJs = { + ServiceFunctionDefJs(sd.functionName, sd.argDefs.map(ArgDefinitionJs.apply).toJSArray, TypeDefinitionJs(sd.returnType)) + } +} + +@JSExportAll +case class ServiceDefJs(defaultServiceId: Option[String], functions: js.Array[ServiceFunctionDefJs]) + +object ServiceDefJs { + def apply(sd: ServiceDef): ServiceDefJs = { + ServiceDefJs(sd.defaultServiceId, sd.functions.map(ServiceFunctionDefJs.apply).toJSArray) } } @@ -132,6 +171,10 @@ class FluencePeer extends js.Object { object V2 { + @js.native + @JSImport("@fluencelabs/fluence/dist/internal/compilerSupport/v2.js", "registerService") + def registerService(args: js.Array[js.Any], `def`: ServiceDefJs): Unit = js.native + @js.native @JSImport("@fluencelabs/fluence/dist/internal/compilerSupport/v2.js", "callFunction") def callFunction( diff --git a/cli/.js/src/main/scala/aqua/keypair/KeyPairOpts.scala b/cli/.js/src/main/scala/aqua/keypair/KeyPairOpts.scala index 2f1b80ed..0013c4a8 100644 --- a/cli/.js/src/main/scala/aqua/keypair/KeyPairOpts.scala +++ b/cli/.js/src/main/scala/aqua/keypair/KeyPairOpts.scala @@ -17,10 +17,6 @@ import scala.concurrent.{ExecutionContext, Future} // Options and commands to work with KeyPairs object KeyPairOpts extends Logging { - // Used to pass existing keypair to AquaRun - val secretKey: Opts[String] = - Opts.option[String]("secret-key", "Ed25519 32-byte key in base64", "sk") - // KeyPair generation def createKeypair[F[_]: Async](implicit ec: ExecutionContext): Command[F[ExitCode]] = Command( diff --git a/cli/.js/src/main/scala/aqua/run/FuncCaller.scala b/cli/.js/src/main/scala/aqua/run/FuncCaller.scala index d7ffe224..f69c984c 100644 --- a/cli/.js/src/main/scala/aqua/run/FuncCaller.scala +++ b/cli/.js/src/main/scala/aqua/run/FuncCaller.scala @@ -2,7 +2,7 @@ package aqua.run import aqua.LogLevelTransformer import aqua.backend.FunctionDef -import aqua.builder.{Console, Finisher} +import aqua.builder.{Console, Finisher, ServiceFunction} import aqua.io.OutputPrinter import aqua.js.{CallJsFunction, Fluence, FluenceUtils, PeerConfig} import aqua.run.RunCommand.createKeyPair @@ -26,8 +26,8 @@ object FuncCaller { air: String, functionDef: FunctionDef, config: RunConfig, - consoleService: Console, - finisherService: Finisher + finisherService: Finisher, + services: List[ServiceFunction] )(implicit ec: ExecutionContext ): F[Unit] = { @@ -53,15 +53,18 @@ object FuncCaller { ) .toFuture _ = OutputPrinter.print("Your peerId: " + peer.getStatus().peerId) - _ = consoleService.registerService(peer) - _ = finisherService.registerService(peer) - _ = config.argumentGetters.values.map(_.registerService(peer)) + // register all services + _ = (services ++ config.argumentGetters.values :+ finisherService).map( + _.registerService(peer) + ) callFuture = CallJsFunction.funcCallJs( air, functionDef, List.empty ) - _ <- Future.firstCompletedOf(finisherService.promise.future :: callFuture :: Nil) + // error will be thrown on failed call + _ <- callFuture + _ <- finisherService.promise.future } yield ()).recover(handleFuncCallErrors).pure[F] } } diff --git a/cli/.js/src/main/scala/aqua/run/RunCommand.scala b/cli/.js/src/main/scala/aqua/run/RunCommand.scala index 0e798d5c..813b9b4c 100644 --- a/cli/.js/src/main/scala/aqua/run/RunCommand.scala +++ b/cli/.js/src/main/scala/aqua/run/RunCommand.scala @@ -54,27 +54,6 @@ object RunCommand extends Logging { }.getOrElse(Future.successful(None)) } - // Generates air from function, register all services and make a call through FluenceJS - def genAirAndMakeCall[F[_]: Async]( - multiaddr: String, - wrapped: FuncCallable, - consoleService: Console, - finisherService: Finisher, - transformConfig: TransformConfig, - runConfig: RunConfig - )(implicit ec: ExecutionContext): F[Unit] = { - val funcRes = Transform.fn(wrapped, transformConfig) - val definitions = FunctionDef(funcRes) - - val air = FuncAirGen(funcRes).generate.show - - if (runConfig.printAir) { - OutputPrinter.print(air) - } - - FuncCaller.funcCall[F](multiaddr, air, definitions, runConfig, consoleService, finisherService) - } - private def findFunction(contexts: Chain[AquaContext], funcName: String): Option[FuncCallable] = contexts .flatMap(_.exports.map(e => Chain.fromSeq(e.funcs.values.toList)).getOrElse(Chain.empty)) @@ -116,32 +95,9 @@ object RunCommand extends Logging { val resultV: ValidatedNec[String, F[Unit]] = contextV.andThen { contextC => findFunction(contextC, func) match { case Some(funcCallable) => - val consoleService = - new Console(runConfig.consoleServiceId, runConfig.printFunctionName) - val promiseFinisherService = - Finisher(runConfig.finisherServiceId, runConfig.finisherFnName) - - // call an input function from a generated function - val callResult: ValidatedNec[String, F[Unit]] = RunWrapper - .wrapCall( - func, - funcCallable, - args, - runConfig, - consoleService, - promiseFinisherService - ) - .map { wrapped => - genAirAndMakeCall[F]( - multiaddr, - wrapped, - consoleService, - promiseFinisherService, - transformConfig, - runConfig - ) - } - callResult + val runner = + new Runner(func, funcCallable, multiaddr, args, runConfig, transformConfig) + runner.run() case None => Validated.invalidNec[String, F[Unit]](s"There is no function called '$func'") } diff --git a/cli/.js/src/main/scala/aqua/run/RunConfig.scala b/cli/.js/src/main/scala/aqua/run/RunConfig.scala index f302871f..a685d805 100644 --- a/cli/.js/src/main/scala/aqua/run/RunConfig.scala +++ b/cli/.js/src/main/scala/aqua/run/RunConfig.scala @@ -1,6 +1,6 @@ package aqua.run -import aqua.builder.ArgumentGetter +import aqua.builder.{ArgumentGetter, ServiceFunction} import scribe.Level // `run` command configuration @@ -9,9 +9,12 @@ case class RunConfig( logLevel: Level, printAir: Boolean, secretKey: Option[Array[Byte]], + // services that will pass arguments to air argumentGetters: Map[String, ArgumentGetter], + // services that will be used in aqua code and need to be registered + services: List[ServiceFunction] = Nil, consoleServiceId: String = "--after-callback-srv-service--", - printFunctionName: String = "print-and-stop", + printFunctionName: String = "console-log", finisherServiceId: String = "--finisher--", finisherFnName: String = "--finish-execution--", resultName: String = "-some-unique-res-name-", diff --git a/cli/.js/src/main/scala/aqua/run/RunOpts.scala b/cli/.js/src/main/scala/aqua/run/RunOpts.scala index f2df78ef..0b2e1fb6 100644 --- a/cli/.js/src/main/scala/aqua/run/RunOpts.scala +++ b/cli/.js/src/main/scala/aqua/run/RunOpts.scala @@ -6,7 +6,7 @@ import aqua.parser.lexer.{Literal, VarLambda} import aqua.parser.lift.LiftParser.Implicits.idLiftParser import aqua.parser.lift.Span import aqua.types.BottomType -import aqua.{AppOpts, AquaIO, LogFormatter} +import aqua.{AppOpts, AquaIO, FluenceOpts, LogFormatter} import cats.data.{NonEmptyChain, NonEmptyList, Validated, ValidatedNec, ValidatedNel} import Validated.{invalid, invalidNec, valid, validNec, validNel} import aqua.builder.ArgumentGetter @@ -33,23 +33,6 @@ object RunOpts extends Logging { .option[Int]("timeout", "Request timeout in milliseconds", "t") .withDefault(7000) - val multiaddrOpt: Opts[String] = - Opts - .option[String]("addr", "Relay multiaddress", "a") - .withDefault( - "/dns4/kras-00.fluence.dev/tcp/19001/wss/p2p/12D3KooWR4cv1a8tv7pps4HH6wePNaK6gf1Hww5wcCMzeWxyNw51" - ) - - val secretKeyOpt: Opts[Array[Byte]] = - Opts - .option[String]("sk", "Ed25519 32-byte secret key in base64", "s") - .mapValidated { s => - val decoder = Base64.getDecoder - Validated.catchNonFatal { - decoder.decode(s) - }.leftMap(t => NonEmptyList.one("secret key isn't a valid base64 string: " + t.getMessage)) - } - def spanToId: Span.S ~> Id = new (Span.S ~> Id) { override def apply[A](span: Span.S[A]): Id[A] = { @@ -57,47 +40,54 @@ object RunOpts extends Logging { } } - val printAir: Opts[Boolean] = - Opts - .flag("print-air", "Prints generated AIR code before function execution") - .map(_ => true) - .withDefault(false) + // Checks if a path is a file and it exists and transforms it + def checkAndTransformFile[F[_]: Files: Concurrent, T]( + path: String, + transform: Path => F[ValidatedNec[String, T]] + ): F[ValidatedNec[String, T]] = { + val p = Path(path) + Files[F] + .exists(p) + .flatMap { exists => + if (exists) + Files[F].isRegularFile(p).flatMap { isFile => + if (isFile) { + transform(p) + } else { + invalidNec(s"Path '${p.toString}' is not a file").pure[F] + } + } + else { + invalidNec(s"There is no path '${p.toString}'").pure[F] + } + } + } def dataFromFileOpt[F[_]: Files: Concurrent]: Opts[F[ValidatedNec[String, Option[js.Dynamic]]]] = Opts .option[String]("data-path", "Path to file with arguments map in JSON format", "p") .map { str => - val p = Path(str) - Files[F] - .exists(p) - .flatMap { exists => - if (exists) - Files[F].isRegularFile(p).flatMap { isFile => - if (isFile) { - Files[F] - .readAll(p) - .through(fs2.text.utf8.decode) - .fold(List.empty[String]) { case (acc, str) => str :: acc } - .map(_.mkString("")) - .map { jsonStr => - Validated.catchNonFatal { - JSON.parse(jsonStr) - }.leftMap(t => - NonEmptyChain - .one(s"Data in ${p.toString} isn't a valid JSON: " + t.getMessage) - ) - } - .compile - .last - .map(_.map(_.map(v => Some(v))).getOrElse(validNec(None))) - } else { - invalidNec(s"Path '${p.toString}' is not a file").pure[F] - } + checkAndTransformFile( + str, + p => { + Files[F] + .readAll(p) + .through(fs2.text.utf8.decode) + .fold(List.empty[String]) { case (acc, str) => str :: acc } + .map(_.mkString("")) + .map { jsonStr => + Validated.catchNonFatal { + JSON.parse(jsonStr) + }.leftMap(t => + NonEmptyChain + .one(s"Data in ${p.toString} isn't a valid JSON: " + t.getMessage) + ) } - else { - invalidNec(s"There is no path '${p.toString}'").pure[F] - } + .compile + .last + .map(_.map(_.map(v => Some(v))).getOrElse(validNec(None))) } + ) } val dataOpt: Opts[js.Dynamic] = @@ -172,12 +162,14 @@ object RunOpts extends Logging { ( AppOpts.inputOpts[F], AppOpts.importOpts[F], - multiaddrOpt, + FluenceOpts.multiaddrOpt.withDefault( + "/dns4/kras-00.fluence.dev/tcp/19001/wss/p2p/12D3KooWR4cv1a8tv7pps4HH6wePNaK6gf1Hww5wcCMzeWxyNw51" + ), funcOpt, timeoutOpt, AppOpts.logLevelOpt, - printAir, - AppOpts.wrapWithOption(secretKeyOpt), + FluenceOpts.printAir, + AppOpts.wrapWithOption(FluenceOpts.secretKeyOpt), AppOpts.wrapWithOption(dataOpt), AppOpts.wrapWithOption(dataFromFileOpt[F]) ).mapN { @@ -193,12 +185,7 @@ object RunOpts extends Logging { dataFromArgument, dataFromFileF ) => - scribe.Logger.root - .clearHandlers() - .clearModifiers() - .withHandler(formatter = LogFormatter.formatter, minimumLevel = Some(logLevel)) - .replace() - + LogFormatter.initLogger(Some(logLevel)) for { inputV <- inputF impsV <- importF diff --git a/cli/.js/src/main/scala/aqua/run/RunWrapper.scala b/cli/.js/src/main/scala/aqua/run/Runner.scala similarity index 56% rename from cli/.js/src/main/scala/aqua/run/RunWrapper.scala rename to cli/.js/src/main/scala/aqua/run/Runner.scala index fed453cc..09558aee 100644 --- a/cli/.js/src/main/scala/aqua/run/RunWrapper.scala +++ b/cli/.js/src/main/scala/aqua/run/Runner.scala @@ -1,16 +1,82 @@ package aqua.run +import aqua.backend.FunctionDef +import aqua.backend.air.FuncAirGen import aqua.builder.{ArgumentGetter, Console, Finisher} +import aqua.io.OutputPrinter import aqua.model.{ValueModel, VarModel} import aqua.model.func.{Call, FuncCallable} import aqua.model.func.raw.{CallArrowTag, FuncOp, FuncOps} +import aqua.model.transform.{Transform, TransformConfig} import aqua.types.{ArrowType, BoxType, NilType, Type} import cats.data.{Validated, ValidatedNec} +import cats.effect.kernel.Async +import cats.syntax.show.* +import scala.concurrent.ExecutionContext import scala.scalajs.js -// Wraps function to run with service calls to run it with variables and output printing -object RunWrapper { +class Runner( + funcName: String, + funcCallable: FuncCallable, + multiaddr: String, + args: List[ValueModel], + config: RunConfig, + transformConfig: TransformConfig +) { + + def resultVariableNames(funcCallable: FuncCallable, name: String): List[String] = { + funcCallable.arrowType.codomain.toList.zipWithIndex.map { case (t, idx) => + name + idx + } + } + + // Wraps function with necessary services, registers services and calls wrapped function with FluenceJS + def run[F[_]: Async]()(implicit ec: ExecutionContext): ValidatedNec[String, F[Unit]] = { + val resultNames = resultVariableNames(funcCallable, config.resultName) + val consoleService = + new Console(config.consoleServiceId, config.printFunctionName, resultNames) + val promiseFinisherService = + Finisher(config.finisherServiceId, config.finisherFnName) + + // call an input function from a generated function + val callResult: ValidatedNec[String, F[Unit]] = wrapCall( + consoleService, + promiseFinisherService + ).map { wrapped => + genAirAndMakeCall[F]( + wrapped, + consoleService, + promiseFinisherService + ) + } + callResult + } + + // Generates air from function, register all services and make a call through FluenceJS + private def genAirAndMakeCall[F[_]: Async]( + wrapped: FuncCallable, + consoleService: Console, + finisherService: Finisher + )(implicit ec: ExecutionContext): F[Unit] = { + val funcRes = Transform.fn(wrapped, transformConfig) + val definitions = FunctionDef(funcRes) + + val air = FuncAirGen(funcRes).generate.show + + if (config.printAir) { + OutputPrinter.print(air) + } + + FuncCaller.funcCall[F]( + multiaddr, + air, + definitions, + config, + finisherService, + config.services :+ consoleService + ) + } // Creates getter services for variables. Return an error if there is no variable in services // and type of this variable couldn't be optional @@ -41,11 +107,7 @@ object RunWrapper { // res <- funcCallable(args:_*) // Console.print(res) // Finisher.finish() - def wrapCall( - funcName: String, - funcCallable: FuncCallable, - args: List[ValueModel], - config: RunConfig, + private def wrapCall( consoleService: Console, finisherService: Finisher ): ValidatedNec[String, FuncCallable] = { @@ -72,9 +134,12 @@ object RunWrapper { val finisherServiceTag = finisherService.callTag() - val vars = args.zip(funcCallable.arrowType.domain.toList).collect { - case (VarModel(n, _, _), argType) => (n, argType) - } + val vars = args + .zip(funcCallable.arrowType.domain.toList) + .collect { case (VarModel(n, _, _), argType) => + (n, argType) + } + .distinctBy(_._1) val gettersV = getGettersForVars(vars, config.argumentGetters) @@ -92,4 +157,5 @@ object RunWrapper { ) } } + } diff --git a/cli/src/main/scala/aqua/AquaCli.scala b/cli/src/main/scala/aqua/AquaCli.scala index 5e6f3001..61f22568 100644 --- a/cli/src/main/scala/aqua/AquaCli.scala +++ b/cli/src/main/scala/aqua/AquaCli.scala @@ -68,11 +68,7 @@ object AquaCli extends IOApp with Logging { scriptOpt ).mapN { case (inputF, importsF, outputF, toAirOp, toJs, noRelayOp, noXorOp, h, v, logLevel, constants, isDryRun, isScheduled) => - scribe.Logger.root - .clearHandlers() - .clearModifiers() - .withHandler(formatter = LogFormatter.formatter, minimumLevel = Some(logLevel)) - .replace() + LogFormatter.initLogger(Some(logLevel)) val toAir = toAirOp || isScheduled val noXor = noXorOp || isScheduled diff --git a/cli/src/main/scala/aqua/FluenceOpts.scala b/cli/src/main/scala/aqua/FluenceOpts.scala new file mode 100644 index 00000000..26baffc1 --- /dev/null +++ b/cli/src/main/scala/aqua/FluenceOpts.scala @@ -0,0 +1,29 @@ +package aqua + +import cats.data.{NonEmptyList, Validated} +import com.monovore.decline.Opts + +import java.util.Base64 + +object FluenceOpts { + + val multiaddrOpt: Opts[String] = + Opts + .option[String]("addr", "Relay multiaddress", "a") + + val secretKeyOpt: Opts[Array[Byte]] = + Opts + .option[String]("sk", "Ed25519 32-byte secret key in base64", "s") + .mapValidated { s => + val decoder = Base64.getDecoder + Validated.catchNonFatal { + decoder.decode(s) + }.leftMap(t => NonEmptyList.one("secret key isn't a valid base64 string: " + t.getMessage)) + } + + val printAir: Opts[Boolean] = + Opts + .flag("print-air", "Prints generated AIR code before function execution") + .map(_ => true) + .withDefault(false) +} diff --git a/cli/src/main/scala/aqua/LogFormatter.scala b/cli/src/main/scala/aqua/LogFormatter.scala index f8fa1a83..d75d5f2b 100644 --- a/cli/src/main/scala/aqua/LogFormatter.scala +++ b/cli/src/main/scala/aqua/LogFormatter.scala @@ -1,8 +1,19 @@ package aqua +import scribe.{Level, Logger} import scribe.format.* object LogFormatter { val formatter: Formatter = formatter"$date ${string("[")}$levelColored${string("]")} $message$mdc" - val formatterWithFilename: Formatter = formatter"$date $fileName ${string("[")}$levelColored${string("]")} $message$mdc" + + val formatterWithFilename: Formatter = + formatter"$date $fileName ${string("[")}$levelColored${string("]")} $message$mdc" + + def initLogger(level: Option[Level]): Logger = { + scribe.Logger.root + .clearHandlers() + .clearModifiers() + .withHandler(formatter = formatter, minimumLevel = level) + .replace() + } } diff --git a/npm/aqua/ipfs.aqua b/npm/aqua/ipfs.aqua new file mode 100644 index 00000000..8df5d765 --- /dev/null +++ b/npm/aqua/ipfs.aqua @@ -0,0 +1,23 @@ +module IpfsExports + +import "@fluencelabs/aqua-ipfs/ipfs-api.aqua" +import "@fluencelabs/aqua-ipfs/ipfs.aqua" + +export uploadFile + +data UploadResult: + error: string + cid: string + size: u64 + +service IPFS("ipfs"): + uploadFile(path: string, multiaddr: IpfsMultiaddrResult) -> UploadResult + +func uploadFile(path: string) -> UploadResult: + on HOST_PEER_ID: + multiaddr <- get_external_api_multiaddr(HOST_PEER_ID) + result <- IPFS.uploadFile(path, multiaddr) + <- result + + + diff --git a/npm/package-lock.json b/npm/package-lock.json index 67ab03ab..fc188ac8 100644 --- a/npm/package-lock.json +++ b/npm/package-lock.json @@ -9,12 +9,18 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { + "@fluencelabs/aqua-ipfs": "0.5.2", "@fluencelabs/aqua-lib": "0.2.1", - "@fluencelabs/fluence": "0.15.2" + "@fluencelabs/fluence": "0.15.2", + "ipfs-http-client": "50.1.2" }, "bin": { "aqua": "index.js", "aqua-cli": "error.js" + }, + "devDependencies": { + "ts-node": "^10.4.0", + "typescript": "^4.5.4" } }, "node_modules/@chainsafe/libp2p-noise": { @@ -76,6 +82,40 @@ "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" }, + "node_modules/@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-consumer": "0.8.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@fluencelabs/aqua-ipfs": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-ipfs/-/aqua-ipfs-0.5.2.tgz", + "integrity": "sha512-vSZYH6mjCGly7Cifts1c84icAzeq6pQf3aspEW3ttA0AFVQTjDWlr86Imseg+p3I9oaNUykv/W+VqWX1ouj9Vg==", + "dependencies": { + "@fluencelabs/aqua-lib": "^0.1.14" + } + }, + "node_modules/@fluencelabs/aqua-ipfs/node_modules/@fluencelabs/aqua-lib": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.1.14.tgz", + "integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg==" + }, "node_modules/@fluencelabs/aqua-lib": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.2.1.tgz", @@ -130,6 +170,11 @@ "node": ">=10.0.0" } }, + "node_modules/@multiformats/base-x": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -184,6 +229,14 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, + "node_modules/@sovpro/delimited-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sovpro/delimited-stream/-/delimited-stream-1.1.0.tgz", + "integrity": "sha512-kQpk267uxB19X3X2T1mvNMjyvIEonpNSHrMlK5ZaBU6aZxw7wPbpgKJOjHN3+/GPVpXgAV9soVT2oyHpLkLtyw==", + "engines": { + "node": ">= 8" + } + }, "node_modules/@stablelib/aead": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz", @@ -310,6 +363,30 @@ "@stablelib/wipe": "^1.0.1" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "dev": true + }, "node_modules/@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -354,6 +431,27 @@ "get-iterator": "^1.0.2" } }, + "node_modules/acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -390,6 +488,12 @@ "native-abort-controller": "^1.0.3" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -529,11 +633,70 @@ "ieee754": "^1.2.1" } }, + "node_modules/blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + }, + "node_modules/blob-to-it": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-1.0.4.tgz", + "integrity": "sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA==", + "dependencies": { + "browser-readablestream-to-it": "^1.0.3" + } + }, "node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, + "node_modules/borc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/borc/-/borc-3.0.0.tgz", + "integrity": "sha512-ec4JmVC46kE0+layfnwM3l15O70MlFiEbmQHY/vpqIKiUtPVntv4BY4NVnz3N4vb21edV3mY97XVckFvYHWF9g==", + "dependencies": { + "bignumber.js": "^9.0.0", + "buffer": "^6.0.3", + "commander": "^2.15.0", + "ieee754": "^1.1.13", + "iso-url": "^1.1.5", + "json-text-sequence": "~0.3.0", + "readable-stream": "^3.6.0" + }, + "bin": { + "cbor2comment": "bin/cbor2comment.js", + "cbor2diag": "bin/cbor2diag.js", + "cbor2json": "bin/cbor2json.js", + "json2cbor": "bin/json2cbor.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/borc/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -548,6 +711,11 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "node_modules/browser-readablestream-to-it": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz", + "integrity": "sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw==" + }, "node_modules/bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", @@ -625,6 +793,11 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -635,6 +808,12 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -694,6 +873,15 @@ "node": ">=0.4.0" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dns-over-http-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz", @@ -1021,6 +1209,83 @@ "multiformats": "^9.4.2" } }, + "node_modules/interface-ipld-format": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/interface-ipld-format/-/interface-ipld-format-1.0.1.tgz", + "integrity": "sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "cids": "^1.1.6", + "multicodec": "^3.0.1", + "multihashes": "^4.0.2" + } + }, + "node_modules/interface-ipld-format/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/interface-ipld-format/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/interface-ipld-format/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/interface-ipld-format/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/interface-ipld-format/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/interface-ipld-format/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, "node_modules/interface-store": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-1.0.2.tgz", @@ -1054,6 +1319,438 @@ "node": ">= 10" } }, + "node_modules/ipfs-core-types": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/ipfs-core-types/-/ipfs-core-types-0.5.2.tgz", + "integrity": "sha512-DOQeL+GFGYMTlnbdtMeBzvfVnyAalSgCfPr8XUCI+FVBZZWwzkt5jZZzGDmF87HVRrMR3FuVyBKZj772mcXKyQ==", + "dependencies": { + "cids": "^1.1.6", + "interface-datastore": "^4.0.0", + "ipld-block": "^0.11.1", + "multiaddr": "^9.0.1", + "multibase": "^4.0.2" + } + }, + "node_modules/ipfs-core-types/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipfs-core-types/node_modules/cids/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-core-types/node_modules/interface-datastore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-4.0.2.tgz", + "integrity": "sha512-/XRmD7oagZMTaK25rV3WFrejLoUwxZcpgE+eNyZNYvb2jlB5P3MwJCIbetJSlVYK7yvaFmJi8s3f9VLcxJjdog==", + "dependencies": { + "err-code": "^3.0.1", + "interface-store": "^0.0.2", + "ipfs-utils": "^8.1.2", + "iso-random-stream": "^2.0.0", + "it-all": "^1.0.2", + "it-drain": "^1.0.1", + "it-filter": "^1.0.2", + "it-take": "^1.0.1", + "nanoid": "^3.0.2", + "uint8arrays": "^2.1.5" + } + }, + "node_modules/ipfs-core-types/node_modules/interface-store": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-0.0.2.tgz", + "integrity": "sha512-t4c9GKXH1Vi/WxmppGyIi6iedbGo92YmLneopHmbIEIp27ep7VnrYGA6lM/rLsFo5Tj6TJgIqr3FOk8mvPgIWQ==" + }, + "node_modules/ipfs-core-types/node_modules/multiaddr": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-9.0.2.tgz", + "integrity": "sha512-YFaEb9t4yXSbaGksSEdg+Kn2U02s7w4wXUgyEMQmPxFJj7CfVHY10WOsScAX/rK6Soa15S1zXYadqH9TtlVreQ==", + "dependencies": { + "cids": "^1.0.0", + "dns-over-http-resolver": "^1.0.0", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multibase": "^4.0.2", + "uint8arrays": "^2.1.3", + "varint": "^6.0.0" + } + }, + "node_modules/ipfs-core-types/node_modules/multiaddr/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipfs-core-types/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipfs-core-types/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipfs-core-types/node_modules/multicodec/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-core-types/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipfs-core-types/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipfs-core-types/node_modules/multihashes/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-core-utils": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/ipfs-core-utils/-/ipfs-core-utils-0.8.3.tgz", + "integrity": "sha512-PY7PkCgCtVYtNOe1C3ew1+5D9NqXqizb886R/lyGWe+KsmWtBQkQIk0ZIDwKyHGvG2KA2QQeIDzdOmzBQBJtHQ==", + "dependencies": { + "any-signal": "^2.1.2", + "blob-to-it": "^1.0.1", + "browser-readablestream-to-it": "^1.0.1", + "cids": "^1.1.6", + "err-code": "^3.0.1", + "ipfs-core-types": "^0.5.2", + "ipfs-unixfs": "^4.0.3", + "ipfs-utils": "^8.1.2", + "it-all": "^1.0.4", + "it-map": "^1.0.4", + "it-peekable": "^1.0.1", + "multiaddr": "^9.0.1", + "multiaddr-to-uri": "^7.0.0", + "parse-duration": "^1.0.0", + "timeout-abort-controller": "^1.1.1", + "uint8arrays": "^2.1.3" + } + }, + "node_modules/ipfs-core-utils/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipfs-core-utils/node_modules/cids/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-core-utils/node_modules/multiaddr": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-9.0.2.tgz", + "integrity": "sha512-YFaEb9t4yXSbaGksSEdg+Kn2U02s7w4wXUgyEMQmPxFJj7CfVHY10WOsScAX/rK6Soa15S1zXYadqH9TtlVreQ==", + "dependencies": { + "cids": "^1.0.0", + "dns-over-http-resolver": "^1.0.0", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multibase": "^4.0.2", + "uint8arrays": "^2.1.3", + "varint": "^6.0.0" + } + }, + "node_modules/ipfs-core-utils/node_modules/multiaddr-to-uri": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/multiaddr-to-uri/-/multiaddr-to-uri-7.0.0.tgz", + "integrity": "sha512-VbscDpLcbV0m25tJqfnZSfbjVUuNlPa4BbD5l/7me1t0lc3SWI0XAoO5E/PNJF0e1qUlbdq7yjVFEQjUT+9r0g==", + "dependencies": { + "multiaddr": "^9.0.1" + } + }, + "node_modules/ipfs-core-utils/node_modules/multiaddr/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipfs-core-utils/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipfs-core-utils/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipfs-core-utils/node_modules/multicodec/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-core-utils/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipfs-core-utils/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipfs-core-utils/node_modules/multihashes/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-http-client": { + "version": "50.1.2", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2.tgz", + "integrity": "sha512-ZbJlED4wqwFXQFVB9FQDs20ygdq7O/zSq4AvO9KRAmkqUj2TsCWCteUz2fBMnGWLh2tExxeSl/rQbHbJptb8JQ==", + "dependencies": { + "abort-controller": "^3.0.0", + "any-signal": "^2.1.2", + "cids": "^1.1.6", + "debug": "^4.1.1", + "form-data": "^4.0.0", + "ipfs-core-types": "^0.5.2", + "ipfs-core-utils": "^0.8.3", + "ipfs-unixfs": "^4.0.3", + "ipfs-utils": "^8.1.2", + "ipld-block": "^0.11.0", + "ipld-dag-cbor": "^1.0.0", + "ipld-dag-pb": "^0.22.1", + "ipld-raw": "^7.0.0", + "it-last": "^1.0.4", + "it-map": "^1.0.4", + "it-tar": "^3.0.0", + "it-to-stream": "^1.0.0", + "merge-options": "^3.0.4", + "multiaddr": "^9.0.1", + "multibase": "^4.0.2", + "multicodec": "^3.0.1", + "multihashes": "^4.0.2", + "nanoid": "^3.1.12", + "native-abort-controller": "^1.0.3", + "parse-duration": "^1.0.0", + "stream-to-it": "^0.2.2", + "uint8arrays": "^2.1.3" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipfs-http-client/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipfs-http-client/node_modules/cids/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-http-client/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ipfs-http-client/node_modules/multiaddr": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-9.0.2.tgz", + "integrity": "sha512-YFaEb9t4yXSbaGksSEdg+Kn2U02s7w4wXUgyEMQmPxFJj7CfVHY10WOsScAX/rK6Soa15S1zXYadqH9TtlVreQ==", + "dependencies": { + "cids": "^1.0.0", + "dns-over-http-resolver": "^1.0.0", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multibase": "^4.0.2", + "uint8arrays": "^2.1.3", + "varint": "^6.0.0" + } + }, + "node_modules/ipfs-http-client/node_modules/multiaddr/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipfs-http-client/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipfs-http-client/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipfs-http-client/node_modules/multicodec/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-http-client/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipfs-http-client/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipfs-http-client/node_modules/multihashes/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipfs-unixfs": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-4.0.3.tgz", + "integrity": "sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==", + "dependencies": { + "err-code": "^3.0.1", + "protobufjs": "^6.10.2" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/ipfs-utils": { "version": "8.1.6", "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-8.1.6.tgz", @@ -1100,6 +1797,364 @@ "ieee754": "^1.2.1" } }, + "node_modules/ipld-block": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/ipld-block/-/ipld-block-0.11.1.tgz", + "integrity": "sha512-sDqqLqD5qh4QzGq6ssxLHUCnH4emCf/8F8IwjQM2cjEEIEHMUj57XhNYgmGbemdYPznUhffxFGEHsruh5+HQRw==", + "dependencies": { + "cids": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-block/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-block/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-block/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipld-block/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipld-block/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-block/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-dag-cbor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-1.0.1.tgz", + "integrity": "sha512-PZh8rHnRETX5bj60i73W2oq6BXoZnIvYCBDwIffYVJgxMr7BEVd5PycAARBiT6daORJ/4zbqEFR5CcrjeCtm/A==", + "deprecated": "This module has been superseded by @ipld/dag-cbor and multiformats", + "dependencies": { + "borc": "^3.0.0", + "cids": "^1.0.0", + "interface-ipld-format": "^1.0.0", + "is-circular": "^1.0.2", + "multicodec": "^3.0.1", + "multihashing-async": "^2.0.0", + "uint8arrays": "^2.1.3" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-dag-cbor/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-dag-cbor/node_modules/cids/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-dag-cbor/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-dag-cbor/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipld-dag-cbor/node_modules/multicodec/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-dag-cbor/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipld-dag-cbor/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-dag-cbor/node_modules/multihashes/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-dag-pb": { + "version": "0.22.3", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.22.3.tgz", + "integrity": "sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==", + "deprecated": "This module has been superseded by @ipld/dag-pb and multiformats", + "dependencies": { + "cids": "^1.0.0", + "interface-ipld-format": "^1.0.0", + "multicodec": "^3.0.1", + "multihashing-async": "^2.0.0", + "protobufjs": "^6.10.2", + "stable": "^0.1.8", + "uint8arrays": "^2.0.5" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-dag-pb/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-dag-pb/node_modules/cids/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-dag-pb/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-dag-pb/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipld-dag-pb/node_modules/multicodec/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-dag-pb/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipld-dag-pb/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-dag-pb/node_modules/multihashes/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, + "node_modules/ipld-raw": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ipld-raw/-/ipld-raw-7.0.1.tgz", + "integrity": "sha512-oaiy0Ot23NCnoBA7sLvPL9qFRC6JDB0IsdZL6rUeZJxzxabQuBLNGYXcqjQ8jlF0UPLEUSO+h8OJh2DZPzL2aQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "cids": "^1.1.6", + "interface-ipld-format": "^1.0.0", + "multicodec": "^3.0.1", + "multihashing-async": "^2.1.2" + } + }, + "node_modules/ipld-raw/node_modules/cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/ipld-raw/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-raw/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/ipld-raw/node_modules/multicodec/node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/ipld-raw/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/ipld-raw/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, "node_modules/is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", @@ -1122,6 +2177,11 @@ "node": ">=4" } }, + "node_modules/is-circular": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz", + "integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==" + }, "node_modules/is-electron": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.1.tgz", @@ -1172,6 +2232,15 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "node_modules/iso-constants": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/iso-constants/-/iso-constants-0.1.2.tgz", + "integrity": "sha512-OTCM5ZCQsHBCI4Wdu4tSxvDIkmDHd5EwJDps5mKqnQnWJSKlnwMs3EDZ4n3Fh1tmkWkDlyd2vCDbEYuPbyrUNQ==", + "hasInstallScript": true, + "engines": { + "node": ">=10" + } + }, "node_modules/iso-random-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-2.0.0.tgz", @@ -1234,6 +2303,14 @@ "ieee754": "^1.2.1" } }, + "node_modules/it-concat": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/it-concat/-/it-concat-2.0.0.tgz", + "integrity": "sha512-jchrEB3fHlUENWkVJRmbFJ1A7gcjJDmwiolQsHhVC14DpUIbX8fgr3SOC7XNE5OoUUQNL6/RaMCPChkPemyQUw==", + "dependencies": { + "bl": "^5.0.0" + } + }, "node_modules/it-drain": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-1.0.5.tgz", @@ -1268,6 +2345,11 @@ "p-defer": "^3.0.0" } }, + "node_modules/it-last": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-last/-/it-last-1.0.6.tgz", + "integrity": "sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q==" + }, "node_modules/it-length-prefixed": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-3.0.1.tgz", @@ -1357,6 +2439,11 @@ "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" }, + "node_modules/it-peekable": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-1.0.3.tgz", + "integrity": "sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ==" + }, "node_modules/it-pipe": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-1.1.0.tgz", @@ -1383,6 +2470,42 @@ "resolved": "https://registry.npmjs.org/it-take/-/it-take-1.0.2.tgz", "integrity": "sha512-u7I6qhhxH7pSevcYNaMECtkvZW365ARqAIt9K+xjdK1B2WUDEjQSfETkOCT8bxFq/59LqrN3cMLUtTgmDBaygw==" }, + "node_modules/it-tar": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/it-tar/-/it-tar-3.0.0.tgz", + "integrity": "sha512-VhD1Hnx4IXDcQgYJnJgltkn+w5F8kiJaB46lqovh+YWfty2JGW7i40QQjWbSvcg1QfaU8is8AVX8xwx/Db9oOg==", + "dependencies": { + "bl": "^5.0.0", + "buffer": "^6.0.3", + "iso-constants": "^0.1.2", + "it-concat": "^2.0.0", + "it-reader": "^3.0.0", + "p-defer": "^3.0.0" + } + }, + "node_modules/it-tar/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/it-to-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-1.0.0.tgz", @@ -1453,6 +2576,11 @@ "ieee754": "^1.2.1" } }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", @@ -1473,6 +2601,17 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "node_modules/json-text-sequence": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.3.0.tgz", + "integrity": "sha512-7khKIYPKwXQem4lWXfpIN/FEnhztCeRPSxH4qm3fVlqulwujrRDD54xAwDDn/qVKpFtV550+QAkcWJcufzqQuA==", + "dependencies": { + "@sovpro/delimited-stream": "^1.1.0" + }, + "engines": { + "node": ">=10.18.0" + } + }, "node_modules/jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -1764,6 +2903,12 @@ "multiaddr": "^10.0.0" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/merge-options": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", @@ -1885,9 +3030,9 @@ } }, "node_modules/multiformats": { - "version": "9.4.14", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.4.14.tgz", - "integrity": "sha512-X1wtOySaguYL7ua87Gv4+cuvFL3Qi+mpHNcJnzNoyK1NmHy8SfyBIQ1S1KYQoEjXaYoriN+5TP9f4iBJUOQf3A==" + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.5.4.tgz", + "integrity": "sha512-MFT8e8BOLX7OZKfSBGm13FwYvJVI6MEcZ7hujUCpyJwvYyrC1anul50A0Ee74GdeJ77aYTO6YU1vO+oF8NqSIw==" }, "node_modules/multihashes": { "version": "0.4.21", @@ -1899,6 +3044,58 @@ "varint": "^5.0.0" } }, + "node_modules/multihashing-async": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", + "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", + "dependencies": { + "blakejs": "^1.1.0", + "err-code": "^3.0.0", + "js-sha3": "^0.8.0", + "multihashes": "^4.0.1", + "murmurhash3js-revisited": "^3.0.0", + "uint8arrays": "^3.0.0" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multihashing-async/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multihashing-async/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multihashing-async/node_modules/uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, "node_modules/multistream-select": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/multistream-select/-/multistream-select-2.0.1.tgz", @@ -1962,6 +3159,14 @@ "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" }, + "node_modules/murmurhash3js-revisited": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", + "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/mutable-proxy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mutable-proxy/-/mutable-proxy-1.0.0.tgz", @@ -2231,6 +3436,11 @@ "node": ">=6" } }, + "node_modules/parse-duration": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.2.tgz", + "integrity": "sha512-Dg27N6mfok+ow1a2rj/nRjtCfaKrHUZV2SJpEn/s8GaVUSlf4GGRCRP1c13Hj+wfPKVMrFDqLMLITkYKgKxyyg==" + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -2546,6 +3756,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" + }, "node_modules/stream-to-it": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz", @@ -2612,6 +3827,47 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/ts-node": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", + "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/ts-pattern": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-3.3.3.tgz", @@ -2638,6 +3894,19 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "node_modules/typescript": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/uint8arrays": { "version": "2.1.10", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", @@ -2774,6 +4043,15 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz", "integrity": "sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w==" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } } }, "dependencies": { @@ -2824,6 +4102,36 @@ } } }, + "@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "dev": true + }, + "@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "dev": true, + "requires": { + "@cspotcode/source-map-consumer": "0.8.0" + } + }, + "@fluencelabs/aqua-ipfs": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-ipfs/-/aqua-ipfs-0.5.2.tgz", + "integrity": "sha512-vSZYH6mjCGly7Cifts1c84icAzeq6pQf3aspEW3ttA0AFVQTjDWlr86Imseg+p3I9oaNUykv/W+VqWX1ouj9Vg==", + "requires": { + "@fluencelabs/aqua-lib": "^0.1.14" + }, + "dependencies": { + "@fluencelabs/aqua-lib": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.1.14.tgz", + "integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg==" + } + } + }, "@fluencelabs/aqua-lib": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.2.1.tgz", @@ -2875,6 +4183,11 @@ "xml2js": "^0.4.23" } }, + "@multiformats/base-x": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -2929,6 +4242,11 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, + "@sovpro/delimited-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sovpro/delimited-stream/-/delimited-stream-1.1.0.tgz", + "integrity": "sha512-kQpk267uxB19X3X2T1mvNMjyvIEonpNSHrMlK5ZaBU6aZxw7wPbpgKJOjHN3+/GPVpXgAV9soVT2oyHpLkLtyw==" + }, "@stablelib/aead": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz", @@ -3055,6 +4373,30 @@ "@stablelib/wipe": "^1.0.1" } }, + "@tsconfig/node10": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "dev": true + }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -3096,6 +4438,18 @@ "get-iterator": "^1.0.2" } }, + "acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "dev": true + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -3125,6 +4479,12 @@ "native-abort-controller": "^1.0.3" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -3229,11 +4589,49 @@ } } }, + "blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + }, + "blob-to-it": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-1.0.4.tgz", + "integrity": "sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA==", + "requires": { + "browser-readablestream-to-it": "^1.0.3" + } + }, "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, + "borc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/borc/-/borc-3.0.0.tgz", + "integrity": "sha512-ec4JmVC46kE0+layfnwM3l15O70MlFiEbmQHY/vpqIKiUtPVntv4BY4NVnz3N4vb21edV3mY97XVckFvYHWF9g==", + "requires": { + "bignumber.js": "^9.0.0", + "buffer": "^6.0.3", + "commander": "^2.15.0", + "ieee754": "^1.1.13", + "iso-url": "^1.1.5", + "json-text-sequence": "~0.3.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3248,6 +4646,11 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "browser-readablestream-to-it": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz", + "integrity": "sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw==" + }, "bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", @@ -3300,6 +4703,11 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3310,6 +4718,12 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3349,6 +4763,12 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "dns-over-http-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz", @@ -3616,6 +5036,71 @@ } } }, + "interface-ipld-format": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/interface-ipld-format/-/interface-ipld-format-1.0.1.tgz", + "integrity": "sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==", + "requires": { + "cids": "^1.1.6", + "multicodec": "^3.0.1", + "multihashes": "^4.0.2" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + } + }, + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, "interface-store": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-1.0.2.tgz", @@ -3640,6 +5125,412 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" }, + "ipfs-core-types": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/ipfs-core-types/-/ipfs-core-types-0.5.2.tgz", + "integrity": "sha512-DOQeL+GFGYMTlnbdtMeBzvfVnyAalSgCfPr8XUCI+FVBZZWwzkt5jZZzGDmF87HVRrMR3FuVyBKZj772mcXKyQ==", + "requires": { + "cids": "^1.1.6", + "interface-datastore": "^4.0.0", + "ipld-block": "^0.11.1", + "multiaddr": "^9.0.1", + "multibase": "^4.0.2" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "interface-datastore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-4.0.2.tgz", + "integrity": "sha512-/XRmD7oagZMTaK25rV3WFrejLoUwxZcpgE+eNyZNYvb2jlB5P3MwJCIbetJSlVYK7yvaFmJi8s3f9VLcxJjdog==", + "requires": { + "err-code": "^3.0.1", + "interface-store": "^0.0.2", + "ipfs-utils": "^8.1.2", + "iso-random-stream": "^2.0.0", + "it-all": "^1.0.2", + "it-drain": "^1.0.1", + "it-filter": "^1.0.2", + "it-take": "^1.0.1", + "nanoid": "^3.0.2", + "uint8arrays": "^2.1.5" + } + }, + "interface-store": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-0.0.2.tgz", + "integrity": "sha512-t4c9GKXH1Vi/WxmppGyIi6iedbGo92YmLneopHmbIEIp27ep7VnrYGA6lM/rLsFo5Tj6TJgIqr3FOk8mvPgIWQ==" + }, + "multiaddr": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-9.0.2.tgz", + "integrity": "sha512-YFaEb9t4yXSbaGksSEdg+Kn2U02s7w4wXUgyEMQmPxFJj7CfVHY10WOsScAX/rK6Soa15S1zXYadqH9TtlVreQ==", + "requires": { + "cids": "^1.0.0", + "dns-over-http-resolver": "^1.0.0", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multibase": "^4.0.2", + "uint8arrays": "^2.1.3", + "varint": "^6.0.0" + }, + "dependencies": { + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + } + } + }, + "ipfs-core-utils": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/ipfs-core-utils/-/ipfs-core-utils-0.8.3.tgz", + "integrity": "sha512-PY7PkCgCtVYtNOe1C3ew1+5D9NqXqizb886R/lyGWe+KsmWtBQkQIk0ZIDwKyHGvG2KA2QQeIDzdOmzBQBJtHQ==", + "requires": { + "any-signal": "^2.1.2", + "blob-to-it": "^1.0.1", + "browser-readablestream-to-it": "^1.0.1", + "cids": "^1.1.6", + "err-code": "^3.0.1", + "ipfs-core-types": "^0.5.2", + "ipfs-unixfs": "^4.0.3", + "ipfs-utils": "^8.1.2", + "it-all": "^1.0.4", + "it-map": "^1.0.4", + "it-peekable": "^1.0.1", + "multiaddr": "^9.0.1", + "multiaddr-to-uri": "^7.0.0", + "parse-duration": "^1.0.0", + "timeout-abort-controller": "^1.1.1", + "uint8arrays": "^2.1.3" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "multiaddr": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-9.0.2.tgz", + "integrity": "sha512-YFaEb9t4yXSbaGksSEdg+Kn2U02s7w4wXUgyEMQmPxFJj7CfVHY10WOsScAX/rK6Soa15S1zXYadqH9TtlVreQ==", + "requires": { + "cids": "^1.0.0", + "dns-over-http-resolver": "^1.0.0", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multibase": "^4.0.2", + "uint8arrays": "^2.1.3", + "varint": "^6.0.0" + }, + "dependencies": { + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multiaddr-to-uri": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/multiaddr-to-uri/-/multiaddr-to-uri-7.0.0.tgz", + "integrity": "sha512-VbscDpLcbV0m25tJqfnZSfbjVUuNlPa4BbD5l/7me1t0lc3SWI0XAoO5E/PNJF0e1qUlbdq7yjVFEQjUT+9r0g==", + "requires": { + "multiaddr": "^9.0.1" + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + } + } + }, + "ipfs-http-client": { + "version": "50.1.2", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2.tgz", + "integrity": "sha512-ZbJlED4wqwFXQFVB9FQDs20ygdq7O/zSq4AvO9KRAmkqUj2TsCWCteUz2fBMnGWLh2tExxeSl/rQbHbJptb8JQ==", + "requires": { + "abort-controller": "^3.0.0", + "any-signal": "^2.1.2", + "cids": "^1.1.6", + "debug": "^4.1.1", + "form-data": "^4.0.0", + "ipfs-core-types": "^0.5.2", + "ipfs-core-utils": "^0.8.3", + "ipfs-unixfs": "^4.0.3", + "ipfs-utils": "^8.1.2", + "ipld-block": "^0.11.0", + "ipld-dag-cbor": "^1.0.0", + "ipld-dag-pb": "^0.22.1", + "ipld-raw": "^7.0.0", + "it-last": "^1.0.4", + "it-map": "^1.0.4", + "it-tar": "^3.0.0", + "it-to-stream": "^1.0.0", + "merge-options": "^3.0.4", + "multiaddr": "^9.0.1", + "multibase": "^4.0.2", + "multicodec": "^3.0.1", + "multihashes": "^4.0.2", + "nanoid": "^3.1.12", + "native-abort-controller": "^1.0.3", + "parse-duration": "^1.0.0", + "stream-to-it": "^0.2.2", + "uint8arrays": "^2.1.3" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "multiaddr": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-9.0.2.tgz", + "integrity": "sha512-YFaEb9t4yXSbaGksSEdg+Kn2U02s7w4wXUgyEMQmPxFJj7CfVHY10WOsScAX/rK6Soa15S1zXYadqH9TtlVreQ==", + "requires": { + "cids": "^1.0.0", + "dns-over-http-resolver": "^1.0.0", + "err-code": "^3.0.1", + "is-ip": "^3.1.0", + "multibase": "^4.0.2", + "uint8arrays": "^2.1.3", + "varint": "^6.0.0" + }, + "dependencies": { + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + } + } + }, + "ipfs-unixfs": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-4.0.3.tgz", + "integrity": "sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==", + "requires": { + "err-code": "^3.0.1", + "protobufjs": "^6.10.2" + } + }, "ipfs-utils": { "version": "8.1.6", "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-8.1.6.tgz", @@ -3674,11 +5565,323 @@ } } }, + "ipld-block": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/ipld-block/-/ipld-block-0.11.1.tgz", + "integrity": "sha512-sDqqLqD5qh4QzGq6ssxLHUCnH4emCf/8F8IwjQM2cjEEIEHMUj57XhNYgmGbemdYPznUhffxFGEHsruh5+HQRw==", + "requires": { + "cids": "^1.0.0" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + } + }, + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "ipld-dag-cbor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-1.0.1.tgz", + "integrity": "sha512-PZh8rHnRETX5bj60i73W2oq6BXoZnIvYCBDwIffYVJgxMr7BEVd5PycAARBiT6daORJ/4zbqEFR5CcrjeCtm/A==", + "requires": { + "borc": "^3.0.0", + "cids": "^1.0.0", + "interface-ipld-format": "^1.0.0", + "is-circular": "^1.0.2", + "multicodec": "^3.0.1", + "multihashing-async": "^2.0.0", + "uint8arrays": "^2.1.3" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + } + } + }, + "ipld-dag-pb": { + "version": "0.22.3", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.22.3.tgz", + "integrity": "sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==", + "requires": { + "cids": "^1.0.0", + "interface-ipld-format": "^1.0.0", + "multicodec": "^3.0.1", + "multihashing-async": "^2.0.0", + "protobufjs": "^6.10.2", + "stable": "^0.1.8", + "uint8arrays": "^2.0.5" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + } + } + }, + "ipld-raw": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ipld-raw/-/ipld-raw-7.0.1.tgz", + "integrity": "sha512-oaiy0Ot23NCnoBA7sLvPL9qFRC6JDB0IsdZL6rUeZJxzxabQuBLNGYXcqjQ8jlF0UPLEUSO+h8OJh2DZPzL2aQ==", + "requires": { + "cids": "^1.1.6", + "interface-ipld-format": "^1.0.0", + "multicodec": "^3.0.1", + "multihashing-async": "^2.1.2" + }, + "dependencies": { + "cids": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", + "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "requires": { + "multibase": "^4.0.1", + "multicodec": "^3.0.1", + "multihashes": "^4.0.1", + "uint8arrays": "^3.0.0" + } + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + }, + "dependencies": { + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + } + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + } + }, + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, "is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" }, + "is-circular": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz", + "integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==" + }, "is-electron": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.1.tgz", @@ -3717,6 +5920,11 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "iso-constants": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/iso-constants/-/iso-constants-0.1.2.tgz", + "integrity": "sha512-OTCM5ZCQsHBCI4Wdu4tSxvDIkmDHd5EwJDps5mKqnQnWJSKlnwMs3EDZ4n3Fh1tmkWkDlyd2vCDbEYuPbyrUNQ==" + }, "iso-random-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-2.0.0.tgz", @@ -3761,6 +5969,14 @@ } } }, + "it-concat": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/it-concat/-/it-concat-2.0.0.tgz", + "integrity": "sha512-jchrEB3fHlUENWkVJRmbFJ1A7gcjJDmwiolQsHhVC14DpUIbX8fgr3SOC7XNE5OoUUQNL6/RaMCPChkPemyQUw==", + "requires": { + "bl": "^5.0.0" + } + }, "it-drain": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-1.0.5.tgz", @@ -3795,6 +6011,11 @@ "p-defer": "^3.0.0" } }, + "it-last": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-last/-/it-last-1.0.6.tgz", + "integrity": "sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q==" + }, "it-length-prefixed": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-3.0.1.tgz", @@ -3874,6 +6095,11 @@ } } }, + "it-peekable": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-1.0.3.tgz", + "integrity": "sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ==" + }, "it-pipe": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-1.1.0.tgz", @@ -3900,6 +6126,30 @@ "resolved": "https://registry.npmjs.org/it-take/-/it-take-1.0.2.tgz", "integrity": "sha512-u7I6qhhxH7pSevcYNaMECtkvZW365ARqAIt9K+xjdK1B2WUDEjQSfETkOCT8bxFq/59LqrN3cMLUtTgmDBaygw==" }, + "it-tar": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/it-tar/-/it-tar-3.0.0.tgz", + "integrity": "sha512-VhD1Hnx4IXDcQgYJnJgltkn+w5F8kiJaB46lqovh+YWfty2JGW7i40QQjWbSvcg1QfaU8is8AVX8xwx/Db9oOg==", + "requires": { + "bl": "^5.0.0", + "buffer": "^6.0.3", + "iso-constants": "^0.1.2", + "it-concat": "^2.0.0", + "it-reader": "^3.0.0", + "p-defer": "^3.0.0" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + } + } + }, "it-to-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-1.0.0.tgz", @@ -3946,6 +6196,11 @@ } } }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, "jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", @@ -3966,6 +6221,14 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json-text-sequence": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.3.0.tgz", + "integrity": "sha512-7khKIYPKwXQem4lWXfpIN/FEnhztCeRPSxH4qm3fVlqulwujrRDD54xAwDDn/qVKpFtV550+QAkcWJcufzqQuA==", + "requires": { + "@sovpro/delimited-stream": "^1.1.0" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4221,6 +6484,12 @@ "multiaddr": "^10.0.0" } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "merge-options": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", @@ -4327,9 +6596,9 @@ } }, "multiformats": { - "version": "9.4.14", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.4.14.tgz", - "integrity": "sha512-X1wtOySaguYL7ua87Gv4+cuvFL3Qi+mpHNcJnzNoyK1NmHy8SfyBIQ1S1KYQoEjXaYoriN+5TP9f4iBJUOQf3A==" + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.5.4.tgz", + "integrity": "sha512-MFT8e8BOLX7OZKfSBGm13FwYvJVI6MEcZ7hujUCpyJwvYyrC1anul50A0Ee74GdeJ77aYTO6YU1vO+oF8NqSIw==" }, "multihashes": { "version": "0.4.21", @@ -4341,6 +6610,47 @@ "varint": "^5.0.0" } }, + "multihashing-async": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", + "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", + "requires": { + "blakejs": "^1.1.0", + "err-code": "^3.0.0", + "js-sha3": "^0.8.0", + "multihashes": "^4.0.1", + "murmurhash3js-revisited": "^3.0.0", + "uint8arrays": "^3.0.0" + }, + "dependencies": { + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + } + }, + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "requires": { + "multiformats": "^9.4.2" + } + } + } + }, "multistream-select": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/multistream-select/-/multistream-select-2.0.1.tgz", @@ -4392,6 +6702,11 @@ } } }, + "murmurhash3js-revisited": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", + "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==" + }, "mutable-proxy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mutable-proxy/-/mutable-proxy-1.0.0.tgz", @@ -4566,6 +6881,11 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, + "parse-duration": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.2.tgz", + "integrity": "sha512-Dg27N6mfok+ow1a2rj/nRjtCfaKrHUZV2SJpEn/s8GaVUSlf4GGRCRP1c13Hj+wfPKVMrFDqLMLITkYKgKxyyg==" + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4815,6 +7135,11 @@ } } }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" + }, "stream-to-it": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz", @@ -4874,6 +7199,26 @@ "utf8-byte-length": "^1.0.1" } }, + "ts-node": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", + "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "yn": "3.1.1" + } + }, "ts-pattern": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-3.3.3.tgz", @@ -4897,6 +7242,12 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "typescript": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "dev": true + }, "uint8arrays": { "version": "2.1.10", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", @@ -4997,6 +7348,12 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz", "integrity": "sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w==" + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/npm/package.json b/npm/package.json index 7b78ffe7..eebdde6f 100644 --- a/npm/package.json +++ b/npm/package.json @@ -7,7 +7,8 @@ "aqua.js", "index.js", "error.js", - "utils.js" + "utils.js", + "dist/*" ], "bin": { "aqua": "index.js", @@ -15,11 +16,18 @@ }, "scripts": { "run": "node index.js", - "from:scalajs": "cp ../cli/.js/target/scala-3.0.2/cli-opt/main.js ./aqua.js && npm run run -- $@" + "from:scalajs": "cp ../cli/.js/target/scala-3.1.0/cli-opt/main.js ./aqua.js && npm run build && npm run run -- $@", + "build": "tsc" }, "dependencies": { + "@fluencelabs/aqua-ipfs": "0.5.2", + "@fluencelabs/aqua-lib": "0.2.1", "@fluencelabs/fluence": "0.15.2", - "@fluencelabs/aqua-lib": "0.2.1" + "ipfs-http-client": "50.1.2" + }, + "devDependencies": { + "ts-node": "^10.4.0", + "typescript": "^4.5.4" }, "repository": { "type": "git", diff --git a/npm/src/ipfs.ts b/npm/src/ipfs.ts new file mode 100644 index 00000000..d1542b9d --- /dev/null +++ b/npm/src/ipfs.ts @@ -0,0 +1,48 @@ +import {create, globSource} from "ipfs-http-client"; +import { Multiaddr, protocols } from "multiaddr"; + +import * as util from "util"; + +type UploadResult = { + cid: string, + size: number +} + +export async function uploadFile( + path: string, + multiaddrResult: any, + infoLogger: (s: string) => void, + errorLogger: (s: string) => void +): Promise { + + let rpcAddr; + + if (multiaddrResult.success) { + rpcAddr = multiaddrResult.multiaddr; + } else { + errorLogger( + "Failed to retrieve external api multiaddr" + ); + throw multiaddrResult.error; + } + + let rpcMaddr = new Multiaddr(rpcAddr).decapsulateCode( + protocols.names.p2p.code + ); + // HACK: `as any` is needed because ipfs-http-client forgot to add `| Multiaddr` to the `create` types + const ipfs = create(rpcMaddr as any); + infoLogger("created ipfs client to " + rpcMaddr); + + await ipfs.id(); + infoLogger("connected to ipfs"); + + const source: any = await globSource(path) + const file = await ipfs.add(source); + + infoLogger("file uploaded"); + + return { + cid: file.cid.toString(), + size: file.size + }; +} diff --git a/npm/tsconfig.json b/npm/tsconfig.json new file mode 100644 index 00000000..4979d1cd --- /dev/null +++ b/npm/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + + "target": "esnext", + "module": "ESNext", + "lib": [ + "ESNext" + ], + "declaration": true, + "outDir": "dist", + "moduleResolution": "node", + "strict": true, + "esModuleInterop": true, + "noImplicitAny": false, + "strictNullChecks": false, + "skipLibCheck": true, + }, + "include": ["src/**/*"], + "exclude": [ + "node_modules", + "dist", + "bundle", + "src/__test__", + "src/compiled" + ] +} \ No newline at end of file