From b09ad8aff32b1af0806f4ea147fd7b527a1beb01 Mon Sep 17 00:00:00 2001 From: RohanXKapur Date: Tue, 7 Sep 2021 00:33:48 +0530 Subject: [PATCH] finished early alpha --- .gitignore | 5 + Anchor.toml | 9 + Cargo.lock | 1457 + Cargo.toml | 4 + migrations/deploy.js | 13 + programs/monaco/Cargo.toml | 23 + programs/monaco/Xargo.toml | 2 + programs/monaco/src/lib.rs | 755 + tests/monaco.js | 16 + tests/node_modules/.bin/JSONStream | 1 + tests/node_modules/.bin/_mocha | 1 + tests/node_modules/.bin/flat | 1 + tests/node_modules/.bin/he | 1 + tests/node_modules/.bin/jayson | 1 + tests/node_modules/.bin/js-yaml | 1 + tests/node_modules/.bin/mocha | 1 + tests/node_modules/.bin/nanoid | 1 + tests/node_modules/.bin/node-gyp-build | 1 + .../node_modules/.bin/node-gyp-build-optional | 1 + tests/node_modules/.bin/node-gyp-build-test | 1 + tests/node_modules/.bin/node-which | 1 + tests/node_modules/.bin/uuid | 1 + tests/node_modules/.package-lock.json | 1636 + tests/node_modules/@babel/runtime/LICENSE | 22 + tests/node_modules/@babel/runtime/README.md | 19 + .../@babel/runtime/helpers/AsyncGenerator.js | 99 + .../@babel/runtime/helpers/AwaitValue.js | 6 + .../helpers/applyDecoratedDescriptor.js | 31 + .../runtime/helpers/arrayLikeToArray.js | 12 + .../@babel/runtime/helpers/arrayWithHoles.js | 6 + .../runtime/helpers/arrayWithoutHoles.js | 8 + .../runtime/helpers/assertThisInitialized.js | 10 + .../runtime/helpers/asyncGeneratorDelegate.js | 57 + .../@babel/runtime/helpers/asyncIterator.js | 16 + .../runtime/helpers/asyncToGenerator.js | 38 + .../runtime/helpers/awaitAsyncGenerator.js | 8 + .../classApplyDescriptorDestructureSet.js | 23 + .../helpers/classApplyDescriptorGet.js | 10 + .../helpers/classApplyDescriptorSet.js | 14 + .../@babel/runtime/helpers/classCallCheck.js | 8 + .../helpers/classCheckPrivateStaticAccess.js | 8 + .../classCheckPrivateStaticFieldDescriptor.js | 8 + .../helpers/classExtractFieldDescriptor.js | 10 + .../runtime/helpers/classNameTDZError.js | 6 + .../classPrivateFieldDestructureSet.js | 11 + .../runtime/helpers/classPrivateFieldGet.js | 11 + .../helpers/classPrivateFieldLooseBase.js | 10 + .../helpers/classPrivateFieldLooseKey.js | 8 + .../runtime/helpers/classPrivateFieldSet.js | 12 + .../runtime/helpers/classPrivateMethodGet.js | 10 + .../runtime/helpers/classPrivateMethodSet.js | 6 + .../classStaticPrivateFieldDestructureSet.js | 14 + .../helpers/classStaticPrivateFieldSpecGet.js | 14 + .../helpers/classStaticPrivateFieldSpecSet.js | 15 + .../helpers/classStaticPrivateMethodGet.js | 9 + .../helpers/classStaticPrivateMethodSet.js | 6 + .../@babel/runtime/helpers/construct.js | 26 + .../@babel/runtime/helpers/createClass.js | 18 + .../helpers/createForOfIteratorHelper.js | 61 + .../helpers/createForOfIteratorHelperLoose.js | 25 + .../@babel/runtime/helpers/createSuper.js | 25 + .../@babel/runtime/helpers/decorate.js | 401 + .../@babel/runtime/helpers/defaults.js | 17 + .../helpers/defineEnumerableProperties.js | 25 + .../@babel/runtime/helpers/defineProperty.js | 17 + .../runtime/helpers/esm/AsyncGenerator.js | 95 + .../@babel/runtime/helpers/esm/AwaitValue.js | 3 + .../helpers/esm/applyDecoratedDescriptor.js | 28 + .../runtime/helpers/esm/arrayLikeToArray.js | 9 + .../runtime/helpers/esm/arrayWithHoles.js | 3 + .../runtime/helpers/esm/arrayWithoutHoles.js | 4 + .../helpers/esm/assertThisInitialized.js | 7 + .../helpers/esm/asyncGeneratorDelegate.js | 54 + .../runtime/helpers/esm/asyncIterator.js | 13 + .../runtime/helpers/esm/asyncToGenerator.js | 35 + .../helpers/esm/awaitAsyncGenerator.js | 4 + .../esm/classApplyDescriptorDestructureSet.js | 20 + .../helpers/esm/classApplyDescriptorGet.js | 7 + .../helpers/esm/classApplyDescriptorSet.js | 11 + .../runtime/helpers/esm/classCallCheck.js | 5 + .../esm/classCheckPrivateStaticAccess.js | 5 + .../classCheckPrivateStaticFieldDescriptor.js | 5 + .../esm/classExtractFieldDescriptor.js | 7 + .../runtime/helpers/esm/classNameTDZError.js | 3 + .../esm/classPrivateFieldDestructureSet.js | 6 + .../helpers/esm/classPrivateFieldGet.js | 6 + .../helpers/esm/classPrivateFieldLooseBase.js | 7 + .../helpers/esm/classPrivateFieldLooseKey.js | 4 + .../helpers/esm/classPrivateFieldSet.js | 7 + .../helpers/esm/classPrivateMethodGet.js | 7 + .../helpers/esm/classPrivateMethodSet.js | 3 + .../classStaticPrivateFieldDestructureSet.js | 8 + .../esm/classStaticPrivateFieldSpecGet.js | 8 + .../esm/classStaticPrivateFieldSpecSet.js | 9 + .../esm/classStaticPrivateMethodGet.js | 5 + .../esm/classStaticPrivateMethodSet.js | 3 + .../@babel/runtime/helpers/esm/construct.js | 18 + .../@babel/runtime/helpers/esm/createClass.js | 15 + .../helpers/esm/createForOfIteratorHelper.js | 57 + .../esm/createForOfIteratorHelperLoose.js | 21 + .../@babel/runtime/helpers/esm/createSuper.js | 19 + .../@babel/runtime/helpers/esm/decorate.js | 396 + .../@babel/runtime/helpers/esm/defaults.js | 14 + .../helpers/esm/defineEnumerableProperties.js | 22 + .../runtime/helpers/esm/defineProperty.js | 14 + .../@babel/runtime/helpers/esm/extends.js | 17 + .../@babel/runtime/helpers/esm/get.js | 20 + .../runtime/helpers/esm/getPrototypeOf.js | 6 + .../@babel/runtime/helpers/esm/inherits.js | 15 + .../runtime/helpers/esm/inheritsLoose.js | 6 + .../helpers/esm/initializerDefineProperty.js | 9 + .../helpers/esm/initializerWarningHelper.js | 3 + .../@babel/runtime/helpers/esm/instanceof.js | 7 + .../helpers/esm/interopRequireDefault.js | 5 + .../helpers/esm/interopRequireWildcard.js | 51 + .../runtime/helpers/esm/isNativeFunction.js | 3 + .../helpers/esm/isNativeReflectConstruct.js | 12 + .../runtime/helpers/esm/iterableToArray.js | 3 + .../helpers/esm/iterableToArrayLimit.js | 29 + .../helpers/esm/iterableToArrayLimitLoose.js | 14 + .../@babel/runtime/helpers/esm/jsx.js | 46 + .../runtime/helpers/esm/maybeArrayLike.js | 9 + .../runtime/helpers/esm/newArrowCheck.js | 5 + .../runtime/helpers/esm/nonIterableRest.js | 3 + .../runtime/helpers/esm/nonIterableSpread.js | 3 + .../helpers/esm/objectDestructuringEmpty.js | 3 + .../runtime/helpers/esm/objectSpread.js | 19 + .../runtime/helpers/esm/objectSpread2.js | 39 + .../helpers/esm/objectWithoutProperties.js | 19 + .../esm/objectWithoutPropertiesLoose.js | 14 + .../@babel/runtime/helpers/esm/package.json | 3 + .../helpers/esm/possibleConstructorReturn.js | 11 + .../runtime/helpers/esm/readOnlyError.js | 3 + .../@babel/runtime/helpers/esm/set.js | 51 + .../runtime/helpers/esm/setPrototypeOf.js | 8 + .../helpers/esm/skipFirstGeneratorNext.js | 7 + .../runtime/helpers/esm/slicedToArray.js | 7 + .../runtime/helpers/esm/slicedToArrayLoose.js | 7 + .../runtime/helpers/esm/superPropBase.js | 9 + .../helpers/esm/taggedTemplateLiteral.js | 11 + .../helpers/esm/taggedTemplateLiteralLoose.js | 8 + .../@babel/runtime/helpers/esm/tdz.js | 3 + .../@babel/runtime/helpers/esm/temporalRef.js | 5 + .../runtime/helpers/esm/temporalUndefined.js | 1 + .../@babel/runtime/helpers/esm/toArray.js | 7 + .../runtime/helpers/esm/toConsumableArray.js | 7 + .../@babel/runtime/helpers/esm/toPrimitive.js | 13 + .../runtime/helpers/esm/toPropertyKey.js | 6 + .../@babel/runtime/helpers/esm/typeof.js | 15 + .../helpers/esm/unsupportedIterableToArray.js | 9 + .../runtime/helpers/esm/wrapAsyncGenerator.js | 6 + .../runtime/helpers/esm/wrapNativeSuper.js | 37 + .../@babel/runtime/helpers/esm/wrapRegExp.js | 65 + .../runtime/helpers/esm/writeOnlyError.js | 3 + .../@babel/runtime/helpers/extends.js | 21 + .../@babel/runtime/helpers/get.js | 27 + .../@babel/runtime/helpers/getPrototypeOf.js | 10 + .../@babel/runtime/helpers/inherits.js | 19 + .../@babel/runtime/helpers/inheritsLoose.js | 10 + .../helpers/initializerDefineProperty.js | 12 + .../helpers/initializerWarningHelper.js | 6 + .../@babel/runtime/helpers/instanceof.js | 10 + .../runtime/helpers/interopRequireDefault.js | 8 + .../runtime/helpers/interopRequireWildcard.js | 54 + .../runtime/helpers/isNativeFunction.js | 6 + .../helpers/isNativeReflectConstruct.js | 15 + .../@babel/runtime/helpers/iterableToArray.js | 6 + .../runtime/helpers/iterableToArrayLimit.js | 32 + .../helpers/iterableToArrayLimitLoose.js | 17 + .../@babel/runtime/helpers/jsx.js | 50 + .../@babel/runtime/helpers/maybeArrayLike.js | 13 + .../@babel/runtime/helpers/newArrowCheck.js | 8 + .../@babel/runtime/helpers/nonIterableRest.js | 6 + .../runtime/helpers/nonIterableSpread.js | 6 + .../helpers/objectDestructuringEmpty.js | 6 + .../@babel/runtime/helpers/objectSpread.js | 23 + .../@babel/runtime/helpers/objectSpread2.js | 42 + .../helpers/objectWithoutProperties.js | 23 + .../helpers/objectWithoutPropertiesLoose.js | 17 + .../helpers/possibleConstructorReturn.js | 16 + .../@babel/runtime/helpers/readOnlyError.js | 6 + .../@babel/runtime/helpers/set.js | 55 + .../@babel/runtime/helpers/setPrototypeOf.js | 12 + .../runtime/helpers/skipFirstGeneratorNext.js | 10 + .../@babel/runtime/helpers/slicedToArray.js | 14 + .../runtime/helpers/slicedToArrayLoose.js | 14 + .../@babel/runtime/helpers/superPropBase.js | 13 + .../runtime/helpers/taggedTemplateLiteral.js | 14 + .../helpers/taggedTemplateLiteralLoose.js | 11 + .../@babel/runtime/helpers/tdz.js | 6 + .../@babel/runtime/helpers/temporalRef.js | 10 + .../runtime/helpers/temporalUndefined.js | 4 + .../@babel/runtime/helpers/toArray.js | 14 + .../runtime/helpers/toConsumableArray.js | 14 + .../@babel/runtime/helpers/toPrimitive.js | 17 + .../@babel/runtime/helpers/toPropertyKey.js | 11 + .../@babel/runtime/helpers/typeof.js | 22 + .../helpers/unsupportedIterableToArray.js | 13 + .../runtime/helpers/wrapAsyncGenerator.js | 10 + .../@babel/runtime/helpers/wrapNativeSuper.js | 45 + .../@babel/runtime/helpers/wrapRegExp.js | 72 + .../@babel/runtime/helpers/writeOnlyError.js | 6 + .../node_modules/@babel/runtime/package.json | 821 + .../@babel/runtime/regenerator/index.js | 1 + .../@project-serum/anchor/#package.json# | 63 + .../anchor/dist/cjs/coder/accounts.js | 45 + .../anchor/dist/cjs/coder/accounts.js.map | 1 + .../anchor/dist/cjs/coder/common.js | 107 + .../anchor/dist/cjs/coder/common.js.map | 1 + .../anchor/dist/cjs/coder/event.js | 78 + .../anchor/dist/cjs/coder/event.js.map | 1 + .../anchor/dist/cjs/coder/idl.js | 161 + .../anchor/dist/cjs/coder/idl.js.map | 1 + .../anchor/dist/cjs/coder/index.js | 44 + .../anchor/dist/cjs/coder/index.js.map | 1 + .../anchor/dist/cjs/coder/instruction.js | 302 + .../anchor/dist/cjs/coder/instruction.js.map | 1 + .../anchor/dist/cjs/coder/state.js | 53 + .../anchor/dist/cjs/coder/state.js.map | 1 + .../anchor/dist/cjs/coder/types.js | 32 + .../anchor/dist/cjs/coder/types.js.map | 1 + .../@project-serum/anchor/dist/cjs/error.js | 162 + .../anchor/dist/cjs/error.js.map | 1 + .../@project-serum/anchor/dist/cjs/idl.js | 50 + .../@project-serum/anchor/dist/cjs/idl.js.map | 1 + .../@project-serum/anchor/dist/cjs/index.js | 53 + .../anchor/dist/cjs/index.js.map | 1 + .../anchor/dist/cjs/program/common.js | 58 + .../anchor/dist/cjs/program/common.js.map | 1 + .../anchor/dist/cjs/program/context.js | 16 + .../anchor/dist/cjs/program/context.js.map | 1 + .../anchor/dist/cjs/program/event.js | 210 + .../anchor/dist/cjs/program/event.js.map | 1 + .../anchor/dist/cjs/program/index.js | 140 + .../anchor/dist/cjs/program/index.js.map | 1 + .../dist/cjs/program/namespace/account.js | 190 + .../dist/cjs/program/namespace/account.js.map | 1 + .../dist/cjs/program/namespace/index.js | 49 + .../dist/cjs/program/namespace/index.js.map | 1 + .../dist/cjs/program/namespace/instruction.js | 62 + .../cjs/program/namespace/instruction.js.map | 1 + .../anchor/dist/cjs/program/namespace/rpc.js | 27 + .../dist/cjs/program/namespace/rpc.js.map | 1 + .../dist/cjs/program/namespace/simulate.js | 46 + .../cjs/program/namespace/simulate.js.map | 1 + .../dist/cjs/program/namespace/state.js | 202 + .../dist/cjs/program/namespace/state.js.map | 1 + .../dist/cjs/program/namespace/transaction.js | 20 + .../cjs/program/namespace/transaction.js.map | 1 + .../anchor/dist/cjs/provider.js | 213 + .../anchor/dist/cjs/provider.js.map | 1 + .../anchor/dist/cjs/utils/bytes/base64.js | 32 + .../anchor/dist/cjs/utils/bytes/base64.js.map | 1 + .../anchor/dist/cjs/utils/bytes/bs58.js | 32 + .../anchor/dist/cjs/utils/bytes/bs58.js.map | 1 + .../anchor/dist/cjs/utils/bytes/hex.js | 22 + .../anchor/dist/cjs/utils/bytes/hex.js.map | 1 + .../anchor/dist/cjs/utils/bytes/index.js | 27 + .../anchor/dist/cjs/utils/bytes/index.js.map | 1 + .../anchor/dist/cjs/utils/bytes/utf8.js | 18 + .../anchor/dist/cjs/utils/bytes/utf8.js.map | 1 + .../anchor/dist/cjs/utils/common.js | 10 + .../anchor/dist/cjs/utils/common.js.map | 1 + .../anchor/dist/cjs/utils/features.js | 17 + .../anchor/dist/cjs/utils/features.js.map | 1 + .../anchor/dist/cjs/utils/index.js | 29 + .../anchor/dist/cjs/utils/index.js.map | 1 + .../anchor/dist/cjs/utils/pubkey.js | 88 + .../anchor/dist/cjs/utils/pubkey.js.map | 1 + .../anchor/dist/cjs/utils/rpc.js | 73 + .../anchor/dist/cjs/utils/rpc.js.map | 1 + .../anchor/dist/cjs/utils/sha256.js | 9 + .../anchor/dist/cjs/utils/sha256.js.map | 1 + .../anchor/dist/cjs/utils/token.js | 11 + .../anchor/dist/cjs/utils/token.js.map | 1 + .../anchor/dist/cjs/workspace.js | 98 + .../anchor/dist/cjs/workspace.js.map | 1 + .../anchor/dist/coder/accounts.d.ts | 20 + .../anchor/dist/coder/accounts.d.ts.map | 1 + .../anchor/dist/coder/common.d.ts | 5 + .../anchor/dist/coder/common.d.ts.map | 1 + .../anchor/dist/coder/event.d.ts | 17 + .../anchor/dist/coder/event.d.ts.map | 1 + .../@project-serum/anchor/dist/coder/idl.d.ts | 7 + .../anchor/dist/coder/idl.d.ts.map | 1 + .../anchor/dist/coder/index.d.ts | 41 + .../anchor/dist/coder/index.d.ts.map | 1 + .../anchor/dist/coder/instruction.d.ts | 57 + .../anchor/dist/coder/instruction.d.ts.map | 1 + .../anchor/dist/coder/state.d.ts | 10 + .../anchor/dist/coder/state.d.ts.map | 1 + .../anchor/dist/coder/types.d.ts | 15 + .../anchor/dist/coder/types.d.ts.map | 1 + .../@project-serum/anchor/dist/error.d.ts | 10 + .../@project-serum/anchor/dist/error.d.ts.map | 1 + .../anchor/dist/esm/coder/accounts.js | 40 + .../anchor/dist/esm/coder/accounts.js.map | 1 + .../anchor/dist/esm/coder/common.js | 102 + .../anchor/dist/esm/coder/common.js.map | 1 + .../anchor/dist/esm/coder/event.js | 54 + .../anchor/dist/esm/coder/event.js.map | 1 + .../anchor/dist/esm/coder/idl.js | 135 + .../anchor/dist/esm/coder/idl.js.map | 1 + .../anchor/dist/esm/coder/index.js | 30 + .../anchor/dist/esm/coder/index.js.map | 1 + .../anchor/dist/esm/coder/instruction.js | 276 + .../anchor/dist/esm/coder/instruction.js.map | 1 + .../anchor/dist/esm/coder/state.js | 29 + .../anchor/dist/esm/coder/state.js.map | 1 + .../anchor/dist/esm/coder/types.js | 28 + .../anchor/dist/esm/coder/types.js.map | 1 + .../@project-serum/anchor/dist/esm/error.js | 157 + .../anchor/dist/esm/error.js.map | 1 + .../@project-serum/anchor/dist/esm/idl.js | 24 + .../@project-serum/anchor/dist/esm/idl.js.map | 1 + .../@project-serum/anchor/dist/esm/index.js | 11 + .../anchor/dist/esm/index.js.map | 1 + .../anchor/dist/esm/program/common.js | 51 + .../anchor/dist/esm/program/common.js.map | 1 + .../anchor/dist/esm/program/context.js | 12 + .../anchor/dist/esm/program/context.js.map | 1 + .../anchor/dist/esm/program/event.js | 186 + .../anchor/dist/esm/program/event.js.map | 1 + .../anchor/dist/esm/program/index.js | 133 + .../anchor/dist/esm/program/index.js.map | 1 + .../dist/esm/program/namespace/account.js | 163 + .../dist/esm/program/namespace/account.js.map | 1 + .../dist/esm/program/namespace/index.js | 40 + .../dist/esm/program/namespace/index.js.map | 1 + .../dist/esm/program/namespace/instruction.js | 59 + .../esm/program/namespace/instruction.js.map | 1 + .../anchor/dist/esm/program/namespace/rpc.js | 24 + .../dist/esm/program/namespace/rpc.js.map | 1 + .../dist/esm/program/namespace/simulate.js | 43 + .../esm/program/namespace/simulate.js.map | 1 + .../dist/esm/program/namespace/state.js | 175 + .../dist/esm/program/namespace/state.js.map | 1 + .../dist/esm/program/namespace/transaction.js | 17 + .../esm/program/namespace/transaction.js.map | 1 + .../anchor/dist/esm/provider.js | 206 + .../anchor/dist/esm/provider.js.map | 1 + .../anchor/dist/esm/utils/bytes/base64.js | 8 + .../anchor/dist/esm/utils/bytes/base64.js.map | 1 + .../anchor/dist/esm/utils/bytes/bs58.js | 8 + .../anchor/dist/esm/utils/bytes/bs58.js.map | 1 + .../anchor/dist/esm/utils/bytes/hex.js | 17 + .../anchor/dist/esm/utils/bytes/hex.js.map | 1 + .../anchor/dist/esm/utils/bytes/index.js | 9 + .../anchor/dist/esm/utils/bytes/index.js.map | 1 + .../anchor/dist/esm/utils/bytes/utf8.js | 13 + .../anchor/dist/esm/utils/bytes/utf8.js.map | 1 + .../anchor/dist/esm/utils/common.js | 7 + .../anchor/dist/esm/utils/common.js.map | 1 + .../anchor/dist/esm/utils/features.js | 12 + .../anchor/dist/esm/utils/features.js.map | 1 + .../anchor/dist/esm/utils/index.js | 13 + .../anchor/dist/esm/utils/index.js.map | 1 + .../anchor/dist/esm/utils/pubkey.js | 78 + .../anchor/dist/esm/utils/pubkey.js.map | 1 + .../anchor/dist/esm/utils/rpc.js | 65 + .../anchor/dist/esm/utils/rpc.js.map | 1 + .../anchor/dist/esm/utils/sha256.js | 5 + .../anchor/dist/esm/utils/sha256.js.map | 1 + .../anchor/dist/esm/utils/token.js | 7 + .../anchor/dist/esm/utils/token.js.map | 1 + .../anchor/dist/esm/workspace.js | 74 + .../anchor/dist/esm/workspace.js.map | 1 + .../@project-serum/anchor/dist/idl.d.ts | 87 + .../@project-serum/anchor/dist/idl.d.ts.map | 1 + .../@project-serum/anchor/dist/index.d.ts | 16 + .../@project-serum/anchor/dist/index.d.ts.map | 1 + .../anchor/dist/program/common.d.ts | 20 + .../anchor/dist/program/common.d.ts.map | 1 + .../anchor/dist/program/context.d.ts | 52 + .../anchor/dist/program/context.d.ts.map | 1 + .../anchor/dist/program/event.d.ts | 50 + .../anchor/dist/program/event.d.ts.map | 1 + .../anchor/dist/program/index.d.ts | 251 + .../anchor/dist/program/index.d.ts.map | 1 + .../dist/program/namespace/account.d.ts | 100 + .../dist/program/namespace/account.d.ts.map | 1 + .../anchor/dist/program/namespace/index.d.ts | 30 + .../dist/program/namespace/index.d.ts.map | 1 + .../dist/program/namespace/instruction.d.ts | 52 + .../program/namespace/instruction.d.ts.map | 1 + .../anchor/dist/program/namespace/rpc.d.ts | 50 + .../dist/program/namespace/rpc.d.ts.map | 1 + .../dist/program/namespace/simulate.d.ts | 60 + .../dist/program/namespace/simulate.d.ts.map | 1 + .../anchor/dist/program/namespace/state.d.ts | 65 + .../dist/program/namespace/state.d.ts.map | 1 + .../dist/program/namespace/transaction.d.ts | 43 + .../program/namespace/transaction.d.ts.map | 1 + .../@project-serum/anchor/dist/provider.d.ts | 87 + .../anchor/dist/provider.d.ts.map | 1 + .../anchor/dist/tsconfig.cjs.tsbuildinfo | 2421 ++ .../anchor/dist/tsconfig.tsbuildinfo | 2420 ++ .../anchor/dist/utils/bytes/base64.d.ts | 4 + .../anchor/dist/utils/bytes/base64.d.ts.map | 1 + .../anchor/dist/utils/bytes/bs58.d.ts | 4 + .../anchor/dist/utils/bytes/bs58.d.ts.map | 1 + .../anchor/dist/utils/bytes/hex.d.ts | 4 + .../anchor/dist/utils/bytes/hex.d.ts.map | 1 + .../anchor/dist/utils/bytes/index.d.ts | 5 + .../anchor/dist/utils/bytes/index.d.ts.map | 1 + .../anchor/dist/utils/bytes/utf8.d.ts | 3 + .../anchor/dist/utils/bytes/utf8.d.ts.map | 1 + .../anchor/dist/utils/common.d.ts | 6 + .../anchor/dist/utils/common.d.ts.map | 1 + .../anchor/dist/utils/features.d.ts | 3 + .../anchor/dist/utils/features.d.ts.map | 1 + .../anchor/dist/utils/index.d.ts | 7 + .../anchor/dist/utils/index.d.ts.map | 1 + .../anchor/dist/utils/pubkey.d.ts | 8 + .../anchor/dist/utils/pubkey.d.ts.map | 1 + .../@project-serum/anchor/dist/utils/rpc.d.ts | 14 + .../anchor/dist/utils/rpc.d.ts.map | 1 + .../anchor/dist/utils/sha256.d.ts | 2 + .../anchor/dist/utils/sha256.d.ts.map | 1 + .../anchor/dist/utils/token.d.ts | 6 + .../anchor/dist/utils/token.d.ts.map | 1 + .../@project-serum/anchor/dist/workspace.d.ts | 10 + .../anchor/dist/workspace.d.ts.map | 1 + .../@project-serum/anchor/jest.config.js | 5 + .../@project-serum/anchor/package.json | 63 + .../anchor/src/coder/accounts.ts | 55 + .../@project-serum/anchor/src/coder/common.ts | 113 + .../@project-serum/anchor/src/coder/event.ts | 73 + .../@project-serum/anchor/src/coder/idl.ts | 154 + .../@project-serum/anchor/src/coder/index.ts | 62 + .../anchor/src/coder/instruction.ts | 381 + .../@project-serum/anchor/src/coder/state.ts | 38 + .../@project-serum/anchor/src/coder/types.ts | 38 + .../@project-serum/anchor/src/error.ts | 174 + .../@project-serum/anchor/src/idl.ts | 150 + .../@project-serum/anchor/src/index.ts | 74 + .../anchor/src/program/common.ts | 72 + .../anchor/src/program/context.ts | 77 + .../anchor/src/program/event.ts | 275 + .../anchor/src/program/index.ts | 336 + .../anchor/src/program/namespace/account.ts | 276 + .../anchor/src/program/namespace/index.ts | 80 + .../src/program/namespace/instruction.ts | 124 + .../anchor/src/program/namespace/rpc.ts | 77 + .../anchor/src/program/namespace/simulate.ts | 109 + .../anchor/src/program/namespace/state.ts | 255 + .../src/program/namespace/transaction.ts | 61 + .../@project-serum/anchor/src/provider.ts | 310 + .../anchor/src/utils/bytes/base64.ts | 9 + .../anchor/src/utils/bytes/bs58.ts | 9 + .../anchor/src/utils/bytes/hex.ts | 23 + .../anchor/src/utils/bytes/index.ts | 4 + .../anchor/src/utils/bytes/utf8.ts | 15 + .../@project-serum/anchor/src/utils/common.ts | 6 + .../anchor/src/utils/features.ts | 14 + .../@project-serum/anchor/src/utils/index.ts | 6 + .../@project-serum/anchor/src/utils/pubkey.ts | 97 + .../@project-serum/anchor/src/utils/rpc.ts | 100 + .../@project-serum/anchor/src/utils/sha256.ts | 5 + .../@project-serum/anchor/src/utils/token.ts | 23 + .../@project-serum/anchor/src/workspace.ts | 104 + .../anchor/tests/events.spec.ts | 33 + .../@project-serum/anchor/tsconfig.cjs.json | 11 + .../@project-serum/anchor/tsconfig.json | 29 + .../anchor/types/buffer-layout/index.d.ts | 88 + .../@project-serum/borsh/dist/lib/index.d.ts | 29 + .../borsh/dist/lib/index.d.ts.map | 1 + .../@project-serum/borsh/dist/lib/index.js | 181 + .../borsh/dist/lib/index.js.map | 1 + .../borsh/dist/tsconfig.tsbuildinfo | 2420 ++ .../@project-serum/borsh/package.json | 34 + .../@solana/buffer-layout/LICENSE | 21 + .../@solana/buffer-layout/README.md | 397 + .../@solana/buffer-layout/lib/Layout.d.ts | 1187 + .../@solana/buffer-layout/lib/Layout.js | 2691 ++ .../@solana/buffer-layout/lib/Layout.js.map | 1 + .../node_modules/buffer/AUTHORS.md | 73 + .../buffer-layout/node_modules/buffer/LICENSE | 21 + .../node_modules/buffer/README.md | 410 + .../node_modules/buffer/index.d.ts | 194 + .../node_modules/buffer/index.js | 2106 ++ .../node_modules/buffer/package.json | 93 + .../@solana/buffer-layout/package.json | 50 + tests/node_modules/@solana/web3.js/LICENSE | 20 + tests/node_modules/@solana/web3.js/README.md | 157 + .../@solana/web3.js/lib/index.browser.esm.js | 6711 ++++ .../web3.js/lib/index.browser.esm.js.map | 1 + .../@solana/web3.js/lib/index.cjs.js | 6824 ++++ .../@solana/web3.js/lib/index.cjs.js.map | 1 + .../@solana/web3.js/lib/index.d.ts | 2811 ++ .../@solana/web3.js/lib/index.esm.js | 6742 ++++ .../@solana/web3.js/lib/index.esm.js.map | 1 + .../@solana/web3.js/lib/index.iife.js | 28706 +++++++++++++++ .../@solana/web3.js/lib/index.iife.js.map | 1 + .../@solana/web3.js/lib/index.iife.min.js | 39 + .../@solana/web3.js/lib/index.iife.min.js.map | 1 + .../@solana/web3.js/module.flow.js | 3888 ++ .../node_modules/@solana/web3.js/package.json | 143 + .../@solana/web3.js/src/account.ts | 46 + .../@solana/web3.js/src/agent-manager.ts | 44 + .../@solana/web3.js/src/blockhash.ts | 4 + .../web3.js/src/bpf-loader-deprecated.ts | 5 + .../@solana/web3.js/src/bpf-loader.ts | 45 + .../@solana/web3.js/src/connection.ts | 4242 +++ .../@solana/web3.js/src/epoch-schedule.ts | 102 + .../@solana/web3.js/src/errors.ts | 9 + .../@solana/web3.js/src/fee-calculator.ts | 16 + .../node_modules/@solana/web3.js/src/index.ts | 28 + .../@solana/web3.js/src/instruction.ts | 48 + .../@solana/web3.js/src/keypair.ts | 98 + .../@solana/web3.js/src/layout.ts | 92 + .../@solana/web3.js/src/loader.ts | 223 + .../@solana/web3.js/src/message.ts | 227 + .../@solana/web3.js/src/nonce-account.ts | 65 + .../@solana/web3.js/src/publickey.ts | 261 + .../@solana/web3.js/src/secp256k1-program.ts | 215 + .../@solana/web3.js/src/stake-program.ts | 811 + .../@solana/web3.js/src/system-program.ts | 943 + .../@solana/web3.js/src/sysvar.ts | 25 + .../@solana/web3.js/src/timing.ts | 23 + .../@solana/web3.js/src/transaction.ts | 709 + .../@solana/web3.js/src/util/assert.ts | 8 + .../@solana/web3.js/src/util/borsh-schema.ts | 38 + .../@solana/web3.js/src/util/cluster.ts | 31 + .../web3.js/src/util/promise-timeout.ts | 14 + .../util/send-and-confirm-raw-transaction.ts | 46 + .../src/util/send-and-confirm-transaction.ts | 49 + .../web3.js/src/util/shortvec-encoding.ts | 28 + .../@solana/web3.js/src/util/sleep.ts | 4 + .../@solana/web3.js/src/util/to-buffer.ts | 11 + .../@solana/web3.js/src/util/url.ts | 18 + .../@solana/web3.js/src/validator-info.ts | 106 + .../@solana/web3.js/src/vote-account.ts | 135 + tests/node_modules/@types/bn.js/LICENSE | 21 + tests/node_modules/@types/bn.js/README.md | 16 + tests/node_modules/@types/bn.js/index.d.ts | 586 + tests/node_modules/@types/bn.js/package.json | 36 + tests/node_modules/@types/connect/LICENSE | 21 + tests/node_modules/@types/connect/README.md | 16 + tests/node_modules/@types/connect/index.d.ts | 93 + .../node_modules/@types/connect/package.json | 32 + .../@types/express-serve-static-core/LICENSE | 21 + .../express-serve-static-core/README.md | 16 + .../express-serve-static-core/index.d.ts | 1252 + .../express-serve-static-core/package.json | 71 + .../ts4.0/index.d.ts | 1162 + tests/node_modules/@types/lodash/LICENSE | 21 + tests/node_modules/@types/lodash/README.md | 16 + tests/node_modules/@types/lodash/add.d.ts | 2 + tests/node_modules/@types/lodash/after.d.ts | 2 + tests/node_modules/@types/lodash/ary.d.ts | 2 + tests/node_modules/@types/lodash/assign.d.ts | 2 + .../node_modules/@types/lodash/assignIn.d.ts | 2 + .../@types/lodash/assignInWith.d.ts | 2 + .../@types/lodash/assignWith.d.ts | 2 + tests/node_modules/@types/lodash/at.d.ts | 2 + tests/node_modules/@types/lodash/attempt.d.ts | 2 + tests/node_modules/@types/lodash/before.d.ts | 2 + tests/node_modules/@types/lodash/bind.d.ts | 2 + tests/node_modules/@types/lodash/bindAll.d.ts | 2 + tests/node_modules/@types/lodash/bindKey.d.ts | 2 + .../node_modules/@types/lodash/camelCase.d.ts | 2 + .../@types/lodash/capitalize.d.ts | 2 + .../node_modules/@types/lodash/castArray.d.ts | 2 + tests/node_modules/@types/lodash/ceil.d.ts | 2 + tests/node_modules/@types/lodash/chain.d.ts | 2 + tests/node_modules/@types/lodash/chunk.d.ts | 2 + tests/node_modules/@types/lodash/clamp.d.ts | 2 + tests/node_modules/@types/lodash/clone.d.ts | 2 + .../node_modules/@types/lodash/cloneDeep.d.ts | 2 + .../@types/lodash/cloneDeepWith.d.ts | 2 + .../node_modules/@types/lodash/cloneWith.d.ts | 2 + .../@types/lodash/common/array.d.ts | 2127 ++ .../@types/lodash/common/collection.d.ts | 1930 + .../@types/lodash/common/common.d.ts | 280 + .../@types/lodash/common/date.d.ts | 23 + .../@types/lodash/common/function.d.ts | 1430 + .../@types/lodash/common/lang.d.ts | 1692 + .../@types/lodash/common/math.d.ts | 405 + .../@types/lodash/common/number.d.ts | 131 + .../@types/lodash/common/object.d.ts | 2519 ++ .../@types/lodash/common/seq.d.ts | 210 + .../@types/lodash/common/string.d.ts | 788 + .../@types/lodash/common/util.d.ts | 1219 + tests/node_modules/@types/lodash/compact.d.ts | 2 + tests/node_modules/@types/lodash/concat.d.ts | 2 + tests/node_modules/@types/lodash/cond.d.ts | 2 + .../@types/lodash/conformsTo.d.ts | 2 + .../node_modules/@types/lodash/constant.d.ts | 2 + tests/node_modules/@types/lodash/countBy.d.ts | 2 + tests/node_modules/@types/lodash/create.d.ts | 2 + tests/node_modules/@types/lodash/curry.d.ts | 2 + .../@types/lodash/curryRight.d.ts | 2 + .../node_modules/@types/lodash/debounce.d.ts | 2 + tests/node_modules/@types/lodash/deburr.d.ts | 2 + .../node_modules/@types/lodash/defaultTo.d.ts | 2 + .../node_modules/@types/lodash/defaults.d.ts | 2 + .../@types/lodash/defaultsDeep.d.ts | 2 + tests/node_modules/@types/lodash/defer.d.ts | 2 + tests/node_modules/@types/lodash/delay.d.ts | 2 + .../@types/lodash/difference.d.ts | 2 + .../@types/lodash/differenceBy.d.ts | 2 + .../@types/lodash/differenceWith.d.ts | 2 + tests/node_modules/@types/lodash/divide.d.ts | 2 + tests/node_modules/@types/lodash/drop.d.ts | 2 + .../node_modules/@types/lodash/dropRight.d.ts | 2 + .../@types/lodash/dropRightWhile.d.ts | 2 + .../node_modules/@types/lodash/dropWhile.d.ts | 2 + tests/node_modules/@types/lodash/each.d.ts | 2 + .../node_modules/@types/lodash/eachRight.d.ts | 2 + .../node_modules/@types/lodash/endsWith.d.ts | 2 + tests/node_modules/@types/lodash/entries.d.ts | 2 + .../node_modules/@types/lodash/entriesIn.d.ts | 2 + tests/node_modules/@types/lodash/eq.d.ts | 2 + tests/node_modules/@types/lodash/escape.d.ts | 2 + .../@types/lodash/escapeRegExp.d.ts | 2 + tests/node_modules/@types/lodash/every.d.ts | 2 + tests/node_modules/@types/lodash/extend.d.ts | 2 + .../@types/lodash/extendWith.d.ts | 2 + tests/node_modules/@types/lodash/fill.d.ts | 2 + tests/node_modules/@types/lodash/filter.d.ts | 2 + tests/node_modules/@types/lodash/find.d.ts | 2 + .../node_modules/@types/lodash/findIndex.d.ts | 2 + tests/node_modules/@types/lodash/findKey.d.ts | 2 + .../node_modules/@types/lodash/findLast.d.ts | 2 + .../@types/lodash/findLastIndex.d.ts | 2 + .../@types/lodash/findLastKey.d.ts | 2 + tests/node_modules/@types/lodash/first.d.ts | 2 + tests/node_modules/@types/lodash/flatMap.d.ts | 2 + .../@types/lodash/flatMapDeep.d.ts | 2 + .../@types/lodash/flatMapDepth.d.ts | 2 + tests/node_modules/@types/lodash/flatten.d.ts | 2 + .../@types/lodash/flattenDeep.d.ts | 2 + .../@types/lodash/flattenDepth.d.ts | 2 + tests/node_modules/@types/lodash/flip.d.ts | 2 + tests/node_modules/@types/lodash/floor.d.ts | 2 + tests/node_modules/@types/lodash/flow.d.ts | 2 + .../node_modules/@types/lodash/flowRight.d.ts | 2 + tests/node_modules/@types/lodash/forEach.d.ts | 2 + .../@types/lodash/forEachRight.d.ts | 2 + tests/node_modules/@types/lodash/forIn.d.ts | 2 + .../@types/lodash/forInRight.d.ts | 2 + tests/node_modules/@types/lodash/forOwn.d.ts | 2 + .../@types/lodash/forOwnRight.d.ts | 2 + tests/node_modules/@types/lodash/fp.d.ts | 4938 +++ tests/node_modules/@types/lodash/fp/F.d.ts | 2 + tests/node_modules/@types/lodash/fp/T.d.ts | 2 + tests/node_modules/@types/lodash/fp/__.d.ts | 3 + tests/node_modules/@types/lodash/fp/add.d.ts | 2 + .../node_modules/@types/lodash/fp/after.d.ts | 2 + tests/node_modules/@types/lodash/fp/all.d.ts | 2 + .../@types/lodash/fp/allPass.d.ts | 2 + .../node_modules/@types/lodash/fp/always.d.ts | 2 + tests/node_modules/@types/lodash/fp/any.d.ts | 2 + .../@types/lodash/fp/anyPass.d.ts | 2 + .../node_modules/@types/lodash/fp/apply.d.ts | 2 + tests/node_modules/@types/lodash/fp/ary.d.ts | 2 + .../node_modules/@types/lodash/fp/assign.d.ts | 2 + .../@types/lodash/fp/assignAll.d.ts | 2 + .../@types/lodash/fp/assignAllWith.d.ts | 2 + .../@types/lodash/fp/assignIn.d.ts | 2 + .../@types/lodash/fp/assignInAll.d.ts | 2 + .../@types/lodash/fp/assignInAllWith.d.ts | 2 + .../@types/lodash/fp/assignInWith.d.ts | 2 + .../@types/lodash/fp/assignWith.d.ts | 2 + .../node_modules/@types/lodash/fp/assoc.d.ts | 2 + .../@types/lodash/fp/assocPath.d.ts | 2 + tests/node_modules/@types/lodash/fp/at.d.ts | 2 + .../@types/lodash/fp/attempt.d.ts | 2 + .../node_modules/@types/lodash/fp/before.d.ts | 2 + tests/node_modules/@types/lodash/fp/bind.d.ts | 2 + .../@types/lodash/fp/bindAll.d.ts | 2 + .../@types/lodash/fp/bindKey.d.ts | 2 + .../@types/lodash/fp/camelCase.d.ts | 2 + .../@types/lodash/fp/capitalize.d.ts | 2 + .../@types/lodash/fp/castArray.d.ts | 2 + tests/node_modules/@types/lodash/fp/ceil.d.ts | 2 + .../node_modules/@types/lodash/fp/chunk.d.ts | 2 + .../node_modules/@types/lodash/fp/clamp.d.ts | 2 + .../node_modules/@types/lodash/fp/clone.d.ts | 2 + .../@types/lodash/fp/cloneDeep.d.ts | 2 + .../@types/lodash/fp/cloneDeepWith.d.ts | 2 + .../@types/lodash/fp/cloneWith.d.ts | 2 + .../@types/lodash/fp/compact.d.ts | 2 + .../@types/lodash/fp/complement.d.ts | 2 + .../@types/lodash/fp/compose.d.ts | 2 + .../node_modules/@types/lodash/fp/concat.d.ts | 2 + tests/node_modules/@types/lodash/fp/cond.d.ts | 2 + .../@types/lodash/fp/conforms.d.ts | 2 + .../@types/lodash/fp/conformsTo.d.ts | 2 + .../@types/lodash/fp/constant.d.ts | 2 + .../@types/lodash/fp/contains.d.ts | 2 + .../@types/lodash/fp/convert.d.ts | 15 + .../@types/lodash/fp/countBy.d.ts | 2 + .../node_modules/@types/lodash/fp/create.d.ts | 2 + .../node_modules/@types/lodash/fp/curry.d.ts | 2 + .../node_modules/@types/lodash/fp/curryN.d.ts | 2 + .../@types/lodash/fp/curryRight.d.ts | 2 + .../@types/lodash/fp/curryRightN.d.ts | 2 + .../@types/lodash/fp/debounce.d.ts | 2 + .../node_modules/@types/lodash/fp/deburr.d.ts | 2 + .../@types/lodash/fp/defaultTo.d.ts | 2 + .../@types/lodash/fp/defaults.d.ts | 2 + .../@types/lodash/fp/defaultsAll.d.ts | 2 + .../@types/lodash/fp/defaultsDeep.d.ts | 2 + .../@types/lodash/fp/defaultsDeepAll.d.ts | 2 + .../node_modules/@types/lodash/fp/defer.d.ts | 2 + .../node_modules/@types/lodash/fp/delay.d.ts | 2 + .../@types/lodash/fp/difference.d.ts | 2 + .../@types/lodash/fp/differenceBy.d.ts | 2 + .../@types/lodash/fp/differenceWith.d.ts | 2 + .../node_modules/@types/lodash/fp/dissoc.d.ts | 2 + .../@types/lodash/fp/dissocPath.d.ts | 2 + .../node_modules/@types/lodash/fp/divide.d.ts | 2 + tests/node_modules/@types/lodash/fp/drop.d.ts | 2 + .../@types/lodash/fp/dropLast.d.ts | 2 + .../@types/lodash/fp/dropLastWhile.d.ts | 2 + .../@types/lodash/fp/dropRight.d.ts | 2 + .../@types/lodash/fp/dropRightWhile.d.ts | 2 + .../@types/lodash/fp/dropWhile.d.ts | 2 + tests/node_modules/@types/lodash/fp/each.d.ts | 2 + .../@types/lodash/fp/eachRight.d.ts | 2 + .../@types/lodash/fp/endsWith.d.ts | 2 + .../@types/lodash/fp/entries.d.ts | 2 + .../@types/lodash/fp/entriesIn.d.ts | 2 + tests/node_modules/@types/lodash/fp/eq.d.ts | 2 + .../node_modules/@types/lodash/fp/equals.d.ts | 2 + .../node_modules/@types/lodash/fp/escape.d.ts | 2 + .../@types/lodash/fp/escapeRegExp.d.ts | 2 + .../node_modules/@types/lodash/fp/every.d.ts | 2 + .../node_modules/@types/lodash/fp/extend.d.ts | 2 + .../@types/lodash/fp/extendAll.d.ts | 2 + .../@types/lodash/fp/extendAllWith.d.ts | 2 + .../@types/lodash/fp/extendWith.d.ts | 2 + tests/node_modules/@types/lodash/fp/fill.d.ts | 2 + .../node_modules/@types/lodash/fp/filter.d.ts | 2 + tests/node_modules/@types/lodash/fp/find.d.ts | 2 + .../@types/lodash/fp/findFrom.d.ts | 2 + .../@types/lodash/fp/findIndex.d.ts | 2 + .../@types/lodash/fp/findIndexFrom.d.ts | 2 + .../@types/lodash/fp/findKey.d.ts | 2 + .../@types/lodash/fp/findLast.d.ts | 2 + .../@types/lodash/fp/findLastFrom.d.ts | 2 + .../@types/lodash/fp/findLastIndex.d.ts | 2 + .../@types/lodash/fp/findLastIndexFrom.d.ts | 2 + .../@types/lodash/fp/findLastKey.d.ts | 2 + .../node_modules/@types/lodash/fp/first.d.ts | 2 + .../@types/lodash/fp/flatMap.d.ts | 2 + .../@types/lodash/fp/flatMapDeep.d.ts | 2 + .../@types/lodash/fp/flatMapDepth.d.ts | 2 + .../@types/lodash/fp/flatten.d.ts | 2 + .../@types/lodash/fp/flattenDeep.d.ts | 2 + .../@types/lodash/fp/flattenDepth.d.ts | 2 + tests/node_modules/@types/lodash/fp/flip.d.ts | 2 + .../node_modules/@types/lodash/fp/floor.d.ts | 2 + tests/node_modules/@types/lodash/fp/flow.d.ts | 2 + .../@types/lodash/fp/flowRight.d.ts | 2 + .../@types/lodash/fp/forEach.d.ts | 2 + .../@types/lodash/fp/forEachRight.d.ts | 2 + .../node_modules/@types/lodash/fp/forIn.d.ts | 2 + .../@types/lodash/fp/forInRight.d.ts | 2 + .../node_modules/@types/lodash/fp/forOwn.d.ts | 2 + .../@types/lodash/fp/forOwnRight.d.ts | 2 + .../@types/lodash/fp/fromPairs.d.ts | 2 + .../@types/lodash/fp/functions.d.ts | 2 + .../@types/lodash/fp/functionsIn.d.ts | 2 + tests/node_modules/@types/lodash/fp/get.d.ts | 2 + .../node_modules/@types/lodash/fp/getOr.d.ts | 2 + .../@types/lodash/fp/groupBy.d.ts | 2 + tests/node_modules/@types/lodash/fp/gt.d.ts | 2 + tests/node_modules/@types/lodash/fp/gte.d.ts | 2 + tests/node_modules/@types/lodash/fp/has.d.ts | 2 + .../node_modules/@types/lodash/fp/hasIn.d.ts | 2 + tests/node_modules/@types/lodash/fp/head.d.ts | 2 + .../@types/lodash/fp/identical.d.ts | 2 + .../@types/lodash/fp/identity.d.ts | 2 + .../@types/lodash/fp/inRange.d.ts | 2 + .../@types/lodash/fp/includes.d.ts | 2 + .../@types/lodash/fp/includesFrom.d.ts | 2 + .../@types/lodash/fp/indexBy.d.ts | 2 + .../@types/lodash/fp/indexOf.d.ts | 2 + .../@types/lodash/fp/indexOfFrom.d.ts | 2 + tests/node_modules/@types/lodash/fp/init.d.ts | 2 + .../@types/lodash/fp/initial.d.ts | 2 + .../@types/lodash/fp/intersection.d.ts | 2 + .../@types/lodash/fp/intersectionBy.d.ts | 2 + .../@types/lodash/fp/intersectionWith.d.ts | 2 + .../node_modules/@types/lodash/fp/invert.d.ts | 2 + .../@types/lodash/fp/invertBy.d.ts | 2 + .../@types/lodash/fp/invertObj.d.ts | 2 + .../node_modules/@types/lodash/fp/invoke.d.ts | 2 + .../@types/lodash/fp/invokeArgs.d.ts | 2 + .../@types/lodash/fp/invokeArgsMap.d.ts | 2 + .../@types/lodash/fp/invokeMap.d.ts | 2 + .../@types/lodash/fp/isArguments.d.ts | 2 + .../@types/lodash/fp/isArray.d.ts | 2 + .../@types/lodash/fp/isArrayBuffer.d.ts | 2 + .../@types/lodash/fp/isArrayLike.d.ts | 2 + .../@types/lodash/fp/isArrayLikeObject.d.ts | 2 + .../@types/lodash/fp/isBoolean.d.ts | 2 + .../@types/lodash/fp/isBuffer.d.ts | 2 + .../node_modules/@types/lodash/fp/isDate.d.ts | 2 + .../@types/lodash/fp/isElement.d.ts | 2 + .../@types/lodash/fp/isEmpty.d.ts | 2 + .../@types/lodash/fp/isEqual.d.ts | 2 + .../@types/lodash/fp/isEqualWith.d.ts | 2 + .../@types/lodash/fp/isError.d.ts | 2 + .../@types/lodash/fp/isFinite.d.ts | 2 + .../@types/lodash/fp/isFunction.d.ts | 2 + .../@types/lodash/fp/isInteger.d.ts | 2 + .../@types/lodash/fp/isLength.d.ts | 2 + .../node_modules/@types/lodash/fp/isMap.d.ts | 2 + .../@types/lodash/fp/isMatch.d.ts | 2 + .../@types/lodash/fp/isMatchWith.d.ts | 2 + .../node_modules/@types/lodash/fp/isNaN.d.ts | 2 + .../@types/lodash/fp/isNative.d.ts | 2 + .../node_modules/@types/lodash/fp/isNil.d.ts | 2 + .../node_modules/@types/lodash/fp/isNull.d.ts | 2 + .../@types/lodash/fp/isNumber.d.ts | 2 + .../@types/lodash/fp/isObject.d.ts | 2 + .../@types/lodash/fp/isObjectLike.d.ts | 2 + .../@types/lodash/fp/isPlainObject.d.ts | 2 + .../@types/lodash/fp/isRegExp.d.ts | 2 + .../@types/lodash/fp/isSafeInteger.d.ts | 2 + .../node_modules/@types/lodash/fp/isSet.d.ts | 2 + .../@types/lodash/fp/isString.d.ts | 2 + .../@types/lodash/fp/isSymbol.d.ts | 2 + .../@types/lodash/fp/isTypedArray.d.ts | 2 + .../@types/lodash/fp/isUndefined.d.ts | 2 + .../@types/lodash/fp/isWeakMap.d.ts | 2 + .../@types/lodash/fp/isWeakSet.d.ts | 2 + .../@types/lodash/fp/iteratee.d.ts | 2 + tests/node_modules/@types/lodash/fp/join.d.ts | 2 + tests/node_modules/@types/lodash/fp/juxt.d.ts | 2 + .../@types/lodash/fp/kebabCase.d.ts | 2 + .../node_modules/@types/lodash/fp/keyBy.d.ts | 2 + tests/node_modules/@types/lodash/fp/keys.d.ts | 2 + .../node_modules/@types/lodash/fp/keysIn.d.ts | 2 + tests/node_modules/@types/lodash/fp/last.d.ts | 2 + .../@types/lodash/fp/lastIndexOf.d.ts | 2 + .../@types/lodash/fp/lastIndexOfFrom.d.ts | 2 + .../@types/lodash/fp/lowerCase.d.ts | 2 + .../@types/lodash/fp/lowerFirst.d.ts | 2 + tests/node_modules/@types/lodash/fp/lt.d.ts | 2 + tests/node_modules/@types/lodash/fp/lte.d.ts | 2 + tests/node_modules/@types/lodash/fp/map.d.ts | 2 + .../@types/lodash/fp/mapKeys.d.ts | 2 + .../@types/lodash/fp/mapValues.d.ts | 2 + .../@types/lodash/fp/matches.d.ts | 2 + .../@types/lodash/fp/matchesProperty.d.ts | 2 + tests/node_modules/@types/lodash/fp/max.d.ts | 2 + .../node_modules/@types/lodash/fp/maxBy.d.ts | 2 + tests/node_modules/@types/lodash/fp/mean.d.ts | 2 + .../node_modules/@types/lodash/fp/meanBy.d.ts | 2 + .../@types/lodash/fp/memoize.d.ts | 2 + .../node_modules/@types/lodash/fp/merge.d.ts | 2 + .../@types/lodash/fp/mergeAll.d.ts | 2 + .../@types/lodash/fp/mergeAllWith.d.ts | 2 + .../@types/lodash/fp/mergeWith.d.ts | 2 + .../node_modules/@types/lodash/fp/method.d.ts | 2 + .../@types/lodash/fp/methodOf.d.ts | 2 + tests/node_modules/@types/lodash/fp/min.d.ts | 2 + .../node_modules/@types/lodash/fp/minBy.d.ts | 2 + .../@types/lodash/fp/multiply.d.ts | 2 + tests/node_modules/@types/lodash/fp/nAry.d.ts | 2 + .../node_modules/@types/lodash/fp/negate.d.ts | 2 + .../@types/lodash/fp/noConflict.d.ts | 2 + tests/node_modules/@types/lodash/fp/noop.d.ts | 2 + tests/node_modules/@types/lodash/fp/now.d.ts | 2 + tests/node_modules/@types/lodash/fp/nth.d.ts | 2 + .../node_modules/@types/lodash/fp/nthArg.d.ts | 2 + tests/node_modules/@types/lodash/fp/omit.d.ts | 2 + .../@types/lodash/fp/omitAll.d.ts | 2 + .../node_modules/@types/lodash/fp/omitBy.d.ts | 2 + tests/node_modules/@types/lodash/fp/once.d.ts | 2 + .../@types/lodash/fp/orderBy.d.ts | 2 + tests/node_modules/@types/lodash/fp/over.d.ts | 2 + .../@types/lodash/fp/overArgs.d.ts | 2 + .../@types/lodash/fp/overEvery.d.ts | 2 + .../@types/lodash/fp/overSome.d.ts | 2 + tests/node_modules/@types/lodash/fp/pad.d.ts | 2 + .../@types/lodash/fp/padChars.d.ts | 2 + .../@types/lodash/fp/padCharsEnd.d.ts | 2 + .../@types/lodash/fp/padCharsStart.d.ts | 2 + .../node_modules/@types/lodash/fp/padEnd.d.ts | 2 + .../@types/lodash/fp/padStart.d.ts | 2 + .../@types/lodash/fp/parseInt.d.ts | 2 + .../@types/lodash/fp/partial.d.ts | 2 + .../@types/lodash/fp/partialRight.d.ts | 2 + .../@types/lodash/fp/partition.d.ts | 2 + tests/node_modules/@types/lodash/fp/path.d.ts | 2 + .../node_modules/@types/lodash/fp/pathEq.d.ts | 2 + .../node_modules/@types/lodash/fp/pathOr.d.ts | 2 + .../node_modules/@types/lodash/fp/paths.d.ts | 2 + tests/node_modules/@types/lodash/fp/pick.d.ts | 2 + .../@types/lodash/fp/pickAll.d.ts | 2 + .../node_modules/@types/lodash/fp/pickBy.d.ts | 2 + tests/node_modules/@types/lodash/fp/pipe.d.ts | 2 + .../@types/lodash/fp/placeholder.d.ts | 3 + .../node_modules/@types/lodash/fp/pluck.d.ts | 2 + tests/node_modules/@types/lodash/fp/prop.d.ts | 2 + .../node_modules/@types/lodash/fp/propEq.d.ts | 2 + .../node_modules/@types/lodash/fp/propOr.d.ts | 2 + .../@types/lodash/fp/property.d.ts | 2 + .../@types/lodash/fp/propertyOf.d.ts | 2 + .../node_modules/@types/lodash/fp/props.d.ts | 2 + tests/node_modules/@types/lodash/fp/pull.d.ts | 2 + .../@types/lodash/fp/pullAll.d.ts | 2 + .../@types/lodash/fp/pullAllBy.d.ts | 2 + .../@types/lodash/fp/pullAllWith.d.ts | 2 + .../node_modules/@types/lodash/fp/pullAt.d.ts | 2 + .../node_modules/@types/lodash/fp/random.d.ts | 2 + .../node_modules/@types/lodash/fp/range.d.ts | 2 + .../@types/lodash/fp/rangeRight.d.ts | 2 + .../@types/lodash/fp/rangeStep.d.ts | 2 + .../@types/lodash/fp/rangeStepRight.d.ts | 2 + .../node_modules/@types/lodash/fp/rearg.d.ts | 2 + .../node_modules/@types/lodash/fp/reduce.d.ts | 2 + .../@types/lodash/fp/reduceRight.d.ts | 2 + .../node_modules/@types/lodash/fp/reject.d.ts | 2 + .../node_modules/@types/lodash/fp/remove.d.ts | 2 + .../node_modules/@types/lodash/fp/repeat.d.ts | 2 + .../@types/lodash/fp/replace.d.ts | 2 + tests/node_modules/@types/lodash/fp/rest.d.ts | 2 + .../@types/lodash/fp/restFrom.d.ts | 2 + .../node_modules/@types/lodash/fp/result.d.ts | 2 + .../@types/lodash/fp/reverse.d.ts | 2 + .../node_modules/@types/lodash/fp/round.d.ts | 2 + .../@types/lodash/fp/runInContext.d.ts | 2 + .../node_modules/@types/lodash/fp/sample.d.ts | 2 + .../@types/lodash/fp/sampleSize.d.ts | 2 + tests/node_modules/@types/lodash/fp/set.d.ts | 2 + .../@types/lodash/fp/setWith.d.ts | 2 + .../@types/lodash/fp/shuffle.d.ts | 2 + tests/node_modules/@types/lodash/fp/size.d.ts | 2 + .../node_modules/@types/lodash/fp/slice.d.ts | 2 + .../@types/lodash/fp/snakeCase.d.ts | 2 + tests/node_modules/@types/lodash/fp/some.d.ts | 2 + .../node_modules/@types/lodash/fp/sortBy.d.ts | 2 + .../@types/lodash/fp/sortedIndex.d.ts | 2 + .../@types/lodash/fp/sortedIndexBy.d.ts | 2 + .../@types/lodash/fp/sortedIndexOf.d.ts | 2 + .../@types/lodash/fp/sortedLastIndex.d.ts | 2 + .../@types/lodash/fp/sortedLastIndexBy.d.ts | 2 + .../@types/lodash/fp/sortedLastIndexOf.d.ts | 2 + .../@types/lodash/fp/sortedUniq.d.ts | 2 + .../@types/lodash/fp/sortedUniqBy.d.ts | 2 + .../node_modules/@types/lodash/fp/split.d.ts | 2 + .../node_modules/@types/lodash/fp/spread.d.ts | 2 + .../@types/lodash/fp/spreadFrom.d.ts | 2 + .../@types/lodash/fp/startCase.d.ts | 2 + .../@types/lodash/fp/startsWith.d.ts | 2 + .../@types/lodash/fp/stubArray.d.ts | 2 + .../@types/lodash/fp/stubFalse.d.ts | 2 + .../@types/lodash/fp/stubObject.d.ts | 2 + .../@types/lodash/fp/stubString.d.ts | 2 + .../@types/lodash/fp/stubTrue.d.ts | 2 + .../@types/lodash/fp/subtract.d.ts | 2 + tests/node_modules/@types/lodash/fp/sum.d.ts | 2 + .../node_modules/@types/lodash/fp/sumBy.d.ts | 2 + .../@types/lodash/fp/symmetricDifference.d.ts | 2 + .../lodash/fp/symmetricDifferenceBy.d.ts | 2 + .../lodash/fp/symmetricDifferenceWith.d.ts | 2 + tests/node_modules/@types/lodash/fp/tail.d.ts | 2 + tests/node_modules/@types/lodash/fp/take.d.ts | 2 + .../@types/lodash/fp/takeLast.d.ts | 2 + .../@types/lodash/fp/takeLastWhile.d.ts | 2 + .../@types/lodash/fp/takeRight.d.ts | 2 + .../@types/lodash/fp/takeRightWhile.d.ts | 2 + .../@types/lodash/fp/takeWhile.d.ts | 2 + tests/node_modules/@types/lodash/fp/tap.d.ts | 2 + .../@types/lodash/fp/template.d.ts | 2 + .../@types/lodash/fp/throttle.d.ts | 2 + tests/node_modules/@types/lodash/fp/thru.d.ts | 2 + .../node_modules/@types/lodash/fp/times.d.ts | 2 + .../@types/lodash/fp/toArray.d.ts | 2 + .../@types/lodash/fp/toFinite.d.ts | 2 + .../@types/lodash/fp/toInteger.d.ts | 2 + .../@types/lodash/fp/toLength.d.ts | 2 + .../@types/lodash/fp/toLower.d.ts | 2 + .../@types/lodash/fp/toNumber.d.ts | 2 + .../@types/lodash/fp/toPairs.d.ts | 2 + .../@types/lodash/fp/toPairsIn.d.ts | 2 + .../node_modules/@types/lodash/fp/toPath.d.ts | 2 + .../@types/lodash/fp/toPlainObject.d.ts | 2 + .../@types/lodash/fp/toSafeInteger.d.ts | 2 + .../@types/lodash/fp/toString.d.ts | 2 + .../@types/lodash/fp/toUpper.d.ts | 2 + .../@types/lodash/fp/transform.d.ts | 2 + tests/node_modules/@types/lodash/fp/trim.d.ts | 2 + .../@types/lodash/fp/trimChars.d.ts | 2 + .../@types/lodash/fp/trimCharsEnd.d.ts | 2 + .../@types/lodash/fp/trimCharsStart.d.ts | 2 + .../@types/lodash/fp/trimEnd.d.ts | 2 + .../@types/lodash/fp/trimStart.d.ts | 2 + .../@types/lodash/fp/truncate.d.ts | 2 + .../@types/lodash/fp/unapply.d.ts | 2 + .../node_modules/@types/lodash/fp/unary.d.ts | 2 + .../@types/lodash/fp/unescape.d.ts | 2 + .../node_modules/@types/lodash/fp/union.d.ts | 2 + .../@types/lodash/fp/unionBy.d.ts | 2 + .../@types/lodash/fp/unionWith.d.ts | 2 + tests/node_modules/@types/lodash/fp/uniq.d.ts | 2 + .../node_modules/@types/lodash/fp/uniqBy.d.ts | 2 + .../@types/lodash/fp/uniqWith.d.ts | 2 + .../@types/lodash/fp/uniqueId.d.ts | 2 + .../node_modules/@types/lodash/fp/unnest.d.ts | 2 + .../node_modules/@types/lodash/fp/unset.d.ts | 2 + .../node_modules/@types/lodash/fp/unzip.d.ts | 2 + .../@types/lodash/fp/unzipWith.d.ts | 2 + .../node_modules/@types/lodash/fp/update.d.ts | 2 + .../@types/lodash/fp/updateWith.d.ts | 2 + .../@types/lodash/fp/upperCase.d.ts | 2 + .../@types/lodash/fp/upperFirst.d.ts | 2 + .../@types/lodash/fp/useWith.d.ts | 2 + .../node_modules/@types/lodash/fp/values.d.ts | 2 + .../@types/lodash/fp/valuesIn.d.ts | 2 + .../node_modules/@types/lodash/fp/where.d.ts | 2 + .../@types/lodash/fp/whereEq.d.ts | 2 + .../@types/lodash/fp/without.d.ts | 2 + .../node_modules/@types/lodash/fp/words.d.ts | 2 + tests/node_modules/@types/lodash/fp/wrap.d.ts | 2 + tests/node_modules/@types/lodash/fp/xor.d.ts | 2 + .../node_modules/@types/lodash/fp/xorBy.d.ts | 2 + .../@types/lodash/fp/xorWith.d.ts | 2 + tests/node_modules/@types/lodash/fp/zip.d.ts | 2 + .../node_modules/@types/lodash/fp/zipAll.d.ts | 2 + .../node_modules/@types/lodash/fp/zipObj.d.ts | 2 + .../@types/lodash/fp/zipObject.d.ts | 2 + .../@types/lodash/fp/zipObjectDeep.d.ts | 2 + .../@types/lodash/fp/zipWith.d.ts | 2 + .../node_modules/@types/lodash/fromPairs.d.ts | 2 + .../node_modules/@types/lodash/functions.d.ts | 2 + .../@types/lodash/functionsIn.d.ts | 2 + tests/node_modules/@types/lodash/get.d.ts | 2 + tests/node_modules/@types/lodash/groupBy.d.ts | 2 + tests/node_modules/@types/lodash/gt.d.ts | 2 + tests/node_modules/@types/lodash/gte.d.ts | 2 + tests/node_modules/@types/lodash/has.d.ts | 2 + tests/node_modules/@types/lodash/hasIn.d.ts | 2 + tests/node_modules/@types/lodash/head.d.ts | 2 + .../node_modules/@types/lodash/identity.d.ts | 2 + tests/node_modules/@types/lodash/inRange.d.ts | 2 + .../node_modules/@types/lodash/includes.d.ts | 2 + tests/node_modules/@types/lodash/index.d.ts | 46 + tests/node_modules/@types/lodash/indexOf.d.ts | 2 + tests/node_modules/@types/lodash/initial.d.ts | 2 + .../@types/lodash/intersection.d.ts | 2 + .../@types/lodash/intersectionBy.d.ts | 2 + .../@types/lodash/intersectionWith.d.ts | 2 + tests/node_modules/@types/lodash/invert.d.ts | 2 + .../node_modules/@types/lodash/invertBy.d.ts | 2 + tests/node_modules/@types/lodash/invoke.d.ts | 2 + .../node_modules/@types/lodash/invokeMap.d.ts | 2 + .../@types/lodash/isArguments.d.ts | 2 + tests/node_modules/@types/lodash/isArray.d.ts | 2 + .../@types/lodash/isArrayBuffer.d.ts | 2 + .../@types/lodash/isArrayLike.d.ts | 2 + .../@types/lodash/isArrayLikeObject.d.ts | 2 + .../node_modules/@types/lodash/isBoolean.d.ts | 2 + .../node_modules/@types/lodash/isBuffer.d.ts | 2 + tests/node_modules/@types/lodash/isDate.d.ts | 2 + .../node_modules/@types/lodash/isElement.d.ts | 2 + tests/node_modules/@types/lodash/isEmpty.d.ts | 2 + tests/node_modules/@types/lodash/isEqual.d.ts | 2 + .../@types/lodash/isEqualWith.d.ts | 2 + tests/node_modules/@types/lodash/isError.d.ts | 2 + .../node_modules/@types/lodash/isFinite.d.ts | 2 + .../@types/lodash/isFunction.d.ts | 2 + .../node_modules/@types/lodash/isInteger.d.ts | 2 + .../node_modules/@types/lodash/isLength.d.ts | 2 + tests/node_modules/@types/lodash/isMap.d.ts | 2 + tests/node_modules/@types/lodash/isMatch.d.ts | 2 + .../@types/lodash/isMatchWith.d.ts | 2 + tests/node_modules/@types/lodash/isNaN.d.ts | 2 + .../node_modules/@types/lodash/isNative.d.ts | 2 + tests/node_modules/@types/lodash/isNil.d.ts | 2 + tests/node_modules/@types/lodash/isNull.d.ts | 2 + .../node_modules/@types/lodash/isNumber.d.ts | 2 + .../node_modules/@types/lodash/isObject.d.ts | 2 + .../@types/lodash/isObjectLike.d.ts | 2 + .../@types/lodash/isPlainObject.d.ts | 2 + .../node_modules/@types/lodash/isRegExp.d.ts | 2 + .../@types/lodash/isSafeInteger.d.ts | 2 + tests/node_modules/@types/lodash/isSet.d.ts | 2 + .../node_modules/@types/lodash/isString.d.ts | 2 + .../node_modules/@types/lodash/isSymbol.d.ts | 2 + .../@types/lodash/isTypedArray.d.ts | 2 + .../@types/lodash/isUndefined.d.ts | 2 + .../node_modules/@types/lodash/isWeakMap.d.ts | 2 + .../node_modules/@types/lodash/isWeakSet.d.ts | 2 + .../node_modules/@types/lodash/iteratee.d.ts | 2 + tests/node_modules/@types/lodash/join.d.ts | 2 + .../node_modules/@types/lodash/kebabCase.d.ts | 2 + tests/node_modules/@types/lodash/keyBy.d.ts | 2 + tests/node_modules/@types/lodash/keys.d.ts | 2 + tests/node_modules/@types/lodash/keysIn.d.ts | 2 + tests/node_modules/@types/lodash/last.d.ts | 2 + .../@types/lodash/lastIndexOf.d.ts | 2 + .../node_modules/@types/lodash/lowerCase.d.ts | 2 + .../@types/lodash/lowerFirst.d.ts | 2 + tests/node_modules/@types/lodash/lt.d.ts | 2 + tests/node_modules/@types/lodash/lte.d.ts | 2 + tests/node_modules/@types/lodash/map.d.ts | 2 + tests/node_modules/@types/lodash/mapKeys.d.ts | 2 + .../node_modules/@types/lodash/mapValues.d.ts | 2 + tests/node_modules/@types/lodash/matches.d.ts | 2 + .../@types/lodash/matchesProperty.d.ts | 2 + tests/node_modules/@types/lodash/max.d.ts | 2 + tests/node_modules/@types/lodash/maxBy.d.ts | 2 + tests/node_modules/@types/lodash/mean.d.ts | 2 + tests/node_modules/@types/lodash/meanBy.d.ts | 2 + tests/node_modules/@types/lodash/memoize.d.ts | 2 + tests/node_modules/@types/lodash/merge.d.ts | 2 + .../node_modules/@types/lodash/mergeWith.d.ts | 2 + tests/node_modules/@types/lodash/method.d.ts | 2 + .../node_modules/@types/lodash/methodOf.d.ts | 2 + tests/node_modules/@types/lodash/min.d.ts | 2 + tests/node_modules/@types/lodash/minBy.d.ts | 2 + tests/node_modules/@types/lodash/mixin.d.ts | 2 + .../node_modules/@types/lodash/multiply.d.ts | 2 + tests/node_modules/@types/lodash/negate.d.ts | 2 + .../@types/lodash/noConflict.d.ts | 2 + tests/node_modules/@types/lodash/noop.d.ts | 2 + tests/node_modules/@types/lodash/now.d.ts | 2 + tests/node_modules/@types/lodash/nth.d.ts | 2 + tests/node_modules/@types/lodash/nthArg.d.ts | 2 + tests/node_modules/@types/lodash/omit.d.ts | 2 + tests/node_modules/@types/lodash/omitBy.d.ts | 2 + tests/node_modules/@types/lodash/once.d.ts | 2 + tests/node_modules/@types/lodash/orderBy.d.ts | 2 + tests/node_modules/@types/lodash/over.d.ts | 2 + .../node_modules/@types/lodash/overArgs.d.ts | 2 + .../node_modules/@types/lodash/overEvery.d.ts | 2 + .../node_modules/@types/lodash/overSome.d.ts | 2 + tests/node_modules/@types/lodash/package.json | 65 + tests/node_modules/@types/lodash/pad.d.ts | 2 + tests/node_modules/@types/lodash/padEnd.d.ts | 2 + .../node_modules/@types/lodash/padStart.d.ts | 2 + .../node_modules/@types/lodash/parseInt.d.ts | 2 + tests/node_modules/@types/lodash/partial.d.ts | 2 + .../@types/lodash/partialRight.d.ts | 2 + .../node_modules/@types/lodash/partition.d.ts | 2 + tests/node_modules/@types/lodash/pick.d.ts | 2 + tests/node_modules/@types/lodash/pickBy.d.ts | 2 + .../node_modules/@types/lodash/property.d.ts | 2 + .../@types/lodash/propertyOf.d.ts | 2 + tests/node_modules/@types/lodash/pull.d.ts | 2 + tests/node_modules/@types/lodash/pullAll.d.ts | 2 + .../node_modules/@types/lodash/pullAllBy.d.ts | 2 + .../@types/lodash/pullAllWith.d.ts | 2 + tests/node_modules/@types/lodash/pullAt.d.ts | 2 + tests/node_modules/@types/lodash/random.d.ts | 2 + tests/node_modules/@types/lodash/range.d.ts | 2 + .../@types/lodash/rangeRight.d.ts | 2 + tests/node_modules/@types/lodash/rearg.d.ts | 2 + tests/node_modules/@types/lodash/reduce.d.ts | 2 + .../@types/lodash/reduceRight.d.ts | 2 + tests/node_modules/@types/lodash/reject.d.ts | 2 + tests/node_modules/@types/lodash/remove.d.ts | 2 + tests/node_modules/@types/lodash/repeat.d.ts | 2 + tests/node_modules/@types/lodash/replace.d.ts | 2 + tests/node_modules/@types/lodash/rest.d.ts | 2 + tests/node_modules/@types/lodash/result.d.ts | 2 + tests/node_modules/@types/lodash/reverse.d.ts | 2 + tests/node_modules/@types/lodash/round.d.ts | 2 + .../@types/lodash/runInContext.d.ts | 2 + tests/node_modules/@types/lodash/sample.d.ts | 2 + .../@types/lodash/sampleSize.d.ts | 2 + tests/node_modules/@types/lodash/set.d.ts | 2 + tests/node_modules/@types/lodash/setWith.d.ts | 2 + tests/node_modules/@types/lodash/shuffle.d.ts | 2 + tests/node_modules/@types/lodash/size.d.ts | 2 + tests/node_modules/@types/lodash/slice.d.ts | 2 + .../node_modules/@types/lodash/snakeCase.d.ts | 2 + tests/node_modules/@types/lodash/some.d.ts | 2 + tests/node_modules/@types/lodash/sortBy.d.ts | 2 + .../@types/lodash/sortedIndex.d.ts | 2 + .../@types/lodash/sortedIndexBy.d.ts | 2 + .../@types/lodash/sortedIndexOf.d.ts | 2 + .../@types/lodash/sortedLastIndex.d.ts | 2 + .../@types/lodash/sortedLastIndexBy.d.ts | 2 + .../@types/lodash/sortedLastIndexOf.d.ts | 2 + .../@types/lodash/sortedUniq.d.ts | 2 + .../@types/lodash/sortedUniqBy.d.ts | 2 + tests/node_modules/@types/lodash/split.d.ts | 2 + tests/node_modules/@types/lodash/spread.d.ts | 2 + .../node_modules/@types/lodash/startCase.d.ts | 2 + .../@types/lodash/startsWith.d.ts | 2 + .../node_modules/@types/lodash/stubFalse.d.ts | 2 + .../node_modules/@types/lodash/stubTrue.d.ts | 2 + .../node_modules/@types/lodash/subtract.d.ts | 2 + tests/node_modules/@types/lodash/sum.d.ts | 2 + tests/node_modules/@types/lodash/sumBy.d.ts | 2 + tests/node_modules/@types/lodash/tail.d.ts | 2 + tests/node_modules/@types/lodash/take.d.ts | 2 + .../node_modules/@types/lodash/takeRight.d.ts | 2 + .../@types/lodash/takeRightWhile.d.ts | 2 + .../node_modules/@types/lodash/takeWhile.d.ts | 2 + tests/node_modules/@types/lodash/tap.d.ts | 2 + .../node_modules/@types/lodash/template.d.ts | 2 + .../node_modules/@types/lodash/throttle.d.ts | 2 + tests/node_modules/@types/lodash/thru.d.ts | 2 + tests/node_modules/@types/lodash/times.d.ts | 2 + tests/node_modules/@types/lodash/toArray.d.ts | 2 + .../node_modules/@types/lodash/toFinite.d.ts | 2 + .../node_modules/@types/lodash/toInteger.d.ts | 2 + .../node_modules/@types/lodash/toLength.d.ts | 2 + tests/node_modules/@types/lodash/toLower.d.ts | 2 + .../node_modules/@types/lodash/toNumber.d.ts | 2 + tests/node_modules/@types/lodash/toPairs.d.ts | 2 + .../node_modules/@types/lodash/toPairsIn.d.ts | 2 + tests/node_modules/@types/lodash/toPath.d.ts | 2 + .../@types/lodash/toPlainObject.d.ts | 2 + .../@types/lodash/toSafeInteger.d.ts | 2 + .../node_modules/@types/lodash/toString.d.ts | 2 + tests/node_modules/@types/lodash/toUpper.d.ts | 2 + .../node_modules/@types/lodash/transform.d.ts | 2 + tests/node_modules/@types/lodash/trim.d.ts | 2 + tests/node_modules/@types/lodash/trimEnd.d.ts | 2 + .../node_modules/@types/lodash/trimStart.d.ts | 2 + .../node_modules/@types/lodash/truncate.d.ts | 2 + tests/node_modules/@types/lodash/unary.d.ts | 2 + .../node_modules/@types/lodash/unescape.d.ts | 2 + tests/node_modules/@types/lodash/union.d.ts | 2 + tests/node_modules/@types/lodash/unionBy.d.ts | 2 + .../node_modules/@types/lodash/unionWith.d.ts | 2 + tests/node_modules/@types/lodash/uniq.d.ts | 2 + tests/node_modules/@types/lodash/uniqBy.d.ts | 2 + .../node_modules/@types/lodash/uniqWith.d.ts | 2 + .../node_modules/@types/lodash/uniqueId.d.ts | 2 + tests/node_modules/@types/lodash/unset.d.ts | 2 + tests/node_modules/@types/lodash/unzip.d.ts | 2 + .../node_modules/@types/lodash/unzipWith.d.ts | 2 + tests/node_modules/@types/lodash/update.d.ts | 2 + .../@types/lodash/updateWith.d.ts | 2 + .../node_modules/@types/lodash/upperCase.d.ts | 2 + .../@types/lodash/upperFirst.d.ts | 2 + tests/node_modules/@types/lodash/values.d.ts | 2 + .../node_modules/@types/lodash/valuesIn.d.ts | 2 + tests/node_modules/@types/lodash/without.d.ts | 2 + tests/node_modules/@types/lodash/words.d.ts | 2 + tests/node_modules/@types/lodash/wrap.d.ts | 2 + tests/node_modules/@types/lodash/xor.d.ts | 2 + tests/node_modules/@types/lodash/xorBy.d.ts | 2 + tests/node_modules/@types/lodash/xorWith.d.ts | 2 + tests/node_modules/@types/lodash/zip.d.ts | 2 + .../node_modules/@types/lodash/zipObject.d.ts | 2 + .../@types/lodash/zipObjectDeep.d.ts | 2 + tests/node_modules/@types/lodash/zipWith.d.ts | 2 + tests/node_modules/@types/node/LICENSE | 21 + tests/node_modules/@types/node/README.md | 16 + tests/node_modules/@types/node/assert.d.ts | 912 + .../@types/node/assert/strict.d.ts | 8 + .../node_modules/@types/node/async_hooks.d.ts | 497 + tests/node_modules/@types/node/buffer.d.ts | 2142 ++ .../@types/node/child_process.d.ts | 1355 + tests/node_modules/@types/node/cluster.d.ts | 414 + tests/node_modules/@types/node/console.d.ts | 407 + tests/node_modules/@types/node/constants.d.ts | 18 + tests/node_modules/@types/node/crypto.d.ts | 3158 ++ tests/node_modules/@types/node/dgram.d.ts | 545 + .../@types/node/diagnostics_channel.d.ts | 128 + tests/node_modules/@types/node/dns.d.ts | 643 + .../@types/node/dns/promises.d.ts | 357 + tests/node_modules/@types/node/domain.d.ts | 169 + tests/node_modules/@types/node/events.d.ts | 623 + tests/node_modules/@types/node/fs.d.ts | 3723 ++ .../node_modules/@types/node/fs/promises.d.ts | 997 + tests/node_modules/@types/node/globals.d.ts | 285 + .../@types/node/globals.global.d.ts | 1 + tests/node_modules/@types/node/http.d.ts | 1358 + tests/node_modules/@types/node/http2.d.ts | 2100 ++ tests/node_modules/@types/node/https.d.ts | 391 + tests/node_modules/@types/node/index.d.ts | 132 + tests/node_modules/@types/node/inspector.d.ts | 2738 ++ tests/node_modules/@types/node/module.d.ts | 114 + tests/node_modules/@types/node/net.d.ts | 783 + tests/node_modules/@types/node/os.d.ts | 455 + tests/node_modules/@types/node/package.json | 235 + tests/node_modules/@types/node/path.d.ts | 172 + .../node_modules/@types/node/perf_hooks.d.ts | 555 + tests/node_modules/@types/node/process.d.ts | 1477 + tests/node_modules/@types/node/punycode.d.ts | 117 + .../node_modules/@types/node/querystring.d.ts | 131 + tests/node_modules/@types/node/readline.d.ts | 542 + tests/node_modules/@types/node/repl.d.ts | 424 + tests/node_modules/@types/node/stream.d.ts | 1180 + .../@types/node/stream/consumers.d.ts | 25 + .../@types/node/stream/promises.d.ts | 42 + .../node_modules/@types/node/stream/web.d.ts | 6 + .../@types/node/string_decoder.d.ts | 67 + tests/node_modules/@types/node/timers.d.ts | 94 + .../@types/node/timers/promises.d.ts | 68 + tests/node_modules/@types/node/tls.d.ts | 1018 + .../@types/node/trace_events.d.ts | 161 + tests/node_modules/@types/node/tty.d.ts | 206 + tests/node_modules/@types/node/url.d.ts | 798 + tests/node_modules/@types/node/util.d.ts | 1556 + tests/node_modules/@types/node/v8.d.ts | 378 + tests/node_modules/@types/node/vm.d.ts | 504 + tests/node_modules/@types/node/wasi.d.ts | 153 + .../@types/node/worker_threads.d.ts | 649 + tests/node_modules/@types/node/zlib.d.ts | 517 + tests/node_modules/@types/qs/LICENSE | 21 + tests/node_modules/@types/qs/README.md | 16 + tests/node_modules/@types/qs/index.d.ts | 62 + tests/node_modules/@types/qs/package.json | 65 + .../node_modules/@types/range-parser/LICENSE | 21 + .../@types/range-parser/README.md | 55 + .../@types/range-parser/index.d.ts | 35 + .../@types/range-parser/package.json | 25 + tests/node_modules/@types/ws/LICENSE | 21 + tests/node_modules/@types/ws/README.md | 16 + tests/node_modules/@types/ws/index.d.ts | 353 + tests/node_modules/@types/ws/package.json | 57 + .../@ungap/promise-all-settled/LICENSE | 15 + .../@ungap/promise-all-settled/README.md | 26 + .../@ungap/promise-all-settled/cjs/index.js | 19 + .../promise-all-settled/cjs/package.json | 1 + .../@ungap/promise-all-settled/esm/index.js | 19 + .../@ungap/promise-all-settled/index.js | 18 + .../@ungap/promise-all-settled/min.js | 1 + .../@ungap/promise-all-settled/package.json | 44 + tests/node_modules/JSONStream/.travis.yml | 8 + tests/node_modules/JSONStream/LICENSE.APACHE2 | 15 + tests/node_modules/JSONStream/LICENSE.MIT | 24 + tests/node_modules/JSONStream/bin.js | 12 + .../JSONStream/examples/all_docs.js | 13 + tests/node_modules/JSONStream/index.js | 247 + tests/node_modules/JSONStream/package.json | 40 + tests/node_modules/JSONStream/readme.markdown | 207 + tests/node_modules/JSONStream/test/bool.js | 41 + tests/node_modules/JSONStream/test/browser.js | 18 + .../JSONStream/test/destroy_missing.js | 27 + .../JSONStream/test/doubledot1.js | 29 + .../JSONStream/test/doubledot2.js | 30 + tests/node_modules/JSONStream/test/empty.js | 44 + .../JSONStream/test/error_contents.js | 45 + .../JSONStream/test/fixtures/all_npm.json | 4030 ++ .../test/fixtures/couch_sample.json | 18 + .../JSONStream/test/fixtures/depth.json | 15 + .../JSONStream/test/fixtures/error.json | 1 + .../test/fixtures/header_footer.json | 19 + tests/node_modules/JSONStream/test/fn.js | 39 + tests/node_modules/JSONStream/test/gen.js | 135 + .../JSONStream/test/header_footer.js | 55 + tests/node_modules/JSONStream/test/issues.js | 34 + tests/node_modules/JSONStream/test/keys.js | 105 + tests/node_modules/JSONStream/test/map.js | 40 + .../JSONStream/test/multiple_objects.js | 36 + .../JSONStream/test/multiple_objects_error.js | 29 + tests/node_modules/JSONStream/test/null.js | 28 + .../node_modules/JSONStream/test/parsejson.js | 29 + tests/node_modules/JSONStream/test/run.js | 13 + .../node_modules/JSONStream/test/stringify.js | 41 + .../JSONStream/test/stringify_object.js | 47 + tests/node_modules/JSONStream/test/test.js | 35 + tests/node_modules/JSONStream/test/test2.js | 29 + .../node_modules/JSONStream/test/two-ways.js | 41 + tests/node_modules/ansi-colors/LICENSE | 21 + tests/node_modules/ansi-colors/README.md | 315 + tests/node_modules/ansi-colors/index.js | 177 + tests/node_modules/ansi-colors/package.json | 109 + tests/node_modules/ansi-colors/symbols.js | 70 + .../node_modules/ansi-colors/types/index.d.ts | 161 + tests/node_modules/ansi-regex/index.js | 10 + tests/node_modules/ansi-regex/license | 9 + tests/node_modules/ansi-regex/package.json | 53 + tests/node_modules/ansi-regex/readme.md | 46 + tests/node_modules/ansi-styles/index.d.ts | 345 + tests/node_modules/ansi-styles/index.js | 163 + tests/node_modules/ansi-styles/license | 9 + tests/node_modules/ansi-styles/package.json | 56 + tests/node_modules/ansi-styles/readme.md | 152 + tests/node_modules/anymatch/LICENSE | 15 + tests/node_modules/anymatch/README.md | 87 + tests/node_modules/anymatch/index.d.ts | 19 + tests/node_modules/anymatch/index.js | 104 + tests/node_modules/anymatch/package.json | 48 + tests/node_modules/argparse/CHANGELOG.md | 216 + tests/node_modules/argparse/LICENSE | 254 + tests/node_modules/argparse/README.md | 84 + tests/node_modules/argparse/argparse.js | 3707 ++ tests/node_modules/argparse/lib/sub.js | 67 + tests/node_modules/argparse/lib/textwrap.js | 440 + tests/node_modules/argparse/package.json | 31 + .../balanced-match/.github/FUNDING.yml | 2 + tests/node_modules/balanced-match/LICENSE.md | 21 + tests/node_modules/balanced-match/README.md | 97 + tests/node_modules/balanced-match/index.js | 62 + .../node_modules/balanced-match/package.json | 48 + tests/node_modules/base-x/LICENSE.md | 22 + tests/node_modules/base-x/README.md | 67 + tests/node_modules/base-x/package.json | 49 + tests/node_modules/base-x/src/index.d.ts | 10 + tests/node_modules/base-x/src/index.js | 123 + tests/node_modules/base64-js/LICENSE | 21 + tests/node_modules/base64-js/README.md | 34 + tests/node_modules/base64-js/base64js.min.js | 1 + tests/node_modules/base64-js/index.d.ts | 3 + tests/node_modules/base64-js/index.js | 150 + tests/node_modules/base64-js/package.json | 47 + .../binary-extensions/binary-extensions.json | 260 + .../binary-extensions.json.d.ts | 3 + .../node_modules/binary-extensions/index.d.ts | 14 + tests/node_modules/binary-extensions/index.js | 1 + tests/node_modules/binary-extensions/license | 9 + .../binary-extensions/package.json | 38 + .../node_modules/binary-extensions/readme.md | 41 + tests/node_modules/bn.js/CHANGELOG.md | 51 + tests/node_modules/bn.js/LICENSE | 19 + tests/node_modules/bn.js/README.md | 208 + tests/node_modules/bn.js/lib/bn.js | 3547 ++ tests/node_modules/bn.js/package.json | 39 + tests/node_modules/borsh/.eslintrc.yml | 21 + tests/node_modules/borsh/.travis.yml | 11 + tests/node_modules/borsh/CNAME | 1 + tests/node_modules/borsh/CODEOWNERS | 1 + tests/node_modules/borsh/LICENSE-APACHE | 201 + tests/node_modules/borsh/LICENSE-MIT.txt | 23 + tests/node_modules/borsh/README.md | 83 + .../node_modules/borsh/borsh-ts/.eslintrc.yml | 18 + tests/node_modules/borsh/borsh-ts/index.ts | 386 + .../borsh/borsh-ts/test/.eslintrc.yml | 3 + .../borsh-ts/test/fuzz/borsh-roundtrip.js | 19 + ...37181f6340b5b269b7faee05d97fe65b1ab91cd171 | Bin 0 -> 160 bytes ...06f0a57fc7b5f2cb5c08ba00ff900a79ebd0637da7 | Bin 0 -> 163 bytes ...b3ffb19fcaf35deef41f8c084726c5aac5a4551696 | Bin 0 -> 168 bytes ...28d3381c64c61654579dc455a9e5ccaa54bc093721 | Bin 0 -> 160 bytes ...4ba237896a8ee4dffebd27b65c8101a1d8897d6409 | Bin 0 -> 164 bytes ...a2de056c34c40850bbe61b9ebc82cf48365484f4fc | Bin 0 -> 155 bytes ...38baae9bddbd620d018f803540e09ac1bc82ec3a6c | Bin 0 -> 155 bytes ...58a5c55d25830a8efffb9e8661a81e2db3584ca512 | Bin 0 -> 155 bytes ...137cf3e506f550fcfa19363050d1e4917250d83d32 | Bin 0 -> 168 bytes ...5107e67373646fe7c5370030819ccc13990375ca73 | Bin 0 -> 160 bytes ...bdaf44b17f2cd52501f1b5567ed05406163cf96fef | Bin 0 -> 155 bytes ...11e27c119009d0fcccbdddd5fe669c8c02bf04f7dd | Bin 0 -> 170 bytes ...58136c1f2dbd9ed3cad450556faf7b18db4184b42e | Bin 0 -> 155 bytes ...6d6e8ee36819bb22b7304f4e23f61d189a6c221f92 | Bin 0 -> 164 bytes ...2a1be308f7d25d21f81622a7ffc7da3733c03eb572 | Bin 0 -> 160 bytes ...f8e5b7e1c9962a36c8489ada9cb0f798c1ec967eb7 | Bin 0 -> 109 bytes ...b510fffc51f5c78078db2a2fb5cf19b0bd840291ee | Bin 0 -> 155 bytes ...f841050f0b2d78fa519ac76f178db0757d1bd3e96e | Bin 0 -> 174 bytes ...f981ab86d16876888bb7ba665637c5717c0a8916b2 | Bin 0 -> 155 bytes .../test/fuzz/transaction-example/enums.d.ts | 7 + .../test/fuzz/transaction-example/enums.js | 22 + .../fuzz/transaction-example/key_pair.d.ts | 61 + .../test/fuzz/transaction-example/key_pair.js | 125 + .../fuzz/transaction-example/serialize.d.ts | 41 + .../fuzz/transaction-example/serialize.js | 16 + .../test/fuzz/transaction-example/signer.d.ts | 63 + .../test/fuzz/transaction-example/signer.js | 82 + .../fuzz/transaction-example/transaction.d.ts | 106 + .../fuzz/transaction-example/transaction.js | 234 + .../borsh/borsh-ts/test/serialize.test.js | 91 + tests/node_modules/borsh/lib/index.d.ts | 48 + tests/node_modules/borsh/lib/index.js | 391 + tests/node_modules/borsh/package.json | 53 + tests/node_modules/borsh/tsconfig.json | 26 + tests/node_modules/brace-expansion/LICENSE | 21 + tests/node_modules/brace-expansion/README.md | 129 + tests/node_modules/brace-expansion/index.js | 201 + .../node_modules/brace-expansion/package.json | 47 + tests/node_modules/braces/CHANGELOG.md | 184 + tests/node_modules/braces/LICENSE | 21 + tests/node_modules/braces/README.md | 593 + tests/node_modules/braces/index.js | 170 + tests/node_modules/braces/lib/compile.js | 57 + tests/node_modules/braces/lib/constants.js | 57 + tests/node_modules/braces/lib/expand.js | 113 + tests/node_modules/braces/lib/parse.js | 333 + tests/node_modules/braces/lib/stringify.js | 32 + tests/node_modules/braces/lib/utils.js | 112 + tests/node_modules/braces/package.json | 77 + tests/node_modules/brorand/.npmignore | 2 + tests/node_modules/brorand/README.md | 26 + tests/node_modules/brorand/index.js | 65 + tests/node_modules/brorand/package.json | 31 + tests/node_modules/brorand/test/api-test.js | 8 + tests/node_modules/browser-stdout/LICENSE | 5 + tests/node_modules/browser-stdout/README.md | 40 + tests/node_modules/browser-stdout/index.js | 25 + .../node_modules/browser-stdout/package.json | 15 + tests/node_modules/bs58/CHANGELOG.md | 61 + tests/node_modules/bs58/README.md | 71 + tests/node_modules/bs58/index.js | 4 + tests/node_modules/bs58/package.json | 37 + tests/node_modules/buffer-layout/.eslintrc.js | 45 + tests/node_modules/buffer-layout/.travis.yml | 9 + tests/node_modules/buffer-layout/CHANGELOG.md | 222 + tests/node_modules/buffer-layout/LICENSE | 21 + tests/node_modules/buffer-layout/README.md | 397 + .../buffer-layout/jsdoc/conf.json | 10 + .../buffer-layout/jsdoc/custom/local.js | 75 + .../node_modules/buffer-layout/lib/Layout.js | 2712 ++ tests/node_modules/buffer-layout/package.json | 40 + .../buffer-layout/test/LayoutTest.js | 2162 ++ .../buffer-layout/test/examples.c | 112 + .../buffer-layout/test/examples.js | 259 + tests/node_modules/buffer-layout/test/n64.c | 71 + tests/node_modules/buffer-layout/x.js | 36 + tests/node_modules/buffer/AUTHORS.md | 71 + tests/node_modules/buffer/LICENSE | 21 + tests/node_modules/buffer/README.md | 410 + tests/node_modules/buffer/index.d.ts | 186 + tests/node_modules/buffer/index.js | 2106 ++ tests/node_modules/buffer/package.json | 93 + tests/node_modules/bufferutil/LICENSE | 21 + tests/node_modules/bufferutil/README.md | 78 + tests/node_modules/bufferutil/binding.gyp | 9 + tests/node_modules/bufferutil/build/Makefile | 342 + .../Release/.deps/Release/bufferutil.node.d | 1 + .../obj.target/bufferutil/src/bufferutil.o.d | 11 + .../bufferutil/build/Release/bufferutil.node | Bin 0 -> 52700 bytes .../obj.target/bufferutil/src/bufferutil.o | Bin 0 -> 16496 bytes .../bufferutil/build/binding.Makefile | 6 + .../bufferutil/build/bufferutil.target.mk | 186 + .../node_modules/bufferutil/build/config.gypi | 92 + .../bufferutil/build/gyp-mac-tool | 777 + tests/node_modules/bufferutil/fallback.js | 34 + tests/node_modules/bufferutil/index.js | 7 + tests/node_modules/bufferutil/package.json | 34 + .../prebuilds/darwin-x64/node.napi.node | Bin 0 -> 9076 bytes .../prebuilds/linux-arm/node.napi.armv6.node | Bin 0 -> 5932 bytes .../prebuilds/linux-arm/node.napi.armv7.node | Bin 0 -> 9556 bytes .../prebuilds/linux-arm64/node.napi.node | Bin 0 -> 10224 bytes .../prebuilds/linux-x64/node.napi.node | Bin 0 -> 10408 bytes .../prebuilds/win32-ia32/node.napi.node | Bin 0 -> 108032 bytes .../prebuilds/win32-x64/node.napi.node | Bin 0 -> 127488 bytes .../node_modules/bufferutil/src/bufferutil.c | 171 + tests/node_modules/camelcase/index.d.ts | 63 + tests/node_modules/camelcase/index.js | 76 + tests/node_modules/camelcase/license | 9 + tests/node_modules/camelcase/package.json | 43 + tests/node_modules/camelcase/readme.md | 99 + tests/node_modules/chalk/index.d.ts | 415 + tests/node_modules/chalk/license | 9 + .../node_modules/supports-color/browser.js | 5 + .../node_modules/supports-color/index.js | 135 + .../chalk/node_modules/supports-color/license | 9 + .../node_modules/supports-color/package.json | 53 + .../node_modules/supports-color/readme.md | 76 + tests/node_modules/chalk/package.json | 68 + tests/node_modules/chalk/readme.md | 341 + tests/node_modules/chalk/source/index.js | 229 + tests/node_modules/chalk/source/templates.js | 134 + tests/node_modules/chalk/source/util.js | 39 + tests/node_modules/chokidar/LICENSE | 21 + tests/node_modules/chokidar/README.md | 308 + tests/node_modules/chokidar/index.js | 973 + tests/node_modules/chokidar/lib/constants.js | 65 + .../chokidar/lib/fsevents-handler.js | 524 + .../chokidar/lib/nodefs-handler.js | 646 + tests/node_modules/chokidar/package.json | 78 + tests/node_modules/chokidar/types/index.d.ts | 187 + tests/node_modules/circular-json/LICENSE.txt | 19 + tests/node_modules/circular-json/README.md | 146 + .../circular-json/build/circular-json.js | 2 + .../circular-json/build/circular-json.max.js | 210 + .../circular-json/build/circular-json.node.js | 207 + tests/node_modules/circular-json/package.json | 38 + .../circular-json/template/license.after | 2 + .../circular-json/template/license.before | 1 + tests/node_modules/cliui/CHANGELOG.md | 121 + tests/node_modules/cliui/LICENSE.txt | 14 + tests/node_modules/cliui/README.md | 141 + tests/node_modules/cliui/build/index.cjs | 302 + tests/node_modules/cliui/build/lib/index.js | 287 + .../cliui/build/lib/string-utils.js | 27 + tests/node_modules/cliui/index.mjs | 13 + .../cliui/node_modules/ansi-regex/index.d.ts | 37 + .../cliui/node_modules/ansi-regex/index.js | 10 + .../cliui/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 55 + .../cliui/node_modules/ansi-regex/readme.md | 78 + .../is-fullwidth-code-point/index.d.ts | 17 + .../is-fullwidth-code-point/index.js | 50 + .../is-fullwidth-code-point/license | 9 + .../is-fullwidth-code-point/package.json | 42 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/string-width/index.d.ts | 29 + .../cliui/node_modules/string-width/index.js | 47 + .../cliui/node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 56 + .../cliui/node_modules/string-width/readme.md | 50 + .../cliui/node_modules/strip-ansi/index.d.ts | 17 + .../cliui/node_modules/strip-ansi/index.js | 4 + .../cliui/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 54 + .../cliui/node_modules/strip-ansi/readme.md | 46 + tests/node_modules/cliui/package.json | 83 + tests/node_modules/color-convert/CHANGELOG.md | 54 + tests/node_modules/color-convert/LICENSE | 21 + tests/node_modules/color-convert/README.md | 68 + .../node_modules/color-convert/conversions.js | 839 + tests/node_modules/color-convert/index.js | 81 + tests/node_modules/color-convert/package.json | 48 + tests/node_modules/color-convert/route.js | 97 + tests/node_modules/color-name/LICENSE | 8 + tests/node_modules/color-name/README.md | 11 + tests/node_modules/color-name/index.js | 152 + tests/node_modules/color-name/package.json | 28 + tests/node_modules/commander/CHANGELOG.md | 419 + tests/node_modules/commander/LICENSE | 22 + tests/node_modules/commander/Readme.md | 428 + tests/node_modules/commander/index.js | 1224 + tests/node_modules/commander/package.json | 38 + .../node_modules/commander/typings/index.d.ts | 310 + tests/node_modules/concat-map/.travis.yml | 4 + tests/node_modules/concat-map/LICENSE | 18 + tests/node_modules/concat-map/README.markdown | 62 + tests/node_modules/concat-map/example/map.js | 6 + tests/node_modules/concat-map/index.js | 13 + tests/node_modules/concat-map/package.json | 43 + tests/node_modules/concat-map/test/map.js | 39 + tests/node_modules/crypto-hash/browser.js | 55 + tests/node_modules/crypto-hash/index.d.ts | 67 + tests/node_modules/crypto-hash/index.js | 96 + tests/node_modules/crypto-hash/license | 9 + tests/node_modules/crypto-hash/package.json | 52 + tests/node_modules/crypto-hash/readme.md | 59 + tests/node_modules/crypto-hash/thread.js | 12 + tests/node_modules/debug/LICENSE | 19 + tests/node_modules/debug/README.md | 455 + .../debug/node_modules/ms/index.js | 162 + .../debug/node_modules/ms/license.md | 21 + .../debug/node_modules/ms/package.json | 37 + .../debug/node_modules/ms/readme.md | 60 + tests/node_modules/debug/package.json | 59 + tests/node_modules/debug/src/browser.js | 269 + tests/node_modules/debug/src/common.js | 261 + tests/node_modules/debug/src/index.js | 10 + tests/node_modules/debug/src/node.js | 263 + tests/node_modules/decamelize/index.d.ts | 20 + tests/node_modules/decamelize/index.js | 12 + tests/node_modules/decamelize/license | 9 + tests/node_modules/decamelize/package.json | 40 + tests/node_modules/decamelize/readme.md | 51 + tests/node_modules/delay/index.d.ts | 107 + tests/node_modules/delay/index.js | 72 + tests/node_modules/delay/license | 9 + tests/node_modules/delay/package.json | 54 + tests/node_modules/delay/readme.md | 173 + tests/node_modules/diff/CONTRIBUTING.md | 39 + tests/node_modules/diff/LICENSE | 31 + tests/node_modules/diff/README.md | 208 + tests/node_modules/diff/dist/diff.js | 1582 + tests/node_modules/diff/lib/convert/dmp.js | 32 + tests/node_modules/diff/lib/convert/xml.js | 42 + tests/node_modules/diff/lib/diff/array.js | 45 + tests/node_modules/diff/lib/diff/base.js | 304 + tests/node_modules/diff/lib/diff/character.js | 37 + tests/node_modules/diff/lib/diff/css.js | 41 + tests/node_modules/diff/lib/diff/json.js | 163 + tests/node_modules/diff/lib/diff/line.js | 89 + tests/node_modules/diff/lib/diff/sentence.js | 41 + tests/node_modules/diff/lib/diff/word.js | 108 + tests/node_modules/diff/lib/index.es6.js | 1553 + tests/node_modules/diff/lib/index.js | 216 + tests/node_modules/diff/lib/index.mjs | 1553 + tests/node_modules/diff/lib/patch/apply.js | 238 + tests/node_modules/diff/lib/patch/create.js | 267 + tests/node_modules/diff/lib/patch/merge.js | 613 + tests/node_modules/diff/lib/patch/parse.js | 167 + tests/node_modules/diff/lib/util/array.js | 32 + .../diff/lib/util/distance-iterator.js | 57 + tests/node_modules/diff/lib/util/params.js | 24 + tests/node_modules/diff/package.json | 87 + tests/node_modules/diff/release-notes.md | 303 + tests/node_modules/diff/runtime.js | 3 + tests/node_modules/dot-case/LICENSE | 21 + tests/node_modules/dot-case/README.md | 37 + .../dot-case/dist.es2015/index.d.ts | 3 + .../dot-case/dist.es2015/index.js | 7 + .../dot-case/dist.es2015/index.js.map | 1 + .../dot-case/dist.es2015/index.spec.d.ts | 1 + .../dot-case/dist.es2015/index.spec.js | 24 + .../dot-case/dist.es2015/index.spec.js.map | 1 + tests/node_modules/dot-case/dist/index.d.ts | 3 + tests/node_modules/dot-case/dist/index.js | 11 + tests/node_modules/dot-case/dist/index.js.map | 1 + .../dot-case/dist/index.spec.d.ts | 1 + .../node_modules/dot-case/dist/index.spec.js | 26 + .../dot-case/dist/index.spec.js.map | 1 + tests/node_modules/dot-case/package.json | 89 + tests/node_modules/elliptic/README.md | 238 + tests/node_modules/elliptic/lib/elliptic.js | 13 + .../elliptic/lib/elliptic/curve/base.js | 381 + .../elliptic/lib/elliptic/curve/edwards.js | 435 + .../elliptic/lib/elliptic/curve/index.js | 8 + .../elliptic/lib/elliptic/curve/mont.js | 178 + .../elliptic/lib/elliptic/curve/short.js | 938 + .../elliptic/lib/elliptic/curves.js | 206 + .../elliptic/lib/elliptic/ec/index.js | 243 + .../elliptic/lib/elliptic/ec/key.js | 121 + .../elliptic/lib/elliptic/ec/signature.js | 166 + .../elliptic/lib/elliptic/eddsa/index.js | 118 + .../elliptic/lib/elliptic/eddsa/key.js | 95 + .../elliptic/lib/elliptic/eddsa/signature.js | 65 + .../lib/elliptic/precomputed/secp256k1.js | 780 + .../elliptic/lib/elliptic/utils.js | 119 + .../elliptic/node_modules/bn.js/LICENSE | 19 + .../elliptic/node_modules/bn.js/README.md | 200 + .../elliptic/node_modules/bn.js/lib/bn.js | 3446 ++ .../elliptic/node_modules/bn.js/package.json | 36 + tests/node_modules/elliptic/package.json | 56 + .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 + tests/node_modules/emoji-regex/README.md | 73 + .../node_modules/emoji-regex/es2015/index.js | 6 + tests/node_modules/emoji-regex/es2015/text.js | 6 + tests/node_modules/emoji-regex/index.d.ts | 23 + tests/node_modules/emoji-regex/index.js | 6 + tests/node_modules/emoji-regex/package.json | 50 + tests/node_modules/emoji-regex/text.js | 6 + tests/node_modules/es6-promise/CHANGELOG.md | 155 + tests/node_modules/es6-promise/LICENSE | 19 + tests/node_modules/es6-promise/README.md | 97 + tests/node_modules/es6-promise/auto.js | 4 + .../es6-promise/dist/es6-promise.auto.js | 1176 + .../es6-promise/dist/es6-promise.auto.map | 1 + .../es6-promise/dist/es6-promise.auto.min.js | 1 + .../es6-promise/dist/es6-promise.auto.min.map | 1 + .../es6-promise/dist/es6-promise.js | 1174 + .../es6-promise/dist/es6-promise.map | 1 + .../es6-promise/dist/es6-promise.min.js | 1 + .../es6-promise/dist/es6-promise.min.map | 1 + .../node_modules/es6-promise/es6-promise.d.ts | 85 + .../es6-promise/lib/es6-promise.auto.js | 3 + .../es6-promise/lib/es6-promise.js | 7 + .../es6-promise/lib/es6-promise/-internal.js | 243 + .../es6-promise/lib/es6-promise/asap.js | 119 + .../es6-promise/lib/es6-promise/enumerator.js | 124 + .../es6-promise/lib/es6-promise/polyfill.js | 35 + .../es6-promise/lib/es6-promise/promise.js | 431 + .../lib/es6-promise/promise/all.js | 52 + .../lib/es6-promise/promise/race.js | 84 + .../lib/es6-promise/promise/reject.js | 46 + .../lib/es6-promise/promise/resolve.js | 48 + .../es6-promise/lib/es6-promise/then.js | 32 + .../es6-promise/lib/es6-promise/utils.js | 21 + tests/node_modules/es6-promise/package.json | 78 + tests/node_modules/es6-promisify/README.md | 89 + .../es6-promisify/dist/promise.js | 73 + .../es6-promisify/dist/promisify.js | 85 + tests/node_modules/es6-promisify/package.json | 41 + tests/node_modules/escalade/dist/index.js | 22 + tests/node_modules/escalade/dist/index.mjs | 22 + tests/node_modules/escalade/index.d.ts | 3 + tests/node_modules/escalade/license | 9 + tests/node_modules/escalade/package.json | 61 + tests/node_modules/escalade/readme.md | 211 + tests/node_modules/escalade/sync/index.d.ts | 2 + tests/node_modules/escalade/sync/index.js | 18 + tests/node_modules/escalade/sync/index.mjs | 18 + .../escape-string-regexp/index.d.ts | 18 + .../escape-string-regexp/index.js | 13 + .../node_modules/escape-string-regexp/license | 9 + .../escape-string-regexp/package.json | 38 + .../escape-string-regexp/readme.md | 34 + tests/node_modules/eventemitter3/LICENSE | 21 + tests/node_modules/eventemitter3/README.md | 94 + tests/node_modules/eventemitter3/index.d.ts | 134 + tests/node_modules/eventemitter3/index.js | 336 + tests/node_modules/eventemitter3/package.json | 56 + .../eventemitter3/umd/eventemitter3.js | 340 + .../eventemitter3/umd/eventemitter3.min.js | 1 + .../umd/eventemitter3.min.js.map | 1 + tests/node_modules/eyes/LICENSE | 20 + tests/node_modules/eyes/Makefile | 4 + tests/node_modules/eyes/README.md | 73 + tests/node_modules/eyes/lib/eyes.js | 236 + tests/node_modules/eyes/package.json | 14 + tests/node_modules/eyes/test/eyes-test.js | 56 + tests/node_modules/fill-range/LICENSE | 21 + tests/node_modules/fill-range/README.md | 237 + tests/node_modules/fill-range/index.js | 249 + tests/node_modules/fill-range/package.json | 69 + tests/node_modules/find-up/index.d.ts | 138 + tests/node_modules/find-up/index.js | 89 + tests/node_modules/find-up/license | 9 + tests/node_modules/find-up/package.json | 54 + tests/node_modules/find-up/readme.md | 151 + tests/node_modules/find/.travis.yml | 16 + tests/node_modules/find/LICENSE | 22 + tests/node_modules/find/README.md | 137 + tests/node_modules/find/index.js | 425 + tests/node_modules/find/package.json | 36 + tests/node_modules/find/test/test.js | 280 + tests/node_modules/flat/.travis.yml | 8 + tests/node_modules/flat/LICENSE | 12 + tests/node_modules/flat/README.md | 236 + tests/node_modules/flat/cli.js | 42 + tests/node_modules/flat/index.js | 158 + tests/node_modules/flat/package.json | 37 + tests/node_modules/flat/test/test.js | 643 + tests/node_modules/fs.realpath/LICENSE | 43 + tests/node_modules/fs.realpath/README.md | 33 + tests/node_modules/fs.realpath/index.js | 66 + tests/node_modules/fs.realpath/old.js | 303 + tests/node_modules/fs.realpath/package.json | 26 + tests/node_modules/fsevents/LICENSE | 22 + tests/node_modules/fsevents/README.md | 83 + tests/node_modules/fsevents/fsevents.d.ts | 46 + tests/node_modules/fsevents/fsevents.js | 82 + tests/node_modules/fsevents/fsevents.node | Bin 0 -> 147128 bytes tests/node_modules/fsevents/package.json | 62 + tests/node_modules/get-caller-file/LICENSE.md | 6 + tests/node_modules/get-caller-file/README.md | 41 + tests/node_modules/get-caller-file/index.d.ts | 2 + tests/node_modules/get-caller-file/index.js | 22 + .../node_modules/get-caller-file/index.js.map | 1 + .../node_modules/get-caller-file/package.json | 42 + tests/node_modules/glob-parent/CHANGELOG.md | 110 + tests/node_modules/glob-parent/LICENSE | 15 + tests/node_modules/glob-parent/README.md | 137 + tests/node_modules/glob-parent/index.js | 42 + tests/node_modules/glob-parent/package.json | 48 + tests/node_modules/glob/LICENSE | 21 + tests/node_modules/glob/README.md | 375 + tests/node_modules/glob/changelog.md | 67 + tests/node_modules/glob/common.js | 234 + tests/node_modules/glob/glob.js | 788 + tests/node_modules/glob/package.json | 51 + tests/node_modules/glob/sync.js | 484 + tests/node_modules/growl/.eslintrc.json | 14 + tests/node_modules/growl/.tags | 195 + tests/node_modules/growl/.tags1 | 166 + tests/node_modules/growl/.travis.yml | 21 + tests/node_modules/growl/History.md | 77 + tests/node_modules/growl/Readme.md | 109 + tests/node_modules/growl/lib/growl.js | 340 + tests/node_modules/growl/package.json | 29 + tests/node_modules/growl/test.js | 31 + tests/node_modules/has-flag/index.d.ts | 39 + tests/node_modules/has-flag/index.js | 8 + tests/node_modules/has-flag/license | 9 + tests/node_modules/has-flag/package.json | 46 + tests/node_modules/has-flag/readme.md | 89 + tests/node_modules/hash.js/.eslintrc.js | 41 + tests/node_modules/hash.js/.travis.yml | 10 + tests/node_modules/hash.js/README.md | 48 + tests/node_modules/hash.js/lib/hash.d.ts | 106 + tests/node_modules/hash.js/lib/hash.js | 15 + tests/node_modules/hash.js/lib/hash/common.js | 92 + tests/node_modules/hash.js/lib/hash/hmac.js | 47 + tests/node_modules/hash.js/lib/hash/ripemd.js | 146 + tests/node_modules/hash.js/lib/hash/sha.js | 7 + tests/node_modules/hash.js/lib/hash/sha/1.js | 74 + .../node_modules/hash.js/lib/hash/sha/224.js | 30 + .../node_modules/hash.js/lib/hash/sha/256.js | 105 + .../node_modules/hash.js/lib/hash/sha/384.js | 35 + .../node_modules/hash.js/lib/hash/sha/512.js | 330 + .../hash.js/lib/hash/sha/common.js | 49 + tests/node_modules/hash.js/lib/hash/utils.js | 278 + tests/node_modules/hash.js/package.json | 35 + tests/node_modules/hash.js/test/hash-test.js | 140 + tests/node_modules/hash.js/test/hmac-test.js | 62 + tests/node_modules/he/LICENSE-MIT.txt | 20 + tests/node_modules/he/README.md | 379 + tests/node_modules/he/bin/he | 148 + tests/node_modules/he/he.js | 345 + tests/node_modules/he/man/he.1 | 78 + tests/node_modules/he/package.json | 58 + tests/node_modules/hmac-drbg/.npmignore | 2 + tests/node_modules/hmac-drbg/.travis.yml | 11 + tests/node_modules/hmac-drbg/README.md | 48 + tests/node_modules/hmac-drbg/lib/hmac-drbg.js | 113 + tests/node_modules/hmac-drbg/package.json | 32 + .../node_modules/hmac-drbg/test/drbg-test.js | 91 + .../test/fixtures/hmac-drbg-nist.json | 332 + tests/node_modules/ieee754/LICENSE | 11 + tests/node_modules/ieee754/README.md | 51 + tests/node_modules/ieee754/index.d.ts | 10 + tests/node_modules/ieee754/index.js | 85 + tests/node_modules/ieee754/package.json | 52 + tests/node_modules/inflight/LICENSE | 15 + tests/node_modules/inflight/README.md | 37 + tests/node_modules/inflight/inflight.js | 54 + tests/node_modules/inflight/package.json | 29 + tests/node_modules/inherits/LICENSE | 16 + tests/node_modules/inherits/README.md | 42 + tests/node_modules/inherits/inherits.js | 9 + .../node_modules/inherits/inherits_browser.js | 27 + tests/node_modules/inherits/package.json | 29 + tests/node_modules/is-binary-path/index.d.ts | 17 + tests/node_modules/is-binary-path/index.js | 7 + tests/node_modules/is-binary-path/license | 9 + .../node_modules/is-binary-path/package.json | 40 + tests/node_modules/is-binary-path/readme.md | 34 + tests/node_modules/is-extglob/LICENSE | 21 + tests/node_modules/is-extglob/README.md | 107 + tests/node_modules/is-extglob/index.js | 20 + tests/node_modules/is-extglob/package.json | 69 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 45 + .../is-fullwidth-code-point/readme.md | 39 + tests/node_modules/is-glob/LICENSE | 21 + tests/node_modules/is-glob/README.md | 206 + tests/node_modules/is-glob/index.js | 48 + tests/node_modules/is-glob/package.json | 81 + tests/node_modules/is-number/LICENSE | 21 + tests/node_modules/is-number/README.md | 187 + tests/node_modules/is-number/index.js | 18 + tests/node_modules/is-number/package.json | 82 + tests/node_modules/is-plain-obj/index.d.ts | 29 + tests/node_modules/is-plain-obj/index.js | 10 + tests/node_modules/is-plain-obj/license | 9 + tests/node_modules/is-plain-obj/package.json | 38 + tests/node_modules/is-plain-obj/readme.md | 54 + .../is-unicode-supported/index.d.ts | 14 + .../is-unicode-supported/index.js | 13 + .../node_modules/is-unicode-supported/license | 9 + .../is-unicode-supported/package.json | 41 + .../is-unicode-supported/readme.md | 35 + tests/node_modules/isexe/.npmignore | 2 + tests/node_modules/isexe/LICENSE | 15 + tests/node_modules/isexe/README.md | 51 + tests/node_modules/isexe/index.js | 57 + tests/node_modules/isexe/mode.js | 41 + tests/node_modules/isexe/package.json | 31 + tests/node_modules/isexe/test/basic.js | 221 + tests/node_modules/isexe/windows.js | 42 + tests/node_modules/isomorphic-ws/LICENSE | 21 + tests/node_modules/isomorphic-ws/README.md | 58 + tests/node_modules/isomorphic-ws/browser.js | 17 + tests/node_modules/isomorphic-ws/index.d.ts | 8 + tests/node_modules/isomorphic-ws/node.js | 3 + tests/node_modules/isomorphic-ws/package.json | 34 + tests/node_modules/jayson/.npmignore | 8 + tests/node_modules/jayson/LICENSE | 22 + tests/node_modules/jayson/README.md | 1315 + tests/node_modules/jayson/bin/jayson.js | 111 + tests/node_modules/jayson/index.d.ts | 342 + tests/node_modules/jayson/index.js | 1 + .../jayson/lib/client/browser/index.d.ts | 14 + .../jayson/lib/client/browser/index.js | 163 + tests/node_modules/jayson/lib/client/http.js | 116 + tests/node_modules/jayson/lib/client/https.js | 34 + tests/node_modules/jayson/lib/client/index.js | 221 + tests/node_modules/jayson/lib/client/tcp.js | 90 + tests/node_modules/jayson/lib/client/tls.js | 89 + .../jayson/lib/client/websocket.js | 133 + .../jayson/lib/generateRequest.js | 63 + tests/node_modules/jayson/lib/index.js | 31 + tests/node_modules/jayson/lib/method.js | 128 + tests/node_modules/jayson/lib/server/http.js | 26 + tests/node_modules/jayson/lib/server/https.js | 26 + tests/node_modules/jayson/lib/server/index.js | 443 + .../jayson/lib/server/middleware.js | 75 + tests/node_modules/jayson/lib/server/tcp.js | 72 + tests/node_modules/jayson/lib/server/tls.js | 72 + .../jayson/lib/server/websocket.js | 62 + tests/node_modules/jayson/lib/utils.js | 449 + .../jayson/node_modules/@types/node/LICENSE | 21 + .../jayson/node_modules/@types/node/README.md | 16 + .../node_modules/@types/node/assert.d.ts | 117 + .../node_modules/@types/node/async_hooks.d.ts | 246 + .../node_modules/@types/node/buffer.d.ts | 22 + .../@types/node/child_process.d.ts | 495 + .../node_modules/@types/node/cluster.d.ts | 260 + .../node_modules/@types/node/console.d.ts | 3 + .../node_modules/@types/node/constants.d.ts | 448 + .../node_modules/@types/node/crypto.d.ts | 1159 + .../node_modules/@types/node/dgram.d.ts | 118 + .../jayson/node_modules/@types/node/dns.d.ts | 372 + .../node_modules/@types/node/domain.d.ts | 16 + .../node_modules/@types/node/events.d.ts | 47 + .../jayson/node_modules/@types/node/fs.d.ts | 2558 ++ .../node_modules/@types/node/globals.d.ts | 1257 + .../@types/node/globals.global.d.ts | 1 + .../jayson/node_modules/@types/node/http.d.ts | 453 + .../node_modules/@types/node/http2.d.ts | 952 + .../node_modules/@types/node/https.d.ts | 156 + .../node_modules/@types/node/index.d.ts | 93 + .../node_modules/@types/node/inspector.d.ts | 3034 ++ .../node_modules/@types/node/module.d.ts | 3 + .../jayson/node_modules/@types/node/net.d.ts | 278 + .../jayson/node_modules/@types/node/os.d.ts | 263 + .../node_modules/@types/node/package.json | 205 + .../jayson/node_modules/@types/node/path.d.ts | 159 + .../node_modules/@types/node/perf_hooks.d.ts | 259 + .../node_modules/@types/node/process.d.ts | 15 + .../node_modules/@types/node/punycode.d.ts | 75 + .../node_modules/@types/node/querystring.d.ts | 29 + .../node_modules/@types/node/readline.d.ts | 157 + .../jayson/node_modules/@types/node/repl.d.ts | 390 + .../node_modules/@types/node/stream.d.ts | 333 + .../@types/node/string_decoder.d.ts | 7 + .../node_modules/@types/node/timers.d.ts | 16 + .../jayson/node_modules/@types/node/tls.d.ts | 711 + .../@types/node/trace_events.d.ts | 61 + .../jayson/node_modules/@types/node/tty.d.ts | 66 + .../jayson/node_modules/@types/node/url.d.ts | 117 + .../jayson/node_modules/@types/node/util.d.ts | 200 + .../jayson/node_modules/@types/node/v8.d.ts | 197 + .../jayson/node_modules/@types/node/vm.d.ts | 112 + .../jayson/node_modules/@types/node/wasi.d.ts | 55 + .../@types/node/worker_threads.d.ts | 207 + .../jayson/node_modules/@types/node/zlib.d.ts | 356 + tests/node_modules/jayson/package.json | 89 + tests/node_modules/jayson/promise/index.d.ts | 343 + tests/node_modules/jayson/promise/index.js | 3 + .../promise/lib/client/browser/index.d.ts | 12 + .../promise/lib/client/browser/index.js | 28 + .../jayson/promise/lib/client/http.js | 23 + .../jayson/promise/lib/client/https.js | 24 + .../jayson/promise/lib/client/index.js | 53 + .../jayson/promise/lib/client/tcp.js | 23 + .../jayson/promise/lib/client/tls.js | 23 + .../jayson/promise/lib/client/websocket.js | 23 + .../node_modules/jayson/promise/lib/index.js | 33 + .../node_modules/jayson/promise/lib/method.js | 55 + .../node_modules/jayson/promise/lib/server.js | 23 + .../node_modules/jayson/promise/lib/utils.js | 23 + tests/node_modules/js-sha256/CHANGELOG.md | 110 + tests/node_modules/js-sha256/LICENSE.txt | 22 + tests/node_modules/js-sha256/README.md | 100 + .../js-sha256/build/sha256.min.js | 9 + tests/node_modules/js-sha256/index.d.ts | 149 + tests/node_modules/js-sha256/package.json | 44 + tests/node_modules/js-sha256/src/sha256.js | 518 + tests/node_modules/js-sha3/CHANGELOG.md | 106 + tests/node_modules/js-sha3/LICENSE.txt | 20 + tests/node_modules/js-sha3/README.md | 241 + tests/node_modules/js-sha3/build/sha3.min.js | 9 + tests/node_modules/js-sha3/index.d.ts | 317 + tests/node_modules/js-sha3/package.json | 45 + tests/node_modules/js-sha3/src/sha3.js | 656 + tests/node_modules/js-yaml/CHANGELOG.md | 616 + tests/node_modules/js-yaml/LICENSE | 21 + tests/node_modules/js-yaml/README.md | 246 + tests/node_modules/js-yaml/bin/js-yaml.js | 126 + tests/node_modules/js-yaml/dist/js-yaml.js | 3874 ++ .../node_modules/js-yaml/dist/js-yaml.min.js | 2 + tests/node_modules/js-yaml/dist/js-yaml.mjs | 3851 ++ tests/node_modules/js-yaml/index.js | 47 + tests/node_modules/js-yaml/lib/common.js | 59 + tests/node_modules/js-yaml/lib/dumper.js | 965 + tests/node_modules/js-yaml/lib/exception.js | 55 + tests/node_modules/js-yaml/lib/loader.js | 1727 + tests/node_modules/js-yaml/lib/schema.js | 121 + tests/node_modules/js-yaml/lib/schema/core.js | 11 + .../js-yaml/lib/schema/default.js | 22 + .../js-yaml/lib/schema/failsafe.js | 17 + tests/node_modules/js-yaml/lib/schema/json.js | 19 + tests/node_modules/js-yaml/lib/snippet.js | 101 + tests/node_modules/js-yaml/lib/type.js | 66 + tests/node_modules/js-yaml/lib/type/binary.js | 125 + tests/node_modules/js-yaml/lib/type/bool.js | 35 + tests/node_modules/js-yaml/lib/type/float.js | 97 + tests/node_modules/js-yaml/lib/type/int.js | 156 + tests/node_modules/js-yaml/lib/type/map.js | 8 + tests/node_modules/js-yaml/lib/type/merge.js | 12 + tests/node_modules/js-yaml/lib/type/null.js | 35 + tests/node_modules/js-yaml/lib/type/omap.js | 44 + tests/node_modules/js-yaml/lib/type/pairs.js | 53 + tests/node_modules/js-yaml/lib/type/seq.js | 8 + tests/node_modules/js-yaml/lib/type/set.js | 29 + tests/node_modules/js-yaml/lib/type/str.js | 8 + .../js-yaml/lib/type/timestamp.js | 88 + tests/node_modules/js-yaml/package.json | 66 + .../json-stringify-safe/.npmignore | 1 + .../json-stringify-safe/CHANGELOG.md | 14 + .../node_modules/json-stringify-safe/LICENSE | 15 + .../node_modules/json-stringify-safe/Makefile | 35 + .../json-stringify-safe/README.md | 52 + .../json-stringify-safe/package.json | 31 + .../json-stringify-safe/stringify.js | 27 + .../json-stringify-safe/test/mocha.opts | 2 + .../test/stringify_test.js | 246 + tests/node_modules/jsonparse/.npmignore | 1 + tests/node_modules/jsonparse/LICENSE | 24 + tests/node_modules/jsonparse/README.markdown | 11 + tests/node_modules/jsonparse/bench.js | 26 + .../jsonparse/examples/twitterfeed.js | 30 + tests/node_modules/jsonparse/jsonparse.js | 413 + tests/node_modules/jsonparse/package.json | 22 + .../jsonparse/samplejson/basic.json | 167 + .../jsonparse/samplejson/basic2.json | 180 + .../node_modules/jsonparse/test/big-token.js | 24 + tests/node_modules/jsonparse/test/boundary.js | 110 + tests/node_modules/jsonparse/test/offset.js | 67 + .../node_modules/jsonparse/test/primitives.js | 57 + .../node_modules/jsonparse/test/surrogate.js | 26 + tests/node_modules/jsonparse/test/unvalid.js | 15 + tests/node_modules/jsonparse/test/utf8.js | 38 + tests/node_modules/locate-path/index.d.ts | 83 + tests/node_modules/locate-path/index.js | 68 + tests/node_modules/locate-path/license | 9 + tests/node_modules/locate-path/package.json | 46 + tests/node_modules/locate-path/readme.md | 125 + tests/node_modules/lodash/LICENSE | 47 + tests/node_modules/lodash/README.md | 39 + tests/node_modules/lodash/_DataView.js | 7 + tests/node_modules/lodash/_Hash.js | 32 + tests/node_modules/lodash/_LazyWrapper.js | 28 + tests/node_modules/lodash/_ListCache.js | 32 + tests/node_modules/lodash/_LodashWrapper.js | 22 + tests/node_modules/lodash/_Map.js | 7 + tests/node_modules/lodash/_MapCache.js | 32 + tests/node_modules/lodash/_Promise.js | 7 + tests/node_modules/lodash/_Set.js | 7 + tests/node_modules/lodash/_SetCache.js | 27 + tests/node_modules/lodash/_Stack.js | 27 + tests/node_modules/lodash/_Symbol.js | 6 + tests/node_modules/lodash/_Uint8Array.js | 6 + tests/node_modules/lodash/_WeakMap.js | 7 + tests/node_modules/lodash/_apply.js | 21 + tests/node_modules/lodash/_arrayAggregator.js | 22 + tests/node_modules/lodash/_arrayEach.js | 22 + tests/node_modules/lodash/_arrayEachRight.js | 21 + tests/node_modules/lodash/_arrayEvery.js | 23 + tests/node_modules/lodash/_arrayFilter.js | 25 + tests/node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + tests/node_modules/lodash/_arrayLikeKeys.js | 49 + tests/node_modules/lodash/_arrayMap.js | 21 + tests/node_modules/lodash/_arrayPush.js | 20 + tests/node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + tests/node_modules/lodash/_arraySample.js | 15 + tests/node_modules/lodash/_arraySampleSize.js | 17 + tests/node_modules/lodash/_arrayShuffle.js | 15 + tests/node_modules/lodash/_arraySome.js | 23 + tests/node_modules/lodash/_asciiSize.js | 12 + tests/node_modules/lodash/_asciiToArray.js | 12 + tests/node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + tests/node_modules/lodash/_assignValue.js | 28 + tests/node_modules/lodash/_assocIndexOf.js | 21 + tests/node_modules/lodash/_baseAggregator.js | 21 + tests/node_modules/lodash/_baseAssign.js | 17 + tests/node_modules/lodash/_baseAssignIn.js | 17 + tests/node_modules/lodash/_baseAssignValue.js | 25 + tests/node_modules/lodash/_baseAt.js | 23 + tests/node_modules/lodash/_baseClamp.js | 22 + tests/node_modules/lodash/_baseClone.js | 166 + tests/node_modules/lodash/_baseConforms.js | 18 + tests/node_modules/lodash/_baseConformsTo.js | 27 + tests/node_modules/lodash/_baseCreate.js | 30 + tests/node_modules/lodash/_baseDelay.js | 21 + tests/node_modules/lodash/_baseDifference.js | 67 + tests/node_modules/lodash/_baseEach.js | 14 + tests/node_modules/lodash/_baseEachRight.js | 14 + tests/node_modules/lodash/_baseEvery.js | 21 + tests/node_modules/lodash/_baseExtremum.js | 32 + tests/node_modules/lodash/_baseFill.js | 32 + tests/node_modules/lodash/_baseFilter.js | 21 + tests/node_modules/lodash/_baseFindIndex.js | 24 + tests/node_modules/lodash/_baseFindKey.js | 23 + tests/node_modules/lodash/_baseFlatten.js | 38 + tests/node_modules/lodash/_baseFor.js | 16 + tests/node_modules/lodash/_baseForOwn.js | 16 + tests/node_modules/lodash/_baseForOwnRight.js | 16 + tests/node_modules/lodash/_baseForRight.js | 15 + tests/node_modules/lodash/_baseFunctions.js | 19 + tests/node_modules/lodash/_baseGet.js | 24 + tests/node_modules/lodash/_baseGetAllKeys.js | 20 + tests/node_modules/lodash/_baseGetTag.js | 28 + tests/node_modules/lodash/_baseGt.js | 14 + tests/node_modules/lodash/_baseHas.js | 19 + tests/node_modules/lodash/_baseHasIn.js | 13 + tests/node_modules/lodash/_baseInRange.js | 18 + tests/node_modules/lodash/_baseIndexOf.js | 20 + tests/node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + tests/node_modules/lodash/_baseInverter.js | 21 + tests/node_modules/lodash/_baseInvoke.js | 24 + tests/node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + tests/node_modules/lodash/_baseIsDate.js | 18 + tests/node_modules/lodash/_baseIsEqual.js | 28 + tests/node_modules/lodash/_baseIsEqualDeep.js | 83 + tests/node_modules/lodash/_baseIsMap.js | 18 + tests/node_modules/lodash/_baseIsMatch.js | 62 + tests/node_modules/lodash/_baseIsNaN.js | 12 + tests/node_modules/lodash/_baseIsNative.js | 47 + tests/node_modules/lodash/_baseIsRegExp.js | 18 + tests/node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + tests/node_modules/lodash/_baseIteratee.js | 31 + tests/node_modules/lodash/_baseKeys.js | 30 + tests/node_modules/lodash/_baseKeysIn.js | 33 + tests/node_modules/lodash/_baseLodash.js | 10 + tests/node_modules/lodash/_baseLt.js | 14 + tests/node_modules/lodash/_baseMap.js | 22 + tests/node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + tests/node_modules/lodash/_baseMean.js | 20 + tests/node_modules/lodash/_baseMerge.js | 42 + tests/node_modules/lodash/_baseMergeDeep.js | 94 + tests/node_modules/lodash/_baseNth.js | 20 + tests/node_modules/lodash/_baseOrderBy.js | 49 + tests/node_modules/lodash/_basePick.js | 19 + tests/node_modules/lodash/_basePickBy.js | 30 + tests/node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + tests/node_modules/lodash/_basePropertyOf.js | 14 + tests/node_modules/lodash/_basePullAll.js | 51 + tests/node_modules/lodash/_basePullAt.js | 37 + tests/node_modules/lodash/_baseRandom.js | 18 + tests/node_modules/lodash/_baseRange.js | 28 + tests/node_modules/lodash/_baseReduce.js | 23 + tests/node_modules/lodash/_baseRepeat.js | 35 + tests/node_modules/lodash/_baseRest.js | 17 + tests/node_modules/lodash/_baseSample.js | 15 + tests/node_modules/lodash/_baseSampleSize.js | 18 + tests/node_modules/lodash/_baseSet.js | 51 + tests/node_modules/lodash/_baseSetData.js | 17 + tests/node_modules/lodash/_baseSetToString.js | 22 + tests/node_modules/lodash/_baseShuffle.js | 15 + tests/node_modules/lodash/_baseSlice.js | 31 + tests/node_modules/lodash/_baseSome.js | 22 + tests/node_modules/lodash/_baseSortBy.js | 21 + tests/node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 67 + tests/node_modules/lodash/_baseSortedUniq.js | 30 + tests/node_modules/lodash/_baseSum.js | 24 + tests/node_modules/lodash/_baseTimes.js | 20 + tests/node_modules/lodash/_baseToNumber.js | 24 + tests/node_modules/lodash/_baseToPairs.js | 18 + tests/node_modules/lodash/_baseToString.js | 37 + tests/node_modules/lodash/_baseTrim.js | 19 + tests/node_modules/lodash/_baseUnary.js | 14 + tests/node_modules/lodash/_baseUniq.js | 72 + tests/node_modules/lodash/_baseUnset.js | 20 + tests/node_modules/lodash/_baseUpdate.js | 18 + tests/node_modules/lodash/_baseValues.js | 19 + tests/node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + tests/node_modules/lodash/_baseXor.js | 36 + tests/node_modules/lodash/_baseZipObject.js | 23 + tests/node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + tests/node_modules/lodash/_castFunction.js | 14 + tests/node_modules/lodash/_castPath.js | 21 + tests/node_modules/lodash/_castRest.js | 14 + tests/node_modules/lodash/_castSlice.js | 18 + tests/node_modules/lodash/_charsEndIndex.js | 19 + tests/node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + tests/node_modules/lodash/_cloneBuffer.js | 35 + tests/node_modules/lodash/_cloneDataView.js | 16 + tests/node_modules/lodash/_cloneRegExp.js | 17 + tests/node_modules/lodash/_cloneSymbol.js | 18 + tests/node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + tests/node_modules/lodash/_compareMultiple.js | 44 + tests/node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + tests/node_modules/lodash/_copyArray.js | 20 + tests/node_modules/lodash/_copyObject.js | 40 + tests/node_modules/lodash/_copySymbols.js | 16 + tests/node_modules/lodash/_copySymbolsIn.js | 16 + tests/node_modules/lodash/_coreJsData.js | 6 + tests/node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + tests/node_modules/lodash/_createAssigner.js | 37 + tests/node_modules/lodash/_createBaseEach.js | 32 + tests/node_modules/lodash/_createBaseFor.js | 25 + tests/node_modules/lodash/_createBind.js | 28 + tests/node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + tests/node_modules/lodash/_createCtor.js | 37 + tests/node_modules/lodash/_createCurry.js | 46 + tests/node_modules/lodash/_createFind.js | 25 + tests/node_modules/lodash/_createFlow.js | 78 + tests/node_modules/lodash/_createHybrid.js | 92 + tests/node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + tests/node_modules/lodash/_createOver.js | 27 + tests/node_modules/lodash/_createPadding.js | 33 + tests/node_modules/lodash/_createPartial.js | 43 + tests/node_modules/lodash/_createRange.js | 30 + tests/node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + tests/node_modules/lodash/_createRound.js | 35 + tests/node_modules/lodash/_createSet.js | 19 + tests/node_modules/lodash/_createToPairs.js | 30 + tests/node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + tests/node_modules/lodash/_customOmitClone.js | 16 + tests/node_modules/lodash/_deburrLetter.js | 71 + tests/node_modules/lodash/_defineProperty.js | 11 + tests/node_modules/lodash/_equalArrays.js | 84 + tests/node_modules/lodash/_equalByTag.js | 112 + tests/node_modules/lodash/_equalObjects.js | 90 + tests/node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + tests/node_modules/lodash/_flatRest.js | 16 + tests/node_modules/lodash/_freeGlobal.js | 4 + tests/node_modules/lodash/_getAllKeys.js | 16 + tests/node_modules/lodash/_getAllKeysIn.js | 17 + tests/node_modules/lodash/_getData.js | 15 + tests/node_modules/lodash/_getFuncName.js | 31 + tests/node_modules/lodash/_getHolder.js | 13 + tests/node_modules/lodash/_getMapData.js | 18 + tests/node_modules/lodash/_getMatchData.js | 24 + tests/node_modules/lodash/_getNative.js | 17 + tests/node_modules/lodash/_getPrototype.js | 6 + tests/node_modules/lodash/_getRawTag.js | 46 + tests/node_modules/lodash/_getSymbols.js | 30 + tests/node_modules/lodash/_getSymbolsIn.js | 25 + tests/node_modules/lodash/_getTag.js | 58 + tests/node_modules/lodash/_getValue.js | 13 + tests/node_modules/lodash/_getView.js | 33 + tests/node_modules/lodash/_getWrapDetails.js | 17 + tests/node_modules/lodash/_hasPath.js | 39 + tests/node_modules/lodash/_hasUnicode.js | 26 + tests/node_modules/lodash/_hasUnicodeWord.js | 15 + tests/node_modules/lodash/_hashClear.js | 15 + tests/node_modules/lodash/_hashDelete.js | 17 + tests/node_modules/lodash/_hashGet.js | 30 + tests/node_modules/lodash/_hashHas.js | 23 + tests/node_modules/lodash/_hashSet.js | 23 + tests/node_modules/lodash/_initCloneArray.js | 26 + tests/node_modules/lodash/_initCloneByTag.js | 77 + tests/node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + tests/node_modules/lodash/_isFlattenable.js | 20 + tests/node_modules/lodash/_isIndex.js | 25 + tests/node_modules/lodash/_isIterateeCall.js | 30 + tests/node_modules/lodash/_isKey.js | 29 + tests/node_modules/lodash/_isKeyable.js | 15 + tests/node_modules/lodash/_isLaziable.js | 28 + tests/node_modules/lodash/_isMaskable.js | 14 + tests/node_modules/lodash/_isMasked.js | 20 + tests/node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + tests/node_modules/lodash/_iteratorToArray.js | 18 + tests/node_modules/lodash/_lazyClone.js | 23 + tests/node_modules/lodash/_lazyReverse.js | 23 + tests/node_modules/lodash/_lazyValue.js | 69 + tests/node_modules/lodash/_listCacheClear.js | 13 + tests/node_modules/lodash/_listCacheDelete.js | 35 + tests/node_modules/lodash/_listCacheGet.js | 19 + tests/node_modules/lodash/_listCacheHas.js | 16 + tests/node_modules/lodash/_listCacheSet.js | 26 + tests/node_modules/lodash/_mapCacheClear.js | 21 + tests/node_modules/lodash/_mapCacheDelete.js | 18 + tests/node_modules/lodash/_mapCacheGet.js | 16 + tests/node_modules/lodash/_mapCacheHas.js | 16 + tests/node_modules/lodash/_mapCacheSet.js | 22 + tests/node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + tests/node_modules/lodash/_memoizeCapped.js | 26 + tests/node_modules/lodash/_mergeData.js | 90 + tests/node_modules/lodash/_metaMap.js | 6 + tests/node_modules/lodash/_nativeCreate.js | 6 + tests/node_modules/lodash/_nativeKeys.js | 6 + tests/node_modules/lodash/_nativeKeysIn.js | 20 + tests/node_modules/lodash/_nodeUtil.js | 30 + tests/node_modules/lodash/_objectToString.js | 22 + tests/node_modules/lodash/_overArg.js | 15 + tests/node_modules/lodash/_overRest.js | 36 + tests/node_modules/lodash/_parent.js | 16 + tests/node_modules/lodash/_reEscape.js | 4 + tests/node_modules/lodash/_reEvaluate.js | 4 + tests/node_modules/lodash/_reInterpolate.js | 4 + tests/node_modules/lodash/_realNames.js | 4 + tests/node_modules/lodash/_reorder.js | 29 + tests/node_modules/lodash/_replaceHolders.js | 29 + tests/node_modules/lodash/_root.js | 9 + tests/node_modules/lodash/_safeGet.js | 21 + tests/node_modules/lodash/_setCacheAdd.js | 19 + tests/node_modules/lodash/_setCacheHas.js | 14 + tests/node_modules/lodash/_setData.js | 20 + tests/node_modules/lodash/_setToArray.js | 18 + tests/node_modules/lodash/_setToPairs.js | 18 + tests/node_modules/lodash/_setToString.js | 14 + tests/node_modules/lodash/_setWrapToString.js | 21 + tests/node_modules/lodash/_shortOut.js | 37 + tests/node_modules/lodash/_shuffleSelf.js | 28 + tests/node_modules/lodash/_stackClear.js | 15 + tests/node_modules/lodash/_stackDelete.js | 18 + tests/node_modules/lodash/_stackGet.js | 14 + tests/node_modules/lodash/_stackHas.js | 14 + tests/node_modules/lodash/_stackSet.js | 34 + tests/node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + tests/node_modules/lodash/_stringSize.js | 18 + tests/node_modules/lodash/_stringToArray.js | 18 + tests/node_modules/lodash/_stringToPath.js | 27 + tests/node_modules/lodash/_toKey.js | 21 + tests/node_modules/lodash/_toSource.js | 26 + tests/node_modules/lodash/_trimmedEndIndex.js | 19 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + tests/node_modules/lodash/_unicodeSize.js | 44 + tests/node_modules/lodash/_unicodeToArray.js | 40 + tests/node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + tests/node_modules/lodash/_wrapperClone.js | 23 + tests/node_modules/lodash/add.js | 22 + tests/node_modules/lodash/after.js | 42 + tests/node_modules/lodash/array.js | 67 + tests/node_modules/lodash/ary.js | 29 + tests/node_modules/lodash/assign.js | 58 + tests/node_modules/lodash/assignIn.js | 40 + tests/node_modules/lodash/assignInWith.js | 38 + tests/node_modules/lodash/assignWith.js | 37 + tests/node_modules/lodash/at.js | 23 + tests/node_modules/lodash/attempt.js | 35 + tests/node_modules/lodash/before.js | 40 + tests/node_modules/lodash/bind.js | 57 + tests/node_modules/lodash/bindAll.js | 41 + tests/node_modules/lodash/bindKey.js | 68 + tests/node_modules/lodash/camelCase.js | 29 + tests/node_modules/lodash/capitalize.js | 23 + tests/node_modules/lodash/castArray.js | 44 + tests/node_modules/lodash/ceil.js | 26 + tests/node_modules/lodash/chain.js | 38 + tests/node_modules/lodash/chunk.js | 50 + tests/node_modules/lodash/clamp.js | 39 + tests/node_modules/lodash/clone.js | 36 + tests/node_modules/lodash/cloneDeep.js | 29 + tests/node_modules/lodash/cloneDeepWith.js | 40 + tests/node_modules/lodash/cloneWith.js | 42 + tests/node_modules/lodash/collection.js | 30 + tests/node_modules/lodash/commit.js | 33 + tests/node_modules/lodash/compact.js | 31 + tests/node_modules/lodash/concat.js | 43 + tests/node_modules/lodash/cond.js | 60 + tests/node_modules/lodash/conforms.js | 35 + tests/node_modules/lodash/conformsTo.js | 32 + tests/node_modules/lodash/constant.js | 26 + tests/node_modules/lodash/core.js | 3877 ++ tests/node_modules/lodash/core.min.js | 29 + tests/node_modules/lodash/countBy.js | 40 + tests/node_modules/lodash/create.js | 43 + tests/node_modules/lodash/curry.js | 57 + tests/node_modules/lodash/curryRight.js | 54 + tests/node_modules/lodash/date.js | 3 + tests/node_modules/lodash/debounce.js | 191 + tests/node_modules/lodash/deburr.js | 45 + tests/node_modules/lodash/defaultTo.js | 25 + tests/node_modules/lodash/defaults.js | 64 + tests/node_modules/lodash/defaultsDeep.js | 30 + tests/node_modules/lodash/defer.js | 26 + tests/node_modules/lodash/delay.js | 28 + tests/node_modules/lodash/difference.js | 33 + tests/node_modules/lodash/differenceBy.js | 44 + tests/node_modules/lodash/differenceWith.js | 40 + tests/node_modules/lodash/divide.js | 22 + tests/node_modules/lodash/drop.js | 38 + tests/node_modules/lodash/dropRight.js | 39 + tests/node_modules/lodash/dropRightWhile.js | 45 + tests/node_modules/lodash/dropWhile.js | 45 + tests/node_modules/lodash/each.js | 1 + tests/node_modules/lodash/eachRight.js | 1 + tests/node_modules/lodash/endsWith.js | 43 + tests/node_modules/lodash/entries.js | 1 + tests/node_modules/lodash/entriesIn.js | 1 + tests/node_modules/lodash/eq.js | 37 + tests/node_modules/lodash/escape.js | 43 + tests/node_modules/lodash/escapeRegExp.js | 32 + tests/node_modules/lodash/every.js | 56 + tests/node_modules/lodash/extend.js | 1 + tests/node_modules/lodash/extendWith.js | 1 + tests/node_modules/lodash/fill.js | 45 + tests/node_modules/lodash/filter.js | 52 + tests/node_modules/lodash/find.js | 42 + tests/node_modules/lodash/findIndex.js | 55 + tests/node_modules/lodash/findKey.js | 44 + tests/node_modules/lodash/findLast.js | 25 + tests/node_modules/lodash/findLastIndex.js | 59 + tests/node_modules/lodash/findLastKey.js | 44 + tests/node_modules/lodash/first.js | 1 + tests/node_modules/lodash/flake.lock | 40 + tests/node_modules/lodash/flake.nix | 20 + tests/node_modules/lodash/flatMap.js | 29 + tests/node_modules/lodash/flatMapDeep.js | 31 + tests/node_modules/lodash/flatMapDepth.js | 31 + tests/node_modules/lodash/flatten.js | 22 + tests/node_modules/lodash/flattenDeep.js | 25 + tests/node_modules/lodash/flattenDepth.js | 33 + tests/node_modules/lodash/flip.js | 28 + tests/node_modules/lodash/floor.js | 26 + tests/node_modules/lodash/flow.js | 27 + tests/node_modules/lodash/flowRight.js | 26 + tests/node_modules/lodash/forEach.js | 41 + tests/node_modules/lodash/forEachRight.js | 31 + tests/node_modules/lodash/forIn.js | 39 + tests/node_modules/lodash/forInRight.js | 37 + tests/node_modules/lodash/forOwn.js | 36 + tests/node_modules/lodash/forOwnRight.js | 34 + tests/node_modules/lodash/fp.js | 2 + tests/node_modules/lodash/fp/F.js | 1 + tests/node_modules/lodash/fp/T.js | 1 + tests/node_modules/lodash/fp/__.js | 1 + tests/node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + tests/node_modules/lodash/fp/_falseOptions.js | 7 + tests/node_modules/lodash/fp/_mapping.js | 358 + tests/node_modules/lodash/fp/_util.js | 16 + tests/node_modules/lodash/fp/add.js | 5 + tests/node_modules/lodash/fp/after.js | 5 + tests/node_modules/lodash/fp/all.js | 1 + tests/node_modules/lodash/fp/allPass.js | 1 + tests/node_modules/lodash/fp/always.js | 1 + tests/node_modules/lodash/fp/any.js | 1 + tests/node_modules/lodash/fp/anyPass.js | 1 + tests/node_modules/lodash/fp/apply.js | 1 + tests/node_modules/lodash/fp/array.js | 2 + tests/node_modules/lodash/fp/ary.js | 5 + tests/node_modules/lodash/fp/assign.js | 5 + tests/node_modules/lodash/fp/assignAll.js | 5 + tests/node_modules/lodash/fp/assignAllWith.js | 5 + tests/node_modules/lodash/fp/assignIn.js | 5 + tests/node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + tests/node_modules/lodash/fp/assignInWith.js | 5 + tests/node_modules/lodash/fp/assignWith.js | 5 + tests/node_modules/lodash/fp/assoc.js | 1 + tests/node_modules/lodash/fp/assocPath.js | 1 + tests/node_modules/lodash/fp/at.js | 5 + tests/node_modules/lodash/fp/attempt.js | 5 + tests/node_modules/lodash/fp/before.js | 5 + tests/node_modules/lodash/fp/bind.js | 5 + tests/node_modules/lodash/fp/bindAll.js | 5 + tests/node_modules/lodash/fp/bindKey.js | 5 + tests/node_modules/lodash/fp/camelCase.js | 5 + tests/node_modules/lodash/fp/capitalize.js | 5 + tests/node_modules/lodash/fp/castArray.js | 5 + tests/node_modules/lodash/fp/ceil.js | 5 + tests/node_modules/lodash/fp/chain.js | 5 + tests/node_modules/lodash/fp/chunk.js | 5 + tests/node_modules/lodash/fp/clamp.js | 5 + tests/node_modules/lodash/fp/clone.js | 5 + tests/node_modules/lodash/fp/cloneDeep.js | 5 + tests/node_modules/lodash/fp/cloneDeepWith.js | 5 + tests/node_modules/lodash/fp/cloneWith.js | 5 + tests/node_modules/lodash/fp/collection.js | 2 + tests/node_modules/lodash/fp/commit.js | 5 + tests/node_modules/lodash/fp/compact.js | 5 + tests/node_modules/lodash/fp/complement.js | 1 + tests/node_modules/lodash/fp/compose.js | 1 + tests/node_modules/lodash/fp/concat.js | 5 + tests/node_modules/lodash/fp/cond.js | 5 + tests/node_modules/lodash/fp/conforms.js | 1 + tests/node_modules/lodash/fp/conformsTo.js | 5 + tests/node_modules/lodash/fp/constant.js | 5 + tests/node_modules/lodash/fp/contains.js | 1 + tests/node_modules/lodash/fp/convert.js | 18 + tests/node_modules/lodash/fp/countBy.js | 5 + tests/node_modules/lodash/fp/create.js | 5 + tests/node_modules/lodash/fp/curry.js | 5 + tests/node_modules/lodash/fp/curryN.js | 5 + tests/node_modules/lodash/fp/curryRight.js | 5 + tests/node_modules/lodash/fp/curryRightN.js | 5 + tests/node_modules/lodash/fp/date.js | 2 + tests/node_modules/lodash/fp/debounce.js | 5 + tests/node_modules/lodash/fp/deburr.js | 5 + tests/node_modules/lodash/fp/defaultTo.js | 5 + tests/node_modules/lodash/fp/defaults.js | 5 + tests/node_modules/lodash/fp/defaultsAll.js | 5 + tests/node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + tests/node_modules/lodash/fp/defer.js | 5 + tests/node_modules/lodash/fp/delay.js | 5 + tests/node_modules/lodash/fp/difference.js | 5 + tests/node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + tests/node_modules/lodash/fp/dissoc.js | 1 + tests/node_modules/lodash/fp/dissocPath.js | 1 + tests/node_modules/lodash/fp/divide.js | 5 + tests/node_modules/lodash/fp/drop.js | 5 + tests/node_modules/lodash/fp/dropLast.js | 1 + tests/node_modules/lodash/fp/dropLastWhile.js | 1 + tests/node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + tests/node_modules/lodash/fp/dropWhile.js | 5 + tests/node_modules/lodash/fp/each.js | 1 + tests/node_modules/lodash/fp/eachRight.js | 1 + tests/node_modules/lodash/fp/endsWith.js | 5 + tests/node_modules/lodash/fp/entries.js | 1 + tests/node_modules/lodash/fp/entriesIn.js | 1 + tests/node_modules/lodash/fp/eq.js | 5 + tests/node_modules/lodash/fp/equals.js | 1 + tests/node_modules/lodash/fp/escape.js | 5 + tests/node_modules/lodash/fp/escapeRegExp.js | 5 + tests/node_modules/lodash/fp/every.js | 5 + tests/node_modules/lodash/fp/extend.js | 1 + tests/node_modules/lodash/fp/extendAll.js | 1 + tests/node_modules/lodash/fp/extendAllWith.js | 1 + tests/node_modules/lodash/fp/extendWith.js | 1 + tests/node_modules/lodash/fp/fill.js | 5 + tests/node_modules/lodash/fp/filter.js | 5 + tests/node_modules/lodash/fp/find.js | 5 + tests/node_modules/lodash/fp/findFrom.js | 5 + tests/node_modules/lodash/fp/findIndex.js | 5 + tests/node_modules/lodash/fp/findIndexFrom.js | 5 + tests/node_modules/lodash/fp/findKey.js | 5 + tests/node_modules/lodash/fp/findLast.js | 5 + tests/node_modules/lodash/fp/findLastFrom.js | 5 + tests/node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + tests/node_modules/lodash/fp/findLastKey.js | 5 + tests/node_modules/lodash/fp/first.js | 1 + tests/node_modules/lodash/fp/flatMap.js | 5 + tests/node_modules/lodash/fp/flatMapDeep.js | 5 + tests/node_modules/lodash/fp/flatMapDepth.js | 5 + tests/node_modules/lodash/fp/flatten.js | 5 + tests/node_modules/lodash/fp/flattenDeep.js | 5 + tests/node_modules/lodash/fp/flattenDepth.js | 5 + tests/node_modules/lodash/fp/flip.js | 5 + tests/node_modules/lodash/fp/floor.js | 5 + tests/node_modules/lodash/fp/flow.js | 5 + tests/node_modules/lodash/fp/flowRight.js | 5 + tests/node_modules/lodash/fp/forEach.js | 5 + tests/node_modules/lodash/fp/forEachRight.js | 5 + tests/node_modules/lodash/fp/forIn.js | 5 + tests/node_modules/lodash/fp/forInRight.js | 5 + tests/node_modules/lodash/fp/forOwn.js | 5 + tests/node_modules/lodash/fp/forOwnRight.js | 5 + tests/node_modules/lodash/fp/fromPairs.js | 5 + tests/node_modules/lodash/fp/function.js | 2 + tests/node_modules/lodash/fp/functions.js | 5 + tests/node_modules/lodash/fp/functionsIn.js | 5 + tests/node_modules/lodash/fp/get.js | 5 + tests/node_modules/lodash/fp/getOr.js | 5 + tests/node_modules/lodash/fp/groupBy.js | 5 + tests/node_modules/lodash/fp/gt.js | 5 + tests/node_modules/lodash/fp/gte.js | 5 + tests/node_modules/lodash/fp/has.js | 5 + tests/node_modules/lodash/fp/hasIn.js | 5 + tests/node_modules/lodash/fp/head.js | 5 + tests/node_modules/lodash/fp/identical.js | 1 + tests/node_modules/lodash/fp/identity.js | 5 + tests/node_modules/lodash/fp/inRange.js | 5 + tests/node_modules/lodash/fp/includes.js | 5 + tests/node_modules/lodash/fp/includesFrom.js | 5 + tests/node_modules/lodash/fp/indexBy.js | 1 + tests/node_modules/lodash/fp/indexOf.js | 5 + tests/node_modules/lodash/fp/indexOfFrom.js | 5 + tests/node_modules/lodash/fp/init.js | 1 + tests/node_modules/lodash/fp/initial.js | 5 + tests/node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + tests/node_modules/lodash/fp/invert.js | 5 + tests/node_modules/lodash/fp/invertBy.js | 5 + tests/node_modules/lodash/fp/invertObj.js | 1 + tests/node_modules/lodash/fp/invoke.js | 5 + tests/node_modules/lodash/fp/invokeArgs.js | 5 + tests/node_modules/lodash/fp/invokeArgsMap.js | 5 + tests/node_modules/lodash/fp/invokeMap.js | 5 + tests/node_modules/lodash/fp/isArguments.js | 5 + tests/node_modules/lodash/fp/isArray.js | 5 + tests/node_modules/lodash/fp/isArrayBuffer.js | 5 + tests/node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + tests/node_modules/lodash/fp/isBoolean.js | 5 + tests/node_modules/lodash/fp/isBuffer.js | 5 + tests/node_modules/lodash/fp/isDate.js | 5 + tests/node_modules/lodash/fp/isElement.js | 5 + tests/node_modules/lodash/fp/isEmpty.js | 5 + tests/node_modules/lodash/fp/isEqual.js | 5 + tests/node_modules/lodash/fp/isEqualWith.js | 5 + tests/node_modules/lodash/fp/isError.js | 5 + tests/node_modules/lodash/fp/isFinite.js | 5 + tests/node_modules/lodash/fp/isFunction.js | 5 + tests/node_modules/lodash/fp/isInteger.js | 5 + tests/node_modules/lodash/fp/isLength.js | 5 + tests/node_modules/lodash/fp/isMap.js | 5 + tests/node_modules/lodash/fp/isMatch.js | 5 + tests/node_modules/lodash/fp/isMatchWith.js | 5 + tests/node_modules/lodash/fp/isNaN.js | 5 + tests/node_modules/lodash/fp/isNative.js | 5 + tests/node_modules/lodash/fp/isNil.js | 5 + tests/node_modules/lodash/fp/isNull.js | 5 + tests/node_modules/lodash/fp/isNumber.js | 5 + tests/node_modules/lodash/fp/isObject.js | 5 + tests/node_modules/lodash/fp/isObjectLike.js | 5 + tests/node_modules/lodash/fp/isPlainObject.js | 5 + tests/node_modules/lodash/fp/isRegExp.js | 5 + tests/node_modules/lodash/fp/isSafeInteger.js | 5 + tests/node_modules/lodash/fp/isSet.js | 5 + tests/node_modules/lodash/fp/isString.js | 5 + tests/node_modules/lodash/fp/isSymbol.js | 5 + tests/node_modules/lodash/fp/isTypedArray.js | 5 + tests/node_modules/lodash/fp/isUndefined.js | 5 + tests/node_modules/lodash/fp/isWeakMap.js | 5 + tests/node_modules/lodash/fp/isWeakSet.js | 5 + tests/node_modules/lodash/fp/iteratee.js | 5 + tests/node_modules/lodash/fp/join.js | 5 + tests/node_modules/lodash/fp/juxt.js | 1 + tests/node_modules/lodash/fp/kebabCase.js | 5 + tests/node_modules/lodash/fp/keyBy.js | 5 + tests/node_modules/lodash/fp/keys.js | 5 + tests/node_modules/lodash/fp/keysIn.js | 5 + tests/node_modules/lodash/fp/lang.js | 2 + tests/node_modules/lodash/fp/last.js | 5 + tests/node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + tests/node_modules/lodash/fp/lowerCase.js | 5 + tests/node_modules/lodash/fp/lowerFirst.js | 5 + tests/node_modules/lodash/fp/lt.js | 5 + tests/node_modules/lodash/fp/lte.js | 5 + tests/node_modules/lodash/fp/map.js | 5 + tests/node_modules/lodash/fp/mapKeys.js | 5 + tests/node_modules/lodash/fp/mapValues.js | 5 + tests/node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + tests/node_modules/lodash/fp/math.js | 2 + tests/node_modules/lodash/fp/max.js | 5 + tests/node_modules/lodash/fp/maxBy.js | 5 + tests/node_modules/lodash/fp/mean.js | 5 + tests/node_modules/lodash/fp/meanBy.js | 5 + tests/node_modules/lodash/fp/memoize.js | 5 + tests/node_modules/lodash/fp/merge.js | 5 + tests/node_modules/lodash/fp/mergeAll.js | 5 + tests/node_modules/lodash/fp/mergeAllWith.js | 5 + tests/node_modules/lodash/fp/mergeWith.js | 5 + tests/node_modules/lodash/fp/method.js | 5 + tests/node_modules/lodash/fp/methodOf.js | 5 + tests/node_modules/lodash/fp/min.js | 5 + tests/node_modules/lodash/fp/minBy.js | 5 + tests/node_modules/lodash/fp/mixin.js | 5 + tests/node_modules/lodash/fp/multiply.js | 5 + tests/node_modules/lodash/fp/nAry.js | 1 + tests/node_modules/lodash/fp/negate.js | 5 + tests/node_modules/lodash/fp/next.js | 5 + tests/node_modules/lodash/fp/noop.js | 5 + tests/node_modules/lodash/fp/now.js | 5 + tests/node_modules/lodash/fp/nth.js | 5 + tests/node_modules/lodash/fp/nthArg.js | 5 + tests/node_modules/lodash/fp/number.js | 2 + tests/node_modules/lodash/fp/object.js | 2 + tests/node_modules/lodash/fp/omit.js | 5 + tests/node_modules/lodash/fp/omitAll.js | 1 + tests/node_modules/lodash/fp/omitBy.js | 5 + tests/node_modules/lodash/fp/once.js | 5 + tests/node_modules/lodash/fp/orderBy.js | 5 + tests/node_modules/lodash/fp/over.js | 5 + tests/node_modules/lodash/fp/overArgs.js | 5 + tests/node_modules/lodash/fp/overEvery.js | 5 + tests/node_modules/lodash/fp/overSome.js | 5 + tests/node_modules/lodash/fp/pad.js | 5 + tests/node_modules/lodash/fp/padChars.js | 5 + tests/node_modules/lodash/fp/padCharsEnd.js | 5 + tests/node_modules/lodash/fp/padCharsStart.js | 5 + tests/node_modules/lodash/fp/padEnd.js | 5 + tests/node_modules/lodash/fp/padStart.js | 5 + tests/node_modules/lodash/fp/parseInt.js | 5 + tests/node_modules/lodash/fp/partial.js | 5 + tests/node_modules/lodash/fp/partialRight.js | 5 + tests/node_modules/lodash/fp/partition.js | 5 + tests/node_modules/lodash/fp/path.js | 1 + tests/node_modules/lodash/fp/pathEq.js | 1 + tests/node_modules/lodash/fp/pathOr.js | 1 + tests/node_modules/lodash/fp/paths.js | 1 + tests/node_modules/lodash/fp/pick.js | 5 + tests/node_modules/lodash/fp/pickAll.js | 1 + tests/node_modules/lodash/fp/pickBy.js | 5 + tests/node_modules/lodash/fp/pipe.js | 1 + tests/node_modules/lodash/fp/placeholder.js | 6 + tests/node_modules/lodash/fp/plant.js | 5 + tests/node_modules/lodash/fp/pluck.js | 1 + tests/node_modules/lodash/fp/prop.js | 1 + tests/node_modules/lodash/fp/propEq.js | 1 + tests/node_modules/lodash/fp/propOr.js | 1 + tests/node_modules/lodash/fp/property.js | 1 + tests/node_modules/lodash/fp/propertyOf.js | 5 + tests/node_modules/lodash/fp/props.js | 1 + tests/node_modules/lodash/fp/pull.js | 5 + tests/node_modules/lodash/fp/pullAll.js | 5 + tests/node_modules/lodash/fp/pullAllBy.js | 5 + tests/node_modules/lodash/fp/pullAllWith.js | 5 + tests/node_modules/lodash/fp/pullAt.js | 5 + tests/node_modules/lodash/fp/random.js | 5 + tests/node_modules/lodash/fp/range.js | 5 + tests/node_modules/lodash/fp/rangeRight.js | 5 + tests/node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + tests/node_modules/lodash/fp/rearg.js | 5 + tests/node_modules/lodash/fp/reduce.js | 5 + tests/node_modules/lodash/fp/reduceRight.js | 5 + tests/node_modules/lodash/fp/reject.js | 5 + tests/node_modules/lodash/fp/remove.js | 5 + tests/node_modules/lodash/fp/repeat.js | 5 + tests/node_modules/lodash/fp/replace.js | 5 + tests/node_modules/lodash/fp/rest.js | 5 + tests/node_modules/lodash/fp/restFrom.js | 5 + tests/node_modules/lodash/fp/result.js | 5 + tests/node_modules/lodash/fp/reverse.js | 5 + tests/node_modules/lodash/fp/round.js | 5 + tests/node_modules/lodash/fp/sample.js | 5 + tests/node_modules/lodash/fp/sampleSize.js | 5 + tests/node_modules/lodash/fp/seq.js | 2 + tests/node_modules/lodash/fp/set.js | 5 + tests/node_modules/lodash/fp/setWith.js | 5 + tests/node_modules/lodash/fp/shuffle.js | 5 + tests/node_modules/lodash/fp/size.js | 5 + tests/node_modules/lodash/fp/slice.js | 5 + tests/node_modules/lodash/fp/snakeCase.js | 5 + tests/node_modules/lodash/fp/some.js | 5 + tests/node_modules/lodash/fp/sortBy.js | 5 + tests/node_modules/lodash/fp/sortedIndex.js | 5 + tests/node_modules/lodash/fp/sortedIndexBy.js | 5 + tests/node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + tests/node_modules/lodash/fp/sortedUniq.js | 5 + tests/node_modules/lodash/fp/sortedUniqBy.js | 5 + tests/node_modules/lodash/fp/split.js | 5 + tests/node_modules/lodash/fp/spread.js | 5 + tests/node_modules/lodash/fp/spreadFrom.js | 5 + tests/node_modules/lodash/fp/startCase.js | 5 + tests/node_modules/lodash/fp/startsWith.js | 5 + tests/node_modules/lodash/fp/string.js | 2 + tests/node_modules/lodash/fp/stubArray.js | 5 + tests/node_modules/lodash/fp/stubFalse.js | 5 + tests/node_modules/lodash/fp/stubObject.js | 5 + tests/node_modules/lodash/fp/stubString.js | 5 + tests/node_modules/lodash/fp/stubTrue.js | 5 + tests/node_modules/lodash/fp/subtract.js | 5 + tests/node_modules/lodash/fp/sum.js | 5 + tests/node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + tests/node_modules/lodash/fp/tail.js | 5 + tests/node_modules/lodash/fp/take.js | 5 + tests/node_modules/lodash/fp/takeLast.js | 1 + tests/node_modules/lodash/fp/takeLastWhile.js | 1 + tests/node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + tests/node_modules/lodash/fp/takeWhile.js | 5 + tests/node_modules/lodash/fp/tap.js | 5 + tests/node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + tests/node_modules/lodash/fp/throttle.js | 5 + tests/node_modules/lodash/fp/thru.js | 5 + tests/node_modules/lodash/fp/times.js | 5 + tests/node_modules/lodash/fp/toArray.js | 5 + tests/node_modules/lodash/fp/toFinite.js | 5 + tests/node_modules/lodash/fp/toInteger.js | 5 + tests/node_modules/lodash/fp/toIterator.js | 5 + tests/node_modules/lodash/fp/toJSON.js | 5 + tests/node_modules/lodash/fp/toLength.js | 5 + tests/node_modules/lodash/fp/toLower.js | 5 + tests/node_modules/lodash/fp/toNumber.js | 5 + tests/node_modules/lodash/fp/toPairs.js | 5 + tests/node_modules/lodash/fp/toPairsIn.js | 5 + tests/node_modules/lodash/fp/toPath.js | 5 + tests/node_modules/lodash/fp/toPlainObject.js | 5 + tests/node_modules/lodash/fp/toSafeInteger.js | 5 + tests/node_modules/lodash/fp/toString.js | 5 + tests/node_modules/lodash/fp/toUpper.js | 5 + tests/node_modules/lodash/fp/transform.js | 5 + tests/node_modules/lodash/fp/trim.js | 5 + tests/node_modules/lodash/fp/trimChars.js | 5 + tests/node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + tests/node_modules/lodash/fp/trimEnd.js | 5 + tests/node_modules/lodash/fp/trimStart.js | 5 + tests/node_modules/lodash/fp/truncate.js | 5 + tests/node_modules/lodash/fp/unapply.js | 1 + tests/node_modules/lodash/fp/unary.js | 5 + tests/node_modules/lodash/fp/unescape.js | 5 + tests/node_modules/lodash/fp/union.js | 5 + tests/node_modules/lodash/fp/unionBy.js | 5 + tests/node_modules/lodash/fp/unionWith.js | 5 + tests/node_modules/lodash/fp/uniq.js | 5 + tests/node_modules/lodash/fp/uniqBy.js | 5 + tests/node_modules/lodash/fp/uniqWith.js | 5 + tests/node_modules/lodash/fp/uniqueId.js | 5 + tests/node_modules/lodash/fp/unnest.js | 1 + tests/node_modules/lodash/fp/unset.js | 5 + tests/node_modules/lodash/fp/unzip.js | 5 + tests/node_modules/lodash/fp/unzipWith.js | 5 + tests/node_modules/lodash/fp/update.js | 5 + tests/node_modules/lodash/fp/updateWith.js | 5 + tests/node_modules/lodash/fp/upperCase.js | 5 + tests/node_modules/lodash/fp/upperFirst.js | 5 + tests/node_modules/lodash/fp/useWith.js | 1 + tests/node_modules/lodash/fp/util.js | 2 + tests/node_modules/lodash/fp/value.js | 5 + tests/node_modules/lodash/fp/valueOf.js | 5 + tests/node_modules/lodash/fp/values.js | 5 + tests/node_modules/lodash/fp/valuesIn.js | 5 + tests/node_modules/lodash/fp/where.js | 1 + tests/node_modules/lodash/fp/whereEq.js | 1 + tests/node_modules/lodash/fp/without.js | 5 + tests/node_modules/lodash/fp/words.js | 5 + tests/node_modules/lodash/fp/wrap.js | 5 + tests/node_modules/lodash/fp/wrapperAt.js | 5 + tests/node_modules/lodash/fp/wrapperChain.js | 5 + tests/node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + tests/node_modules/lodash/fp/wrapperValue.js | 5 + tests/node_modules/lodash/fp/xor.js | 5 + tests/node_modules/lodash/fp/xorBy.js | 5 + tests/node_modules/lodash/fp/xorWith.js | 5 + tests/node_modules/lodash/fp/zip.js | 5 + tests/node_modules/lodash/fp/zipAll.js | 5 + tests/node_modules/lodash/fp/zipObj.js | 1 + tests/node_modules/lodash/fp/zipObject.js | 5 + tests/node_modules/lodash/fp/zipObjectDeep.js | 5 + tests/node_modules/lodash/fp/zipWith.js | 5 + tests/node_modules/lodash/fromPairs.js | 28 + tests/node_modules/lodash/function.js | 25 + tests/node_modules/lodash/functions.js | 31 + tests/node_modules/lodash/functionsIn.js | 31 + tests/node_modules/lodash/get.js | 33 + tests/node_modules/lodash/groupBy.js | 41 + tests/node_modules/lodash/gt.js | 29 + tests/node_modules/lodash/gte.js | 30 + tests/node_modules/lodash/has.js | 35 + tests/node_modules/lodash/hasIn.js | 34 + tests/node_modules/lodash/head.js | 23 + tests/node_modules/lodash/identity.js | 21 + tests/node_modules/lodash/inRange.js | 55 + tests/node_modules/lodash/includes.js | 53 + tests/node_modules/lodash/index.js | 1 + tests/node_modules/lodash/indexOf.js | 42 + tests/node_modules/lodash/initial.js | 22 + tests/node_modules/lodash/intersection.js | 30 + tests/node_modules/lodash/intersectionBy.js | 45 + tests/node_modules/lodash/intersectionWith.js | 41 + tests/node_modules/lodash/invert.js | 42 + tests/node_modules/lodash/invertBy.js | 56 + tests/node_modules/lodash/invoke.js | 24 + tests/node_modules/lodash/invokeMap.js | 41 + tests/node_modules/lodash/isArguments.js | 36 + tests/node_modules/lodash/isArray.js | 26 + tests/node_modules/lodash/isArrayBuffer.js | 27 + tests/node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + tests/node_modules/lodash/isBoolean.js | 29 + tests/node_modules/lodash/isBuffer.js | 38 + tests/node_modules/lodash/isDate.js | 27 + tests/node_modules/lodash/isElement.js | 25 + tests/node_modules/lodash/isEmpty.js | 77 + tests/node_modules/lodash/isEqual.js | 35 + tests/node_modules/lodash/isEqualWith.js | 41 + tests/node_modules/lodash/isError.js | 36 + tests/node_modules/lodash/isFinite.js | 36 + tests/node_modules/lodash/isFunction.js | 37 + tests/node_modules/lodash/isInteger.js | 33 + tests/node_modules/lodash/isLength.js | 35 + tests/node_modules/lodash/isMap.js | 27 + tests/node_modules/lodash/isMatch.js | 36 + tests/node_modules/lodash/isMatchWith.js | 41 + tests/node_modules/lodash/isNaN.js | 38 + tests/node_modules/lodash/isNative.js | 40 + tests/node_modules/lodash/isNil.js | 25 + tests/node_modules/lodash/isNull.js | 22 + tests/node_modules/lodash/isNumber.js | 38 + tests/node_modules/lodash/isObject.js | 31 + tests/node_modules/lodash/isObjectLike.js | 29 + tests/node_modules/lodash/isPlainObject.js | 62 + tests/node_modules/lodash/isRegExp.js | 27 + tests/node_modules/lodash/isSafeInteger.js | 37 + tests/node_modules/lodash/isSet.js | 27 + tests/node_modules/lodash/isString.js | 30 + tests/node_modules/lodash/isSymbol.js | 29 + tests/node_modules/lodash/isTypedArray.js | 27 + tests/node_modules/lodash/isUndefined.js | 22 + tests/node_modules/lodash/isWeakMap.js | 28 + tests/node_modules/lodash/isWeakSet.js | 28 + tests/node_modules/lodash/iteratee.js | 53 + tests/node_modules/lodash/join.js | 26 + tests/node_modules/lodash/kebabCase.js | 28 + tests/node_modules/lodash/keyBy.js | 36 + tests/node_modules/lodash/keys.js | 37 + tests/node_modules/lodash/keysIn.js | 32 + tests/node_modules/lodash/lang.js | 58 + tests/node_modules/lodash/last.js | 20 + tests/node_modules/lodash/lastIndexOf.js | 46 + tests/node_modules/lodash/lodash.js | 17209 +++++++++ tests/node_modules/lodash/lodash.min.js | 140 + tests/node_modules/lodash/lowerCase.js | 27 + tests/node_modules/lodash/lowerFirst.js | 22 + tests/node_modules/lodash/lt.js | 29 + tests/node_modules/lodash/lte.js | 30 + tests/node_modules/lodash/map.js | 53 + tests/node_modules/lodash/mapKeys.js | 36 + tests/node_modules/lodash/mapValues.js | 43 + tests/node_modules/lodash/matches.js | 46 + tests/node_modules/lodash/matchesProperty.js | 44 + tests/node_modules/lodash/math.js | 17 + tests/node_modules/lodash/max.js | 29 + tests/node_modules/lodash/maxBy.js | 34 + tests/node_modules/lodash/mean.js | 22 + tests/node_modules/lodash/meanBy.js | 31 + tests/node_modules/lodash/memoize.js | 73 + tests/node_modules/lodash/merge.js | 39 + tests/node_modules/lodash/mergeWith.js | 39 + tests/node_modules/lodash/method.js | 34 + tests/node_modules/lodash/methodOf.js | 33 + tests/node_modules/lodash/min.js | 29 + tests/node_modules/lodash/minBy.js | 34 + tests/node_modules/lodash/mixin.js | 74 + tests/node_modules/lodash/multiply.js | 22 + tests/node_modules/lodash/negate.js | 40 + tests/node_modules/lodash/next.js | 35 + tests/node_modules/lodash/noop.js | 17 + tests/node_modules/lodash/now.js | 23 + tests/node_modules/lodash/nth.js | 29 + tests/node_modules/lodash/nthArg.js | 32 + tests/node_modules/lodash/number.js | 5 + tests/node_modules/lodash/object.js | 49 + tests/node_modules/lodash/omit.js | 57 + tests/node_modules/lodash/omitBy.js | 29 + tests/node_modules/lodash/once.js | 25 + tests/node_modules/lodash/orderBy.js | 47 + tests/node_modules/lodash/over.js | 24 + tests/node_modules/lodash/overArgs.js | 61 + tests/node_modules/lodash/overEvery.js | 34 + tests/node_modules/lodash/overSome.js | 37 + tests/node_modules/lodash/package.json | 17 + tests/node_modules/lodash/pad.js | 49 + tests/node_modules/lodash/padEnd.js | 39 + tests/node_modules/lodash/padStart.js | 39 + tests/node_modules/lodash/parseInt.js | 43 + tests/node_modules/lodash/partial.js | 50 + tests/node_modules/lodash/partialRight.js | 49 + tests/node_modules/lodash/partition.js | 43 + tests/node_modules/lodash/pick.js | 25 + tests/node_modules/lodash/pickBy.js | 37 + tests/node_modules/lodash/plant.js | 48 + tests/node_modules/lodash/property.js | 32 + tests/node_modules/lodash/propertyOf.js | 30 + tests/node_modules/lodash/pull.js | 29 + tests/node_modules/lodash/pullAll.js | 29 + tests/node_modules/lodash/pullAllBy.js | 33 + tests/node_modules/lodash/pullAllWith.js | 32 + tests/node_modules/lodash/pullAt.js | 43 + tests/node_modules/lodash/random.js | 82 + tests/node_modules/lodash/range.js | 46 + tests/node_modules/lodash/rangeRight.js | 41 + tests/node_modules/lodash/rearg.js | 33 + tests/node_modules/lodash/reduce.js | 51 + tests/node_modules/lodash/reduceRight.js | 36 + tests/node_modules/lodash/reject.js | 46 + tests/node_modules/lodash/release.md | 48 + tests/node_modules/lodash/remove.js | 53 + tests/node_modules/lodash/repeat.js | 37 + tests/node_modules/lodash/replace.js | 29 + tests/node_modules/lodash/rest.js | 40 + tests/node_modules/lodash/result.js | 56 + tests/node_modules/lodash/reverse.js | 34 + tests/node_modules/lodash/round.js | 26 + tests/node_modules/lodash/sample.js | 24 + tests/node_modules/lodash/sampleSize.js | 37 + tests/node_modules/lodash/seq.js | 16 + tests/node_modules/lodash/set.js | 35 + tests/node_modules/lodash/setWith.js | 32 + tests/node_modules/lodash/shuffle.js | 25 + tests/node_modules/lodash/size.js | 46 + tests/node_modules/lodash/slice.js | 37 + tests/node_modules/lodash/snakeCase.js | 28 + tests/node_modules/lodash/some.js | 51 + tests/node_modules/lodash/sortBy.js | 48 + tests/node_modules/lodash/sortedIndex.js | 24 + tests/node_modules/lodash/sortedIndexBy.js | 33 + tests/node_modules/lodash/sortedIndexOf.js | 31 + tests/node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + tests/node_modules/lodash/sortedUniq.js | 24 + tests/node_modules/lodash/sortedUniqBy.js | 26 + tests/node_modules/lodash/split.js | 52 + tests/node_modules/lodash/spread.js | 63 + tests/node_modules/lodash/startCase.js | 29 + tests/node_modules/lodash/startsWith.js | 39 + tests/node_modules/lodash/string.js | 33 + tests/node_modules/lodash/stubArray.js | 23 + tests/node_modules/lodash/stubFalse.js | 18 + tests/node_modules/lodash/stubObject.js | 23 + tests/node_modules/lodash/stubString.js | 18 + tests/node_modules/lodash/stubTrue.js | 18 + tests/node_modules/lodash/subtract.js | 22 + tests/node_modules/lodash/sum.js | 24 + tests/node_modules/lodash/sumBy.js | 33 + tests/node_modules/lodash/tail.js | 22 + tests/node_modules/lodash/take.js | 37 + tests/node_modules/lodash/takeRight.js | 39 + tests/node_modules/lodash/takeRightWhile.js | 45 + tests/node_modules/lodash/takeWhile.js | 45 + tests/node_modules/lodash/tap.js | 29 + tests/node_modules/lodash/template.js | 272 + tests/node_modules/lodash/templateSettings.js | 67 + tests/node_modules/lodash/throttle.js | 69 + tests/node_modules/lodash/thru.js | 28 + tests/node_modules/lodash/times.js | 51 + tests/node_modules/lodash/toArray.js | 58 + tests/node_modules/lodash/toFinite.js | 42 + tests/node_modules/lodash/toInteger.js | 36 + tests/node_modules/lodash/toIterator.js | 23 + tests/node_modules/lodash/toJSON.js | 1 + tests/node_modules/lodash/toLength.js | 38 + tests/node_modules/lodash/toLower.js | 28 + tests/node_modules/lodash/toNumber.js | 64 + tests/node_modules/lodash/toPairs.js | 30 + tests/node_modules/lodash/toPairsIn.js | 30 + tests/node_modules/lodash/toPath.js | 33 + tests/node_modules/lodash/toPlainObject.js | 32 + tests/node_modules/lodash/toSafeInteger.js | 37 + tests/node_modules/lodash/toString.js | 28 + tests/node_modules/lodash/toUpper.js | 28 + tests/node_modules/lodash/transform.js | 65 + tests/node_modules/lodash/trim.js | 47 + tests/node_modules/lodash/trimEnd.js | 41 + tests/node_modules/lodash/trimStart.js | 43 + tests/node_modules/lodash/truncate.js | 111 + tests/node_modules/lodash/unary.js | 22 + tests/node_modules/lodash/unescape.js | 34 + tests/node_modules/lodash/union.js | 26 + tests/node_modules/lodash/unionBy.js | 39 + tests/node_modules/lodash/unionWith.js | 34 + tests/node_modules/lodash/uniq.js | 25 + tests/node_modules/lodash/uniqBy.js | 31 + tests/node_modules/lodash/uniqWith.js | 28 + tests/node_modules/lodash/uniqueId.js | 28 + tests/node_modules/lodash/unset.js | 34 + tests/node_modules/lodash/unzip.js | 45 + tests/node_modules/lodash/unzipWith.js | 39 + tests/node_modules/lodash/update.js | 35 + tests/node_modules/lodash/updateWith.js | 33 + tests/node_modules/lodash/upperCase.js | 27 + tests/node_modules/lodash/upperFirst.js | 22 + tests/node_modules/lodash/util.js | 34 + tests/node_modules/lodash/value.js | 1 + tests/node_modules/lodash/valueOf.js | 1 + tests/node_modules/lodash/values.js | 34 + tests/node_modules/lodash/valuesIn.js | 32 + tests/node_modules/lodash/without.js | 31 + tests/node_modules/lodash/words.js | 35 + tests/node_modules/lodash/wrap.js | 30 + tests/node_modules/lodash/wrapperAt.js | 48 + tests/node_modules/lodash/wrapperChain.js | 34 + tests/node_modules/lodash/wrapperLodash.js | 147 + tests/node_modules/lodash/wrapperReverse.js | 44 + tests/node_modules/lodash/wrapperValue.js | 21 + tests/node_modules/lodash/xor.js | 28 + tests/node_modules/lodash/xorBy.js | 39 + tests/node_modules/lodash/xorWith.js | 34 + tests/node_modules/lodash/zip.js | 22 + tests/node_modules/lodash/zipObject.js | 24 + tests/node_modules/lodash/zipObjectDeep.js | 23 + tests/node_modules/lodash/zipWith.js | 32 + tests/node_modules/log-symbols/browser.js | 8 + tests/node_modules/log-symbols/index.d.ts | 25 + tests/node_modules/log-symbols/index.js | 19 + tests/node_modules/log-symbols/license | 9 + tests/node_modules/log-symbols/package.json | 52 + tests/node_modules/log-symbols/readme.md | 51 + tests/node_modules/lower-case/LICENSE | 21 + tests/node_modules/lower-case/README.md | 35 + .../lower-case/dist.es2015/index.d.ts | 8 + .../lower-case/dist.es2015/index.js | 48 + .../lower-case/dist.es2015/index.js.map | 1 + .../lower-case/dist.es2015/index.spec.d.ts | 1 + .../lower-case/dist.es2015/index.spec.js | 34 + .../lower-case/dist.es2015/index.spec.js.map | 1 + tests/node_modules/lower-case/dist/index.d.ts | 8 + tests/node_modules/lower-case/dist/index.js | 53 + .../node_modules/lower-case/dist/index.js.map | 1 + .../lower-case/dist/index.spec.d.ts | 1 + .../lower-case/dist/index.spec.js | 36 + .../lower-case/dist/index.spec.js.map | 1 + tests/node_modules/lower-case/package.json | 87 + .../node_modules/minimalistic-assert/LICENSE | 13 + .../node_modules/minimalistic-assert/index.js | 11 + .../minimalistic-assert/package.json | 19 + .../minimalistic-assert/readme.md | 4 + .../minimalistic-crypto-utils/.npmignore | 2 + .../minimalistic-crypto-utils/.travis.yml | 11 + .../minimalistic-crypto-utils/README.md | 47 + .../minimalistic-crypto-utils/lib/utils.js | 58 + .../minimalistic-crypto-utils/package.json | 27 + .../test/utils-test.js | 28 + tests/node_modules/minimatch/LICENSE | 15 + tests/node_modules/minimatch/README.md | 209 + tests/node_modules/minimatch/minimatch.js | 923 + tests/node_modules/minimatch/package.json | 30 + tests/node_modules/mocha/CHANGELOG.md | 1004 + tests/node_modules/mocha/LICENSE | 22 + tests/node_modules/mocha/README.md | 70 + .../node_modules/mocha/assets/growl/error.png | Bin 0 -> 412 bytes tests/node_modules/mocha/assets/growl/ok.png | Bin 0 -> 388 bytes tests/node_modules/mocha/bin/_mocha | 10 + tests/node_modules/mocha/bin/mocha | 142 + tests/node_modules/mocha/browser-entry.js | 219 + tests/node_modules/mocha/index.js | 3 + tests/node_modules/mocha/lib/browser/growl.js | 169 + .../mocha/lib/browser/highlight-tags.js | 39 + .../mocha/lib/browser/parse-query.js | 24 + .../mocha/lib/browser/progress.js | 123 + .../mocha/lib/browser/template.html | 20 + tests/node_modules/mocha/lib/cli/cli.js | 89 + .../mocha/lib/cli/collect-files.js | 92 + tests/node_modules/mocha/lib/cli/commands.js | 13 + tests/node_modules/mocha/lib/cli/config.js | 105 + tests/node_modules/mocha/lib/cli/index.js | 3 + tests/node_modules/mocha/lib/cli/init.js | 36 + .../mocha/lib/cli/lookup-files.js | 145 + .../node_modules/mocha/lib/cli/node-flags.js | 85 + .../mocha/lib/cli/one-and-dones.js | 70 + tests/node_modules/mocha/lib/cli/options.js | 261 + .../node_modules/mocha/lib/cli/run-helpers.js | 243 + .../mocha/lib/cli/run-option-metadata.js | 117 + tests/node_modules/mocha/lib/cli/run.js | 379 + tests/node_modules/mocha/lib/cli/watch-run.js | 380 + tests/node_modules/mocha/lib/context.js | 86 + tests/node_modules/mocha/lib/errors.js | 563 + tests/node_modules/mocha/lib/esm-utils.js | 109 + tests/node_modules/mocha/lib/hook.js | 89 + .../node_modules/mocha/lib/interfaces/bdd.js | 111 + .../mocha/lib/interfaces/common.js | 193 + .../mocha/lib/interfaces/exports.js | 60 + .../mocha/lib/interfaces/index.js | 6 + .../mocha/lib/interfaces/qunit.js | 98 + .../node_modules/mocha/lib/interfaces/tdd.js | 106 + tests/node_modules/mocha/lib/mocha.js | 1382 + tests/node_modules/mocha/lib/mocharc.json | 10 + .../mocha/lib/nodejs/buffered-worker-pool.js | 172 + .../mocha/lib/nodejs/file-unloader.js | 15 + tests/node_modules/mocha/lib/nodejs/growl.js | 137 + .../lib/nodejs/parallel-buffered-runner.js | 433 + .../lib/nodejs/reporters/parallel-buffered.js | 165 + .../mocha/lib/nodejs/serializer.js | 412 + tests/node_modules/mocha/lib/nodejs/worker.js | 151 + tests/node_modules/mocha/lib/pending.js | 16 + tests/node_modules/mocha/lib/plugin-loader.js | 286 + .../node_modules/mocha/lib/reporters/base.js | 537 + tests/node_modules/mocha/lib/reporters/doc.js | 95 + tests/node_modules/mocha/lib/reporters/dot.js | 81 + .../node_modules/mocha/lib/reporters/html.js | 390 + .../node_modules/mocha/lib/reporters/index.js | 19 + .../mocha/lib/reporters/json-stream.js | 92 + .../node_modules/mocha/lib/reporters/json.js | 162 + .../mocha/lib/reporters/landing.js | 116 + .../node_modules/mocha/lib/reporters/list.js | 78 + .../mocha/lib/reporters/markdown.js | 112 + tests/node_modules/mocha/lib/reporters/min.js | 52 + .../node_modules/mocha/lib/reporters/nyan.js | 276 + .../mocha/lib/reporters/progress.js | 104 + .../node_modules/mocha/lib/reporters/spec.js | 99 + tests/node_modules/mocha/lib/reporters/tap.js | 293 + .../node_modules/mocha/lib/reporters/xunit.js | 217 + tests/node_modules/mocha/lib/runnable.js | 476 + tests/node_modules/mocha/lib/runner.js | 1269 + .../node_modules/mocha/lib/stats-collector.js | 83 + tests/node_modules/mocha/lib/suite.js | 695 + tests/node_modules/mocha/lib/test.js | 113 + tests/node_modules/mocha/lib/utils.js | 667 + tests/node_modules/mocha/mocha-es2018.js | 19840 ++++++++++ tests/node_modules/mocha/mocha.css | 325 + tests/node_modules/mocha/mocha.js | 30728 ++++++++++++++++ tests/node_modules/mocha/mocha.js.map | 1 + tests/node_modules/mocha/package.json | 202 + tests/node_modules/ms/index.js | 162 + tests/node_modules/ms/license.md | 21 + tests/node_modules/ms/package.json | 38 + tests/node_modules/ms/readme.md | 59 + tests/node_modules/nanoid/LICENSE | 20 + tests/node_modules/nanoid/README.md | 515 + .../nanoid/async/index.browser.js | 70 + tests/node_modules/nanoid/async/index.cjs | 71 + tests/node_modules/nanoid/async/index.d.ts | 56 + tests/node_modules/nanoid/async/index.js | 71 + .../node_modules/nanoid/async/index.native.js | 57 + tests/node_modules/nanoid/async/package.json | 11 + tests/node_modules/nanoid/bin/nanoid.cjs | 5 + tests/node_modules/nanoid/index.browser.js | 104 + tests/node_modules/nanoid/index.cjs | 80 + tests/node_modules/nanoid/index.d.ts | 88 + tests/node_modules/nanoid/index.dev.js | 104 + tests/node_modules/nanoid/index.js | 80 + tests/node_modules/nanoid/index.prod.js | 104 + tests/node_modules/nanoid/nanoid.js | 1 + .../node_modules/nanoid/non-secure/index.cjs | 30 + .../node_modules/nanoid/non-secure/index.d.ts | 30 + tests/node_modules/nanoid/non-secure/index.js | 30 + .../nanoid/non-secure/package.json | 6 + tests/node_modules/nanoid/package.json | 61 + .../nanoid/url-alphabet/index.cjs | 6 + .../node_modules/nanoid/url-alphabet/index.js | 6 + .../nanoid/url-alphabet/package.json | 6 + tests/node_modules/no-case/LICENSE | 21 + tests/node_modules/no-case/README.md | 37 + .../no-case/dist.es2015/index.d.ts | 10 + .../node_modules/no-case/dist.es2015/index.js | 31 + .../no-case/dist.es2015/index.js.map | 1 + .../no-case/dist.es2015/index.spec.d.ts | 1 + .../no-case/dist.es2015/index.spec.js | 57 + .../no-case/dist.es2015/index.spec.js.map | 1 + tests/node_modules/no-case/dist/index.d.ts | 10 + tests/node_modules/no-case/dist/index.js | 35 + tests/node_modules/no-case/dist/index.js.map | 1 + .../node_modules/no-case/dist/index.spec.d.ts | 1 + tests/node_modules/no-case/dist/index.spec.js | 59 + .../no-case/dist/index.spec.js.map | 1 + tests/node_modules/no-case/package.json | 85 + .../node_modules/node-addon-api/.editorconfig | 8 + tests/node_modules/node-addon-api/.travis.yml | 62 + .../node_modules/node-addon-api/CHANGELOG.md | 412 + .../node-addon-api/CODE_OF_CONDUCT.md | 4 + .../node-addon-api/CONTRIBUTING.md | 66 + tests/node_modules/node-addon-api/LICENSE.md | 13 + tests/node_modules/node-addon-api/README.md | 203 + .../node_modules/node-addon-api/appveyor.yml | 48 + .../node_modules/node-addon-api/doc/Doxyfile | 2450 ++ .../node-addon-api/doc/array_buffer.md | 129 + .../node-addon-api/doc/async_context.md | 86 + .../node-addon-api/doc/async_operations.md | 31 + .../doc/async_progress_worker.md | 344 + .../node-addon-api/doc/async_worker.md | 398 + .../node-addon-api/doc/basic_types.md | 423 + .../node_modules/node-addon-api/doc/bigint.md | 92 + .../node-addon-api/doc/boolean.md | 64 + .../node_modules/node-addon-api/doc/buffer.md | 140 + .../node-addon-api/doc/callback_scope.md | 54 + .../node-addon-api/doc/callbackinfo.md | 97 + .../node-addon-api/doc/checker-tool.md | 32 + .../doc/class_property_descriptor.md | 117 + .../node-addon-api/doc/cmake-js.md | 68 + .../node-addon-api/doc/conversion-tool.md | 28 + .../node-addon-api/doc/creating_a_release.md | 62 + .../node-addon-api/doc/dataview.md | 244 + tests/node_modules/node-addon-api/doc/date.md | 68 + tests/node_modules/node-addon-api/doc/env.md | 63 + .../node_modules/node-addon-api/doc/error.md | 115 + .../node-addon-api/doc/error_handling.md | 186 + .../doc/escapable_handle_scope.md | 82 + .../node-addon-api/doc/external.md | 59 + .../node-addon-api/doc/function.md | 294 + .../node-addon-api/doc/function_reference.md | 238 + .../node-addon-api/doc/generator.md | 13 + .../node-addon-api/doc/handle_scope.md | 65 + .../node-addon-api/doc/memory_management.md | 27 + .../node-addon-api/doc/node-gyp.md | 82 + .../node_modules/node-addon-api/doc/number.md | 163 + .../node_modules/node-addon-api/doc/object.md | 236 + .../doc/object_lifetime_management.md | 83 + .../node-addon-api/doc/object_reference.md | 117 + .../node-addon-api/doc/object_wrap.md | 557 + .../node-addon-api/doc/prebuild_tools.md | 16 + .../node-addon-api/doc/promises.md | 74 + .../node-addon-api/doc/property_descriptor.md | 231 + .../node-addon-api/doc/range_error.md | 59 + .../node-addon-api/doc/reference.md | 111 + .../node_modules/node-addon-api/doc/setup.md | 82 + .../node_modules/node-addon-api/doc/string.md | 89 + .../node_modules/node-addon-api/doc/symbol.md | 44 + .../node-addon-api/doc/threadsafe_function.md | 320 + .../node-addon-api/doc/type_error.md | 59 + .../node-addon-api/doc/typed_array.md | 74 + .../node-addon-api/doc/typed_array_of.md | 133 + .../node_modules/node-addon-api/doc/value.md | 278 + .../node-addon-api/doc/version_management.md | 43 + .../doc/working_with_javascript_values.md | 14 + .../node-addon-api/external-napi/node_api.h | 7 + tests/node_modules/node-addon-api/index.js | 45 + .../node-addon-api/napi-inl.deprecated.h | 192 + tests/node_modules/node-addon-api/napi-inl.h | 4412 +++ tests/node_modules/node-addon-api/napi.h | 2173 ++ .../node_modules/node-addon-api/package.json | 244 + .../node-addon-api/src/node_api.cc | 3655 ++ .../node-addon-api/src/node_api.gyp | 21 + .../node-addon-api/src/node_api.h | 588 + .../node-addon-api/src/node_api_types.h | 115 + .../node-addon-api/src/node_internals.cc | 142 + .../node-addon-api/src/node_internals.h | 157 + .../node_modules/node-addon-api/src/nothing.c | 0 .../node-addon-api/src/util-inl.h | 38 + tests/node_modules/node-addon-api/src/util.h | 7 + .../node-addon-api/tools/README.md | 67 + .../node-addon-api/tools/check-napi.js | 100 + .../node-addon-api/tools/conversion.js | 313 + tests/node_modules/node-fetch/CHANGELOG.md | 272 + tests/node_modules/node-fetch/LICENSE.md | 22 + tests/node_modules/node-fetch/README.md | 590 + tests/node_modules/node-fetch/browser.js | 25 + tests/node_modules/node-fetch/lib/index.es.js | 1640 + tests/node_modules/node-fetch/lib/index.js | 1649 + tests/node_modules/node-fetch/lib/index.mjs | 1638 + tests/node_modules/node-fetch/package.json | 66 + tests/node_modules/node-gyp-build/LICENSE | 21 + tests/node_modules/node-gyp-build/README.md | 58 + tests/node_modules/node-gyp-build/bin.js | 77 + .../node_modules/node-gyp-build/build-test.js | 19 + tests/node_modules/node-gyp-build/index.js | 166 + tests/node_modules/node-gyp-build/optional.js | 7 + .../node_modules/node-gyp-build/package.json | 29 + tests/node_modules/normalize-path/LICENSE | 21 + tests/node_modules/normalize-path/README.md | 127 + tests/node_modules/normalize-path/index.js | 35 + .../node_modules/normalize-path/package.json | 77 + tests/node_modules/once/LICENSE | 15 + tests/node_modules/once/README.md | 79 + tests/node_modules/once/once.js | 42 + tests/node_modules/once/package.json | 33 + tests/node_modules/p-limit/index.d.ts | 42 + tests/node_modules/p-limit/index.js | 71 + tests/node_modules/p-limit/license | 9 + tests/node_modules/p-limit/package.json | 52 + tests/node_modules/p-limit/readme.md | 101 + tests/node_modules/p-locate/index.d.ts | 53 + tests/node_modules/p-locate/index.js | 50 + tests/node_modules/p-locate/license | 9 + tests/node_modules/p-locate/package.json | 54 + tests/node_modules/p-locate/readme.md | 93 + tests/node_modules/pako/CHANGELOG.md | 211 + tests/node_modules/pako/LICENSE | 21 + tests/node_modules/pako/README.md | 177 + tests/node_modules/pako/dist/pako.es5.js | 8027 ++++ tests/node_modules/pako/dist/pako.es5.min.js | 2 + tests/node_modules/pako/dist/pako.esm.mjs | 6708 ++++ tests/node_modules/pako/dist/pako.js | 6727 ++++ tests/node_modules/pako/dist/pako.min.js | 2 + .../pako/dist/pako_deflate.es5.js | 4589 +++ .../pako/dist/pako_deflate.es5.min.js | 2 + tests/node_modules/pako/dist/pako_deflate.js | 3978 ++ .../pako/dist/pako_deflate.min.js | 2 + .../pako/dist/pako_inflate.es5.js | 3979 ++ .../pako/dist/pako_inflate.es5.min.js | 2 + tests/node_modules/pako/dist/pako_inflate.js | 3218 ++ .../pako/dist/pako_inflate.min.js | 2 + tests/node_modules/pako/index.js | 18 + tests/node_modules/pako/lib/deflate.js | 380 + tests/node_modules/pako/lib/inflate.js | 419 + tests/node_modules/pako/lib/utils/common.js | 48 + tests/node_modules/pako/lib/utils/strings.js | 174 + tests/node_modules/pako/lib/zlib/README | 59 + tests/node_modules/pako/lib/zlib/adler32.js | 51 + tests/node_modules/pako/lib/zlib/constants.js | 68 + tests/node_modules/pako/lib/zlib/crc32.js | 59 + tests/node_modules/pako/lib/zlib/deflate.js | 1850 + tests/node_modules/pako/lib/zlib/gzheader.js | 58 + tests/node_modules/pako/lib/zlib/inffast.js | 344 + tests/node_modules/pako/lib/zlib/inflate.js | 1547 + tests/node_modules/pako/lib/zlib/inftrees.js | 344 + tests/node_modules/pako/lib/zlib/messages.js | 32 + tests/node_modules/pako/lib/zlib/trees.js | 1229 + tests/node_modules/pako/lib/zlib/zstream.js | 47 + tests/node_modules/pako/package.json | 64 + tests/node_modules/path-exists/index.d.ts | 28 + tests/node_modules/path-exists/index.js | 23 + tests/node_modules/path-exists/license | 9 + tests/node_modules/path-exists/package.json | 39 + tests/node_modules/path-exists/readme.md | 52 + tests/node_modules/path-is-absolute/index.js | 20 + tests/node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 43 + tests/node_modules/path-is-absolute/readme.md | 59 + tests/node_modules/picomatch/CHANGELOG.md | 126 + tests/node_modules/picomatch/LICENSE | 21 + tests/node_modules/picomatch/README.md | 707 + tests/node_modules/picomatch/index.js | 3 + tests/node_modules/picomatch/lib/constants.js | 179 + tests/node_modules/picomatch/lib/parse.js | 1084 + tests/node_modules/picomatch/lib/picomatch.js | 342 + tests/node_modules/picomatch/lib/scan.js | 391 + tests/node_modules/picomatch/lib/utils.js | 64 + tests/node_modules/picomatch/package.json | 81 + tests/node_modules/randombytes/.travis.yml | 15 + tests/node_modules/randombytes/.zuul.yml | 1 + tests/node_modules/randombytes/LICENSE | 21 + tests/node_modules/randombytes/README.md | 14 + tests/node_modules/randombytes/browser.js | 50 + tests/node_modules/randombytes/index.js | 1 + tests/node_modules/randombytes/package.json | 36 + tests/node_modules/randombytes/test.js | 81 + tests/node_modules/readdirp/LICENSE | 21 + tests/node_modules/readdirp/README.md | 122 + tests/node_modules/readdirp/index.d.ts | 43 + tests/node_modules/readdirp/index.js | 287 + tests/node_modules/readdirp/package.json | 122 + .../node_modules/regenerator-runtime/LICENSE | 21 + .../regenerator-runtime/README.md | 31 + .../regenerator-runtime/package.json | 19 + .../node_modules/regenerator-runtime/path.js | 11 + .../regenerator-runtime/runtime.js | 754 + .../node_modules/require-directory/.jshintrc | 67 + .../node_modules/require-directory/.npmignore | 1 + .../require-directory/.travis.yml | 3 + tests/node_modules/require-directory/LICENSE | 22 + .../require-directory/README.markdown | 184 + tests/node_modules/require-directory/index.js | 86 + .../require-directory/package.json | 40 + tests/node_modules/rpc-websockets/.babelrc | 8 + tests/node_modules/rpc-websockets/.eslintrc | 54 + .../rpc-websockets/.github/FUNDING.yml | 1 + tests/node_modules/rpc-websockets/.travis.yml | 8 + tests/node_modules/rpc-websockets/API.md | 345 + tests/node_modules/rpc-websockets/LICENSE | 10 + tests/node_modules/rpc-websockets/README.md | 156 + .../rpc-websockets/assets/logo.png | Bin 0 -> 12178 bytes .../rpc-websockets/assets/oss-features.png | Bin 0 -> 200707 bytes .../rpc-websockets/assets/pro-features.png | Bin 0 -> 61822 bytes .../rpc-websockets/assets/user-codice.png | Bin 0 -> 25855 bytes .../rpc-websockets/assets/user-filecoin.png | Bin 0 -> 12418 bytes .../rpc-websockets/assets/user-heynetwork.png | Bin 0 -> 7471 bytes .../rpc-websockets/assets/user-holo.png | Bin 0 -> 34210 bytes .../rpc-websockets/assets/user-hylo.png | Bin 0 -> 4215020 bytes .../rpc-websockets/assets/user-klikatech.png | Bin 0 -> 58477 bytes .../rpc-websockets/assets/user-kodebox.png | Bin 0 -> 8431 bytes .../rpc-websockets/assets/user-leapdao.png | Bin 0 -> 181784 bytes .../rpc-websockets/assets/user-loom.png | Bin 0 -> 20916 bytes .../rpc-websockets/assets/user-scaleleap.png | Bin 0 -> 6683 bytes .../rpc-websockets/assets/user-scratchbox.png | Bin 0 -> 68385 bytes .../rpc-websockets/assets/user-solana.png | Bin 0 -> 120064 bytes .../rpc-websockets/assets/user-uniqcast.png | Bin 0 -> 70238 bytes .../rpc-websockets/assets/user-witnet.png | Bin 0 -> 64804 bytes .../build-ts/index.browser.d.ts | 5 + .../rpc-websockets/build-ts/index.browser.js | 13 + .../rpc-websockets/build-ts/index.d.ts | 6 + .../rpc-websockets/build-ts/index.js | 24 + .../rpc-websockets/build-ts/lib/client.d.ts | 123 + .../rpc-websockets/build-ts/lib/client.js | 254 + .../build-ts/lib/client/client.types.d.ts | 18 + .../build-ts/lib/client/client.types.js | 1 + .../lib/client/websocket.browser.d.ts | 45 + .../build-ts/lib/client/websocket.browser.js | 67 + .../build-ts/lib/client/websocket.d.ts | 10 + .../build-ts/lib/client/websocket.js | 13 + .../rpc-websockets/build-ts/lib/server.d.ts | 212 + .../rpc-websockets/build-ts/lib/server.js | 559 + .../rpc-websockets/build-ts/lib/utils.d.ts | 13 + .../rpc-websockets/build-ts/lib/utils.js | 28 + .../dist/index.browser-bundle.js | 4142 +++ .../rpc-websockets/dist/index.browser.d.ts | 5 + .../rpc-websockets/dist/index.browser.js | 57 + .../rpc-websockets/dist/index.d.ts | 6 + .../node_modules/rpc-websockets/dist/index.js | 81 + .../rpc-websockets/dist/lib/client.d.ts | 123 + .../rpc-websockets/dist/lib/client.js | 482 + .../dist/lib/client/client.types.d.ts | 18 + .../dist/lib/client/client.types.js | 5 + .../dist/lib/client/websocket.browser.d.ts | 45 + .../dist/lib/client/websocket.browser.js | 122 + .../dist/lib/client/websocket.d.ts | 10 + .../dist/lib/client/websocket.js | 22 + .../rpc-websockets/dist/lib/server.d.ts | 212 + .../rpc-websockets/dist/lib/server.js | 1069 + .../rpc-websockets/dist/lib/utils.d.ts | 13 + .../rpc-websockets/dist/lib/utils.js | 22 + .../rpc-websockets/node_modules/.bin/uuid | 1 + .../node_modules/uuid/CHANGELOG.md | 229 + .../node_modules/uuid/CONTRIBUTING.md | 18 + .../node_modules/uuid/LICENSE.md | 9 + .../node_modules/uuid/README.md | 505 + .../node_modules/uuid/dist/bin/uuid | 2 + .../uuid/dist/esm-browser/index.js | 9 + .../node_modules/uuid/dist/esm-browser/md5.js | 215 + .../node_modules/uuid/dist/esm-browser/nil.js | 1 + .../uuid/dist/esm-browser/parse.js | 35 + .../uuid/dist/esm-browser/regex.js | 1 + .../node_modules/uuid/dist/esm-browser/rng.js | 19 + .../uuid/dist/esm-browser/sha1.js | 96 + .../uuid/dist/esm-browser/stringify.js | 30 + .../node_modules/uuid/dist/esm-browser/v1.js | 95 + .../node_modules/uuid/dist/esm-browser/v3.js | 4 + .../node_modules/uuid/dist/esm-browser/v35.js | 64 + .../node_modules/uuid/dist/esm-browser/v4.js | 24 + .../node_modules/uuid/dist/esm-browser/v5.js | 4 + .../uuid/dist/esm-browser/validate.js | 7 + .../uuid/dist/esm-browser/version.js | 11 + .../node_modules/uuid/dist/esm-node/index.js | 9 + .../node_modules/uuid/dist/esm-node/md5.js | 13 + .../node_modules/uuid/dist/esm-node/nil.js | 1 + .../node_modules/uuid/dist/esm-node/parse.js | 35 + .../node_modules/uuid/dist/esm-node/regex.js | 1 + .../node_modules/uuid/dist/esm-node/rng.js | 12 + .../node_modules/uuid/dist/esm-node/sha1.js | 13 + .../uuid/dist/esm-node/stringify.js | 29 + .../node_modules/uuid/dist/esm-node/v1.js | 95 + .../node_modules/uuid/dist/esm-node/v3.js | 4 + .../node_modules/uuid/dist/esm-node/v35.js | 64 + .../node_modules/uuid/dist/esm-node/v4.js | 24 + .../node_modules/uuid/dist/esm-node/v5.js | 4 + .../uuid/dist/esm-node/validate.js | 7 + .../uuid/dist/esm-node/version.js | 11 + .../node_modules/uuid/dist/index.js | 79 + .../node_modules/uuid/dist/md5-browser.js | 223 + .../node_modules/uuid/dist/md5.js | 23 + .../node_modules/uuid/dist/nil.js | 8 + .../node_modules/uuid/dist/parse.js | 45 + .../node_modules/uuid/dist/regex.js | 8 + .../node_modules/uuid/dist/rng-browser.js | 26 + .../node_modules/uuid/dist/rng.js | 24 + .../node_modules/uuid/dist/sha1-browser.js | 104 + .../node_modules/uuid/dist/sha1.js | 23 + .../node_modules/uuid/dist/stringify.js | 39 + .../node_modules/uuid/dist/umd/uuid.min.js | 1 + .../node_modules/uuid/dist/umd/uuidNIL.min.js | 1 + .../uuid/dist/umd/uuidParse.min.js | 1 + .../uuid/dist/umd/uuidStringify.min.js | 1 + .../uuid/dist/umd/uuidValidate.min.js | 1 + .../uuid/dist/umd/uuidVersion.min.js | 1 + .../node_modules/uuid/dist/umd/uuidv1.min.js | 1 + .../node_modules/uuid/dist/umd/uuidv3.min.js | 1 + .../node_modules/uuid/dist/umd/uuidv4.min.js | 1 + .../node_modules/uuid/dist/umd/uuidv5.min.js | 1 + .../node_modules/uuid/dist/uuid-bin.js | 85 + .../node_modules/uuid/dist/v1.js | 107 + .../node_modules/uuid/dist/v3.js | 16 + .../node_modules/uuid/dist/v35.js | 78 + .../node_modules/uuid/dist/v4.js | 37 + .../node_modules/uuid/dist/v5.js | 16 + .../node_modules/uuid/dist/validate.js | 17 + .../node_modules/uuid/dist/version.js | 21 + .../node_modules/uuid/package.json | 135 + .../node_modules/uuid/wrapper.mjs | 10 + .../node_modules/rpc-websockets/package.json | 69 + .../node_modules/rpc-websockets/tsconfig.json | 15 + tests/node_modules/safe-buffer/LICENSE | 21 + tests/node_modules/safe-buffer/README.md | 584 + tests/node_modules/safe-buffer/index.d.ts | 187 + tests/node_modules/safe-buffer/index.js | 65 + tests/node_modules/safe-buffer/package.json | 51 + tests/node_modules/secp256k1/API.md | 116 + tests/node_modules/secp256k1/LICENSE | 24 + tests/node_modules/secp256k1/README.md | 117 + tests/node_modules/secp256k1/binding.gyp | 100 + tests/node_modules/secp256k1/bindings.js | 2 + tests/node_modules/secp256k1/build/Makefile | 347 + .../build/Release/.deps/Release/addon.node.d | 1 + .../Release/obj.target/addon/src/addon.o.d | 20 + .../obj.target/addon/src/secp256k1.o.d | 27 + .../secp256k1/src/secp256k1/src/secp256k1.o.d | 58 + .../build/Release/.deps/Release/secp256k1.a.d | 1 + .../secp256k1/build/Release/addon.node | Bin 0 -> 216679 bytes .../Release/obj.target/addon/src/addon.o | Bin 0 -> 186628 bytes .../Release/obj.target/addon/src/secp256k1.o | Bin 0 -> 663396 bytes .../secp256k1/src/secp256k1/src/secp256k1.o | Bin 0 -> 429924 bytes .../secp256k1/build/Release/secp256k1.a | Bin 0 -> 431872 bytes .../secp256k1/build/addon.target.mk | 194 + .../secp256k1/build/binding.Makefile | 6 + .../node_modules/secp256k1/build/config.gypi | 92 + .../node_modules/secp256k1/build/gyp-mac-tool | 777 + .../secp256k1/build/secp256k1.target.mk | 208 + tests/node_modules/secp256k1/elliptic.js | 1 + tests/node_modules/secp256k1/index.js | 5 + tests/node_modules/secp256k1/lib/elliptic.js | 402 + tests/node_modules/secp256k1/lib/index.js | 336 + tests/node_modules/secp256k1/package.json | 43 + .../prebuilds/darwin-x64/node.napi.node | Bin 0 -> 275148 bytes .../prebuilds/linux-x64/node.napi.glibc.node | Bin 0 -> 158840 bytes .../prebuilds/linux-x64/node.napi.musl.node | Bin 0 -> 186440 bytes .../prebuilds/win32-x64/node.napi.node | Bin 0 -> 269824 bytes tests/node_modules/secp256k1/src/addon.cc | 10 + tests/node_modules/secp256k1/src/secp256k1.cc | 415 + tests/node_modules/secp256k1/src/secp256k1.h | 63 + .../secp256k1/src/secp256k1/.npmignore | 50 + .../secp256k1/src/secp256k1/.travis.yml | 100 + .../secp256k1/src/secp256k1/COPYING | 19 + .../secp256k1/src/secp256k1/Makefile.am | 183 + .../secp256k1/src/secp256k1/README.md | 78 + .../secp256k1/src/secp256k1/SECURITY.md | 15 + .../node_modules/secp256k1/src/secp256k1/TODO | 3 + .../secp256k1/src/secp256k1/autogen.sh | 3 + .../build-aux/m4/ax_jni_include_dir.m4 | 145 + .../build-aux/m4/ax_prog_cc_for_build.m4 | 125 + .../secp256k1/build-aux/m4/bitcoin_secp.m4 | 68 + .../secp256k1/src/secp256k1/configure.ac | 591 + .../src/secp256k1/contrib/lax_der_parsing.c | 150 + .../src/secp256k1/contrib/lax_der_parsing.h | 91 + .../contrib/lax_der_privatekey_parsing.c | 113 + .../contrib/lax_der_privatekey_parsing.h | 90 + .../src/secp256k1/include/secp256k1.h | 708 + .../src/secp256k1/include/secp256k1_ecdh.h | 55 + .../include/secp256k1_preallocated.h | 128 + .../secp256k1/include/secp256k1_recovery.h | 110 + .../src/secp256k1/libsecp256k1.pc.in | 13 + .../secp256k1/src/secp256k1/obj/.npmignore | 0 .../src/secp256k1/sage/group_prover.sage | 322 + .../src/secp256k1/sage/secp256k1.sage | 306 + .../secp256k1/sage/weierstrass_prover.sage | 264 + .../src/secp256k1/src/asm/field_10x26_arm.s | 913 + .../src/secp256k1/src/basic-config.h | 38 + .../secp256k1/src/secp256k1/src/bench.h | 124 + .../secp256k1/src/secp256k1/src/bench_ecdh.c | 54 + .../src/secp256k1/src/bench_ecmult.c | 207 + .../src/secp256k1/src/bench_internal.c | 379 + .../src/secp256k1/src/bench_recover.c | 60 + .../secp256k1/src/secp256k1/src/bench_sign.c | 56 + .../src/secp256k1/src/bench_verify.c | 112 + .../secp256k1/src/secp256k1/src/ecdsa.h | 21 + .../secp256k1/src/secp256k1/src/ecdsa_impl.h | 319 + .../secp256k1/src/secp256k1/src/eckey.h | 25 + .../secp256k1/src/secp256k1/src/eckey_impl.h | 100 + .../secp256k1/src/secp256k1/src/ecmult.h | 48 + .../src/secp256k1/src/ecmult_const.h | 20 + .../src/secp256k1/src/ecmult_const_impl.h | 261 + .../secp256k1/src/secp256k1/src/ecmult_gen.h | 50 + .../src/secp256k1/src/ecmult_gen_impl.h | 211 + .../secp256k1/src/secp256k1/src/ecmult_impl.h | 1216 + .../secp256k1/src/secp256k1/src/field.h | 132 + .../secp256k1/src/secp256k1/src/field_10x26.h | 50 + .../src/secp256k1/src/field_10x26_impl.h | 1162 + .../secp256k1/src/secp256k1/src/field_5x52.h | 49 + .../src/secp256k1/src/field_5x52_asm_impl.h | 502 + .../src/secp256k1/src/field_5x52_impl.h | 496 + .../secp256k1/src/field_5x52_int128_impl.h | 279 + .../secp256k1/src/secp256k1/src/field_impl.h | 318 + .../secp256k1/src/secp256k1/src/gen_context.c | 87 + .../secp256k1/src/secp256k1/src/group.h | 142 + .../secp256k1/src/secp256k1/src/group_impl.h | 705 + .../secp256k1/src/secp256k1/src/hash.h | 41 + .../secp256k1/src/secp256k1/src/hash_impl.h | 283 + .../src/java/org/bitcoin/NativeSecp256k1.java | 446 + .../java/org/bitcoin/NativeSecp256k1Test.java | 225 + .../java/org/bitcoin/NativeSecp256k1Util.java | 45 + .../java/org/bitcoin/Secp256k1Context.java | 51 + .../src/java/org_bitcoin_NativeSecp256k1.c | 379 + .../src/java/org_bitcoin_NativeSecp256k1.h | 119 + .../src/java/org_bitcoin_Secp256k1Context.c | 15 + .../src/java/org_bitcoin_Secp256k1Context.h | 22 + .../src/modules/ecdh/Makefile.am.include | 8 + .../secp256k1/src/modules/ecdh/main_impl.h | 67 + .../secp256k1/src/modules/ecdh/tests_impl.h | 132 + .../src/modules/recovery/Makefile.am.include | 8 + .../src/modules/recovery/main_impl.h | 193 + .../src/modules/recovery/tests_impl.h | 393 + .../secp256k1/src/secp256k1/src/num.h | 74 + .../secp256k1/src/secp256k1/src/num_gmp.h | 20 + .../src/secp256k1/src/num_gmp_impl.h | 288 + .../secp256k1/src/secp256k1/src/num_impl.h | 24 + .../secp256k1/src/secp256k1/src/scalar.h | 106 + .../secp256k1/src/secp256k1/src/scalar_4x64.h | 19 + .../src/secp256k1/src/scalar_4x64_impl.h | 949 + .../secp256k1/src/secp256k1/src/scalar_8x32.h | 19 + .../src/secp256k1/src/scalar_8x32_impl.h | 721 + .../secp256k1/src/secp256k1/src/scalar_impl.h | 333 + .../secp256k1/src/secp256k1/src/scalar_low.h | 15 + .../src/secp256k1/src/scalar_low_impl.h | 117 + .../secp256k1/src/secp256k1/src/scratch.h | 42 + .../src/secp256k1/src/scratch_impl.h | 88 + .../secp256k1/src/secp256k1/src/secp256k1.c | 690 + .../secp256k1/src/secp256k1/src/testrand.h | 38 + .../src/secp256k1/src/testrand_impl.h | 110 + .../secp256k1/src/secp256k1/src/tests.c | 5310 +++ .../src/secp256k1/src/tests_exhaustive.c | 511 + .../secp256k1/src/secp256k1/src/util.h | 162 + .../node_modules/serialize-javascript/LICENSE | 27 + .../serialize-javascript/README.md | 142 + .../serialize-javascript/index.js | 268 + .../serialize-javascript/package.json | 36 + tests/node_modules/snake-case/LICENSE | 21 + tests/node_modules/snake-case/README.md | 37 + .../snake-case/dist.es2015/index.d.ts | 3 + .../snake-case/dist.es2015/index.js | 7 + .../snake-case/dist.es2015/index.js.map | 1 + .../snake-case/dist.es2015/index.spec.d.ts | 1 + .../snake-case/dist.es2015/index.spec.js | 23 + .../snake-case/dist.es2015/index.spec.js.map | 1 + tests/node_modules/snake-case/dist/index.d.ts | 3 + tests/node_modules/snake-case/dist/index.js | 11 + .../node_modules/snake-case/dist/index.js.map | 1 + .../snake-case/dist/index.spec.d.ts | 1 + .../snake-case/dist/index.spec.js | 25 + .../snake-case/dist/index.spec.js.map | 1 + tests/node_modules/snake-case/package.json | 90 + tests/node_modules/string-width/index.js | 36 + tests/node_modules/string-width/license | 9 + tests/node_modules/string-width/package.json | 55 + tests/node_modules/string-width/readme.md | 42 + tests/node_modules/strip-ansi/index.js | 4 + tests/node_modules/strip-ansi/license | 9 + tests/node_modules/strip-ansi/package.json | 52 + tests/node_modules/strip-ansi/readme.md | 39 + .../strip-json-comments/index.d.ts | 36 + .../node_modules/strip-json-comments/index.js | 77 + .../node_modules/strip-json-comments/license | 9 + .../strip-json-comments/package.json | 47 + .../strip-json-comments/readme.md | 78 + tests/node_modules/superstruct/Changelog.md | 458 + tests/node_modules/superstruct/License.md | 9 + tests/node_modules/superstruct/Readme.md | 230 + .../superstruct/lib/coercions.d.ts | 19 + .../superstruct/lib/coercions.d.ts.map | 1 + tests/node_modules/superstruct/lib/error.d.ts | 32 + .../superstruct/lib/error.d.ts.map | 1 + tests/node_modules/superstruct/lib/index.cjs | 1149 + .../superstruct/lib/index.cjs.d.ts | 1268 + .../superstruct/lib/index.cjs.map | 1 + tests/node_modules/superstruct/lib/index.d.ts | 7 + .../superstruct/lib/index.d.ts.map | 1 + .../superstruct/lib/index.es.d.ts | 1268 + .../node_modules/superstruct/lib/index.es.js | 1097 + .../superstruct/lib/index.es.js.map | 1 + .../superstruct/lib/refinements.d.ts | 19 + .../superstruct/lib/refinements.d.ts.map | 1 + .../node_modules/superstruct/lib/struct.d.ts | 110 + .../superstruct/lib/struct.d.ts.map | 1 + .../superstruct/lib/structs/coercions.d.ts | 29 + .../lib/structs/coercions.d.ts.map | 1 + .../superstruct/lib/structs/refinements.d.ts | 34 + .../lib/structs/refinements.d.ts.map | 1 + .../superstruct/lib/structs/types.d.ts | 186 + .../superstruct/lib/structs/types.d.ts.map | 1 + .../superstruct/lib/structs/utilities.d.ts | 66 + .../lib/structs/utilities.d.ts.map | 1 + tests/node_modules/superstruct/lib/types.d.ts | 200 + .../superstruct/lib/types.d.ts.map | 1 + .../node_modules/superstruct/lib/typings.d.ts | 36 + .../superstruct/lib/typings.d.ts.map | 1 + .../superstruct/lib/utilities.d.ts | 56 + .../superstruct/lib/utilities.d.ts.map | 1 + tests/node_modules/superstruct/lib/utils.d.ts | 117 + .../superstruct/lib/utils.d.ts.map | 1 + tests/node_modules/superstruct/lib/xtras.d.ts | 56 + .../superstruct/lib/xtras.d.ts.map | 1 + tests/node_modules/superstruct/package.json | 106 + .../superstruct/umd/coercions.d.ts | 18 + tests/node_modules/superstruct/umd/index.d.ts | 4 + .../superstruct/umd/refinements.d.ts | 14 + .../node_modules/superstruct/umd/struct.d.ts | 80 + .../superstruct/umd/superstruct.d.ts | 1268 + .../superstruct/umd/superstruct.js | 1154 + .../superstruct/umd/superstruct.min.d.ts | 1268 + .../superstruct/umd/superstruct.min.js | 1 + tests/node_modules/superstruct/umd/types.d.ts | 127 + tests/node_modules/superstruct/umd/utils.d.ts | 9 + tests/node_modules/supports-color/browser.js | 24 + tests/node_modules/supports-color/index.js | 152 + tests/node_modules/supports-color/license | 9 + .../node_modules/supports-color/package.json | 58 + tests/node_modules/supports-color/readme.md | 77 + .../text-encoding-utf-8/LICENSE.md | 29 + .../text-encoding-utf-8/README.md | 63 + .../text-encoding-utf-8/lib/encoding.js | 655 + .../text-encoding-utf-8/lib/encoding.lib.js | 642 + .../text-encoding-utf-8/lib/encoding.lib.mjs | 665 + .../text-encoding-utf-8/package.json | 26 + .../text-encoding-utf-8/src/encoding.js | 665 + .../text-encoding-utf-8/src/polyfill.js | 21 + tests/node_modules/through/.travis.yml | 5 + tests/node_modules/through/LICENSE.APACHE2 | 15 + tests/node_modules/through/LICENSE.MIT | 24 + tests/node_modules/through/index.js | 108 + tests/node_modules/through/package.json | 36 + tests/node_modules/through/readme.markdown | 64 + tests/node_modules/through/test/async.js | 28 + .../node_modules/through/test/auto-destroy.js | 30 + tests/node_modules/through/test/buffering.js | 71 + tests/node_modules/through/test/end.js | 45 + tests/node_modules/through/test/index.js | 133 + tests/node_modules/to-regex-range/LICENSE | 21 + tests/node_modules/to-regex-range/README.md | 305 + tests/node_modules/to-regex-range/index.js | 288 + .../node_modules/to-regex-range/package.json | 88 + tests/node_modules/toml/.jshintrc | 18 + tests/node_modules/toml/.travis.yml | 7 + tests/node_modules/toml/CHANGELOG.md | 116 + tests/node_modules/toml/LICENSE | 22 + tests/node_modules/toml/README.md | 93 + tests/node_modules/toml/benchmark.js | 12 + tests/node_modules/toml/index.d.ts | 3 + tests/node_modules/toml/index.js | 9 + tests/node_modules/toml/lib/compiler.js | 195 + tests/node_modules/toml/lib/parser.js | 3841 ++ tests/node_modules/toml/package.json | 24 + tests/node_modules/toml/src/toml.pegjs | 231 + tests/node_modules/toml/test/bad.toml | 5 + tests/node_modules/toml/test/example.toml | 32 + .../node_modules/toml/test/hard_example.toml | 33 + .../node_modules/toml/test/inline_tables.toml | 10 + .../toml/test/literal_strings.toml | 5 + .../toml/test/multiline_eat_whitespace.toml | 15 + .../toml/test/multiline_literal_strings.toml | 7 + .../toml/test/multiline_strings.toml | 6 + tests/node_modules/toml/test/smoke.js | 22 + .../toml/test/table_arrays_easy.toml | 10 + .../toml/test/table_arrays_hard.toml | 31 + tests/node_modules/toml/test/test_toml.js | 596 + tests/node_modules/traverse-chain/README.md | 37 + tests/node_modules/traverse-chain/index.js | 102 + .../node_modules/traverse-chain/package.json | 21 + tests/node_modules/tslib/CopyrightNotice.txt | 15 + tests/node_modules/tslib/LICENSE.txt | 12 + tests/node_modules/tslib/README.md | 164 + tests/node_modules/tslib/modules/index.js | 53 + tests/node_modules/tslib/modules/package.json | 3 + tests/node_modules/tslib/package.json | 37 + tests/node_modules/tslib/tslib.d.ts | 130 + tests/node_modules/tslib/tslib.es6.html | 1 + tests/node_modules/tslib/tslib.es6.js | 239 + tests/node_modules/tslib/tslib.html | 1 + tests/node_modules/tslib/tslib.js | 306 + tests/node_modules/tweetnacl/AUTHORS.md | 27 + tests/node_modules/tweetnacl/CHANGELOG.md | 283 + tests/node_modules/tweetnacl/LICENSE | 24 + .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 + tests/node_modules/tweetnacl/README.md | 494 + tests/node_modules/tweetnacl/nacl-fast.js | 2391 ++ tests/node_modules/tweetnacl/nacl-fast.min.js | 1 + tests/node_modules/tweetnacl/nacl.d.ts | 98 + tests/node_modules/tweetnacl/nacl.js | 1178 + tests/node_modules/tweetnacl/nacl.min.js | 1 + tests/node_modules/tweetnacl/package.json | 56 + tests/node_modules/utf-8-validate/LICENSE | 21 + tests/node_modules/utf-8-validate/README.md | 50 + tests/node_modules/utf-8-validate/binding.gyp | 9 + .../utf-8-validate/build/Makefile | 342 + .../obj.target/validation/src/validation.o.d | 11 + .../Release/.deps/Release/validation.node.d | 1 + .../obj.target/validation/src/validation.o | Bin 0 -> 9536 bytes .../build/Release/validation.node | Bin 0 -> 51596 bytes .../utf-8-validate/build/binding.Makefile | 6 + .../utf-8-validate/build/config.gypi | 92 + .../utf-8-validate/build/gyp-mac-tool | 777 + .../utf-8-validate/build/validation.target.mk | 186 + tests/node_modules/utf-8-validate/fallback.js | 62 + tests/node_modules/utf-8-validate/index.js | 7 + .../node_modules/utf-8-validate/package.json | 35 + .../prebuilds/darwin-x64/node.napi.node | Bin 0 -> 33528 bytes .../prebuilds/linux-arm/node.napi.armv6.node | Bin 0 -> 4660 bytes .../prebuilds/linux-arm/node.napi.armv7.node | Bin 0 -> 5452 bytes .../linux-arm64/node.napi.armv8.node | Bin 0 -> 10104 bytes .../prebuilds/linux-x64/node.napi.node | Bin 0 -> 6312 bytes .../prebuilds/win32-ia32/node.napi.node | Bin 0 -> 112128 bytes .../prebuilds/win32-x64/node.napi.node | Bin 0 -> 134656 bytes .../utf-8-validate/src/validation.c | 109 + tests/node_modules/uuid/AUTHORS | 5 + tests/node_modules/uuid/CHANGELOG.md | 119 + tests/node_modules/uuid/LICENSE.md | 21 + tests/node_modules/uuid/README.md | 276 + tests/node_modules/uuid/bin/uuid | 65 + tests/node_modules/uuid/index.js | 8 + tests/node_modules/uuid/lib/bytesToUuid.js | 26 + tests/node_modules/uuid/lib/md5-browser.js | 216 + tests/node_modules/uuid/lib/md5.js | 25 + tests/node_modules/uuid/lib/rng-browser.js | 34 + tests/node_modules/uuid/lib/rng.js | 8 + tests/node_modules/uuid/lib/sha1-browser.js | 89 + tests/node_modules/uuid/lib/sha1.js | 25 + tests/node_modules/uuid/lib/v35.js | 57 + tests/node_modules/uuid/package.json | 49 + tests/node_modules/uuid/v1.js | 109 + tests/node_modules/uuid/v3.js | 4 + tests/node_modules/uuid/v4.js | 29 + tests/node_modules/uuid/v5.js | 3 + tests/node_modules/which/CHANGELOG.md | 166 + tests/node_modules/which/LICENSE | 15 + tests/node_modules/which/README.md | 54 + tests/node_modules/which/bin/node-which | 52 + tests/node_modules/which/package.json | 43 + tests/node_modules/which/which.js | 125 + tests/node_modules/wide-align/LICENSE | 14 + tests/node_modules/wide-align/README.md | 47 + tests/node_modules/wide-align/align.js | 65 + tests/node_modules/wide-align/package.json | 33 + tests/node_modules/workerpool/HISTORY.md | 277 + tests/node_modules/workerpool/LICENSE | 201 + tests/node_modules/workerpool/README.md | 488 + tests/node_modules/workerpool/dist/worker.js | 224 + .../workerpool/dist/worker.js.map | 1 + .../workerpool/dist/workerpool.js | 1647 + .../workerpool/dist/workerpool.js.map | 1 + .../workerpool/dist/workerpool.min.js | 3 + .../dist/workerpool.min.js.LICENSE.txt | 24 + .../workerpool/dist/workerpool.min.js.map | 1 + tests/node_modules/workerpool/package.json | 52 + tests/node_modules/workerpool/src/Pool.js | 416 + tests/node_modules/workerpool/src/Promise.js | 279 + .../workerpool/src/WorkerHandler.js | 496 + .../workerpool/src/debug-port-allocator.js | 28 + .../workerpool/src/environment.js | 36 + .../src/generated/embeddedWorker.js | 6 + tests/node_modules/workerpool/src/header.js | 24 + tests/node_modules/workerpool/src/index.js | 41 + .../workerpool/src/requireFoolWebpack.js | 8 + tests/node_modules/workerpool/src/types.js | 15 + tests/node_modules/workerpool/src/worker.js | 202 + tests/node_modules/wrap-ansi/index.js | 216 + tests/node_modules/wrap-ansi/license | 9 + .../node_modules/ansi-regex/index.d.ts | 37 + .../node_modules/ansi-regex/index.js | 10 + .../wrap-ansi/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 55 + .../node_modules/ansi-regex/readme.md | 78 + .../is-fullwidth-code-point/index.d.ts | 17 + .../is-fullwidth-code-point/index.js | 50 + .../is-fullwidth-code-point/license | 9 + .../is-fullwidth-code-point/package.json | 42 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/string-width/index.d.ts | 29 + .../node_modules/string-width/index.js | 47 + .../node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 56 + .../node_modules/string-width/readme.md | 50 + .../node_modules/strip-ansi/index.d.ts | 17 + .../node_modules/strip-ansi/index.js | 4 + .../wrap-ansi/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 54 + .../node_modules/strip-ansi/readme.md | 46 + tests/node_modules/wrap-ansi/package.json | 62 + tests/node_modules/wrap-ansi/readme.md | 91 + tests/node_modules/wrappy/LICENSE | 15 + tests/node_modules/wrappy/README.md | 36 + tests/node_modules/wrappy/package.json | 29 + tests/node_modules/wrappy/wrappy.js | 33 + tests/node_modules/ws/LICENSE | 21 + tests/node_modules/ws/README.md | 496 + tests/node_modules/ws/browser.js | 8 + tests/node_modules/ws/index.js | 10 + tests/node_modules/ws/lib/buffer-util.js | 129 + tests/node_modules/ws/lib/constants.js | 10 + tests/node_modules/ws/lib/event-target.js | 184 + tests/node_modules/ws/lib/extension.js | 223 + tests/node_modules/ws/lib/limiter.js | 55 + .../node_modules/ws/lib/permessage-deflate.js | 518 + tests/node_modules/ws/lib/receiver.js | 607 + tests/node_modules/ws/lib/sender.js | 409 + tests/node_modules/ws/lib/stream.js | 177 + tests/node_modules/ws/lib/validation.js | 104 + tests/node_modules/ws/lib/websocket-server.js | 447 + tests/node_modules/ws/lib/websocket.js | 1105 + tests/node_modules/ws/package.json | 56 + tests/node_modules/y18n/CHANGELOG.md | 100 + tests/node_modules/y18n/LICENSE | 13 + tests/node_modules/y18n/README.md | 127 + tests/node_modules/y18n/build/index.cjs | 203 + tests/node_modules/y18n/build/lib/cjs.js | 6 + tests/node_modules/y18n/build/lib/index.js | 174 + .../y18n/build/lib/platform-shims/node.js | 19 + tests/node_modules/y18n/index.mjs | 8 + tests/node_modules/y18n/package.json | 70 + tests/node_modules/yargs-parser/CHANGELOG.md | 226 + tests/node_modules/yargs-parser/LICENSE.txt | 14 + tests/node_modules/yargs-parser/README.md | 518 + tests/node_modules/yargs-parser/browser.js | 29 + .../node_modules/yargs-parser/build/index.cjs | 1026 + .../yargs-parser/build/lib/index.js | 53 + .../yargs-parser/build/lib/string-utils.js | 56 + .../build/lib/tokenize-arg-string.js | 35 + .../build/lib/yargs-parser-types.js | 1 + .../yargs-parser/build/lib/yargs-parser.js | 1023 + tests/node_modules/yargs-parser/package.json | 87 + .../node_modules/yargs-unparser/CHANGELOG.md | 82 + tests/node_modules/yargs-unparser/LICENSE | 21 + tests/node_modules/yargs-unparser/README.md | 86 + tests/node_modules/yargs-unparser/index.js | 166 + .../node_modules/camelcase/index.d.ts | 101 + .../node_modules/camelcase/index.js | 91 + .../node_modules/camelcase/license | 9 + .../node_modules/camelcase/package.json | 44 + .../node_modules/camelcase/readme.md | 128 + .../node_modules/yargs-unparser/package.json | 49 + tests/node_modules/yargs/CHANGELOG.md | 88 + tests/node_modules/yargs/LICENSE | 21 + tests/node_modules/yargs/README.md | 202 + tests/node_modules/yargs/browser.mjs | 7 + tests/node_modules/yargs/build/index.cjs | 2920 ++ tests/node_modules/yargs/build/lib/argsert.js | 62 + tests/node_modules/yargs/build/lib/command.js | 382 + .../yargs/build/lib/completion-templates.js | 47 + .../yargs/build/lib/completion.js | 128 + .../yargs/build/lib/middleware.js | 53 + .../yargs/build/lib/parse-command.js | 32 + .../yargs/build/lib/typings/common-types.js | 9 + .../build/lib/typings/yargs-parser-types.js | 1 + tests/node_modules/yargs/build/lib/usage.js | 548 + .../yargs/build/lib/utils/apply-extends.js | 59 + .../yargs/build/lib/utils/is-promise.js | 5 + .../yargs/build/lib/utils/levenshtein.js | 26 + .../yargs/build/lib/utils/obj-filter.js | 10 + .../yargs/build/lib/utils/process-argv.js | 17 + .../yargs/build/lib/utils/set-blocking.js | 12 + .../yargs/build/lib/utils/which-module.js | 10 + .../yargs/build/lib/validation.js | 308 + .../yargs/build/lib/yargs-factory.js | 1143 + tests/node_modules/yargs/build/lib/yerror.js | 7 + tests/node_modules/yargs/helpers/helpers.mjs | 10 + tests/node_modules/yargs/helpers/index.js | 14 + tests/node_modules/yargs/helpers/package.json | 3 + tests/node_modules/yargs/index.cjs | 39 + tests/node_modules/yargs/index.mjs | 8 + .../yargs/lib/platform-shims/browser.mjs | 92 + .../yargs/lib/platform-shims/esm.mjs | 67 + tests/node_modules/yargs/locales/be.json | 46 + tests/node_modules/yargs/locales/de.json | 46 + tests/node_modules/yargs/locales/en.json | 51 + tests/node_modules/yargs/locales/es.json | 46 + tests/node_modules/yargs/locales/fi.json | 49 + tests/node_modules/yargs/locales/fr.json | 53 + tests/node_modules/yargs/locales/hi.json | 49 + tests/node_modules/yargs/locales/hu.json | 46 + tests/node_modules/yargs/locales/id.json | 50 + tests/node_modules/yargs/locales/it.json | 46 + tests/node_modules/yargs/locales/ja.json | 51 + tests/node_modules/yargs/locales/ko.json | 49 + tests/node_modules/yargs/locales/nb.json | 44 + tests/node_modules/yargs/locales/nl.json | 49 + tests/node_modules/yargs/locales/nn.json | 44 + tests/node_modules/yargs/locales/pirate.json | 13 + tests/node_modules/yargs/locales/pl.json | 49 + tests/node_modules/yargs/locales/pt.json | 45 + tests/node_modules/yargs/locales/pt_BR.json | 48 + tests/node_modules/yargs/locales/ru.json | 46 + tests/node_modules/yargs/locales/th.json | 46 + tests/node_modules/yargs/locales/tr.json | 48 + tests/node_modules/yargs/locales/zh_CN.json | 48 + tests/node_modules/yargs/locales/zh_TW.json | 47 + .../yargs/node_modules/ansi-regex/index.d.ts | 37 + .../yargs/node_modules/ansi-regex/index.js | 10 + .../yargs/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 55 + .../yargs/node_modules/ansi-regex/readme.md | 78 + .../is-fullwidth-code-point/index.d.ts | 17 + .../is-fullwidth-code-point/index.js | 50 + .../is-fullwidth-code-point/license | 9 + .../is-fullwidth-code-point/package.json | 42 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/string-width/index.d.ts | 29 + .../yargs/node_modules/string-width/index.js | 47 + .../yargs/node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 56 + .../yargs/node_modules/string-width/readme.md | 50 + .../yargs/node_modules/strip-ansi/index.d.ts | 17 + .../yargs/node_modules/strip-ansi/index.js | 4 + .../yargs/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 54 + .../yargs/node_modules/strip-ansi/readme.md | 46 + tests/node_modules/yargs/package.json | 122 + tests/node_modules/yargs/yargs | 9 + tests/node_modules/yocto-queue/index.d.ts | 56 + tests/node_modules/yocto-queue/index.js | 68 + tests/node_modules/yocto-queue/license | 9 + tests/node_modules/yocto-queue/package.json | 43 + tests/node_modules/yocto-queue/readme.md | 64 + tests/package-lock.json | 2836 ++ tests/package.json | 6 + 4133 files changed, 566633 insertions(+) create mode 100644 .gitignore create mode 100644 Anchor.toml create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 migrations/deploy.js create mode 100644 programs/monaco/Cargo.toml create mode 100644 programs/monaco/Xargo.toml create mode 100644 programs/monaco/src/lib.rs create mode 100644 tests/monaco.js create mode 120000 tests/node_modules/.bin/JSONStream create mode 120000 tests/node_modules/.bin/_mocha create mode 120000 tests/node_modules/.bin/flat create mode 120000 tests/node_modules/.bin/he create mode 120000 tests/node_modules/.bin/jayson create mode 120000 tests/node_modules/.bin/js-yaml create mode 120000 tests/node_modules/.bin/mocha create mode 120000 tests/node_modules/.bin/nanoid create mode 120000 tests/node_modules/.bin/node-gyp-build create mode 120000 tests/node_modules/.bin/node-gyp-build-optional create mode 120000 tests/node_modules/.bin/node-gyp-build-test create mode 120000 tests/node_modules/.bin/node-which create mode 120000 tests/node_modules/.bin/uuid create mode 100644 tests/node_modules/.package-lock.json create mode 100644 tests/node_modules/@babel/runtime/LICENSE create mode 100644 tests/node_modules/@babel/runtime/README.md create mode 100644 tests/node_modules/@babel/runtime/helpers/AsyncGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/AwaitValue.js create mode 100644 tests/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js create mode 100644 tests/node_modules/@babel/runtime/helpers/arrayLikeToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/arrayWithHoles.js create mode 100644 tests/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js create mode 100644 tests/node_modules/@babel/runtime/helpers/assertThisInitialized.js create mode 100644 tests/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js create mode 100644 tests/node_modules/@babel/runtime/helpers/asyncIterator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/asyncToGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classCallCheck.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classNameTDZError.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/construct.js create mode 100644 tests/node_modules/@babel/runtime/helpers/createClass.js create mode 100644 tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/createSuper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/decorate.js create mode 100644 tests/node_modules/@babel/runtime/helpers/defaults.js create mode 100644 tests/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js create mode 100644 tests/node_modules/@babel/runtime/helpers/defineProperty.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/AwaitValue.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/asyncIterator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classCallCheck.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/construct.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/createClass.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/createSuper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/decorate.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/defaults.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/defineProperty.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/extends.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/get.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/inherits.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/instanceof.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/iterableToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/jsx.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/objectSpread.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/objectSpread2.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/package.json create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/readOnlyError.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/set.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/slicedToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/superPropBase.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/tdz.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/temporalRef.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/toArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/toPrimitive.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/typeof.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js create mode 100644 tests/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js create mode 100644 tests/node_modules/@babel/runtime/helpers/extends.js create mode 100644 tests/node_modules/@babel/runtime/helpers/get.js create mode 100644 tests/node_modules/@babel/runtime/helpers/getPrototypeOf.js create mode 100644 tests/node_modules/@babel/runtime/helpers/inherits.js create mode 100644 tests/node_modules/@babel/runtime/helpers/inheritsLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/initializerDefineProperty.js create mode 100644 tests/node_modules/@babel/runtime/helpers/initializerWarningHelper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/instanceof.js create mode 100644 tests/node_modules/@babel/runtime/helpers/interopRequireDefault.js create mode 100644 tests/node_modules/@babel/runtime/helpers/interopRequireWildcard.js create mode 100644 tests/node_modules/@babel/runtime/helpers/isNativeFunction.js create mode 100644 tests/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js create mode 100644 tests/node_modules/@babel/runtime/helpers/iterableToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js create mode 100644 tests/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/jsx.js create mode 100644 tests/node_modules/@babel/runtime/helpers/maybeArrayLike.js create mode 100644 tests/node_modules/@babel/runtime/helpers/newArrowCheck.js create mode 100644 tests/node_modules/@babel/runtime/helpers/nonIterableRest.js create mode 100644 tests/node_modules/@babel/runtime/helpers/nonIterableSpread.js create mode 100644 tests/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js create mode 100644 tests/node_modules/@babel/runtime/helpers/objectSpread.js create mode 100644 tests/node_modules/@babel/runtime/helpers/objectSpread2.js create mode 100644 tests/node_modules/@babel/runtime/helpers/objectWithoutProperties.js create mode 100644 tests/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js create mode 100644 tests/node_modules/@babel/runtime/helpers/readOnlyError.js create mode 100644 tests/node_modules/@babel/runtime/helpers/set.js create mode 100644 tests/node_modules/@babel/runtime/helpers/setPrototypeOf.js create mode 100644 tests/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js create mode 100644 tests/node_modules/@babel/runtime/helpers/slicedToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/superPropBase.js create mode 100644 tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js create mode 100644 tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js create mode 100644 tests/node_modules/@babel/runtime/helpers/tdz.js create mode 100644 tests/node_modules/@babel/runtime/helpers/temporalRef.js create mode 100644 tests/node_modules/@babel/runtime/helpers/temporalUndefined.js create mode 100644 tests/node_modules/@babel/runtime/helpers/toArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/toConsumableArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/toPrimitive.js create mode 100644 tests/node_modules/@babel/runtime/helpers/toPropertyKey.js create mode 100644 tests/node_modules/@babel/runtime/helpers/typeof.js create mode 100644 tests/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js create mode 100644 tests/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js create mode 100644 tests/node_modules/@babel/runtime/helpers/wrapNativeSuper.js create mode 100644 tests/node_modules/@babel/runtime/helpers/wrapRegExp.js create mode 100644 tests/node_modules/@babel/runtime/helpers/writeOnlyError.js create mode 100644 tests/node_modules/@babel/runtime/package.json create mode 100644 tests/node_modules/@babel/runtime/regenerator/index.js create mode 100644 tests/node_modules/@project-serum/anchor/#package.json# create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/error.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/error.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/idl.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/idl.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/provider.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/provider.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/error.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/error.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/error.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/error.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/idl.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/idl.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/common.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/common.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/context.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/context.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/event.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/event.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/provider.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/provider.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/workspace.js create mode 100644 tests/node_modules/@project-serum/anchor/dist/esm/workspace.js.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/idl.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/idl.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/index.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/common.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/common.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/context.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/context.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/event.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/event.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/index.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/provider.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/provider.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/tsconfig.cjs.tsbuildinfo create mode 100644 tests/node_modules/@project-serum/anchor/dist/tsconfig.tsbuildinfo create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/dist/workspace.d.ts create mode 100644 tests/node_modules/@project-serum/anchor/dist/workspace.d.ts.map create mode 100644 tests/node_modules/@project-serum/anchor/jest.config.js create mode 100644 tests/node_modules/@project-serum/anchor/package.json create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/accounts.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/common.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/event.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/idl.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/index.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/instruction.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/state.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/coder/types.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/error.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/idl.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/index.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/common.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/context.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/event.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/index.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/account.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/index.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/instruction.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/rpc.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/simulate.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/state.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/program/namespace/transaction.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/provider.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/bytes/base64.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/bytes/bs58.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/bytes/hex.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/bytes/index.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/bytes/utf8.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/common.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/features.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/index.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/pubkey.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/rpc.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/sha256.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/utils/token.ts create mode 100644 tests/node_modules/@project-serum/anchor/src/workspace.ts create mode 100644 tests/node_modules/@project-serum/anchor/tests/events.spec.ts create mode 100644 tests/node_modules/@project-serum/anchor/tsconfig.cjs.json create mode 100644 tests/node_modules/@project-serum/anchor/tsconfig.json create mode 100644 tests/node_modules/@project-serum/anchor/types/buffer-layout/index.d.ts create mode 100644 tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts create mode 100644 tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts.map create mode 100644 tests/node_modules/@project-serum/borsh/dist/lib/index.js create mode 100644 tests/node_modules/@project-serum/borsh/dist/lib/index.js.map create mode 100644 tests/node_modules/@project-serum/borsh/dist/tsconfig.tsbuildinfo create mode 100644 tests/node_modules/@project-serum/borsh/package.json create mode 100644 tests/node_modules/@solana/buffer-layout/LICENSE create mode 100644 tests/node_modules/@solana/buffer-layout/README.md create mode 100644 tests/node_modules/@solana/buffer-layout/lib/Layout.d.ts create mode 100644 tests/node_modules/@solana/buffer-layout/lib/Layout.js create mode 100644 tests/node_modules/@solana/buffer-layout/lib/Layout.js.map create mode 100644 tests/node_modules/@solana/buffer-layout/node_modules/buffer/AUTHORS.md create mode 100644 tests/node_modules/@solana/buffer-layout/node_modules/buffer/LICENSE create mode 100644 tests/node_modules/@solana/buffer-layout/node_modules/buffer/README.md create mode 100644 tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.d.ts create mode 100644 tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.js create mode 100644 tests/node_modules/@solana/buffer-layout/node_modules/buffer/package.json create mode 100644 tests/node_modules/@solana/buffer-layout/package.json create mode 100644 tests/node_modules/@solana/web3.js/LICENSE create mode 100644 tests/node_modules/@solana/web3.js/README.md create mode 100644 tests/node_modules/@solana/web3.js/lib/index.browser.esm.js create mode 100644 tests/node_modules/@solana/web3.js/lib/index.browser.esm.js.map create mode 100644 tests/node_modules/@solana/web3.js/lib/index.cjs.js create mode 100644 tests/node_modules/@solana/web3.js/lib/index.cjs.js.map create mode 100644 tests/node_modules/@solana/web3.js/lib/index.d.ts create mode 100644 tests/node_modules/@solana/web3.js/lib/index.esm.js create mode 100644 tests/node_modules/@solana/web3.js/lib/index.esm.js.map create mode 100644 tests/node_modules/@solana/web3.js/lib/index.iife.js create mode 100644 tests/node_modules/@solana/web3.js/lib/index.iife.js.map create mode 100644 tests/node_modules/@solana/web3.js/lib/index.iife.min.js create mode 100644 tests/node_modules/@solana/web3.js/lib/index.iife.min.js.map create mode 100644 tests/node_modules/@solana/web3.js/module.flow.js create mode 100644 tests/node_modules/@solana/web3.js/package.json create mode 100644 tests/node_modules/@solana/web3.js/src/account.ts create mode 100644 tests/node_modules/@solana/web3.js/src/agent-manager.ts create mode 100644 tests/node_modules/@solana/web3.js/src/blockhash.ts create mode 100644 tests/node_modules/@solana/web3.js/src/bpf-loader-deprecated.ts create mode 100644 tests/node_modules/@solana/web3.js/src/bpf-loader.ts create mode 100644 tests/node_modules/@solana/web3.js/src/connection.ts create mode 100644 tests/node_modules/@solana/web3.js/src/epoch-schedule.ts create mode 100644 tests/node_modules/@solana/web3.js/src/errors.ts create mode 100644 tests/node_modules/@solana/web3.js/src/fee-calculator.ts create mode 100644 tests/node_modules/@solana/web3.js/src/index.ts create mode 100644 tests/node_modules/@solana/web3.js/src/instruction.ts create mode 100644 tests/node_modules/@solana/web3.js/src/keypair.ts create mode 100644 tests/node_modules/@solana/web3.js/src/layout.ts create mode 100644 tests/node_modules/@solana/web3.js/src/loader.ts create mode 100644 tests/node_modules/@solana/web3.js/src/message.ts create mode 100644 tests/node_modules/@solana/web3.js/src/nonce-account.ts create mode 100644 tests/node_modules/@solana/web3.js/src/publickey.ts create mode 100644 tests/node_modules/@solana/web3.js/src/secp256k1-program.ts create mode 100644 tests/node_modules/@solana/web3.js/src/stake-program.ts create mode 100644 tests/node_modules/@solana/web3.js/src/system-program.ts create mode 100644 tests/node_modules/@solana/web3.js/src/sysvar.ts create mode 100644 tests/node_modules/@solana/web3.js/src/timing.ts create mode 100644 tests/node_modules/@solana/web3.js/src/transaction.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/assert.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/borsh-schema.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/cluster.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/promise-timeout.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/send-and-confirm-raw-transaction.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/send-and-confirm-transaction.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/shortvec-encoding.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/sleep.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/to-buffer.ts create mode 100644 tests/node_modules/@solana/web3.js/src/util/url.ts create mode 100644 tests/node_modules/@solana/web3.js/src/validator-info.ts create mode 100644 tests/node_modules/@solana/web3.js/src/vote-account.ts create mode 100644 tests/node_modules/@types/bn.js/LICENSE create mode 100644 tests/node_modules/@types/bn.js/README.md create mode 100644 tests/node_modules/@types/bn.js/index.d.ts create mode 100644 tests/node_modules/@types/bn.js/package.json create mode 100755 tests/node_modules/@types/connect/LICENSE create mode 100755 tests/node_modules/@types/connect/README.md create mode 100755 tests/node_modules/@types/connect/index.d.ts create mode 100755 tests/node_modules/@types/connect/package.json create mode 100755 tests/node_modules/@types/express-serve-static-core/LICENSE create mode 100755 tests/node_modules/@types/express-serve-static-core/README.md create mode 100755 tests/node_modules/@types/express-serve-static-core/index.d.ts create mode 100755 tests/node_modules/@types/express-serve-static-core/package.json create mode 100755 tests/node_modules/@types/express-serve-static-core/ts4.0/index.d.ts create mode 100755 tests/node_modules/@types/lodash/LICENSE create mode 100755 tests/node_modules/@types/lodash/README.md create mode 100755 tests/node_modules/@types/lodash/add.d.ts create mode 100755 tests/node_modules/@types/lodash/after.d.ts create mode 100755 tests/node_modules/@types/lodash/ary.d.ts create mode 100755 tests/node_modules/@types/lodash/assign.d.ts create mode 100755 tests/node_modules/@types/lodash/assignIn.d.ts create mode 100755 tests/node_modules/@types/lodash/assignInWith.d.ts create mode 100755 tests/node_modules/@types/lodash/assignWith.d.ts create mode 100755 tests/node_modules/@types/lodash/at.d.ts create mode 100755 tests/node_modules/@types/lodash/attempt.d.ts create mode 100755 tests/node_modules/@types/lodash/before.d.ts create mode 100755 tests/node_modules/@types/lodash/bind.d.ts create mode 100755 tests/node_modules/@types/lodash/bindAll.d.ts create mode 100755 tests/node_modules/@types/lodash/bindKey.d.ts create mode 100755 tests/node_modules/@types/lodash/camelCase.d.ts create mode 100755 tests/node_modules/@types/lodash/capitalize.d.ts create mode 100755 tests/node_modules/@types/lodash/castArray.d.ts create mode 100755 tests/node_modules/@types/lodash/ceil.d.ts create mode 100755 tests/node_modules/@types/lodash/chain.d.ts create mode 100755 tests/node_modules/@types/lodash/chunk.d.ts create mode 100755 tests/node_modules/@types/lodash/clamp.d.ts create mode 100755 tests/node_modules/@types/lodash/clone.d.ts create mode 100755 tests/node_modules/@types/lodash/cloneDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/cloneDeepWith.d.ts create mode 100755 tests/node_modules/@types/lodash/cloneWith.d.ts create mode 100755 tests/node_modules/@types/lodash/common/array.d.ts create mode 100755 tests/node_modules/@types/lodash/common/collection.d.ts create mode 100755 tests/node_modules/@types/lodash/common/common.d.ts create mode 100755 tests/node_modules/@types/lodash/common/date.d.ts create mode 100755 tests/node_modules/@types/lodash/common/function.d.ts create mode 100755 tests/node_modules/@types/lodash/common/lang.d.ts create mode 100755 tests/node_modules/@types/lodash/common/math.d.ts create mode 100755 tests/node_modules/@types/lodash/common/number.d.ts create mode 100755 tests/node_modules/@types/lodash/common/object.d.ts create mode 100755 tests/node_modules/@types/lodash/common/seq.d.ts create mode 100755 tests/node_modules/@types/lodash/common/string.d.ts create mode 100755 tests/node_modules/@types/lodash/common/util.d.ts create mode 100755 tests/node_modules/@types/lodash/compact.d.ts create mode 100755 tests/node_modules/@types/lodash/concat.d.ts create mode 100755 tests/node_modules/@types/lodash/cond.d.ts create mode 100755 tests/node_modules/@types/lodash/conformsTo.d.ts create mode 100755 tests/node_modules/@types/lodash/constant.d.ts create mode 100755 tests/node_modules/@types/lodash/countBy.d.ts create mode 100755 tests/node_modules/@types/lodash/create.d.ts create mode 100755 tests/node_modules/@types/lodash/curry.d.ts create mode 100755 tests/node_modules/@types/lodash/curryRight.d.ts create mode 100755 tests/node_modules/@types/lodash/debounce.d.ts create mode 100755 tests/node_modules/@types/lodash/deburr.d.ts create mode 100755 tests/node_modules/@types/lodash/defaultTo.d.ts create mode 100755 tests/node_modules/@types/lodash/defaults.d.ts create mode 100755 tests/node_modules/@types/lodash/defaultsDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/defer.d.ts create mode 100755 tests/node_modules/@types/lodash/delay.d.ts create mode 100755 tests/node_modules/@types/lodash/difference.d.ts create mode 100755 tests/node_modules/@types/lodash/differenceBy.d.ts create mode 100755 tests/node_modules/@types/lodash/differenceWith.d.ts create mode 100755 tests/node_modules/@types/lodash/divide.d.ts create mode 100755 tests/node_modules/@types/lodash/drop.d.ts create mode 100755 tests/node_modules/@types/lodash/dropRight.d.ts create mode 100755 tests/node_modules/@types/lodash/dropRightWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/dropWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/each.d.ts create mode 100755 tests/node_modules/@types/lodash/eachRight.d.ts create mode 100755 tests/node_modules/@types/lodash/endsWith.d.ts create mode 100755 tests/node_modules/@types/lodash/entries.d.ts create mode 100755 tests/node_modules/@types/lodash/entriesIn.d.ts create mode 100755 tests/node_modules/@types/lodash/eq.d.ts create mode 100755 tests/node_modules/@types/lodash/escape.d.ts create mode 100755 tests/node_modules/@types/lodash/escapeRegExp.d.ts create mode 100755 tests/node_modules/@types/lodash/every.d.ts create mode 100755 tests/node_modules/@types/lodash/extend.d.ts create mode 100755 tests/node_modules/@types/lodash/extendWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fill.d.ts create mode 100755 tests/node_modules/@types/lodash/filter.d.ts create mode 100755 tests/node_modules/@types/lodash/find.d.ts create mode 100755 tests/node_modules/@types/lodash/findIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/findKey.d.ts create mode 100755 tests/node_modules/@types/lodash/findLast.d.ts create mode 100755 tests/node_modules/@types/lodash/findLastIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/findLastKey.d.ts create mode 100755 tests/node_modules/@types/lodash/first.d.ts create mode 100755 tests/node_modules/@types/lodash/flatMap.d.ts create mode 100755 tests/node_modules/@types/lodash/flatMapDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/flatMapDepth.d.ts create mode 100755 tests/node_modules/@types/lodash/flatten.d.ts create mode 100755 tests/node_modules/@types/lodash/flattenDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/flattenDepth.d.ts create mode 100755 tests/node_modules/@types/lodash/flip.d.ts create mode 100755 tests/node_modules/@types/lodash/floor.d.ts create mode 100755 tests/node_modules/@types/lodash/flow.d.ts create mode 100755 tests/node_modules/@types/lodash/flowRight.d.ts create mode 100755 tests/node_modules/@types/lodash/forEach.d.ts create mode 100755 tests/node_modules/@types/lodash/forEachRight.d.ts create mode 100755 tests/node_modules/@types/lodash/forIn.d.ts create mode 100755 tests/node_modules/@types/lodash/forInRight.d.ts create mode 100755 tests/node_modules/@types/lodash/forOwn.d.ts create mode 100755 tests/node_modules/@types/lodash/forOwnRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/F.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/T.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/__.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/add.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/after.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/all.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/allPass.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/always.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/any.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/anyPass.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/apply.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/ary.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assign.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignAllWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignInAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignInAllWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignInWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assignWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assoc.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/assocPath.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/at.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/attempt.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/before.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/bind.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/bindAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/bindKey.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/camelCase.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/capitalize.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/castArray.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/ceil.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/chunk.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/clamp.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/clone.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/cloneDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/cloneDeepWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/cloneWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/compact.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/complement.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/compose.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/concat.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/cond.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/conforms.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/conformsTo.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/constant.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/contains.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/convert.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/countBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/create.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/curry.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/curryN.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/curryRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/curryRightN.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/debounce.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/deburr.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/defaultTo.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/defaults.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/defaultsAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/defaultsDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/defaultsDeepAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/defer.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/delay.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/difference.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/differenceBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/differenceWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dissoc.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dissocPath.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/divide.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/drop.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dropLast.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dropLastWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dropRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dropRightWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/dropWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/each.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/eachRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/endsWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/entries.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/entriesIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/eq.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/equals.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/escape.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/escapeRegExp.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/every.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/extend.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/extendAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/extendAllWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/extendWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/fill.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/filter.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/find.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findIndexFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findKey.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findLast.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findLastFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findLastIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findLastIndexFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/findLastKey.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/first.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flatMap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flatMapDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flatMapDepth.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flatten.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flattenDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flattenDepth.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flip.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/floor.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flow.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/flowRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/forEach.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/forEachRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/forIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/forInRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/forOwn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/forOwnRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/fromPairs.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/functions.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/functionsIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/get.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/getOr.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/groupBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/gt.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/gte.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/has.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/hasIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/head.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/identical.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/identity.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/inRange.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/includes.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/includesFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/indexBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/indexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/indexOfFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/init.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/initial.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/intersection.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/intersectionBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/intersectionWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invert.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invertBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invertObj.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invoke.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invokeArgs.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invokeArgsMap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/invokeMap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isArguments.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isArray.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isArrayBuffer.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isArrayLike.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isArrayLikeObject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isBoolean.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isBuffer.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isDate.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isElement.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isEmpty.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isEqual.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isEqualWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isError.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isFinite.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isFunction.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isLength.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isMap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isMatch.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isMatchWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isNaN.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isNative.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isNil.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isNull.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isNumber.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isObject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isObjectLike.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isPlainObject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isRegExp.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isSafeInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isSet.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isString.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isSymbol.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isTypedArray.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isUndefined.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isWeakMap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/isWeakSet.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/iteratee.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/join.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/juxt.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/kebabCase.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/keyBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/keys.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/keysIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/last.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/lastIndexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/lastIndexOfFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/lowerCase.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/lowerFirst.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/lt.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/lte.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/map.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/mapKeys.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/mapValues.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/matches.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/matchesProperty.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/max.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/maxBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/mean.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/meanBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/memoize.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/merge.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/mergeAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/mergeAllWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/mergeWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/method.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/methodOf.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/min.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/minBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/multiply.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/nAry.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/negate.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/noConflict.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/noop.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/now.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/nth.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/nthArg.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/omit.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/omitAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/omitBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/once.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/orderBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/over.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/overArgs.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/overEvery.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/overSome.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pad.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/padChars.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/padCharsEnd.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/padCharsStart.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/padEnd.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/padStart.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/parseInt.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/partial.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/partialRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/partition.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/path.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pathEq.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pathOr.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/paths.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pick.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pickAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pickBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pipe.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/placeholder.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pluck.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/prop.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/propEq.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/propOr.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/property.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/propertyOf.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/props.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pull.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pullAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pullAllBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pullAllWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/pullAt.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/random.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/range.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/rangeRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/rangeStep.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/rangeStepRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/rearg.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/reduce.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/reduceRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/reject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/remove.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/repeat.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/replace.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/rest.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/restFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/result.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/reverse.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/round.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/runInContext.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sample.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sampleSize.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/set.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/setWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/shuffle.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/size.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/slice.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/snakeCase.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/some.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedIndexBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedIndexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedLastIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedLastIndexBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedLastIndexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedUniq.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sortedUniqBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/split.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/spread.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/spreadFrom.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/startCase.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/startsWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/stubArray.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/stubFalse.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/stubObject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/stubString.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/stubTrue.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/subtract.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sum.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/sumBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/symmetricDifference.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/symmetricDifferenceBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/symmetricDifferenceWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/tail.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/take.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/takeLast.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/takeLastWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/takeRight.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/takeRightWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/takeWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/tap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/template.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/throttle.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/thru.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/times.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toArray.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toFinite.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toLength.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toLower.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toNumber.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toPairs.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toPairsIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toPath.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toPlainObject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toSafeInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toString.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/toUpper.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/transform.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/trim.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/trimChars.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/trimCharsEnd.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/trimCharsStart.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/trimEnd.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/trimStart.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/truncate.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unapply.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unary.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unescape.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/union.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unionBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unionWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/uniq.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/uniqBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/uniqWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/uniqueId.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unnest.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unset.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unzip.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/unzipWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/update.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/updateWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/upperCase.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/upperFirst.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/useWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/values.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/valuesIn.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/where.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/whereEq.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/without.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/words.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/wrap.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/xor.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/xorBy.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/xorWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/zip.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/zipAll.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/zipObj.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/zipObject.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/zipObjectDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/fp/zipWith.d.ts create mode 100755 tests/node_modules/@types/lodash/fromPairs.d.ts create mode 100755 tests/node_modules/@types/lodash/functions.d.ts create mode 100755 tests/node_modules/@types/lodash/functionsIn.d.ts create mode 100755 tests/node_modules/@types/lodash/get.d.ts create mode 100755 tests/node_modules/@types/lodash/groupBy.d.ts create mode 100755 tests/node_modules/@types/lodash/gt.d.ts create mode 100755 tests/node_modules/@types/lodash/gte.d.ts create mode 100755 tests/node_modules/@types/lodash/has.d.ts create mode 100755 tests/node_modules/@types/lodash/hasIn.d.ts create mode 100755 tests/node_modules/@types/lodash/head.d.ts create mode 100755 tests/node_modules/@types/lodash/identity.d.ts create mode 100755 tests/node_modules/@types/lodash/inRange.d.ts create mode 100755 tests/node_modules/@types/lodash/includes.d.ts create mode 100755 tests/node_modules/@types/lodash/index.d.ts create mode 100755 tests/node_modules/@types/lodash/indexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/initial.d.ts create mode 100755 tests/node_modules/@types/lodash/intersection.d.ts create mode 100755 tests/node_modules/@types/lodash/intersectionBy.d.ts create mode 100755 tests/node_modules/@types/lodash/intersectionWith.d.ts create mode 100755 tests/node_modules/@types/lodash/invert.d.ts create mode 100755 tests/node_modules/@types/lodash/invertBy.d.ts create mode 100755 tests/node_modules/@types/lodash/invoke.d.ts create mode 100755 tests/node_modules/@types/lodash/invokeMap.d.ts create mode 100755 tests/node_modules/@types/lodash/isArguments.d.ts create mode 100755 tests/node_modules/@types/lodash/isArray.d.ts create mode 100755 tests/node_modules/@types/lodash/isArrayBuffer.d.ts create mode 100755 tests/node_modules/@types/lodash/isArrayLike.d.ts create mode 100755 tests/node_modules/@types/lodash/isArrayLikeObject.d.ts create mode 100755 tests/node_modules/@types/lodash/isBoolean.d.ts create mode 100755 tests/node_modules/@types/lodash/isBuffer.d.ts create mode 100755 tests/node_modules/@types/lodash/isDate.d.ts create mode 100755 tests/node_modules/@types/lodash/isElement.d.ts create mode 100755 tests/node_modules/@types/lodash/isEmpty.d.ts create mode 100755 tests/node_modules/@types/lodash/isEqual.d.ts create mode 100755 tests/node_modules/@types/lodash/isEqualWith.d.ts create mode 100755 tests/node_modules/@types/lodash/isError.d.ts create mode 100755 tests/node_modules/@types/lodash/isFinite.d.ts create mode 100755 tests/node_modules/@types/lodash/isFunction.d.ts create mode 100755 tests/node_modules/@types/lodash/isInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/isLength.d.ts create mode 100755 tests/node_modules/@types/lodash/isMap.d.ts create mode 100755 tests/node_modules/@types/lodash/isMatch.d.ts create mode 100755 tests/node_modules/@types/lodash/isMatchWith.d.ts create mode 100755 tests/node_modules/@types/lodash/isNaN.d.ts create mode 100755 tests/node_modules/@types/lodash/isNative.d.ts create mode 100755 tests/node_modules/@types/lodash/isNil.d.ts create mode 100755 tests/node_modules/@types/lodash/isNull.d.ts create mode 100755 tests/node_modules/@types/lodash/isNumber.d.ts create mode 100755 tests/node_modules/@types/lodash/isObject.d.ts create mode 100755 tests/node_modules/@types/lodash/isObjectLike.d.ts create mode 100755 tests/node_modules/@types/lodash/isPlainObject.d.ts create mode 100755 tests/node_modules/@types/lodash/isRegExp.d.ts create mode 100755 tests/node_modules/@types/lodash/isSafeInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/isSet.d.ts create mode 100755 tests/node_modules/@types/lodash/isString.d.ts create mode 100755 tests/node_modules/@types/lodash/isSymbol.d.ts create mode 100755 tests/node_modules/@types/lodash/isTypedArray.d.ts create mode 100755 tests/node_modules/@types/lodash/isUndefined.d.ts create mode 100755 tests/node_modules/@types/lodash/isWeakMap.d.ts create mode 100755 tests/node_modules/@types/lodash/isWeakSet.d.ts create mode 100755 tests/node_modules/@types/lodash/iteratee.d.ts create mode 100755 tests/node_modules/@types/lodash/join.d.ts create mode 100755 tests/node_modules/@types/lodash/kebabCase.d.ts create mode 100755 tests/node_modules/@types/lodash/keyBy.d.ts create mode 100755 tests/node_modules/@types/lodash/keys.d.ts create mode 100755 tests/node_modules/@types/lodash/keysIn.d.ts create mode 100755 tests/node_modules/@types/lodash/last.d.ts create mode 100755 tests/node_modules/@types/lodash/lastIndexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/lowerCase.d.ts create mode 100755 tests/node_modules/@types/lodash/lowerFirst.d.ts create mode 100755 tests/node_modules/@types/lodash/lt.d.ts create mode 100755 tests/node_modules/@types/lodash/lte.d.ts create mode 100755 tests/node_modules/@types/lodash/map.d.ts create mode 100755 tests/node_modules/@types/lodash/mapKeys.d.ts create mode 100755 tests/node_modules/@types/lodash/mapValues.d.ts create mode 100755 tests/node_modules/@types/lodash/matches.d.ts create mode 100755 tests/node_modules/@types/lodash/matchesProperty.d.ts create mode 100755 tests/node_modules/@types/lodash/max.d.ts create mode 100755 tests/node_modules/@types/lodash/maxBy.d.ts create mode 100755 tests/node_modules/@types/lodash/mean.d.ts create mode 100755 tests/node_modules/@types/lodash/meanBy.d.ts create mode 100755 tests/node_modules/@types/lodash/memoize.d.ts create mode 100755 tests/node_modules/@types/lodash/merge.d.ts create mode 100755 tests/node_modules/@types/lodash/mergeWith.d.ts create mode 100755 tests/node_modules/@types/lodash/method.d.ts create mode 100755 tests/node_modules/@types/lodash/methodOf.d.ts create mode 100755 tests/node_modules/@types/lodash/min.d.ts create mode 100755 tests/node_modules/@types/lodash/minBy.d.ts create mode 100755 tests/node_modules/@types/lodash/mixin.d.ts create mode 100755 tests/node_modules/@types/lodash/multiply.d.ts create mode 100755 tests/node_modules/@types/lodash/negate.d.ts create mode 100755 tests/node_modules/@types/lodash/noConflict.d.ts create mode 100755 tests/node_modules/@types/lodash/noop.d.ts create mode 100755 tests/node_modules/@types/lodash/now.d.ts create mode 100755 tests/node_modules/@types/lodash/nth.d.ts create mode 100755 tests/node_modules/@types/lodash/nthArg.d.ts create mode 100755 tests/node_modules/@types/lodash/omit.d.ts create mode 100755 tests/node_modules/@types/lodash/omitBy.d.ts create mode 100755 tests/node_modules/@types/lodash/once.d.ts create mode 100755 tests/node_modules/@types/lodash/orderBy.d.ts create mode 100755 tests/node_modules/@types/lodash/over.d.ts create mode 100755 tests/node_modules/@types/lodash/overArgs.d.ts create mode 100755 tests/node_modules/@types/lodash/overEvery.d.ts create mode 100755 tests/node_modules/@types/lodash/overSome.d.ts create mode 100755 tests/node_modules/@types/lodash/package.json create mode 100755 tests/node_modules/@types/lodash/pad.d.ts create mode 100755 tests/node_modules/@types/lodash/padEnd.d.ts create mode 100755 tests/node_modules/@types/lodash/padStart.d.ts create mode 100755 tests/node_modules/@types/lodash/parseInt.d.ts create mode 100755 tests/node_modules/@types/lodash/partial.d.ts create mode 100755 tests/node_modules/@types/lodash/partialRight.d.ts create mode 100755 tests/node_modules/@types/lodash/partition.d.ts create mode 100755 tests/node_modules/@types/lodash/pick.d.ts create mode 100755 tests/node_modules/@types/lodash/pickBy.d.ts create mode 100755 tests/node_modules/@types/lodash/property.d.ts create mode 100755 tests/node_modules/@types/lodash/propertyOf.d.ts create mode 100755 tests/node_modules/@types/lodash/pull.d.ts create mode 100755 tests/node_modules/@types/lodash/pullAll.d.ts create mode 100755 tests/node_modules/@types/lodash/pullAllBy.d.ts create mode 100755 tests/node_modules/@types/lodash/pullAllWith.d.ts create mode 100755 tests/node_modules/@types/lodash/pullAt.d.ts create mode 100755 tests/node_modules/@types/lodash/random.d.ts create mode 100755 tests/node_modules/@types/lodash/range.d.ts create mode 100755 tests/node_modules/@types/lodash/rangeRight.d.ts create mode 100755 tests/node_modules/@types/lodash/rearg.d.ts create mode 100755 tests/node_modules/@types/lodash/reduce.d.ts create mode 100755 tests/node_modules/@types/lodash/reduceRight.d.ts create mode 100755 tests/node_modules/@types/lodash/reject.d.ts create mode 100755 tests/node_modules/@types/lodash/remove.d.ts create mode 100755 tests/node_modules/@types/lodash/repeat.d.ts create mode 100755 tests/node_modules/@types/lodash/replace.d.ts create mode 100755 tests/node_modules/@types/lodash/rest.d.ts create mode 100755 tests/node_modules/@types/lodash/result.d.ts create mode 100755 tests/node_modules/@types/lodash/reverse.d.ts create mode 100755 tests/node_modules/@types/lodash/round.d.ts create mode 100755 tests/node_modules/@types/lodash/runInContext.d.ts create mode 100755 tests/node_modules/@types/lodash/sample.d.ts create mode 100755 tests/node_modules/@types/lodash/sampleSize.d.ts create mode 100755 tests/node_modules/@types/lodash/set.d.ts create mode 100755 tests/node_modules/@types/lodash/setWith.d.ts create mode 100755 tests/node_modules/@types/lodash/shuffle.d.ts create mode 100755 tests/node_modules/@types/lodash/size.d.ts create mode 100755 tests/node_modules/@types/lodash/slice.d.ts create mode 100755 tests/node_modules/@types/lodash/snakeCase.d.ts create mode 100755 tests/node_modules/@types/lodash/some.d.ts create mode 100755 tests/node_modules/@types/lodash/sortBy.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedIndexBy.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedIndexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedLastIndex.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedLastIndexBy.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedLastIndexOf.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedUniq.d.ts create mode 100755 tests/node_modules/@types/lodash/sortedUniqBy.d.ts create mode 100755 tests/node_modules/@types/lodash/split.d.ts create mode 100755 tests/node_modules/@types/lodash/spread.d.ts create mode 100755 tests/node_modules/@types/lodash/startCase.d.ts create mode 100755 tests/node_modules/@types/lodash/startsWith.d.ts create mode 100755 tests/node_modules/@types/lodash/stubFalse.d.ts create mode 100755 tests/node_modules/@types/lodash/stubTrue.d.ts create mode 100755 tests/node_modules/@types/lodash/subtract.d.ts create mode 100755 tests/node_modules/@types/lodash/sum.d.ts create mode 100755 tests/node_modules/@types/lodash/sumBy.d.ts create mode 100755 tests/node_modules/@types/lodash/tail.d.ts create mode 100755 tests/node_modules/@types/lodash/take.d.ts create mode 100755 tests/node_modules/@types/lodash/takeRight.d.ts create mode 100755 tests/node_modules/@types/lodash/takeRightWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/takeWhile.d.ts create mode 100755 tests/node_modules/@types/lodash/tap.d.ts create mode 100755 tests/node_modules/@types/lodash/template.d.ts create mode 100755 tests/node_modules/@types/lodash/throttle.d.ts create mode 100755 tests/node_modules/@types/lodash/thru.d.ts create mode 100755 tests/node_modules/@types/lodash/times.d.ts create mode 100755 tests/node_modules/@types/lodash/toArray.d.ts create mode 100755 tests/node_modules/@types/lodash/toFinite.d.ts create mode 100755 tests/node_modules/@types/lodash/toInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/toLength.d.ts create mode 100755 tests/node_modules/@types/lodash/toLower.d.ts create mode 100755 tests/node_modules/@types/lodash/toNumber.d.ts create mode 100755 tests/node_modules/@types/lodash/toPairs.d.ts create mode 100755 tests/node_modules/@types/lodash/toPairsIn.d.ts create mode 100755 tests/node_modules/@types/lodash/toPath.d.ts create mode 100755 tests/node_modules/@types/lodash/toPlainObject.d.ts create mode 100755 tests/node_modules/@types/lodash/toSafeInteger.d.ts create mode 100755 tests/node_modules/@types/lodash/toString.d.ts create mode 100755 tests/node_modules/@types/lodash/toUpper.d.ts create mode 100755 tests/node_modules/@types/lodash/transform.d.ts create mode 100755 tests/node_modules/@types/lodash/trim.d.ts create mode 100755 tests/node_modules/@types/lodash/trimEnd.d.ts create mode 100755 tests/node_modules/@types/lodash/trimStart.d.ts create mode 100755 tests/node_modules/@types/lodash/truncate.d.ts create mode 100755 tests/node_modules/@types/lodash/unary.d.ts create mode 100755 tests/node_modules/@types/lodash/unescape.d.ts create mode 100755 tests/node_modules/@types/lodash/union.d.ts create mode 100755 tests/node_modules/@types/lodash/unionBy.d.ts create mode 100755 tests/node_modules/@types/lodash/unionWith.d.ts create mode 100755 tests/node_modules/@types/lodash/uniq.d.ts create mode 100755 tests/node_modules/@types/lodash/uniqBy.d.ts create mode 100755 tests/node_modules/@types/lodash/uniqWith.d.ts create mode 100755 tests/node_modules/@types/lodash/uniqueId.d.ts create mode 100755 tests/node_modules/@types/lodash/unset.d.ts create mode 100755 tests/node_modules/@types/lodash/unzip.d.ts create mode 100755 tests/node_modules/@types/lodash/unzipWith.d.ts create mode 100755 tests/node_modules/@types/lodash/update.d.ts create mode 100755 tests/node_modules/@types/lodash/updateWith.d.ts create mode 100755 tests/node_modules/@types/lodash/upperCase.d.ts create mode 100755 tests/node_modules/@types/lodash/upperFirst.d.ts create mode 100755 tests/node_modules/@types/lodash/values.d.ts create mode 100755 tests/node_modules/@types/lodash/valuesIn.d.ts create mode 100755 tests/node_modules/@types/lodash/without.d.ts create mode 100755 tests/node_modules/@types/lodash/words.d.ts create mode 100755 tests/node_modules/@types/lodash/wrap.d.ts create mode 100755 tests/node_modules/@types/lodash/xor.d.ts create mode 100755 tests/node_modules/@types/lodash/xorBy.d.ts create mode 100755 tests/node_modules/@types/lodash/xorWith.d.ts create mode 100755 tests/node_modules/@types/lodash/zip.d.ts create mode 100755 tests/node_modules/@types/lodash/zipObject.d.ts create mode 100755 tests/node_modules/@types/lodash/zipObjectDeep.d.ts create mode 100755 tests/node_modules/@types/lodash/zipWith.d.ts create mode 100755 tests/node_modules/@types/node/LICENSE create mode 100755 tests/node_modules/@types/node/README.md create mode 100755 tests/node_modules/@types/node/assert.d.ts create mode 100755 tests/node_modules/@types/node/assert/strict.d.ts create mode 100755 tests/node_modules/@types/node/async_hooks.d.ts create mode 100755 tests/node_modules/@types/node/buffer.d.ts create mode 100755 tests/node_modules/@types/node/child_process.d.ts create mode 100755 tests/node_modules/@types/node/cluster.d.ts create mode 100755 tests/node_modules/@types/node/console.d.ts create mode 100755 tests/node_modules/@types/node/constants.d.ts create mode 100755 tests/node_modules/@types/node/crypto.d.ts create mode 100755 tests/node_modules/@types/node/dgram.d.ts create mode 100755 tests/node_modules/@types/node/diagnostics_channel.d.ts create mode 100755 tests/node_modules/@types/node/dns.d.ts create mode 100755 tests/node_modules/@types/node/dns/promises.d.ts create mode 100755 tests/node_modules/@types/node/domain.d.ts create mode 100755 tests/node_modules/@types/node/events.d.ts create mode 100755 tests/node_modules/@types/node/fs.d.ts create mode 100755 tests/node_modules/@types/node/fs/promises.d.ts create mode 100755 tests/node_modules/@types/node/globals.d.ts create mode 100755 tests/node_modules/@types/node/globals.global.d.ts create mode 100755 tests/node_modules/@types/node/http.d.ts create mode 100755 tests/node_modules/@types/node/http2.d.ts create mode 100755 tests/node_modules/@types/node/https.d.ts create mode 100755 tests/node_modules/@types/node/index.d.ts create mode 100755 tests/node_modules/@types/node/inspector.d.ts create mode 100755 tests/node_modules/@types/node/module.d.ts create mode 100755 tests/node_modules/@types/node/net.d.ts create mode 100755 tests/node_modules/@types/node/os.d.ts create mode 100755 tests/node_modules/@types/node/package.json create mode 100755 tests/node_modules/@types/node/path.d.ts create mode 100755 tests/node_modules/@types/node/perf_hooks.d.ts create mode 100755 tests/node_modules/@types/node/process.d.ts create mode 100755 tests/node_modules/@types/node/punycode.d.ts create mode 100755 tests/node_modules/@types/node/querystring.d.ts create mode 100755 tests/node_modules/@types/node/readline.d.ts create mode 100755 tests/node_modules/@types/node/repl.d.ts create mode 100755 tests/node_modules/@types/node/stream.d.ts create mode 100755 tests/node_modules/@types/node/stream/consumers.d.ts create mode 100755 tests/node_modules/@types/node/stream/promises.d.ts create mode 100755 tests/node_modules/@types/node/stream/web.d.ts create mode 100755 tests/node_modules/@types/node/string_decoder.d.ts create mode 100755 tests/node_modules/@types/node/timers.d.ts create mode 100755 tests/node_modules/@types/node/timers/promises.d.ts create mode 100755 tests/node_modules/@types/node/tls.d.ts create mode 100755 tests/node_modules/@types/node/trace_events.d.ts create mode 100755 tests/node_modules/@types/node/tty.d.ts create mode 100755 tests/node_modules/@types/node/url.d.ts create mode 100755 tests/node_modules/@types/node/util.d.ts create mode 100755 tests/node_modules/@types/node/v8.d.ts create mode 100755 tests/node_modules/@types/node/vm.d.ts create mode 100755 tests/node_modules/@types/node/wasi.d.ts create mode 100755 tests/node_modules/@types/node/worker_threads.d.ts create mode 100755 tests/node_modules/@types/node/zlib.d.ts create mode 100755 tests/node_modules/@types/qs/LICENSE create mode 100755 tests/node_modules/@types/qs/README.md create mode 100755 tests/node_modules/@types/qs/index.d.ts create mode 100755 tests/node_modules/@types/qs/package.json create mode 100755 tests/node_modules/@types/range-parser/LICENSE create mode 100755 tests/node_modules/@types/range-parser/README.md create mode 100755 tests/node_modules/@types/range-parser/index.d.ts create mode 100755 tests/node_modules/@types/range-parser/package.json create mode 100755 tests/node_modules/@types/ws/LICENSE create mode 100755 tests/node_modules/@types/ws/README.md create mode 100755 tests/node_modules/@types/ws/index.d.ts create mode 100755 tests/node_modules/@types/ws/package.json create mode 100644 tests/node_modules/@ungap/promise-all-settled/LICENSE create mode 100644 tests/node_modules/@ungap/promise-all-settled/README.md create mode 100644 tests/node_modules/@ungap/promise-all-settled/cjs/index.js create mode 100644 tests/node_modules/@ungap/promise-all-settled/cjs/package.json create mode 100644 tests/node_modules/@ungap/promise-all-settled/esm/index.js create mode 100644 tests/node_modules/@ungap/promise-all-settled/index.js create mode 100644 tests/node_modules/@ungap/promise-all-settled/min.js create mode 100644 tests/node_modules/@ungap/promise-all-settled/package.json create mode 100644 tests/node_modules/JSONStream/.travis.yml create mode 100644 tests/node_modules/JSONStream/LICENSE.APACHE2 create mode 100644 tests/node_modules/JSONStream/LICENSE.MIT create mode 100755 tests/node_modules/JSONStream/bin.js create mode 100644 tests/node_modules/JSONStream/examples/all_docs.js create mode 100755 tests/node_modules/JSONStream/index.js create mode 100644 tests/node_modules/JSONStream/package.json create mode 100644 tests/node_modules/JSONStream/readme.markdown create mode 100644 tests/node_modules/JSONStream/test/bool.js create mode 100644 tests/node_modules/JSONStream/test/browser.js create mode 100644 tests/node_modules/JSONStream/test/destroy_missing.js create mode 100644 tests/node_modules/JSONStream/test/doubledot1.js create mode 100644 tests/node_modules/JSONStream/test/doubledot2.js create mode 100644 tests/node_modules/JSONStream/test/empty.js create mode 100644 tests/node_modules/JSONStream/test/error_contents.js create mode 100644 tests/node_modules/JSONStream/test/fixtures/all_npm.json create mode 100644 tests/node_modules/JSONStream/test/fixtures/couch_sample.json create mode 100644 tests/node_modules/JSONStream/test/fixtures/depth.json create mode 100644 tests/node_modules/JSONStream/test/fixtures/error.json create mode 100644 tests/node_modules/JSONStream/test/fixtures/header_footer.json create mode 100644 tests/node_modules/JSONStream/test/fn.js create mode 100644 tests/node_modules/JSONStream/test/gen.js create mode 100644 tests/node_modules/JSONStream/test/header_footer.js create mode 100644 tests/node_modules/JSONStream/test/issues.js create mode 100644 tests/node_modules/JSONStream/test/keys.js create mode 100644 tests/node_modules/JSONStream/test/map.js create mode 100644 tests/node_modules/JSONStream/test/multiple_objects.js create mode 100644 tests/node_modules/JSONStream/test/multiple_objects_error.js create mode 100644 tests/node_modules/JSONStream/test/null.js create mode 100644 tests/node_modules/JSONStream/test/parsejson.js create mode 100644 tests/node_modules/JSONStream/test/run.js create mode 100644 tests/node_modules/JSONStream/test/stringify.js create mode 100644 tests/node_modules/JSONStream/test/stringify_object.js create mode 100644 tests/node_modules/JSONStream/test/test.js create mode 100644 tests/node_modules/JSONStream/test/test2.js create mode 100644 tests/node_modules/JSONStream/test/two-ways.js create mode 100644 tests/node_modules/ansi-colors/LICENSE create mode 100644 tests/node_modules/ansi-colors/README.md create mode 100644 tests/node_modules/ansi-colors/index.js create mode 100644 tests/node_modules/ansi-colors/package.json create mode 100644 tests/node_modules/ansi-colors/symbols.js create mode 100644 tests/node_modules/ansi-colors/types/index.d.ts create mode 100644 tests/node_modules/ansi-regex/index.js create mode 100644 tests/node_modules/ansi-regex/license create mode 100644 tests/node_modules/ansi-regex/package.json create mode 100644 tests/node_modules/ansi-regex/readme.md create mode 100644 tests/node_modules/ansi-styles/index.d.ts create mode 100644 tests/node_modules/ansi-styles/index.js create mode 100644 tests/node_modules/ansi-styles/license create mode 100644 tests/node_modules/ansi-styles/package.json create mode 100644 tests/node_modules/ansi-styles/readme.md create mode 100644 tests/node_modules/anymatch/LICENSE create mode 100644 tests/node_modules/anymatch/README.md create mode 100644 tests/node_modules/anymatch/index.d.ts create mode 100644 tests/node_modules/anymatch/index.js create mode 100644 tests/node_modules/anymatch/package.json create mode 100644 tests/node_modules/argparse/CHANGELOG.md create mode 100644 tests/node_modules/argparse/LICENSE create mode 100644 tests/node_modules/argparse/README.md create mode 100644 tests/node_modules/argparse/argparse.js create mode 100644 tests/node_modules/argparse/lib/sub.js create mode 100644 tests/node_modules/argparse/lib/textwrap.js create mode 100644 tests/node_modules/argparse/package.json create mode 100644 tests/node_modules/balanced-match/.github/FUNDING.yml create mode 100644 tests/node_modules/balanced-match/LICENSE.md create mode 100644 tests/node_modules/balanced-match/README.md create mode 100644 tests/node_modules/balanced-match/index.js create mode 100644 tests/node_modules/balanced-match/package.json create mode 100644 tests/node_modules/base-x/LICENSE.md create mode 100644 tests/node_modules/base-x/README.md create mode 100644 tests/node_modules/base-x/package.json create mode 100644 tests/node_modules/base-x/src/index.d.ts create mode 100644 tests/node_modules/base-x/src/index.js create mode 100644 tests/node_modules/base64-js/LICENSE create mode 100644 tests/node_modules/base64-js/README.md create mode 100644 tests/node_modules/base64-js/base64js.min.js create mode 100644 tests/node_modules/base64-js/index.d.ts create mode 100644 tests/node_modules/base64-js/index.js create mode 100644 tests/node_modules/base64-js/package.json create mode 100644 tests/node_modules/binary-extensions/binary-extensions.json create mode 100644 tests/node_modules/binary-extensions/binary-extensions.json.d.ts create mode 100644 tests/node_modules/binary-extensions/index.d.ts create mode 100644 tests/node_modules/binary-extensions/index.js create mode 100644 tests/node_modules/binary-extensions/license create mode 100644 tests/node_modules/binary-extensions/package.json create mode 100644 tests/node_modules/binary-extensions/readme.md create mode 100644 tests/node_modules/bn.js/CHANGELOG.md create mode 100644 tests/node_modules/bn.js/LICENSE create mode 100644 tests/node_modules/bn.js/README.md create mode 100644 tests/node_modules/bn.js/lib/bn.js create mode 100644 tests/node_modules/bn.js/package.json create mode 100644 tests/node_modules/borsh/.eslintrc.yml create mode 100644 tests/node_modules/borsh/.travis.yml create mode 100644 tests/node_modules/borsh/CNAME create mode 100644 tests/node_modules/borsh/CODEOWNERS create mode 100644 tests/node_modules/borsh/LICENSE-APACHE create mode 100644 tests/node_modules/borsh/LICENSE-MIT.txt create mode 100644 tests/node_modules/borsh/README.md create mode 100644 tests/node_modules/borsh/borsh-ts/.eslintrc.yml create mode 100644 tests/node_modules/borsh/borsh-ts/index.ts create mode 100644 tests/node_modules/borsh/borsh-ts/test/.eslintrc.yml create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/borsh-roundtrip.js create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/004b705c22403d1c22ceab37181f6340b5b269b7faee05d97fe65b1ab91cd171 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/25b2da453a8cb0d574d31a06f0a57fc7b5f2cb5c08ba00ff900a79ebd0637da7 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/2f6f8117189cb82e111a13b3ffb19fcaf35deef41f8c084726c5aac5a4551696 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/4eb3f263ac0d9bac83d67e28d3381c64c61654579dc455a9e5ccaa54bc093721 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/5a0ac0f8936af102c2ea974ba237896a8ee4dffebd27b65c8101a1d8897d6409 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/67fc403d488908e0a27d74a2de056c34c40850bbe61b9ebc82cf48365484f4fc create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/7fa19d2ffc291390ebe8a238baae9bddbd620d018f803540e09ac1bc82ec3a6c create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/824d229c23c200a937bcd558a5c55d25830a8efffb9e8661a81e2db3584ca512 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/9d6a787b7d95c13bb67d02137cf3e506f550fcfa19363050d1e4917250d83d32 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/a330e2fd8d25278e3d28205107e67373646fe7c5370030819ccc13990375ca73 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/a53d5be4493c7cccab1d70bdaf44b17f2cd52501f1b5567ed05406163cf96fef create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/b7361e727623b1cdafda1411e27c119009d0fcccbdddd5fe669c8c02bf04f7dd create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/b98f80e8a618038000215158136c1f2dbd9ed3cad450556faf7b18db4184b42e create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/bec080831059d96afd82176d6e8ee36819bb22b7304f4e23f61d189a6c221f92 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/cf94b13d93b7accf950d3d2a1be308f7d25d21f81622a7ffc7da3733c03eb572 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/d2897d4dc13f861fb5e7caf8e5b7e1c9962a36c8489ada9cb0f798c1ec967eb7 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/dfbc571f6a049f8f66f2fcb510fffc51f5c78078db2a2fb5cf19b0bd840291ee create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/e08ccfae0c2fd6432c8e1bf841050f0b2d78fa519ac76f178db0757d1bd3e96e create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/ecd71b60d1820dbbcb06d1f981ab86d16876888bb7ba665637c5717c0a8916b2 create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.d.ts create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.js create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.d.ts create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.js create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.d.ts create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.js create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.d.ts create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.js create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.d.ts create mode 100644 tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.js create mode 100644 tests/node_modules/borsh/borsh-ts/test/serialize.test.js create mode 100644 tests/node_modules/borsh/lib/index.d.ts create mode 100644 tests/node_modules/borsh/lib/index.js create mode 100644 tests/node_modules/borsh/package.json create mode 100644 tests/node_modules/borsh/tsconfig.json create mode 100644 tests/node_modules/brace-expansion/LICENSE create mode 100644 tests/node_modules/brace-expansion/README.md create mode 100644 tests/node_modules/brace-expansion/index.js create mode 100644 tests/node_modules/brace-expansion/package.json create mode 100644 tests/node_modules/braces/CHANGELOG.md create mode 100644 tests/node_modules/braces/LICENSE create mode 100644 tests/node_modules/braces/README.md create mode 100644 tests/node_modules/braces/index.js create mode 100644 tests/node_modules/braces/lib/compile.js create mode 100644 tests/node_modules/braces/lib/constants.js create mode 100644 tests/node_modules/braces/lib/expand.js create mode 100644 tests/node_modules/braces/lib/parse.js create mode 100644 tests/node_modules/braces/lib/stringify.js create mode 100644 tests/node_modules/braces/lib/utils.js create mode 100644 tests/node_modules/braces/package.json create mode 100644 tests/node_modules/brorand/.npmignore create mode 100644 tests/node_modules/brorand/README.md create mode 100644 tests/node_modules/brorand/index.js create mode 100644 tests/node_modules/brorand/package.json create mode 100644 tests/node_modules/brorand/test/api-test.js create mode 100644 tests/node_modules/browser-stdout/LICENSE create mode 100644 tests/node_modules/browser-stdout/README.md create mode 100644 tests/node_modules/browser-stdout/index.js create mode 100644 tests/node_modules/browser-stdout/package.json create mode 100644 tests/node_modules/bs58/CHANGELOG.md create mode 100644 tests/node_modules/bs58/README.md create mode 100644 tests/node_modules/bs58/index.js create mode 100644 tests/node_modules/bs58/package.json create mode 100644 tests/node_modules/buffer-layout/.eslintrc.js create mode 100644 tests/node_modules/buffer-layout/.travis.yml create mode 100644 tests/node_modules/buffer-layout/CHANGELOG.md create mode 100644 tests/node_modules/buffer-layout/LICENSE create mode 100644 tests/node_modules/buffer-layout/README.md create mode 100644 tests/node_modules/buffer-layout/jsdoc/conf.json create mode 100644 tests/node_modules/buffer-layout/jsdoc/custom/local.js create mode 100644 tests/node_modules/buffer-layout/lib/Layout.js create mode 100644 tests/node_modules/buffer-layout/package.json create mode 100644 tests/node_modules/buffer-layout/test/LayoutTest.js create mode 100644 tests/node_modules/buffer-layout/test/examples.c create mode 100644 tests/node_modules/buffer-layout/test/examples.js create mode 100644 tests/node_modules/buffer-layout/test/n64.c create mode 100644 tests/node_modules/buffer-layout/x.js create mode 100644 tests/node_modules/buffer/AUTHORS.md create mode 100644 tests/node_modules/buffer/LICENSE create mode 100644 tests/node_modules/buffer/README.md create mode 100644 tests/node_modules/buffer/index.d.ts create mode 100644 tests/node_modules/buffer/index.js create mode 100644 tests/node_modules/buffer/package.json create mode 100644 tests/node_modules/bufferutil/LICENSE create mode 100644 tests/node_modules/bufferutil/README.md create mode 100644 tests/node_modules/bufferutil/binding.gyp create mode 100644 tests/node_modules/bufferutil/build/Makefile create mode 100644 tests/node_modules/bufferutil/build/Release/.deps/Release/bufferutil.node.d create mode 100644 tests/node_modules/bufferutil/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d create mode 100755 tests/node_modules/bufferutil/build/Release/bufferutil.node create mode 100644 tests/node_modules/bufferutil/build/Release/obj.target/bufferutil/src/bufferutil.o create mode 100644 tests/node_modules/bufferutil/build/binding.Makefile create mode 100644 tests/node_modules/bufferutil/build/bufferutil.target.mk create mode 100644 tests/node_modules/bufferutil/build/config.gypi create mode 100755 tests/node_modules/bufferutil/build/gyp-mac-tool create mode 100644 tests/node_modules/bufferutil/fallback.js create mode 100644 tests/node_modules/bufferutil/index.js create mode 100644 tests/node_modules/bufferutil/package.json create mode 100755 tests/node_modules/bufferutil/prebuilds/darwin-x64/node.napi.node create mode 100755 tests/node_modules/bufferutil/prebuilds/linux-arm/node.napi.armv6.node create mode 100755 tests/node_modules/bufferutil/prebuilds/linux-arm/node.napi.armv7.node create mode 100755 tests/node_modules/bufferutil/prebuilds/linux-arm64/node.napi.node create mode 100755 tests/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node create mode 100644 tests/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node create mode 100644 tests/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node create mode 100644 tests/node_modules/bufferutil/src/bufferutil.c create mode 100644 tests/node_modules/camelcase/index.d.ts create mode 100644 tests/node_modules/camelcase/index.js create mode 100644 tests/node_modules/camelcase/license create mode 100644 tests/node_modules/camelcase/package.json create mode 100644 tests/node_modules/camelcase/readme.md create mode 100644 tests/node_modules/chalk/index.d.ts create mode 100644 tests/node_modules/chalk/license create mode 100644 tests/node_modules/chalk/node_modules/supports-color/browser.js create mode 100644 tests/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 tests/node_modules/chalk/node_modules/supports-color/license create mode 100644 tests/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 tests/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 tests/node_modules/chalk/package.json create mode 100644 tests/node_modules/chalk/readme.md create mode 100644 tests/node_modules/chalk/source/index.js create mode 100644 tests/node_modules/chalk/source/templates.js create mode 100644 tests/node_modules/chalk/source/util.js create mode 100644 tests/node_modules/chokidar/LICENSE create mode 100644 tests/node_modules/chokidar/README.md create mode 100644 tests/node_modules/chokidar/index.js create mode 100644 tests/node_modules/chokidar/lib/constants.js create mode 100644 tests/node_modules/chokidar/lib/fsevents-handler.js create mode 100644 tests/node_modules/chokidar/lib/nodefs-handler.js create mode 100644 tests/node_modules/chokidar/package.json create mode 100644 tests/node_modules/chokidar/types/index.d.ts create mode 100644 tests/node_modules/circular-json/LICENSE.txt create mode 100644 tests/node_modules/circular-json/README.md create mode 100644 tests/node_modules/circular-json/build/circular-json.js create mode 100644 tests/node_modules/circular-json/build/circular-json.max.js create mode 100644 tests/node_modules/circular-json/build/circular-json.node.js create mode 100644 tests/node_modules/circular-json/package.json create mode 100644 tests/node_modules/circular-json/template/license.after create mode 100644 tests/node_modules/circular-json/template/license.before create mode 100644 tests/node_modules/cliui/CHANGELOG.md create mode 100644 tests/node_modules/cliui/LICENSE.txt create mode 100644 tests/node_modules/cliui/README.md create mode 100644 tests/node_modules/cliui/build/index.cjs create mode 100644 tests/node_modules/cliui/build/lib/index.js create mode 100644 tests/node_modules/cliui/build/lib/string-utils.js create mode 100644 tests/node_modules/cliui/index.mjs create mode 100644 tests/node_modules/cliui/node_modules/ansi-regex/index.d.ts create mode 100644 tests/node_modules/cliui/node_modules/ansi-regex/index.js create mode 100644 tests/node_modules/cliui/node_modules/ansi-regex/license create mode 100644 tests/node_modules/cliui/node_modules/ansi-regex/package.json create mode 100644 tests/node_modules/cliui/node_modules/ansi-regex/readme.md create mode 100644 tests/node_modules/cliui/node_modules/is-fullwidth-code-point/index.d.ts create mode 100644 tests/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js create mode 100644 tests/node_modules/cliui/node_modules/is-fullwidth-code-point/license create mode 100644 tests/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json create mode 100644 tests/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md create mode 100644 tests/node_modules/cliui/node_modules/string-width/index.d.ts create mode 100644 tests/node_modules/cliui/node_modules/string-width/index.js create mode 100644 tests/node_modules/cliui/node_modules/string-width/license create mode 100644 tests/node_modules/cliui/node_modules/string-width/package.json create mode 100644 tests/node_modules/cliui/node_modules/string-width/readme.md create mode 100644 tests/node_modules/cliui/node_modules/strip-ansi/index.d.ts create mode 100644 tests/node_modules/cliui/node_modules/strip-ansi/index.js create mode 100644 tests/node_modules/cliui/node_modules/strip-ansi/license create mode 100644 tests/node_modules/cliui/node_modules/strip-ansi/package.json create mode 100644 tests/node_modules/cliui/node_modules/strip-ansi/readme.md create mode 100644 tests/node_modules/cliui/package.json create mode 100644 tests/node_modules/color-convert/CHANGELOG.md create mode 100644 tests/node_modules/color-convert/LICENSE create mode 100644 tests/node_modules/color-convert/README.md create mode 100644 tests/node_modules/color-convert/conversions.js create mode 100644 tests/node_modules/color-convert/index.js create mode 100644 tests/node_modules/color-convert/package.json create mode 100644 tests/node_modules/color-convert/route.js create mode 100644 tests/node_modules/color-name/LICENSE create mode 100644 tests/node_modules/color-name/README.md create mode 100644 tests/node_modules/color-name/index.js create mode 100644 tests/node_modules/color-name/package.json create mode 100644 tests/node_modules/commander/CHANGELOG.md create mode 100644 tests/node_modules/commander/LICENSE create mode 100644 tests/node_modules/commander/Readme.md create mode 100644 tests/node_modules/commander/index.js create mode 100644 tests/node_modules/commander/package.json create mode 100644 tests/node_modules/commander/typings/index.d.ts create mode 100644 tests/node_modules/concat-map/.travis.yml create mode 100644 tests/node_modules/concat-map/LICENSE create mode 100644 tests/node_modules/concat-map/README.markdown create mode 100644 tests/node_modules/concat-map/example/map.js create mode 100644 tests/node_modules/concat-map/index.js create mode 100644 tests/node_modules/concat-map/package.json create mode 100644 tests/node_modules/concat-map/test/map.js create mode 100644 tests/node_modules/crypto-hash/browser.js create mode 100644 tests/node_modules/crypto-hash/index.d.ts create mode 100644 tests/node_modules/crypto-hash/index.js create mode 100644 tests/node_modules/crypto-hash/license create mode 100644 tests/node_modules/crypto-hash/package.json create mode 100644 tests/node_modules/crypto-hash/readme.md create mode 100644 tests/node_modules/crypto-hash/thread.js create mode 100644 tests/node_modules/debug/LICENSE create mode 100644 tests/node_modules/debug/README.md create mode 100644 tests/node_modules/debug/node_modules/ms/index.js create mode 100644 tests/node_modules/debug/node_modules/ms/license.md create mode 100644 tests/node_modules/debug/node_modules/ms/package.json create mode 100644 tests/node_modules/debug/node_modules/ms/readme.md create mode 100644 tests/node_modules/debug/package.json create mode 100644 tests/node_modules/debug/src/browser.js create mode 100644 tests/node_modules/debug/src/common.js create mode 100644 tests/node_modules/debug/src/index.js create mode 100644 tests/node_modules/debug/src/node.js create mode 100644 tests/node_modules/decamelize/index.d.ts create mode 100644 tests/node_modules/decamelize/index.js create mode 100644 tests/node_modules/decamelize/license create mode 100644 tests/node_modules/decamelize/package.json create mode 100644 tests/node_modules/decamelize/readme.md create mode 100644 tests/node_modules/delay/index.d.ts create mode 100644 tests/node_modules/delay/index.js create mode 100644 tests/node_modules/delay/license create mode 100644 tests/node_modules/delay/package.json create mode 100644 tests/node_modules/delay/readme.md create mode 100644 tests/node_modules/diff/CONTRIBUTING.md create mode 100644 tests/node_modules/diff/LICENSE create mode 100644 tests/node_modules/diff/README.md create mode 100644 tests/node_modules/diff/dist/diff.js create mode 100644 tests/node_modules/diff/lib/convert/dmp.js create mode 100644 tests/node_modules/diff/lib/convert/xml.js create mode 100644 tests/node_modules/diff/lib/diff/array.js create mode 100644 tests/node_modules/diff/lib/diff/base.js create mode 100644 tests/node_modules/diff/lib/diff/character.js create mode 100644 tests/node_modules/diff/lib/diff/css.js create mode 100644 tests/node_modules/diff/lib/diff/json.js create mode 100644 tests/node_modules/diff/lib/diff/line.js create mode 100644 tests/node_modules/diff/lib/diff/sentence.js create mode 100644 tests/node_modules/diff/lib/diff/word.js create mode 100644 tests/node_modules/diff/lib/index.es6.js create mode 100644 tests/node_modules/diff/lib/index.js create mode 100644 tests/node_modules/diff/lib/index.mjs create mode 100644 tests/node_modules/diff/lib/patch/apply.js create mode 100644 tests/node_modules/diff/lib/patch/create.js create mode 100644 tests/node_modules/diff/lib/patch/merge.js create mode 100644 tests/node_modules/diff/lib/patch/parse.js create mode 100644 tests/node_modules/diff/lib/util/array.js create mode 100644 tests/node_modules/diff/lib/util/distance-iterator.js create mode 100644 tests/node_modules/diff/lib/util/params.js create mode 100644 tests/node_modules/diff/package.json create mode 100644 tests/node_modules/diff/release-notes.md create mode 100644 tests/node_modules/diff/runtime.js create mode 100644 tests/node_modules/dot-case/LICENSE create mode 100644 tests/node_modules/dot-case/README.md create mode 100644 tests/node_modules/dot-case/dist.es2015/index.d.ts create mode 100644 tests/node_modules/dot-case/dist.es2015/index.js create mode 100644 tests/node_modules/dot-case/dist.es2015/index.js.map create mode 100644 tests/node_modules/dot-case/dist.es2015/index.spec.d.ts create mode 100644 tests/node_modules/dot-case/dist.es2015/index.spec.js create mode 100644 tests/node_modules/dot-case/dist.es2015/index.spec.js.map create mode 100644 tests/node_modules/dot-case/dist/index.d.ts create mode 100644 tests/node_modules/dot-case/dist/index.js create mode 100644 tests/node_modules/dot-case/dist/index.js.map create mode 100644 tests/node_modules/dot-case/dist/index.spec.d.ts create mode 100644 tests/node_modules/dot-case/dist/index.spec.js create mode 100644 tests/node_modules/dot-case/dist/index.spec.js.map create mode 100644 tests/node_modules/dot-case/package.json create mode 100644 tests/node_modules/elliptic/README.md create mode 100644 tests/node_modules/elliptic/lib/elliptic.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/curve/base.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/curve/edwards.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/curve/index.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/curve/mont.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/curve/short.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/curves.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/ec/index.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/ec/key.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/ec/signature.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/eddsa/index.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/eddsa/key.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/eddsa/signature.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js create mode 100644 tests/node_modules/elliptic/lib/elliptic/utils.js create mode 100644 tests/node_modules/elliptic/node_modules/bn.js/LICENSE create mode 100644 tests/node_modules/elliptic/node_modules/bn.js/README.md create mode 100644 tests/node_modules/elliptic/node_modules/bn.js/lib/bn.js create mode 100644 tests/node_modules/elliptic/node_modules/bn.js/package.json create mode 100644 tests/node_modules/elliptic/package.json create mode 100644 tests/node_modules/emoji-regex/LICENSE-MIT.txt create mode 100644 tests/node_modules/emoji-regex/README.md create mode 100644 tests/node_modules/emoji-regex/es2015/index.js create mode 100644 tests/node_modules/emoji-regex/es2015/text.js create mode 100644 tests/node_modules/emoji-regex/index.d.ts create mode 100644 tests/node_modules/emoji-regex/index.js create mode 100644 tests/node_modules/emoji-regex/package.json create mode 100644 tests/node_modules/emoji-regex/text.js create mode 100644 tests/node_modules/es6-promise/CHANGELOG.md create mode 100644 tests/node_modules/es6-promise/LICENSE create mode 100644 tests/node_modules/es6-promise/README.md create mode 100644 tests/node_modules/es6-promise/auto.js create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.auto.js create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.auto.map create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.auto.min.js create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.auto.min.map create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.js create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.map create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.min.js create mode 100644 tests/node_modules/es6-promise/dist/es6-promise.min.map create mode 100644 tests/node_modules/es6-promise/es6-promise.d.ts create mode 100644 tests/node_modules/es6-promise/lib/es6-promise.auto.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/-internal.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/asap.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/enumerator.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/polyfill.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/promise.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/promise/all.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/promise/race.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/promise/reject.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/promise/resolve.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/then.js create mode 100644 tests/node_modules/es6-promise/lib/es6-promise/utils.js create mode 100644 tests/node_modules/es6-promise/package.json create mode 100644 tests/node_modules/es6-promisify/README.md create mode 100644 tests/node_modules/es6-promisify/dist/promise.js create mode 100644 tests/node_modules/es6-promisify/dist/promisify.js create mode 100644 tests/node_modules/es6-promisify/package.json create mode 100644 tests/node_modules/escalade/dist/index.js create mode 100644 tests/node_modules/escalade/dist/index.mjs create mode 100644 tests/node_modules/escalade/index.d.ts create mode 100644 tests/node_modules/escalade/license create mode 100644 tests/node_modules/escalade/package.json create mode 100644 tests/node_modules/escalade/readme.md create mode 100644 tests/node_modules/escalade/sync/index.d.ts create mode 100644 tests/node_modules/escalade/sync/index.js create mode 100644 tests/node_modules/escalade/sync/index.mjs create mode 100644 tests/node_modules/escape-string-regexp/index.d.ts create mode 100644 tests/node_modules/escape-string-regexp/index.js create mode 100644 tests/node_modules/escape-string-regexp/license create mode 100644 tests/node_modules/escape-string-regexp/package.json create mode 100644 tests/node_modules/escape-string-regexp/readme.md create mode 100644 tests/node_modules/eventemitter3/LICENSE create mode 100644 tests/node_modules/eventemitter3/README.md create mode 100644 tests/node_modules/eventemitter3/index.d.ts create mode 100644 tests/node_modules/eventemitter3/index.js create mode 100644 tests/node_modules/eventemitter3/package.json create mode 100644 tests/node_modules/eventemitter3/umd/eventemitter3.js create mode 100644 tests/node_modules/eventemitter3/umd/eventemitter3.min.js create mode 100644 tests/node_modules/eventemitter3/umd/eventemitter3.min.js.map create mode 100644 tests/node_modules/eyes/LICENSE create mode 100644 tests/node_modules/eyes/Makefile create mode 100644 tests/node_modules/eyes/README.md create mode 100644 tests/node_modules/eyes/lib/eyes.js create mode 100644 tests/node_modules/eyes/package.json create mode 100644 tests/node_modules/eyes/test/eyes-test.js create mode 100644 tests/node_modules/fill-range/LICENSE create mode 100644 tests/node_modules/fill-range/README.md create mode 100644 tests/node_modules/fill-range/index.js create mode 100644 tests/node_modules/fill-range/package.json create mode 100644 tests/node_modules/find-up/index.d.ts create mode 100644 tests/node_modules/find-up/index.js create mode 100644 tests/node_modules/find-up/license create mode 100644 tests/node_modules/find-up/package.json create mode 100644 tests/node_modules/find-up/readme.md create mode 100644 tests/node_modules/find/.travis.yml create mode 100644 tests/node_modules/find/LICENSE create mode 100644 tests/node_modules/find/README.md create mode 100644 tests/node_modules/find/index.js create mode 100644 tests/node_modules/find/package.json create mode 100644 tests/node_modules/find/test/test.js create mode 100644 tests/node_modules/flat/.travis.yml create mode 100644 tests/node_modules/flat/LICENSE create mode 100644 tests/node_modules/flat/README.md create mode 100755 tests/node_modules/flat/cli.js create mode 100644 tests/node_modules/flat/index.js create mode 100644 tests/node_modules/flat/package.json create mode 100644 tests/node_modules/flat/test/test.js create mode 100644 tests/node_modules/fs.realpath/LICENSE create mode 100644 tests/node_modules/fs.realpath/README.md create mode 100644 tests/node_modules/fs.realpath/index.js create mode 100644 tests/node_modules/fs.realpath/old.js create mode 100644 tests/node_modules/fs.realpath/package.json create mode 100644 tests/node_modules/fsevents/LICENSE create mode 100644 tests/node_modules/fsevents/README.md create mode 100644 tests/node_modules/fsevents/fsevents.d.ts create mode 100644 tests/node_modules/fsevents/fsevents.js create mode 100755 tests/node_modules/fsevents/fsevents.node create mode 100644 tests/node_modules/fsevents/package.json create mode 100644 tests/node_modules/get-caller-file/LICENSE.md create mode 100644 tests/node_modules/get-caller-file/README.md create mode 100644 tests/node_modules/get-caller-file/index.d.ts create mode 100644 tests/node_modules/get-caller-file/index.js create mode 100644 tests/node_modules/get-caller-file/index.js.map create mode 100644 tests/node_modules/get-caller-file/package.json create mode 100644 tests/node_modules/glob-parent/CHANGELOG.md create mode 100644 tests/node_modules/glob-parent/LICENSE create mode 100644 tests/node_modules/glob-parent/README.md create mode 100644 tests/node_modules/glob-parent/index.js create mode 100644 tests/node_modules/glob-parent/package.json create mode 100644 tests/node_modules/glob/LICENSE create mode 100644 tests/node_modules/glob/README.md create mode 100644 tests/node_modules/glob/changelog.md create mode 100644 tests/node_modules/glob/common.js create mode 100644 tests/node_modules/glob/glob.js create mode 100644 tests/node_modules/glob/package.json create mode 100644 tests/node_modules/glob/sync.js create mode 100644 tests/node_modules/growl/.eslintrc.json create mode 100644 tests/node_modules/growl/.tags create mode 100644 tests/node_modules/growl/.tags1 create mode 100644 tests/node_modules/growl/.travis.yml create mode 100644 tests/node_modules/growl/History.md create mode 100644 tests/node_modules/growl/Readme.md create mode 100644 tests/node_modules/growl/lib/growl.js create mode 100644 tests/node_modules/growl/package.json create mode 100644 tests/node_modules/growl/test.js create mode 100644 tests/node_modules/has-flag/index.d.ts create mode 100644 tests/node_modules/has-flag/index.js create mode 100644 tests/node_modules/has-flag/license create mode 100644 tests/node_modules/has-flag/package.json create mode 100644 tests/node_modules/has-flag/readme.md create mode 100644 tests/node_modules/hash.js/.eslintrc.js create mode 100644 tests/node_modules/hash.js/.travis.yml create mode 100644 tests/node_modules/hash.js/README.md create mode 100644 tests/node_modules/hash.js/lib/hash.d.ts create mode 100644 tests/node_modules/hash.js/lib/hash.js create mode 100644 tests/node_modules/hash.js/lib/hash/common.js create mode 100644 tests/node_modules/hash.js/lib/hash/hmac.js create mode 100644 tests/node_modules/hash.js/lib/hash/ripemd.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha/1.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha/224.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha/256.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha/384.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha/512.js create mode 100644 tests/node_modules/hash.js/lib/hash/sha/common.js create mode 100644 tests/node_modules/hash.js/lib/hash/utils.js create mode 100644 tests/node_modules/hash.js/package.json create mode 100644 tests/node_modules/hash.js/test/hash-test.js create mode 100644 tests/node_modules/hash.js/test/hmac-test.js create mode 100644 tests/node_modules/he/LICENSE-MIT.txt create mode 100644 tests/node_modules/he/README.md create mode 100755 tests/node_modules/he/bin/he create mode 100644 tests/node_modules/he/he.js create mode 100644 tests/node_modules/he/man/he.1 create mode 100644 tests/node_modules/he/package.json create mode 100644 tests/node_modules/hmac-drbg/.npmignore create mode 100644 tests/node_modules/hmac-drbg/.travis.yml create mode 100644 tests/node_modules/hmac-drbg/README.md create mode 100644 tests/node_modules/hmac-drbg/lib/hmac-drbg.js create mode 100644 tests/node_modules/hmac-drbg/package.json create mode 100644 tests/node_modules/hmac-drbg/test/drbg-test.js create mode 100644 tests/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json create mode 100644 tests/node_modules/ieee754/LICENSE create mode 100644 tests/node_modules/ieee754/README.md create mode 100644 tests/node_modules/ieee754/index.d.ts create mode 100644 tests/node_modules/ieee754/index.js create mode 100644 tests/node_modules/ieee754/package.json create mode 100644 tests/node_modules/inflight/LICENSE create mode 100644 tests/node_modules/inflight/README.md create mode 100644 tests/node_modules/inflight/inflight.js create mode 100644 tests/node_modules/inflight/package.json create mode 100644 tests/node_modules/inherits/LICENSE create mode 100644 tests/node_modules/inherits/README.md create mode 100644 tests/node_modules/inherits/inherits.js create mode 100644 tests/node_modules/inherits/inherits_browser.js create mode 100644 tests/node_modules/inherits/package.json create mode 100644 tests/node_modules/is-binary-path/index.d.ts create mode 100644 tests/node_modules/is-binary-path/index.js create mode 100644 tests/node_modules/is-binary-path/license create mode 100644 tests/node_modules/is-binary-path/package.json create mode 100644 tests/node_modules/is-binary-path/readme.md create mode 100644 tests/node_modules/is-extglob/LICENSE create mode 100644 tests/node_modules/is-extglob/README.md create mode 100644 tests/node_modules/is-extglob/index.js create mode 100644 tests/node_modules/is-extglob/package.json create mode 100644 tests/node_modules/is-fullwidth-code-point/index.js create mode 100644 tests/node_modules/is-fullwidth-code-point/license create mode 100644 tests/node_modules/is-fullwidth-code-point/package.json create mode 100644 tests/node_modules/is-fullwidth-code-point/readme.md create mode 100644 tests/node_modules/is-glob/LICENSE create mode 100644 tests/node_modules/is-glob/README.md create mode 100644 tests/node_modules/is-glob/index.js create mode 100644 tests/node_modules/is-glob/package.json create mode 100644 tests/node_modules/is-number/LICENSE create mode 100644 tests/node_modules/is-number/README.md create mode 100644 tests/node_modules/is-number/index.js create mode 100644 tests/node_modules/is-number/package.json create mode 100644 tests/node_modules/is-plain-obj/index.d.ts create mode 100644 tests/node_modules/is-plain-obj/index.js create mode 100644 tests/node_modules/is-plain-obj/license create mode 100644 tests/node_modules/is-plain-obj/package.json create mode 100644 tests/node_modules/is-plain-obj/readme.md create mode 100644 tests/node_modules/is-unicode-supported/index.d.ts create mode 100644 tests/node_modules/is-unicode-supported/index.js create mode 100644 tests/node_modules/is-unicode-supported/license create mode 100644 tests/node_modules/is-unicode-supported/package.json create mode 100644 tests/node_modules/is-unicode-supported/readme.md create mode 100644 tests/node_modules/isexe/.npmignore create mode 100644 tests/node_modules/isexe/LICENSE create mode 100644 tests/node_modules/isexe/README.md create mode 100644 tests/node_modules/isexe/index.js create mode 100644 tests/node_modules/isexe/mode.js create mode 100644 tests/node_modules/isexe/package.json create mode 100644 tests/node_modules/isexe/test/basic.js create mode 100644 tests/node_modules/isexe/windows.js create mode 100644 tests/node_modules/isomorphic-ws/LICENSE create mode 100644 tests/node_modules/isomorphic-ws/README.md create mode 100644 tests/node_modules/isomorphic-ws/browser.js create mode 100644 tests/node_modules/isomorphic-ws/index.d.ts create mode 100644 tests/node_modules/isomorphic-ws/node.js create mode 100644 tests/node_modules/isomorphic-ws/package.json create mode 100644 tests/node_modules/jayson/.npmignore create mode 100644 tests/node_modules/jayson/LICENSE create mode 100644 tests/node_modules/jayson/README.md create mode 100755 tests/node_modules/jayson/bin/jayson.js create mode 100644 tests/node_modules/jayson/index.d.ts create mode 100644 tests/node_modules/jayson/index.js create mode 100644 tests/node_modules/jayson/lib/client/browser/index.d.ts create mode 100644 tests/node_modules/jayson/lib/client/browser/index.js create mode 100644 tests/node_modules/jayson/lib/client/http.js create mode 100644 tests/node_modules/jayson/lib/client/https.js create mode 100644 tests/node_modules/jayson/lib/client/index.js create mode 100644 tests/node_modules/jayson/lib/client/tcp.js create mode 100644 tests/node_modules/jayson/lib/client/tls.js create mode 100644 tests/node_modules/jayson/lib/client/websocket.js create mode 100644 tests/node_modules/jayson/lib/generateRequest.js create mode 100644 tests/node_modules/jayson/lib/index.js create mode 100644 tests/node_modules/jayson/lib/method.js create mode 100644 tests/node_modules/jayson/lib/server/http.js create mode 100644 tests/node_modules/jayson/lib/server/https.js create mode 100644 tests/node_modules/jayson/lib/server/index.js create mode 100644 tests/node_modules/jayson/lib/server/middleware.js create mode 100644 tests/node_modules/jayson/lib/server/tcp.js create mode 100644 tests/node_modules/jayson/lib/server/tls.js create mode 100644 tests/node_modules/jayson/lib/server/websocket.js create mode 100644 tests/node_modules/jayson/lib/utils.js create mode 100755 tests/node_modules/jayson/node_modules/@types/node/LICENSE create mode 100755 tests/node_modules/jayson/node_modules/@types/node/README.md create mode 100755 tests/node_modules/jayson/node_modules/@types/node/assert.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/async_hooks.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/buffer.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/child_process.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/cluster.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/console.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/constants.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/crypto.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/dgram.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/dns.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/domain.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/events.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/fs.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/globals.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/globals.global.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/http.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/http2.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/https.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/index.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/inspector.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/module.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/net.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/os.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/package.json create mode 100755 tests/node_modules/jayson/node_modules/@types/node/path.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/perf_hooks.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/process.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/punycode.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/querystring.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/readline.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/repl.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/stream.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/string_decoder.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/timers.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/tls.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/trace_events.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/tty.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/url.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/util.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/v8.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/vm.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/wasi.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/worker_threads.d.ts create mode 100755 tests/node_modules/jayson/node_modules/@types/node/zlib.d.ts create mode 100644 tests/node_modules/jayson/package.json create mode 100644 tests/node_modules/jayson/promise/index.d.ts create mode 100644 tests/node_modules/jayson/promise/index.js create mode 100644 tests/node_modules/jayson/promise/lib/client/browser/index.d.ts create mode 100644 tests/node_modules/jayson/promise/lib/client/browser/index.js create mode 100644 tests/node_modules/jayson/promise/lib/client/http.js create mode 100644 tests/node_modules/jayson/promise/lib/client/https.js create mode 100644 tests/node_modules/jayson/promise/lib/client/index.js create mode 100644 tests/node_modules/jayson/promise/lib/client/tcp.js create mode 100644 tests/node_modules/jayson/promise/lib/client/tls.js create mode 100644 tests/node_modules/jayson/promise/lib/client/websocket.js create mode 100644 tests/node_modules/jayson/promise/lib/index.js create mode 100644 tests/node_modules/jayson/promise/lib/method.js create mode 100644 tests/node_modules/jayson/promise/lib/server.js create mode 100644 tests/node_modules/jayson/promise/lib/utils.js create mode 100644 tests/node_modules/js-sha256/CHANGELOG.md create mode 100644 tests/node_modules/js-sha256/LICENSE.txt create mode 100644 tests/node_modules/js-sha256/README.md create mode 100644 tests/node_modules/js-sha256/build/sha256.min.js create mode 100644 tests/node_modules/js-sha256/index.d.ts create mode 100644 tests/node_modules/js-sha256/package.json create mode 100644 tests/node_modules/js-sha256/src/sha256.js create mode 100644 tests/node_modules/js-sha3/CHANGELOG.md create mode 100644 tests/node_modules/js-sha3/LICENSE.txt create mode 100644 tests/node_modules/js-sha3/README.md create mode 100644 tests/node_modules/js-sha3/build/sha3.min.js create mode 100644 tests/node_modules/js-sha3/index.d.ts create mode 100644 tests/node_modules/js-sha3/package.json create mode 100644 tests/node_modules/js-sha3/src/sha3.js create mode 100644 tests/node_modules/js-yaml/CHANGELOG.md create mode 100644 tests/node_modules/js-yaml/LICENSE create mode 100644 tests/node_modules/js-yaml/README.md create mode 100755 tests/node_modules/js-yaml/bin/js-yaml.js create mode 100644 tests/node_modules/js-yaml/dist/js-yaml.js create mode 100644 tests/node_modules/js-yaml/dist/js-yaml.min.js create mode 100644 tests/node_modules/js-yaml/dist/js-yaml.mjs create mode 100644 tests/node_modules/js-yaml/index.js create mode 100644 tests/node_modules/js-yaml/lib/common.js create mode 100644 tests/node_modules/js-yaml/lib/dumper.js create mode 100644 tests/node_modules/js-yaml/lib/exception.js create mode 100644 tests/node_modules/js-yaml/lib/loader.js create mode 100644 tests/node_modules/js-yaml/lib/schema.js create mode 100644 tests/node_modules/js-yaml/lib/schema/core.js create mode 100644 tests/node_modules/js-yaml/lib/schema/default.js create mode 100644 tests/node_modules/js-yaml/lib/schema/failsafe.js create mode 100644 tests/node_modules/js-yaml/lib/schema/json.js create mode 100644 tests/node_modules/js-yaml/lib/snippet.js create mode 100644 tests/node_modules/js-yaml/lib/type.js create mode 100644 tests/node_modules/js-yaml/lib/type/binary.js create mode 100644 tests/node_modules/js-yaml/lib/type/bool.js create mode 100644 tests/node_modules/js-yaml/lib/type/float.js create mode 100644 tests/node_modules/js-yaml/lib/type/int.js create mode 100644 tests/node_modules/js-yaml/lib/type/map.js create mode 100644 tests/node_modules/js-yaml/lib/type/merge.js create mode 100644 tests/node_modules/js-yaml/lib/type/null.js create mode 100644 tests/node_modules/js-yaml/lib/type/omap.js create mode 100644 tests/node_modules/js-yaml/lib/type/pairs.js create mode 100644 tests/node_modules/js-yaml/lib/type/seq.js create mode 100644 tests/node_modules/js-yaml/lib/type/set.js create mode 100644 tests/node_modules/js-yaml/lib/type/str.js create mode 100644 tests/node_modules/js-yaml/lib/type/timestamp.js create mode 100644 tests/node_modules/js-yaml/package.json create mode 100644 tests/node_modules/json-stringify-safe/.npmignore create mode 100644 tests/node_modules/json-stringify-safe/CHANGELOG.md create mode 100644 tests/node_modules/json-stringify-safe/LICENSE create mode 100644 tests/node_modules/json-stringify-safe/Makefile create mode 100644 tests/node_modules/json-stringify-safe/README.md create mode 100644 tests/node_modules/json-stringify-safe/package.json create mode 100644 tests/node_modules/json-stringify-safe/stringify.js create mode 100644 tests/node_modules/json-stringify-safe/test/mocha.opts create mode 100644 tests/node_modules/json-stringify-safe/test/stringify_test.js create mode 100644 tests/node_modules/jsonparse/.npmignore create mode 100644 tests/node_modules/jsonparse/LICENSE create mode 100644 tests/node_modules/jsonparse/README.markdown create mode 100644 tests/node_modules/jsonparse/bench.js create mode 100644 tests/node_modules/jsonparse/examples/twitterfeed.js create mode 100644 tests/node_modules/jsonparse/jsonparse.js create mode 100644 tests/node_modules/jsonparse/package.json create mode 100644 tests/node_modules/jsonparse/samplejson/basic.json create mode 100644 tests/node_modules/jsonparse/samplejson/basic2.json create mode 100644 tests/node_modules/jsonparse/test/big-token.js create mode 100644 tests/node_modules/jsonparse/test/boundary.js create mode 100644 tests/node_modules/jsonparse/test/offset.js create mode 100644 tests/node_modules/jsonparse/test/primitives.js create mode 100644 tests/node_modules/jsonparse/test/surrogate.js create mode 100644 tests/node_modules/jsonparse/test/unvalid.js create mode 100644 tests/node_modules/jsonparse/test/utf8.js create mode 100644 tests/node_modules/locate-path/index.d.ts create mode 100644 tests/node_modules/locate-path/index.js create mode 100644 tests/node_modules/locate-path/license create mode 100644 tests/node_modules/locate-path/package.json create mode 100644 tests/node_modules/locate-path/readme.md create mode 100644 tests/node_modules/lodash/LICENSE create mode 100644 tests/node_modules/lodash/README.md create mode 100644 tests/node_modules/lodash/_DataView.js create mode 100644 tests/node_modules/lodash/_Hash.js create mode 100644 tests/node_modules/lodash/_LazyWrapper.js create mode 100644 tests/node_modules/lodash/_ListCache.js create mode 100644 tests/node_modules/lodash/_LodashWrapper.js create mode 100644 tests/node_modules/lodash/_Map.js create mode 100644 tests/node_modules/lodash/_MapCache.js create mode 100644 tests/node_modules/lodash/_Promise.js create mode 100644 tests/node_modules/lodash/_Set.js create mode 100644 tests/node_modules/lodash/_SetCache.js create mode 100644 tests/node_modules/lodash/_Stack.js create mode 100644 tests/node_modules/lodash/_Symbol.js create mode 100644 tests/node_modules/lodash/_Uint8Array.js create mode 100644 tests/node_modules/lodash/_WeakMap.js create mode 100644 tests/node_modules/lodash/_apply.js create mode 100644 tests/node_modules/lodash/_arrayAggregator.js create mode 100644 tests/node_modules/lodash/_arrayEach.js create mode 100644 tests/node_modules/lodash/_arrayEachRight.js create mode 100644 tests/node_modules/lodash/_arrayEvery.js create mode 100644 tests/node_modules/lodash/_arrayFilter.js create mode 100644 tests/node_modules/lodash/_arrayIncludes.js create mode 100644 tests/node_modules/lodash/_arrayIncludesWith.js create mode 100644 tests/node_modules/lodash/_arrayLikeKeys.js create mode 100644 tests/node_modules/lodash/_arrayMap.js create mode 100644 tests/node_modules/lodash/_arrayPush.js create mode 100644 tests/node_modules/lodash/_arrayReduce.js create mode 100644 tests/node_modules/lodash/_arrayReduceRight.js create mode 100644 tests/node_modules/lodash/_arraySample.js create mode 100644 tests/node_modules/lodash/_arraySampleSize.js create mode 100644 tests/node_modules/lodash/_arrayShuffle.js create mode 100644 tests/node_modules/lodash/_arraySome.js create mode 100644 tests/node_modules/lodash/_asciiSize.js create mode 100644 tests/node_modules/lodash/_asciiToArray.js create mode 100644 tests/node_modules/lodash/_asciiWords.js create mode 100644 tests/node_modules/lodash/_assignMergeValue.js create mode 100644 tests/node_modules/lodash/_assignValue.js create mode 100644 tests/node_modules/lodash/_assocIndexOf.js create mode 100644 tests/node_modules/lodash/_baseAggregator.js create mode 100644 tests/node_modules/lodash/_baseAssign.js create mode 100644 tests/node_modules/lodash/_baseAssignIn.js create mode 100644 tests/node_modules/lodash/_baseAssignValue.js create mode 100644 tests/node_modules/lodash/_baseAt.js create mode 100644 tests/node_modules/lodash/_baseClamp.js create mode 100644 tests/node_modules/lodash/_baseClone.js create mode 100644 tests/node_modules/lodash/_baseConforms.js create mode 100644 tests/node_modules/lodash/_baseConformsTo.js create mode 100644 tests/node_modules/lodash/_baseCreate.js create mode 100644 tests/node_modules/lodash/_baseDelay.js create mode 100644 tests/node_modules/lodash/_baseDifference.js create mode 100644 tests/node_modules/lodash/_baseEach.js create mode 100644 tests/node_modules/lodash/_baseEachRight.js create mode 100644 tests/node_modules/lodash/_baseEvery.js create mode 100644 tests/node_modules/lodash/_baseExtremum.js create mode 100644 tests/node_modules/lodash/_baseFill.js create mode 100644 tests/node_modules/lodash/_baseFilter.js create mode 100644 tests/node_modules/lodash/_baseFindIndex.js create mode 100644 tests/node_modules/lodash/_baseFindKey.js create mode 100644 tests/node_modules/lodash/_baseFlatten.js create mode 100644 tests/node_modules/lodash/_baseFor.js create mode 100644 tests/node_modules/lodash/_baseForOwn.js create mode 100644 tests/node_modules/lodash/_baseForOwnRight.js create mode 100644 tests/node_modules/lodash/_baseForRight.js create mode 100644 tests/node_modules/lodash/_baseFunctions.js create mode 100644 tests/node_modules/lodash/_baseGet.js create mode 100644 tests/node_modules/lodash/_baseGetAllKeys.js create mode 100644 tests/node_modules/lodash/_baseGetTag.js create mode 100644 tests/node_modules/lodash/_baseGt.js create mode 100644 tests/node_modules/lodash/_baseHas.js create mode 100644 tests/node_modules/lodash/_baseHasIn.js create mode 100644 tests/node_modules/lodash/_baseInRange.js create mode 100644 tests/node_modules/lodash/_baseIndexOf.js create mode 100644 tests/node_modules/lodash/_baseIndexOfWith.js create mode 100644 tests/node_modules/lodash/_baseIntersection.js create mode 100644 tests/node_modules/lodash/_baseInverter.js create mode 100644 tests/node_modules/lodash/_baseInvoke.js create mode 100644 tests/node_modules/lodash/_baseIsArguments.js create mode 100644 tests/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 tests/node_modules/lodash/_baseIsDate.js create mode 100644 tests/node_modules/lodash/_baseIsEqual.js create mode 100644 tests/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 tests/node_modules/lodash/_baseIsMap.js create mode 100644 tests/node_modules/lodash/_baseIsMatch.js create mode 100644 tests/node_modules/lodash/_baseIsNaN.js create mode 100644 tests/node_modules/lodash/_baseIsNative.js create mode 100644 tests/node_modules/lodash/_baseIsRegExp.js create mode 100644 tests/node_modules/lodash/_baseIsSet.js create mode 100644 tests/node_modules/lodash/_baseIsTypedArray.js create mode 100644 tests/node_modules/lodash/_baseIteratee.js create mode 100644 tests/node_modules/lodash/_baseKeys.js create mode 100644 tests/node_modules/lodash/_baseKeysIn.js create mode 100644 tests/node_modules/lodash/_baseLodash.js create mode 100644 tests/node_modules/lodash/_baseLt.js create mode 100644 tests/node_modules/lodash/_baseMap.js create mode 100644 tests/node_modules/lodash/_baseMatches.js create mode 100644 tests/node_modules/lodash/_baseMatchesProperty.js create mode 100644 tests/node_modules/lodash/_baseMean.js create mode 100644 tests/node_modules/lodash/_baseMerge.js create mode 100644 tests/node_modules/lodash/_baseMergeDeep.js create mode 100644 tests/node_modules/lodash/_baseNth.js create mode 100644 tests/node_modules/lodash/_baseOrderBy.js create mode 100644 tests/node_modules/lodash/_basePick.js create mode 100644 tests/node_modules/lodash/_basePickBy.js create mode 100644 tests/node_modules/lodash/_baseProperty.js create mode 100644 tests/node_modules/lodash/_basePropertyDeep.js create mode 100644 tests/node_modules/lodash/_basePropertyOf.js create mode 100644 tests/node_modules/lodash/_basePullAll.js create mode 100644 tests/node_modules/lodash/_basePullAt.js create mode 100644 tests/node_modules/lodash/_baseRandom.js create mode 100644 tests/node_modules/lodash/_baseRange.js create mode 100644 tests/node_modules/lodash/_baseReduce.js create mode 100644 tests/node_modules/lodash/_baseRepeat.js create mode 100644 tests/node_modules/lodash/_baseRest.js create mode 100644 tests/node_modules/lodash/_baseSample.js create mode 100644 tests/node_modules/lodash/_baseSampleSize.js create mode 100644 tests/node_modules/lodash/_baseSet.js create mode 100644 tests/node_modules/lodash/_baseSetData.js create mode 100644 tests/node_modules/lodash/_baseSetToString.js create mode 100644 tests/node_modules/lodash/_baseShuffle.js create mode 100644 tests/node_modules/lodash/_baseSlice.js create mode 100644 tests/node_modules/lodash/_baseSome.js create mode 100644 tests/node_modules/lodash/_baseSortBy.js create mode 100644 tests/node_modules/lodash/_baseSortedIndex.js create mode 100644 tests/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 tests/node_modules/lodash/_baseSortedUniq.js create mode 100644 tests/node_modules/lodash/_baseSum.js create mode 100644 tests/node_modules/lodash/_baseTimes.js create mode 100644 tests/node_modules/lodash/_baseToNumber.js create mode 100644 tests/node_modules/lodash/_baseToPairs.js create mode 100644 tests/node_modules/lodash/_baseToString.js create mode 100644 tests/node_modules/lodash/_baseTrim.js create mode 100644 tests/node_modules/lodash/_baseUnary.js create mode 100644 tests/node_modules/lodash/_baseUniq.js create mode 100644 tests/node_modules/lodash/_baseUnset.js create mode 100644 tests/node_modules/lodash/_baseUpdate.js create mode 100644 tests/node_modules/lodash/_baseValues.js create mode 100644 tests/node_modules/lodash/_baseWhile.js create mode 100644 tests/node_modules/lodash/_baseWrapperValue.js create mode 100644 tests/node_modules/lodash/_baseXor.js create mode 100644 tests/node_modules/lodash/_baseZipObject.js create mode 100644 tests/node_modules/lodash/_cacheHas.js create mode 100644 tests/node_modules/lodash/_castArrayLikeObject.js create mode 100644 tests/node_modules/lodash/_castFunction.js create mode 100644 tests/node_modules/lodash/_castPath.js create mode 100644 tests/node_modules/lodash/_castRest.js create mode 100644 tests/node_modules/lodash/_castSlice.js create mode 100644 tests/node_modules/lodash/_charsEndIndex.js create mode 100644 tests/node_modules/lodash/_charsStartIndex.js create mode 100644 tests/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 tests/node_modules/lodash/_cloneBuffer.js create mode 100644 tests/node_modules/lodash/_cloneDataView.js create mode 100644 tests/node_modules/lodash/_cloneRegExp.js create mode 100644 tests/node_modules/lodash/_cloneSymbol.js create mode 100644 tests/node_modules/lodash/_cloneTypedArray.js create mode 100644 tests/node_modules/lodash/_compareAscending.js create mode 100644 tests/node_modules/lodash/_compareMultiple.js create mode 100644 tests/node_modules/lodash/_composeArgs.js create mode 100644 tests/node_modules/lodash/_composeArgsRight.js create mode 100644 tests/node_modules/lodash/_copyArray.js create mode 100644 tests/node_modules/lodash/_copyObject.js create mode 100644 tests/node_modules/lodash/_copySymbols.js create mode 100644 tests/node_modules/lodash/_copySymbolsIn.js create mode 100644 tests/node_modules/lodash/_coreJsData.js create mode 100644 tests/node_modules/lodash/_countHolders.js create mode 100644 tests/node_modules/lodash/_createAggregator.js create mode 100644 tests/node_modules/lodash/_createAssigner.js create mode 100644 tests/node_modules/lodash/_createBaseEach.js create mode 100644 tests/node_modules/lodash/_createBaseFor.js create mode 100644 tests/node_modules/lodash/_createBind.js create mode 100644 tests/node_modules/lodash/_createCaseFirst.js create mode 100644 tests/node_modules/lodash/_createCompounder.js create mode 100644 tests/node_modules/lodash/_createCtor.js create mode 100644 tests/node_modules/lodash/_createCurry.js create mode 100644 tests/node_modules/lodash/_createFind.js create mode 100644 tests/node_modules/lodash/_createFlow.js create mode 100644 tests/node_modules/lodash/_createHybrid.js create mode 100644 tests/node_modules/lodash/_createInverter.js create mode 100644 tests/node_modules/lodash/_createMathOperation.js create mode 100644 tests/node_modules/lodash/_createOver.js create mode 100644 tests/node_modules/lodash/_createPadding.js create mode 100644 tests/node_modules/lodash/_createPartial.js create mode 100644 tests/node_modules/lodash/_createRange.js create mode 100644 tests/node_modules/lodash/_createRecurry.js create mode 100644 tests/node_modules/lodash/_createRelationalOperation.js create mode 100644 tests/node_modules/lodash/_createRound.js create mode 100644 tests/node_modules/lodash/_createSet.js create mode 100644 tests/node_modules/lodash/_createToPairs.js create mode 100644 tests/node_modules/lodash/_createWrap.js create mode 100644 tests/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 tests/node_modules/lodash/_customDefaultsMerge.js create mode 100644 tests/node_modules/lodash/_customOmitClone.js create mode 100644 tests/node_modules/lodash/_deburrLetter.js create mode 100644 tests/node_modules/lodash/_defineProperty.js create mode 100644 tests/node_modules/lodash/_equalArrays.js create mode 100644 tests/node_modules/lodash/_equalByTag.js create mode 100644 tests/node_modules/lodash/_equalObjects.js create mode 100644 tests/node_modules/lodash/_escapeHtmlChar.js create mode 100644 tests/node_modules/lodash/_escapeStringChar.js create mode 100644 tests/node_modules/lodash/_flatRest.js create mode 100644 tests/node_modules/lodash/_freeGlobal.js create mode 100644 tests/node_modules/lodash/_getAllKeys.js create mode 100644 tests/node_modules/lodash/_getAllKeysIn.js create mode 100644 tests/node_modules/lodash/_getData.js create mode 100644 tests/node_modules/lodash/_getFuncName.js create mode 100644 tests/node_modules/lodash/_getHolder.js create mode 100644 tests/node_modules/lodash/_getMapData.js create mode 100644 tests/node_modules/lodash/_getMatchData.js create mode 100644 tests/node_modules/lodash/_getNative.js create mode 100644 tests/node_modules/lodash/_getPrototype.js create mode 100644 tests/node_modules/lodash/_getRawTag.js create mode 100644 tests/node_modules/lodash/_getSymbols.js create mode 100644 tests/node_modules/lodash/_getSymbolsIn.js create mode 100644 tests/node_modules/lodash/_getTag.js create mode 100644 tests/node_modules/lodash/_getValue.js create mode 100644 tests/node_modules/lodash/_getView.js create mode 100644 tests/node_modules/lodash/_getWrapDetails.js create mode 100644 tests/node_modules/lodash/_hasPath.js create mode 100644 tests/node_modules/lodash/_hasUnicode.js create mode 100644 tests/node_modules/lodash/_hasUnicodeWord.js create mode 100644 tests/node_modules/lodash/_hashClear.js create mode 100644 tests/node_modules/lodash/_hashDelete.js create mode 100644 tests/node_modules/lodash/_hashGet.js create mode 100644 tests/node_modules/lodash/_hashHas.js create mode 100644 tests/node_modules/lodash/_hashSet.js create mode 100644 tests/node_modules/lodash/_initCloneArray.js create mode 100644 tests/node_modules/lodash/_initCloneByTag.js create mode 100644 tests/node_modules/lodash/_initCloneObject.js create mode 100644 tests/node_modules/lodash/_insertWrapDetails.js create mode 100644 tests/node_modules/lodash/_isFlattenable.js create mode 100644 tests/node_modules/lodash/_isIndex.js create mode 100644 tests/node_modules/lodash/_isIterateeCall.js create mode 100644 tests/node_modules/lodash/_isKey.js create mode 100644 tests/node_modules/lodash/_isKeyable.js create mode 100644 tests/node_modules/lodash/_isLaziable.js create mode 100644 tests/node_modules/lodash/_isMaskable.js create mode 100644 tests/node_modules/lodash/_isMasked.js create mode 100644 tests/node_modules/lodash/_isPrototype.js create mode 100644 tests/node_modules/lodash/_isStrictComparable.js create mode 100644 tests/node_modules/lodash/_iteratorToArray.js create mode 100644 tests/node_modules/lodash/_lazyClone.js create mode 100644 tests/node_modules/lodash/_lazyReverse.js create mode 100644 tests/node_modules/lodash/_lazyValue.js create mode 100644 tests/node_modules/lodash/_listCacheClear.js create mode 100644 tests/node_modules/lodash/_listCacheDelete.js create mode 100644 tests/node_modules/lodash/_listCacheGet.js create mode 100644 tests/node_modules/lodash/_listCacheHas.js create mode 100644 tests/node_modules/lodash/_listCacheSet.js create mode 100644 tests/node_modules/lodash/_mapCacheClear.js create mode 100644 tests/node_modules/lodash/_mapCacheDelete.js create mode 100644 tests/node_modules/lodash/_mapCacheGet.js create mode 100644 tests/node_modules/lodash/_mapCacheHas.js create mode 100644 tests/node_modules/lodash/_mapCacheSet.js create mode 100644 tests/node_modules/lodash/_mapToArray.js create mode 100644 tests/node_modules/lodash/_matchesStrictComparable.js create mode 100644 tests/node_modules/lodash/_memoizeCapped.js create mode 100644 tests/node_modules/lodash/_mergeData.js create mode 100644 tests/node_modules/lodash/_metaMap.js create mode 100644 tests/node_modules/lodash/_nativeCreate.js create mode 100644 tests/node_modules/lodash/_nativeKeys.js create mode 100644 tests/node_modules/lodash/_nativeKeysIn.js create mode 100644 tests/node_modules/lodash/_nodeUtil.js create mode 100644 tests/node_modules/lodash/_objectToString.js create mode 100644 tests/node_modules/lodash/_overArg.js create mode 100644 tests/node_modules/lodash/_overRest.js create mode 100644 tests/node_modules/lodash/_parent.js create mode 100644 tests/node_modules/lodash/_reEscape.js create mode 100644 tests/node_modules/lodash/_reEvaluate.js create mode 100644 tests/node_modules/lodash/_reInterpolate.js create mode 100644 tests/node_modules/lodash/_realNames.js create mode 100644 tests/node_modules/lodash/_reorder.js create mode 100644 tests/node_modules/lodash/_replaceHolders.js create mode 100644 tests/node_modules/lodash/_root.js create mode 100644 tests/node_modules/lodash/_safeGet.js create mode 100644 tests/node_modules/lodash/_setCacheAdd.js create mode 100644 tests/node_modules/lodash/_setCacheHas.js create mode 100644 tests/node_modules/lodash/_setData.js create mode 100644 tests/node_modules/lodash/_setToArray.js create mode 100644 tests/node_modules/lodash/_setToPairs.js create mode 100644 tests/node_modules/lodash/_setToString.js create mode 100644 tests/node_modules/lodash/_setWrapToString.js create mode 100644 tests/node_modules/lodash/_shortOut.js create mode 100644 tests/node_modules/lodash/_shuffleSelf.js create mode 100644 tests/node_modules/lodash/_stackClear.js create mode 100644 tests/node_modules/lodash/_stackDelete.js create mode 100644 tests/node_modules/lodash/_stackGet.js create mode 100644 tests/node_modules/lodash/_stackHas.js create mode 100644 tests/node_modules/lodash/_stackSet.js create mode 100644 tests/node_modules/lodash/_strictIndexOf.js create mode 100644 tests/node_modules/lodash/_strictLastIndexOf.js create mode 100644 tests/node_modules/lodash/_stringSize.js create mode 100644 tests/node_modules/lodash/_stringToArray.js create mode 100644 tests/node_modules/lodash/_stringToPath.js create mode 100644 tests/node_modules/lodash/_toKey.js create mode 100644 tests/node_modules/lodash/_toSource.js create mode 100644 tests/node_modules/lodash/_trimmedEndIndex.js create mode 100644 tests/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 tests/node_modules/lodash/_unicodeSize.js create mode 100644 tests/node_modules/lodash/_unicodeToArray.js create mode 100644 tests/node_modules/lodash/_unicodeWords.js create mode 100644 tests/node_modules/lodash/_updateWrapDetails.js create mode 100644 tests/node_modules/lodash/_wrapperClone.js create mode 100644 tests/node_modules/lodash/add.js create mode 100644 tests/node_modules/lodash/after.js create mode 100644 tests/node_modules/lodash/array.js create mode 100644 tests/node_modules/lodash/ary.js create mode 100644 tests/node_modules/lodash/assign.js create mode 100644 tests/node_modules/lodash/assignIn.js create mode 100644 tests/node_modules/lodash/assignInWith.js create mode 100644 tests/node_modules/lodash/assignWith.js create mode 100644 tests/node_modules/lodash/at.js create mode 100644 tests/node_modules/lodash/attempt.js create mode 100644 tests/node_modules/lodash/before.js create mode 100644 tests/node_modules/lodash/bind.js create mode 100644 tests/node_modules/lodash/bindAll.js create mode 100644 tests/node_modules/lodash/bindKey.js create mode 100644 tests/node_modules/lodash/camelCase.js create mode 100644 tests/node_modules/lodash/capitalize.js create mode 100644 tests/node_modules/lodash/castArray.js create mode 100644 tests/node_modules/lodash/ceil.js create mode 100644 tests/node_modules/lodash/chain.js create mode 100644 tests/node_modules/lodash/chunk.js create mode 100644 tests/node_modules/lodash/clamp.js create mode 100644 tests/node_modules/lodash/clone.js create mode 100644 tests/node_modules/lodash/cloneDeep.js create mode 100644 tests/node_modules/lodash/cloneDeepWith.js create mode 100644 tests/node_modules/lodash/cloneWith.js create mode 100644 tests/node_modules/lodash/collection.js create mode 100644 tests/node_modules/lodash/commit.js create mode 100644 tests/node_modules/lodash/compact.js create mode 100644 tests/node_modules/lodash/concat.js create mode 100644 tests/node_modules/lodash/cond.js create mode 100644 tests/node_modules/lodash/conforms.js create mode 100644 tests/node_modules/lodash/conformsTo.js create mode 100644 tests/node_modules/lodash/constant.js create mode 100644 tests/node_modules/lodash/core.js create mode 100644 tests/node_modules/lodash/core.min.js create mode 100644 tests/node_modules/lodash/countBy.js create mode 100644 tests/node_modules/lodash/create.js create mode 100644 tests/node_modules/lodash/curry.js create mode 100644 tests/node_modules/lodash/curryRight.js create mode 100644 tests/node_modules/lodash/date.js create mode 100644 tests/node_modules/lodash/debounce.js create mode 100644 tests/node_modules/lodash/deburr.js create mode 100644 tests/node_modules/lodash/defaultTo.js create mode 100644 tests/node_modules/lodash/defaults.js create mode 100644 tests/node_modules/lodash/defaultsDeep.js create mode 100644 tests/node_modules/lodash/defer.js create mode 100644 tests/node_modules/lodash/delay.js create mode 100644 tests/node_modules/lodash/difference.js create mode 100644 tests/node_modules/lodash/differenceBy.js create mode 100644 tests/node_modules/lodash/differenceWith.js create mode 100644 tests/node_modules/lodash/divide.js create mode 100644 tests/node_modules/lodash/drop.js create mode 100644 tests/node_modules/lodash/dropRight.js create mode 100644 tests/node_modules/lodash/dropRightWhile.js create mode 100644 tests/node_modules/lodash/dropWhile.js create mode 100644 tests/node_modules/lodash/each.js create mode 100644 tests/node_modules/lodash/eachRight.js create mode 100644 tests/node_modules/lodash/endsWith.js create mode 100644 tests/node_modules/lodash/entries.js create mode 100644 tests/node_modules/lodash/entriesIn.js create mode 100644 tests/node_modules/lodash/eq.js create mode 100644 tests/node_modules/lodash/escape.js create mode 100644 tests/node_modules/lodash/escapeRegExp.js create mode 100644 tests/node_modules/lodash/every.js create mode 100644 tests/node_modules/lodash/extend.js create mode 100644 tests/node_modules/lodash/extendWith.js create mode 100644 tests/node_modules/lodash/fill.js create mode 100644 tests/node_modules/lodash/filter.js create mode 100644 tests/node_modules/lodash/find.js create mode 100644 tests/node_modules/lodash/findIndex.js create mode 100644 tests/node_modules/lodash/findKey.js create mode 100644 tests/node_modules/lodash/findLast.js create mode 100644 tests/node_modules/lodash/findLastIndex.js create mode 100644 tests/node_modules/lodash/findLastKey.js create mode 100644 tests/node_modules/lodash/first.js create mode 100644 tests/node_modules/lodash/flake.lock create mode 100644 tests/node_modules/lodash/flake.nix create mode 100644 tests/node_modules/lodash/flatMap.js create mode 100644 tests/node_modules/lodash/flatMapDeep.js create mode 100644 tests/node_modules/lodash/flatMapDepth.js create mode 100644 tests/node_modules/lodash/flatten.js create mode 100644 tests/node_modules/lodash/flattenDeep.js create mode 100644 tests/node_modules/lodash/flattenDepth.js create mode 100644 tests/node_modules/lodash/flip.js create mode 100644 tests/node_modules/lodash/floor.js create mode 100644 tests/node_modules/lodash/flow.js create mode 100644 tests/node_modules/lodash/flowRight.js create mode 100644 tests/node_modules/lodash/forEach.js create mode 100644 tests/node_modules/lodash/forEachRight.js create mode 100644 tests/node_modules/lodash/forIn.js create mode 100644 tests/node_modules/lodash/forInRight.js create mode 100644 tests/node_modules/lodash/forOwn.js create mode 100644 tests/node_modules/lodash/forOwnRight.js create mode 100644 tests/node_modules/lodash/fp.js create mode 100644 tests/node_modules/lodash/fp/F.js create mode 100644 tests/node_modules/lodash/fp/T.js create mode 100644 tests/node_modules/lodash/fp/__.js create mode 100644 tests/node_modules/lodash/fp/_baseConvert.js create mode 100644 tests/node_modules/lodash/fp/_convertBrowser.js create mode 100644 tests/node_modules/lodash/fp/_falseOptions.js create mode 100644 tests/node_modules/lodash/fp/_mapping.js create mode 100644 tests/node_modules/lodash/fp/_util.js create mode 100644 tests/node_modules/lodash/fp/add.js create mode 100644 tests/node_modules/lodash/fp/after.js create mode 100644 tests/node_modules/lodash/fp/all.js create mode 100644 tests/node_modules/lodash/fp/allPass.js create mode 100644 tests/node_modules/lodash/fp/always.js create mode 100644 tests/node_modules/lodash/fp/any.js create mode 100644 tests/node_modules/lodash/fp/anyPass.js create mode 100644 tests/node_modules/lodash/fp/apply.js create mode 100644 tests/node_modules/lodash/fp/array.js create mode 100644 tests/node_modules/lodash/fp/ary.js create mode 100644 tests/node_modules/lodash/fp/assign.js create mode 100644 tests/node_modules/lodash/fp/assignAll.js create mode 100644 tests/node_modules/lodash/fp/assignAllWith.js create mode 100644 tests/node_modules/lodash/fp/assignIn.js create mode 100644 tests/node_modules/lodash/fp/assignInAll.js create mode 100644 tests/node_modules/lodash/fp/assignInAllWith.js create mode 100644 tests/node_modules/lodash/fp/assignInWith.js create mode 100644 tests/node_modules/lodash/fp/assignWith.js create mode 100644 tests/node_modules/lodash/fp/assoc.js create mode 100644 tests/node_modules/lodash/fp/assocPath.js create mode 100644 tests/node_modules/lodash/fp/at.js create mode 100644 tests/node_modules/lodash/fp/attempt.js create mode 100644 tests/node_modules/lodash/fp/before.js create mode 100644 tests/node_modules/lodash/fp/bind.js create mode 100644 tests/node_modules/lodash/fp/bindAll.js create mode 100644 tests/node_modules/lodash/fp/bindKey.js create mode 100644 tests/node_modules/lodash/fp/camelCase.js create mode 100644 tests/node_modules/lodash/fp/capitalize.js create mode 100644 tests/node_modules/lodash/fp/castArray.js create mode 100644 tests/node_modules/lodash/fp/ceil.js create mode 100644 tests/node_modules/lodash/fp/chain.js create mode 100644 tests/node_modules/lodash/fp/chunk.js create mode 100644 tests/node_modules/lodash/fp/clamp.js create mode 100644 tests/node_modules/lodash/fp/clone.js create mode 100644 tests/node_modules/lodash/fp/cloneDeep.js create mode 100644 tests/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 tests/node_modules/lodash/fp/cloneWith.js create mode 100644 tests/node_modules/lodash/fp/collection.js create mode 100644 tests/node_modules/lodash/fp/commit.js create mode 100644 tests/node_modules/lodash/fp/compact.js create mode 100644 tests/node_modules/lodash/fp/complement.js create mode 100644 tests/node_modules/lodash/fp/compose.js create mode 100644 tests/node_modules/lodash/fp/concat.js create mode 100644 tests/node_modules/lodash/fp/cond.js create mode 100644 tests/node_modules/lodash/fp/conforms.js create mode 100644 tests/node_modules/lodash/fp/conformsTo.js create mode 100644 tests/node_modules/lodash/fp/constant.js create mode 100644 tests/node_modules/lodash/fp/contains.js create mode 100644 tests/node_modules/lodash/fp/convert.js create mode 100644 tests/node_modules/lodash/fp/countBy.js create mode 100644 tests/node_modules/lodash/fp/create.js create mode 100644 tests/node_modules/lodash/fp/curry.js create mode 100644 tests/node_modules/lodash/fp/curryN.js create mode 100644 tests/node_modules/lodash/fp/curryRight.js create mode 100644 tests/node_modules/lodash/fp/curryRightN.js create mode 100644 tests/node_modules/lodash/fp/date.js create mode 100644 tests/node_modules/lodash/fp/debounce.js create mode 100644 tests/node_modules/lodash/fp/deburr.js create mode 100644 tests/node_modules/lodash/fp/defaultTo.js create mode 100644 tests/node_modules/lodash/fp/defaults.js create mode 100644 tests/node_modules/lodash/fp/defaultsAll.js create mode 100644 tests/node_modules/lodash/fp/defaultsDeep.js create mode 100644 tests/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 tests/node_modules/lodash/fp/defer.js create mode 100644 tests/node_modules/lodash/fp/delay.js create mode 100644 tests/node_modules/lodash/fp/difference.js create mode 100644 tests/node_modules/lodash/fp/differenceBy.js create mode 100644 tests/node_modules/lodash/fp/differenceWith.js create mode 100644 tests/node_modules/lodash/fp/dissoc.js create mode 100644 tests/node_modules/lodash/fp/dissocPath.js create mode 100644 tests/node_modules/lodash/fp/divide.js create mode 100644 tests/node_modules/lodash/fp/drop.js create mode 100644 tests/node_modules/lodash/fp/dropLast.js create mode 100644 tests/node_modules/lodash/fp/dropLastWhile.js create mode 100644 tests/node_modules/lodash/fp/dropRight.js create mode 100644 tests/node_modules/lodash/fp/dropRightWhile.js create mode 100644 tests/node_modules/lodash/fp/dropWhile.js create mode 100644 tests/node_modules/lodash/fp/each.js create mode 100644 tests/node_modules/lodash/fp/eachRight.js create mode 100644 tests/node_modules/lodash/fp/endsWith.js create mode 100644 tests/node_modules/lodash/fp/entries.js create mode 100644 tests/node_modules/lodash/fp/entriesIn.js create mode 100644 tests/node_modules/lodash/fp/eq.js create mode 100644 tests/node_modules/lodash/fp/equals.js create mode 100644 tests/node_modules/lodash/fp/escape.js create mode 100644 tests/node_modules/lodash/fp/escapeRegExp.js create mode 100644 tests/node_modules/lodash/fp/every.js create mode 100644 tests/node_modules/lodash/fp/extend.js create mode 100644 tests/node_modules/lodash/fp/extendAll.js create mode 100644 tests/node_modules/lodash/fp/extendAllWith.js create mode 100644 tests/node_modules/lodash/fp/extendWith.js create mode 100644 tests/node_modules/lodash/fp/fill.js create mode 100644 tests/node_modules/lodash/fp/filter.js create mode 100644 tests/node_modules/lodash/fp/find.js create mode 100644 tests/node_modules/lodash/fp/findFrom.js create mode 100644 tests/node_modules/lodash/fp/findIndex.js create mode 100644 tests/node_modules/lodash/fp/findIndexFrom.js create mode 100644 tests/node_modules/lodash/fp/findKey.js create mode 100644 tests/node_modules/lodash/fp/findLast.js create mode 100644 tests/node_modules/lodash/fp/findLastFrom.js create mode 100644 tests/node_modules/lodash/fp/findLastIndex.js create mode 100644 tests/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 tests/node_modules/lodash/fp/findLastKey.js create mode 100644 tests/node_modules/lodash/fp/first.js create mode 100644 tests/node_modules/lodash/fp/flatMap.js create mode 100644 tests/node_modules/lodash/fp/flatMapDeep.js create mode 100644 tests/node_modules/lodash/fp/flatMapDepth.js create mode 100644 tests/node_modules/lodash/fp/flatten.js create mode 100644 tests/node_modules/lodash/fp/flattenDeep.js create mode 100644 tests/node_modules/lodash/fp/flattenDepth.js create mode 100644 tests/node_modules/lodash/fp/flip.js create mode 100644 tests/node_modules/lodash/fp/floor.js create mode 100644 tests/node_modules/lodash/fp/flow.js create mode 100644 tests/node_modules/lodash/fp/flowRight.js create mode 100644 tests/node_modules/lodash/fp/forEach.js create mode 100644 tests/node_modules/lodash/fp/forEachRight.js create mode 100644 tests/node_modules/lodash/fp/forIn.js create mode 100644 tests/node_modules/lodash/fp/forInRight.js create mode 100644 tests/node_modules/lodash/fp/forOwn.js create mode 100644 tests/node_modules/lodash/fp/forOwnRight.js create mode 100644 tests/node_modules/lodash/fp/fromPairs.js create mode 100644 tests/node_modules/lodash/fp/function.js create mode 100644 tests/node_modules/lodash/fp/functions.js create mode 100644 tests/node_modules/lodash/fp/functionsIn.js create mode 100644 tests/node_modules/lodash/fp/get.js create mode 100644 tests/node_modules/lodash/fp/getOr.js create mode 100644 tests/node_modules/lodash/fp/groupBy.js create mode 100644 tests/node_modules/lodash/fp/gt.js create mode 100644 tests/node_modules/lodash/fp/gte.js create mode 100644 tests/node_modules/lodash/fp/has.js create mode 100644 tests/node_modules/lodash/fp/hasIn.js create mode 100644 tests/node_modules/lodash/fp/head.js create mode 100644 tests/node_modules/lodash/fp/identical.js create mode 100644 tests/node_modules/lodash/fp/identity.js create mode 100644 tests/node_modules/lodash/fp/inRange.js create mode 100644 tests/node_modules/lodash/fp/includes.js create mode 100644 tests/node_modules/lodash/fp/includesFrom.js create mode 100644 tests/node_modules/lodash/fp/indexBy.js create mode 100644 tests/node_modules/lodash/fp/indexOf.js create mode 100644 tests/node_modules/lodash/fp/indexOfFrom.js create mode 100644 tests/node_modules/lodash/fp/init.js create mode 100644 tests/node_modules/lodash/fp/initial.js create mode 100644 tests/node_modules/lodash/fp/intersection.js create mode 100644 tests/node_modules/lodash/fp/intersectionBy.js create mode 100644 tests/node_modules/lodash/fp/intersectionWith.js create mode 100644 tests/node_modules/lodash/fp/invert.js create mode 100644 tests/node_modules/lodash/fp/invertBy.js create mode 100644 tests/node_modules/lodash/fp/invertObj.js create mode 100644 tests/node_modules/lodash/fp/invoke.js create mode 100644 tests/node_modules/lodash/fp/invokeArgs.js create mode 100644 tests/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 tests/node_modules/lodash/fp/invokeMap.js create mode 100644 tests/node_modules/lodash/fp/isArguments.js create mode 100644 tests/node_modules/lodash/fp/isArray.js create mode 100644 tests/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 tests/node_modules/lodash/fp/isArrayLike.js create mode 100644 tests/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 tests/node_modules/lodash/fp/isBoolean.js create mode 100644 tests/node_modules/lodash/fp/isBuffer.js create mode 100644 tests/node_modules/lodash/fp/isDate.js create mode 100644 tests/node_modules/lodash/fp/isElement.js create mode 100644 tests/node_modules/lodash/fp/isEmpty.js create mode 100644 tests/node_modules/lodash/fp/isEqual.js create mode 100644 tests/node_modules/lodash/fp/isEqualWith.js create mode 100644 tests/node_modules/lodash/fp/isError.js create mode 100644 tests/node_modules/lodash/fp/isFinite.js create mode 100644 tests/node_modules/lodash/fp/isFunction.js create mode 100644 tests/node_modules/lodash/fp/isInteger.js create mode 100644 tests/node_modules/lodash/fp/isLength.js create mode 100644 tests/node_modules/lodash/fp/isMap.js create mode 100644 tests/node_modules/lodash/fp/isMatch.js create mode 100644 tests/node_modules/lodash/fp/isMatchWith.js create mode 100644 tests/node_modules/lodash/fp/isNaN.js create mode 100644 tests/node_modules/lodash/fp/isNative.js create mode 100644 tests/node_modules/lodash/fp/isNil.js create mode 100644 tests/node_modules/lodash/fp/isNull.js create mode 100644 tests/node_modules/lodash/fp/isNumber.js create mode 100644 tests/node_modules/lodash/fp/isObject.js create mode 100644 tests/node_modules/lodash/fp/isObjectLike.js create mode 100644 tests/node_modules/lodash/fp/isPlainObject.js create mode 100644 tests/node_modules/lodash/fp/isRegExp.js create mode 100644 tests/node_modules/lodash/fp/isSafeInteger.js create mode 100644 tests/node_modules/lodash/fp/isSet.js create mode 100644 tests/node_modules/lodash/fp/isString.js create mode 100644 tests/node_modules/lodash/fp/isSymbol.js create mode 100644 tests/node_modules/lodash/fp/isTypedArray.js create mode 100644 tests/node_modules/lodash/fp/isUndefined.js create mode 100644 tests/node_modules/lodash/fp/isWeakMap.js create mode 100644 tests/node_modules/lodash/fp/isWeakSet.js create mode 100644 tests/node_modules/lodash/fp/iteratee.js create mode 100644 tests/node_modules/lodash/fp/join.js create mode 100644 tests/node_modules/lodash/fp/juxt.js create mode 100644 tests/node_modules/lodash/fp/kebabCase.js create mode 100644 tests/node_modules/lodash/fp/keyBy.js create mode 100644 tests/node_modules/lodash/fp/keys.js create mode 100644 tests/node_modules/lodash/fp/keysIn.js create mode 100644 tests/node_modules/lodash/fp/lang.js create mode 100644 tests/node_modules/lodash/fp/last.js create mode 100644 tests/node_modules/lodash/fp/lastIndexOf.js create mode 100644 tests/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 tests/node_modules/lodash/fp/lowerCase.js create mode 100644 tests/node_modules/lodash/fp/lowerFirst.js create mode 100644 tests/node_modules/lodash/fp/lt.js create mode 100644 tests/node_modules/lodash/fp/lte.js create mode 100644 tests/node_modules/lodash/fp/map.js create mode 100644 tests/node_modules/lodash/fp/mapKeys.js create mode 100644 tests/node_modules/lodash/fp/mapValues.js create mode 100644 tests/node_modules/lodash/fp/matches.js create mode 100644 tests/node_modules/lodash/fp/matchesProperty.js create mode 100644 tests/node_modules/lodash/fp/math.js create mode 100644 tests/node_modules/lodash/fp/max.js create mode 100644 tests/node_modules/lodash/fp/maxBy.js create mode 100644 tests/node_modules/lodash/fp/mean.js create mode 100644 tests/node_modules/lodash/fp/meanBy.js create mode 100644 tests/node_modules/lodash/fp/memoize.js create mode 100644 tests/node_modules/lodash/fp/merge.js create mode 100644 tests/node_modules/lodash/fp/mergeAll.js create mode 100644 tests/node_modules/lodash/fp/mergeAllWith.js create mode 100644 tests/node_modules/lodash/fp/mergeWith.js create mode 100644 tests/node_modules/lodash/fp/method.js create mode 100644 tests/node_modules/lodash/fp/methodOf.js create mode 100644 tests/node_modules/lodash/fp/min.js create mode 100644 tests/node_modules/lodash/fp/minBy.js create mode 100644 tests/node_modules/lodash/fp/mixin.js create mode 100644 tests/node_modules/lodash/fp/multiply.js create mode 100644 tests/node_modules/lodash/fp/nAry.js create mode 100644 tests/node_modules/lodash/fp/negate.js create mode 100644 tests/node_modules/lodash/fp/next.js create mode 100644 tests/node_modules/lodash/fp/noop.js create mode 100644 tests/node_modules/lodash/fp/now.js create mode 100644 tests/node_modules/lodash/fp/nth.js create mode 100644 tests/node_modules/lodash/fp/nthArg.js create mode 100644 tests/node_modules/lodash/fp/number.js create mode 100644 tests/node_modules/lodash/fp/object.js create mode 100644 tests/node_modules/lodash/fp/omit.js create mode 100644 tests/node_modules/lodash/fp/omitAll.js create mode 100644 tests/node_modules/lodash/fp/omitBy.js create mode 100644 tests/node_modules/lodash/fp/once.js create mode 100644 tests/node_modules/lodash/fp/orderBy.js create mode 100644 tests/node_modules/lodash/fp/over.js create mode 100644 tests/node_modules/lodash/fp/overArgs.js create mode 100644 tests/node_modules/lodash/fp/overEvery.js create mode 100644 tests/node_modules/lodash/fp/overSome.js create mode 100644 tests/node_modules/lodash/fp/pad.js create mode 100644 tests/node_modules/lodash/fp/padChars.js create mode 100644 tests/node_modules/lodash/fp/padCharsEnd.js create mode 100644 tests/node_modules/lodash/fp/padCharsStart.js create mode 100644 tests/node_modules/lodash/fp/padEnd.js create mode 100644 tests/node_modules/lodash/fp/padStart.js create mode 100644 tests/node_modules/lodash/fp/parseInt.js create mode 100644 tests/node_modules/lodash/fp/partial.js create mode 100644 tests/node_modules/lodash/fp/partialRight.js create mode 100644 tests/node_modules/lodash/fp/partition.js create mode 100644 tests/node_modules/lodash/fp/path.js create mode 100644 tests/node_modules/lodash/fp/pathEq.js create mode 100644 tests/node_modules/lodash/fp/pathOr.js create mode 100644 tests/node_modules/lodash/fp/paths.js create mode 100644 tests/node_modules/lodash/fp/pick.js create mode 100644 tests/node_modules/lodash/fp/pickAll.js create mode 100644 tests/node_modules/lodash/fp/pickBy.js create mode 100644 tests/node_modules/lodash/fp/pipe.js create mode 100644 tests/node_modules/lodash/fp/placeholder.js create mode 100644 tests/node_modules/lodash/fp/plant.js create mode 100644 tests/node_modules/lodash/fp/pluck.js create mode 100644 tests/node_modules/lodash/fp/prop.js create mode 100644 tests/node_modules/lodash/fp/propEq.js create mode 100644 tests/node_modules/lodash/fp/propOr.js create mode 100644 tests/node_modules/lodash/fp/property.js create mode 100644 tests/node_modules/lodash/fp/propertyOf.js create mode 100644 tests/node_modules/lodash/fp/props.js create mode 100644 tests/node_modules/lodash/fp/pull.js create mode 100644 tests/node_modules/lodash/fp/pullAll.js create mode 100644 tests/node_modules/lodash/fp/pullAllBy.js create mode 100644 tests/node_modules/lodash/fp/pullAllWith.js create mode 100644 tests/node_modules/lodash/fp/pullAt.js create mode 100644 tests/node_modules/lodash/fp/random.js create mode 100644 tests/node_modules/lodash/fp/range.js create mode 100644 tests/node_modules/lodash/fp/rangeRight.js create mode 100644 tests/node_modules/lodash/fp/rangeStep.js create mode 100644 tests/node_modules/lodash/fp/rangeStepRight.js create mode 100644 tests/node_modules/lodash/fp/rearg.js create mode 100644 tests/node_modules/lodash/fp/reduce.js create mode 100644 tests/node_modules/lodash/fp/reduceRight.js create mode 100644 tests/node_modules/lodash/fp/reject.js create mode 100644 tests/node_modules/lodash/fp/remove.js create mode 100644 tests/node_modules/lodash/fp/repeat.js create mode 100644 tests/node_modules/lodash/fp/replace.js create mode 100644 tests/node_modules/lodash/fp/rest.js create mode 100644 tests/node_modules/lodash/fp/restFrom.js create mode 100644 tests/node_modules/lodash/fp/result.js create mode 100644 tests/node_modules/lodash/fp/reverse.js create mode 100644 tests/node_modules/lodash/fp/round.js create mode 100644 tests/node_modules/lodash/fp/sample.js create mode 100644 tests/node_modules/lodash/fp/sampleSize.js create mode 100644 tests/node_modules/lodash/fp/seq.js create mode 100644 tests/node_modules/lodash/fp/set.js create mode 100644 tests/node_modules/lodash/fp/setWith.js create mode 100644 tests/node_modules/lodash/fp/shuffle.js create mode 100644 tests/node_modules/lodash/fp/size.js create mode 100644 tests/node_modules/lodash/fp/slice.js create mode 100644 tests/node_modules/lodash/fp/snakeCase.js create mode 100644 tests/node_modules/lodash/fp/some.js create mode 100644 tests/node_modules/lodash/fp/sortBy.js create mode 100644 tests/node_modules/lodash/fp/sortedIndex.js create mode 100644 tests/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 tests/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 tests/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 tests/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 tests/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 tests/node_modules/lodash/fp/sortedUniq.js create mode 100644 tests/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 tests/node_modules/lodash/fp/split.js create mode 100644 tests/node_modules/lodash/fp/spread.js create mode 100644 tests/node_modules/lodash/fp/spreadFrom.js create mode 100644 tests/node_modules/lodash/fp/startCase.js create mode 100644 tests/node_modules/lodash/fp/startsWith.js create mode 100644 tests/node_modules/lodash/fp/string.js create mode 100644 tests/node_modules/lodash/fp/stubArray.js create mode 100644 tests/node_modules/lodash/fp/stubFalse.js create mode 100644 tests/node_modules/lodash/fp/stubObject.js create mode 100644 tests/node_modules/lodash/fp/stubString.js create mode 100644 tests/node_modules/lodash/fp/stubTrue.js create mode 100644 tests/node_modules/lodash/fp/subtract.js create mode 100644 tests/node_modules/lodash/fp/sum.js create mode 100644 tests/node_modules/lodash/fp/sumBy.js create mode 100644 tests/node_modules/lodash/fp/symmetricDifference.js create mode 100644 tests/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 tests/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 tests/node_modules/lodash/fp/tail.js create mode 100644 tests/node_modules/lodash/fp/take.js create mode 100644 tests/node_modules/lodash/fp/takeLast.js create mode 100644 tests/node_modules/lodash/fp/takeLastWhile.js create mode 100644 tests/node_modules/lodash/fp/takeRight.js create mode 100644 tests/node_modules/lodash/fp/takeRightWhile.js create mode 100644 tests/node_modules/lodash/fp/takeWhile.js create mode 100644 tests/node_modules/lodash/fp/tap.js create mode 100644 tests/node_modules/lodash/fp/template.js create mode 100644 tests/node_modules/lodash/fp/templateSettings.js create mode 100644 tests/node_modules/lodash/fp/throttle.js create mode 100644 tests/node_modules/lodash/fp/thru.js create mode 100644 tests/node_modules/lodash/fp/times.js create mode 100644 tests/node_modules/lodash/fp/toArray.js create mode 100644 tests/node_modules/lodash/fp/toFinite.js create mode 100644 tests/node_modules/lodash/fp/toInteger.js create mode 100644 tests/node_modules/lodash/fp/toIterator.js create mode 100644 tests/node_modules/lodash/fp/toJSON.js create mode 100644 tests/node_modules/lodash/fp/toLength.js create mode 100644 tests/node_modules/lodash/fp/toLower.js create mode 100644 tests/node_modules/lodash/fp/toNumber.js create mode 100644 tests/node_modules/lodash/fp/toPairs.js create mode 100644 tests/node_modules/lodash/fp/toPairsIn.js create mode 100644 tests/node_modules/lodash/fp/toPath.js create mode 100644 tests/node_modules/lodash/fp/toPlainObject.js create mode 100644 tests/node_modules/lodash/fp/toSafeInteger.js create mode 100644 tests/node_modules/lodash/fp/toString.js create mode 100644 tests/node_modules/lodash/fp/toUpper.js create mode 100644 tests/node_modules/lodash/fp/transform.js create mode 100644 tests/node_modules/lodash/fp/trim.js create mode 100644 tests/node_modules/lodash/fp/trimChars.js create mode 100644 tests/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 tests/node_modules/lodash/fp/trimCharsStart.js create mode 100644 tests/node_modules/lodash/fp/trimEnd.js create mode 100644 tests/node_modules/lodash/fp/trimStart.js create mode 100644 tests/node_modules/lodash/fp/truncate.js create mode 100644 tests/node_modules/lodash/fp/unapply.js create mode 100644 tests/node_modules/lodash/fp/unary.js create mode 100644 tests/node_modules/lodash/fp/unescape.js create mode 100644 tests/node_modules/lodash/fp/union.js create mode 100644 tests/node_modules/lodash/fp/unionBy.js create mode 100644 tests/node_modules/lodash/fp/unionWith.js create mode 100644 tests/node_modules/lodash/fp/uniq.js create mode 100644 tests/node_modules/lodash/fp/uniqBy.js create mode 100644 tests/node_modules/lodash/fp/uniqWith.js create mode 100644 tests/node_modules/lodash/fp/uniqueId.js create mode 100644 tests/node_modules/lodash/fp/unnest.js create mode 100644 tests/node_modules/lodash/fp/unset.js create mode 100644 tests/node_modules/lodash/fp/unzip.js create mode 100644 tests/node_modules/lodash/fp/unzipWith.js create mode 100644 tests/node_modules/lodash/fp/update.js create mode 100644 tests/node_modules/lodash/fp/updateWith.js create mode 100644 tests/node_modules/lodash/fp/upperCase.js create mode 100644 tests/node_modules/lodash/fp/upperFirst.js create mode 100644 tests/node_modules/lodash/fp/useWith.js create mode 100644 tests/node_modules/lodash/fp/util.js create mode 100644 tests/node_modules/lodash/fp/value.js create mode 100644 tests/node_modules/lodash/fp/valueOf.js create mode 100644 tests/node_modules/lodash/fp/values.js create mode 100644 tests/node_modules/lodash/fp/valuesIn.js create mode 100644 tests/node_modules/lodash/fp/where.js create mode 100644 tests/node_modules/lodash/fp/whereEq.js create mode 100644 tests/node_modules/lodash/fp/without.js create mode 100644 tests/node_modules/lodash/fp/words.js create mode 100644 tests/node_modules/lodash/fp/wrap.js create mode 100644 tests/node_modules/lodash/fp/wrapperAt.js create mode 100644 tests/node_modules/lodash/fp/wrapperChain.js create mode 100644 tests/node_modules/lodash/fp/wrapperLodash.js create mode 100644 tests/node_modules/lodash/fp/wrapperReverse.js create mode 100644 tests/node_modules/lodash/fp/wrapperValue.js create mode 100644 tests/node_modules/lodash/fp/xor.js create mode 100644 tests/node_modules/lodash/fp/xorBy.js create mode 100644 tests/node_modules/lodash/fp/xorWith.js create mode 100644 tests/node_modules/lodash/fp/zip.js create mode 100644 tests/node_modules/lodash/fp/zipAll.js create mode 100644 tests/node_modules/lodash/fp/zipObj.js create mode 100644 tests/node_modules/lodash/fp/zipObject.js create mode 100644 tests/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 tests/node_modules/lodash/fp/zipWith.js create mode 100644 tests/node_modules/lodash/fromPairs.js create mode 100644 tests/node_modules/lodash/function.js create mode 100644 tests/node_modules/lodash/functions.js create mode 100644 tests/node_modules/lodash/functionsIn.js create mode 100644 tests/node_modules/lodash/get.js create mode 100644 tests/node_modules/lodash/groupBy.js create mode 100644 tests/node_modules/lodash/gt.js create mode 100644 tests/node_modules/lodash/gte.js create mode 100644 tests/node_modules/lodash/has.js create mode 100644 tests/node_modules/lodash/hasIn.js create mode 100644 tests/node_modules/lodash/head.js create mode 100644 tests/node_modules/lodash/identity.js create mode 100644 tests/node_modules/lodash/inRange.js create mode 100644 tests/node_modules/lodash/includes.js create mode 100644 tests/node_modules/lodash/index.js create mode 100644 tests/node_modules/lodash/indexOf.js create mode 100644 tests/node_modules/lodash/initial.js create mode 100644 tests/node_modules/lodash/intersection.js create mode 100644 tests/node_modules/lodash/intersectionBy.js create mode 100644 tests/node_modules/lodash/intersectionWith.js create mode 100644 tests/node_modules/lodash/invert.js create mode 100644 tests/node_modules/lodash/invertBy.js create mode 100644 tests/node_modules/lodash/invoke.js create mode 100644 tests/node_modules/lodash/invokeMap.js create mode 100644 tests/node_modules/lodash/isArguments.js create mode 100644 tests/node_modules/lodash/isArray.js create mode 100644 tests/node_modules/lodash/isArrayBuffer.js create mode 100644 tests/node_modules/lodash/isArrayLike.js create mode 100644 tests/node_modules/lodash/isArrayLikeObject.js create mode 100644 tests/node_modules/lodash/isBoolean.js create mode 100644 tests/node_modules/lodash/isBuffer.js create mode 100644 tests/node_modules/lodash/isDate.js create mode 100644 tests/node_modules/lodash/isElement.js create mode 100644 tests/node_modules/lodash/isEmpty.js create mode 100644 tests/node_modules/lodash/isEqual.js create mode 100644 tests/node_modules/lodash/isEqualWith.js create mode 100644 tests/node_modules/lodash/isError.js create mode 100644 tests/node_modules/lodash/isFinite.js create mode 100644 tests/node_modules/lodash/isFunction.js create mode 100644 tests/node_modules/lodash/isInteger.js create mode 100644 tests/node_modules/lodash/isLength.js create mode 100644 tests/node_modules/lodash/isMap.js create mode 100644 tests/node_modules/lodash/isMatch.js create mode 100644 tests/node_modules/lodash/isMatchWith.js create mode 100644 tests/node_modules/lodash/isNaN.js create mode 100644 tests/node_modules/lodash/isNative.js create mode 100644 tests/node_modules/lodash/isNil.js create mode 100644 tests/node_modules/lodash/isNull.js create mode 100644 tests/node_modules/lodash/isNumber.js create mode 100644 tests/node_modules/lodash/isObject.js create mode 100644 tests/node_modules/lodash/isObjectLike.js create mode 100644 tests/node_modules/lodash/isPlainObject.js create mode 100644 tests/node_modules/lodash/isRegExp.js create mode 100644 tests/node_modules/lodash/isSafeInteger.js create mode 100644 tests/node_modules/lodash/isSet.js create mode 100644 tests/node_modules/lodash/isString.js create mode 100644 tests/node_modules/lodash/isSymbol.js create mode 100644 tests/node_modules/lodash/isTypedArray.js create mode 100644 tests/node_modules/lodash/isUndefined.js create mode 100644 tests/node_modules/lodash/isWeakMap.js create mode 100644 tests/node_modules/lodash/isWeakSet.js create mode 100644 tests/node_modules/lodash/iteratee.js create mode 100644 tests/node_modules/lodash/join.js create mode 100644 tests/node_modules/lodash/kebabCase.js create mode 100644 tests/node_modules/lodash/keyBy.js create mode 100644 tests/node_modules/lodash/keys.js create mode 100644 tests/node_modules/lodash/keysIn.js create mode 100644 tests/node_modules/lodash/lang.js create mode 100644 tests/node_modules/lodash/last.js create mode 100644 tests/node_modules/lodash/lastIndexOf.js create mode 100644 tests/node_modules/lodash/lodash.js create mode 100644 tests/node_modules/lodash/lodash.min.js create mode 100644 tests/node_modules/lodash/lowerCase.js create mode 100644 tests/node_modules/lodash/lowerFirst.js create mode 100644 tests/node_modules/lodash/lt.js create mode 100644 tests/node_modules/lodash/lte.js create mode 100644 tests/node_modules/lodash/map.js create mode 100644 tests/node_modules/lodash/mapKeys.js create mode 100644 tests/node_modules/lodash/mapValues.js create mode 100644 tests/node_modules/lodash/matches.js create mode 100644 tests/node_modules/lodash/matchesProperty.js create mode 100644 tests/node_modules/lodash/math.js create mode 100644 tests/node_modules/lodash/max.js create mode 100644 tests/node_modules/lodash/maxBy.js create mode 100644 tests/node_modules/lodash/mean.js create mode 100644 tests/node_modules/lodash/meanBy.js create mode 100644 tests/node_modules/lodash/memoize.js create mode 100644 tests/node_modules/lodash/merge.js create mode 100644 tests/node_modules/lodash/mergeWith.js create mode 100644 tests/node_modules/lodash/method.js create mode 100644 tests/node_modules/lodash/methodOf.js create mode 100644 tests/node_modules/lodash/min.js create mode 100644 tests/node_modules/lodash/minBy.js create mode 100644 tests/node_modules/lodash/mixin.js create mode 100644 tests/node_modules/lodash/multiply.js create mode 100644 tests/node_modules/lodash/negate.js create mode 100644 tests/node_modules/lodash/next.js create mode 100644 tests/node_modules/lodash/noop.js create mode 100644 tests/node_modules/lodash/now.js create mode 100644 tests/node_modules/lodash/nth.js create mode 100644 tests/node_modules/lodash/nthArg.js create mode 100644 tests/node_modules/lodash/number.js create mode 100644 tests/node_modules/lodash/object.js create mode 100644 tests/node_modules/lodash/omit.js create mode 100644 tests/node_modules/lodash/omitBy.js create mode 100644 tests/node_modules/lodash/once.js create mode 100644 tests/node_modules/lodash/orderBy.js create mode 100644 tests/node_modules/lodash/over.js create mode 100644 tests/node_modules/lodash/overArgs.js create mode 100644 tests/node_modules/lodash/overEvery.js create mode 100644 tests/node_modules/lodash/overSome.js create mode 100644 tests/node_modules/lodash/package.json create mode 100644 tests/node_modules/lodash/pad.js create mode 100644 tests/node_modules/lodash/padEnd.js create mode 100644 tests/node_modules/lodash/padStart.js create mode 100644 tests/node_modules/lodash/parseInt.js create mode 100644 tests/node_modules/lodash/partial.js create mode 100644 tests/node_modules/lodash/partialRight.js create mode 100644 tests/node_modules/lodash/partition.js create mode 100644 tests/node_modules/lodash/pick.js create mode 100644 tests/node_modules/lodash/pickBy.js create mode 100644 tests/node_modules/lodash/plant.js create mode 100644 tests/node_modules/lodash/property.js create mode 100644 tests/node_modules/lodash/propertyOf.js create mode 100644 tests/node_modules/lodash/pull.js create mode 100644 tests/node_modules/lodash/pullAll.js create mode 100644 tests/node_modules/lodash/pullAllBy.js create mode 100644 tests/node_modules/lodash/pullAllWith.js create mode 100644 tests/node_modules/lodash/pullAt.js create mode 100644 tests/node_modules/lodash/random.js create mode 100644 tests/node_modules/lodash/range.js create mode 100644 tests/node_modules/lodash/rangeRight.js create mode 100644 tests/node_modules/lodash/rearg.js create mode 100644 tests/node_modules/lodash/reduce.js create mode 100644 tests/node_modules/lodash/reduceRight.js create mode 100644 tests/node_modules/lodash/reject.js create mode 100644 tests/node_modules/lodash/release.md create mode 100644 tests/node_modules/lodash/remove.js create mode 100644 tests/node_modules/lodash/repeat.js create mode 100644 tests/node_modules/lodash/replace.js create mode 100644 tests/node_modules/lodash/rest.js create mode 100644 tests/node_modules/lodash/result.js create mode 100644 tests/node_modules/lodash/reverse.js create mode 100644 tests/node_modules/lodash/round.js create mode 100644 tests/node_modules/lodash/sample.js create mode 100644 tests/node_modules/lodash/sampleSize.js create mode 100644 tests/node_modules/lodash/seq.js create mode 100644 tests/node_modules/lodash/set.js create mode 100644 tests/node_modules/lodash/setWith.js create mode 100644 tests/node_modules/lodash/shuffle.js create mode 100644 tests/node_modules/lodash/size.js create mode 100644 tests/node_modules/lodash/slice.js create mode 100644 tests/node_modules/lodash/snakeCase.js create mode 100644 tests/node_modules/lodash/some.js create mode 100644 tests/node_modules/lodash/sortBy.js create mode 100644 tests/node_modules/lodash/sortedIndex.js create mode 100644 tests/node_modules/lodash/sortedIndexBy.js create mode 100644 tests/node_modules/lodash/sortedIndexOf.js create mode 100644 tests/node_modules/lodash/sortedLastIndex.js create mode 100644 tests/node_modules/lodash/sortedLastIndexBy.js create mode 100644 tests/node_modules/lodash/sortedLastIndexOf.js create mode 100644 tests/node_modules/lodash/sortedUniq.js create mode 100644 tests/node_modules/lodash/sortedUniqBy.js create mode 100644 tests/node_modules/lodash/split.js create mode 100644 tests/node_modules/lodash/spread.js create mode 100644 tests/node_modules/lodash/startCase.js create mode 100644 tests/node_modules/lodash/startsWith.js create mode 100644 tests/node_modules/lodash/string.js create mode 100644 tests/node_modules/lodash/stubArray.js create mode 100644 tests/node_modules/lodash/stubFalse.js create mode 100644 tests/node_modules/lodash/stubObject.js create mode 100644 tests/node_modules/lodash/stubString.js create mode 100644 tests/node_modules/lodash/stubTrue.js create mode 100644 tests/node_modules/lodash/subtract.js create mode 100644 tests/node_modules/lodash/sum.js create mode 100644 tests/node_modules/lodash/sumBy.js create mode 100644 tests/node_modules/lodash/tail.js create mode 100644 tests/node_modules/lodash/take.js create mode 100644 tests/node_modules/lodash/takeRight.js create mode 100644 tests/node_modules/lodash/takeRightWhile.js create mode 100644 tests/node_modules/lodash/takeWhile.js create mode 100644 tests/node_modules/lodash/tap.js create mode 100644 tests/node_modules/lodash/template.js create mode 100644 tests/node_modules/lodash/templateSettings.js create mode 100644 tests/node_modules/lodash/throttle.js create mode 100644 tests/node_modules/lodash/thru.js create mode 100644 tests/node_modules/lodash/times.js create mode 100644 tests/node_modules/lodash/toArray.js create mode 100644 tests/node_modules/lodash/toFinite.js create mode 100644 tests/node_modules/lodash/toInteger.js create mode 100644 tests/node_modules/lodash/toIterator.js create mode 100644 tests/node_modules/lodash/toJSON.js create mode 100644 tests/node_modules/lodash/toLength.js create mode 100644 tests/node_modules/lodash/toLower.js create mode 100644 tests/node_modules/lodash/toNumber.js create mode 100644 tests/node_modules/lodash/toPairs.js create mode 100644 tests/node_modules/lodash/toPairsIn.js create mode 100644 tests/node_modules/lodash/toPath.js create mode 100644 tests/node_modules/lodash/toPlainObject.js create mode 100644 tests/node_modules/lodash/toSafeInteger.js create mode 100644 tests/node_modules/lodash/toString.js create mode 100644 tests/node_modules/lodash/toUpper.js create mode 100644 tests/node_modules/lodash/transform.js create mode 100644 tests/node_modules/lodash/trim.js create mode 100644 tests/node_modules/lodash/trimEnd.js create mode 100644 tests/node_modules/lodash/trimStart.js create mode 100644 tests/node_modules/lodash/truncate.js create mode 100644 tests/node_modules/lodash/unary.js create mode 100644 tests/node_modules/lodash/unescape.js create mode 100644 tests/node_modules/lodash/union.js create mode 100644 tests/node_modules/lodash/unionBy.js create mode 100644 tests/node_modules/lodash/unionWith.js create mode 100644 tests/node_modules/lodash/uniq.js create mode 100644 tests/node_modules/lodash/uniqBy.js create mode 100644 tests/node_modules/lodash/uniqWith.js create mode 100644 tests/node_modules/lodash/uniqueId.js create mode 100644 tests/node_modules/lodash/unset.js create mode 100644 tests/node_modules/lodash/unzip.js create mode 100644 tests/node_modules/lodash/unzipWith.js create mode 100644 tests/node_modules/lodash/update.js create mode 100644 tests/node_modules/lodash/updateWith.js create mode 100644 tests/node_modules/lodash/upperCase.js create mode 100644 tests/node_modules/lodash/upperFirst.js create mode 100644 tests/node_modules/lodash/util.js create mode 100644 tests/node_modules/lodash/value.js create mode 100644 tests/node_modules/lodash/valueOf.js create mode 100644 tests/node_modules/lodash/values.js create mode 100644 tests/node_modules/lodash/valuesIn.js create mode 100644 tests/node_modules/lodash/without.js create mode 100644 tests/node_modules/lodash/words.js create mode 100644 tests/node_modules/lodash/wrap.js create mode 100644 tests/node_modules/lodash/wrapperAt.js create mode 100644 tests/node_modules/lodash/wrapperChain.js create mode 100644 tests/node_modules/lodash/wrapperLodash.js create mode 100644 tests/node_modules/lodash/wrapperReverse.js create mode 100644 tests/node_modules/lodash/wrapperValue.js create mode 100644 tests/node_modules/lodash/xor.js create mode 100644 tests/node_modules/lodash/xorBy.js create mode 100644 tests/node_modules/lodash/xorWith.js create mode 100644 tests/node_modules/lodash/zip.js create mode 100644 tests/node_modules/lodash/zipObject.js create mode 100644 tests/node_modules/lodash/zipObjectDeep.js create mode 100644 tests/node_modules/lodash/zipWith.js create mode 100644 tests/node_modules/log-symbols/browser.js create mode 100644 tests/node_modules/log-symbols/index.d.ts create mode 100644 tests/node_modules/log-symbols/index.js create mode 100644 tests/node_modules/log-symbols/license create mode 100644 tests/node_modules/log-symbols/package.json create mode 100644 tests/node_modules/log-symbols/readme.md create mode 100644 tests/node_modules/lower-case/LICENSE create mode 100644 tests/node_modules/lower-case/README.md create mode 100644 tests/node_modules/lower-case/dist.es2015/index.d.ts create mode 100644 tests/node_modules/lower-case/dist.es2015/index.js create mode 100644 tests/node_modules/lower-case/dist.es2015/index.js.map create mode 100644 tests/node_modules/lower-case/dist.es2015/index.spec.d.ts create mode 100644 tests/node_modules/lower-case/dist.es2015/index.spec.js create mode 100644 tests/node_modules/lower-case/dist.es2015/index.spec.js.map create mode 100644 tests/node_modules/lower-case/dist/index.d.ts create mode 100644 tests/node_modules/lower-case/dist/index.js create mode 100644 tests/node_modules/lower-case/dist/index.js.map create mode 100644 tests/node_modules/lower-case/dist/index.spec.d.ts create mode 100644 tests/node_modules/lower-case/dist/index.spec.js create mode 100644 tests/node_modules/lower-case/dist/index.spec.js.map create mode 100644 tests/node_modules/lower-case/package.json create mode 100644 tests/node_modules/minimalistic-assert/LICENSE create mode 100644 tests/node_modules/minimalistic-assert/index.js create mode 100644 tests/node_modules/minimalistic-assert/package.json create mode 100644 tests/node_modules/minimalistic-assert/readme.md create mode 100644 tests/node_modules/minimalistic-crypto-utils/.npmignore create mode 100644 tests/node_modules/minimalistic-crypto-utils/.travis.yml create mode 100644 tests/node_modules/minimalistic-crypto-utils/README.md create mode 100644 tests/node_modules/minimalistic-crypto-utils/lib/utils.js create mode 100644 tests/node_modules/minimalistic-crypto-utils/package.json create mode 100644 tests/node_modules/minimalistic-crypto-utils/test/utils-test.js create mode 100644 tests/node_modules/minimatch/LICENSE create mode 100644 tests/node_modules/minimatch/README.md create mode 100644 tests/node_modules/minimatch/minimatch.js create mode 100644 tests/node_modules/minimatch/package.json create mode 100644 tests/node_modules/mocha/CHANGELOG.md create mode 100644 tests/node_modules/mocha/LICENSE create mode 100644 tests/node_modules/mocha/README.md create mode 100644 tests/node_modules/mocha/assets/growl/error.png create mode 100644 tests/node_modules/mocha/assets/growl/ok.png create mode 100755 tests/node_modules/mocha/bin/_mocha create mode 100755 tests/node_modules/mocha/bin/mocha create mode 100644 tests/node_modules/mocha/browser-entry.js create mode 100644 tests/node_modules/mocha/index.js create mode 100644 tests/node_modules/mocha/lib/browser/growl.js create mode 100644 tests/node_modules/mocha/lib/browser/highlight-tags.js create mode 100644 tests/node_modules/mocha/lib/browser/parse-query.js create mode 100644 tests/node_modules/mocha/lib/browser/progress.js create mode 100644 tests/node_modules/mocha/lib/browser/template.html create mode 100755 tests/node_modules/mocha/lib/cli/cli.js create mode 100644 tests/node_modules/mocha/lib/cli/collect-files.js create mode 100644 tests/node_modules/mocha/lib/cli/commands.js create mode 100644 tests/node_modules/mocha/lib/cli/config.js create mode 100644 tests/node_modules/mocha/lib/cli/index.js create mode 100644 tests/node_modules/mocha/lib/cli/init.js create mode 100644 tests/node_modules/mocha/lib/cli/lookup-files.js create mode 100644 tests/node_modules/mocha/lib/cli/node-flags.js create mode 100644 tests/node_modules/mocha/lib/cli/one-and-dones.js create mode 100644 tests/node_modules/mocha/lib/cli/options.js create mode 100644 tests/node_modules/mocha/lib/cli/run-helpers.js create mode 100644 tests/node_modules/mocha/lib/cli/run-option-metadata.js create mode 100644 tests/node_modules/mocha/lib/cli/run.js create mode 100644 tests/node_modules/mocha/lib/cli/watch-run.js create mode 100644 tests/node_modules/mocha/lib/context.js create mode 100644 tests/node_modules/mocha/lib/errors.js create mode 100644 tests/node_modules/mocha/lib/esm-utils.js create mode 100644 tests/node_modules/mocha/lib/hook.js create mode 100644 tests/node_modules/mocha/lib/interfaces/bdd.js create mode 100644 tests/node_modules/mocha/lib/interfaces/common.js create mode 100644 tests/node_modules/mocha/lib/interfaces/exports.js create mode 100644 tests/node_modules/mocha/lib/interfaces/index.js create mode 100644 tests/node_modules/mocha/lib/interfaces/qunit.js create mode 100644 tests/node_modules/mocha/lib/interfaces/tdd.js create mode 100644 tests/node_modules/mocha/lib/mocha.js create mode 100644 tests/node_modules/mocha/lib/mocharc.json create mode 100644 tests/node_modules/mocha/lib/nodejs/buffered-worker-pool.js create mode 100644 tests/node_modules/mocha/lib/nodejs/file-unloader.js create mode 100644 tests/node_modules/mocha/lib/nodejs/growl.js create mode 100644 tests/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js create mode 100644 tests/node_modules/mocha/lib/nodejs/reporters/parallel-buffered.js create mode 100644 tests/node_modules/mocha/lib/nodejs/serializer.js create mode 100644 tests/node_modules/mocha/lib/nodejs/worker.js create mode 100644 tests/node_modules/mocha/lib/pending.js create mode 100644 tests/node_modules/mocha/lib/plugin-loader.js create mode 100644 tests/node_modules/mocha/lib/reporters/base.js create mode 100644 tests/node_modules/mocha/lib/reporters/doc.js create mode 100644 tests/node_modules/mocha/lib/reporters/dot.js create mode 100644 tests/node_modules/mocha/lib/reporters/html.js create mode 100644 tests/node_modules/mocha/lib/reporters/index.js create mode 100644 tests/node_modules/mocha/lib/reporters/json-stream.js create mode 100644 tests/node_modules/mocha/lib/reporters/json.js create mode 100644 tests/node_modules/mocha/lib/reporters/landing.js create mode 100644 tests/node_modules/mocha/lib/reporters/list.js create mode 100644 tests/node_modules/mocha/lib/reporters/markdown.js create mode 100644 tests/node_modules/mocha/lib/reporters/min.js create mode 100644 tests/node_modules/mocha/lib/reporters/nyan.js create mode 100644 tests/node_modules/mocha/lib/reporters/progress.js create mode 100644 tests/node_modules/mocha/lib/reporters/spec.js create mode 100644 tests/node_modules/mocha/lib/reporters/tap.js create mode 100644 tests/node_modules/mocha/lib/reporters/xunit.js create mode 100644 tests/node_modules/mocha/lib/runnable.js create mode 100644 tests/node_modules/mocha/lib/runner.js create mode 100644 tests/node_modules/mocha/lib/stats-collector.js create mode 100644 tests/node_modules/mocha/lib/suite.js create mode 100644 tests/node_modules/mocha/lib/test.js create mode 100644 tests/node_modules/mocha/lib/utils.js create mode 100644 tests/node_modules/mocha/mocha-es2018.js create mode 100644 tests/node_modules/mocha/mocha.css create mode 100644 tests/node_modules/mocha/mocha.js create mode 100644 tests/node_modules/mocha/mocha.js.map create mode 100644 tests/node_modules/mocha/package.json create mode 100644 tests/node_modules/ms/index.js create mode 100644 tests/node_modules/ms/license.md create mode 100644 tests/node_modules/ms/package.json create mode 100644 tests/node_modules/ms/readme.md create mode 100644 tests/node_modules/nanoid/LICENSE create mode 100644 tests/node_modules/nanoid/README.md create mode 100644 tests/node_modules/nanoid/async/index.browser.js create mode 100644 tests/node_modules/nanoid/async/index.cjs create mode 100644 tests/node_modules/nanoid/async/index.d.ts create mode 100644 tests/node_modules/nanoid/async/index.js create mode 100644 tests/node_modules/nanoid/async/index.native.js create mode 100644 tests/node_modules/nanoid/async/package.json create mode 100755 tests/node_modules/nanoid/bin/nanoid.cjs create mode 100644 tests/node_modules/nanoid/index.browser.js create mode 100644 tests/node_modules/nanoid/index.cjs create mode 100644 tests/node_modules/nanoid/index.d.ts create mode 100644 tests/node_modules/nanoid/index.dev.js create mode 100644 tests/node_modules/nanoid/index.js create mode 100644 tests/node_modules/nanoid/index.prod.js create mode 100644 tests/node_modules/nanoid/nanoid.js create mode 100644 tests/node_modules/nanoid/non-secure/index.cjs create mode 100644 tests/node_modules/nanoid/non-secure/index.d.ts create mode 100644 tests/node_modules/nanoid/non-secure/index.js create mode 100644 tests/node_modules/nanoid/non-secure/package.json create mode 100644 tests/node_modules/nanoid/package.json create mode 100644 tests/node_modules/nanoid/url-alphabet/index.cjs create mode 100644 tests/node_modules/nanoid/url-alphabet/index.js create mode 100644 tests/node_modules/nanoid/url-alphabet/package.json create mode 100644 tests/node_modules/no-case/LICENSE create mode 100644 tests/node_modules/no-case/README.md create mode 100644 tests/node_modules/no-case/dist.es2015/index.d.ts create mode 100644 tests/node_modules/no-case/dist.es2015/index.js create mode 100644 tests/node_modules/no-case/dist.es2015/index.js.map create mode 100644 tests/node_modules/no-case/dist.es2015/index.spec.d.ts create mode 100644 tests/node_modules/no-case/dist.es2015/index.spec.js create mode 100644 tests/node_modules/no-case/dist.es2015/index.spec.js.map create mode 100644 tests/node_modules/no-case/dist/index.d.ts create mode 100644 tests/node_modules/no-case/dist/index.js create mode 100644 tests/node_modules/no-case/dist/index.js.map create mode 100644 tests/node_modules/no-case/dist/index.spec.d.ts create mode 100644 tests/node_modules/no-case/dist/index.spec.js create mode 100644 tests/node_modules/no-case/dist/index.spec.js.map create mode 100644 tests/node_modules/no-case/package.json create mode 100644 tests/node_modules/node-addon-api/.editorconfig create mode 100644 tests/node_modules/node-addon-api/.travis.yml create mode 100644 tests/node_modules/node-addon-api/CHANGELOG.md create mode 100644 tests/node_modules/node-addon-api/CODE_OF_CONDUCT.md create mode 100644 tests/node_modules/node-addon-api/CONTRIBUTING.md create mode 100644 tests/node_modules/node-addon-api/LICENSE.md create mode 100644 tests/node_modules/node-addon-api/README.md create mode 100644 tests/node_modules/node-addon-api/appveyor.yml create mode 100644 tests/node_modules/node-addon-api/doc/Doxyfile create mode 100644 tests/node_modules/node-addon-api/doc/array_buffer.md create mode 100644 tests/node_modules/node-addon-api/doc/async_context.md create mode 100644 tests/node_modules/node-addon-api/doc/async_operations.md create mode 100644 tests/node_modules/node-addon-api/doc/async_progress_worker.md create mode 100644 tests/node_modules/node-addon-api/doc/async_worker.md create mode 100644 tests/node_modules/node-addon-api/doc/basic_types.md create mode 100644 tests/node_modules/node-addon-api/doc/bigint.md create mode 100644 tests/node_modules/node-addon-api/doc/boolean.md create mode 100644 tests/node_modules/node-addon-api/doc/buffer.md create mode 100644 tests/node_modules/node-addon-api/doc/callback_scope.md create mode 100644 tests/node_modules/node-addon-api/doc/callbackinfo.md create mode 100644 tests/node_modules/node-addon-api/doc/checker-tool.md create mode 100644 tests/node_modules/node-addon-api/doc/class_property_descriptor.md create mode 100644 tests/node_modules/node-addon-api/doc/cmake-js.md create mode 100644 tests/node_modules/node-addon-api/doc/conversion-tool.md create mode 100644 tests/node_modules/node-addon-api/doc/creating_a_release.md create mode 100644 tests/node_modules/node-addon-api/doc/dataview.md create mode 100644 tests/node_modules/node-addon-api/doc/date.md create mode 100644 tests/node_modules/node-addon-api/doc/env.md create mode 100644 tests/node_modules/node-addon-api/doc/error.md create mode 100644 tests/node_modules/node-addon-api/doc/error_handling.md create mode 100644 tests/node_modules/node-addon-api/doc/escapable_handle_scope.md create mode 100644 tests/node_modules/node-addon-api/doc/external.md create mode 100644 tests/node_modules/node-addon-api/doc/function.md create mode 100644 tests/node_modules/node-addon-api/doc/function_reference.md create mode 100644 tests/node_modules/node-addon-api/doc/generator.md create mode 100644 tests/node_modules/node-addon-api/doc/handle_scope.md create mode 100644 tests/node_modules/node-addon-api/doc/memory_management.md create mode 100644 tests/node_modules/node-addon-api/doc/node-gyp.md create mode 100644 tests/node_modules/node-addon-api/doc/number.md create mode 100644 tests/node_modules/node-addon-api/doc/object.md create mode 100644 tests/node_modules/node-addon-api/doc/object_lifetime_management.md create mode 100644 tests/node_modules/node-addon-api/doc/object_reference.md create mode 100644 tests/node_modules/node-addon-api/doc/object_wrap.md create mode 100644 tests/node_modules/node-addon-api/doc/prebuild_tools.md create mode 100644 tests/node_modules/node-addon-api/doc/promises.md create mode 100644 tests/node_modules/node-addon-api/doc/property_descriptor.md create mode 100644 tests/node_modules/node-addon-api/doc/range_error.md create mode 100644 tests/node_modules/node-addon-api/doc/reference.md create mode 100644 tests/node_modules/node-addon-api/doc/setup.md create mode 100644 tests/node_modules/node-addon-api/doc/string.md create mode 100644 tests/node_modules/node-addon-api/doc/symbol.md create mode 100644 tests/node_modules/node-addon-api/doc/threadsafe_function.md create mode 100644 tests/node_modules/node-addon-api/doc/type_error.md create mode 100644 tests/node_modules/node-addon-api/doc/typed_array.md create mode 100644 tests/node_modules/node-addon-api/doc/typed_array_of.md create mode 100644 tests/node_modules/node-addon-api/doc/value.md create mode 100644 tests/node_modules/node-addon-api/doc/version_management.md create mode 100644 tests/node_modules/node-addon-api/doc/working_with_javascript_values.md create mode 100644 tests/node_modules/node-addon-api/external-napi/node_api.h create mode 100644 tests/node_modules/node-addon-api/index.js create mode 100644 tests/node_modules/node-addon-api/napi-inl.deprecated.h create mode 100644 tests/node_modules/node-addon-api/napi-inl.h create mode 100644 tests/node_modules/node-addon-api/napi.h create mode 100644 tests/node_modules/node-addon-api/package.json create mode 100644 tests/node_modules/node-addon-api/src/node_api.cc create mode 100644 tests/node_modules/node-addon-api/src/node_api.gyp create mode 100644 tests/node_modules/node-addon-api/src/node_api.h create mode 100644 tests/node_modules/node-addon-api/src/node_api_types.h create mode 100644 tests/node_modules/node-addon-api/src/node_internals.cc create mode 100644 tests/node_modules/node-addon-api/src/node_internals.h create mode 100644 tests/node_modules/node-addon-api/src/nothing.c create mode 100644 tests/node_modules/node-addon-api/src/util-inl.h create mode 100644 tests/node_modules/node-addon-api/src/util.h create mode 100644 tests/node_modules/node-addon-api/tools/README.md create mode 100644 tests/node_modules/node-addon-api/tools/check-napi.js create mode 100755 tests/node_modules/node-addon-api/tools/conversion.js create mode 100644 tests/node_modules/node-fetch/CHANGELOG.md create mode 100644 tests/node_modules/node-fetch/LICENSE.md create mode 100644 tests/node_modules/node-fetch/README.md create mode 100644 tests/node_modules/node-fetch/browser.js create mode 100644 tests/node_modules/node-fetch/lib/index.es.js create mode 100644 tests/node_modules/node-fetch/lib/index.js create mode 100644 tests/node_modules/node-fetch/lib/index.mjs create mode 100644 tests/node_modules/node-fetch/package.json create mode 100644 tests/node_modules/node-gyp-build/LICENSE create mode 100644 tests/node_modules/node-gyp-build/README.md create mode 100755 tests/node_modules/node-gyp-build/bin.js create mode 100755 tests/node_modules/node-gyp-build/build-test.js create mode 100644 tests/node_modules/node-gyp-build/index.js create mode 100755 tests/node_modules/node-gyp-build/optional.js create mode 100644 tests/node_modules/node-gyp-build/package.json create mode 100644 tests/node_modules/normalize-path/LICENSE create mode 100644 tests/node_modules/normalize-path/README.md create mode 100644 tests/node_modules/normalize-path/index.js create mode 100644 tests/node_modules/normalize-path/package.json create mode 100644 tests/node_modules/once/LICENSE create mode 100644 tests/node_modules/once/README.md create mode 100644 tests/node_modules/once/once.js create mode 100644 tests/node_modules/once/package.json create mode 100644 tests/node_modules/p-limit/index.d.ts create mode 100644 tests/node_modules/p-limit/index.js create mode 100644 tests/node_modules/p-limit/license create mode 100644 tests/node_modules/p-limit/package.json create mode 100644 tests/node_modules/p-limit/readme.md create mode 100644 tests/node_modules/p-locate/index.d.ts create mode 100644 tests/node_modules/p-locate/index.js create mode 100644 tests/node_modules/p-locate/license create mode 100644 tests/node_modules/p-locate/package.json create mode 100644 tests/node_modules/p-locate/readme.md create mode 100644 tests/node_modules/pako/CHANGELOG.md create mode 100644 tests/node_modules/pako/LICENSE create mode 100644 tests/node_modules/pako/README.md create mode 100644 tests/node_modules/pako/dist/pako.es5.js create mode 100644 tests/node_modules/pako/dist/pako.es5.min.js create mode 100644 tests/node_modules/pako/dist/pako.esm.mjs create mode 100644 tests/node_modules/pako/dist/pako.js create mode 100644 tests/node_modules/pako/dist/pako.min.js create mode 100644 tests/node_modules/pako/dist/pako_deflate.es5.js create mode 100644 tests/node_modules/pako/dist/pako_deflate.es5.min.js create mode 100644 tests/node_modules/pako/dist/pako_deflate.js create mode 100644 tests/node_modules/pako/dist/pako_deflate.min.js create mode 100644 tests/node_modules/pako/dist/pako_inflate.es5.js create mode 100644 tests/node_modules/pako/dist/pako_inflate.es5.min.js create mode 100644 tests/node_modules/pako/dist/pako_inflate.js create mode 100644 tests/node_modules/pako/dist/pako_inflate.min.js create mode 100644 tests/node_modules/pako/index.js create mode 100644 tests/node_modules/pako/lib/deflate.js create mode 100644 tests/node_modules/pako/lib/inflate.js create mode 100644 tests/node_modules/pako/lib/utils/common.js create mode 100644 tests/node_modules/pako/lib/utils/strings.js create mode 100644 tests/node_modules/pako/lib/zlib/README create mode 100644 tests/node_modules/pako/lib/zlib/adler32.js create mode 100644 tests/node_modules/pako/lib/zlib/constants.js create mode 100644 tests/node_modules/pako/lib/zlib/crc32.js create mode 100644 tests/node_modules/pako/lib/zlib/deflate.js create mode 100644 tests/node_modules/pako/lib/zlib/gzheader.js create mode 100644 tests/node_modules/pako/lib/zlib/inffast.js create mode 100644 tests/node_modules/pako/lib/zlib/inflate.js create mode 100644 tests/node_modules/pako/lib/zlib/inftrees.js create mode 100644 tests/node_modules/pako/lib/zlib/messages.js create mode 100644 tests/node_modules/pako/lib/zlib/trees.js create mode 100644 tests/node_modules/pako/lib/zlib/zstream.js create mode 100644 tests/node_modules/pako/package.json create mode 100644 tests/node_modules/path-exists/index.d.ts create mode 100644 tests/node_modules/path-exists/index.js create mode 100644 tests/node_modules/path-exists/license create mode 100644 tests/node_modules/path-exists/package.json create mode 100644 tests/node_modules/path-exists/readme.md create mode 100644 tests/node_modules/path-is-absolute/index.js create mode 100644 tests/node_modules/path-is-absolute/license create mode 100644 tests/node_modules/path-is-absolute/package.json create mode 100644 tests/node_modules/path-is-absolute/readme.md create mode 100644 tests/node_modules/picomatch/CHANGELOG.md create mode 100644 tests/node_modules/picomatch/LICENSE create mode 100644 tests/node_modules/picomatch/README.md create mode 100644 tests/node_modules/picomatch/index.js create mode 100644 tests/node_modules/picomatch/lib/constants.js create mode 100644 tests/node_modules/picomatch/lib/parse.js create mode 100644 tests/node_modules/picomatch/lib/picomatch.js create mode 100644 tests/node_modules/picomatch/lib/scan.js create mode 100644 tests/node_modules/picomatch/lib/utils.js create mode 100644 tests/node_modules/picomatch/package.json create mode 100644 tests/node_modules/randombytes/.travis.yml create mode 100644 tests/node_modules/randombytes/.zuul.yml create mode 100644 tests/node_modules/randombytes/LICENSE create mode 100644 tests/node_modules/randombytes/README.md create mode 100644 tests/node_modules/randombytes/browser.js create mode 100644 tests/node_modules/randombytes/index.js create mode 100644 tests/node_modules/randombytes/package.json create mode 100644 tests/node_modules/randombytes/test.js create mode 100644 tests/node_modules/readdirp/LICENSE create mode 100644 tests/node_modules/readdirp/README.md create mode 100644 tests/node_modules/readdirp/index.d.ts create mode 100644 tests/node_modules/readdirp/index.js create mode 100644 tests/node_modules/readdirp/package.json create mode 100644 tests/node_modules/regenerator-runtime/LICENSE create mode 100644 tests/node_modules/regenerator-runtime/README.md create mode 100644 tests/node_modules/regenerator-runtime/package.json create mode 100644 tests/node_modules/regenerator-runtime/path.js create mode 100644 tests/node_modules/regenerator-runtime/runtime.js create mode 100644 tests/node_modules/require-directory/.jshintrc create mode 100644 tests/node_modules/require-directory/.npmignore create mode 100644 tests/node_modules/require-directory/.travis.yml create mode 100644 tests/node_modules/require-directory/LICENSE create mode 100644 tests/node_modules/require-directory/README.markdown create mode 100644 tests/node_modules/require-directory/index.js create mode 100644 tests/node_modules/require-directory/package.json create mode 100644 tests/node_modules/rpc-websockets/.babelrc create mode 100644 tests/node_modules/rpc-websockets/.eslintrc create mode 100644 tests/node_modules/rpc-websockets/.github/FUNDING.yml create mode 100644 tests/node_modules/rpc-websockets/.travis.yml create mode 100644 tests/node_modules/rpc-websockets/API.md create mode 100644 tests/node_modules/rpc-websockets/LICENSE create mode 100644 tests/node_modules/rpc-websockets/README.md create mode 100644 tests/node_modules/rpc-websockets/assets/logo.png create mode 100644 tests/node_modules/rpc-websockets/assets/oss-features.png create mode 100644 tests/node_modules/rpc-websockets/assets/pro-features.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-codice.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-filecoin.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-heynetwork.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-holo.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-hylo.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-klikatech.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-kodebox.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-leapdao.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-loom.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-scaleleap.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-scratchbox.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-solana.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-uniqcast.png create mode 100644 tests/node_modules/rpc-websockets/assets/user-witnet.png create mode 100644 tests/node_modules/rpc-websockets/build-ts/index.browser.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/index.browser.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/index.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/index.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client/client.types.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client/client.types.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client/websocket.browser.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client/websocket.browser.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client/websocket.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/client/websocket.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/server.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/server.js create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/utils.d.ts create mode 100644 tests/node_modules/rpc-websockets/build-ts/lib/utils.js create mode 100644 tests/node_modules/rpc-websockets/dist/index.browser-bundle.js create mode 100644 tests/node_modules/rpc-websockets/dist/index.browser.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/index.browser.js create mode 100644 tests/node_modules/rpc-websockets/dist/index.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/index.js create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client.js create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client/client.types.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client/client.types.js create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client/websocket.browser.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client/websocket.browser.js create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client/websocket.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/lib/client/websocket.js create mode 100644 tests/node_modules/rpc-websockets/dist/lib/server.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/lib/server.js create mode 100644 tests/node_modules/rpc-websockets/dist/lib/utils.d.ts create mode 100644 tests/node_modules/rpc-websockets/dist/lib/utils.js create mode 120000 tests/node_modules/rpc-websockets/node_modules/.bin/uuid create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/CHANGELOG.md create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/CONTRIBUTING.md create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/LICENSE.md create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/README.md create mode 100755 tests/node_modules/rpc-websockets/node_modules/uuid/dist/bin/uuid create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/index.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/md5.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/nil.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/parse.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/regex.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/rng.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/sha1.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/stringify.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/v1.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/v3.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/v35.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/v4.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/v5.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/validate.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-browser/version.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/index.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/md5.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/nil.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/parse.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/regex.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/rng.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/sha1.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/stringify.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/v1.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/v3.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/v35.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/v4.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/v5.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/validate.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/esm-node/version.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/index.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/md5-browser.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/md5.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/nil.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/parse.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/regex.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/rng-browser.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/rng.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/sha1-browser.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/sha1.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/stringify.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuid.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidNIL.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidParse.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidStringify.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidValidate.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidVersion.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidv1.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidv3.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidv4.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/umd/uuidv5.min.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/uuid-bin.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/v1.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/v3.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/v35.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/v4.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/v5.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/validate.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/dist/version.js create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/package.json create mode 100644 tests/node_modules/rpc-websockets/node_modules/uuid/wrapper.mjs create mode 100644 tests/node_modules/rpc-websockets/package.json create mode 100644 tests/node_modules/rpc-websockets/tsconfig.json create mode 100644 tests/node_modules/safe-buffer/LICENSE create mode 100644 tests/node_modules/safe-buffer/README.md create mode 100644 tests/node_modules/safe-buffer/index.d.ts create mode 100644 tests/node_modules/safe-buffer/index.js create mode 100644 tests/node_modules/safe-buffer/package.json create mode 100644 tests/node_modules/secp256k1/API.md create mode 100644 tests/node_modules/secp256k1/LICENSE create mode 100644 tests/node_modules/secp256k1/README.md create mode 100644 tests/node_modules/secp256k1/binding.gyp create mode 100644 tests/node_modules/secp256k1/bindings.js create mode 100644 tests/node_modules/secp256k1/build/Makefile create mode 100644 tests/node_modules/secp256k1/build/Release/.deps/Release/addon.node.d create mode 100644 tests/node_modules/secp256k1/build/Release/.deps/Release/obj.target/addon/src/addon.o.d create mode 100644 tests/node_modules/secp256k1/build/Release/.deps/Release/obj.target/addon/src/secp256k1.o.d create mode 100644 tests/node_modules/secp256k1/build/Release/.deps/Release/obj.target/secp256k1/src/secp256k1/src/secp256k1.o.d create mode 100644 tests/node_modules/secp256k1/build/Release/.deps/Release/secp256k1.a.d create mode 100755 tests/node_modules/secp256k1/build/Release/addon.node create mode 100644 tests/node_modules/secp256k1/build/Release/obj.target/addon/src/addon.o create mode 100644 tests/node_modules/secp256k1/build/Release/obj.target/addon/src/secp256k1.o create mode 100644 tests/node_modules/secp256k1/build/Release/obj.target/secp256k1/src/secp256k1/src/secp256k1.o create mode 100644 tests/node_modules/secp256k1/build/Release/secp256k1.a create mode 100644 tests/node_modules/secp256k1/build/addon.target.mk create mode 100644 tests/node_modules/secp256k1/build/binding.Makefile create mode 100644 tests/node_modules/secp256k1/build/config.gypi create mode 100755 tests/node_modules/secp256k1/build/gyp-mac-tool create mode 100644 tests/node_modules/secp256k1/build/secp256k1.target.mk create mode 100644 tests/node_modules/secp256k1/elliptic.js create mode 100644 tests/node_modules/secp256k1/index.js create mode 100644 tests/node_modules/secp256k1/lib/elliptic.js create mode 100644 tests/node_modules/secp256k1/lib/index.js create mode 100644 tests/node_modules/secp256k1/package.json create mode 100644 tests/node_modules/secp256k1/prebuilds/darwin-x64/node.napi.node create mode 100644 tests/node_modules/secp256k1/prebuilds/linux-x64/node.napi.glibc.node create mode 100644 tests/node_modules/secp256k1/prebuilds/linux-x64/node.napi.musl.node create mode 100644 tests/node_modules/secp256k1/prebuilds/win32-x64/node.napi.node create mode 100644 tests/node_modules/secp256k1/src/addon.cc create mode 100644 tests/node_modules/secp256k1/src/secp256k1.cc create mode 100644 tests/node_modules/secp256k1/src/secp256k1.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/.npmignore create mode 100644 tests/node_modules/secp256k1/src/secp256k1/.travis.yml create mode 100644 tests/node_modules/secp256k1/src/secp256k1/COPYING create mode 100644 tests/node_modules/secp256k1/src/secp256k1/Makefile.am create mode 100644 tests/node_modules/secp256k1/src/secp256k1/README.md create mode 100644 tests/node_modules/secp256k1/src/secp256k1/SECURITY.md create mode 100644 tests/node_modules/secp256k1/src/secp256k1/TODO create mode 100755 tests/node_modules/secp256k1/src/secp256k1/autogen.sh create mode 100644 tests/node_modules/secp256k1/src/secp256k1/build-aux/m4/ax_jni_include_dir.m4 create mode 100644 tests/node_modules/secp256k1/src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 create mode 100644 tests/node_modules/secp256k1/src/secp256k1/build-aux/m4/bitcoin_secp.m4 create mode 100644 tests/node_modules/secp256k1/src/secp256k1/configure.ac create mode 100644 tests/node_modules/secp256k1/src/secp256k1/contrib/lax_der_parsing.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/contrib/lax_der_parsing.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/contrib/lax_der_privatekey_parsing.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/contrib/lax_der_privatekey_parsing.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/include/secp256k1.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/include/secp256k1_ecdh.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/include/secp256k1_preallocated.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/include/secp256k1_recovery.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/libsecp256k1.pc.in create mode 100644 tests/node_modules/secp256k1/src/secp256k1/obj/.npmignore create mode 100644 tests/node_modules/secp256k1/src/secp256k1/sage/group_prover.sage create mode 100644 tests/node_modules/secp256k1/src/secp256k1/sage/secp256k1.sage create mode 100644 tests/node_modules/secp256k1/src/secp256k1/sage/weierstrass_prover.sage create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/asm/field_10x26_arm.s create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/basic-config.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench_ecdh.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench_ecmult.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench_internal.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench_recover.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench_sign.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/bench_verify.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecdsa.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecdsa_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/eckey.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/eckey_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecmult.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecmult_const.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecmult_const_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecmult_gen.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecmult_gen_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/ecmult_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_10x26.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_10x26_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_5x52.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_5x52_asm_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_5x52_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_5x52_int128_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/field_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/gen_context.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/group.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/group_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/hash.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/hash_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Util.java create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org/bitcoin/Secp256k1Context.java create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/modules/ecdh/Makefile.am.include create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/modules/ecdh/main_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/modules/ecdh/tests_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/modules/recovery/Makefile.am.include create mode 100755 tests/node_modules/secp256k1/src/secp256k1/src/modules/recovery/main_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/modules/recovery/tests_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/num.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/num_gmp.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/num_gmp_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/num_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_4x64.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_4x64_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_8x32.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_8x32_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_low.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scalar_low_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scratch.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/scratch_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/secp256k1.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/testrand.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/testrand_impl.h create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/tests.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/tests_exhaustive.c create mode 100644 tests/node_modules/secp256k1/src/secp256k1/src/util.h create mode 100644 tests/node_modules/serialize-javascript/LICENSE create mode 100644 tests/node_modules/serialize-javascript/README.md create mode 100644 tests/node_modules/serialize-javascript/index.js create mode 100644 tests/node_modules/serialize-javascript/package.json create mode 100644 tests/node_modules/snake-case/LICENSE create mode 100644 tests/node_modules/snake-case/README.md create mode 100644 tests/node_modules/snake-case/dist.es2015/index.d.ts create mode 100644 tests/node_modules/snake-case/dist.es2015/index.js create mode 100644 tests/node_modules/snake-case/dist.es2015/index.js.map create mode 100644 tests/node_modules/snake-case/dist.es2015/index.spec.d.ts create mode 100644 tests/node_modules/snake-case/dist.es2015/index.spec.js create mode 100644 tests/node_modules/snake-case/dist.es2015/index.spec.js.map create mode 100644 tests/node_modules/snake-case/dist/index.d.ts create mode 100644 tests/node_modules/snake-case/dist/index.js create mode 100644 tests/node_modules/snake-case/dist/index.js.map create mode 100644 tests/node_modules/snake-case/dist/index.spec.d.ts create mode 100644 tests/node_modules/snake-case/dist/index.spec.js create mode 100644 tests/node_modules/snake-case/dist/index.spec.js.map create mode 100644 tests/node_modules/snake-case/package.json create mode 100644 tests/node_modules/string-width/index.js create mode 100644 tests/node_modules/string-width/license create mode 100644 tests/node_modules/string-width/package.json create mode 100644 tests/node_modules/string-width/readme.md create mode 100644 tests/node_modules/strip-ansi/index.js create mode 100644 tests/node_modules/strip-ansi/license create mode 100644 tests/node_modules/strip-ansi/package.json create mode 100644 tests/node_modules/strip-ansi/readme.md create mode 100644 tests/node_modules/strip-json-comments/index.d.ts create mode 100644 tests/node_modules/strip-json-comments/index.js create mode 100644 tests/node_modules/strip-json-comments/license create mode 100644 tests/node_modules/strip-json-comments/package.json create mode 100644 tests/node_modules/strip-json-comments/readme.md create mode 100644 tests/node_modules/superstruct/Changelog.md create mode 100644 tests/node_modules/superstruct/License.md create mode 100644 tests/node_modules/superstruct/Readme.md create mode 100644 tests/node_modules/superstruct/lib/coercions.d.ts create mode 100644 tests/node_modules/superstruct/lib/coercions.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/error.d.ts create mode 100644 tests/node_modules/superstruct/lib/error.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/index.cjs create mode 100644 tests/node_modules/superstruct/lib/index.cjs.d.ts create mode 100644 tests/node_modules/superstruct/lib/index.cjs.map create mode 100644 tests/node_modules/superstruct/lib/index.d.ts create mode 100644 tests/node_modules/superstruct/lib/index.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/index.es.d.ts create mode 100644 tests/node_modules/superstruct/lib/index.es.js create mode 100644 tests/node_modules/superstruct/lib/index.es.js.map create mode 100644 tests/node_modules/superstruct/lib/refinements.d.ts create mode 100644 tests/node_modules/superstruct/lib/refinements.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/struct.d.ts create mode 100644 tests/node_modules/superstruct/lib/struct.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/structs/coercions.d.ts create mode 100644 tests/node_modules/superstruct/lib/structs/coercions.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/structs/refinements.d.ts create mode 100644 tests/node_modules/superstruct/lib/structs/refinements.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/structs/types.d.ts create mode 100644 tests/node_modules/superstruct/lib/structs/types.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/structs/utilities.d.ts create mode 100644 tests/node_modules/superstruct/lib/structs/utilities.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/types.d.ts create mode 100644 tests/node_modules/superstruct/lib/types.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/typings.d.ts create mode 100644 tests/node_modules/superstruct/lib/typings.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/utilities.d.ts create mode 100644 tests/node_modules/superstruct/lib/utilities.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/utils.d.ts create mode 100644 tests/node_modules/superstruct/lib/utils.d.ts.map create mode 100644 tests/node_modules/superstruct/lib/xtras.d.ts create mode 100644 tests/node_modules/superstruct/lib/xtras.d.ts.map create mode 100644 tests/node_modules/superstruct/package.json create mode 100644 tests/node_modules/superstruct/umd/coercions.d.ts create mode 100644 tests/node_modules/superstruct/umd/index.d.ts create mode 100644 tests/node_modules/superstruct/umd/refinements.d.ts create mode 100644 tests/node_modules/superstruct/umd/struct.d.ts create mode 100644 tests/node_modules/superstruct/umd/superstruct.d.ts create mode 100644 tests/node_modules/superstruct/umd/superstruct.js create mode 100644 tests/node_modules/superstruct/umd/superstruct.min.d.ts create mode 100644 tests/node_modules/superstruct/umd/superstruct.min.js create mode 100644 tests/node_modules/superstruct/umd/types.d.ts create mode 100644 tests/node_modules/superstruct/umd/utils.d.ts create mode 100644 tests/node_modules/supports-color/browser.js create mode 100644 tests/node_modules/supports-color/index.js create mode 100644 tests/node_modules/supports-color/license create mode 100644 tests/node_modules/supports-color/package.json create mode 100644 tests/node_modules/supports-color/readme.md create mode 100644 tests/node_modules/text-encoding-utf-8/LICENSE.md create mode 100644 tests/node_modules/text-encoding-utf-8/README.md create mode 100644 tests/node_modules/text-encoding-utf-8/lib/encoding.js create mode 100644 tests/node_modules/text-encoding-utf-8/lib/encoding.lib.js create mode 100644 tests/node_modules/text-encoding-utf-8/lib/encoding.lib.mjs create mode 100644 tests/node_modules/text-encoding-utf-8/package.json create mode 100644 tests/node_modules/text-encoding-utf-8/src/encoding.js create mode 100644 tests/node_modules/text-encoding-utf-8/src/polyfill.js create mode 100644 tests/node_modules/through/.travis.yml create mode 100644 tests/node_modules/through/LICENSE.APACHE2 create mode 100644 tests/node_modules/through/LICENSE.MIT create mode 100644 tests/node_modules/through/index.js create mode 100644 tests/node_modules/through/package.json create mode 100644 tests/node_modules/through/readme.markdown create mode 100644 tests/node_modules/through/test/async.js create mode 100644 tests/node_modules/through/test/auto-destroy.js create mode 100644 tests/node_modules/through/test/buffering.js create mode 100644 tests/node_modules/through/test/end.js create mode 100644 tests/node_modules/through/test/index.js create mode 100644 tests/node_modules/to-regex-range/LICENSE create mode 100644 tests/node_modules/to-regex-range/README.md create mode 100644 tests/node_modules/to-regex-range/index.js create mode 100644 tests/node_modules/to-regex-range/package.json create mode 100644 tests/node_modules/toml/.jshintrc create mode 100644 tests/node_modules/toml/.travis.yml create mode 100644 tests/node_modules/toml/CHANGELOG.md create mode 100644 tests/node_modules/toml/LICENSE create mode 100644 tests/node_modules/toml/README.md create mode 100644 tests/node_modules/toml/benchmark.js create mode 100644 tests/node_modules/toml/index.d.ts create mode 100644 tests/node_modules/toml/index.js create mode 100644 tests/node_modules/toml/lib/compiler.js create mode 100644 tests/node_modules/toml/lib/parser.js create mode 100644 tests/node_modules/toml/package.json create mode 100644 tests/node_modules/toml/src/toml.pegjs create mode 100644 tests/node_modules/toml/test/bad.toml create mode 100644 tests/node_modules/toml/test/example.toml create mode 100644 tests/node_modules/toml/test/hard_example.toml create mode 100644 tests/node_modules/toml/test/inline_tables.toml create mode 100644 tests/node_modules/toml/test/literal_strings.toml create mode 100644 tests/node_modules/toml/test/multiline_eat_whitespace.toml create mode 100644 tests/node_modules/toml/test/multiline_literal_strings.toml create mode 100644 tests/node_modules/toml/test/multiline_strings.toml create mode 100644 tests/node_modules/toml/test/smoke.js create mode 100644 tests/node_modules/toml/test/table_arrays_easy.toml create mode 100644 tests/node_modules/toml/test/table_arrays_hard.toml create mode 100644 tests/node_modules/toml/test/test_toml.js create mode 100644 tests/node_modules/traverse-chain/README.md create mode 100644 tests/node_modules/traverse-chain/index.js create mode 100644 tests/node_modules/traverse-chain/package.json create mode 100644 tests/node_modules/tslib/CopyrightNotice.txt create mode 100644 tests/node_modules/tslib/LICENSE.txt create mode 100644 tests/node_modules/tslib/README.md create mode 100644 tests/node_modules/tslib/modules/index.js create mode 100644 tests/node_modules/tslib/modules/package.json create mode 100644 tests/node_modules/tslib/package.json create mode 100644 tests/node_modules/tslib/tslib.d.ts create mode 100644 tests/node_modules/tslib/tslib.es6.html create mode 100644 tests/node_modules/tslib/tslib.es6.js create mode 100644 tests/node_modules/tslib/tslib.html create mode 100644 tests/node_modules/tslib/tslib.js create mode 100644 tests/node_modules/tweetnacl/AUTHORS.md create mode 100644 tests/node_modules/tweetnacl/CHANGELOG.md create mode 100644 tests/node_modules/tweetnacl/LICENSE create mode 100644 tests/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md create mode 100644 tests/node_modules/tweetnacl/README.md create mode 100644 tests/node_modules/tweetnacl/nacl-fast.js create mode 100644 tests/node_modules/tweetnacl/nacl-fast.min.js create mode 100644 tests/node_modules/tweetnacl/nacl.d.ts create mode 100644 tests/node_modules/tweetnacl/nacl.js create mode 100644 tests/node_modules/tweetnacl/nacl.min.js create mode 100644 tests/node_modules/tweetnacl/package.json create mode 100644 tests/node_modules/utf-8-validate/LICENSE create mode 100644 tests/node_modules/utf-8-validate/README.md create mode 100644 tests/node_modules/utf-8-validate/binding.gyp create mode 100644 tests/node_modules/utf-8-validate/build/Makefile create mode 100644 tests/node_modules/utf-8-validate/build/Release/.deps/Release/obj.target/validation/src/validation.o.d create mode 100644 tests/node_modules/utf-8-validate/build/Release/.deps/Release/validation.node.d create mode 100644 tests/node_modules/utf-8-validate/build/Release/obj.target/validation/src/validation.o create mode 100755 tests/node_modules/utf-8-validate/build/Release/validation.node create mode 100644 tests/node_modules/utf-8-validate/build/binding.Makefile create mode 100644 tests/node_modules/utf-8-validate/build/config.gypi create mode 100755 tests/node_modules/utf-8-validate/build/gyp-mac-tool create mode 100644 tests/node_modules/utf-8-validate/build/validation.target.mk create mode 100644 tests/node_modules/utf-8-validate/fallback.js create mode 100644 tests/node_modules/utf-8-validate/index.js create mode 100644 tests/node_modules/utf-8-validate/package.json create mode 100644 tests/node_modules/utf-8-validate/prebuilds/darwin-x64/node.napi.node create mode 100644 tests/node_modules/utf-8-validate/prebuilds/linux-arm/node.napi.armv6.node create mode 100644 tests/node_modules/utf-8-validate/prebuilds/linux-arm/node.napi.armv7.node create mode 100644 tests/node_modules/utf-8-validate/prebuilds/linux-arm64/node.napi.armv8.node create mode 100644 tests/node_modules/utf-8-validate/prebuilds/linux-x64/node.napi.node create mode 100644 tests/node_modules/utf-8-validate/prebuilds/win32-ia32/node.napi.node create mode 100644 tests/node_modules/utf-8-validate/prebuilds/win32-x64/node.napi.node create mode 100644 tests/node_modules/utf-8-validate/src/validation.c create mode 100644 tests/node_modules/uuid/AUTHORS create mode 100644 tests/node_modules/uuid/CHANGELOG.md create mode 100644 tests/node_modules/uuid/LICENSE.md create mode 100644 tests/node_modules/uuid/README.md create mode 100755 tests/node_modules/uuid/bin/uuid create mode 100644 tests/node_modules/uuid/index.js create mode 100644 tests/node_modules/uuid/lib/bytesToUuid.js create mode 100644 tests/node_modules/uuid/lib/md5-browser.js create mode 100644 tests/node_modules/uuid/lib/md5.js create mode 100644 tests/node_modules/uuid/lib/rng-browser.js create mode 100644 tests/node_modules/uuid/lib/rng.js create mode 100644 tests/node_modules/uuid/lib/sha1-browser.js create mode 100644 tests/node_modules/uuid/lib/sha1.js create mode 100644 tests/node_modules/uuid/lib/v35.js create mode 100644 tests/node_modules/uuid/package.json create mode 100644 tests/node_modules/uuid/v1.js create mode 100644 tests/node_modules/uuid/v3.js create mode 100644 tests/node_modules/uuid/v4.js create mode 100644 tests/node_modules/uuid/v5.js create mode 100644 tests/node_modules/which/CHANGELOG.md create mode 100644 tests/node_modules/which/LICENSE create mode 100644 tests/node_modules/which/README.md create mode 100755 tests/node_modules/which/bin/node-which create mode 100644 tests/node_modules/which/package.json create mode 100644 tests/node_modules/which/which.js create mode 100644 tests/node_modules/wide-align/LICENSE create mode 100644 tests/node_modules/wide-align/README.md create mode 100644 tests/node_modules/wide-align/align.js create mode 100644 tests/node_modules/wide-align/package.json create mode 100644 tests/node_modules/workerpool/HISTORY.md create mode 100644 tests/node_modules/workerpool/LICENSE create mode 100644 tests/node_modules/workerpool/README.md create mode 100644 tests/node_modules/workerpool/dist/worker.js create mode 100644 tests/node_modules/workerpool/dist/worker.js.map create mode 100644 tests/node_modules/workerpool/dist/workerpool.js create mode 100644 tests/node_modules/workerpool/dist/workerpool.js.map create mode 100644 tests/node_modules/workerpool/dist/workerpool.min.js create mode 100644 tests/node_modules/workerpool/dist/workerpool.min.js.LICENSE.txt create mode 100644 tests/node_modules/workerpool/dist/workerpool.min.js.map create mode 100644 tests/node_modules/workerpool/package.json create mode 100644 tests/node_modules/workerpool/src/Pool.js create mode 100644 tests/node_modules/workerpool/src/Promise.js create mode 100644 tests/node_modules/workerpool/src/WorkerHandler.js create mode 100644 tests/node_modules/workerpool/src/debug-port-allocator.js create mode 100644 tests/node_modules/workerpool/src/environment.js create mode 100644 tests/node_modules/workerpool/src/generated/embeddedWorker.js create mode 100644 tests/node_modules/workerpool/src/header.js create mode 100644 tests/node_modules/workerpool/src/index.js create mode 100644 tests/node_modules/workerpool/src/requireFoolWebpack.js create mode 100644 tests/node_modules/workerpool/src/types.js create mode 100644 tests/node_modules/workerpool/src/worker.js create mode 100755 tests/node_modules/wrap-ansi/index.js create mode 100644 tests/node_modules/wrap-ansi/license create mode 100644 tests/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts create mode 100644 tests/node_modules/wrap-ansi/node_modules/ansi-regex/index.js create mode 100644 tests/node_modules/wrap-ansi/node_modules/ansi-regex/license create mode 100644 tests/node_modules/wrap-ansi/node_modules/ansi-regex/package.json create mode 100644 tests/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md create mode 100644 tests/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.d.ts create mode 100644 tests/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js create mode 100644 tests/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license create mode 100644 tests/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json create mode 100644 tests/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md create mode 100644 tests/node_modules/wrap-ansi/node_modules/string-width/index.d.ts create mode 100644 tests/node_modules/wrap-ansi/node_modules/string-width/index.js create mode 100644 tests/node_modules/wrap-ansi/node_modules/string-width/license create mode 100644 tests/node_modules/wrap-ansi/node_modules/string-width/package.json create mode 100644 tests/node_modules/wrap-ansi/node_modules/string-width/readme.md create mode 100644 tests/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts create mode 100644 tests/node_modules/wrap-ansi/node_modules/strip-ansi/index.js create mode 100644 tests/node_modules/wrap-ansi/node_modules/strip-ansi/license create mode 100644 tests/node_modules/wrap-ansi/node_modules/strip-ansi/package.json create mode 100644 tests/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md create mode 100644 tests/node_modules/wrap-ansi/package.json create mode 100644 tests/node_modules/wrap-ansi/readme.md create mode 100644 tests/node_modules/wrappy/LICENSE create mode 100644 tests/node_modules/wrappy/README.md create mode 100644 tests/node_modules/wrappy/package.json create mode 100644 tests/node_modules/wrappy/wrappy.js create mode 100644 tests/node_modules/ws/LICENSE create mode 100644 tests/node_modules/ws/README.md create mode 100644 tests/node_modules/ws/browser.js create mode 100644 tests/node_modules/ws/index.js create mode 100644 tests/node_modules/ws/lib/buffer-util.js create mode 100644 tests/node_modules/ws/lib/constants.js create mode 100644 tests/node_modules/ws/lib/event-target.js create mode 100644 tests/node_modules/ws/lib/extension.js create mode 100644 tests/node_modules/ws/lib/limiter.js create mode 100644 tests/node_modules/ws/lib/permessage-deflate.js create mode 100644 tests/node_modules/ws/lib/receiver.js create mode 100644 tests/node_modules/ws/lib/sender.js create mode 100644 tests/node_modules/ws/lib/stream.js create mode 100644 tests/node_modules/ws/lib/validation.js create mode 100644 tests/node_modules/ws/lib/websocket-server.js create mode 100644 tests/node_modules/ws/lib/websocket.js create mode 100644 tests/node_modules/ws/package.json create mode 100644 tests/node_modules/y18n/CHANGELOG.md create mode 100644 tests/node_modules/y18n/LICENSE create mode 100644 tests/node_modules/y18n/README.md create mode 100644 tests/node_modules/y18n/build/index.cjs create mode 100644 tests/node_modules/y18n/build/lib/cjs.js create mode 100644 tests/node_modules/y18n/build/lib/index.js create mode 100644 tests/node_modules/y18n/build/lib/platform-shims/node.js create mode 100644 tests/node_modules/y18n/index.mjs create mode 100644 tests/node_modules/y18n/package.json create mode 100644 tests/node_modules/yargs-parser/CHANGELOG.md create mode 100644 tests/node_modules/yargs-parser/LICENSE.txt create mode 100644 tests/node_modules/yargs-parser/README.md create mode 100644 tests/node_modules/yargs-parser/browser.js create mode 100644 tests/node_modules/yargs-parser/build/index.cjs create mode 100644 tests/node_modules/yargs-parser/build/lib/index.js create mode 100644 tests/node_modules/yargs-parser/build/lib/string-utils.js create mode 100644 tests/node_modules/yargs-parser/build/lib/tokenize-arg-string.js create mode 100644 tests/node_modules/yargs-parser/build/lib/yargs-parser-types.js create mode 100644 tests/node_modules/yargs-parser/build/lib/yargs-parser.js create mode 100644 tests/node_modules/yargs-parser/package.json create mode 100644 tests/node_modules/yargs-unparser/CHANGELOG.md create mode 100644 tests/node_modules/yargs-unparser/LICENSE create mode 100644 tests/node_modules/yargs-unparser/README.md create mode 100644 tests/node_modules/yargs-unparser/index.js create mode 100644 tests/node_modules/yargs-unparser/node_modules/camelcase/index.d.ts create mode 100644 tests/node_modules/yargs-unparser/node_modules/camelcase/index.js create mode 100644 tests/node_modules/yargs-unparser/node_modules/camelcase/license create mode 100644 tests/node_modules/yargs-unparser/node_modules/camelcase/package.json create mode 100644 tests/node_modules/yargs-unparser/node_modules/camelcase/readme.md create mode 100644 tests/node_modules/yargs-unparser/package.json create mode 100644 tests/node_modules/yargs/CHANGELOG.md create mode 100644 tests/node_modules/yargs/LICENSE create mode 100644 tests/node_modules/yargs/README.md create mode 100644 tests/node_modules/yargs/browser.mjs create mode 100644 tests/node_modules/yargs/build/index.cjs create mode 100644 tests/node_modules/yargs/build/lib/argsert.js create mode 100644 tests/node_modules/yargs/build/lib/command.js create mode 100644 tests/node_modules/yargs/build/lib/completion-templates.js create mode 100644 tests/node_modules/yargs/build/lib/completion.js create mode 100644 tests/node_modules/yargs/build/lib/middleware.js create mode 100644 tests/node_modules/yargs/build/lib/parse-command.js create mode 100644 tests/node_modules/yargs/build/lib/typings/common-types.js create mode 100644 tests/node_modules/yargs/build/lib/typings/yargs-parser-types.js create mode 100644 tests/node_modules/yargs/build/lib/usage.js create mode 100644 tests/node_modules/yargs/build/lib/utils/apply-extends.js create mode 100644 tests/node_modules/yargs/build/lib/utils/is-promise.js create mode 100644 tests/node_modules/yargs/build/lib/utils/levenshtein.js create mode 100644 tests/node_modules/yargs/build/lib/utils/obj-filter.js create mode 100644 tests/node_modules/yargs/build/lib/utils/process-argv.js create mode 100644 tests/node_modules/yargs/build/lib/utils/set-blocking.js create mode 100644 tests/node_modules/yargs/build/lib/utils/which-module.js create mode 100644 tests/node_modules/yargs/build/lib/validation.js create mode 100644 tests/node_modules/yargs/build/lib/yargs-factory.js create mode 100644 tests/node_modules/yargs/build/lib/yerror.js create mode 100644 tests/node_modules/yargs/helpers/helpers.mjs create mode 100644 tests/node_modules/yargs/helpers/index.js create mode 100644 tests/node_modules/yargs/helpers/package.json create mode 100644 tests/node_modules/yargs/index.cjs create mode 100644 tests/node_modules/yargs/index.mjs create mode 100644 tests/node_modules/yargs/lib/platform-shims/browser.mjs create mode 100644 tests/node_modules/yargs/lib/platform-shims/esm.mjs create mode 100644 tests/node_modules/yargs/locales/be.json create mode 100644 tests/node_modules/yargs/locales/de.json create mode 100644 tests/node_modules/yargs/locales/en.json create mode 100644 tests/node_modules/yargs/locales/es.json create mode 100644 tests/node_modules/yargs/locales/fi.json create mode 100644 tests/node_modules/yargs/locales/fr.json create mode 100644 tests/node_modules/yargs/locales/hi.json create mode 100644 tests/node_modules/yargs/locales/hu.json create mode 100644 tests/node_modules/yargs/locales/id.json create mode 100644 tests/node_modules/yargs/locales/it.json create mode 100644 tests/node_modules/yargs/locales/ja.json create mode 100644 tests/node_modules/yargs/locales/ko.json create mode 100644 tests/node_modules/yargs/locales/nb.json create mode 100644 tests/node_modules/yargs/locales/nl.json create mode 100644 tests/node_modules/yargs/locales/nn.json create mode 100644 tests/node_modules/yargs/locales/pirate.json create mode 100644 tests/node_modules/yargs/locales/pl.json create mode 100644 tests/node_modules/yargs/locales/pt.json create mode 100644 tests/node_modules/yargs/locales/pt_BR.json create mode 100644 tests/node_modules/yargs/locales/ru.json create mode 100644 tests/node_modules/yargs/locales/th.json create mode 100644 tests/node_modules/yargs/locales/tr.json create mode 100644 tests/node_modules/yargs/locales/zh_CN.json create mode 100644 tests/node_modules/yargs/locales/zh_TW.json create mode 100644 tests/node_modules/yargs/node_modules/ansi-regex/index.d.ts create mode 100644 tests/node_modules/yargs/node_modules/ansi-regex/index.js create mode 100644 tests/node_modules/yargs/node_modules/ansi-regex/license create mode 100644 tests/node_modules/yargs/node_modules/ansi-regex/package.json create mode 100644 tests/node_modules/yargs/node_modules/ansi-regex/readme.md create mode 100644 tests/node_modules/yargs/node_modules/is-fullwidth-code-point/index.d.ts create mode 100644 tests/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js create mode 100644 tests/node_modules/yargs/node_modules/is-fullwidth-code-point/license create mode 100644 tests/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json create mode 100644 tests/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md create mode 100644 tests/node_modules/yargs/node_modules/string-width/index.d.ts create mode 100644 tests/node_modules/yargs/node_modules/string-width/index.js create mode 100644 tests/node_modules/yargs/node_modules/string-width/license create mode 100644 tests/node_modules/yargs/node_modules/string-width/package.json create mode 100644 tests/node_modules/yargs/node_modules/string-width/readme.md create mode 100644 tests/node_modules/yargs/node_modules/strip-ansi/index.d.ts create mode 100644 tests/node_modules/yargs/node_modules/strip-ansi/index.js create mode 100644 tests/node_modules/yargs/node_modules/strip-ansi/license create mode 100644 tests/node_modules/yargs/node_modules/strip-ansi/package.json create mode 100644 tests/node_modules/yargs/node_modules/strip-ansi/readme.md create mode 100644 tests/node_modules/yargs/package.json create mode 100644 tests/node_modules/yargs/yargs create mode 100644 tests/node_modules/yocto-queue/index.d.ts create mode 100644 tests/node_modules/yocto-queue/index.js create mode 100644 tests/node_modules/yocto-queue/license create mode 100644 tests/node_modules/yocto-queue/package.json create mode 100644 tests/node_modules/yocto-queue/readme.md create mode 100644 tests/package-lock.json create mode 100644 tests/package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a865d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ + +.anchor +.DS_Store +target +**/*.rs.bk diff --git a/Anchor.toml b/Anchor.toml new file mode 100644 index 0000000..bfa84f2 --- /dev/null +++ b/Anchor.toml @@ -0,0 +1,9 @@ +[registry] +url = "https://anchor.projectserum.com" + +[provider] +cluster = "localnet" +wallet = "/Users/rohan/.config/solana/id.json" + +[scripts] +test = "mocha -t 1000000 tests/" diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..cab6072 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1457 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-traits" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483" + +[[package]] +name = "anchor-attribute-access-control" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ba6adc8bed8a9b284219ba12489b459ad233679a489edf9642987e6b090473" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "regex", + "syn", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab91b688a60b289767724288d73bf5d4fc425438e13d4d4f604a73ab9686c675" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a7a9215bb3b101f7237c06d5fc873278b82f685bfee95e4ec7e8427ff83c390" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b26d266d84ec0d8097214cf37430b4681e29da0522fbd3fdb0afc6fc16b2313" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-attribute-interface" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08e35d76a8f8bc8934acc877c8643ec14ddcb355d423de8f9b7e225fe9824b60" +dependencies = [ + "anchor-syn", + "anyhow", + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6e8a3822e58df25ef45125a6dbe5ceeefebea68954f22beeeff83e4bd040a4" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-attribute-state" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86586d43cf7e0f10431e018c72f51cfc60d1ce3323df44249ff3a70a45168b20" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85aa313d4317811983cab3e7a66ede358c4eb3f1fe47acf51a6078cd239bdbe7" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "anchor-lang" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b300d7222b786b7947bd1c14ab82a6c519fa1bbce4ed0f0ffe4db1e6c05669" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-interface", + "anchor-attribute-program", + "anchor-attribute-state", + "anchor-derive-accounts", + "base64 0.13.0", + "borsh", + "bytemuck", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-solend" +version = "0.1.0" +source = "git+https://github.com/RohanKapurDEV/anchor-solend#9148463c2c5f64e982abe81e5a466d313398fe2e" +dependencies = [ + "anchor-lang", + "solana-program", + "spl-token-lending", +] + +[[package]] +name = "anchor-spl" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3faeabe726b366ad273f4c47a76a79302e69eab889e3f50cd1c736a01a34d7f7" +dependencies = [ + "anchor-lang", + "lazy_static", + "serum_dex", + "solana-program", + "spl-token 3.2.0", +] + +[[package]] +name = "anchor-syn" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833a32a3945814ecd8b6fdcb8666580e69037fe2efc4eaa4a9c68b1940450505" +dependencies = [ + "anyhow", + "bs58", + "heck", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "serde", + "serde_json", + "sha2", + "syn", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "blake3" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18dda7dc709193c0d86a1a51050a926dc3df1cf262ec46a23a25dba421ea1924" +dependencies = [ + "borsh-derive", + "hashbrown", +] + +[[package]] +name = "borsh-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "684155372435f578c0fa1acd13ebbb182cc19d6b38b64ae7901da4393217d264" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2102f62f8b6d3edeab871830782285b64cc1830168094db05c8e458f209bc5c3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196c978c4c9b0b142d446ef3240690bf5a8a33497074a113ff9a337ccb750483" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72957246c41db82b8ef88a5486143830adeb8227ef9837740bdec67724cf2c5b" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cc" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.4", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "enumflags2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" +dependencies = [ + "enumflags2_derive", +] + +[[package]] +name = "enumflags2_derive" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "field-offset" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" +dependencies = [ + "memoffset", + "rustc_version 0.3.3", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi", +] + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.4", + "hmac", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1fa8cddc8fbbee11227ef194b5317ed014b8acbf15139bd716a18ad3fe99ec5" + +[[package]] +name = "libsecp256k1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand", + "serde", + "sha2", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memmap2" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + +[[package]] +name = "monaco" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "anchor-solend", + "anchor-spl", + "solana-program", + "spl-associated-token-account", + "spl-token-lending", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" +dependencies = [ + "proc-macro-crate 1.0.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +dependencies = [ + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "version_check", + "yansi", +] + +[[package]] +name = "quick-protobuf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ca6639207ac869e31cca06b8adbc7676278f22b321e51115766009b4f192dbb" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "rust_decimal" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5446d1cf2dfe2d6367c8b27f2082bdf011e60e76fa1fcd140047f535156d6e7" +dependencies = [ + "arrayvec", + "num-traits", + "serde", +] + +[[package]] +name = "rust_decimal_macros" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1927f5f2552e7c5335f2daef329de05f91efd8ec4a71c3ff4066ad45361b1df" +dependencies = [ + "quote", + "rust_decimal", +] + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustversion" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "safe-transmute" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1056a0db1978e9dbf0f6e4fca677f6f9143dc1c19de346f22cac23e422196834" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13af2fbb8b60a8950d6c72a56d2095c28870367cc8e10c55e9745bac4995a2c4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serum_dex" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02705854bae4622e552346c8edd43ab90c7425da35d63d2c689f39238f8d8b25" +dependencies = [ + "arrayref", + "bincode", + "bytemuck", + "byteorder", + "enumflags2", + "field-offset", + "itertools", + "num-traits", + "num_enum", + "safe-transmute", + "serde", + "solana-program", + "spl-token 3.2.0", + "static_assertions", + "thiserror", + "without-alloc", +] + +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45c6760c1dd139c202ef6df28bff467c904aa35b1aa1a59be268c47aec8bc6c0" +dependencies = [ + "bs58", + "bv", + "generic-array 0.14.4", + "log", + "memmap2", + "rustc_version 0.2.3", + "serde", + "serde_derive", + "sha2", + "solana-frozen-abi-macro", + "solana-logger", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4dbe296c16dec41e8e6f4e6c2694c6224820d34c0ab11a2d3ff9683f44878ef" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version 0.2.3", + "syn", +] + +[[package]] +name = "solana-logger" +version = "1.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80af1959b520c0fc99bc6583ba9d82bfa15b1ac007516795bceeb4a951af77c7" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-program" +version = "1.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5e5dd99d642b5e89eeb20457310c3c23f20dbf44e67c64e473a02fbc50d646" +dependencies = [ + "bincode", + "blake3", + "borsh", + "borsh-derive", + "bs58", + "bv", + "curve25519-dalek", + "hex", + "itertools", + "lazy_static", + "libsecp256k1", + "log", + "num-derive", + "num-traits", + "rand", + "rustc_version 0.2.3", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "sha2", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-sdk-macro", + "thiserror", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee909dcddb5b4d349b3e5e1ae92f6660cd2f783dea392ae2e73210776aadc9b" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "spl-associated-token-account" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "393e2240d521c3dd770806bff25c2c00d761ac962be106e14e22dd912007f428" +dependencies = [ + "solana-program", + "spl-token 3.2.0", +] + +[[package]] +name = "spl-token" +version = "3.1.1" +source = "git+https://github.com/solendprotocol/solana-program-library#92d8fdb783aac8b63e7bb20549ff83f8b4d6ee80" +dependencies = [ + "arrayref", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93bfdd5bd7c869cb565c7d7635c4fafe189b988a0bdef81063cd9585c6b8dc01" +dependencies = [ + "arrayref", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-lending" +version = "0.1.0" +source = "git+https://github.com/solendprotocol/solana-program-library#92d8fdb783aac8b63e7bb20549ff83f8b4d6ee80" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "solana-program", + "spl-token 3.1.1", + "switchboard-program", + "thiserror", + "uint", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "switchboard-program" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3581eac546cd5634f7da15d18378082c31c9ea62f90c8a0b5e3f9ab3a4684d77" +dependencies = [ + "bincode", + "borsh", + "byteorder", + "quick-protobuf", + "solana-program", + "switchboard-protos", + "switchboard-utils", + "zerocopy", +] + +[[package]] +name = "switchboard-protos" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbd68955010dfae48044d3bff6aac4631ca6783cf910a277123eac1b75aff10" +dependencies = [ + "bincode", + "borsh", + "byteorder", + "quick-protobuf", +] + +[[package]] +name = "switchboard-utils" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d587bed1b5b62f5adb38dc220b91fc545d2808fadbe8a18eec1b434c825da483" +dependencies = [ + "bincode", + "borsh", + "byteorder", + "quick-protobuf", + "rust_decimal", + "rust_decimal_macros", + "solana-program", + "switchboard-protos", + "zerocopy", +] + +[[package]] +name = "syn" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-segmentation" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "without-alloc" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e34736feff52a0b3e5680927e947a4d8fac1f0b80dc8120b080dd8de24d75e2" +dependencies = [ + "alloc-traits", +] + +[[package]] +name = "yansi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" + +[[package]] +name = "zerocopy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6580539ad917b7c026220c4b3f2c08d52ce54d6ce0dc491e66002e35388fab46" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb" +dependencies = [ + "proc-macro2", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..a60de98 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = [ + "programs/*" +] diff --git a/migrations/deploy.js b/migrations/deploy.js new file mode 100644 index 0000000..7cca271 --- /dev/null +++ b/migrations/deploy.js @@ -0,0 +1,13 @@ + +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@project-serum/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +} diff --git a/programs/monaco/Cargo.toml b/programs/monaco/Cargo.toml new file mode 100644 index 0000000..c5fa7a3 --- /dev/null +++ b/programs/monaco/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "monaco" +version = "0.1.0" +description = "Created with Anchor" +edition = "2018" + +[lib] +crate-type = ["cdylib", "lib"] +name = "monaco" + +[features] +no-entrypoint = [] +no-idl = [] +cpi = ["no-entrypoint"] +default = [] + +[dependencies] +anchor-lang = "0.13.2" +anchor-spl = "0.13.2" +solana-program = "1.7.8" +anchor-solend = { git="https://github.com/RohanKapurDEV/anchor-solend", version="0.1.0" } +spl-token-lending = { git="https://github.com/solendprotocol/solana-program-library", version="0.1.0" } +spl-associated-token-account = "1.0.3" \ No newline at end of file diff --git a/programs/monaco/Xargo.toml b/programs/monaco/Xargo.toml new file mode 100644 index 0000000..475fb71 --- /dev/null +++ b/programs/monaco/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/programs/monaco/src/lib.rs b/programs/monaco/src/lib.rs new file mode 100644 index 0000000..cb4fec9 --- /dev/null +++ b/programs/monaco/src/lib.rs @@ -0,0 +1,755 @@ +use anchor_lang::prelude::*; +use anchor_lang::solana_program::program_pack::Pack; +use anchor_solend::cpi::{ + deposit_reserve_liquidity, redeem_reserve_collateral, refresh_reserve, solend_devnet, + DepositReserveLiquidity, RedeemReserveCollateral, RefreshReserve, +}; +use anchor_spl::dex; +use anchor_spl::dex::serum_dex::instruction::SelfTradeBehavior; +use anchor_spl::dex::serum_dex::matching::{OrderType, Side as SerumSide}; +use anchor_spl::dex::serum_dex::state::MarketState; +use anchor_spl::token::{self, transfer, Mint, TokenAccount, Transfer}; +use spl_associated_token_account::get_associated_token_address; +use spl_token_lending::state::Reserve; +use std::num::NonZeroU64; + +#[program] +pub mod monaco { + use super::*; + + /// Deposits funds into solend reserve first, then makes corresponding DepositState account + pub fn deposit( + ctx: Context, + nonce: u8, + liquidity_amount: u64, + schedule: DcaSchedule, + ) -> ProgramResult { + let cpi_accounts = DepositReserveLiquidity { + source_liquidity: ctx.accounts.source_liquidity.to_account_info().clone(), + destination_collateral_account: ctx + .accounts + .destination_collateral_account + .to_account_info() + .clone(), + reserve_account: ctx.accounts.reserve_account.clone(), + reserve_collateral_mint: ctx.accounts.reserve_collateral_mint.clone(), + reserve_liquidity_supply: ctx.accounts.reserve_liquidity_supply.clone(), + lending_market_account: ctx.accounts.lending_market_account.clone(), + lending_market_authority: ctx.accounts.lending_market_authority.clone(), + transfer_authority: ctx.accounts.transfer_authority.clone(), + clock: ctx.accounts.clock.to_account_info().clone(), + token_program_id: ctx.accounts.token_program.clone(), + }; + + let user_authority = ctx.accounts.user_authority.clone(); + let reserve = ctx.accounts.reserve_account.clone(); + + let pda_seeds = &[ + &user_authority.key.to_bytes()[..32], + &reserve.key.to_bytes()[..32], + &[nonce], + ]; + let pda_signer = &[&pda_seeds[..]]; + let cpi_ctx = + CpiContext::new_with_signer(ctx.accounts.solend.clone(), cpi_accounts, pda_signer); + + // CPI to solend instruction + deposit_reserve_liquidity(cpi_ctx, liquidity_amount)?; + + let deposit_state_account = &mut ctx.accounts.deposit; + + // Query collateral token account for new balance + let collateral_amount = token::accessor::amount( + &ctx.accounts + .destination_collateral_account + .to_account_info(), + )?; + + deposit_state_account.user_authority = *ctx.accounts.user_authority.key; + deposit_state_account.collateral_account_key = *ctx + .accounts + .destination_collateral_account + .to_account_info() + .key; + deposit_state_account.liquidity_amount = liquidity_amount; + deposit_state_account.collateral_amount = collateral_amount; + deposit_state_account.schedule = schedule; + deposit_state_account.reserve_account = *ctx.accounts.reserve_account.key; + + deposit_state_account.dca_mint = *ctx.accounts.dca_mint.to_account_info().key; + + deposit_state_account.dca_recipient = get_associated_token_address( + ctx.accounts.user_authority.key, + ctx.accounts.dca_mint.to_account_info().key, + ); + + deposit_state_account.created_at = ctx.accounts.clock.unix_timestamp; + deposit_state_account.last_update = ctx.accounts.clock.unix_timestamp; + deposit_state_account.counter = 0; + deposit_state_account.nonce = nonce; + + Ok(()) + } + + /// Adds funds to an existing DepositState account. Requires user to supply the same + /// destination_collateral_account (controlled by PDA) + pub fn add_to_deposit( + ctx: Context, + nonce: u8, + liquidity_amount: u64, + ) -> ProgramResult { + let cpi_accounts = DepositReserveLiquidity { + source_liquidity: ctx.accounts.source_liquidity.to_account_info().clone(), + destination_collateral_account: ctx + .accounts + .destination_collateral_account + .to_account_info() + .clone(), + reserve_account: ctx.accounts.reserve_account.clone(), + reserve_collateral_mint: ctx.accounts.reserve_collateral_mint.clone(), + reserve_liquidity_supply: ctx.accounts.reserve_liquidity_supply.clone(), + lending_market_account: ctx.accounts.lending_market_account.clone(), + lending_market_authority: ctx.accounts.lending_market_authority.clone(), + transfer_authority: ctx.accounts.transfer_authority.clone(), + clock: ctx.accounts.clock.to_account_info().clone(), + token_program_id: ctx.accounts.token_program.clone(), + }; + + let user_authority = ctx.accounts.user_authority.clone(); + let reserve = ctx.accounts.reserve_account.clone(); + + let pda_seeds = &[ + &user_authority.key.to_bytes()[..32], + &reserve.key.to_bytes()[..32], + &[nonce], + ]; + let pda_signer = &[&pda_seeds[..]]; + + let cpi_ctx = + CpiContext::new_with_signer(ctx.accounts.solend.clone(), cpi_accounts, pda_signer); + + // CPI to solend instruction + deposit_reserve_liquidity(cpi_ctx, liquidity_amount)?; + + let deposit_state = &mut ctx.accounts.deposit_state; + deposit_state.liquidity_amount += liquidity_amount; + deposit_state.last_update = ctx.accounts.clock.unix_timestamp; + // Query collateral token account for new balance + let collateral_amount = token::accessor::amount( + &ctx.accounts + .destination_collateral_account + .to_account_info(), + )?; + + deposit_state.collateral_amount += collateral_amount; + + Ok(()) + } + + /// Privileged instruction for running DCA strat on a deposit account + pub fn run_dca_strategy<'info>( + ctx: Context<'_, '_, '_, 'info, RunDcaStrategy<'info>>, + nonce: u8, + side: Side, + min_expected_swap_amount: u64, + ) -> ProgramResult { + // Refresh reserve account + let refresh_cpi_accounts = RefreshReserve { + reserve: ctx.accounts.reserve.clone(), + pyth_reserve_liquidity_oracle: ctx.accounts.pyth_reserve_liquidity_oracle.clone(), + switchboard_reserve_liquidity_oracle: ctx + .accounts + .switchboard_reserve_liquidity_oracle + .clone(), + clock: ctx.accounts.clock.clone(), + }; + let refresh_cpi_ctx = CpiContext::new(ctx.accounts.solend.clone(), refresh_cpi_accounts); + refresh_reserve(refresh_cpi_ctx)?; + + // Calculating how much collateral to redeem from reserve + let reserve_acct = &mut ctx.accounts.refreshed_reserve_account; + let deposit_state = &mut ctx.accounts.deposit_state; + let reserve: Reserve = Reserve::unpack(&reserve_acct.data.borrow())?; + + let liquidity_in_collateral = reserve + .collateral_exchange_rate()? + .collateral_to_liquidity(deposit_state.collateral_amount)?; + + let amount_to_redeem = reserve + .collateral_exchange_rate()? + .liquidity_to_collateral(liquidity_in_collateral - deposit_state.liquidity_amount)?; + + // Redeem reserve collateral + let redeem_cpi_accounts = RedeemReserveCollateral { + source_collateral: ctx.accounts.source_collateral.to_account_info().clone(), + // This is the account that receives the liquidity, should be controlled by PDA authority + destination_liquidity: ctx.accounts.destination_liquidity.to_account_info().clone(), + refreshed_reserve_account: ctx.accounts.refreshed_reserve_account.clone(), + reserve_collateral_mint: ctx.accounts.reserve_collateral_mint.clone(), + reserve_liquidity: ctx.accounts.reserve_liquidity.clone(), + lending_market: ctx.accounts.lending_market.clone(), + lending_market_authority: ctx.accounts.lending_market_authority.clone(), + user_transfer_authority: ctx.accounts.transfer_authority.clone(), + clock: ctx.accounts.clock.clone(), + token_program_id: ctx.accounts.token_program_id.clone(), + }; + + let user_authority = ctx.accounts.user_authority.clone(); + let reserve_account = ctx.accounts.reserve.clone(); + + let pda_seeds = &[ + &user_authority.key.to_bytes()[..32], + &reserve_account.key.to_bytes()[..32], + &[nonce], + ]; + + let pda_signer = &[&pda_seeds[..]]; + + let redeem_cpi_ctx = CpiContext::new_with_signer( + ctx.accounts.solend.clone(), + redeem_cpi_accounts, + pda_signer, + ); + + redeem_reserve_collateral(redeem_cpi_ctx, amount_to_redeem)?; + + // Find ATA of admin key - fee recipient of the Serum swap step + // let admin_ata_key: Pubkey = + // get_associated_token_address(&fee_recipient::ID, &deposit_state.dca_mint); + + let (from_token, to_token) = match side { + Side::Bid => (&ctx.accounts.pc_wallet, &ctx.accounts.market.coin_wallet), + Side::Ask => (&ctx.accounts.market.coin_wallet, &ctx.accounts.pc_wallet), + }; + + // Token balances before the trade. + let from_amount_before = token::accessor::amount(from_token)?; + let to_amount_before = token::accessor::amount(to_token)?; + + // Initiate Serum swap + let orderbook: OrderbookClient<'info> = (&*ctx.accounts).into(); + + match side { + Side::Bid => orderbook.buy(amount_to_redeem, None)?, + Side::Ask => orderbook.sell(amount_to_redeem, None)?, + } + // Setlle swap + orderbook.settle(None)?; + + // Token balances after the trade. + let from_amount_after = token::accessor::amount(from_token)?; + let to_amount_after = token::accessor::amount(to_token)?; + + // Calculate the delta, i.e. the amount swapped. + let from_amount = from_amount_before.checked_sub(from_amount_after).unwrap(); + let to_amount = to_amount_after.checked_sub(to_amount_before).unwrap(); + + // Run safety checks on serum swap + apply_risk_checks(DidSwap { + authority: *ctx.accounts.transfer_authority.key, + given_amount: amount_to_redeem, + min_expected_swap_amount, + from_amount, + to_amount, + spill_amount: 0, + from_mint: token::accessor::mint(from_token)?, + to_mint: token::accessor::mint(to_token)?, + quote_mint: match side { + Side::Bid => token::accessor::mint(from_token)?, + Side::Ask => token::accessor::mint(to_token)?, + }, + })?; + + Ok(()) + } +} + +#[derive(Accounts)] +#[instruction(nonce: u8, liquidity_amount: u64)] +pub struct Deposit<'info> { + // Deposit state account + #[account(init)] + pub deposit: ProgramAccount<'info, DepositState>, + + // AccountInfo of the account that calls the ix + #[account(signer)] + pub user_authority: AccountInfo<'info>, + + // Solend program + #[account(constraint = solend.key == &solend_devnet::ID)] + pub solend: AccountInfo<'info>, + + // Token mint of DCA receiving asset + pub dca_mint: CpiAccount<'info, Mint>, + + // Solend CPI accounts + // Token account for asset to deposit into reserve and make sure account owner is transfer authority PDA + #[account( + constraint = source_liquidity.amount >= liquidity_amount, + constraint = source_liquidity.owner == *transfer_authority.key + )] + pub source_liquidity: CpiAccount<'info, TokenAccount>, + // Token account for reserve collateral token + // Make sure it has a 0 balance to ensure empty account and make sure account owner is transfer authority PDA + #[account( + constraint = destination_collateral_account.amount == 0, + constraint = destination_collateral_account.owner == *transfer_authority.key, + )] + pub destination_collateral_account: CpiAccount<'info, TokenAccount>, + // Reserve state account + pub reserve_account: AccountInfo<'info>, + // Token mint for reserve collateral token + pub reserve_collateral_mint: AccountInfo<'info>, + // Reserve liquidity supply SPL token account + pub reserve_liquidity_supply: AccountInfo<'info>, + // Lending market account + pub lending_market_account: AccountInfo<'info>, + // Lending market authority (PDA) + pub lending_market_authority: AccountInfo<'info>, + // Transfer authority for accounts 1 and 2 + #[account(seeds = [&user_authority.key.to_bytes()[..32], &reserve_account.key.to_bytes()[..32], &[nonce]])] + pub transfer_authority: AccountInfo<'info>, + // Clock + pub clock: Sysvar<'info, Clock>, + // Token program + #[account(constraint = token_program.key == &token::ID)] + pub token_program: AccountInfo<'info>, +} + +#[derive(Accounts)] +#[instruction(nonce: u8, liquidity_amount: u64)] +pub struct AddToDeposit<'info> { + // Deposit state being modified + #[account(mut, has_one=user_authority)] + pub deposit_state: ProgramAccount<'info, DepositState>, + + // Account calling the instruction + #[account(signer)] + pub user_authority: AccountInfo<'info>, + + // Solend program + #[account(constraint = solend.key == &solend_devnet::ID)] + pub solend: AccountInfo<'info>, + + // Solend CPI accounts + // Token account for asset to deposit into reserve and make sure account owner is transfer authority PDA + #[account( + constraint = source_liquidity.amount >= liquidity_amount, + constraint = source_liquidity.owner == *transfer_authority.key + )] + pub source_liquidity: CpiAccount<'info, TokenAccount>, + // Token account for reserve collateral token + // Make sure account owner is transfer authority PDA + #[account( + constraint = destination_collateral_account.owner == *transfer_authority.key, + constraint = *destination_collateral_account.to_account_info().key == deposit_state.collateral_account_key + )] + pub destination_collateral_account: CpiAccount<'info, TokenAccount>, + // Reserve state account + pub reserve_account: AccountInfo<'info>, + // Token mint for reserve collateral token + pub reserve_collateral_mint: AccountInfo<'info>, + // Reserve liquidity supply SPL token account + pub reserve_liquidity_supply: AccountInfo<'info>, + // Lending market account + pub lending_market_account: AccountInfo<'info>, + // Lending market authority (PDA) + pub lending_market_authority: AccountInfo<'info>, + // Transfer authority for accounts 1 and 2 + #[account(seeds = [&user_authority.key.to_bytes()[..32], &reserve_account.key.to_bytes()[..32], &[nonce]])] + pub transfer_authority: AccountInfo<'info>, + // Clock + pub clock: Sysvar<'info, Clock>, + // Token program + #[account(constraint = token_program.key == &token::ID)] + pub token_program: AccountInfo<'info>, +} + +#[derive(Accounts)] +#[instruction(nonce: u8)] +pub struct RunDcaStrategy<'info> { + // Deposite state account being modified + #[account(mut)] + pub deposit_state: ProgramAccount<'info, DepositState>, + + // Account calling the instruction + #[account(signer)] + pub user_authority: AccountInfo<'info>, + + // Solend program + #[account(constraint = solend.key == &solend_devnet::ID)] + pub solend: AccountInfo<'info>, + + // Solana CPI accounts for RefreshReserve and RedeemReserveCollateral + + // Refresh reserve accounts + // Reserve account + pub reserve: AccountInfo<'info>, + // Pyth reserve liquidity oracle + // Must be the pyth price account specified in InitReserve + pub pyth_reserve_liquidity_oracle: AccountInfo<'info>, + // Switchboard Reserve liquidity oracle account + // Must be the switchboard price account specified in InitReserve + pub switchboard_reserve_liquidity_oracle: AccountInfo<'info>, + + // RedeeemReserveCollateral accounts + // Source token account for reserve collateral token + #[account(constraint = source_collateral.to_account_info().key == transfer_authority.key)] + pub source_collateral: CpiAccount<'info, TokenAccount>, + // Destination liquidity token account + #[account(mut)] + pub destination_liquidity: CpiAccount<'info, TokenAccount>, + // Refreshed reserve account + #[account(constraint = refreshed_reserve_account.key == reserve.key)] + pub refreshed_reserve_account: AccountInfo<'info>, + // Reserve collateral mint account + pub reserve_collateral_mint: AccountInfo<'info>, + // Reserve liquidity supply SPL Token account. + pub reserve_liquidity: AccountInfo<'info>, + // Lending market account + pub lending_market: AccountInfo<'info>, + // Lending market authority - PDA + pub lending_market_authority: AccountInfo<'info>, + // User transfer authority + #[account(seeds = [&user_authority.key.to_bytes()[..32], &refreshed_reserve_account.key.to_bytes()[..32], &[nonce]])] + pub transfer_authority: AccountInfo<'info>, + + // Serum swap accounts + market: MarketAccounts<'info>, + // Should technically be able to use destination_liquidity account in place of this + #[account(mut)] + pc_wallet: AccountInfo<'info>, + // Programs. + dex_program: AccountInfo<'info>, + + // Misc accounts - Leave at AccountInfo + pub clock: AccountInfo<'info>, + pub rent: AccountInfo<'info>, + pub token_program_id: AccountInfo<'info>, +} + +impl<'info> From<&RunDcaStrategy<'info>> for OrderbookClient<'info> { + fn from(accounts: &RunDcaStrategy<'info>) -> OrderbookClient<'info> { + OrderbookClient { + market: accounts.market.clone(), + authority: accounts.transfer_authority.clone(), + pc_wallet: accounts.pc_wallet.clone(), + dex_program: accounts.dex_program.clone(), + token_program: accounts.token_program_id.clone(), + rent: accounts.rent.clone(), + } + } +} + +#[derive(Accounts)] +pub struct CloseAccount<'info> { + #[account( + mut, + close = user_authority, + constraint = deposit_state.user_authority == *user_authority.key + )] + pub deposit_state: ProgramAccount<'info, DepositState>, + + #[account(signer)] + pub user_authority: AccountInfo<'info>, +} + +#[account] +pub struct DepositState { + // Pubkey of depositor that called ix + pub user_authority: Pubkey, + // Pubkey of account holding the reserve collateral token + // Used for AddToDeposit context struct constraints + pub collateral_account_key: Pubkey, + // Current amount of liquidity tokens deposited + // Update on withdraw or modification + pub liquidity_amount: u64, + // Current amount of reserve collateral tokens being controlled by PDA + // Update on withdraw or modification + pub collateral_amount: u64, + // DCA schedule for deposit + pub schedule: DcaSchedule, + // Pubkey of reserve account of pool where liquidity is deposited + pub reserve_account: Pubkey, + + // Token mint of token to run dca strategy on + pub dca_mint: Pubkey, + + // Set this as ATA of signer + pub dca_recipient: Pubkey, + + // Unix timestamp of deposit + pub created_at: i64, + // Unix timestamp of the last update + pub last_update: i64, + // Integer representing the amount of times a DCA has executed + pub counter: u16, + // Nonce + pub nonce: u8, +} + +// Market accounts are the accounts used to place orders against the dex minus +// common accounts, i.e., program ids, sysvars, and the `pc_wallet`. +#[derive(Accounts, Clone)] +pub struct MarketAccounts<'info> { + #[account(mut)] + market: AccountInfo<'info>, + #[account(mut)] + open_orders: AccountInfo<'info>, + #[account(mut)] + request_queue: AccountInfo<'info>, + #[account(mut)] + event_queue: AccountInfo<'info>, + #[account(mut)] + bids: AccountInfo<'info>, + #[account(mut)] + asks: AccountInfo<'info>, + // The `spl_token::Account` that funds will be taken from, i.e., transferred + // from the user into the market's vault. + // + // For bids, this is the base currency. For asks, the quote. + #[account(mut)] + order_payer_token_account: AccountInfo<'info>, + // Also known as the "base" currency. For a given A/B market, + // this is the vault for the A mint. + #[account(mut)] + coin_vault: AccountInfo<'info>, + // Also known as the "quote" currency. For a given A/B market, + // this is the vault for the B mint. + #[account(mut)] + pc_vault: AccountInfo<'info>, + // PDA owner of the DEX's token accounts for base + quote currencies. + vault_signer: AccountInfo<'info>, + // User wallets. + #[account(mut)] + coin_wallet: AccountInfo<'info>, +} + +// Client for sending orders to the Serum DEX. +struct OrderbookClient<'info> { + market: MarketAccounts<'info>, + authority: AccountInfo<'info>, + pc_wallet: AccountInfo<'info>, + dex_program: AccountInfo<'info>, + token_program: AccountInfo<'info>, + rent: AccountInfo<'info>, +} + +impl<'info> OrderbookClient<'info> { + // Executes the sell order portion of the swap, purchasing as much of the + // quote currency as possible for the given `base_amount`. + // + // `base_amount` is the "native" amount of the base currency, i.e., token + // amount including decimals. + fn sell(&self, base_amount: u64, referral: Option>) -> ProgramResult { + let limit_price = 1; + let max_coin_qty = { + // The loaded market must be dropped before CPI. + let market = MarketState::load(&self.market.market, &dex::ID)?; + coin_lots(&market, base_amount) + }; + let max_native_pc_qty = u64::MAX; + self.order_cpi( + limit_price, + max_coin_qty, + max_native_pc_qty, + Side::Ask, + referral, + ) + } + + // Executes the buy order portion of the swap, purchasing as much of the + // base currency as possible, for the given `quote_amount`. + // + // `quote_amount` is the "native" amount of the quote currency, i.e., token + // amount including decimals. + fn buy(&self, quote_amount: u64, referral: Option>) -> ProgramResult { + let limit_price = u64::MAX; + let max_coin_qty = u64::MAX; + let max_native_pc_qty = quote_amount; + self.order_cpi( + limit_price, + max_coin_qty, + max_native_pc_qty, + Side::Bid, + referral, + ) + } + + // Executes a new order on the serum dex via CPI. + // + // * `limit_price` - the limit order price in lot units. + // * `max_coin_qty`- the max number of the base currency lot units. + // * `max_native_pc_qty` - the max number of quote currency in native token + // units (includes decimals). + // * `side` - bid or ask, i.e. the type of order. + // * `referral` - referral account, earning a fee. + fn order_cpi( + &self, + limit_price: u64, + max_coin_qty: u64, + max_native_pc_qty: u64, + side: Side, + referral: Option>, + ) -> ProgramResult { + // Client order id is only used for cancels. Not used here so hardcode. + let client_order_id = 0; + // Limit is the dex's custom compute budge parameter, setting an upper + // bound on the number of matching cycles the program can perform + // before giving up and posting the remaining unmatched order. + let limit = 65535; + + let dex_accs = dex::NewOrderV3 { + market: self.market.market.clone(), + open_orders: self.market.open_orders.clone(), + request_queue: self.market.request_queue.clone(), + event_queue: self.market.event_queue.clone(), + market_bids: self.market.bids.clone(), + market_asks: self.market.asks.clone(), + order_payer_token_account: self.market.order_payer_token_account.clone(), + open_orders_authority: self.authority.clone(), + coin_vault: self.market.coin_vault.clone(), + pc_vault: self.market.pc_vault.clone(), + token_program: self.token_program.clone(), + rent: self.rent.clone(), + }; + let mut ctx = CpiContext::new(self.dex_program.clone(), dex_accs); + if let Some(referral) = referral { + ctx = ctx.with_remaining_accounts(vec![referral]); + } + dex::new_order_v3( + ctx, + side.into(), + NonZeroU64::new(limit_price).unwrap(), + NonZeroU64::new(max_coin_qty).unwrap(), + NonZeroU64::new(max_native_pc_qty).unwrap(), + SelfTradeBehavior::DecrementTake, + OrderType::ImmediateOrCancel, + client_order_id, + limit, + ) + } + + fn settle(&self, referral: Option>) -> ProgramResult { + let settle_accs = dex::SettleFunds { + market: self.market.market.clone(), + open_orders: self.market.open_orders.clone(), + open_orders_authority: self.authority.clone(), + coin_vault: self.market.coin_vault.clone(), + pc_vault: self.market.pc_vault.clone(), + coin_wallet: self.market.coin_wallet.clone(), + pc_wallet: self.pc_wallet.clone(), + vault_signer: self.market.vault_signer.clone(), + token_program: self.token_program.clone(), + }; + let mut ctx = CpiContext::new(self.dex_program.clone(), settle_accs); + if let Some(referral) = referral { + ctx = ctx.with_remaining_accounts(vec![referral]); + } + dex::settle_funds(ctx) + } +} + +// Utility functions + +/// Derive the pubkey of the PDA meant to be in control of the source liquidity token account +/// and reserve collateral destination account +pub fn derive_deposit_authority( + user: &AccountInfo, + reserve: &AccountInfo, + program_id: &Pubkey, + nonce: u8, +) -> Result { + Pubkey::create_program_address( + &[ + &user.key.to_bytes()[..32], // Signer + &reserve.key.to_bytes()[..32], // Solend reserve account + &[nonce], // Nonce - usually 0 + ], + program_id, + ) + .or(Err(ErrorCode::InvalidDerivedAuthority.into())) +} + +#[derive(Clone, AnchorSerialize, AnchorDeserialize)] +pub enum DcaSchedule { + Daily, + Weekly, + Biweekly, + Monthly, + Quarterly, +} + +// Returns the amount of lots for the base currency of a trade with `size`. +fn coin_lots(market: &MarketState, size: u64) -> u64 { + size.checked_div(market.coin_lot_size).unwrap() +} + +// Asserts the swap event is valid. +fn apply_risk_checks(event: DidSwap) -> Result<()> { + // Reject if the resulting amount is less than the client's expectation. + if event.to_amount < event.min_expected_swap_amount { + return Err(ErrorCode::SlippageExceeded.into()); + } + emit!(event); + Ok(()) +} + +#[derive(AnchorSerialize, AnchorDeserialize)] +pub enum Side { + Bid, + Ask, +} + +impl From for SerumSide { + fn from(side: Side) -> SerumSide { + match side { + Side::Bid => SerumSide::Bid, + Side::Ask => SerumSide::Ask, + } + } +} + +#[error] +pub enum ErrorCode { + #[msg("Template Error")] + InvalidSomething, + #[msg("Invalid authority derivation")] + InvalidDerivedAuthority, + #[msg("The tokens being swapped must have different mints")] + SwapTokensCannotMatch, + #[msg("Slippage tolerance exceeded")] + SlippageExceeded, +} + +// Event emitted when a swap occurs for two base currencies on two different +// markets (quoted in the same token). +#[event] +pub struct DidSwap { + // User given (max) amount to swap. + pub given_amount: u64, + // The minimum amount of the *to* token expected to be received from + // executing the swap. + pub min_expected_swap_amount: u64, + // Amount of the `from` token sold. + pub from_amount: u64, + // Amount of the `to` token purchased. + pub to_amount: u64, + // Amount of the quote currency accumulated from the swap. + pub spill_amount: u64, + // Mint sold. + pub from_mint: Pubkey, + // Mint purchased. + pub to_mint: Pubkey, + // Mint of the token used as the quote currency in the two markets used + // for swapping. + pub quote_mint: Pubkey, + // User that signed the transaction. + pub authority: Pubkey, +} + +pub mod fee_recipient { + solana_program::declare_id!("rohanrAYfWTd7DtNHVtoJFxdLYspwToEr55BqFdfkZd"); +} + +pub mod usdc_pubkey {} diff --git a/tests/monaco.js b/tests/monaco.js new file mode 100644 index 0000000..2bf730a --- /dev/null +++ b/tests/monaco.js @@ -0,0 +1,16 @@ +const anchor = require("@project-serum/anchor"); + +describe("monaco", () => { + // IDL + const idl = JSON.parse(require("fs").readFileSync("../target/idl/monaco.json", "utf8")); + + // DEVNET Address + const programId = new anchor.web3.PublicKey("DXxoamtnFQ2Qg8WeSoF5ezgEZ6fST9iQTbpxkuFAr7Ld"); + anchor.setProvider(anchor.Provider.env()); + const program = new anchor.Program(idl, programId); + + it("Is initialized!", async () => { + // console.log(program.); + await program.rpc.initialize(); + }); +}); diff --git a/tests/node_modules/.bin/JSONStream b/tests/node_modules/.bin/JSONStream new file mode 120000 index 0000000..3983a36 --- /dev/null +++ b/tests/node_modules/.bin/JSONStream @@ -0,0 +1 @@ +../JSONStream/bin.js \ No newline at end of file diff --git a/tests/node_modules/.bin/_mocha b/tests/node_modules/.bin/_mocha new file mode 120000 index 0000000..f2a54ff --- /dev/null +++ b/tests/node_modules/.bin/_mocha @@ -0,0 +1 @@ +../mocha/bin/_mocha \ No newline at end of file diff --git a/tests/node_modules/.bin/flat b/tests/node_modules/.bin/flat new file mode 120000 index 0000000..5fed16b --- /dev/null +++ b/tests/node_modules/.bin/flat @@ -0,0 +1 @@ +../flat/cli.js \ No newline at end of file diff --git a/tests/node_modules/.bin/he b/tests/node_modules/.bin/he new file mode 120000 index 0000000..2a8eb5e --- /dev/null +++ b/tests/node_modules/.bin/he @@ -0,0 +1 @@ +../he/bin/he \ No newline at end of file diff --git a/tests/node_modules/.bin/jayson b/tests/node_modules/.bin/jayson new file mode 120000 index 0000000..85d97f1 --- /dev/null +++ b/tests/node_modules/.bin/jayson @@ -0,0 +1 @@ +../jayson/bin/jayson.js \ No newline at end of file diff --git a/tests/node_modules/.bin/js-yaml b/tests/node_modules/.bin/js-yaml new file mode 120000 index 0000000..9dbd010 --- /dev/null +++ b/tests/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/tests/node_modules/.bin/mocha b/tests/node_modules/.bin/mocha new file mode 120000 index 0000000..43c668d --- /dev/null +++ b/tests/node_modules/.bin/mocha @@ -0,0 +1 @@ +../mocha/bin/mocha \ No newline at end of file diff --git a/tests/node_modules/.bin/nanoid b/tests/node_modules/.bin/nanoid new file mode 120000 index 0000000..e2be547 --- /dev/null +++ b/tests/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/tests/node_modules/.bin/node-gyp-build b/tests/node_modules/.bin/node-gyp-build new file mode 120000 index 0000000..671c6eb --- /dev/null +++ b/tests/node_modules/.bin/node-gyp-build @@ -0,0 +1 @@ +../node-gyp-build/bin.js \ No newline at end of file diff --git a/tests/node_modules/.bin/node-gyp-build-optional b/tests/node_modules/.bin/node-gyp-build-optional new file mode 120000 index 0000000..46d347e --- /dev/null +++ b/tests/node_modules/.bin/node-gyp-build-optional @@ -0,0 +1 @@ +../node-gyp-build/optional.js \ No newline at end of file diff --git a/tests/node_modules/.bin/node-gyp-build-test b/tests/node_modules/.bin/node-gyp-build-test new file mode 120000 index 0000000..d11de1b --- /dev/null +++ b/tests/node_modules/.bin/node-gyp-build-test @@ -0,0 +1 @@ +../node-gyp-build/build-test.js \ No newline at end of file diff --git a/tests/node_modules/.bin/node-which b/tests/node_modules/.bin/node-which new file mode 120000 index 0000000..6f8415e --- /dev/null +++ b/tests/node_modules/.bin/node-which @@ -0,0 +1 @@ +../which/bin/node-which \ No newline at end of file diff --git a/tests/node_modules/.bin/uuid b/tests/node_modules/.bin/uuid new file mode 120000 index 0000000..b3e45bc --- /dev/null +++ b/tests/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/tests/node_modules/.package-lock.json b/tests/node_modules/.package-lock.json new file mode 100644 index 0000000..f0ee7c6 --- /dev/null +++ b/tests/node_modules/.package-lock.json @@ -0,0 +1,1636 @@ +{ + "name": "tests", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@project-serum/anchor": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.13.2.tgz", + "integrity": "sha512-xfjzHBy8ZvJuK1EYAba7+CT6TmJ+UWXmGGm915J0IFJTwGwYT4+bDa/qZF7EnZ6trYxg7owEOMLfvF7Jp+WC0w==", + "dependencies": { + "@project-serum/borsh": "^0.2.2", + "@solana/web3.js": "^1.17.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.0", + "camelcase": "^5.3.1", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "find": "^0.3.0", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@project-serum/borsh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@project-serum/borsh/-/borsh-0.2.2.tgz", + "integrity": "sha512-Ms+aWmGVW6bWd3b0+MWwoaYig2QD0F90h0uhr7AzY3dpCb5e2S6RsRW02vFTfa085pY2VLB7nTZNbFECQ1liTg==", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.2.0" + } + }, + "node_modules/@solana/buffer-layout": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz", + "integrity": "sha512-MVdgAKKL39tEs0l8je0hKaXLQFb7Rdfb0Xg2LjFZd8Lfdazkg6xiS98uAZrEKvaoF3i4M95ei9RydkGIDMeo3w==", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/buffer-layout/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/@solana/web3.js": { + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.24.1.tgz", + "integrity": "sha512-XImMWAvjcXteMQwe1FFjoe6u72xmcu+UYobPIxLEMX29XXWVTalyYRKBXvcOXwz6DliTYnFXmncNEwUDEFFHGg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "@solana/buffer-layout": "^3.0.0", + "bn.js": "^5.0.0", + "borsh": "^0.4.0", + "bs58": "^4.0.1", + "buffer": "6.0.1", + "crypto-hash": "^1.2.2", + "jayson": "^3.4.4", + "js-sha3": "^0.8.0", + "node-fetch": "^2.6.1", + "rpc-websockets": "^7.4.2", + "secp256k1": "^4.0.2", + "superstruct": "^0.14.2", + "tweetnacl": "^1.0.0" + } + }, + "node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.24", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz", + "integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/lodash": { + "version": "4.14.172", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", + "integrity": "sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==" + }, + "node_modules/@types/node": { + "version": "16.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.4.tgz", + "integrity": "sha512-25QXpDsTiDnl2rZGUenagVMwO46way8dOUdvoC3R3p+6TrbpxeJBo/v87BEG1IHI31Jhaa8lPeSHcqwxsVBeYQ==" + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "node_modules/borsh": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.4.0.tgz", + "integrity": "sha512-aX6qtLya3K0AkT66CmYWCCDr77qsE9arV05OmdFpmat9qu8Pg9J5tBUPDztAW5fNh/d/MyVG/OYziP52Ndzx1g==", + "dependencies": { + "@types/bn.js": "^4.11.5", + "bn.js": "^5.0.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.1.tgz", + "integrity": "sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ==", + "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/buffer-layout": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", + "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.2.0" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/circular-json": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz", + "integrity": "sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ==", + "deprecated": "CircularJSON is in maintenance only, flatted is its successor." + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "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", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", + "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/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/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz", + "integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==", + "dependencies": { + "traverse-chain": "~0.1.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.6.4.tgz", + "integrity": "sha512-GH63DsRFFlodS8krFgAhxwYvQFmSwjsFxKnPrHQtp+BJj/tpeSj3hyBGGqmTkuq043U1Gn6u8VdsVRFZX1EEiQ==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/express-serve-static-core": "^4.17.9", + "@types/lodash": "^4.14.159", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "lodash": "^4.17.20", + "uuid": "^3.4.0", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.21.tgz", + "integrity": "sha512-Qk7rOvV2A4vNgXNS88vEvbJE1NDFPCQ8AU+pNElrU2bA4yrRDef3fg3SUe+xkwyin3Bpg/Xh5JkNWTlsOcS2tA==" + }, + "node_modules/js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, + "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/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA==", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.2", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.7", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.23", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.5", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/nanoid": { + "version": "3.1.23", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", + "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rpc-websockets": { + "version": "7.4.14", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.4.14.tgz", + "integrity": "sha512-x/2Rwzla6bXAyE8A21yx3sHjn49JUlgBUYfnKurNeqrZQgFxfD43Udo5NkTWQp+TASrssTlks8ipcJfvswgv5g==", + "dependencies": { + "@babel/runtime": "^7.11.2", + "bufferutil": "^4.0.1", + "circular-json": "^0.5.9", + "eventemitter3": "^4.0.7", + "utf-8-validate": "^5.0.2", + "uuid": "^8.3.0", + "ws": "^7.4.5" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superstruct": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", + "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" + }, + "node_modules/traverse-chain": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", + "integrity": "sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE=" + }, + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "node_modules/utf-8-validate": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", + "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.2.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/workerpool": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", + "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/ws": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz", + "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/tests/node_modules/@babel/runtime/LICENSE b/tests/node_modules/@babel/runtime/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/tests/node_modules/@babel/runtime/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/@babel/runtime/README.md b/tests/node_modules/@babel/runtime/README.md new file mode 100644 index 0000000..119c99d --- /dev/null +++ b/tests/node_modules/@babel/runtime/README.md @@ -0,0 +1,19 @@ +# @babel/runtime + +> babel's modular runtime helpers + +See our website [@babel/runtime](https://babeljs.io/docs/en/babel-runtime) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/runtime +``` + +or using yarn: + +```sh +yarn add @babel/runtime +``` diff --git a/tests/node_modules/@babel/runtime/helpers/AsyncGenerator.js b/tests/node_modules/@babel/runtime/helpers/AsyncGenerator.js new file mode 100644 index 0000000..cdca7f5 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/AsyncGenerator.js @@ -0,0 +1,99 @@ +var AwaitValue = require("./AwaitValue.js"); + +function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + var wrappedAwait = value instanceof AwaitValue; + Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { + if (wrappedAwait) { + resume(key === "return" ? "return" : "next", arg); + return; + } + + settle(result.done ? "return" : "normal", arg); + }, function (err) { + resume("throw", err); + }); + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); + } else { + back = null; + } + } + + this._invoke = send; + + if (typeof gen["return"] !== "function") { + this["return"] = undefined; + } +} + +AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () { + return this; +}; + +AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); +}; + +AsyncGenerator.prototype["throw"] = function (arg) { + return this._invoke("throw", arg); +}; + +AsyncGenerator.prototype["return"] = function (arg) { + return this._invoke("return", arg); +}; + +module.exports = AsyncGenerator; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/AwaitValue.js b/tests/node_modules/@babel/runtime/helpers/AwaitValue.js new file mode 100644 index 0000000..d36df6e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/AwaitValue.js @@ -0,0 +1,6 @@ +function _AwaitValue(value) { + this.wrapped = value; +} + +module.exports = _AwaitValue; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js b/tests/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js new file mode 100644 index 0000000..feaeab8 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js @@ -0,0 +1,31 @@ +function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object.keys(descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object.defineProperty(target, property, desc); + desc = null; + } + + return desc; +} + +module.exports = _applyDecoratedDescriptor; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/arrayLikeToArray.js b/tests/node_modules/@babel/runtime/helpers/arrayLikeToArray.js new file mode 100644 index 0000000..a459c8e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/arrayLikeToArray.js @@ -0,0 +1,12 @@ +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} + +module.exports = _arrayLikeToArray; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/arrayWithHoles.js b/tests/node_modules/@babel/runtime/helpers/arrayWithHoles.js new file mode 100644 index 0000000..9a36e2a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/arrayWithHoles.js @@ -0,0 +1,6 @@ +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +module.exports = _arrayWithHoles; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js b/tests/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js new file mode 100644 index 0000000..aac913f --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js @@ -0,0 +1,8 @@ +var arrayLikeToArray = require("./arrayLikeToArray.js"); + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} + +module.exports = _arrayWithoutHoles; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/assertThisInitialized.js b/tests/node_modules/@babel/runtime/helpers/assertThisInitialized.js new file mode 100644 index 0000000..352e1e6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/assertThisInitialized.js @@ -0,0 +1,10 @@ +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +module.exports = _assertThisInitialized; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js b/tests/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js new file mode 100644 index 0000000..91f6d61 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js @@ -0,0 +1,57 @@ +function _asyncGeneratorDelegate(inner, awaitWrap) { + var iter = {}, + waiting = false; + + function pump(key, value) { + waiting = true; + value = new Promise(function (resolve) { + resolve(inner[key](value)); + }); + return { + done: false, + value: awaitWrap(value) + }; + } + + ; + + iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () { + return this; + }; + + iter.next = function (value) { + if (waiting) { + waiting = false; + return value; + } + + return pump("next", value); + }; + + if (typeof inner["throw"] === "function") { + iter["throw"] = function (value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + + if (typeof inner["return"] === "function") { + iter["return"] = function (value) { + if (waiting) { + waiting = false; + return value; + } + + return pump("return", value); + }; + } + + return iter; +} + +module.exports = _asyncGeneratorDelegate; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/asyncIterator.js b/tests/node_modules/@babel/runtime/helpers/asyncIterator.js new file mode 100644 index 0000000..d59aa99 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/asyncIterator.js @@ -0,0 +1,16 @@ +function _asyncIterator(iterable) { + var method; + + if (typeof Symbol !== "undefined") { + if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator]; + if (method == null && Symbol.iterator) method = iterable[Symbol.iterator]; + } + + if (method == null) method = iterable["@@asyncIterator"]; + if (method == null) method = iterable["@@iterator"]; + if (method == null) throw new TypeError("Object is not async iterable"); + return method.call(iterable); +} + +module.exports = _asyncIterator; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/asyncToGenerator.js b/tests/node_modules/@babel/runtime/helpers/asyncToGenerator.js new file mode 100644 index 0000000..ec5daa8 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/asyncToGenerator.js @@ -0,0 +1,38 @@ +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +module.exports = _asyncToGenerator; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js b/tests/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js new file mode 100644 index 0000000..c338fee --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js @@ -0,0 +1,8 @@ +var AwaitValue = require("./AwaitValue.js"); + +function _awaitAsyncGenerator(value) { + return new AwaitValue(value); +} + +module.exports = _awaitAsyncGenerator; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js b/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js new file mode 100644 index 0000000..521c1e0 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js @@ -0,0 +1,23 @@ +function _classApplyDescriptorDestructureSet(receiver, descriptor) { + if (descriptor.set) { + if (!("__destrObj" in descriptor)) { + descriptor.__destrObj = { + set value(v) { + descriptor.set.call(receiver, v); + } + + }; + } + + return descriptor.__destrObj; + } else { + if (!descriptor.writable) { + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} + +module.exports = _classApplyDescriptorDestructureSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js b/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js new file mode 100644 index 0000000..f750596 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js @@ -0,0 +1,10 @@ +function _classApplyDescriptorGet(receiver, descriptor) { + if (descriptor.get) { + return descriptor.get.call(receiver); + } + + return descriptor.value; +} + +module.exports = _classApplyDescriptorGet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js b/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js new file mode 100644 index 0000000..997b264 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js @@ -0,0 +1,14 @@ +function _classApplyDescriptorSet(receiver, descriptor, value) { + if (descriptor.set) { + descriptor.set.call(receiver, value); + } else { + if (!descriptor.writable) { + throw new TypeError("attempted to set read only private field"); + } + + descriptor.value = value; + } +} + +module.exports = _classApplyDescriptorSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classCallCheck.js b/tests/node_modules/@babel/runtime/helpers/classCallCheck.js new file mode 100644 index 0000000..026da41 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classCallCheck.js @@ -0,0 +1,8 @@ +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +module.exports = _classCallCheck; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js b/tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js new file mode 100644 index 0000000..67373aa --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js @@ -0,0 +1,8 @@ +function _classCheckPrivateStaticAccess(receiver, classConstructor) { + if (receiver !== classConstructor) { + throw new TypeError("Private static access of wrong provenance"); + } +} + +module.exports = _classCheckPrivateStaticAccess; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js b/tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js new file mode 100644 index 0000000..3b93472 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js @@ -0,0 +1,8 @@ +function _classCheckPrivateStaticFieldDescriptor(descriptor, action) { + if (descriptor === undefined) { + throw new TypeError("attempted to " + action + " private static field before its declaration"); + } +} + +module.exports = _classCheckPrivateStaticFieldDescriptor; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js b/tests/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js new file mode 100644 index 0000000..aaaac8c --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js @@ -0,0 +1,10 @@ +function _classExtractFieldDescriptor(receiver, privateMap, action) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to " + action + " private field on non-instance"); + } + + return privateMap.get(receiver); +} + +module.exports = _classExtractFieldDescriptor; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classNameTDZError.js b/tests/node_modules/@babel/runtime/helpers/classNameTDZError.js new file mode 100644 index 0000000..bf740fa --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classNameTDZError.js @@ -0,0 +1,6 @@ +function _classNameTDZError(name) { + throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); +} + +module.exports = _classNameTDZError; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js new file mode 100644 index 0000000..50b9fb0 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js @@ -0,0 +1,11 @@ +var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js"); + +var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js"); + +function _classPrivateFieldDestructureSet(receiver, privateMap) { + var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set"); + return classApplyDescriptorDestructureSet(receiver, descriptor); +} + +module.exports = _classPrivateFieldDestructureSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js new file mode 100644 index 0000000..df55969 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js @@ -0,0 +1,11 @@ +var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); + +var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js"); + +function _classPrivateFieldGet(receiver, privateMap) { + var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get"); + return classApplyDescriptorGet(receiver, descriptor); +} + +module.exports = _classPrivateFieldGet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js new file mode 100644 index 0000000..3acdb7b --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js @@ -0,0 +1,10 @@ +function _classPrivateFieldBase(receiver, privateKey) { + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { + throw new TypeError("attempted to use private field on non-instance"); + } + + return receiver; +} + +module.exports = _classPrivateFieldBase; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js new file mode 100644 index 0000000..3c0c552 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js @@ -0,0 +1,8 @@ +var id = 0; + +function _classPrivateFieldKey(name) { + return "__private_" + id++ + "_" + name; +} + +module.exports = _classPrivateFieldKey; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js new file mode 100644 index 0000000..d4a59b0 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js @@ -0,0 +1,12 @@ +var classApplyDescriptorSet = require("./classApplyDescriptorSet.js"); + +var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js"); + +function _classPrivateFieldSet(receiver, privateMap, value) { + var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set"); + classApplyDescriptorSet(receiver, descriptor, value); + return value; +} + +module.exports = _classPrivateFieldSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js b/tests/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js new file mode 100644 index 0000000..d2f8ab1 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js @@ -0,0 +1,10 @@ +function _classPrivateMethodGet(receiver, privateSet, fn) { + if (!privateSet.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + + return fn; +} + +module.exports = _classPrivateMethodGet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js b/tests/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js new file mode 100644 index 0000000..f500d16 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js @@ -0,0 +1,6 @@ +function _classPrivateMethodSet() { + throw new TypeError("attempted to reassign private method"); +} + +module.exports = _classPrivateMethodSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js new file mode 100644 index 0000000..57e2c7f --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js @@ -0,0 +1,14 @@ +var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js"); + +var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js"); + +var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); + +function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) { + classCheckPrivateStaticAccess(receiver, classConstructor); + classCheckPrivateStaticFieldDescriptor(descriptor, "set"); + return classApplyDescriptorDestructureSet(receiver, descriptor); +} + +module.exports = _classStaticPrivateFieldDestructureSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js new file mode 100644 index 0000000..136c1f6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js @@ -0,0 +1,14 @@ +var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); + +var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js"); + +var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); + +function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { + classCheckPrivateStaticAccess(receiver, classConstructor); + classCheckPrivateStaticFieldDescriptor(descriptor, "get"); + return classApplyDescriptorGet(receiver, descriptor); +} + +module.exports = _classStaticPrivateFieldSpecGet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js new file mode 100644 index 0000000..e6ecfa4 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js @@ -0,0 +1,15 @@ +var classApplyDescriptorSet = require("./classApplyDescriptorSet.js"); + +var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js"); + +var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); + +function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { + classCheckPrivateStaticAccess(receiver, classConstructor); + classCheckPrivateStaticFieldDescriptor(descriptor, "set"); + classApplyDescriptorSet(receiver, descriptor, value); + return value; +} + +module.exports = _classStaticPrivateFieldSpecSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js new file mode 100644 index 0000000..5bc41fc --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js @@ -0,0 +1,9 @@ +var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js"); + +function _classStaticPrivateMethodGet(receiver, classConstructor, method) { + classCheckPrivateStaticAccess(receiver, classConstructor); + return method; +} + +module.exports = _classStaticPrivateMethodGet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js new file mode 100644 index 0000000..06cfcc1 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js @@ -0,0 +1,6 @@ +function _classStaticPrivateMethodSet() { + throw new TypeError("attempted to set read only static private field"); +} + +module.exports = _classStaticPrivateMethodSet; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/construct.js b/tests/node_modules/@babel/runtime/helpers/construct.js new file mode 100644 index 0000000..108b39a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/construct.js @@ -0,0 +1,26 @@ +var setPrototypeOf = require("./setPrototypeOf.js"); + +var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); + +function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + module.exports = _construct = Reflect.construct; + module.exports["default"] = module.exports, module.exports.__esModule = true; + } else { + module.exports = _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) setPrototypeOf(instance, Class.prototype); + return instance; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + } + + return _construct.apply(null, arguments); +} + +module.exports = _construct; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/createClass.js b/tests/node_modules/@babel/runtime/helpers/createClass.js new file mode 100644 index 0000000..293bd61 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/createClass.js @@ -0,0 +1,18 @@ +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +module.exports = _createClass; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js b/tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js new file mode 100644 index 0000000..9098865 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js @@ -0,0 +1,61 @@ +var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); + +function _createForOfIteratorHelper(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + + if (!it) { + if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + + var F = function F() {}; + + return { + s: F, + n: function n() { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function e(_e) { + throw _e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var normalCompletion = true, + didErr = false, + err; + return { + s: function s() { + it = it.call(o); + }, + n: function n() { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function e(_e2) { + didErr = true; + err = _e2; + }, + f: function f() { + try { + if (!normalCompletion && it["return"] != null) it["return"](); + } finally { + if (didErr) throw err; + } + } + }; +} + +module.exports = _createForOfIteratorHelper; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js b/tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js new file mode 100644 index 0000000..2dedbc9 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js @@ -0,0 +1,25 @@ +var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); + +function _createForOfIteratorHelperLoose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + if (it) return (it = it.call(o)).next.bind(it); + + if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + return function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _createForOfIteratorHelperLoose; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/createSuper.js b/tests/node_modules/@babel/runtime/helpers/createSuper.js new file mode 100644 index 0000000..0acdd51 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/createSuper.js @@ -0,0 +1,25 @@ +var getPrototypeOf = require("./getPrototypeOf.js"); + +var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); + +var possibleConstructorReturn = require("./possibleConstructorReturn.js"); + +function _createSuper(Derived) { + var hasNativeReflectConstruct = isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = getPrototypeOf(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return possibleConstructorReturn(this, result); + }; +} + +module.exports = _createSuper; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/decorate.js b/tests/node_modules/@babel/runtime/helpers/decorate.js new file mode 100644 index 0000000..80d1751 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/decorate.js @@ -0,0 +1,401 @@ +var toArray = require("./toArray.js"); + +var toPropertyKey = require("./toPropertyKey.js"); + +function _decorate(decorators, factory, superClass, mixins) { + var api = _getDecoratorsApi(); + + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + api = mixins[i](api); + } + } + + var r = factory(function initialize(O) { + api.initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); + api.initializeClassElements(r.F, decorated.elements); + return api.runClassFinishers(r.F, decorated.finishers); +} + +function _getDecoratorsApi() { + _getDecoratorsApi = function _getDecoratorsApi() { + return api; + }; + + var api = { + elementsDefinitionOrder: [["method"], ["field"]], + initializeInstanceElements: function initializeInstanceElements(O, elements) { + ["method", "field"].forEach(function (kind) { + elements.forEach(function (element) { + if (element.kind === kind && element.placement === "own") { + this.defineClassElement(O, element); + } + }, this); + }, this); + }, + initializeClassElements: function initializeClassElements(F, elements) { + var proto = F.prototype; + ["method", "field"].forEach(function (kind) { + elements.forEach(function (element) { + var placement = element.placement; + + if (element.kind === kind && (placement === "static" || placement === "prototype")) { + var receiver = placement === "static" ? F : proto; + this.defineClassElement(receiver, element); + } + }, this); + }, this); + }, + defineClassElement: function defineClassElement(receiver, element) { + var descriptor = element.descriptor; + + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { + enumerable: descriptor.enumerable, + writable: descriptor.writable, + configurable: descriptor.configurable, + value: initializer === void 0 ? void 0 : initializer.call(receiver) + }; + } + + Object.defineProperty(receiver, element.key, descriptor); + }, + decorateClass: function decorateClass(elements, decorators) { + var newElements = []; + var finishers = []; + var placements = { + "static": [], + prototype: [], + own: [] + }; + elements.forEach(function (element) { + this.addElementPlacement(element, placements); + }, this); + elements.forEach(function (element) { + if (!_hasDecorators(element)) return newElements.push(element); + var elementFinishersExtras = this.decorateElement(element, placements); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }, this); + + if (!decorators) { + return { + elements: newElements, + finishers: finishers + }; + } + + var result = this.decorateConstructor(newElements, decorators); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + return result; + }, + addElementPlacement: function addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); + }, + decorateElement: function decorateElement(element, placements) { + var extras = []; + var finishers = []; + + for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + var elementObject = this.fromElementDescriptor(element); + var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); + element = elementFinisherExtras.element; + this.addElementPlacement(element, placements); + + if (elementFinisherExtras.finisher) { + finishers.push(elementFinisherExtras.finisher); + } + + var newExtras = elementFinisherExtras.extras; + + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) { + this.addElementPlacement(newExtras[j], placements); + } + + extras.push.apply(extras, newExtras); + } + } + + return { + element: element, + finishers: finishers, + extras: extras + }; + }, + decorateConstructor: function decorateConstructor(elements, decorators) { + var finishers = []; + + for (var i = decorators.length - 1; i >= 0; i--) { + var obj = this.fromClassDescriptor(elements); + var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj); + + if (elementsAndFinisher.finisher !== undefined) { + finishers.push(elementsAndFinisher.finisher); + } + + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { + throw new TypeError("Duplicated element (" + elements[j].key + ")"); + } + } + } + } + } + + return { + elements: elements, + finishers: finishers + }; + }, + fromElementDescriptor: function fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; + }, + toElementDescriptors: function toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return toArray(elementObjects).map(function (elementObject) { + var element = this.toElementDescriptor(elementObject); + this.disallowProperty(elementObject, "finisher", "An element descriptor"); + this.disallowProperty(elementObject, "extras", "An element descriptor"); + return element; + }, this); + }, + toElementDescriptor: function toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = toPropertyKey(elementObject.key); + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + this.disallowProperty(elementObject, "elements", "An element descriptor"); + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + this.disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + element.initializer = elementObject.initializer; + } + + return element; + }, + toElementFinisherExtras: function toElementFinisherExtras(elementObject) { + var element = this.toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = this.toElementDescriptors(elementObject.extras); + return { + element: element, + finisher: finisher, + extras: extras + }; + }, + fromClassDescriptor: function fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(this.fromElementDescriptor, this) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; + }, + toClassDescriptor: function toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + this.disallowProperty(obj, "key", "A class descriptor"); + this.disallowProperty(obj, "placement", "A class descriptor"); + this.disallowProperty(obj, "descriptor", "A class descriptor"); + this.disallowProperty(obj, "initializer", "A class descriptor"); + this.disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = this.toElementDescriptors(obj.elements); + return { + elements: elements, + finisher: finisher + }; + }, + runClassFinishers: function runClassFinishers(constructor, finishers) { + for (var i = 0; i < finishers.length; i++) { + var newConstructor = (0, finishers[i])(constructor); + + if (newConstructor !== undefined) { + if (typeof newConstructor !== "function") { + throw new TypeError("Finishers must return a constructor."); + } + + constructor = newConstructor; + } + } + + return constructor; + }, + disallowProperty: function disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } + } + }; + return api; +} + +function _createElementDescriptor(def) { + var key = toPropertyKey(def.key); + var descriptor; + + if (def.kind === "method") { + descriptor = { + value: def.value, + writable: true, + configurable: true, + enumerable: false + }; + } else if (def.kind === "get") { + descriptor = { + get: def.value, + configurable: true, + enumerable: false + }; + } else if (def.kind === "set") { + descriptor = { + set: def.value, + configurable: true, + enumerable: false + }; + } else if (def.kind === "field") { + descriptor = { + configurable: true, + writable: true, + enumerable: true + }; + } + + var element = { + kind: def.kind === "field" ? "field" : "method", + key: key, + placement: def["static"] ? "static" : def.kind === "field" ? "own" : "prototype", + descriptor: descriptor + }; + if (def.decorators) element.decorators = def.decorators; + if (def.kind === "field") element.initializer = def.value; + return element; +} + +function _coalesceGetterSetter(element, other) { + if (element.descriptor.get !== undefined) { + other.descriptor.get = element.descriptor.get; + } else { + other.descriptor.set = element.descriptor.set; + } +} + +function _coalesceClassElements(elements) { + var newElements = []; + + var isSameElement = function isSameElement(other) { + return other.kind === "method" && other.key === element.key && other.placement === element.placement; + }; + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var other; + + if (element.kind === "method" && (other = newElements.find(isSameElement))) { + if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); + } + + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ")."); + } + + other.decorators = element.decorators; + } + + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; +} + +function _hasDecorators(element) { + return element.decorators && element.decorators.length; +} + +function _isDataDescriptor(desc) { + return desc !== undefined && !(desc.value === undefined && desc.writable === undefined); +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} + +module.exports = _decorate; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/defaults.js b/tests/node_modules/@babel/runtime/helpers/defaults.js new file mode 100644 index 0000000..576c5a4 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/defaults.js @@ -0,0 +1,17 @@ +function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) { + Object.defineProperty(obj, key, value); + } + } + + return obj; +} + +module.exports = _defaults; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js b/tests/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js new file mode 100644 index 0000000..4fe90c3 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js @@ -0,0 +1,25 @@ +function _defineEnumerableProperties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, key, desc); + } + + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + + return obj; +} + +module.exports = _defineEnumerableProperties; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/defineProperty.js b/tests/node_modules/@babel/runtime/helpers/defineProperty.js new file mode 100644 index 0000000..1cd65ac --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/defineProperty.js @@ -0,0 +1,17 @@ +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +module.exports = _defineProperty; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js b/tests/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js new file mode 100644 index 0000000..919aab8 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js @@ -0,0 +1,95 @@ +import AwaitValue from "./AwaitValue.js"; +export default function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + var wrappedAwait = value instanceof AwaitValue; + Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { + if (wrappedAwait) { + resume(key === "return" ? "return" : "next", arg); + return; + } + + settle(result.done ? "return" : "normal", arg); + }, function (err) { + resume("throw", err); + }); + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); + } else { + back = null; + } + } + + this._invoke = send; + + if (typeof gen["return"] !== "function") { + this["return"] = undefined; + } +} + +AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () { + return this; +}; + +AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); +}; + +AsyncGenerator.prototype["throw"] = function (arg) { + return this._invoke("throw", arg); +}; + +AsyncGenerator.prototype["return"] = function (arg) { + return this._invoke("return", arg); +}; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/AwaitValue.js b/tests/node_modules/@babel/runtime/helpers/esm/AwaitValue.js new file mode 100644 index 0000000..5237e18 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/AwaitValue.js @@ -0,0 +1,3 @@ +export default function _AwaitValue(value) { + this.wrapped = value; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js b/tests/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js new file mode 100644 index 0000000..84b5961 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js @@ -0,0 +1,28 @@ +export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object.keys(descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object.defineProperty(target, property, desc); + desc = null; + } + + return desc; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js b/tests/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js new file mode 100644 index 0000000..edbeb8e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js @@ -0,0 +1,9 @@ +export default function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js b/tests/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js new file mode 100644 index 0000000..be734fc --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js @@ -0,0 +1,3 @@ +export default function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js b/tests/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js new file mode 100644 index 0000000..f7d8dc7 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js @@ -0,0 +1,4 @@ +import arrayLikeToArray from "./arrayLikeToArray.js"; +export default function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js b/tests/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js new file mode 100644 index 0000000..bbf849c --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js @@ -0,0 +1,7 @@ +export default function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js b/tests/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js new file mode 100644 index 0000000..a7ccd67 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js @@ -0,0 +1,54 @@ +export default function _asyncGeneratorDelegate(inner, awaitWrap) { + var iter = {}, + waiting = false; + + function pump(key, value) { + waiting = true; + value = new Promise(function (resolve) { + resolve(inner[key](value)); + }); + return { + done: false, + value: awaitWrap(value) + }; + } + + ; + + iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () { + return this; + }; + + iter.next = function (value) { + if (waiting) { + waiting = false; + return value; + } + + return pump("next", value); + }; + + if (typeof inner["throw"] === "function") { + iter["throw"] = function (value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + + if (typeof inner["return"] === "function") { + iter["return"] = function (value) { + if (waiting) { + waiting = false; + return value; + } + + return pump("return", value); + }; + } + + return iter; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/asyncIterator.js b/tests/node_modules/@babel/runtime/helpers/esm/asyncIterator.js new file mode 100644 index 0000000..91ddb42 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/asyncIterator.js @@ -0,0 +1,13 @@ +export default function _asyncIterator(iterable) { + var method; + + if (typeof Symbol !== "undefined") { + if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator]; + if (method == null && Symbol.iterator) method = iterable[Symbol.iterator]; + } + + if (method == null) method = iterable["@@asyncIterator"]; + if (method == null) method = iterable["@@iterator"]; + if (method == null) throw new TypeError("Object is not async iterable"); + return method.call(iterable); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js b/tests/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js new file mode 100644 index 0000000..2a25f54 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js @@ -0,0 +1,35 @@ +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +export default function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js b/tests/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js new file mode 100644 index 0000000..ccca65e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js @@ -0,0 +1,4 @@ +import AwaitValue from "./AwaitValue.js"; +export default function _awaitAsyncGenerator(value) { + return new AwaitValue(value); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js new file mode 100644 index 0000000..4472adc --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js @@ -0,0 +1,20 @@ +export default function _classApplyDescriptorDestructureSet(receiver, descriptor) { + if (descriptor.set) { + if (!("__destrObj" in descriptor)) { + descriptor.__destrObj = { + set value(v) { + descriptor.set.call(receiver, v); + } + + }; + } + + return descriptor.__destrObj; + } else { + if (!descriptor.writable) { + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js b/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js new file mode 100644 index 0000000..0fad169 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js @@ -0,0 +1,7 @@ +export default function _classApplyDescriptorGet(receiver, descriptor) { + if (descriptor.get) { + return descriptor.get.call(receiver); + } + + return descriptor.value; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js new file mode 100644 index 0000000..f295f3e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js @@ -0,0 +1,11 @@ +export default function _classApplyDescriptorSet(receiver, descriptor, value) { + if (descriptor.set) { + descriptor.set.call(receiver, value); + } else { + if (!descriptor.writable) { + throw new TypeError("attempted to set read only private field"); + } + + descriptor.value = value; + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classCallCheck.js b/tests/node_modules/@babel/runtime/helpers/esm/classCallCheck.js new file mode 100644 index 0000000..2f1738a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classCallCheck.js @@ -0,0 +1,5 @@ +export default function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js b/tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js new file mode 100644 index 0000000..098ed30 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js @@ -0,0 +1,5 @@ +export default function _classCheckPrivateStaticAccess(receiver, classConstructor) { + if (receiver !== classConstructor) { + throw new TypeError("Private static access of wrong provenance"); + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js b/tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js new file mode 100644 index 0000000..0ef34b8 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js @@ -0,0 +1,5 @@ +export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) { + if (descriptor === undefined) { + throw new TypeError("attempted to " + action + " private static field before its declaration"); + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js b/tests/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js new file mode 100644 index 0000000..8dabe9a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js @@ -0,0 +1,7 @@ +export default function _classExtractFieldDescriptor(receiver, privateMap, action) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to " + action + " private field on non-instance"); + } + + return privateMap.get(receiver); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js b/tests/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js new file mode 100644 index 0000000..f7b6dd5 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js @@ -0,0 +1,3 @@ +export default function _classNameTDZError(name) { + throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js new file mode 100644 index 0000000..fb58833 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js @@ -0,0 +1,6 @@ +import classApplyDescriptorDestructureSet from "./classApplyDescriptorDestructureSet.js"; +import classExtractFieldDescriptor from "./classExtractFieldDescriptor.js"; +export default function _classPrivateFieldDestructureSet(receiver, privateMap) { + var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set"); + return classApplyDescriptorDestructureSet(receiver, descriptor); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js new file mode 100644 index 0000000..53cd137 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js @@ -0,0 +1,6 @@ +import classApplyDescriptorGet from "./classApplyDescriptorGet.js"; +import classExtractFieldDescriptor from "./classExtractFieldDescriptor.js"; +export default function _classPrivateFieldGet(receiver, privateMap) { + var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get"); + return classApplyDescriptorGet(receiver, descriptor); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js new file mode 100644 index 0000000..5b10916 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js @@ -0,0 +1,7 @@ +export default function _classPrivateFieldBase(receiver, privateKey) { + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { + throw new TypeError("attempted to use private field on non-instance"); + } + + return receiver; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js new file mode 100644 index 0000000..5b7e5ac --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js @@ -0,0 +1,4 @@ +var id = 0; +export default function _classPrivateFieldKey(name) { + return "__private_" + id++ + "_" + name; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js new file mode 100644 index 0000000..ad91be4 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js @@ -0,0 +1,7 @@ +import classApplyDescriptorSet from "./classApplyDescriptorSet.js"; +import classExtractFieldDescriptor from "./classExtractFieldDescriptor.js"; +export default function _classPrivateFieldSet(receiver, privateMap, value) { + var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set"); + classApplyDescriptorSet(receiver, descriptor, value); + return value; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js new file mode 100644 index 0000000..38b9d58 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js @@ -0,0 +1,7 @@ +export default function _classPrivateMethodGet(receiver, privateSet, fn) { + if (!privateSet.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + + return fn; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js new file mode 100644 index 0000000..2bbaf3a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js @@ -0,0 +1,3 @@ +export default function _classPrivateMethodSet() { + throw new TypeError("attempted to reassign private method"); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js new file mode 100644 index 0000000..77afcfb --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js @@ -0,0 +1,8 @@ +import classApplyDescriptorDestructureSet from "./classApplyDescriptorDestructureSet.js"; +import classCheckPrivateStaticAccess from "./classCheckPrivateStaticAccess.js"; +import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; +export default function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) { + classCheckPrivateStaticAccess(receiver, classConstructor); + classCheckPrivateStaticFieldDescriptor(descriptor, "set"); + return classApplyDescriptorDestructureSet(receiver, descriptor); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js new file mode 100644 index 0000000..d253d31 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js @@ -0,0 +1,8 @@ +import classApplyDescriptorGet from "./classApplyDescriptorGet.js"; +import classCheckPrivateStaticAccess from "./classCheckPrivateStaticAccess.js"; +import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; +export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { + classCheckPrivateStaticAccess(receiver, classConstructor); + classCheckPrivateStaticFieldDescriptor(descriptor, "get"); + return classApplyDescriptorGet(receiver, descriptor); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js new file mode 100644 index 0000000..b0b0cc6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js @@ -0,0 +1,9 @@ +import classApplyDescriptorSet from "./classApplyDescriptorSet.js"; +import classCheckPrivateStaticAccess from "./classCheckPrivateStaticAccess.js"; +import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; +export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { + classCheckPrivateStaticAccess(receiver, classConstructor); + classCheckPrivateStaticFieldDescriptor(descriptor, "set"); + classApplyDescriptorSet(receiver, descriptor, value); + return value; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js new file mode 100644 index 0000000..fddc7b2 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js @@ -0,0 +1,5 @@ +import classCheckPrivateStaticAccess from "./classCheckPrivateStaticAccess.js"; +export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) { + classCheckPrivateStaticAccess(receiver, classConstructor); + return method; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js new file mode 100644 index 0000000..d5ab60a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js @@ -0,0 +1,3 @@ +export default function _classStaticPrivateMethodSet() { + throw new TypeError("attempted to set read only static private field"); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/construct.js b/tests/node_modules/@babel/runtime/helpers/esm/construct.js new file mode 100644 index 0000000..0c39835 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/construct.js @@ -0,0 +1,18 @@ +import setPrototypeOf from "./setPrototypeOf.js"; +import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; +export default function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/createClass.js b/tests/node_modules/@babel/runtime/helpers/esm/createClass.js new file mode 100644 index 0000000..d6cf412 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/createClass.js @@ -0,0 +1,15 @@ +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +export default function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js b/tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js new file mode 100644 index 0000000..a7a2a50 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js @@ -0,0 +1,57 @@ +import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; +export default function _createForOfIteratorHelper(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + + if (!it) { + if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + + var F = function F() {}; + + return { + s: F, + n: function n() { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function e(_e) { + throw _e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var normalCompletion = true, + didErr = false, + err; + return { + s: function s() { + it = it.call(o); + }, + n: function n() { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function e(_e2) { + didErr = true; + err = _e2; + }, + f: function f() { + try { + if (!normalCompletion && it["return"] != null) it["return"](); + } finally { + if (didErr) throw err; + } + } + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js b/tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js new file mode 100644 index 0000000..640ec68 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js @@ -0,0 +1,21 @@ +import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; +export default function _createForOfIteratorHelperLoose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + if (it) return (it = it.call(o)).next.bind(it); + + if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + return function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/createSuper.js b/tests/node_modules/@babel/runtime/helpers/esm/createSuper.js new file mode 100644 index 0000000..ea5ea99 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/createSuper.js @@ -0,0 +1,19 @@ +import getPrototypeOf from "./getPrototypeOf.js"; +import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; +import possibleConstructorReturn from "./possibleConstructorReturn.js"; +export default function _createSuper(Derived) { + var hasNativeReflectConstruct = isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = getPrototypeOf(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return possibleConstructorReturn(this, result); + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/decorate.js b/tests/node_modules/@babel/runtime/helpers/esm/decorate.js new file mode 100644 index 0000000..daf56da --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/decorate.js @@ -0,0 +1,396 @@ +import toArray from "./toArray.js"; +import toPropertyKey from "./toPropertyKey.js"; +export default function _decorate(decorators, factory, superClass, mixins) { + var api = _getDecoratorsApi(); + + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + api = mixins[i](api); + } + } + + var r = factory(function initialize(O) { + api.initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); + api.initializeClassElements(r.F, decorated.elements); + return api.runClassFinishers(r.F, decorated.finishers); +} + +function _getDecoratorsApi() { + _getDecoratorsApi = function _getDecoratorsApi() { + return api; + }; + + var api = { + elementsDefinitionOrder: [["method"], ["field"]], + initializeInstanceElements: function initializeInstanceElements(O, elements) { + ["method", "field"].forEach(function (kind) { + elements.forEach(function (element) { + if (element.kind === kind && element.placement === "own") { + this.defineClassElement(O, element); + } + }, this); + }, this); + }, + initializeClassElements: function initializeClassElements(F, elements) { + var proto = F.prototype; + ["method", "field"].forEach(function (kind) { + elements.forEach(function (element) { + var placement = element.placement; + + if (element.kind === kind && (placement === "static" || placement === "prototype")) { + var receiver = placement === "static" ? F : proto; + this.defineClassElement(receiver, element); + } + }, this); + }, this); + }, + defineClassElement: function defineClassElement(receiver, element) { + var descriptor = element.descriptor; + + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { + enumerable: descriptor.enumerable, + writable: descriptor.writable, + configurable: descriptor.configurable, + value: initializer === void 0 ? void 0 : initializer.call(receiver) + }; + } + + Object.defineProperty(receiver, element.key, descriptor); + }, + decorateClass: function decorateClass(elements, decorators) { + var newElements = []; + var finishers = []; + var placements = { + "static": [], + prototype: [], + own: [] + }; + elements.forEach(function (element) { + this.addElementPlacement(element, placements); + }, this); + elements.forEach(function (element) { + if (!_hasDecorators(element)) return newElements.push(element); + var elementFinishersExtras = this.decorateElement(element, placements); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }, this); + + if (!decorators) { + return { + elements: newElements, + finishers: finishers + }; + } + + var result = this.decorateConstructor(newElements, decorators); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + return result; + }, + addElementPlacement: function addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); + }, + decorateElement: function decorateElement(element, placements) { + var extras = []; + var finishers = []; + + for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + var elementObject = this.fromElementDescriptor(element); + var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); + element = elementFinisherExtras.element; + this.addElementPlacement(element, placements); + + if (elementFinisherExtras.finisher) { + finishers.push(elementFinisherExtras.finisher); + } + + var newExtras = elementFinisherExtras.extras; + + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) { + this.addElementPlacement(newExtras[j], placements); + } + + extras.push.apply(extras, newExtras); + } + } + + return { + element: element, + finishers: finishers, + extras: extras + }; + }, + decorateConstructor: function decorateConstructor(elements, decorators) { + var finishers = []; + + for (var i = decorators.length - 1; i >= 0; i--) { + var obj = this.fromClassDescriptor(elements); + var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj); + + if (elementsAndFinisher.finisher !== undefined) { + finishers.push(elementsAndFinisher.finisher); + } + + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { + throw new TypeError("Duplicated element (" + elements[j].key + ")"); + } + } + } + } + } + + return { + elements: elements, + finishers: finishers + }; + }, + fromElementDescriptor: function fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; + }, + toElementDescriptors: function toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return toArray(elementObjects).map(function (elementObject) { + var element = this.toElementDescriptor(elementObject); + this.disallowProperty(elementObject, "finisher", "An element descriptor"); + this.disallowProperty(elementObject, "extras", "An element descriptor"); + return element; + }, this); + }, + toElementDescriptor: function toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = toPropertyKey(elementObject.key); + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + this.disallowProperty(elementObject, "elements", "An element descriptor"); + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + this.disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + element.initializer = elementObject.initializer; + } + + return element; + }, + toElementFinisherExtras: function toElementFinisherExtras(elementObject) { + var element = this.toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = this.toElementDescriptors(elementObject.extras); + return { + element: element, + finisher: finisher, + extras: extras + }; + }, + fromClassDescriptor: function fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(this.fromElementDescriptor, this) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; + }, + toClassDescriptor: function toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + this.disallowProperty(obj, "key", "A class descriptor"); + this.disallowProperty(obj, "placement", "A class descriptor"); + this.disallowProperty(obj, "descriptor", "A class descriptor"); + this.disallowProperty(obj, "initializer", "A class descriptor"); + this.disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = this.toElementDescriptors(obj.elements); + return { + elements: elements, + finisher: finisher + }; + }, + runClassFinishers: function runClassFinishers(constructor, finishers) { + for (var i = 0; i < finishers.length; i++) { + var newConstructor = (0, finishers[i])(constructor); + + if (newConstructor !== undefined) { + if (typeof newConstructor !== "function") { + throw new TypeError("Finishers must return a constructor."); + } + + constructor = newConstructor; + } + } + + return constructor; + }, + disallowProperty: function disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } + } + }; + return api; +} + +function _createElementDescriptor(def) { + var key = toPropertyKey(def.key); + var descriptor; + + if (def.kind === "method") { + descriptor = { + value: def.value, + writable: true, + configurable: true, + enumerable: false + }; + } else if (def.kind === "get") { + descriptor = { + get: def.value, + configurable: true, + enumerable: false + }; + } else if (def.kind === "set") { + descriptor = { + set: def.value, + configurable: true, + enumerable: false + }; + } else if (def.kind === "field") { + descriptor = { + configurable: true, + writable: true, + enumerable: true + }; + } + + var element = { + kind: def.kind === "field" ? "field" : "method", + key: key, + placement: def["static"] ? "static" : def.kind === "field" ? "own" : "prototype", + descriptor: descriptor + }; + if (def.decorators) element.decorators = def.decorators; + if (def.kind === "field") element.initializer = def.value; + return element; +} + +function _coalesceGetterSetter(element, other) { + if (element.descriptor.get !== undefined) { + other.descriptor.get = element.descriptor.get; + } else { + other.descriptor.set = element.descriptor.set; + } +} + +function _coalesceClassElements(elements) { + var newElements = []; + + var isSameElement = function isSameElement(other) { + return other.kind === "method" && other.key === element.key && other.placement === element.placement; + }; + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var other; + + if (element.kind === "method" && (other = newElements.find(isSameElement))) { + if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); + } + + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ")."); + } + + other.decorators = element.decorators; + } + + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; +} + +function _hasDecorators(element) { + return element.decorators && element.decorators.length; +} + +function _isDataDescriptor(desc) { + return desc !== undefined && !(desc.value === undefined && desc.writable === undefined); +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/defaults.js b/tests/node_modules/@babel/runtime/helpers/esm/defaults.js new file mode 100644 index 0000000..3de1d8e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/defaults.js @@ -0,0 +1,14 @@ +export default function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) { + Object.defineProperty(obj, key, value); + } + } + + return obj; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js b/tests/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js new file mode 100644 index 0000000..7981acd --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js @@ -0,0 +1,22 @@ +export default function _defineEnumerableProperties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, key, desc); + } + + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + + return obj; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/defineProperty.js b/tests/node_modules/@babel/runtime/helpers/esm/defineProperty.js new file mode 100644 index 0000000..7cf6e59 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/defineProperty.js @@ -0,0 +1,14 @@ +export default function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/extends.js b/tests/node_modules/@babel/runtime/helpers/esm/extends.js new file mode 100644 index 0000000..b9b138d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/extends.js @@ -0,0 +1,17 @@ +export default function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/get.js b/tests/node_modules/@babel/runtime/helpers/esm/get.js new file mode 100644 index 0000000..1bce020 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/get.js @@ -0,0 +1,20 @@ +import superPropBase from "./superPropBase.js"; +export default function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = superPropBase(target, property); + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js b/tests/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js new file mode 100644 index 0000000..5abafe3 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js @@ -0,0 +1,6 @@ +export default function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/inherits.js b/tests/node_modules/@babel/runtime/helpers/esm/inherits.js new file mode 100644 index 0000000..aee0f10 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/inherits.js @@ -0,0 +1,15 @@ +import setPrototypeOf from "./setPrototypeOf.js"; +export default function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js b/tests/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js new file mode 100644 index 0000000..90bb796 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js @@ -0,0 +1,6 @@ +import setPrototypeOf from "./setPrototypeOf.js"; +export default function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + setPrototypeOf(subClass, superClass); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js b/tests/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js new file mode 100644 index 0000000..26fdea0 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js @@ -0,0 +1,9 @@ +export default function _initializerDefineProperty(target, property, descriptor, context) { + if (!descriptor) return; + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js b/tests/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js new file mode 100644 index 0000000..30d518c --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js @@ -0,0 +1,3 @@ +export default function _initializerWarningHelper(descriptor, context) { + throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/instanceof.js b/tests/node_modules/@babel/runtime/helpers/esm/instanceof.js new file mode 100644 index 0000000..8c43b71 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/instanceof.js @@ -0,0 +1,7 @@ +export default function _instanceof(left, right) { + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else { + return left instanceof right; + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js b/tests/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js new file mode 100644 index 0000000..c2df7b6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js @@ -0,0 +1,5 @@ +export default function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js b/tests/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js new file mode 100644 index 0000000..662ff7e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js @@ -0,0 +1,51 @@ +import _typeof from "@babel/runtime/helpers/typeof"; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} + +export default function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + + if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { + return { + "default": obj + }; + } + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj["default"] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js b/tests/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js new file mode 100644 index 0000000..7b1bc82 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js @@ -0,0 +1,3 @@ +export default function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js b/tests/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js new file mode 100644 index 0000000..0da1624 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js @@ -0,0 +1,12 @@ +export default function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/iterableToArray.js b/tests/node_modules/@babel/runtime/helpers/esm/iterableToArray.js new file mode 100644 index 0000000..cfe9fbd --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/iterableToArray.js @@ -0,0 +1,3 @@ +export default function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js b/tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js new file mode 100644 index 0000000..c72ca94 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js @@ -0,0 +1,29 @@ +export default function _iterableToArrayLimit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + var _arr = []; + var _n = true; + var _d = false; + + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js b/tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js new file mode 100644 index 0000000..27c15e0 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js @@ -0,0 +1,14 @@ +export default function _iterableToArrayLimitLoose(arr, i) { + var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); + + if (_i == null) return; + var _arr = []; + + for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { + _arr.push(_step.value); + + if (i && _arr.length === i) break; + } + + return _arr; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/jsx.js b/tests/node_modules/@babel/runtime/helpers/esm/jsx.js new file mode 100644 index 0000000..328fadf --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/jsx.js @@ -0,0 +1,46 @@ +var REACT_ELEMENT_TYPE; +export default function _createRawReactElement(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) { + props = { + children: void 0 + }; + } + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 3]; + } + + props.children = childArray; + } + + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + + return { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key === undefined ? null : "" + key, + ref: null, + props: props, + _owner: null + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js b/tests/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js new file mode 100644 index 0000000..f687959 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js @@ -0,0 +1,9 @@ +import arrayLikeToArray from "./arrayLikeToArray.js"; +export default function _maybeArrayLike(next, arr, i) { + if (arr && !Array.isArray(arr) && typeof arr.length === "number") { + var len = arr.length; + return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len); + } + + return next(arr, i); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js b/tests/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js new file mode 100644 index 0000000..d6cd864 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js @@ -0,0 +1,5 @@ +export default function _newArrowCheck(innerThis, boundThis) { + if (innerThis !== boundThis) { + throw new TypeError("Cannot instantiate an arrow function"); + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js b/tests/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js new file mode 100644 index 0000000..b349d00 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js @@ -0,0 +1,3 @@ +export default function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js b/tests/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js new file mode 100644 index 0000000..82d8296 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js @@ -0,0 +1,3 @@ +export default function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js b/tests/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js new file mode 100644 index 0000000..82b67d2 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js @@ -0,0 +1,3 @@ +export default function _objectDestructuringEmpty(obj) { + if (obj == null) throw new TypeError("Cannot destructure undefined"); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/objectSpread.js b/tests/node_modules/@babel/runtime/helpers/esm/objectSpread.js new file mode 100644 index 0000000..8c38ca7 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/objectSpread.js @@ -0,0 +1,19 @@ +import defineProperty from "./defineProperty.js"; +export default function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? Object(arguments[i]) : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + + ownKeys.forEach(function (key) { + defineProperty(target, key, source[key]); + }); + } + + return target; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/objectSpread2.js b/tests/node_modules/@babel/runtime/helpers/esm/objectSpread2.js new file mode 100644 index 0000000..be42b4d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/objectSpread2.js @@ -0,0 +1,39 @@ +import defineProperty from "./defineProperty.js"; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +export default function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js b/tests/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js new file mode 100644 index 0000000..0fef321 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js @@ -0,0 +1,19 @@ +import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose.js"; +export default function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = objectWithoutPropertiesLoose(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js b/tests/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js new file mode 100644 index 0000000..c36815c --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js @@ -0,0 +1,14 @@ +export default function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/package.json b/tests/node_modules/@babel/runtime/helpers/esm/package.json new file mode 100644 index 0000000..aead43d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js b/tests/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js new file mode 100644 index 0000000..8566e11 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js @@ -0,0 +1,11 @@ +import _typeof from "@babel/runtime/helpers/typeof"; +import assertThisInitialized from "./assertThisInitialized.js"; +export default function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + + return assertThisInitialized(self); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/readOnlyError.js b/tests/node_modules/@babel/runtime/helpers/esm/readOnlyError.js new file mode 100644 index 0000000..166e40e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/readOnlyError.js @@ -0,0 +1,3 @@ +export default function _readOnlyError(name) { + throw new TypeError("\"" + name + "\" is read-only"); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/set.js b/tests/node_modules/@babel/runtime/helpers/esm/set.js new file mode 100644 index 0000000..9c54773 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/set.js @@ -0,0 +1,51 @@ +import superPropBase from "./superPropBase.js"; +import defineProperty from "./defineProperty.js"; + +function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) { + set = Reflect.set; + } else { + set = function set(target, property, value, receiver) { + var base = superPropBase(target, property); + var desc; + + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.set) { + desc.set.call(receiver, value); + return true; + } else if (!desc.writable) { + return false; + } + } + + desc = Object.getOwnPropertyDescriptor(receiver, property); + + if (desc) { + if (!desc.writable) { + return false; + } + + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + defineProperty(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); +} + +export default function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + + if (!s && isStrict) { + throw new Error('failed to set property'); + } + + return value; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js b/tests/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js new file mode 100644 index 0000000..e6ef03e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js @@ -0,0 +1,8 @@ +export default function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js b/tests/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js new file mode 100644 index 0000000..cadd9bb --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js @@ -0,0 +1,7 @@ +export default function _skipFirstGeneratorNext(fn) { + return function () { + var it = fn.apply(this, arguments); + it.next(); + return it; + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/slicedToArray.js b/tests/node_modules/@babel/runtime/helpers/esm/slicedToArray.js new file mode 100644 index 0000000..618200b --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/slicedToArray.js @@ -0,0 +1,7 @@ +import arrayWithHoles from "./arrayWithHoles.js"; +import iterableToArrayLimit from "./iterableToArrayLimit.js"; +import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; +import nonIterableRest from "./nonIterableRest.js"; +export default function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js b/tests/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js new file mode 100644 index 0000000..efc7429 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js @@ -0,0 +1,7 @@ +import arrayWithHoles from "./arrayWithHoles.js"; +import iterableToArrayLimitLoose from "./iterableToArrayLimitLoose.js"; +import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; +import nonIterableRest from "./nonIterableRest.js"; +export default function _slicedToArrayLoose(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/superPropBase.js b/tests/node_modules/@babel/runtime/helpers/esm/superPropBase.js new file mode 100644 index 0000000..feffe6f --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/superPropBase.js @@ -0,0 +1,9 @@ +import getPrototypeOf from "./getPrototypeOf.js"; +export default function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = getPrototypeOf(object); + if (object === null) break; + } + + return object; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js b/tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js new file mode 100644 index 0000000..421f18a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js @@ -0,0 +1,11 @@ +export default function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js b/tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js new file mode 100644 index 0000000..c8f081e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js @@ -0,0 +1,8 @@ +export default function _taggedTemplateLiteralLoose(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + strings.raw = raw; + return strings; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/tdz.js b/tests/node_modules/@babel/runtime/helpers/esm/tdz.js new file mode 100644 index 0000000..d5d0adc --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/tdz.js @@ -0,0 +1,3 @@ +export default function _tdzError(name) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/temporalRef.js b/tests/node_modules/@babel/runtime/helpers/esm/temporalRef.js new file mode 100644 index 0000000..b25f7c4 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/temporalRef.js @@ -0,0 +1,5 @@ +import undef from "./temporalUndefined.js"; +import err from "./tdz.js"; +export default function _temporalRef(val, name) { + return val === undef ? err(name) : val; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js b/tests/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js new file mode 100644 index 0000000..1a35717 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js @@ -0,0 +1 @@ +export default function _temporalUndefined() {} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/toArray.js b/tests/node_modules/@babel/runtime/helpers/esm/toArray.js new file mode 100644 index 0000000..ad7c871 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/toArray.js @@ -0,0 +1,7 @@ +import arrayWithHoles from "./arrayWithHoles.js"; +import iterableToArray from "./iterableToArray.js"; +import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; +import nonIterableRest from "./nonIterableRest.js"; +export default function _toArray(arr) { + return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js b/tests/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js new file mode 100644 index 0000000..bd91285 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js @@ -0,0 +1,7 @@ +import arrayWithoutHoles from "./arrayWithoutHoles.js"; +import iterableToArray from "./iterableToArray.js"; +import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; +import nonIterableSpread from "./nonIterableSpread.js"; +export default function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/toPrimitive.js b/tests/node_modules/@babel/runtime/helpers/esm/toPrimitive.js new file mode 100644 index 0000000..4cb70a5 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/toPrimitive.js @@ -0,0 +1,13 @@ +import _typeof from "@babel/runtime/helpers/typeof"; +export default function _toPrimitive(input, hint) { + if (_typeof(input) !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_typeof(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js b/tests/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js new file mode 100644 index 0000000..f1ba8a2 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js @@ -0,0 +1,6 @@ +import _typeof from "@babel/runtime/helpers/typeof"; +import toPrimitive from "./toPrimitive.js"; +export default function _toPropertyKey(arg) { + var key = toPrimitive(arg, "string"); + return _typeof(key) === "symbol" ? key : String(key); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/typeof.js b/tests/node_modules/@babel/runtime/helpers/esm/typeof.js new file mode 100644 index 0000000..eb444f7 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/typeof.js @@ -0,0 +1,15 @@ +export default function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js b/tests/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js new file mode 100644 index 0000000..c0f63bd --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js @@ -0,0 +1,9 @@ +import arrayLikeToArray from "./arrayLikeToArray.js"; +export default function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js b/tests/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js new file mode 100644 index 0000000..723b2dd --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js @@ -0,0 +1,6 @@ +import AsyncGenerator from "./AsyncGenerator.js"; +export default function _wrapAsyncGenerator(fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js b/tests/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js new file mode 100644 index 0000000..512630d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js @@ -0,0 +1,37 @@ +import getPrototypeOf from "./getPrototypeOf.js"; +import setPrototypeOf from "./setPrototypeOf.js"; +import isNativeFunction from "./isNativeFunction.js"; +import construct from "./construct.js"; +export default function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return construct(Class, arguments, getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js b/tests/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js new file mode 100644 index 0000000..4d65336 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js @@ -0,0 +1,65 @@ +import _typeof from "@babel/runtime/helpers/typeof"; +import setPrototypeOf from "./setPrototypeOf.js"; +import inherits from "./inherits.js"; +export default function _wrapRegExp() { + _wrapRegExp = function _wrapRegExp(re, groups) { + return new BabelRegExp(re, undefined, groups); + }; + + var _super = RegExp.prototype; + + var _groups = new WeakMap(); + + function BabelRegExp(re, flags, groups) { + var _this = new RegExp(re, flags); + + _groups.set(_this, groups || _groups.get(re)); + + return setPrototypeOf(_this, BabelRegExp.prototype); + } + + inherits(BabelRegExp, RegExp); + + BabelRegExp.prototype.exec = function (str) { + var result = _super.exec.call(this, str); + + if (result) result.groups = buildGroups(result, this); + return result; + }; + + BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { + if (typeof substitution === "string") { + var groups = _groups.get(this); + + return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { + return "$" + groups[name]; + })); + } else if (typeof substitution === "function") { + var _this = this; + + return _super[Symbol.replace].call(this, str, function () { + var args = arguments; + + if (_typeof(args[args.length - 1]) !== "object") { + args = [].slice.call(args); + args.push(buildGroups(args, _this)); + } + + return substitution.apply(this, args); + }); + } else { + return _super[Symbol.replace].call(this, str, substitution); + } + }; + + function buildGroups(result, re) { + var g = _groups.get(re); + + return Object.keys(g).reduce(function (groups, name) { + groups[name] = result[g[name]]; + return groups; + }, Object.create(null)); + } + + return _wrapRegExp.apply(this, arguments); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js b/tests/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js new file mode 100644 index 0000000..9170bd4 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js @@ -0,0 +1,3 @@ +export default function _writeOnlyError(name) { + throw new TypeError("\"" + name + "\" is write-only"); +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/extends.js b/tests/node_modules/@babel/runtime/helpers/extends.js new file mode 100644 index 0000000..eaf9547 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/extends.js @@ -0,0 +1,21 @@ +function _extends() { + module.exports = _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + return _extends.apply(this, arguments); +} + +module.exports = _extends; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/get.js b/tests/node_modules/@babel/runtime/helpers/get.js new file mode 100644 index 0000000..3ed600f --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/get.js @@ -0,0 +1,27 @@ +var superPropBase = require("./superPropBase.js"); + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + module.exports = _get = Reflect.get; + module.exports["default"] = module.exports, module.exports.__esModule = true; + } else { + module.exports = _get = function _get(target, property, receiver) { + var base = superPropBase(target, property); + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + } + + return _get(target, property, receiver || target); +} + +module.exports = _get; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/getPrototypeOf.js b/tests/node_modules/@babel/runtime/helpers/getPrototypeOf.js new file mode 100644 index 0000000..a6916eb --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/getPrototypeOf.js @@ -0,0 +1,10 @@ +function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + module.exports["default"] = module.exports, module.exports.__esModule = true; + return _getPrototypeOf(o); +} + +module.exports = _getPrototypeOf; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/inherits.js b/tests/node_modules/@babel/runtime/helpers/inherits.js new file mode 100644 index 0000000..3003e01 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/inherits.js @@ -0,0 +1,19 @@ +var setPrototypeOf = require("./setPrototypeOf.js"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); +} + +module.exports = _inherits; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/inheritsLoose.js b/tests/node_modules/@babel/runtime/helpers/inheritsLoose.js new file mode 100644 index 0000000..93e4305 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/inheritsLoose.js @@ -0,0 +1,10 @@ +var setPrototypeOf = require("./setPrototypeOf.js"); + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + setPrototypeOf(subClass, superClass); +} + +module.exports = _inheritsLoose; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/initializerDefineProperty.js b/tests/node_modules/@babel/runtime/helpers/initializerDefineProperty.js new file mode 100644 index 0000000..6b1069e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/initializerDefineProperty.js @@ -0,0 +1,12 @@ +function _initializerDefineProperty(target, property, descriptor, context) { + if (!descriptor) return; + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} + +module.exports = _initializerDefineProperty; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/initializerWarningHelper.js b/tests/node_modules/@babel/runtime/helpers/initializerWarningHelper.js new file mode 100644 index 0000000..9d02886 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/initializerWarningHelper.js @@ -0,0 +1,6 @@ +function _initializerWarningHelper(descriptor, context) { + throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); +} + +module.exports = _initializerWarningHelper; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/instanceof.js b/tests/node_modules/@babel/runtime/helpers/instanceof.js new file mode 100644 index 0000000..654ebc8 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/instanceof.js @@ -0,0 +1,10 @@ +function _instanceof(left, right) { + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else { + return left instanceof right; + } +} + +module.exports = _instanceof; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/interopRequireDefault.js b/tests/node_modules/@babel/runtime/helpers/interopRequireDefault.js new file mode 100644 index 0000000..6a21368 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/interopRequireDefault.js @@ -0,0 +1,8 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} + +module.exports = _interopRequireDefault; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/interopRequireWildcard.js b/tests/node_modules/@babel/runtime/helpers/interopRequireWildcard.js new file mode 100644 index 0000000..635f8bb --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/interopRequireWildcard.js @@ -0,0 +1,54 @@ +var _typeof = require("@babel/runtime/helpers/typeof")["default"]; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} + +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + + if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { + return { + "default": obj + }; + } + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj["default"] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; +} + +module.exports = _interopRequireWildcard; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/isNativeFunction.js b/tests/node_modules/@babel/runtime/helpers/isNativeFunction.js new file mode 100644 index 0000000..50eb8f5 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/isNativeFunction.js @@ -0,0 +1,6 @@ +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +module.exports = _isNativeFunction; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js b/tests/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js new file mode 100644 index 0000000..3a201a6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js @@ -0,0 +1,15 @@ +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +module.exports = _isNativeReflectConstruct; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/iterableToArray.js b/tests/node_modules/@babel/runtime/helpers/iterableToArray.js new file mode 100644 index 0000000..03f955d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/iterableToArray.js @@ -0,0 +1,6 @@ +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +module.exports = _iterableToArray; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js b/tests/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js new file mode 100644 index 0000000..da9cee0 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js @@ -0,0 +1,32 @@ +function _iterableToArrayLimit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + var _arr = []; + var _n = true; + var _d = false; + + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +module.exports = _iterableToArrayLimit; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js b/tests/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js new file mode 100644 index 0000000..fb05b12 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js @@ -0,0 +1,17 @@ +function _iterableToArrayLimitLoose(arr, i) { + var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); + + if (_i == null) return; + var _arr = []; + + for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { + _arr.push(_step.value); + + if (i && _arr.length === i) break; + } + + return _arr; +} + +module.exports = _iterableToArrayLimitLoose; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/jsx.js b/tests/node_modules/@babel/runtime/helpers/jsx.js new file mode 100644 index 0000000..21ac847 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/jsx.js @@ -0,0 +1,50 @@ +var REACT_ELEMENT_TYPE; + +function _createRawReactElement(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) { + props = { + children: void 0 + }; + } + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 3]; + } + + props.children = childArray; + } + + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + + return { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key === undefined ? null : "" + key, + ref: null, + props: props, + _owner: null + }; +} + +module.exports = _createRawReactElement; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/maybeArrayLike.js b/tests/node_modules/@babel/runtime/helpers/maybeArrayLike.js new file mode 100644 index 0000000..3ab618b --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/maybeArrayLike.js @@ -0,0 +1,13 @@ +var arrayLikeToArray = require("./arrayLikeToArray.js"); + +function _maybeArrayLike(next, arr, i) { + if (arr && !Array.isArray(arr) && typeof arr.length === "number") { + var len = arr.length; + return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len); + } + + return next(arr, i); +} + +module.exports = _maybeArrayLike; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/newArrowCheck.js b/tests/node_modules/@babel/runtime/helpers/newArrowCheck.js new file mode 100644 index 0000000..8d7570b --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/newArrowCheck.js @@ -0,0 +1,8 @@ +function _newArrowCheck(innerThis, boundThis) { + if (innerThis !== boundThis) { + throw new TypeError("Cannot instantiate an arrow function"); + } +} + +module.exports = _newArrowCheck; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/nonIterableRest.js b/tests/node_modules/@babel/runtime/helpers/nonIterableRest.js new file mode 100644 index 0000000..22be4f5 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/nonIterableRest.js @@ -0,0 +1,6 @@ +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableRest; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/nonIterableSpread.js b/tests/node_modules/@babel/runtime/helpers/nonIterableSpread.js new file mode 100644 index 0000000..4ba722d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/nonIterableSpread.js @@ -0,0 +1,6 @@ +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableSpread; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js b/tests/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js new file mode 100644 index 0000000..1bb88ac --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js @@ -0,0 +1,6 @@ +function _objectDestructuringEmpty(obj) { + if (obj == null) throw new TypeError("Cannot destructure undefined"); +} + +module.exports = _objectDestructuringEmpty; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/objectSpread.js b/tests/node_modules/@babel/runtime/helpers/objectSpread.js new file mode 100644 index 0000000..00af209 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/objectSpread.js @@ -0,0 +1,23 @@ +var defineProperty = require("./defineProperty.js"); + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? Object(arguments[i]) : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + + ownKeys.forEach(function (key) { + defineProperty(target, key, source[key]); + }); + } + + return target; +} + +module.exports = _objectSpread; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/objectSpread2.js b/tests/node_modules/@babel/runtime/helpers/objectSpread2.js new file mode 100644 index 0000000..337d30e --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/objectSpread2.js @@ -0,0 +1,42 @@ +var defineProperty = require("./defineProperty.js"); + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +module.exports = _objectSpread2; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/objectWithoutProperties.js b/tests/node_modules/@babel/runtime/helpers/objectWithoutProperties.js new file mode 100644 index 0000000..c000db7 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/objectWithoutProperties.js @@ -0,0 +1,23 @@ +var objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose.js"); + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = objectWithoutPropertiesLoose(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +module.exports = _objectWithoutProperties; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js b/tests/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js new file mode 100644 index 0000000..d9a73de --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js @@ -0,0 +1,17 @@ +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +module.exports = _objectWithoutPropertiesLoose; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js b/tests/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js new file mode 100644 index 0000000..21455d3 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js @@ -0,0 +1,16 @@ +var _typeof = require("@babel/runtime/helpers/typeof")["default"]; + +var assertThisInitialized = require("./assertThisInitialized.js"); + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + + return assertThisInitialized(self); +} + +module.exports = _possibleConstructorReturn; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/readOnlyError.js b/tests/node_modules/@babel/runtime/helpers/readOnlyError.js new file mode 100644 index 0000000..e805f89 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/readOnlyError.js @@ -0,0 +1,6 @@ +function _readOnlyError(name) { + throw new TypeError("\"" + name + "\" is read-only"); +} + +module.exports = _readOnlyError; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/set.js b/tests/node_modules/@babel/runtime/helpers/set.js new file mode 100644 index 0000000..b7d184d --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/set.js @@ -0,0 +1,55 @@ +var superPropBase = require("./superPropBase.js"); + +var defineProperty = require("./defineProperty.js"); + +function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) { + set = Reflect.set; + } else { + set = function set(target, property, value, receiver) { + var base = superPropBase(target, property); + var desc; + + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.set) { + desc.set.call(receiver, value); + return true; + } else if (!desc.writable) { + return false; + } + } + + desc = Object.getOwnPropertyDescriptor(receiver, property); + + if (desc) { + if (!desc.writable) { + return false; + } + + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + defineProperty(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); +} + +function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + + if (!s && isStrict) { + throw new Error('failed to set property'); + } + + return value; +} + +module.exports = _set; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/setPrototypeOf.js b/tests/node_modules/@babel/runtime/helpers/setPrototypeOf.js new file mode 100644 index 0000000..415797b --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/setPrototypeOf.js @@ -0,0 +1,12 @@ +function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + return _setPrototypeOf(o, p); +} + +module.exports = _setPrototypeOf; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js b/tests/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js new file mode 100644 index 0000000..ed60585 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js @@ -0,0 +1,10 @@ +function _skipFirstGeneratorNext(fn) { + return function () { + var it = fn.apply(this, arguments); + it.next(); + return it; + }; +} + +module.exports = _skipFirstGeneratorNext; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/slicedToArray.js b/tests/node_modules/@babel/runtime/helpers/slicedToArray.js new file mode 100644 index 0000000..101f404 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/slicedToArray.js @@ -0,0 +1,14 @@ +var arrayWithHoles = require("./arrayWithHoles.js"); + +var iterableToArrayLimit = require("./iterableToArrayLimit.js"); + +var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); + +var nonIterableRest = require("./nonIterableRest.js"); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js b/tests/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js new file mode 100644 index 0000000..188db63 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js @@ -0,0 +1,14 @@ +var arrayWithHoles = require("./arrayWithHoles.js"); + +var iterableToArrayLimitLoose = require("./iterableToArrayLimitLoose.js"); + +var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); + +var nonIterableRest = require("./nonIterableRest.js"); + +function _slicedToArrayLoose(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArrayLoose; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/superPropBase.js b/tests/node_modules/@babel/runtime/helpers/superPropBase.js new file mode 100644 index 0000000..ce12a88 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/superPropBase.js @@ -0,0 +1,13 @@ +var getPrototypeOf = require("./getPrototypeOf.js"); + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +module.exports = _superPropBase; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js b/tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js new file mode 100644 index 0000000..1a524b3 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js @@ -0,0 +1,14 @@ +function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); +} + +module.exports = _taggedTemplateLiteral; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js b/tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js new file mode 100644 index 0000000..ab78e62 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js @@ -0,0 +1,11 @@ +function _taggedTemplateLiteralLoose(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + strings.raw = raw; + return strings; +} + +module.exports = _taggedTemplateLiteralLoose; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/tdz.js b/tests/node_modules/@babel/runtime/helpers/tdz.js new file mode 100644 index 0000000..a5b35a6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/tdz.js @@ -0,0 +1,6 @@ +function _tdzError(name) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); +} + +module.exports = _tdzError; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/temporalRef.js b/tests/node_modules/@babel/runtime/helpers/temporalRef.js new file mode 100644 index 0000000..d4e9460 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/temporalRef.js @@ -0,0 +1,10 @@ +var temporalUndefined = require("./temporalUndefined.js"); + +var tdz = require("./tdz.js"); + +function _temporalRef(val, name) { + return val === temporalUndefined ? tdz(name) : val; +} + +module.exports = _temporalRef; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/temporalUndefined.js b/tests/node_modules/@babel/runtime/helpers/temporalUndefined.js new file mode 100644 index 0000000..aeae645 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/temporalUndefined.js @@ -0,0 +1,4 @@ +function _temporalUndefined() {} + +module.exports = _temporalUndefined; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/toArray.js b/tests/node_modules/@babel/runtime/helpers/toArray.js new file mode 100644 index 0000000..3b911bd --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/toArray.js @@ -0,0 +1,14 @@ +var arrayWithHoles = require("./arrayWithHoles.js"); + +var iterableToArray = require("./iterableToArray.js"); + +var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); + +var nonIterableRest = require("./nonIterableRest.js"); + +function _toArray(arr) { + return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); +} + +module.exports = _toArray; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/toConsumableArray.js b/tests/node_modules/@babel/runtime/helpers/toConsumableArray.js new file mode 100644 index 0000000..f084cd1 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/toConsumableArray.js @@ -0,0 +1,14 @@ +var arrayWithoutHoles = require("./arrayWithoutHoles.js"); + +var iterableToArray = require("./iterableToArray.js"); + +var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); + +var nonIterableSpread = require("./nonIterableSpread.js"); + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} + +module.exports = _toConsumableArray; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/toPrimitive.js b/tests/node_modules/@babel/runtime/helpers/toPrimitive.js new file mode 100644 index 0000000..ac40338 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/toPrimitive.js @@ -0,0 +1,17 @@ +var _typeof = require("@babel/runtime/helpers/typeof")["default"]; + +function _toPrimitive(input, hint) { + if (_typeof(input) !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_typeof(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +module.exports = _toPrimitive; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/toPropertyKey.js b/tests/node_modules/@babel/runtime/helpers/toPropertyKey.js new file mode 100644 index 0000000..066b3f2 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/toPropertyKey.js @@ -0,0 +1,11 @@ +var _typeof = require("@babel/runtime/helpers/typeof")["default"]; + +var toPrimitive = require("./toPrimitive.js"); + +function _toPropertyKey(arg) { + var key = toPrimitive(arg, "string"); + return _typeof(key) === "symbol" ? key : String(key); +} + +module.exports = _toPropertyKey; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/typeof.js b/tests/node_modules/@babel/runtime/helpers/typeof.js new file mode 100644 index 0000000..02a5d8a --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/typeof.js @@ -0,0 +1,22 @@ +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + } + + return _typeof(obj); +} + +module.exports = _typeof; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js b/tests/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js new file mode 100644 index 0000000..11bca7b --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js @@ -0,0 +1,13 @@ +var arrayLikeToArray = require("./arrayLikeToArray.js"); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} + +module.exports = _unsupportedIterableToArray; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js b/tests/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js new file mode 100644 index 0000000..057cd19 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js @@ -0,0 +1,10 @@ +var AsyncGenerator = require("./AsyncGenerator.js"); + +function _wrapAsyncGenerator(fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; +} + +module.exports = _wrapAsyncGenerator; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/wrapNativeSuper.js b/tests/node_modules/@babel/runtime/helpers/wrapNativeSuper.js new file mode 100644 index 0000000..981c8dd --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/wrapNativeSuper.js @@ -0,0 +1,45 @@ +var getPrototypeOf = require("./getPrototypeOf.js"); + +var setPrototypeOf = require("./setPrototypeOf.js"); + +var isNativeFunction = require("./isNativeFunction.js"); + +var construct = require("./construct.js"); + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return construct(Class, arguments, getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return setPrototypeOf(Wrapper, Class); + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + return _wrapNativeSuper(Class); +} + +module.exports = _wrapNativeSuper; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/wrapRegExp.js b/tests/node_modules/@babel/runtime/helpers/wrapRegExp.js new file mode 100644 index 0000000..e80a8b6 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/wrapRegExp.js @@ -0,0 +1,72 @@ +var _typeof = require("@babel/runtime/helpers/typeof")["default"]; + +var setPrototypeOf = require("./setPrototypeOf.js"); + +var inherits = require("./inherits.js"); + +function _wrapRegExp() { + module.exports = _wrapRegExp = function _wrapRegExp(re, groups) { + return new BabelRegExp(re, undefined, groups); + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + var _super = RegExp.prototype; + + var _groups = new WeakMap(); + + function BabelRegExp(re, flags, groups) { + var _this = new RegExp(re, flags); + + _groups.set(_this, groups || _groups.get(re)); + + return setPrototypeOf(_this, BabelRegExp.prototype); + } + + inherits(BabelRegExp, RegExp); + + BabelRegExp.prototype.exec = function (str) { + var result = _super.exec.call(this, str); + + if (result) result.groups = buildGroups(result, this); + return result; + }; + + BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { + if (typeof substitution === "string") { + var groups = _groups.get(this); + + return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { + return "$" + groups[name]; + })); + } else if (typeof substitution === "function") { + var _this = this; + + return _super[Symbol.replace].call(this, str, function () { + var args = arguments; + + if (_typeof(args[args.length - 1]) !== "object") { + args = [].slice.call(args); + args.push(buildGroups(args, _this)); + } + + return substitution.apply(this, args); + }); + } else { + return _super[Symbol.replace].call(this, str, substitution); + } + }; + + function buildGroups(result, re) { + var g = _groups.get(re); + + return Object.keys(g).reduce(function (groups, name) { + groups[name] = result[g[name]]; + return groups; + }, Object.create(null)); + } + + return _wrapRegExp.apply(this, arguments); +} + +module.exports = _wrapRegExp; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/helpers/writeOnlyError.js b/tests/node_modules/@babel/runtime/helpers/writeOnlyError.js new file mode 100644 index 0000000..6751a74 --- /dev/null +++ b/tests/node_modules/@babel/runtime/helpers/writeOnlyError.js @@ -0,0 +1,6 @@ +function _writeOnlyError(name) { + throw new TypeError("\"" + name + "\" is write-only"); +} + +module.exports = _writeOnlyError; +module.exports["default"] = module.exports, module.exports.__esModule = true; \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/package.json b/tests/node_modules/@babel/runtime/package.json new file mode 100644 index 0000000..3f028f5 --- /dev/null +++ b/tests/node_modules/@babel/runtime/package.json @@ -0,0 +1,821 @@ +{ + "name": "@babel/runtime", + "version": "7.15.3", + "description": "babel's modular runtime helpers", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-runtime" + }, + "homepage": "https://babel.dev/docs/en/next/babel-runtime", + "author": "The Babel Team (https://babel.dev/team)", + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "exports": { + "./helpers/jsx": [ + { + "node": "./helpers/jsx.js", + "import": "./helpers/esm/jsx.js", + "default": "./helpers/jsx.js" + }, + "./helpers/jsx.js" + ], + "./helpers/esm/jsx": "./helpers/esm/jsx.js", + "./helpers/objectSpread2": [ + { + "node": "./helpers/objectSpread2.js", + "import": "./helpers/esm/objectSpread2.js", + "default": "./helpers/objectSpread2.js" + }, + "./helpers/objectSpread2.js" + ], + "./helpers/esm/objectSpread2": "./helpers/esm/objectSpread2.js", + "./helpers/typeof": [ + { + "node": "./helpers/typeof.js", + "import": "./helpers/esm/typeof.js", + "default": "./helpers/typeof.js" + }, + "./helpers/typeof.js" + ], + "./helpers/esm/typeof": "./helpers/esm/typeof.js", + "./helpers/wrapRegExp": [ + { + "node": "./helpers/wrapRegExp.js", + "import": "./helpers/esm/wrapRegExp.js", + "default": "./helpers/wrapRegExp.js" + }, + "./helpers/wrapRegExp.js" + ], + "./helpers/esm/wrapRegExp": "./helpers/esm/wrapRegExp.js", + "./helpers/asyncIterator": [ + { + "node": "./helpers/asyncIterator.js", + "import": "./helpers/esm/asyncIterator.js", + "default": "./helpers/asyncIterator.js" + }, + "./helpers/asyncIterator.js" + ], + "./helpers/esm/asyncIterator": "./helpers/esm/asyncIterator.js", + "./helpers/AwaitValue": [ + { + "node": "./helpers/AwaitValue.js", + "import": "./helpers/esm/AwaitValue.js", + "default": "./helpers/AwaitValue.js" + }, + "./helpers/AwaitValue.js" + ], + "./helpers/esm/AwaitValue": "./helpers/esm/AwaitValue.js", + "./helpers/AsyncGenerator": [ + { + "node": "./helpers/AsyncGenerator.js", + "import": "./helpers/esm/AsyncGenerator.js", + "default": "./helpers/AsyncGenerator.js" + }, + "./helpers/AsyncGenerator.js" + ], + "./helpers/esm/AsyncGenerator": "./helpers/esm/AsyncGenerator.js", + "./helpers/wrapAsyncGenerator": [ + { + "node": "./helpers/wrapAsyncGenerator.js", + "import": "./helpers/esm/wrapAsyncGenerator.js", + "default": "./helpers/wrapAsyncGenerator.js" + }, + "./helpers/wrapAsyncGenerator.js" + ], + "./helpers/esm/wrapAsyncGenerator": "./helpers/esm/wrapAsyncGenerator.js", + "./helpers/awaitAsyncGenerator": [ + { + "node": "./helpers/awaitAsyncGenerator.js", + "import": "./helpers/esm/awaitAsyncGenerator.js", + "default": "./helpers/awaitAsyncGenerator.js" + }, + "./helpers/awaitAsyncGenerator.js" + ], + "./helpers/esm/awaitAsyncGenerator": "./helpers/esm/awaitAsyncGenerator.js", + "./helpers/asyncGeneratorDelegate": [ + { + "node": "./helpers/asyncGeneratorDelegate.js", + "import": "./helpers/esm/asyncGeneratorDelegate.js", + "default": "./helpers/asyncGeneratorDelegate.js" + }, + "./helpers/asyncGeneratorDelegate.js" + ], + "./helpers/esm/asyncGeneratorDelegate": "./helpers/esm/asyncGeneratorDelegate.js", + "./helpers/asyncToGenerator": [ + { + "node": "./helpers/asyncToGenerator.js", + "import": "./helpers/esm/asyncToGenerator.js", + "default": "./helpers/asyncToGenerator.js" + }, + "./helpers/asyncToGenerator.js" + ], + "./helpers/esm/asyncToGenerator": "./helpers/esm/asyncToGenerator.js", + "./helpers/classCallCheck": [ + { + "node": "./helpers/classCallCheck.js", + "import": "./helpers/esm/classCallCheck.js", + "default": "./helpers/classCallCheck.js" + }, + "./helpers/classCallCheck.js" + ], + "./helpers/esm/classCallCheck": "./helpers/esm/classCallCheck.js", + "./helpers/createClass": [ + { + "node": "./helpers/createClass.js", + "import": "./helpers/esm/createClass.js", + "default": "./helpers/createClass.js" + }, + "./helpers/createClass.js" + ], + "./helpers/esm/createClass": "./helpers/esm/createClass.js", + "./helpers/defineEnumerableProperties": [ + { + "node": "./helpers/defineEnumerableProperties.js", + "import": "./helpers/esm/defineEnumerableProperties.js", + "default": "./helpers/defineEnumerableProperties.js" + }, + "./helpers/defineEnumerableProperties.js" + ], + "./helpers/esm/defineEnumerableProperties": "./helpers/esm/defineEnumerableProperties.js", + "./helpers/defaults": [ + { + "node": "./helpers/defaults.js", + "import": "./helpers/esm/defaults.js", + "default": "./helpers/defaults.js" + }, + "./helpers/defaults.js" + ], + "./helpers/esm/defaults": "./helpers/esm/defaults.js", + "./helpers/defineProperty": [ + { + "node": "./helpers/defineProperty.js", + "import": "./helpers/esm/defineProperty.js", + "default": "./helpers/defineProperty.js" + }, + "./helpers/defineProperty.js" + ], + "./helpers/esm/defineProperty": "./helpers/esm/defineProperty.js", + "./helpers/extends": [ + { + "node": "./helpers/extends.js", + "import": "./helpers/esm/extends.js", + "default": "./helpers/extends.js" + }, + "./helpers/extends.js" + ], + "./helpers/esm/extends": "./helpers/esm/extends.js", + "./helpers/objectSpread": [ + { + "node": "./helpers/objectSpread.js", + "import": "./helpers/esm/objectSpread.js", + "default": "./helpers/objectSpread.js" + }, + "./helpers/objectSpread.js" + ], + "./helpers/esm/objectSpread": "./helpers/esm/objectSpread.js", + "./helpers/inherits": [ + { + "node": "./helpers/inherits.js", + "import": "./helpers/esm/inherits.js", + "default": "./helpers/inherits.js" + }, + "./helpers/inherits.js" + ], + "./helpers/esm/inherits": "./helpers/esm/inherits.js", + "./helpers/inheritsLoose": [ + { + "node": "./helpers/inheritsLoose.js", + "import": "./helpers/esm/inheritsLoose.js", + "default": "./helpers/inheritsLoose.js" + }, + "./helpers/inheritsLoose.js" + ], + "./helpers/esm/inheritsLoose": "./helpers/esm/inheritsLoose.js", + "./helpers/getPrototypeOf": [ + { + "node": "./helpers/getPrototypeOf.js", + "import": "./helpers/esm/getPrototypeOf.js", + "default": "./helpers/getPrototypeOf.js" + }, + "./helpers/getPrototypeOf.js" + ], + "./helpers/esm/getPrototypeOf": "./helpers/esm/getPrototypeOf.js", + "./helpers/setPrototypeOf": [ + { + "node": "./helpers/setPrototypeOf.js", + "import": "./helpers/esm/setPrototypeOf.js", + "default": "./helpers/setPrototypeOf.js" + }, + "./helpers/setPrototypeOf.js" + ], + "./helpers/esm/setPrototypeOf": "./helpers/esm/setPrototypeOf.js", + "./helpers/isNativeReflectConstruct": [ + { + "node": "./helpers/isNativeReflectConstruct.js", + "import": "./helpers/esm/isNativeReflectConstruct.js", + "default": "./helpers/isNativeReflectConstruct.js" + }, + "./helpers/isNativeReflectConstruct.js" + ], + "./helpers/esm/isNativeReflectConstruct": "./helpers/esm/isNativeReflectConstruct.js", + "./helpers/construct": [ + { + "node": "./helpers/construct.js", + "import": "./helpers/esm/construct.js", + "default": "./helpers/construct.js" + }, + "./helpers/construct.js" + ], + "./helpers/esm/construct": "./helpers/esm/construct.js", + "./helpers/isNativeFunction": [ + { + "node": "./helpers/isNativeFunction.js", + "import": "./helpers/esm/isNativeFunction.js", + "default": "./helpers/isNativeFunction.js" + }, + "./helpers/isNativeFunction.js" + ], + "./helpers/esm/isNativeFunction": "./helpers/esm/isNativeFunction.js", + "./helpers/wrapNativeSuper": [ + { + "node": "./helpers/wrapNativeSuper.js", + "import": "./helpers/esm/wrapNativeSuper.js", + "default": "./helpers/wrapNativeSuper.js" + }, + "./helpers/wrapNativeSuper.js" + ], + "./helpers/esm/wrapNativeSuper": "./helpers/esm/wrapNativeSuper.js", + "./helpers/instanceof": [ + { + "node": "./helpers/instanceof.js", + "import": "./helpers/esm/instanceof.js", + "default": "./helpers/instanceof.js" + }, + "./helpers/instanceof.js" + ], + "./helpers/esm/instanceof": "./helpers/esm/instanceof.js", + "./helpers/interopRequireDefault": [ + { + "node": "./helpers/interopRequireDefault.js", + "import": "./helpers/esm/interopRequireDefault.js", + "default": "./helpers/interopRequireDefault.js" + }, + "./helpers/interopRequireDefault.js" + ], + "./helpers/esm/interopRequireDefault": "./helpers/esm/interopRequireDefault.js", + "./helpers/interopRequireWildcard": [ + { + "node": "./helpers/interopRequireWildcard.js", + "import": "./helpers/esm/interopRequireWildcard.js", + "default": "./helpers/interopRequireWildcard.js" + }, + "./helpers/interopRequireWildcard.js" + ], + "./helpers/esm/interopRequireWildcard": "./helpers/esm/interopRequireWildcard.js", + "./helpers/newArrowCheck": [ + { + "node": "./helpers/newArrowCheck.js", + "import": "./helpers/esm/newArrowCheck.js", + "default": "./helpers/newArrowCheck.js" + }, + "./helpers/newArrowCheck.js" + ], + "./helpers/esm/newArrowCheck": "./helpers/esm/newArrowCheck.js", + "./helpers/objectDestructuringEmpty": [ + { + "node": "./helpers/objectDestructuringEmpty.js", + "import": "./helpers/esm/objectDestructuringEmpty.js", + "default": "./helpers/objectDestructuringEmpty.js" + }, + "./helpers/objectDestructuringEmpty.js" + ], + "./helpers/esm/objectDestructuringEmpty": "./helpers/esm/objectDestructuringEmpty.js", + "./helpers/objectWithoutPropertiesLoose": [ + { + "node": "./helpers/objectWithoutPropertiesLoose.js", + "import": "./helpers/esm/objectWithoutPropertiesLoose.js", + "default": "./helpers/objectWithoutPropertiesLoose.js" + }, + "./helpers/objectWithoutPropertiesLoose.js" + ], + "./helpers/esm/objectWithoutPropertiesLoose": "./helpers/esm/objectWithoutPropertiesLoose.js", + "./helpers/objectWithoutProperties": [ + { + "node": "./helpers/objectWithoutProperties.js", + "import": "./helpers/esm/objectWithoutProperties.js", + "default": "./helpers/objectWithoutProperties.js" + }, + "./helpers/objectWithoutProperties.js" + ], + "./helpers/esm/objectWithoutProperties": "./helpers/esm/objectWithoutProperties.js", + "./helpers/assertThisInitialized": [ + { + "node": "./helpers/assertThisInitialized.js", + "import": "./helpers/esm/assertThisInitialized.js", + "default": "./helpers/assertThisInitialized.js" + }, + "./helpers/assertThisInitialized.js" + ], + "./helpers/esm/assertThisInitialized": "./helpers/esm/assertThisInitialized.js", + "./helpers/possibleConstructorReturn": [ + { + "node": "./helpers/possibleConstructorReturn.js", + "import": "./helpers/esm/possibleConstructorReturn.js", + "default": "./helpers/possibleConstructorReturn.js" + }, + "./helpers/possibleConstructorReturn.js" + ], + "./helpers/esm/possibleConstructorReturn": "./helpers/esm/possibleConstructorReturn.js", + "./helpers/createSuper": [ + { + "node": "./helpers/createSuper.js", + "import": "./helpers/esm/createSuper.js", + "default": "./helpers/createSuper.js" + }, + "./helpers/createSuper.js" + ], + "./helpers/esm/createSuper": "./helpers/esm/createSuper.js", + "./helpers/superPropBase": [ + { + "node": "./helpers/superPropBase.js", + "import": "./helpers/esm/superPropBase.js", + "default": "./helpers/superPropBase.js" + }, + "./helpers/superPropBase.js" + ], + "./helpers/esm/superPropBase": "./helpers/esm/superPropBase.js", + "./helpers/get": [ + { + "node": "./helpers/get.js", + "import": "./helpers/esm/get.js", + "default": "./helpers/get.js" + }, + "./helpers/get.js" + ], + "./helpers/esm/get": "./helpers/esm/get.js", + "./helpers/set": [ + { + "node": "./helpers/set.js", + "import": "./helpers/esm/set.js", + "default": "./helpers/set.js" + }, + "./helpers/set.js" + ], + "./helpers/esm/set": "./helpers/esm/set.js", + "./helpers/taggedTemplateLiteral": [ + { + "node": "./helpers/taggedTemplateLiteral.js", + "import": "./helpers/esm/taggedTemplateLiteral.js", + "default": "./helpers/taggedTemplateLiteral.js" + }, + "./helpers/taggedTemplateLiteral.js" + ], + "./helpers/esm/taggedTemplateLiteral": "./helpers/esm/taggedTemplateLiteral.js", + "./helpers/taggedTemplateLiteralLoose": [ + { + "node": "./helpers/taggedTemplateLiteralLoose.js", + "import": "./helpers/esm/taggedTemplateLiteralLoose.js", + "default": "./helpers/taggedTemplateLiteralLoose.js" + }, + "./helpers/taggedTemplateLiteralLoose.js" + ], + "./helpers/esm/taggedTemplateLiteralLoose": "./helpers/esm/taggedTemplateLiteralLoose.js", + "./helpers/readOnlyError": [ + { + "node": "./helpers/readOnlyError.js", + "import": "./helpers/esm/readOnlyError.js", + "default": "./helpers/readOnlyError.js" + }, + "./helpers/readOnlyError.js" + ], + "./helpers/esm/readOnlyError": "./helpers/esm/readOnlyError.js", + "./helpers/writeOnlyError": [ + { + "node": "./helpers/writeOnlyError.js", + "import": "./helpers/esm/writeOnlyError.js", + "default": "./helpers/writeOnlyError.js" + }, + "./helpers/writeOnlyError.js" + ], + "./helpers/esm/writeOnlyError": "./helpers/esm/writeOnlyError.js", + "./helpers/classNameTDZError": [ + { + "node": "./helpers/classNameTDZError.js", + "import": "./helpers/esm/classNameTDZError.js", + "default": "./helpers/classNameTDZError.js" + }, + "./helpers/classNameTDZError.js" + ], + "./helpers/esm/classNameTDZError": "./helpers/esm/classNameTDZError.js", + "./helpers/temporalUndefined": [ + { + "node": "./helpers/temporalUndefined.js", + "import": "./helpers/esm/temporalUndefined.js", + "default": "./helpers/temporalUndefined.js" + }, + "./helpers/temporalUndefined.js" + ], + "./helpers/esm/temporalUndefined": "./helpers/esm/temporalUndefined.js", + "./helpers/tdz": [ + { + "node": "./helpers/tdz.js", + "import": "./helpers/esm/tdz.js", + "default": "./helpers/tdz.js" + }, + "./helpers/tdz.js" + ], + "./helpers/esm/tdz": "./helpers/esm/tdz.js", + "./helpers/temporalRef": [ + { + "node": "./helpers/temporalRef.js", + "import": "./helpers/esm/temporalRef.js", + "default": "./helpers/temporalRef.js" + }, + "./helpers/temporalRef.js" + ], + "./helpers/esm/temporalRef": "./helpers/esm/temporalRef.js", + "./helpers/slicedToArray": [ + { + "node": "./helpers/slicedToArray.js", + "import": "./helpers/esm/slicedToArray.js", + "default": "./helpers/slicedToArray.js" + }, + "./helpers/slicedToArray.js" + ], + "./helpers/esm/slicedToArray": "./helpers/esm/slicedToArray.js", + "./helpers/slicedToArrayLoose": [ + { + "node": "./helpers/slicedToArrayLoose.js", + "import": "./helpers/esm/slicedToArrayLoose.js", + "default": "./helpers/slicedToArrayLoose.js" + }, + "./helpers/slicedToArrayLoose.js" + ], + "./helpers/esm/slicedToArrayLoose": "./helpers/esm/slicedToArrayLoose.js", + "./helpers/toArray": [ + { + "node": "./helpers/toArray.js", + "import": "./helpers/esm/toArray.js", + "default": "./helpers/toArray.js" + }, + "./helpers/toArray.js" + ], + "./helpers/esm/toArray": "./helpers/esm/toArray.js", + "./helpers/toConsumableArray": [ + { + "node": "./helpers/toConsumableArray.js", + "import": "./helpers/esm/toConsumableArray.js", + "default": "./helpers/toConsumableArray.js" + }, + "./helpers/toConsumableArray.js" + ], + "./helpers/esm/toConsumableArray": "./helpers/esm/toConsumableArray.js", + "./helpers/arrayWithoutHoles": [ + { + "node": "./helpers/arrayWithoutHoles.js", + "import": "./helpers/esm/arrayWithoutHoles.js", + "default": "./helpers/arrayWithoutHoles.js" + }, + "./helpers/arrayWithoutHoles.js" + ], + "./helpers/esm/arrayWithoutHoles": "./helpers/esm/arrayWithoutHoles.js", + "./helpers/arrayWithHoles": [ + { + "node": "./helpers/arrayWithHoles.js", + "import": "./helpers/esm/arrayWithHoles.js", + "default": "./helpers/arrayWithHoles.js" + }, + "./helpers/arrayWithHoles.js" + ], + "./helpers/esm/arrayWithHoles": "./helpers/esm/arrayWithHoles.js", + "./helpers/maybeArrayLike": [ + { + "node": "./helpers/maybeArrayLike.js", + "import": "./helpers/esm/maybeArrayLike.js", + "default": "./helpers/maybeArrayLike.js" + }, + "./helpers/maybeArrayLike.js" + ], + "./helpers/esm/maybeArrayLike": "./helpers/esm/maybeArrayLike.js", + "./helpers/iterableToArray": [ + { + "node": "./helpers/iterableToArray.js", + "import": "./helpers/esm/iterableToArray.js", + "default": "./helpers/iterableToArray.js" + }, + "./helpers/iterableToArray.js" + ], + "./helpers/esm/iterableToArray": "./helpers/esm/iterableToArray.js", + "./helpers/iterableToArrayLimit": [ + { + "node": "./helpers/iterableToArrayLimit.js", + "import": "./helpers/esm/iterableToArrayLimit.js", + "default": "./helpers/iterableToArrayLimit.js" + }, + "./helpers/iterableToArrayLimit.js" + ], + "./helpers/esm/iterableToArrayLimit": "./helpers/esm/iterableToArrayLimit.js", + "./helpers/iterableToArrayLimitLoose": [ + { + "node": "./helpers/iterableToArrayLimitLoose.js", + "import": "./helpers/esm/iterableToArrayLimitLoose.js", + "default": "./helpers/iterableToArrayLimitLoose.js" + }, + "./helpers/iterableToArrayLimitLoose.js" + ], + "./helpers/esm/iterableToArrayLimitLoose": "./helpers/esm/iterableToArrayLimitLoose.js", + "./helpers/unsupportedIterableToArray": [ + { + "node": "./helpers/unsupportedIterableToArray.js", + "import": "./helpers/esm/unsupportedIterableToArray.js", + "default": "./helpers/unsupportedIterableToArray.js" + }, + "./helpers/unsupportedIterableToArray.js" + ], + "./helpers/esm/unsupportedIterableToArray": "./helpers/esm/unsupportedIterableToArray.js", + "./helpers/arrayLikeToArray": [ + { + "node": "./helpers/arrayLikeToArray.js", + "import": "./helpers/esm/arrayLikeToArray.js", + "default": "./helpers/arrayLikeToArray.js" + }, + "./helpers/arrayLikeToArray.js" + ], + "./helpers/esm/arrayLikeToArray": "./helpers/esm/arrayLikeToArray.js", + "./helpers/nonIterableSpread": [ + { + "node": "./helpers/nonIterableSpread.js", + "import": "./helpers/esm/nonIterableSpread.js", + "default": "./helpers/nonIterableSpread.js" + }, + "./helpers/nonIterableSpread.js" + ], + "./helpers/esm/nonIterableSpread": "./helpers/esm/nonIterableSpread.js", + "./helpers/nonIterableRest": [ + { + "node": "./helpers/nonIterableRest.js", + "import": "./helpers/esm/nonIterableRest.js", + "default": "./helpers/nonIterableRest.js" + }, + "./helpers/nonIterableRest.js" + ], + "./helpers/esm/nonIterableRest": "./helpers/esm/nonIterableRest.js", + "./helpers/createForOfIteratorHelper": [ + { + "node": "./helpers/createForOfIteratorHelper.js", + "import": "./helpers/esm/createForOfIteratorHelper.js", + "default": "./helpers/createForOfIteratorHelper.js" + }, + "./helpers/createForOfIteratorHelper.js" + ], + "./helpers/esm/createForOfIteratorHelper": "./helpers/esm/createForOfIteratorHelper.js", + "./helpers/createForOfIteratorHelperLoose": [ + { + "node": "./helpers/createForOfIteratorHelperLoose.js", + "import": "./helpers/esm/createForOfIteratorHelperLoose.js", + "default": "./helpers/createForOfIteratorHelperLoose.js" + }, + "./helpers/createForOfIteratorHelperLoose.js" + ], + "./helpers/esm/createForOfIteratorHelperLoose": "./helpers/esm/createForOfIteratorHelperLoose.js", + "./helpers/skipFirstGeneratorNext": [ + { + "node": "./helpers/skipFirstGeneratorNext.js", + "import": "./helpers/esm/skipFirstGeneratorNext.js", + "default": "./helpers/skipFirstGeneratorNext.js" + }, + "./helpers/skipFirstGeneratorNext.js" + ], + "./helpers/esm/skipFirstGeneratorNext": "./helpers/esm/skipFirstGeneratorNext.js", + "./helpers/toPrimitive": [ + { + "node": "./helpers/toPrimitive.js", + "import": "./helpers/esm/toPrimitive.js", + "default": "./helpers/toPrimitive.js" + }, + "./helpers/toPrimitive.js" + ], + "./helpers/esm/toPrimitive": "./helpers/esm/toPrimitive.js", + "./helpers/toPropertyKey": [ + { + "node": "./helpers/toPropertyKey.js", + "import": "./helpers/esm/toPropertyKey.js", + "default": "./helpers/toPropertyKey.js" + }, + "./helpers/toPropertyKey.js" + ], + "./helpers/esm/toPropertyKey": "./helpers/esm/toPropertyKey.js", + "./helpers/initializerWarningHelper": [ + { + "node": "./helpers/initializerWarningHelper.js", + "import": "./helpers/esm/initializerWarningHelper.js", + "default": "./helpers/initializerWarningHelper.js" + }, + "./helpers/initializerWarningHelper.js" + ], + "./helpers/esm/initializerWarningHelper": "./helpers/esm/initializerWarningHelper.js", + "./helpers/initializerDefineProperty": [ + { + "node": "./helpers/initializerDefineProperty.js", + "import": "./helpers/esm/initializerDefineProperty.js", + "default": "./helpers/initializerDefineProperty.js" + }, + "./helpers/initializerDefineProperty.js" + ], + "./helpers/esm/initializerDefineProperty": "./helpers/esm/initializerDefineProperty.js", + "./helpers/applyDecoratedDescriptor": [ + { + "node": "./helpers/applyDecoratedDescriptor.js", + "import": "./helpers/esm/applyDecoratedDescriptor.js", + "default": "./helpers/applyDecoratedDescriptor.js" + }, + "./helpers/applyDecoratedDescriptor.js" + ], + "./helpers/esm/applyDecoratedDescriptor": "./helpers/esm/applyDecoratedDescriptor.js", + "./helpers/classPrivateFieldLooseKey": [ + { + "node": "./helpers/classPrivateFieldLooseKey.js", + "import": "./helpers/esm/classPrivateFieldLooseKey.js", + "default": "./helpers/classPrivateFieldLooseKey.js" + }, + "./helpers/classPrivateFieldLooseKey.js" + ], + "./helpers/esm/classPrivateFieldLooseKey": "./helpers/esm/classPrivateFieldLooseKey.js", + "./helpers/classPrivateFieldLooseBase": [ + { + "node": "./helpers/classPrivateFieldLooseBase.js", + "import": "./helpers/esm/classPrivateFieldLooseBase.js", + "default": "./helpers/classPrivateFieldLooseBase.js" + }, + "./helpers/classPrivateFieldLooseBase.js" + ], + "./helpers/esm/classPrivateFieldLooseBase": "./helpers/esm/classPrivateFieldLooseBase.js", + "./helpers/classPrivateFieldGet": [ + { + "node": "./helpers/classPrivateFieldGet.js", + "import": "./helpers/esm/classPrivateFieldGet.js", + "default": "./helpers/classPrivateFieldGet.js" + }, + "./helpers/classPrivateFieldGet.js" + ], + "./helpers/esm/classPrivateFieldGet": "./helpers/esm/classPrivateFieldGet.js", + "./helpers/classPrivateFieldSet": [ + { + "node": "./helpers/classPrivateFieldSet.js", + "import": "./helpers/esm/classPrivateFieldSet.js", + "default": "./helpers/classPrivateFieldSet.js" + }, + "./helpers/classPrivateFieldSet.js" + ], + "./helpers/esm/classPrivateFieldSet": "./helpers/esm/classPrivateFieldSet.js", + "./helpers/classPrivateFieldDestructureSet": [ + { + "node": "./helpers/classPrivateFieldDestructureSet.js", + "import": "./helpers/esm/classPrivateFieldDestructureSet.js", + "default": "./helpers/classPrivateFieldDestructureSet.js" + }, + "./helpers/classPrivateFieldDestructureSet.js" + ], + "./helpers/esm/classPrivateFieldDestructureSet": "./helpers/esm/classPrivateFieldDestructureSet.js", + "./helpers/classExtractFieldDescriptor": [ + { + "node": "./helpers/classExtractFieldDescriptor.js", + "import": "./helpers/esm/classExtractFieldDescriptor.js", + "default": "./helpers/classExtractFieldDescriptor.js" + }, + "./helpers/classExtractFieldDescriptor.js" + ], + "./helpers/esm/classExtractFieldDescriptor": "./helpers/esm/classExtractFieldDescriptor.js", + "./helpers/classStaticPrivateFieldSpecGet": [ + { + "node": "./helpers/classStaticPrivateFieldSpecGet.js", + "import": "./helpers/esm/classStaticPrivateFieldSpecGet.js", + "default": "./helpers/classStaticPrivateFieldSpecGet.js" + }, + "./helpers/classStaticPrivateFieldSpecGet.js" + ], + "./helpers/esm/classStaticPrivateFieldSpecGet": "./helpers/esm/classStaticPrivateFieldSpecGet.js", + "./helpers/classStaticPrivateFieldSpecSet": [ + { + "node": "./helpers/classStaticPrivateFieldSpecSet.js", + "import": "./helpers/esm/classStaticPrivateFieldSpecSet.js", + "default": "./helpers/classStaticPrivateFieldSpecSet.js" + }, + "./helpers/classStaticPrivateFieldSpecSet.js" + ], + "./helpers/esm/classStaticPrivateFieldSpecSet": "./helpers/esm/classStaticPrivateFieldSpecSet.js", + "./helpers/classStaticPrivateMethodGet": [ + { + "node": "./helpers/classStaticPrivateMethodGet.js", + "import": "./helpers/esm/classStaticPrivateMethodGet.js", + "default": "./helpers/classStaticPrivateMethodGet.js" + }, + "./helpers/classStaticPrivateMethodGet.js" + ], + "./helpers/esm/classStaticPrivateMethodGet": "./helpers/esm/classStaticPrivateMethodGet.js", + "./helpers/classStaticPrivateMethodSet": [ + { + "node": "./helpers/classStaticPrivateMethodSet.js", + "import": "./helpers/esm/classStaticPrivateMethodSet.js", + "default": "./helpers/classStaticPrivateMethodSet.js" + }, + "./helpers/classStaticPrivateMethodSet.js" + ], + "./helpers/esm/classStaticPrivateMethodSet": "./helpers/esm/classStaticPrivateMethodSet.js", + "./helpers/classApplyDescriptorGet": [ + { + "node": "./helpers/classApplyDescriptorGet.js", + "import": "./helpers/esm/classApplyDescriptorGet.js", + "default": "./helpers/classApplyDescriptorGet.js" + }, + "./helpers/classApplyDescriptorGet.js" + ], + "./helpers/esm/classApplyDescriptorGet": "./helpers/esm/classApplyDescriptorGet.js", + "./helpers/classApplyDescriptorSet": [ + { + "node": "./helpers/classApplyDescriptorSet.js", + "import": "./helpers/esm/classApplyDescriptorSet.js", + "default": "./helpers/classApplyDescriptorSet.js" + }, + "./helpers/classApplyDescriptorSet.js" + ], + "./helpers/esm/classApplyDescriptorSet": "./helpers/esm/classApplyDescriptorSet.js", + "./helpers/classApplyDescriptorDestructureSet": [ + { + "node": "./helpers/classApplyDescriptorDestructureSet.js", + "import": "./helpers/esm/classApplyDescriptorDestructureSet.js", + "default": "./helpers/classApplyDescriptorDestructureSet.js" + }, + "./helpers/classApplyDescriptorDestructureSet.js" + ], + "./helpers/esm/classApplyDescriptorDestructureSet": "./helpers/esm/classApplyDescriptorDestructureSet.js", + "./helpers/classStaticPrivateFieldDestructureSet": [ + { + "node": "./helpers/classStaticPrivateFieldDestructureSet.js", + "import": "./helpers/esm/classStaticPrivateFieldDestructureSet.js", + "default": "./helpers/classStaticPrivateFieldDestructureSet.js" + }, + "./helpers/classStaticPrivateFieldDestructureSet.js" + ], + "./helpers/esm/classStaticPrivateFieldDestructureSet": "./helpers/esm/classStaticPrivateFieldDestructureSet.js", + "./helpers/classCheckPrivateStaticAccess": [ + { + "node": "./helpers/classCheckPrivateStaticAccess.js", + "import": "./helpers/esm/classCheckPrivateStaticAccess.js", + "default": "./helpers/classCheckPrivateStaticAccess.js" + }, + "./helpers/classCheckPrivateStaticAccess.js" + ], + "./helpers/esm/classCheckPrivateStaticAccess": "./helpers/esm/classCheckPrivateStaticAccess.js", + "./helpers/classCheckPrivateStaticFieldDescriptor": [ + { + "node": "./helpers/classCheckPrivateStaticFieldDescriptor.js", + "import": "./helpers/esm/classCheckPrivateStaticFieldDescriptor.js", + "default": "./helpers/classCheckPrivateStaticFieldDescriptor.js" + }, + "./helpers/classCheckPrivateStaticFieldDescriptor.js" + ], + "./helpers/esm/classCheckPrivateStaticFieldDescriptor": "./helpers/esm/classCheckPrivateStaticFieldDescriptor.js", + "./helpers/decorate": [ + { + "node": "./helpers/decorate.js", + "import": "./helpers/esm/decorate.js", + "default": "./helpers/decorate.js" + }, + "./helpers/decorate.js" + ], + "./helpers/esm/decorate": "./helpers/esm/decorate.js", + "./helpers/classPrivateMethodGet": [ + { + "node": "./helpers/classPrivateMethodGet.js", + "import": "./helpers/esm/classPrivateMethodGet.js", + "default": "./helpers/classPrivateMethodGet.js" + }, + "./helpers/classPrivateMethodGet.js" + ], + "./helpers/esm/classPrivateMethodGet": "./helpers/esm/classPrivateMethodGet.js", + "./helpers/classPrivateMethodSet": [ + { + "node": "./helpers/classPrivateMethodSet.js", + "import": "./helpers/esm/classPrivateMethodSet.js", + "default": "./helpers/classPrivateMethodSet.js" + }, + "./helpers/classPrivateMethodSet.js" + ], + "./helpers/esm/classPrivateMethodSet": "./helpers/esm/classPrivateMethodSet.js", + "./package": "./package.json", + "./package.json": "./package.json", + "./regenerator": "./regenerator/index.js", + "./regenerator/*.js": "./regenerator/*.js", + "./regenerator/": "./regenerator/" + }, + "engines": { + "node": ">=6.9.0" + } +} \ No newline at end of file diff --git a/tests/node_modules/@babel/runtime/regenerator/index.js b/tests/node_modules/@babel/runtime/regenerator/index.js new file mode 100644 index 0000000..9fd4158 --- /dev/null +++ b/tests/node_modules/@babel/runtime/regenerator/index.js @@ -0,0 +1 @@ +module.exports = require("regenerator-runtime"); diff --git a/tests/node_modules/@project-serum/anchor/#package.json# b/tests/node_modules/@project-serum/anchor/#package.json# new file mode 100644 index 0000000..c965e8b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/#package.json# @@ -0,0 +1,63 @@ +{ + "name": "@project-serum/anchor", + "version": "0.11.1", + "description": "Anchor client", + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "license": "(MIT OR Apache-2.0)", + "types": "dist/index.d.ts", + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=11" + }, + "scripts": { + "build": "rm -rf dist/ && yarn build:node", + "build:node": "tsc && tsc -p tsconfig.cjs.json", + "lint:fix": "prettier src/** tests/** -w", + "lint": "prettier src/** tests/** --check", + "watch": "tsc -p tsconfig.cjs.json --watch", + "prepublishOnly": "yarn build", + "docs": "typedoc --excludePrivate --includeVersion --out ../docs/src/.vuepress/dist/ts/ --readme none src/index.ts", + "test": "jest tests --detectOpenHandles" + }, + "dependencies": { + "@project-serum/borsh": "^0.2.2", + "@solana/web3.js": "^1.17.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.0", + "camelcase": "^5.3.1", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "find": "^0.3.0", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "toml": "^3.0.0" + }, + "devDependencies": { + "@commitlint/cli": "^11.0.0", + "@commitlint/config-conventional": "^11.0.0", + "@types/bn.js": "^4.11.6", + "@types/bs58": "^4.0.1", + "@types/crypto-hash": "^1.1.2", + "@types/jest": "^26.0.15", + "@types/pako": "^1.0.1", + "@typescript-eslint/eslint-plugin": "^4.6.0", + "@typescript-eslint/parser": "^4.6.0", + "eslint": "^7.12.1", + "eslint-config-prettier": "^6.15.0", + "husky": "^4.3.0", + "jest": "26.6.0", + "jest-config": "26.6.0", + "lint-staged": "^10.5.0", + "prettier": "^2.1.2", + "ts-jest": "^26.4.3", + "ts-node": "^9.0.0", + "typedoc": "^0.20.36", + "typescript": "^4.0.5" + } +} diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js new file mode 100644 index 0000000..7e3b7ad --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.accountDiscriminator = exports.AccountsCoder = exports.ACCOUNT_DISCRIMINATOR_SIZE = void 0; +const idl_1 = require("./idl"); +const js_sha256_1 = require("js-sha256"); +/** + * Number of bytes of the account discriminator. + */ +exports.ACCOUNT_DISCRIMINATOR_SIZE = 8; +/** + * Encodes and decodes account objects. + */ +class AccountsCoder { + constructor(idl) { + if (idl.accounts === undefined) { + this.accountLayouts = new Map(); + return; + } + const layouts = idl.accounts.map((acc) => { + return [acc.name, idl_1.IdlCoder.typeDefLayout(acc, idl.types)]; + }); + this.accountLayouts = new Map(layouts); + } + async encode(accountName, account) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const layout = this.accountLayouts.get(accountName); + const len = layout.encode(account, buffer); + let accountData = buffer.slice(0, len); + let discriminator = await accountDiscriminator(accountName); + return Buffer.concat([discriminator, accountData]); + } + decode(accountName, ix) { + // Chop off the discriminator before decoding. + const data = ix.slice(8); + const layout = this.accountLayouts.get(accountName); + return layout.decode(data); + } +} +exports.AccountsCoder = AccountsCoder; +// Calculates unique 8 byte discriminator prepended to all anchor accounts. +async function accountDiscriminator(name) { + return Buffer.from(js_sha256_1.sha256.digest(`account:${name}`)).slice(0, 8); +} +exports.accountDiscriminator = accountDiscriminator; +//# sourceMappingURL=accounts.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js.map new file mode 100644 index 0000000..f46ea02 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/accounts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/coder/accounts.ts"],"names":[],"mappings":";;;AAEA,+BAAiC;AACjC,yCAAmC;AAEnC;;GAEG;AACU,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;GAEG;AACH,MAAa,aAAa;IAMxB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;YAChC,OAAO;SACR;QACD,MAAM,OAAO,GAAuB,GAAG,CAAC,Q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,CAAC,EAAE,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,oDAEC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js new file mode 100644 index 0000000..3056b82 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js @@ -0,0 +1,107 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sighash = exports.accountSize = void 0; +const snake_case_1 = require("snake-case"); +const js_sha256_1 = require("js-sha256"); +const error_1 = require("../error"); +function accountSize(idl, idlAccount) { + if (idlAccount.type.kind === "enum") { + let variantSizes = idlAccount.type.variants.map((variant) => { + if (variant.fields === undefined) { + return 0; + } + return (variant.fields + // @ts-ignore + .map((f) => { + // @ts-ignore + if (f.name === undefined) { + throw new Error("Tuple enum variants not yet implemented."); + } + // @ts-ignore + return typeSize(idl, f.type); + }) + .reduce((a, b) => a + b)); + }); + return Math.max(...variantSizes) + 1; + } + if (idlAccount.type.fields === undefined) { + return 0; + } + return idlAccount.type.fields + .map((f) => typeSize(idl, f.type)) + .reduce((a, b) => a + b); +} +exports.accountSize = accountSize; +// Returns the size of the type in bytes. For variable length types, just return +// 1. Users should override this value in such cases. +function typeSize(idl, ty) { + switch (ty) { + case "bool": + return 1; + case "u8": + return 1; + case "i8": + return 1; + case "i16": + return 2; + case "u16": + return 2; + case "u32": + return 4; + case "i32": + return 4; + case "u64": + return 8; + case "i64": + return 8; + case "u128": + return 16; + case "i128": + return 16; + case "bytes": + return 1; + case "string": + return 1; + case "publicKey": + return 32; + default: + // @ts-ignore + if (ty.vec !== undefined) { + return 1; + } + // @ts-ignore + if (ty.option !== undefined) { + // @ts-ignore + return 1 + typeSize(idl, ty.option); + } + // @ts-ignore + if (ty.defined !== undefined) { + // @ts-ignore + const filtered = idl.types.filter((t) => t.name === ty.defined); + if (filtered.length !== 1) { + throw new error_1.IdlError(`Type not found: ${JSON.stringify(ty)}`); + } + let typeDef = filtered[0]; + return accountSize(idl, typeDef); + } + // @ts-ignore + if (ty.array !== undefined) { + // @ts-ignore + let arrayTy = ty.array[0]; + // @ts-ignore + let arraySize = ty.array[1]; + // @ts-ignore + return typeSize(idl, arrayTy) * arraySize; + } + throw new Error(`Invalid type ${JSON.stringify(ty)}`); + } +} +// Not technically sighash, since we don't include the arguments, as Rust +// doesn't allow function overloading. +function sighash(nameSpace, ixName) { + let name = snake_case_1.snakeCase(ixName); + let preimage = `${nameSpace}:${name}`; + return Buffer.from(js_sha256_1.sha256.digest(preimage)).slice(0, 8); +} +exports.sighash = sighash; +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js.map new file mode 100644 index 0000000..7c72c81 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/coder/common.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,yCAAmC;AAEnC,oCAAoC;AAEpC,SAAgB,WAAW,CACzB,GAAQ,EACR,UAAsB;IAEtB,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;QACnC,IAAI,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAC7C,CAAC,OAAuB,EAAE,EAAE;YAC1B,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;gBAChC,OAAO,CAAC,CAAC;aACV;YACD,OAAO,CACL,OAAO,CAAC,MAAM;gBACZ,aAAa;iBACZ,GAAG,CAAC,CAAC,CAAqB,EAAE,EAAE;gBAC7B,aAAa;gBACb,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE;oBACxB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;iBAC7D;gBACD,aAAa;gBACb,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,sCAAsC;AACtC,SAAgB,OAAO,CAAC,SAAiB,EAAE,MAAc;IACvD,IAAI,IAAI,GAAG,sBAAS,CAAC,MAAM,CAAC,CAAC;IAC7B,IAAI,QAAQ,GAAG,GAAG,SAAS,IAAI,IAAI,EAAE,CAAC;IACtC,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC;AAJD,0BAIC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js new file mode 100644 index 0000000..fe7a352 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js @@ -0,0 +1,78 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.eventDiscriminator = exports.EventCoder = void 0; +const base64 = __importStar(require("base64-js")); +const js_sha256_1 = require("js-sha256"); +const idl_1 = require("./idl"); +class EventCoder { + constructor(idl) { + if (idl.events === undefined) { + this.layouts = new Map(); + return; + } + const layouts = idl.events.map((event) => { + let eventTypeDef = { + name: event.name, + type: { + kind: "struct", + fields: event.fields.map((f) => { + return { name: f.name, type: f.type }; + }), + }, + }; + return [event.name, idl_1.IdlCoder.typeDefLayout(eventTypeDef, idl.types)]; + }); + // @ts-ignore + this.layouts = new Map(layouts); + this.discriminators = new Map(idl.events === undefined + ? [] + : idl.events.map((e) => [ + base64.fromByteArray(eventDiscriminator(e.name)), + e.name, + ])); + } + decode(log) { + let logArr; + // This will throw if log length is not a multiple of 4. + try { + logArr = Buffer.from(base64.toByteArray(log)); + } + catch (e) { + return null; + } + const disc = base64.fromByteArray(logArr.slice(0, 8)); + // Only deserialize if the discriminator implies a proper event. + const eventName = this.discriminators.get(disc); + if (eventName === undefined) { + return null; + } + const layout = this.layouts.get(eventName); + const data = layout.decode(logArr.slice(8)); + return { data, name: eventName }; + } +} +exports.EventCoder = EventCoder; +function eventDiscriminator(name) { + return Buffer.from(js_sha256_1.sha256.digest(`event:${name}`)).slice(0, 8); +} +exports.eventDiscriminator = eventDiscriminator; +//# sourceMappingURL=event.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js.map new file mode 100644 index 0000000..d086498 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/event.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../src/coder/event.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAoC;AAEpC,yCAAmC;AAGnC,+BAAiC;AAEjC,MAAa,UAAU;IAWrB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE;YAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;YACzB,OAAO;SACR;QACD,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACvC,IAAI,YAAY,GAAe;gBAC7B,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IA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K,SAAS,EAAE;YAC3B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IACnC,CAAC;CACF;AA7DD,gCA6DC;AAED,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAM,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC;AAFD,gDAEC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js new file mode 100644 index 0000000..ad77948 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js @@ -0,0 +1,161 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdlCoder = void 0; +const camelcase_1 = __importDefault(require("camelcase")); +const borsh = __importStar(require("@project-serum/borsh")); +const error_1 = require("../error"); +class IdlCoder { + static fieldLayout(field, types) { + const fieldName = field.name !== undefined ? camelcase_1.default(field.name) : undefined; + switch (field.type) { + case "bool": { + return borsh.bool(fieldName); + } + case "u8": { + return borsh.u8(fieldName); + } + case "i8": { + return borsh.i8(fieldName); + } + case "u16": { + return borsh.u16(fieldName); + } + case "i16": { + return borsh.i16(fieldName); + } + case "u32": { + return borsh.u32(fieldName); + } + case "i32": { + return borsh.i32(fieldName); + } + case "u64": { + return borsh.u64(fieldName); + } + case "i64": { + return borsh.i64(fieldName); + } + case "u128": { + return borsh.u128(fieldName); + } + case "i128": { + return borsh.i128(fieldName); + } + case "bytes": { + return borsh.vecU8(fieldName); + } + case "string": { + return borsh.str(fieldName); + } + case "publicKey": { + return borsh.publicKey(fieldName); + } + default: { + // @ts-ignore + if (field.type.vec) { + return borsh.vec(IdlCoder.fieldLayout({ + name: undefined, + // @ts-ignore + type: field.type.vec, + }, types), fieldName); + // @ts-ignore + } + else if (field.type.option) { + return borsh.option(IdlCoder.fieldLayout({ + name: undefined, + // @ts-ignore + type: field.type.option, + }, types), fieldName); + // @ts-ignore + } + else if (field.type.defined) { + // User defined type. + if (types === undefined) { + throw new error_1.IdlError("User defined types not provided"); + } + // @ts-ignore + const filtered = types.filter((t) => t.name === field.type.defined); + if (filtered.length !== 1) { + throw new error_1.IdlError(`Type not found: ${JSON.stringify(field)}`); + } + return IdlCoder.typeDefLayout(filtered[0], types, fieldName); + // @ts-ignore + } + else if (field.type.array) { + // @ts-ignore + let arrayTy = field.type.array[0]; + // @ts-ignore + let arrayLen = field.type.array[1]; + let innerLayout = IdlCoder.fieldLayout({ + name: undefined, + type: arrayTy, + }, types); + return borsh.array(innerLayout, arrayLen, fieldName); + } + else { + throw new Error(`Not yet implemented: ${field}`); + } + } + } + } + static typeDefLayout(typeDef, types, name) { + if (typeDef.type.kind === "struct") { + const fieldLayouts = typeDef.type.fields.map((field) => { + const x = IdlCoder.fieldLayout(field, types); + return x; + }); + return borsh.struct(fieldLayouts, name); + } + else if (typeDef.type.kind === "enum") { + let variants = typeDef.type.variants.map((variant) => { + const name = camelcase_1.default(variant.name); + if (variant.fields === undefined) { + return borsh.struct([], name); + } + // @ts-ignore + const fieldLayouts = variant.fields.map((f) => { + // @ts-ignore + if (f.name === undefined) { + throw new Error("Tuple enum variants not yet implemented."); + } + // @ts-ignore + return IdlCoder.fieldLayout(f, types); + }); + return borsh.struct(fieldLayouts, name); + }); + if (name !== undefined) { + // Buffer-layout lib requires the name to be null (on construction) + // when used as a field. + return borsh.rustEnum(variants).replicate(name); + } + return borsh.rustEnum(variants, name); + } + else { + throw new Error(`Unknown type kint: ${typeDef}`); + } + } +} +exports.IdlCoder = IdlCoder; +//# sourceMappingURL=idl.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js.map new file mode 100644 index 0000000..0835b6c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/idl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"idl.js","sourceRoot":"","sources":["../../../src/coder/idl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAkC;AAElC,4DAA8C;AAE9C,oCAAoC;AAEpC,MAAa,QAAQ;IACZ,MAAM,CAAC,WAAW,CAAC,KAAe,EAAE,KAAoB;QAC7D,MAAM,SAAS,GACb,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,mBAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/D,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,MAAM,CAAC,CAAC;gBACX,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAA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AC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAqB,EAAE,EAAE;oBAChE,aAAa;oBACb,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE;wBACxB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;qBAC7D;oBACD,aAAa;oBACb,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;gBACH,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;YAEH,IAAI,IAAI,KAAK,SAAS,EAAE;gBACtB,mEAAmE;gBACnE,wBAAwB;gBACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;aACjD;YAED,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACvC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,sBAAsB,OAAO,EAAE,CAAC,CAAC;SAClD;IACH,CAAC;CACF;AAnJD,4BAmJC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js new file mode 100644 index 0000000..8c5ed98 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stateDiscriminator = exports.StateCoder = exports.eventDiscriminator = exports.EventCoder = exports.ACCOUNT_DISCRIMINATOR_SIZE = exports.accountDiscriminator = exports.AccountsCoder = exports.InstructionCoder = exports.TypesCoder = exports.accountSize = void 0; +const instruction_1 = require("./instruction"); +const accounts_1 = require("./accounts"); +const types_1 = require("./types"); +const event_1 = require("./event"); +const state_1 = require("./state"); +const common_1 = require("./common"); +var common_2 = require("./common"); +Object.defineProperty(exports, "accountSize", { enumerable: true, get: function () { return common_2.accountSize; } }); +var types_2 = require("./types"); +Object.defineProperty(exports, "TypesCoder", { enumerable: true, get: function () { return types_2.TypesCoder; } }); +var instruction_2 = require("./instruction"); +Object.defineProperty(exports, "InstructionCoder", { enumerable: true, get: function () { return instruction_2.InstructionCoder; } }); +var accounts_2 = require("./accounts"); +Object.defineProperty(exports, "AccountsCoder", { enumerable: true, get: function () { return accounts_2.AccountsCoder; } }); +Object.defineProperty(exports, "accountDiscriminator", { enumerable: true, get: function () { return accounts_2.accountDiscriminator; } }); +Object.defineProperty(exports, "ACCOUNT_DISCRIMINATOR_SIZE", { enumerable: true, get: function () { return accounts_2.ACCOUNT_DISCRIMINATOR_SIZE; } }); +var event_2 = require("./event"); +Object.defineProperty(exports, "EventCoder", { enumerable: true, get: function () { return event_2.EventCoder; } }); +Object.defineProperty(exports, "eventDiscriminator", { enumerable: true, get: function () { return event_2.eventDiscriminator; } }); +var state_2 = require("./state"); +Object.defineProperty(exports, "StateCoder", { enumerable: true, get: function () { return state_2.StateCoder; } }); +Object.defineProperty(exports, "stateDiscriminator", { enumerable: true, get: function () { return state_2.stateDiscriminator; } }); +/** + * Coder provides a facade for encoding and decoding all IDL related objects. + */ +class Coder { + constructor(idl) { + this.instruction = new instruction_1.InstructionCoder(idl); + this.accounts = new accounts_1.AccountsCoder(idl); + this.types = new types_1.TypesCoder(idl); + this.events = new event_1.EventCoder(idl); + if (idl.state) { + this.state = new state_1.StateCoder(idl); + } + } + sighash(nameSpace, ixName) { + return common_1.sighash(nameSpace, ixName); + } +} +exports.default = Coder; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js.map new file mode 100644 index 0000000..c29db12 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/coder/index.ts"],"names":[],"mappings":";;;AACA,+CAAiD;AACjD,yCAA2C;AAC3C,mCAAqC;AACrC,mCAAqC;AACrC,mCAAqC;AACrC,qCAAmC;AAEnC,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AACpB,iCAAqC;AAA5B,mGAAA,UAAU,OAAA;AACnB,6CAAiD;AAAxC,+GAAA,gBAAgB,OAAA;AACzB,uCAIoB;AAHlB,yGAAA,aAAa,OAAA;AACb,gHAAA,oBAAoB,OAAA;AACpB,sHAAA,0BAA0B,OAAA;AAE5B,iCAAyD;AAAhD,mGAAA,UAAU,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AACvC,iCAAyD;AAAhD,mGAAA,UAAU,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAEvC;;GAEG;AACH,MAAqB,KAAK;IA0BxB,YAAY,GAAQ;QAClB,IAAI,CAAC,WAAW,GAAG,IAAI,8BAAgB,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAa,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,kBAAU,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAU,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,KAAK,EAAE;YACb,IAAI,CAAC,KAAK,GAAG,IAAI,kBAAU,CAAC,GAAG,CAAC,CAAC;SAClC;IACH,CAAC;IAEM,OAAO,CAAC,SAAiB,EAAE,MAAc;QAC9C,OAAO,gBAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;CACF;AAvCD,wBAuCC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js new file mode 100644 index 0000000..1428aec --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js @@ -0,0 +1,302 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InstructionCoder = exports.SIGHASH_GLOBAL_NAMESPACE = exports.SIGHASH_STATE_NAMESPACE = void 0; +const camelcase_1 = __importDefault(require("camelcase")); +const borsh = __importStar(require("@project-serum/borsh")); +const bs58 = __importStar(require("bs58")); +const idl_1 = require("./idl"); +const common_1 = require("./common"); +/** + * Namespace for state method function signatures. + */ +exports.SIGHASH_STATE_NAMESPACE = "state"; +/** + * Namespace for global instruction function signatures (i.e. functions + * that aren't namespaced by the state or any of its trait implementations). + */ +exports.SIGHASH_GLOBAL_NAMESPACE = "global"; +/** + * Encodes and decodes program instructions. + */ +class InstructionCoder { + constructor(idl) { + this.idl = idl; + this.ixLayout = InstructionCoder.parseIxLayout(idl); + const sighashLayouts = new Map(); + idl.instructions.forEach((ix) => { + const sh = common_1.sighash(exports.SIGHASH_GLOBAL_NAMESPACE, ix.name); + sighashLayouts.set(bs58.encode(sh), { + layout: this.ixLayout.get(ix.name), + name: ix.name, + }); + }); + if (idl.state) { + idl.state.methods.map((ix) => { + const sh = common_1.sighash(exports.SIGHASH_STATE_NAMESPACE, ix.name); + sighashLayouts.set(bs58.encode(sh), { + layout: this.ixLayout.get(ix.name), + name: ix.name, + }); + }); + } + this.sighashLayouts = sighashLayouts; + } + /** + * Encodes a program instruction. + */ + encode(ixName, ix) { + return this._encode(exports.SIGHASH_GLOBAL_NAMESPACE, ixName, ix); + } + /** + * Encodes a program state instruction. + */ + encodeState(ixName, ix) { + return this._encode(exports.SIGHASH_STATE_NAMESPACE, ixName, ix); + } + _encode(nameSpace, ixName, ix) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const methodName = camelcase_1.default(ixName); + const len = this.ixLayout.get(methodName).encode(ix, buffer); + const data = buffer.slice(0, len); + return Buffer.concat([common_1.sighash(nameSpace, ixName), data]); + } + static parseIxLayout(idl) { + const stateMethods = idl.state ? idl.state.methods : []; + const ixLayouts = stateMethods + .map((m) => { + let fieldLayouts = m.args.map((arg) => { + var _a, _b; + return idl_1.IdlCoder.fieldLayout(arg, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])])); + }); + const name = camelcase_1.default(m.name); + return [name, borsh.struct(fieldLayouts, name)]; + }) + .concat(idl.instructions.map((ix) => { + let fieldLayouts = ix.args.map((arg) => { + var _a, _b; + return idl_1.IdlCoder.fieldLayout(arg, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])])); + }); + const name = camelcase_1.default(ix.name); + return [name, borsh.struct(fieldLayouts, name)]; + })); + // @ts-ignore + return new Map(ixLayouts); + } + /** + * Dewcodes a program instruction. + */ + decode(ix, encoding = "hex") { + if (typeof ix === "string") { + ix = encoding === "hex" ? Buffer.from(ix, "hex") : bs58.decode(ix); + } + let sighash = bs58.encode(ix.slice(0, 8)); + let data = ix.slice(8); + const decoder = this.sighashLayouts.get(sighash); + if (!decoder) { + return null; + } + return { + data: decoder.layout.decode(data), + name: decoder.name, + }; + } + /** + * Returns a formatted table of all the fields in the given instruction data. + */ + format(ix, accountMetas) { + return InstructionFormatter.format(ix, accountMetas, this.idl); + } +} +exports.InstructionCoder = InstructionCoder; +class InstructionFormatter { + static format(ix, accountMetas, idl) { + const idlIx = idl.instructions.filter((i) => ix.name === i.name)[0]; + if (idlIx === undefined) { + console.error("Invalid instruction given"); + return null; + } + const args = idlIx.args.map((idlField) => { + return { + name: idlField.name, + type: InstructionFormatter.formatIdlType(idlField.type), + data: InstructionFormatter.formatIdlData(idlField, ix.data[idlField.name], idl.types), + }; + }); + const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts(idlIx.accounts); + const accounts = accountMetas.map((meta, idx) => { + if (idx < flatIdlAccounts.length) { + return { + name: flatIdlAccounts[idx].name, + ...meta, + }; + } + // "Remaining accounts" are unnamed in Anchor. + else { + return { + name: undefined, + ...meta, + }; + } + }); + return { + args, + accounts, + }; + } + static formatIdlType(idlType) { + if (typeof idlType === "string") { + return idlType; + } + // @ts-ignore + if (idlType.vec) { + // @ts-ignore + return `Vec<${this.formatIdlType(idlType.vec)}>`; + } + // @ts-ignore + if (idlType.option) { + // @ts-ignore + return `Option<${this.formatIdlType(idlType.option)}>`; + } + // @ts-ignore + if (idlType.defined) { + // @ts-ignore + return idlType.defined; + } + } + static formatIdlData(idlField, data, types) { + if (typeof idlField.type === "string") { + return data.toString(); + } + // @ts-ignore + if (idlField.type.vec) { + // @ts-ignore + return ("[" + + data + // @ts-ignore + .map((d) => this.formatIdlData( + // @ts-ignore + { name: "", type: idlField.type.vec }, d)) + .join(", ") + + "]"); + } + // @ts-ignore + if (idlField.type.option) { + // @ts-ignore + return data === null + ? "null" + : this.formatIdlData( + // @ts-ignore + { name: "", type: idlField.type.option }, data); + } + // @ts-ignore + if (idlField.type.defined) { + if (types === undefined) { + throw new Error("User defined types not provided"); + } + // @ts-ignore + const filtered = types.filter((t) => t.name === idlField.type.defined); + if (filtered.length !== 1) { + // @ts-ignore + throw new Error(`Type not found: ${idlField.type.defined}`); + } + return InstructionFormatter.formatIdlDataDefined(filtered[0], data, types); + } + return "unknown"; + } + static formatIdlDataDefined(typeDef, data, types) { + if (typeDef.type.kind === "struct") { + const fields = Object.keys(data) + .map((k) => { + const f = typeDef.type.fields.filter((f) => f.name === k)[0]; + if (f === undefined) { + throw new Error("Unable to find type"); + } + return (k + ": " + InstructionFormatter.formatIdlData(f, data[k], types)); + }) + .join(", "); + return "{ " + fields + " }"; + } + else { + if (typeDef.type.variants.length === 0) { + return "{}"; + } + // Struct enum. + if (typeDef.type.variants[0].name) { + const variant = Object.keys(data)[0]; + const enumType = data[variant]; + const namedFields = Object.keys(enumType) + .map((f) => { + var _a; + const fieldData = enumType[f]; + const idlField = (_a = typeDef.type.variants[variant]) === null || _a === void 0 ? void 0 : _a.filter((v) => v.name === f)[0]; + if (idlField === undefined) { + throw new Error("Unable to find variant"); + } + return (f + + ": " + + InstructionFormatter.formatIdlData(idlField, fieldData, types)); + }) + .join(", "); + const variantName = camelcase_1.default(variant, { pascalCase: true }); + if (namedFields.length === 0) { + return variantName; + } + return `${variantName} { ${namedFields} }`; + } + // Tuple enum. + else { + // TODO. + return "Tuple formatting not yet implemented"; + } + } + } + static flattenIdlAccounts(accounts, prefix) { + // @ts-ignore + return accounts + .map((account) => { + const accName = sentenceCase(account.name); + // @ts-ignore + if (account.accounts) { + const newPrefix = prefix ? `${prefix} > ${accName}` : accName; + // @ts-ignore + return InstructionFormatter.flattenIdlAccounts( + // @ts-ignore + account.accounts, newPrefix); + } + else { + return { + ...account, + name: prefix ? `${prefix} > ${accName}` : accName, + }; + } + }) + .flat(); + } +} +function sentenceCase(field) { + const result = field.replace(/([A-Z])/g, " $1"); + return result.charAt(0).toUpperCase() + result.slice(1); +} +//# sourceMappingURL=instruction.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/instruction.js.map new file mode 100644 index 0000000..76b0191 --- /dev/null +++ b/tests/node_modules/@project-serum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AAQ,EAAE;gBACpB,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;gBAC9D,aAAa;gBACb,OAAO,oBAAoB,CAAC,kBAAkB;gBAC5C,aAAa;gBACb,OAAO,CAAC,QAAQ,EAChB,SAAS,CACV,CAAC;aACH;iBAAM;gBACL,OAAO;oBACL,GAAG,OAAO;oBACV,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO;iBAClD,CAAC;aACH;QACH,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IACZ,CAAC;CACF;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js new file mode 100644 index 0000000..863ba65 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js @@ -0,0 +1,53 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stateDiscriminator = exports.StateCoder = void 0; +const js_sha256_1 = require("js-sha256"); +const idl_1 = require("./idl"); +const features = __importStar(require("../utils/features")); +class StateCoder { + constructor(idl) { + if (idl.state === undefined) { + throw new Error("Idl state not defined."); + } + this.layout = idl_1.IdlCoder.typeDefLayout(idl.state.struct, idl.types); + } + async encode(name, account) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const len = this.layout.encode(account, buffer); + const disc = await stateDiscriminator(name); + const accData = buffer.slice(0, len); + return Buffer.concat([disc, accData]); + } + decode(ix) { + // Chop off discriminator. + const data = ix.slice(8); + return this.layout.decode(data); + } +} +exports.StateCoder = StateCoder; +// Calculates unique 8 byte discriminator prepended to all anchor state accounts. +async function stateDiscriminator(name) { + let ns = features.isSet("anchor-deprecated-state") ? "account" : "state"; + return Buffer.from(js_sha256_1.sha256.digest(`${ns}:${name}`)).slice(0, 8); +} +exports.stateDiscriminator = stateDiscriminator; +//# sourceMappingURL=state.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js.map new file mode 100644 index 0000000..b1e5998 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/coder/state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,yCAAmC;AAEnC,+BAAiC;AACjC,4DAA8C;AAE9C,MAAa,UAAU;IAGrB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,MAAM,GAAG,cAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;IAEM,KAAK,CAAC,MAAM,CAAU,IAAY,EAAE,OAAU;QACnD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;QACjE,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAEhD,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAErC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACxC,CAAC;IAEM,MAAM,CAAU,EAAU;QAC/B,0BAA0B;QAC1B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAzBD,gCAyBC;AAED,iFAAiF;AAC1E,KAAK,UAAU,kBAAkB,CAAC,IAAY;IACnD,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC;AAHD,gDAGC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js new file mode 100644 index 0000000..0f2c5cf --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypesCoder = void 0; +const idl_1 = require("./idl"); +/** + * Encodes and decodes user defined types. + */ +class TypesCoder { + constructor(idl) { + if (idl.types === undefined) { + this.layouts = new Map(); + return; + } + const layouts = idl.types.map((acc) => { + return [acc.name, idl_1.IdlCoder.typeDefLayout(acc, idl.types)]; + }); + // @ts-ignore + this.layouts = new Map(layouts); + } + encode(accountName, account) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const layout = this.layouts.get(accountName); + const len = layout.encode(account, buffer); + return buffer.slice(0, len); + } + decode(accountName, ix) { + const layout = this.layouts.get(accountName); + return layout.decode(ix); + } +} +exports.TypesCoder = TypesCoder; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js.map new file mode 100644 index 0000000..9e202f2 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/coder/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/coder/types.ts"],"names":[],"mappings":";;;AAEA,+BAAiC;AAEjC;;GAEG;AACH,MAAa,UAAU;IAMrB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;YACzB,OAAO;SACR;QACD,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACpC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,cAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,aAAa;QACb,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAEM,MAAM,CAAU,WAAmB,EAAE,OAAU;QACpD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC7C,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3C,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAU,WAAmB,EAAE,EAAU;QACpD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;CACF;AA9BD,gCA8BC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/error.js b/tests/node_modules/@project-serum/anchor/dist/cjs/error.js new file mode 100644 index 0000000..3ea7e59 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/error.js @@ -0,0 +1,162 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgramError = exports.IdlError = void 0; +class IdlError extends Error { +} +exports.IdlError = IdlError; +// An error from a user defined program. +class ProgramError extends Error { + constructor(code, msg, ...params) { + super(...params); + this.code = code; + this.msg = msg; + } + static parse(err, idlErrors) { + // TODO: don't rely on the error string. web3.js should preserve the error + // code information instead of giving us an untyped string. + let components = err.toString().split("custom program error: "); + if (components.length !== 2) { + return null; + } + let errorCode; + try { + errorCode = parseInt(components[1]); + } + catch (parseErr) { + return null; + } + // Parse user error. + let errorMsg = idlErrors.get(errorCode); + if (errorMsg !== undefined) { + return new ProgramError(errorCode, errorMsg); + } + // Parse framework internal error. + errorMsg = LangErrorMessage.get(errorCode); + if (errorMsg !== undefined) { + return new ProgramError(errorCode, errorMsg); + } + // Unable to parse the error. Just return the untranslated error. + return null; + } + toString() { + return this.msg; + } +} +exports.ProgramError = ProgramError; +const LangErrorCode = { + // Instructions. + InstructionMissing: 100, + InstructionFallbackNotFound: 101, + InstructionDidNotDeserialize: 102, + InstructionDidNotSerialize: 103, + // IDL instructions. + IdlInstructionStub: 120, + IdlInstructionInvalidProgram: 121, + // Constraints. + ConstraintMut: 140, + ConstraintHasOne: 141, + ConstraintSigner: 142, + ConstraintRaw: 143, + ConstraintOwner: 144, + ConstraintRentExempt: 145, + ConstraintSeeds: 146, + ConstraintExecutable: 147, + ConstraintState: 148, + ConstraintAssociated: 149, + ConstraintAssociatedInit: 150, + ConstraintClose: 151, + ConstraintAddress: 152, + // Accounts. + AccountDiscriminatorAlreadySet: 160, + AccountDiscriminatorNotFound: 161, + AccountDiscriminatorMismatch: 162, + AccountDidNotDeserialize: 163, + AccountDidNotSerialize: 164, + AccountNotEnoughKeys: 165, + AccountNotMutable: 166, + AccountNotProgramOwned: 167, + // State. + StateInvalidAddress: 180, + // Used for APIs that shouldn't be used anymore. + Deprecated: 299, +}; +const LangErrorMessage = new Map([ + // Instructions. + [ + LangErrorCode.InstructionMissing, + "8 byte instruction identifier not provided", + ], + [ + LangErrorCode.InstructionFallbackNotFound, + "Fallback functions are not supported", + ], + [ + LangErrorCode.InstructionDidNotDeserialize, + "The program could not deserialize the given instruction", + ], + [ + LangErrorCode.InstructionDidNotSerialize, + "The program could not serialize the given instruction", + ], + // Idl instructions. + [ + LangErrorCode.IdlInstructionStub, + "The program was compiled without idl instructions", + ], + [ + LangErrorCode.IdlInstructionInvalidProgram, + "The transaction was given an invalid program for the IDL instruction", + ], + // Constraints. + [LangErrorCode.ConstraintMut, "A mut constraint was violated"], + [LangErrorCode.ConstraintHasOne, "A has_one constraint was violated"], + [LangErrorCode.ConstraintSigner, "A signer constraint was violated"], + [LangErrorCode.ConstraintRaw, "A raw constraint as violated"], + [LangErrorCode.ConstraintOwner, "An owner constraint was violated"], + [LangErrorCode.ConstraintRentExempt, "A rent exempt constraint was violated"], + [LangErrorCode.ConstraintSeeds, "A seeds constraint was violated"], + [LangErrorCode.ConstraintExecutable, "An executable constraint was violated"], + [LangErrorCode.ConstraintState, "A state constraint was violated"], + [LangErrorCode.ConstraintAssociated, "An associated constraint was violated"], + [ + LangErrorCode.ConstraintAssociatedInit, + "An associated init constraint was violated", + ], + [LangErrorCode.ConstraintClose, "A close constraint was violated"], + [LangErrorCode.ConstraintAddress, "An address constraint was violated"], + // Accounts. + [ + LangErrorCode.AccountDiscriminatorAlreadySet, + "The account discriminator was already set on this account", + ], + [ + LangErrorCode.AccountDiscriminatorNotFound, + "No 8 byte discriminator was found on the account", + ], + [ + LangErrorCode.AccountDiscriminatorMismatch, + "8 byte discriminator did not match what was expected", + ], + [LangErrorCode.AccountDidNotDeserialize, "Failed to deserialize the account"], + [LangErrorCode.AccountDidNotSerialize, "Failed to serialize the account"], + [ + LangErrorCode.AccountNotEnoughKeys, + "Not enough account keys given to the instruction", + ], + [LangErrorCode.AccountNotMutable, "The given account is not mutable"], + [ + LangErrorCode.AccountNotProgramOwned, + "The given account is not owned by the executing program", + ], + // State. + [ + LangErrorCode.StateInvalidAddress, + "The given state account does not have the correct address", + ], + // Misc. + [ + LangErrorCode.Deprecated, + "The API being used is deprecated and should no longer be used", + ], +]); +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/error.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/error.js.map new file mode 100644 index 0000000..7948bd4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAS,SAAQ,KAAK;CAAG;AAAtC,4BAAsC;AAEtC,wCAAwC;AACxC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mC,CAAC;IACrE,CAAC,aAAa,CAAC,gBAAgB,EAAE,kCAAkC,CAAC;IACpE,CAAC,aAAa,CAAC,aAAa,EAAE,8BAA8B,CAAC;IAC7D,CAAC,aAAa,CAAC,eAAe,EAAE,kCAAkC,CAAC;IACnE,CAAC,aAAa,CAAC,oBAAoB,EAAE,uCAAuC,CAAC;IAC7E,CAAC,aAAa,CAAC,eAAe,EAAE,iCAAiC,CAAC;IAClE,CAAC,aAAa,CAAC,oBAAoB,EAAE,uCAAuC,CAAC;IAC7E,CAAC,aAAa,CAAC,eAAe,EAAE,iCAAiC,CAAC;IAClE,CAAC,aAAa,CAAC,oBAAoB,EAAE,uCAAuC,CAAC;IAC7E;QACE,aAAa,CAAC,wBAAwB;QACtC,4CAA4C;KAC7C;IACD,CAAC,aAAa,CAAC,eAAe,EAAE,iCAAiC,CAAC;IAClE,CAAC,aAAa,CAAC,iBAAiB,EAAE,oCAAoC,CAAC;IAEvE,YAAY;IACZ;QACE,aAAa,CAAC,8BAA8B;QAC5C,2DAA2D;KAC5D;IACD;QACE,aAAa,CAAC,4BAA4B;QAC1C,kDAAkD;KACnD;IACD;QACE,aAAa,CAAC,4BAA4B;QAC1C,sDAAsD;KACvD;IACD,CAAC,aAAa,CAAC,wBAAwB,EAAE,mCAAmC,CAAC;IAC7E,CAAC,aAAa,CAAC,sBAAsB,EAAE,iCAAiC,CAAC;IACzE;QACE,aAAa,CAAC,oBAAoB;QAClC,kDAAkD;KACnD;IACD,CAAC,aAAa,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IACrE;QACE,aAAa,CAAC,sBAAsB;QACpC,yDAAyD;KAC1D;IAED,SAAS;IACT;QACE,aAAa,CAAC,mBAAmB;QACjC,2DAA2D;KAC5D;IAED,QAAQ;IACR;QACE,aAAa,CAAC,UAAU;QACxB,+DAA+D;KAChE;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/idl.js b/tests/node_modules/@project-serum/anchor/dist/cjs/idl.js new file mode 100644 index 0000000..efb302a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/idl.js @@ -0,0 +1,50 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encodeIdlAccount = exports.decodeIdlAccount = exports.seed = exports.idlAddress = void 0; +const web3_js_1 = require("@solana/web3.js"); +const borsh = __importStar(require("@project-serum/borsh")); +// Deterministic IDL address as a function of the program id. +async function idlAddress(programId) { + const base = (await web3_js_1.PublicKey.findProgramAddress([], programId))[0]; + return await web3_js_1.PublicKey.createWithSeed(base, seed(), programId); +} +exports.idlAddress = idlAddress; +// Seed for generating the idlAddress. +function seed() { + return "anchor:idl"; +} +exports.seed = seed; +const IDL_ACCOUNT_LAYOUT = borsh.struct([ + borsh.publicKey("authority"), + borsh.vecU8("data"), +]); +function decodeIdlAccount(data) { + return IDL_ACCOUNT_LAYOUT.decode(data); +} +exports.decodeIdlAccount = decodeIdlAccount; +function encodeIdlAccount(acc) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const len = IDL_ACCOUNT_LAYOUT.encode(acc, buffer); + return buffer.slice(0, len); +} +exports.encodeIdlAccount = encodeIdlAccount; +//# sourceMappingURL=idl.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/idl.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/idl.js.map new file mode 100644 index 0000000..ffc852d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/idl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"idl.js","sourceRoot":"","sources":["../../src/idl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,4DAA8C;AAsH9C,6DAA6D;AACtD,KAAK,UAAU,UAAU,CAAC,SAAoB;IACnD,MAAM,IAAI,GAAG,CAAC,MAAM,mBAAS,CAAC,kBAAkB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,OAAO,MAAM,mBAAS,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC;AACjE,CAAC;AAHD,gCAGC;AAED,sCAAsC;AACtC,SAAgB,IAAI;IAClB,OAAO,YAAY,CAAC;AACtB,CAAC;AAFD,oBAEC;AAQD,MAAM,kBAAkB,GAAoC,KAAK,CAAC,MAAM,CAAC;IACvE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;IAC5B,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAFD,4CAEC;AAED,SAAgB,gBAAgB,CAAC,GAAsB;IACrD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;IACjE,MAAM,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9B,CAAC;AAJD,4CAIC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/index.js b/tests/node_modules/@project-serum/anchor/dist/cjs/index.js new file mode 100644 index 0000000..ec3170a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/index.js @@ -0,0 +1,53 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EventParser = exports.Wallet = exports.utils = exports.web3 = exports.BN = exports.Provider = exports.getProvider = exports.setProvider = exports.AccountsCoder = exports.TypesCoder = exports.StateCoder = exports.EventCoder = exports.InstructionCoder = exports.Coder = exports.StateClient = exports.AccountClient = exports.Program = exports.workspace = void 0; +const bn_js_1 = __importDefault(require("bn.js")); +exports.BN = bn_js_1.default; +const web3 = __importStar(require("@solana/web3.js")); +exports.web3 = web3; +const provider_1 = __importStar(require("./provider")); +exports.Provider = provider_1.default; +Object.defineProperty(exports, "getProvider", { enumerable: true, get: function () { return provider_1.getProvider; } }); +Object.defineProperty(exports, "setProvider", { enumerable: true, get: function () { return provider_1.setProvider; } }); +Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return provider_1.NodeWallet; } }); +const coder_1 = __importStar(require("./coder")); +exports.Coder = coder_1.default; +Object.defineProperty(exports, "InstructionCoder", { enumerable: true, get: function () { return coder_1.InstructionCoder; } }); +Object.defineProperty(exports, "EventCoder", { enumerable: true, get: function () { return coder_1.EventCoder; } }); +Object.defineProperty(exports, "StateCoder", { enumerable: true, get: function () { return coder_1.StateCoder; } }); +Object.defineProperty(exports, "TypesCoder", { enumerable: true, get: function () { return coder_1.TypesCoder; } }); +Object.defineProperty(exports, "AccountsCoder", { enumerable: true, get: function () { return coder_1.AccountsCoder; } }); +const workspace_1 = __importDefault(require("./workspace")); +exports.workspace = workspace_1.default; +const utils = __importStar(require("./utils")); +exports.utils = utils; +const program_1 = require("./program"); +Object.defineProperty(exports, "Program", { enumerable: true, get: function () { return program_1.Program; } }); +const namespace_1 = require("./program/namespace"); +Object.defineProperty(exports, "AccountClient", { enumerable: true, get: function () { return namespace_1.AccountClient; } }); +Object.defineProperty(exports, "StateClient", { enumerable: true, get: function () { return namespace_1.StateClient; } }); +const event_1 = require("./program/event"); +Object.defineProperty(exports, "EventParser", { enumerable: true, get: function () { return event_1.EventParser; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/index.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/index.js.map new file mode 100644 index 0000000..82284df --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuB;AAkErB,aAlEK,eAAE,CAkEL;AAjEJ,sDAAwC;AAkEtC,oBAAI;AAjEN,uDAIoB;AA2DlB,mBA/DK,kBAAQ,CA+DL;AADR,4FA7DA,sBAAW,OA6DA;AADX,4FA3DA,sBAAW,OA2DA;AAOX,uFAjEc,qBAAM,OAiEd;AA/DR,iDAMiB;AA0Cf,gBAhDK,eAAK,CAgDL;AACL,iGAhDA,wBAAgB,OAgDA;AAChB,2FAhDA,kBAAU,OAgDA;AACV,2FAhDA,kBAAU,OAgDA;AACV,2FAhDA,kBAAU,OAgDA;AACV,8FAhDA,qBAAa,OAgDA;AA5Cf,4DAAoC;AAuBlC,oBAvBK,mBAAS,CAuBL;AAtBX,+CAAiC;AAoD/B,sBAAK;AAnDP,uCAAoC;AAsBlC,wFAtBO,iBAAO,OAsBP;AAnBT,mDAa6B;AAQ3B,8FAlBA,yBAAa,OAkBA;AACb,4FAlBA,uBAAW,OAkBA;AAPb,2CAA8C;AAoC5C,4FApCO,mBAAW,OAoCP"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js new file mode 100644 index 0000000..05da383 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.translateAddress = exports.validateAccounts = exports.toInstruction = exports.parseIdlErrors = void 0; +const web3_js_1 = require("@solana/web3.js"); +function parseIdlErrors(idl) { + const errors = new Map(); + if (idl.errors) { + idl.errors.forEach((e) => { + var _a; + let msg = (_a = e.msg) !== null && _a !== void 0 ? _a : e.name; + errors.set(e.code, msg); + }); + } + return errors; +} +exports.parseIdlErrors = parseIdlErrors; +// Allow either IdLInstruction or IdlStateMethod since the types share fields. +function toInstruction(idlIx, ...args) { + if (idlIx.args.length != args.length) { + throw new Error("Invalid argument length"); + } + const ix = {}; + let idx = 0; + idlIx.args.forEach((ixArg) => { + ix[ixArg.name] = args[idx]; + idx += 1; + }); + return ix; +} +exports.toInstruction = toInstruction; +// Throws error if any account required for the `ix` is not given. +function validateAccounts(ixAccounts, accounts) { + ixAccounts.forEach((acc) => { + // @ts-ignore + if (acc.accounts !== undefined) { + // @ts-ignore + validateAccounts(acc.accounts, accounts[acc.name]); + } + else { + if (accounts[acc.name] === undefined) { + throw new Error(`Invalid arguments: ${acc.name} not provided.`); + } + } + }); +} +exports.validateAccounts = validateAccounts; +// Translates an address to a Pubkey. +function translateAddress(address) { + if (typeof address === "string") { + const pk = new web3_js_1.PublicKey(address); + return pk; + } + else { + return address; + } +} +exports.translateAddress = translateAddress; +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js.map new file mode 100644 index 0000000..5706fc5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/program/common.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAS5C,SAAgB,cAAc,CAAC,GAAQ;IACrC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,IAAI,GAAG,CAAC,MAAM,EAAE;QACd,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;;YACvB,IAAI,GAAG,SAAG,CAAC,CAAC,GAAG,mCAAI,CAAC,CAAC,IAAI,CAAC;YAC1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AATD,wCASC;AAED,8EAA8E;AAC9E,SAAgB,aAAa,CAC3B,KAAsC,EACtC,GAAG,IAAW;IAEd,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE;QACpC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,MAAM,EAAE,GAA2B,EAAE,CAAC;IACtC,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3B,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3B,GAAG,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,CAAC;AACZ,CAAC;AAfD,sCAeC;AAED,kEAAkE;AAClE,SAAgB,gBAAgB,CAC9B,UAA4B,EAC5B,QAAkB;IAElB,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACzB,aAAa;QACb,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC9B,aAAa;YACb,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE;gBACpC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,CAAC,IAAI,gBAAgB,CAAC,CAAC;aACjE;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,4CAeC;AAED,qCAAqC;AACrC,SAAgB,gBAAgB,CAAC,OAAgB;IAC/C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,EAAE,GAAG,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,EAAE,CAAC;KACX;SAAM;QACL,OAAO,OAAO,CAAC;KAChB;AACH,CAAC;AAPD,4CAOC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js new file mode 100644 index 0000000..d1bdf3d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.splitArgsAndCtx = void 0; +function splitArgsAndCtx(idlIx, args) { + let options = {}; + const inputLen = idlIx.args ? idlIx.args.length : 0; + if (args.length > inputLen) { + if (args.length !== inputLen + 1) { + throw new Error("provided too many arguments ${args}"); + } + options = args.pop(); + } + return [args, options]; +} +exports.splitArgsAndCtx = splitArgsAndCtx; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js.map new file mode 100644 index 0000000..d84afb2 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/program/context.ts"],"names":[],"mappings":";;;AA6DA,SAAgB,eAAe,CAC7B,KAAqB,EACrB,IAAW;IAEX,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,EAAE;QAC1B,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,GAAG,CAAC,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QACD,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;KACtB;IAED,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACzB,CAAC;AAfD,0CAeC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js new file mode 100644 index 0000000..59157f7 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js @@ -0,0 +1,210 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EventParser = exports.EventManager = void 0; +const assert = __importStar(require("assert")); +const LOG_START_INDEX = "Program log: ".length; +class EventManager { + constructor(programId, provider, coder) { + this._programId = programId; + this._provider = provider; + this._eventParser = new EventParser(programId, coder); + this._eventCallbacks = new Map(); + this._eventListeners = new Map(); + this._listenerIdCount = 0; + } + addEventListener(eventName, callback) { + let listener = this._listenerIdCount; + this._listenerIdCount += 1; + // Store the listener into the event map. + if (!(eventName in this._eventCallbacks)) { + this._eventListeners.set(eventName, []); + } + this._eventListeners.set(eventName, this._eventListeners.get(eventName).concat(listener)); + // Store the callback into the listener map. + this._eventCallbacks.set(listener, [eventName, callback]); + // Create the subscription singleton, if needed. + if (this._onLogsSubscriptionId !== undefined) { + return; + } + this._onLogsSubscriptionId = this._provider.connection.onLogs(this._programId, (logs, ctx) => { + if (logs.err) { + console.error(logs); + return; + } + this._eventParser.parseLogs(logs.logs, (event) => { + const allListeners = this._eventListeners.get(eventName); + if (allListeners) { + allListeners.forEach((listener) => { + const [, callback] = this._eventCallbacks.get(listener); + callback(event.data, ctx.slot); + }); + } + }); + }); + return listener; + } + async removeEventListener(listener) { + // Get the callback. + const callback = this._eventCallbacks.get(listener); + if (!callback) { + throw new Error(`Event listener ${listener} doesn't exist!`); + } + const [eventName] = callback; + // Get the listeners. + let listeners = this._eventListeners.get(eventName); + if (!listeners) { + throw new Error(`Event listeners dont' exist for ${eventName}!`); + } + // Update both maps. + this._eventCallbacks.delete(listener); + listeners = listeners.filter((l) => l !== listener); + if (listeners.length === 0) { + this._eventListeners.delete(eventName); + } + // Kill the websocket connection if all listeners have been removed. + if (this._eventCallbacks.size == 0) { + assert.ok(this._eventListeners.size === 0); + await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId); + this._onLogsSubscriptionId = undefined; + } + } +} +exports.EventManager = EventManager; +class EventParser { + constructor(programId, coder) { + this.coder = coder; + this.programId = programId; + } + // Each log given, represents an array of messages emitted by + // a single transaction, which can execute many different programs across + // CPI boundaries. However, the subscription is only interested in the + // events emitted by *this* program. In achieving this, we keep track of the + // program execution context by parsing each log and looking for a CPI + // `invoke` call. If one exists, we know a new program is executing. So we + // push the programId onto a stack and switch the program context. This + // allows us to track, for a given log, which program was executing during + // its emission, thereby allowing us to know if a given log event was + // emitted by *this* program. If it was, then we parse the raw string and + // emit the event if the string matches the event being subscribed to. + parseLogs(logs, callback) { + const logScanner = new LogScanner(logs); + const execution = new ExecutionContext(logScanner.next()); + let log = logScanner.next(); + while (log !== null) { + let [event, newProgram, didPop] = this.handleLog(execution, log); + if (event) { + callback(event); + } + if (newProgram) { + execution.push(newProgram); + } + if (didPop) { + execution.pop(); + } + log = logScanner.next(); + } + } + // Main log handler. Returns a three element array of the event, the + // next program that was invoked for CPI, and a boolean indicating if + // a program has completed execution (and thus should be popped off the + // execution stack). + handleLog(execution, log) { + // Executing program is this program. + if (execution.stack.length > 0 && + execution.program() === this.programId.toString()) { + return this.handleProgramLog(log); + } + // Executing program is not this program. + else { + return [null, ...this.handleSystemLog(log)]; + } + } + // Handles logs from *this* program. + handleProgramLog(log) { + // This is a `msg!` log. + if (log.startsWith("Program log:")) { + const logStr = log.slice(LOG_START_INDEX); + const event = this.coder.events.decode(logStr); + return [event, null, false]; + } + // System log. + else { + return [null, ...this.handleSystemLog(log)]; + } + } + // Handles logs when the current program being executing is *not* this. + handleSystemLog(log) { + // System component. + const logStart = log.split(":")[0]; + // Did the program finish executing? + if (logStart.match(/^Program (.*) success/g) !== null) { + return [null, true]; + // Recursive call. + } + else if (logStart.startsWith(`Program ${this.programId.toString()} invoke`)) { + return [this.programId.toString(), false]; + } + // CPI call. + else if (logStart.includes("invoke")) { + return ["cpi", false]; // Any string will do. + } + else { + return [null, false]; + } + } +} +exports.EventParser = EventParser; +// Stack frame execution context, allowing one to track what program is +// executing for a given log. +class ExecutionContext { + constructor(log) { + // Assumes the first log in every transaction is an `invoke` log from the + // runtime. + const program = /^Program (.*) invoke.*$/g.exec(log)[1]; + this.stack = [program]; + } + program() { + assert.ok(this.stack.length > 0); + return this.stack[this.stack.length - 1]; + } + push(newProgram) { + this.stack.push(newProgram); + } + pop() { + assert.ok(this.stack.length > 0); + this.stack.pop(); + } +} +class LogScanner { + constructor(logs) { + this.logs = logs; + } + next() { + if (this.logs.length === 0) { + return null; + } + let l = this.logs[0]; + this.logs = this.logs.slice(1); + return l; + } +} +//# sourceMappingURL=event.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js.map new file mode 100644 index 0000000..1112012 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/event.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../src/program/event.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,+CAAiC;AAIjC,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC;AAU/C,MAAa,YAAY;IAoCvB,YAAY,SAAoB,EAAE,QAAkB,EAAE,KAAY;QAChE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACtD,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,gBAAgB,GAAG,C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X,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js new file mode 100644 index 0000000..caf1d6f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js @@ -0,0 +1,140 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Program = void 0; +const pako_1 = require("pako"); +const idl_1 = require("../idl"); +const coder_1 = __importDefault(require("../coder")); +const namespace_1 = __importDefault(require("./namespace")); +const __1 = require("../"); +const bytes_1 = require("../utils/bytes"); +const event_1 = require("./event"); +const common_1 = require("./common"); +/** + * ## Program + * + * Program provides the IDL deserialized client representation of an Anchor + * program. + * + * This API is the one stop shop for all things related to communicating with + * on-chain programs. Among other things, one can send transactions, fetch + * deserialized accounts, decode instruction data, subscribe to account + * changes, and listen to events. + * + * In addition to field accessors and methods, the object provides a set of + * dynamically generated properties, also known as namespaces, that + * map one-to-one to program methods and accounts. These namespaces generally + * can be used as follows: + * + * ## Usage + * + * ```javascript + * program.. + * ``` + * + * API specifics are namespace dependent. The examples used in the documentation + * below will refer to the two counter examples found + * [here](https://github.com/project-serum/anchor#examples). + */ +class Program { + /** + * @param idl The interface definition. + * @param programId The on-chain address of the program. + * @param provider The network and wallet context to use. If not provided + * then uses [[getProvider]]. + */ + constructor(idl, programId, provider) { + programId = common_1.translateAddress(programId); + // Fields. + this._idl = idl; + this._programId = programId; + this._provider = provider !== null && provider !== void 0 ? provider : __1.getProvider(); + this._coder = new coder_1.default(idl); + this._events = new event_1.EventManager(this._programId, this._provider, this._coder); + // Dynamic namespaces. + const [rpc, instruction, transaction, account, simulate, state,] = namespace_1.default.build(idl, this._coder, programId, this._provider); + this.rpc = rpc; + this.instruction = instruction; + this.transaction = transaction; + this.account = account; + this.simulate = simulate; + this.state = state; + } + /** + * Address of the program. + */ + get programId() { + return this._programId; + } + /** + * IDL defining the program's interface. + */ + get idl() { + return this._idl; + } + /** + * Coder for serializing requests. + */ + get coder() { + return this._coder; + } + /** + * Wallet and network provider. + */ + get provider() { + return this._provider; + } + /** + * Generates a Program client by fetching the IDL from the network. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + static async at(address, provider) { + const programId = common_1.translateAddress(address); + const idl = await Program.fetchIdl(programId, provider); + return new Program(idl, programId, provider); + } + /** + * Fetches an idl from the blockchain. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + static async fetchIdl(address, provider) { + provider = provider !== null && provider !== void 0 ? provider : __1.getProvider(); + const programId = common_1.translateAddress(address); + const idlAddr = await idl_1.idlAddress(programId); + const accountInfo = await provider.connection.getAccountInfo(idlAddr); + // Chop off account discriminator. + let idlAccount = idl_1.decodeIdlAccount(accountInfo.data.slice(8)); + const inflatedIdl = pako_1.inflate(idlAccount.data); + return JSON.parse(bytes_1.utf8.decode(inflatedIdl)); + } + /** + * Invokes the given callback every time the given event is emitted. + * + * @param eventName The PascalCase name of the event, provided by the IDL. + * @param callback The function to invoke whenever the event is emitted from + * program logs. + */ + addEventListener(eventName, callback) { + return this._events.addEventListener(eventName, callback); + } + /** + * Unsubscribes from the given eventName. + */ + async removeEventListener(listener) { + return await this._events.removeEventListener(listener); + } +} +exports.Program = Program; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js.map new file mode 100644 index 0000000..9b98f7a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/program/index.ts"],"names":[],"mappings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B,SAAiB,EACjB,QAA4C;QAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,mBAAmB,CAAC,QAAgB;QAC/C,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;CACF;AAnSD,0BAmSC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js new file mode 100644 index 0000000..eeeffb5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js @@ -0,0 +1,190 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountClient = void 0; +const camelcase_1 = __importDefault(require("camelcase")); +const eventemitter3_1 = __importDefault(require("eventemitter3")); +const bs58 = __importStar(require("bs58")); +const web3_js_1 = require("@solana/web3.js"); +const coder_1 = __importStar(require("../../coder")); +const common_1 = require("../common"); +const __1 = require("../../"); +const pubkeyUtil = __importStar(require("../../utils/pubkey")); +class AccountFactory { + static build(idl, coder, programId, provider) { + const accountFns = {}; + idl.accounts.forEach((idlAccount) => { + const name = camelcase_1.default(idlAccount.name); + accountFns[name] = new AccountClient(idl, idlAccount, programId, provider, coder); + }); + return accountFns; + } +} +exports.default = AccountFactory; +class AccountClient { + constructor(idl, idlAccount, programId, provider, coder) { + this._idlAccount = idlAccount; + this._programId = programId; + this._provider = provider !== null && provider !== void 0 ? provider : __1.getProvider(); + this._coder = coder !== null && coder !== void 0 ? coder : new coder_1.default(idl); + this._size = coder_1.ACCOUNT_DISCRIMINATOR_SIZE + coder_1.accountSize(idl, idlAccount); + } + /** + * Returns the number of bytes in this account. + */ + get size() { + return this._size; + } + /** + * Returns the program ID owning all accounts. + */ + get programId() { + return this._programId; + } + /** + * Returns the client's wallet and network provider. + */ + get provider() { + return this._provider; + } + /** + * Returns the coder. + */ + get coder() { + return this._coder; + } + /** + * Returns a deserialized account. + * + * @param address The address of the account to fetch. + */ + async fetch(address) { + const accountInfo = await this._provider.connection.getAccountInfo(common_1.translateAddress(address)); + if (accountInfo === null) { + throw new Error(`Account does not exist ${address.toString()}`); + } + // Assert the account discriminator is correct. + const discriminator = await coder_1.accountDiscriminator(this._idlAccount.name); + if (discriminator.compare(accountInfo.data.slice(0, 8))) { + throw new Error("Invalid account discriminator"); + } + return this._coder.accounts.decode(this._idlAccount.name, accountInfo.data); + } + /** + * Returns all instances of this account type for the program. + */ + async all(filter) { + let bytes = await coder_1.accountDiscriminator(this._idlAccount.name); + if (filter !== undefined) { + bytes = Buffer.concat([bytes, filter]); + } + let resp = await this._provider.connection.getProgramAccounts(this._programId, { + commitment: this._provider.connection.commitment, + filters: [ + { + memcmp: { + offset: 0, + bytes: bs58.encode(bytes), + }, + }, + ], + }); + return resp.map(({ pubkey, account }) => { + return { + publicKey: pubkey, + account: this._coder.accounts.decode(this._idlAccount.name, account.data), + }; + }); + } + /** + * Returns an `EventEmitter` emitting a "change" event whenever the account + * changes. + */ + subscribe(address, commitment) { + if (subscriptions.get(address.toString())) { + return subscriptions.get(address.toString()).ee; + } + const ee = new eventemitter3_1.default(); + address = common_1.translateAddress(address); + const listener = this._provider.connection.onAccountChange(address, (acc) => { + const account = this._coder.accounts.decode(this._idlAccount.name, acc.data); + ee.emit("change", account); + }, commitment); + subscriptions.set(address.toString(), { + ee, + listener, + }); + return ee; + } + /** + * Unsubscribes from the account at the given address. + */ + unsubscribe(address) { + let sub = subscriptions.get(address.toString()); + if (!sub) { + console.warn("Address is not subscribed"); + return; + } + if (subscriptions) { + this._provider.connection + .removeAccountChangeListener(sub.listener) + .then(() => { + subscriptions.delete(address.toString()); + }) + .catch(console.error); + } + } + /** + * Returns an instruction for creating this account. + */ + async createInstruction(signer, sizeOverride) { + const size = this.size; + return web3_js_1.SystemProgram.createAccount({ + fromPubkey: this._provider.wallet.publicKey, + newAccountPubkey: signer.publicKey, + space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size, + lamports: await this._provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size), + programId: this._programId, + }); + } + /** + * Function returning the associated account. Args are keys to associate. + * Order matters. + */ + async associated(...args) { + const addr = await this.associatedAddress(...args); + return await this.fetch(addr); + } + /** + * Function returning the associated address. Args are keys to associate. + * Order matters. + */ + async associatedAddress(...args) { + return await pubkeyUtil.associated(this._programId, ...args); + } +} +exports.AccountClient = AccountClient; +// Tracks all subscriptions. +const subscriptions = new Map(); +//# sourceMappingURL=account.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js.map new file mode 100644 index 0000000..b8facfa --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.js.map @@ -0,0 +1 @@ +{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../src/program/namespace/account.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CACrB,GAAG,IAA+B;QAElC,OAAO,MAAM,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/D,CAAC;CACF;AAjMD,sCAiMC;AAYD,4BAA4B;AAC5B,MAAM,aAAa,GAA8B,IAAI,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js new file mode 100644 index 0000000..fb6f5e0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js @@ -0,0 +1,49 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountClient = exports.StateClient = void 0; +const camelcase_1 = __importDefault(require("camelcase")); +const state_1 = __importDefault(require("./state")); +const instruction_1 = __importDefault(require("./instruction")); +const transaction_1 = __importDefault(require("./transaction")); +const rpc_1 = __importDefault(require("./rpc")); +const account_1 = __importDefault(require("./account")); +const simulate_1 = __importDefault(require("./simulate")); +const common_1 = require("../common"); +// Re-exports. +var state_2 = require("./state"); +Object.defineProperty(exports, "StateClient", { enumerable: true, get: function () { return state_2.StateClient; } }); +var account_2 = require("./account"); +Object.defineProperty(exports, "AccountClient", { enumerable: true, get: function () { return account_2.AccountClient; } }); +class NamespaceFactory { + /** + * Generates all namespaces for a given program. + */ + static build(idl, coder, programId, provider) { + const rpc = {}; + const instruction = {}; + const transaction = {}; + const simulate = {}; + const idlErrors = common_1.parseIdlErrors(idl); + const state = state_1.default.build(idl, coder, programId, provider); + idl.instructions.forEach((idlIx) => { + const ixItem = instruction_1.default.build(idlIx, (ixName, ix) => coder.instruction.encode(ixName, ix), programId); + const txItem = transaction_1.default.build(idlIx, ixItem); + const rpcItem = rpc_1.default.build(idlIx, txItem, idlErrors, provider); + const simulateItem = simulate_1.default.build(idlIx, txItem, idlErrors, provider, coder, programId, idl); + const name = camelcase_1.default(idlIx.name); + instruction[name] = ixItem; + transaction[name] = txItem; + rpc[name] = rpcItem; + simulate[name] = simulateItem; + }); + const account = idl.accounts + ? account_1.default.build(idl, coder, programId, provider) + : {}; + return [rpc, instruction, transaction, account, simulate, state]; + } +} +exports.default = NamespaceFactory; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js.map new file mode 100644 index 0000000..ac04f7b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/program/namespace/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAKlC,oDAAoD;AACpD,gEAAyE;AACzE,gEAAyE;AACzE,gDAAiD;AACjD,wDAA6D;AAC7D,0DAAgE;AAChE,sCAA2C;AAE3C,cAAc;AACd,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AAIpB,qCAA4E;AAAjD,wGAAA,aAAa,OAAA;AAGxC,MAAqB,gBAAgB;IACnC;;OAEG;IACI,MAAM,CAAC,KAAK,CACjB,GAAQ,EACR,KAAY,EACZ,SAAoB,EACpB,QAAkB;QASlB,MAAM,GAAG,GAAiB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAyB,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAyB,EAAE,CAAC;QAC7C,MAAM,QAAQ,GAAsB,EAAE,CAAC;QAEvC,MAAM,SAAS,GAAG,uBAAc,CAAC,GAAG,CAAC,CAAC;QAEtC,MAAM,KAAK,GAAG,eAAY,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,CAA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@project-serum/anchor/dist/cjs/program/namespace/instruction.js new file mode 100644 index 0000000..8060350 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const web3_js_1 = require("@solana/web3.js"); +const error_1 = require("../../error"); +const common_1 = require("../common"); +const context_1 = require("../context"); +class InstructionNamespaceFactory { + static build(idlIx, encodeFn, programId) { + if (idlIx.name === "_inner") { + throw new error_1.IdlError("the _inner name is reserved"); + } + const ix = (...args) => { + const [ixArgs, ctx] = context_1.splitArgsAndCtx(idlIx, [...args]); + common_1.validateAccounts(idlIx.accounts, ctx.accounts); + validateInstruction(idlIx, ...args); + const keys = ix.accounts(ctx.accounts); + if (ctx.remainingAccounts !== undefined) { + keys.push(...ctx.remainingAccounts); + } + if (ctx.__private && ctx.__private.logAccounts) { + console.log("Outgoing account metas:", keys); + } + return new web3_js_1.TransactionInstruction({ + keys, + programId, + data: encodeFn(idlIx.name, common_1.toInstruction(idlIx, ...ixArgs)), + }); + }; + // Utility fn for ordering the accounts for this instruction. + ix["accounts"] = (accs) => { + return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts); + }; + return ix; + } + static accountsArray(ctx, accounts) { + return accounts + .map((acc) => { + // Nested accounts. + // @ts-ignore + const nestedAccounts = acc.accounts; + if (nestedAccounts !== undefined) { + const rpcAccs = ctx[acc.name]; + return InstructionNamespaceFactory.accountsArray(rpcAccs, nestedAccounts).flat(); + } + else { + const account = acc; + return { + pubkey: common_1.translateAddress(ctx[acc.name]), + isWritable: account.isMut, + isSigner: account.isSigner, + }; + } + }) + .flat(); + } +} +exports.default = InstructionNamespaceFactory; +// Throws error if any argument required for the `ix` is not given. +function validateInstruction(ix, ...args) { + // todo +} +//# sourceMappingURL=instruction.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.js.map new file mode 100644 index 0000000..12d312a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"instruction.js","sourceRoot":"","sources":["../../../../src/program/namespace/instruction.ts"],"names":[],"mappings":";;AAAA,6CAAoE;AAEpE,uCAAuC;AACvC,sCAKmB;AACnB,wCAAuD;AAEvD,MAAqB,2BAA2B;IACvC,MAAM,CAAC,KAAK,CACjB,KAAqB,EACrB,QAA6B,EAC7B,SAAoB;QAEpB,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,gBAAQ,CAAC,6BAA6B,CAAC,CAAC;SACnD;QAED,MAAM,EAAE,GAAG,CAAC,GAAG,IAAW,EAA0B,EAAE;YACpD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,yBAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACxD,yBAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC/C,mBAAmB,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;YAEpC,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAEvC,IAAI,GAAG,CAAC,iBAAiB,KAAK,SAAS,EAAE;gBACvC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;aACrC;YAED,IAAI,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE;gBAC9C,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC;aAC9C;YACD,OAAO,IAAI,gCAAsB,CAAC;gBAChC,IAAI;gBACJ,SAAS;gBACT,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,sBAAa,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,CAAC;aAC5D,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,6DAA6D;QAC7D,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAc,EAAE,EAAE;YAClC,OAAO,2BAA2B,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACzE,CAAC,CAAC;QAEF,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,GAAa,EAAE,QAA0B;QACnE,OAAO,QAAQ;aACZ,GAAG,CAAC,CAAC,GAAmB,EAAE,EAAE;YAC3B,mBAAmB;YACnB,aAAa;YACb,MAAM,cAAc,GAAiC,GAAG,CAAC,QAAQ,CAAC;YAClE,IAAI,cAAc,KAAK,SAAS,EAAE;gBAChC,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAa,CAAC;gBAC1C,OAAO,2BAA2B,CAAC,aAAa,CAC9C,OAAO,EACP,cAAc,CACf,CAAC,IAAI,EAAE,CAAC;aACV;iBAAM;gBACL,MAAM,OAAO,GAAe,GAAiB,CAAC;gBAC9C,OAAO;oBACL,MAAM,EAAE,yBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAY,CAAC;oBAClD,UAAU,EAAE,OAAO,CAAC,KAAK;oBACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;iBAC3B,CAAC;aACH;QACH,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IACZ,CAAC;CACF;AA9DD,8CA8DC;AA+CD,mEAAmE;AACnE,SAAS,mBAAmB,CAAC,EAAkB,EAAE,GAAG,IAAW;IAC7D,OAAO;AACT,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js new file mode 100644 index 0000000..dca001d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const context_1 = require("../context"); +const error_1 = require("../../error"); +class RpcFactory { + static build(idlIx, txFn, idlErrors, provider) { + const rpc = async (...args) => { + const tx = txFn(...args); + const [, ctx] = context_1.splitArgsAndCtx(idlIx, [...args]); + try { + const txSig = await provider.send(tx, ctx.signers, ctx.options); + return txSig; + } + catch (err) { + console.log("Translating error", err); + let translatedErr = error_1.ProgramError.parse(err, idlErrors); + if (translatedErr === null) { + throw err; + } + throw translatedErr; + } + }; + return rpc; + } +} +exports.default = RpcFactory; +//# sourceMappingURL=rpc.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js.map new file mode 100644 index 0000000..f276943 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../../src/program/namespace/rpc.ts"],"names":[],"mappings":";;AAGA,wCAA6C;AAE7C,uCAA2C;AAE3C,MAAqB,UAAU;IACtB,MAAM,CAAC,KAAK,CACjB,KAAqB,EACrB,IAAmB,EACnB,SAA8B,EAC9B,QAAkB;QAElB,MAAM,GAAG,GAAG,KAAK,EAAE,GAAG,IAAW,EAAiC,EAAE;YAClE,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACzB,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,yBAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,IAAI;gBACF,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;gBAChE,OAAO,KAAK,CAAC;aACd;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;gBACtC,IAAI,aAAa,GAAG,oBAAY,CAAC,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACvD,IAAI,aAAa,KAAK,IAAI,EAAE;oBAC1B,MAAM,GAAG,CAAC;iBACX;gBACD,MAAM,aAAa,CAAC;aACrB;QACH,CAAC,CAAC;QAEF,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAzBD,6BAyBC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js new file mode 100644 index 0000000..74bbd75 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const context_1 = require("../context"); +const event_1 = require("../event"); +const error_1 = require("../../error"); +class SimulateFactory { + static build(idlIx, txFn, idlErrors, provider, coder, programId, idl) { + const simulate = async (...args) => { + const tx = txFn(...args); + const [, ctx] = context_1.splitArgsAndCtx(idlIx, [...args]); + let resp = undefined; + try { + resp = await provider.simulate(tx, ctx.signers, ctx.options); + } + catch (err) { + console.log("Translating error", err); + let translatedErr = error_1.ProgramError.parse(err, idlErrors); + if (translatedErr === null) { + throw err; + } + throw translatedErr; + } + if (resp === undefined) { + throw new Error("Unable to simulate transaction"); + } + if (resp.value.err) { + throw new Error(`Simulate error: ${resp.value.err.toString()}`); + } + const logs = resp.value.logs; + if (!logs) { + throw new Error("Simulated logs not found"); + } + const events = []; + if (idl.events) { + let parser = new event_1.EventParser(programId, coder); + parser.parseLogs(logs, (event) => { + events.push(event); + }); + } + return { events, raw: logs }; + }; + return simulate; + } +} +exports.default = SimulateFactory; +//# sourceMappingURL=simulate.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js.map new file mode 100644 index 0000000..a0c0ddd --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"simulate.js","sourceRoot":"","sources":["../../../../src/program/namespace/simulate.ts"],"names":[],"mappings":";;AAGA,wCAA6C;AAE7C,oCAA8C;AAG9C,uCAA2C;AAE3C,MAAqB,eAAe;IAC3B,MAAM,CAAC,KAAK,CACjB,KAAqB,EACrB,IAAmB,EACnB,SAA8B,EAC9B,QAAkB,EAClB,KAAY,EACZ,SAAoB,EACpB,GAAQ;QAER,MAAM,QAAQ,GAAG,KAAK,EAAE,GAAG,IAAW,EAA6B,EAAE;YACnE,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACzB,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,yBAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,IAAI,IAAI,GAAG,SAAS,CAAC;YACrB,IAAI;gBACF,IAAI,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;aAC9D;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;gBACtC,IAAI,aAAa,GAAG,oBAAY,CAAC,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACvD,IAAI,aAAa,KAAK,IAAI,EAAE;oBAC1B,MAAM,GAAG,CAAC;iBACX;gBACD,MAAM,aAAa,CAAC;aACrB;YACD,IAAI,IAAI,KAAK,SAAS,EAAE;gBACtB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;aACnD;YACD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;gBAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;aACjE;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;YAC7B,IAAI,CAAC,IAAI,EAAE;gBACT,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;aAC7C;YAED,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAI,GAAG,CAAC,MAAM,EAAE;gBACd,IAAI,MAAM,GAAG,IAAI,mBAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBAC/C,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;oBAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB,CAAC,CAAC,CAAC;aACJ;YACD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QAC/B,CAAC,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA/CD,kCA+CC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js new file mode 100644 index 0000000..cc1f44b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js @@ -0,0 +1,202 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StateClient = void 0; +const eventemitter3_1 = __importDefault(require("eventemitter3")); +const camelcase_1 = __importDefault(require("camelcase")); +const web3_js_1 = require("@solana/web3.js"); +const coder_1 = __importStar(require("../../coder")); +const __1 = require("../../"); +const common_1 = require("../common"); +const pubkey_1 = require("../../utils/pubkey"); +const instruction_1 = __importDefault(require("./instruction")); +const rpc_1 = __importDefault(require("./rpc")); +const transaction_1 = __importDefault(require("./transaction")); +class StateFactory { + static build(idl, coder, programId, provider) { + if (idl.state === undefined) { + return undefined; + } + return new StateClient(idl, programId, provider, coder); + } +} +exports.default = StateFactory; +/** + * A client for the program state. Similar to the base [[Program]] client, + * one can use this to send transactions and read accounts for the state + * abstraction. + */ +class StateClient { + constructor(idl, programId, provider, coder) { + this._idl = idl; + this._programId = programId; + this._address = programStateAddress(programId); + this._provider = provider !== null && provider !== void 0 ? provider : __1.getProvider(); + this._coder = coder !== null && coder !== void 0 ? coder : new coder_1.default(idl); + this._sub = null; + // Build namespaces. + const [instruction, transaction, rpc] = (() => { + let instruction = {}; + let transaction = {}; + let rpc = {}; + idl.state.methods.forEach((m) => { + // Build instruction method. + const ixItem = instruction_1.default.build(m, (ixName, ix) => coder.instruction.encodeState(ixName, ix), programId); + ixItem["accounts"] = (accounts) => { + const keys = stateInstructionKeys(programId, provider, m, accounts); + return keys.concat(instruction_1.default.accountsArray(accounts, m.accounts)); + }; + // Build transaction method. + const txItem = transaction_1.default.build(m, ixItem); + // Build RPC method. + const rpcItem = rpc_1.default.build(m, txItem, common_1.parseIdlErrors(idl), provider); + // Attach them all to their respective namespaces. + const name = camelcase_1.default(m.name); + instruction[name] = ixItem; + transaction[name] = txItem; + rpc[name] = rpcItem; + }); + return [instruction, transaction, rpc]; + })(); + this.instruction = instruction; + this.transaction = transaction; + this.rpc = rpc; + } + /** + * Returns the program ID owning the state. + */ + get programId() { + return this._programId; + } + /** + * Returns the client's wallet and network provider. + */ + get provider() { + return this._provider; + } + /** + * Returns the coder. + */ + get coder() { + return this._coder; + } + /** + * Returns the deserialized state account. + */ + async fetch() { + const addr = this.address(); + const accountInfo = await this.provider.connection.getAccountInfo(addr); + if (accountInfo === null) { + throw new Error(`Account does not exist ${addr.toString()}`); + } + // Assert the account discriminator is correct. + const expectedDiscriminator = await coder_1.stateDiscriminator(this._idl.state.struct.name); + if (expectedDiscriminator.compare(accountInfo.data.slice(0, 8))) { + throw new Error("Invalid account discriminator"); + } + return this.coder.state.decode(accountInfo.data); + } + /** + * Returns the state address. + */ + address() { + return this._address; + } + /** + * Returns an `EventEmitter` with a `"change"` event that's fired whenever + * the state account cahnges. + */ + subscribe(commitment) { + if (this._sub !== null) { + return this._sub.ee; + } + const ee = new eventemitter3_1.default(); + const listener = this.provider.connection.onAccountChange(this.address(), (acc) => { + const account = this.coder.state.decode(acc.data); + ee.emit("change", account); + }, commitment); + this._sub = { + ee, + listener, + }; + return ee; + } + /** + * Unsubscribes to state changes. + */ + unsubscribe() { + if (this._sub !== null) { + this.provider.connection + .removeAccountChangeListener(this._sub.listener) + .then(async () => { + this._sub = null; + }) + .catch(console.error); + } + } +} +exports.StateClient = StateClient; +// Calculates the deterministic address of the program's "state" account. +function programStateAddress(programId) { + let [registrySigner] = pubkey_1.findProgramAddressSync([], programId); + return pubkey_1.createWithSeedSync(registrySigner, "unversioned", programId); +} +// Returns the common keys that are prepended to all instructions targeting +// the "state" of a program. +function stateInstructionKeys(programId, provider, m, accounts) { + if (m.name === "new") { + // Ctor `new` method. + const [programSigner] = pubkey_1.findProgramAddressSync([], programId); + return [ + { + pubkey: provider.wallet.publicKey, + isWritable: false, + isSigner: true, + }, + { + pubkey: programStateAddress(programId), + isWritable: true, + isSigner: false, + }, + { pubkey: programSigner, isWritable: false, isSigner: false }, + { + pubkey: web3_js_1.SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + { pubkey: programId, isWritable: false, isSigner: false }, + ]; + } + else { + common_1.validateAccounts(m.accounts, accounts); + return [ + { + pubkey: programStateAddress(programId), + isWritable: true, + isSigner: false, + }, + ]; + } +} +//# sourceMappingURL=state.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js.map new file mode 100644 index 0000000..f0689f6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/program/namespace/state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAyC;AACzC,0DAAkC;AAClC,6CAAuE;AAGvE,qDAAwD;AAExD,8BAAqC;AACrC,sCAA2E;AAC3E,+CAAgF;AAEhF,gEAAwD;AACxD,gDAAwC;AACxC,gEAAwD;AAExD,MAAqB,YAAY;IACxB,MAAM,CAAC,KAAK,CACjB,GAAQ,EACR,KAAY,EACZ,SAAoB,EACpB,QAAkB;QAElB,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;YAC3B,OAAO,SAAS,CAAC;SAClB;QACD,OAAO,IAAI,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;CACF;AAZD,+BAYC;AAED;;;;GAIG;AACH,MAAa,WAAW;IA4CtB,YACE,GAAQ,EACR,SAAoB,EACpB,QAAmB,EACnB,KAAa;QAEb,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,GAA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serum/anchor/dist/cjs/program/namespace/transaction.js b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js new file mode 100644 index 0000000..f94a04d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const web3_js_1 = require("@solana/web3.js"); +const context_1 = require("../context"); +class TransactionFactory { + static build(idlIx, ixFn) { + const txFn = (...args) => { + const [, ctx] = context_1.splitArgsAndCtx(idlIx, [...args]); + const tx = new web3_js_1.Transaction(); + if (ctx.instructions !== undefined) { + tx.add(...ctx.instructions); + } + tx.add(ixFn(...args)); + return tx; + }; + return txFn; + } +} +exports.default = TransactionFactory; +//# sourceMappingURL=transaction.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js.map new file mode 100644 index 0000000..a79da8e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../src/program/namespace/transaction.ts"],"names":[],"mappings":";;AAAA,6CAA8C;AAE9C,wCAA6C;AAG7C,MAAqB,kBAAkB;IAC9B,MAAM,CAAC,KAAK,CACjB,KAAqB,EACrB,IAAmB;QAEnB,MAAM,IAAI,GAAG,CAAC,GAAG,IAAW,EAAe,EAAE;YAC3C,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,yBAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,MAAM,EAAE,GAAG,IAAI,qBAAW,EAAE,CAAC;YAC7B,IAAI,GAAG,CAAC,YAAY,KAAK,SAAS,EAAE;gBAClC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;aAC7B;YACD,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACtB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjBD,qCAiBC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/provider.js b/tests/node_modules/@project-serum/anchor/dist/cjs/provider.js new file mode 100644 index 0000000..4ce75cb --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/provider.js @@ -0,0 +1,213 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getProvider = exports.setProvider = exports.NodeWallet = void 0; +const web3_js_1 = require("@solana/web3.js"); +const common_1 = require("./utils/common"); +/** + * The network and wallet context used to send transactions paid for and signed + * by the provider. + */ +class Provider { + /** + * @param connection The cluster connection where the program is deployed. + * @param wallet The wallet used to pay for and sign all transactions. + * @param opts Transaction confirmation options to use by default. + */ + constructor(connection, wallet, opts) { + this.connection = connection; + this.wallet = wallet; + this.opts = opts; + } + static defaultOptions() { + return { + preflightCommitment: "recent", + commitment: "recent", + }; + } + /** + * Returns a `Provider` with a wallet read from the local filesystem. + * + * @param url The network cluster url. + * @param opts The default transaction confirmation options. + * + * (This api is for Node only.) + */ + static local(url, opts) { + opts = opts !== null && opts !== void 0 ? opts : Provider.defaultOptions(); + const connection = new web3_js_1.Connection(url !== null && url !== void 0 ? url : "http://localhost:8899", opts.preflightCommitment); + const wallet = NodeWallet.local(); + return new Provider(connection, wallet, opts); + } + /** + * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment + * variable + * + * (This api is for Node only.) + */ + static env() { + if (common_1.isBrowser) + return; + const process = require("process"); + const url = process.env.ANCHOR_PROVIDER_URL; + if (url === undefined) { + throw new Error("ANCHOR_PROVIDER_URL is not defined"); + } + const options = Provider.defaultOptions(); + const connection = new web3_js_1.Connection(url, options.commitment); + const wallet = NodeWallet.local(); + return new Provider(connection, wallet, options); + } + /** + * Sends the given transaction, paid for and signed by the provider's wallet. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + async send(tx, signers, opts) { + if (signers === undefined) { + signers = []; + } + if (opts === undefined) { + opts = this.opts; + } + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = (await this.connection.getRecentBlockhash(opts.preflightCommitment)).blockhash; + await this.wallet.signTransaction(tx); + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + const rawTx = tx.serialize(); + const txId = await web3_js_1.sendAndConfirmRawTransaction(this.connection, rawTx, opts); + return txId; + } + /** + * Similar to `send`, but for an array of transactions and signers. + */ + async sendAll(reqs, opts) { + if (opts === undefined) { + opts = this.opts; + } + const blockhash = await this.connection.getRecentBlockhash(opts.preflightCommitment); + let txs = reqs.map((r) => { + let tx = r.tx; + let signers = r.signers; + if (signers === undefined) { + signers = []; + } + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = blockhash.blockhash; + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + return tx; + }); + const signedTxs = await this.wallet.signAllTransactions(txs); + const sigs = []; + for (let k = 0; k < txs.length; k += 1) { + const tx = signedTxs[k]; + const rawTx = tx.serialize(); + sigs.push(await web3_js_1.sendAndConfirmRawTransaction(this.connection, rawTx, opts)); + } + return sigs; + } + /** + * Simulates the given transaction, returning emitted logs from execution. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + async simulate(tx, signers, opts) { + var _a, _b; + if (signers === undefined) { + signers = []; + } + if (opts === undefined) { + opts = this.opts; + } + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = (await this.connection.getRecentBlockhash((_a = opts.preflightCommitment) !== null && _a !== void 0 ? _a : this.opts.preflightCommitment)).blockhash; + await this.wallet.signTransaction(tx); + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + return await simulateTransaction(this.connection, tx, (_b = opts.commitment) !== null && _b !== void 0 ? _b : this.opts.commitment); + } +} +exports.default = Provider; +/** + * Node only wallet. + */ +class NodeWallet { + constructor(payer) { + this.payer = payer; + } + static local() { + const payer = web3_js_1.Keypair.fromSecretKey(Buffer.from(JSON.parse(require("fs").readFileSync(require("os").homedir() + "/.config/solana/id.json", { + encoding: "utf-8", + })))); + return new NodeWallet(payer); + } + async signTransaction(tx) { + tx.partialSign(this.payer); + return tx; + } + async signAllTransactions(txs) { + return txs.map((t) => { + t.partialSign(this.payer); + return t; + }); + } + get publicKey() { + return this.payer.publicKey; + } +} +exports.NodeWallet = NodeWallet; +// Copy of Connection.simulateTransaction that takes a commitment parameter. +async function simulateTransaction(connection, transaction, commitment) { + // @ts-ignore + transaction.recentBlockhash = await connection._recentBlockhash( + // @ts-ignore + connection._disableBlockhashCaching); + const signData = transaction.serializeMessage(); + // @ts-ignore + const wireTransaction = transaction._serialize(signData); + const encodedTransaction = wireTransaction.toString("base64"); + const config = { encoding: "base64", commitment }; + const args = [encodedTransaction, config]; + // @ts-ignore + const res = await connection._rpcRequest("simulateTransaction", args); + if (res.error) { + throw new Error("failed to simulate transaction: " + res.error.message); + } + return res.result; +} +/** + * Sets the default provider on the client. + */ +function setProvider(provider) { + _provider = provider; +} +exports.setProvider = setProvider; +/** + * Returns the default provider being used by the client. + */ +function getProvider() { + if (_provider === null) { + return Provider.local(); + } + return _provider; +} +exports.getProvider = getProvider; +// Global provider used as the default when a provider is not given. +let _provider = null; +//# sourceMappingURL=provider.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/provider.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/provider.js.map new file mode 100644 index 0000000..2503bbc --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":";;;AAAA,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AACH,SAAgB,WAAW,CAAC,QAAkB;IAC5C,SAAS,GAAG,QAAQ,CAAC;AACvB,CAAC;AAFD,kCAEC;AAED;;GAEG;AACH,SAAgB,WAAW;IACzB,IAAI,SAAS,KAAK,IAAI,EAAE;QACtB,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;KACzB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AALD,kCAKC;AAED,oEAAoE;AACpE,IAAI,SAAS,GAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js new file mode 100644 index 0000000..ee7be75 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js @@ -0,0 +1,32 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +const base64 = __importStar(require("base64-js")); +function encode(data) { + return base64.fromByteArray(data); +} +exports.encode = encode; +function decode(data) { + return Buffer.from(base64.toByteArray(data)); +} +exports.decode = decode; +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js.map new file mode 100644 index 0000000..d5a497c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../../src/utils/bytes/base64.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAoC;AAEpC,SAAgB,MAAM,CAAC,IAAY;IACjC,OAAO,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,IAAY;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js new file mode 100644 index 0000000..5b07a8b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js @@ -0,0 +1,32 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +const bs58 = __importStar(require("bs58")); +function encode(data) { + return bs58.encode(data); +} +exports.encode = encode; +function decode(data) { + return bs58.decode(data); +} +exports.decode = decode; +//# sourceMappingURL=bs58.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js.map new file mode 100644 index 0000000..da2d643 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bs58.js","sourceRoot":"","sources":["../../../../src/utils/bytes/bs58.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,SAAgB,MAAM,CAAC,IAAoC;IACzD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js new file mode 100644 index 0000000..e8adea7 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +function encode(data) { + return data.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), "0x"); +} +exports.encode = encode; +function decode(data) { + if (data.indexOf("0x") === 0) { + data = data.substr(2); + } + if (data.length % 2 === 1) { + data = "0" + data; + } + let key = data.match(/.{2}/g); + if (key === null) { + return Buffer.from([]); + } + return Buffer.from(key.map((byte) => parseInt(byte, 16))); +} +exports.decode = decode; +//# sourceMappingURL=hex.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js.map new file mode 100644 index 0000000..8ee6aa3 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hex.js","sourceRoot":"","sources":["../../../../src/utils/bytes/hex.ts"],"names":[],"mappings":";;;AAAA,SAAgB,MAAM,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,MAAM,CAChB,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EACvD,IAAI,CACL,CAAC;AACJ,CAAC;AALD,wBAKC;AAED,SAAgB,MAAM,CAAC,IAAY;IACjC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC5B,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACvB;IACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;QACzB,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;KACnB;IAED,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE9B,IAAI,GAAG,KAAK,IAAI,EAAE;QAChB,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACxB;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAfD,wBAeC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js new file mode 100644 index 0000000..0d89906 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js @@ -0,0 +1,27 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.base64 = exports.bs58 = exports.utf8 = exports.hex = void 0; +exports.hex = __importStar(require("./hex")); +exports.utf8 = __importStar(require("./utf8")); +exports.bs58 = __importStar(require("./bs58")); +exports.base64 = __importStar(require("./base64")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js.map new file mode 100644 index 0000000..2c7327c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/bytes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6B;AAC7B,+CAA+B;AAC/B,+CAA+B;AAC/B,mDAAmC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js new file mode 100644 index 0000000..a728e94 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encode = exports.decode = void 0; +function decode(array) { + const decoder = typeof TextDecoder === "undefined" + ? new (require("util").TextDecoder)("utf-8") // Node. + : new TextDecoder("utf-8"); // Browser. + return decoder.decode(array); +} +exports.decode = decode; +function encode(input) { + const encoder = typeof TextEncoder === "undefined" + ? new (require("util").TextEncoder)("utf-8") // Node. + : new TextEncoder(); // Browser. + return encoder.encode(input); +} +exports.encode = encode; +//# sourceMappingURL=utf8.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js.map new file mode 100644 index 0000000..311b968 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../../src/utils/bytes/utf8.ts"],"names":[],"mappings":";;;AAAA,SAAgB,MAAM,CAAC,KAAiB;IACtC,MAAM,OAAO,GACX,OAAO,WAAW,KAAK,WAAW;QAChC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ;QACrD,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;IAC3C,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAND,wBAMC;AAED,SAAgB,MAAM,CAAC,KAAa;IAClC,MAAM,OAAO,GACX,OAAO,WAAW,KAAK,WAAW;QAChC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ;QACrD,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,WAAW;IACpC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAND,wBAMC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js new file mode 100644 index 0000000..0cab9d5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js @@ -0,0 +1,10 @@ +"use strict"; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isBrowser = void 0; +/** + * Returns true if being run inside a web browser, + * false if in a Node process or electron app. + */ +exports.isBrowser = typeof window !== "undefined" && !((_a = window.process) === null || _a === void 0 ? void 0 : _a.hasOwnProperty("type")); +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js.map new file mode 100644 index 0000000..ac6b590 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACU,QAAA,SAAS,GACpB,OAAO,MAAM,KAAK,WAAW,IAAI,QAAC,MAAM,CAAC,OAAO,0CAAE,cAAc,CAAC,MAAM,EAAC,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js new file mode 100644 index 0000000..792db2a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isSet = exports.set = void 0; +const _AVAILABLE_FEATURES = new Set(["anchor-deprecated-state"]); +const _FEATURES = new Map(); +function set(key) { + if (!_AVAILABLE_FEATURES.has(key)) { + throw new Error("Invalid feature"); + } + _FEATURES.set(key, true); +} +exports.set = set; +function isSet(key) { + return _FEATURES.get(key) !== undefined; +} +exports.isSet = isSet; +//# sourceMappingURL=features.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js.map new file mode 100644 index 0000000..d1d4787 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/features.js.map @@ -0,0 +1 @@ +{"version":3,"file":"features.js","sourceRoot":"","sources":["../../../src/utils/features.ts"],"names":[],"mappings":";;;AAAA,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAEjE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;AAE5B,SAAgB,GAAG,CAAC,GAAW;IAC7B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACpC;IACD,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC3B,CAAC;AALD,kBAKC;AAED,SAAgB,KAAK,CAAC,GAAW;IAC/B,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;AAC1C,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js new file mode 100644 index 0000000..d0df2a0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js @@ -0,0 +1,29 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.features = exports.token = exports.bytes = exports.publicKey = exports.rpc = exports.sha256 = void 0; +exports.sha256 = __importStar(require("./sha256")); +exports.rpc = __importStar(require("./rpc")); +exports.publicKey = __importStar(require("./pubkey")); +exports.bytes = __importStar(require("./bytes")); +exports.token = __importStar(require("./token")); +exports.features = __importStar(require("./features")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js.map new file mode 100644 index 0000000..e603cb8 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,6CAA6B;AAC7B,sDAAsC;AACtC,iDAAiC;AACjC,iDAAiC;AACjC,uDAAuC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js new file mode 100644 index 0000000..2ab99b9 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js @@ -0,0 +1,88 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.associated = exports.findProgramAddressSync = exports.createProgramAddressSync = exports.createWithSeedSync = void 0; +const bn_js_1 = __importDefault(require("bn.js")); +const js_sha256_1 = require("js-sha256"); +const web3_js_1 = require("@solana/web3.js"); +const common_1 = require("../program/common"); +// Sync version of web3.PublicKey.createWithSeed. +function createWithSeedSync(fromPublicKey, seed, programId) { + const buffer = Buffer.concat([ + fromPublicKey.toBuffer(), + Buffer.from(seed), + programId.toBuffer(), + ]); + const hash = js_sha256_1.sha256.digest(buffer); + return new web3_js_1.PublicKey(Buffer.from(hash)); +} +exports.createWithSeedSync = createWithSeedSync; +// Sync version of web3.PublicKey.createProgramAddress. +function createProgramAddressSync(seeds, programId) { + const MAX_SEED_LENGTH = 32; + let buffer = Buffer.alloc(0); + seeds.forEach(function (seed) { + if (seed.length > MAX_SEED_LENGTH) { + throw new TypeError(`Max seed length exceeded`); + } + buffer = Buffer.concat([buffer, toBuffer(seed)]); + }); + buffer = Buffer.concat([ + buffer, + programId.toBuffer(), + Buffer.from("ProgramDerivedAddress"), + ]); + let hash = js_sha256_1.sha256(new Uint8Array(buffer)); + let publicKeyBytes = new bn_js_1.default(hash, 16).toArray(undefined, 32); + if (web3_js_1.PublicKey.isOnCurve(new Uint8Array(publicKeyBytes))) { + throw new Error(`Invalid seeds, address must fall off the curve`); + } + return new web3_js_1.PublicKey(publicKeyBytes); +} +exports.createProgramAddressSync = createProgramAddressSync; +// Sync version of web3.PublicKey.findProgramAddress. +function findProgramAddressSync(seeds, programId) { + let nonce = 255; + let address; + while (nonce != 0) { + try { + const seedsWithNonce = seeds.concat(Buffer.from([nonce])); + address = createProgramAddressSync(seedsWithNonce, programId); + } + catch (err) { + if (err instanceof TypeError) { + throw err; + } + nonce--; + continue; + } + return [address, nonce]; + } + throw new Error(`Unable to find a viable program address nonce`); +} +exports.findProgramAddressSync = findProgramAddressSync; +const toBuffer = (arr) => { + if (arr instanceof Buffer) { + return arr; + } + else if (arr instanceof Uint8Array) { + return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength); + } + else { + return Buffer.from(arr); + } +}; +async function associated(programId, ...args) { + let seeds = [Buffer.from([97, 110, 99, 104, 111, 114])]; // b"anchor". + args.forEach((arg) => { + seeds.push( + // @ts-ignore + arg.buffer !== undefined ? arg : common_1.translateAddress(arg).toBuffer()); + }); + const [assoc] = await web3_js_1.PublicKey.findProgramAddress(seeds, common_1.translateAddress(programId)); + return assoc; +} +exports.associated = associated; +//# sourceMappingURL=pubkey.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js.map new file mode 100644 index 0000000..7577cfa --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pubkey.js","sourceRoot":"","sources":["../../../src/utils/pubkey.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AACvB,yCAAiD;AACjD,6CAA4C;AAC5C,8CAA8D;AAE9D,iDAAiD;AACjD,SAAgB,kBAAkB,CAChC,aAAwB,EACxB,IAAY,EACZ,SAAoB;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC3B,aAAa,CAAC,QAAQ,EAAE;QACxB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACjB,SAAS,CAAC,QAAQ,EAAE;KACrB,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,IAAI,mBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAZD,gDAYC;AAED,uDAAuD;AACvD,SAAgB,wBAAwB,CACtC,KAAiC,EACjC,SAAoB;IAEpB,MAAM,eAAe,GAAG,EAAE,CAAC;IAE3B,IAAI,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7B,KAAK,CAAC,OAAO,CAAC,UAAU,IAAI;QAC1B,IAAI,IA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;YACR,SAAS;SACV;QACD,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;KACzB;IACD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;AACnE,CAAC;AApBD,wDAoBC;AAED,MAAM,QAAQ,GAAG,CAAC,GAAwC,EAAU,EAAE;IACpE,IAAI,GAAG,YAAY,MAAM,EAAE;QACzB,OAAO,GAAG,CAAC;KACZ;SAAM,IAAI,GAAG,YAAY,UAAU,EAAE;QACpC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;KAChE;SAAM;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACzB;AACH,CAAC,CAAC;AAEK,KAAK,UAAU,UAAU,CAC9B,SAAkB,EAClB,GAAG,IAA+B;IAElC,IAAI,KAAK,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa;IACtE,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,KAAK,CAAC,IAAI;QACR,aAAa;QACb,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,yBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAClE,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,mBAAS,CAAC,kBAAkB,CAChD,KAAK,EACL,yBAAgB,CAAC,SAAS,CAAC,CAC5B,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AAhBD,gCAgBC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js new file mode 100644 index 0000000..d2644e4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js @@ -0,0 +1,73 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getMultipleAccounts = exports.invoke = void 0; +const assert_1 = __importDefault(require("assert")); +const web3_js_1 = require("@solana/web3.js"); +const common_1 = require("../program/common"); +const provider_1 = require("../provider"); +/** + * Sends a transaction to a program with the given accounts and instruction + * data. + */ +async function invoke(programId, accounts, data, provider) { + programId = common_1.translateAddress(programId); + if (!provider) { + provider = provider_1.getProvider(); + } + const tx = new web3_js_1.Transaction(); + tx.add(new web3_js_1.TransactionInstruction({ + programId, + keys: accounts !== null && accounts !== void 0 ? accounts : [], + data, + })); + return await provider.send(tx); +} +exports.invoke = invoke; +async function getMultipleAccounts(connection, publicKeys) { + const args = [publicKeys.map((k) => k.toBase58()), { commitment: "recent" }]; + // @ts-ignore + const res = await connection._rpcRequest("getMultipleAccounts", args); + if (res.error) { + throw new Error("failed to get info about accounts " + + publicKeys.map((k) => k.toBase58()).join(", ") + + ": " + + res.error.message); + } + assert_1.default(typeof res.result !== "undefined"); + const accounts = []; + for (const account of res.result.value) { + let value = null; + if (account === null) { + accounts.push(null); + continue; + } + if (res.result.value) { + const { executable, owner, lamports, data } = account; + assert_1.default(data[1] === "base64"); + value = { + executable, + owner: new web3_js_1.PublicKey(owner), + lamports, + data: Buffer.from(data[0], "base64"), + }; + } + if (value === null) { + throw new Error("Invalid response"); + } + accounts.push(value); + } + return accounts.map((account, idx) => { + if (account === null) { + return null; + } + return { + publicKey: publicKeys[idx], + account, + }; + }); +} +exports.getMultipleAccounts = getMultipleAccounts; +//# sourceMappingURL=rpc.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js.map new file mode 100644 index 0000000..c687872 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/rpc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/utils/rpc.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,6CAQyB;AACzB,8CAA8D;AAC9D,0CAAoD;AAEpD;;;GAGG;AACI,KAAK,UAAU,MAAM,CAC1B,SAAkB,EAClB,QAA6B,EAC7B,IAAa,EACb,QAAmB;IAEnB,SAAS,GAAG,yBAAgB,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,sBAAW,EAAE,CAAC;KAC1B;IAED,MAAM,EAAE,GAAG,IAAI,qBAAW,EAAE,CAAC;IAC7B,EAAE,CAAC,GAAG,CACJ,IAAI,gCAAsB,CAAC;QACzB,SAAS;QACT,IAAI,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE;QACpB,IAAI;KACL,CAAC,CACH,CAAC;IAEF,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AArBD,wBAqBC;AAEM,KAAK,UAAU,mBAAmB,CACvC,UAAsB,EACtB,UAAuB;IAIvB,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC7E,aAAa;IACb,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;IACtE,IAAI,GAAG,CAAC,KAAK,EAAE;QACb,MAAM,IAAI,KAAK,CACb,oCAAoC;YAClC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC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/tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js new file mode 100644 index 0000000..70992e3 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hash = void 0; +const js_sha256_1 = require("js-sha256"); +function hash(data) { + return js_sha256_1.sha256(data); +} +exports.hash = hash; +//# sourceMappingURL=sha256.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js.map new file mode 100644 index 0000000..2b28b4c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/sha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sha256.js","sourceRoot":"","sources":["../../../src/utils/sha256.ts"],"names":[],"mappings":";;;AAAA,yCAAmC;AAEnC,SAAgB,IAAI,CAAC,IAAY;IAC/B,OAAO,kBAAM,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js new file mode 100644 index 0000000..09431ba --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.associatedAddress = void 0; +const web3_js_1 = require("@solana/web3.js"); +const TOKEN_PROGRAM_ID = new web3_js_1.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"); +const ASSOCIATED_PROGRAM_ID = new web3_js_1.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"); +async function associatedAddress({ mint, owner, }) { + return (await web3_js_1.PublicKey.findProgramAddress([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_PROGRAM_ID))[0]; +} +exports.associatedAddress = associatedAddress; +//# sourceMappingURL=token.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js.map new file mode 100644 index 0000000..aa33ad7 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/utils/token.js.map @@ -0,0 +1 @@ +{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/utils/token.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,MAAM,gBAAgB,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AACF,MAAM,qBAAqB,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEK,KAAK,UAAU,iBAAiB,CAAC,EACtC,IAAI,EACJ,KAAK,GAIN;IACC,OAAO,CACL,MAAM,mBAAS,CAAC,kBAAkB,CAChC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,gBAAgB,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,EAChE,qBAAqB,CACtB,CACF,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,8CAaC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js b/tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js new file mode 100644 index 0000000..f4618c4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js @@ -0,0 +1,98 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const camelcase_1 = __importDefault(require("camelcase")); +const toml = __importStar(require("toml")); +const web3_js_1 = require("@solana/web3.js"); +const program_1 = require("./program"); +const common_1 = require("./utils/common"); +let _populatedWorkspace = false; +/** + * The `workspace` namespace provides a convenience API to automatically + * search for and deserialize [[Program]] objects defined by compiled IDLs + * in an Anchor workspace. + * + * This API is for Node only. + */ +const workspace = new Proxy({}, { + get(workspaceCache, programName) { + if (common_1.isBrowser) { + console.log("Workspaces aren't available in the browser"); + return undefined; + } + const fs = require("fs"); + const process = require("process"); + if (!_populatedWorkspace) { + const path = require("path"); + let projectRoot = process.cwd(); + while (!fs.existsSync(path.join(projectRoot, "Anchor.toml"))) { + const parentDir = path.dirname(projectRoot); + if (parentDir === projectRoot) { + projectRoot = undefined; + } + projectRoot = parentDir; + } + if (projectRoot === undefined) { + throw new Error("Could not find workspace root."); + } + const idlFolder = `${projectRoot}/target/idl`; + if (!fs.existsSync(idlFolder)) { + throw new Error(`${idlFolder} doesn't exist. Did you use "anchor build"?`); + } + const idlMap = new Map(); + fs.readdirSync(idlFolder).forEach((file) => { + const filePath = `${idlFolder}/${file}`; + const idlStr = fs.readFileSync(filePath); + const idl = JSON.parse(idlStr); + idlMap.set(idl.name, idl); + const name = camelcase_1.default(idl.name, { pascalCase: true }); + if (idl.metadata && idl.metadata.address) { + workspaceCache[name] = new program_1.Program(idl, new web3_js_1.PublicKey(idl.metadata.address)); + } + }); + // Override the workspace programs if the user put them in the config. + const anchorToml = toml.parse(fs.readFileSync(path.join(projectRoot, "Anchor.toml"), "utf-8")); + const clusterId = anchorToml.provider.cluster; + if (anchorToml.programs && anchorToml.programs[clusterId]) { + attachWorkspaceOverride(workspaceCache, anchorToml.programs[clusterId], idlMap); + } + _populatedWorkspace = true; + } + return workspaceCache[programName]; + }, +}); +function attachWorkspaceOverride(workspaceCache, overrideConfig, idlMap) { + Object.keys(overrideConfig).forEach((programName) => { + const wsProgramName = camelcase_1.default(programName, { pascalCase: true }); + const entry = overrideConfig[programName]; + const overrideAddress = new web3_js_1.PublicKey(typeof entry === "string" ? entry : entry.address); + let idl = idlMap.get(programName); + if (typeof entry !== "string" && entry.idl) { + idl = JSON.parse(require("fs").readFileSync(entry.idl, "utf-8")); + } + workspaceCache[wsProgramName] = new program_1.Program(idl, overrideAddress); + }); +} +exports.default = workspace; +//# sourceMappingURL=workspace.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js.map b/tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js.map new file mode 100644 index 0000000..ab1847a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/cjs/workspace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/workspace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAkC;AAClC,2CAA6B;AAC7B,6CAA4C;AAC5C,uCAAoC;AAEpC,2CAA2C;AAE3C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,EAAS,EAAE;IACrC,GAAG,CAAC,cAA0C,EAAE,WAAmB;QACjE,IAAI,kBAAS,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;YAC1D,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,MAAM,OAAO,GAAG,OAAO,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G,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAG,EAAE;YAC1C,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;SAClE;QACD,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,iBAAO,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts new file mode 100644 index 0000000..bfc74e6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts @@ -0,0 +1,20 @@ +/// +import { Idl } from "../idl"; +/** + * Number of bytes of the account discriminator. + */ +export declare const ACCOUNT_DISCRIMINATOR_SIZE = 8; +/** + * Encodes and decodes account objects. + */ +export declare class AccountsCoder { + /** + * Maps account type identifier to a layout. + */ + private accountLayouts; + constructor(idl: Idl); + encode(accountName: string, account: T): Promise; + decode(accountName: string, ix: Buffer): T; +} +export declare function accountDiscriminator(name: string): Promise; +//# sourceMappingURL=accounts.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts.map new file mode 100644 index 0000000..51a2ce2 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/accounts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/coder/accounts.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAI7B;;GAEG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;GAEG;AACH,qBAAa,aAAa;IACxB;;OAEG;IACH,OAAO,CAAC,cAAc,CAAsB;gBAEzB,GAAG,EAAE,GAAG;IAYd,MAAM,CAAC,CAAC,GAAG,GAAG,EACzB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,GACT,OAAO,CAAC,MAAM,CAAC;IASX,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC;CAM3D;AAGD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAExE"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts new file mode 100644 index 0000000..bb3af5d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts @@ -0,0 +1,5 @@ +/// +import { Idl, IdlTypeDef } from "../idl"; +export declare function accountSize(idl: Idl, idlAccount: IdlTypeDef): number | undefined; +export declare function sighash(nameSpace: string, ixName: string): Buffer; +//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts.map new file mode 100644 index 0000000..306a48d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/common.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/coder/common.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAY,UAAU,EAA2B,MAAM,QAAQ,CAAC;AAG5E,wBAAgB,WAAW,CACzB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,GACrB,MAAM,GAAG,SAAS,CA8BpB;AAsED,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAIjE"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts new file mode 100644 index 0000000..6340a48 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts @@ -0,0 +1,17 @@ +/// +import { Idl } from "../idl"; +import { Event } from "../program/event"; +export declare class EventCoder { + /** + * Maps account type identifier to a layout. + */ + private layouts; + /** + * Maps base64 encoded event discriminator to event name. + */ + private discriminators; + constructor(idl: Idl); + decode(log: string): Event | null; +} +export declare function eventDiscriminator(name: string): Buffer; +//# sourceMappingURL=event.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts.map new file mode 100644 index 0000000..59c33bb --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/event.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/coder/event.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,GAAG,EAAc,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC,qBAAa,UAAU;IACrB;;OAEG;IACH,OAAO,CAAC,OAAO,CAAsB;IAErC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAsB;gBAEzB,GAAG,EAAE,GAAG;IA8BpB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;CAoBzC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts new file mode 100644 index 0000000..336563a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts @@ -0,0 +1,7 @@ +import { Layout } from "buffer-layout"; +import { IdlField, IdlTypeDef } from "../idl"; +export declare class IdlCoder { + static fieldLayout(field: IdlField, types?: IdlTypeDef[]): Layout; + static typeDefLayout(typeDef: IdlTypeDef, types: IdlTypeDef[], name?: string): Layout; +} +//# sourceMappingURL=idl.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts.map new file mode 100644 index 0000000..c2fd882 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/idl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"idl.d.ts","sourceRoot":"","sources":["../../src/coder/idl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA2B,MAAM,QAAQ,CAAC;AAGvE,qBAAa,QAAQ;WACL,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,GAAG,MAAM;WA0G1D,aAAa,CACzB,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,UAAU,EAAE,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM;CAoCV"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts new file mode 100644 index 0000000..a564d83 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts @@ -0,0 +1,41 @@ +/// +import { Idl } from "../idl"; +import { InstructionCoder } from "./instruction"; +import { AccountsCoder } from "./accounts"; +import { TypesCoder } from "./types"; +import { EventCoder } from "./event"; +import { StateCoder } from "./state"; +export { accountSize } from "./common"; +export { TypesCoder } from "./types"; +export { InstructionCoder } from "./instruction"; +export { AccountsCoder, accountDiscriminator, ACCOUNT_DISCRIMINATOR_SIZE, } from "./accounts"; +export { EventCoder, eventDiscriminator } from "./event"; +export { StateCoder, stateDiscriminator } from "./state"; +/** + * Coder provides a facade for encoding and decoding all IDL related objects. + */ +export default class Coder { + /** + * Instruction coder. + */ + readonly instruction: InstructionCoder; + /** + * Account coder. + */ + readonly accounts: AccountsCoder; + /** + * Types coder. + */ + readonly types: TypesCoder; + /** + * Coder for state structs. + */ + readonly state: StateCoder; + /** + * Coder for events. + */ + readonly events: EventCoder; + constructor(idl: Idl); + sighash(nameSpace: string, ixName: string): Buffer; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts.map new file mode 100644 index 0000000..3facba4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/coder/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;gBAEhB,GAAG,EAAE,GAAG;IAUb,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;CAG1D"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts new file mode 100644 index 0000000..56d4d44 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts @@ -0,0 +1,57 @@ +/// +import { Idl } from "../idl"; +import { AccountMeta, PublicKey } from "@solana/web3.js"; +/** + * Namespace for state method function signatures. + */ +export declare const SIGHASH_STATE_NAMESPACE = "state"; +/** + * Namespace for global instruction function signatures (i.e. functions + * that aren't namespaced by the state or any of its trait implementations). + */ +export declare const SIGHASH_GLOBAL_NAMESPACE = "global"; +/** + * Encodes and decodes program instructions. + */ +export declare class InstructionCoder { + private idl; + private ixLayout; + private sighashLayouts; + constructor(idl: Idl); + /** + * Encodes a program instruction. + */ + encode(ixName: string, ix: any): Buffer; + /** + * Encodes a program state instruction. + */ + encodeState(ixName: string, ix: any): Buffer; + private _encode; + private static parseIxLayout; + /** + * Dewcodes a program instruction. + */ + decode(ix: Buffer | string, encoding?: "hex" | "base58"): Instruction | null; + /** + * Returns a formatted table of all the fields in the given instruction data. + */ + format(ix: Instruction, accountMetas: AccountMeta[]): InstructionDisplay | null; +} +export declare type Instruction = { + name: string; + data: Object; +}; +export declare type InstructionDisplay = { + args: { + name: string; + type: string; + data: string; + }[]; + accounts: { + name?: string; + pubkey: PublicKey; + isSigner: boolean; + isWritable: boolean; + }[]; +}; +//# sourceMappingURL=instruction.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts.map new file mode 100644 index 0000000..3e410ca --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/instruction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"instruction.d.ts","sourceRoot":"","sources":["../../src/coder/instruction.ts"],"names":[],"mappings":";AAIA,OAAO,EACL,GAAG,EAOJ,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAC/C;;;GAGG;AACH,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAEjD;;GAEG;AACH,qBAAa,gBAAgB;IAOR,OAAO,CAAC,GAAG;IAL9B,OAAO,CAAC,QAAQ,CAAsB;IAGtC,OAAO,CAAC,cAAc,CAAgD;gBAE3C,GAAG,EAAE,GAAG;IAyBnC;;OAEG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG;IAIrC;;OAEG;IACI,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG;IAI1C,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,MAAM,CAAC,aAAa;IA8B5B;;OAEG;IACI,MAAM,CACX,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,QAAQ,GAAE,KAAK,GAAG,QAAgB,GACjC,WAAW,GAAG,IAAI;IAgBrB;;OAEG;IACI,MAAM,CACX,EAAE,EAAE,WAAW,EACf,YAAY,EAAE,WAAW,EAAE,GAC1B,kBAAkB,GAAG,IAAI;CAG7B;AAED,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrD,QAAQ,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,SAAS,CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC;QAClB,UAAU,EAAE,OAAO,CAAC;KACrB,EAAE,CAAC;CACL,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts new file mode 100644 index 0000000..d17d6a6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts @@ -0,0 +1,10 @@ +/// +import { Idl } from "../idl"; +export declare class StateCoder { + private layout; + constructor(idl: Idl); + encode(name: string, account: T): Promise; + decode(ix: Buffer): T; +} +export declare function stateDiscriminator(name: string): Promise; +//# sourceMappingURL=state.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts.map new file mode 100644 index 0000000..6e4ef70 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/state.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/coder/state.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAI7B,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAS;gBAEJ,GAAG,EAAE,GAAG;IAOd,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAUhE,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC;CAKtC;AAGD,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGtE"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts b/tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts new file mode 100644 index 0000000..c2a36fa --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts @@ -0,0 +1,15 @@ +/// +import { Idl } from "../idl"; +/** + * Encodes and decodes user defined types. + */ +export declare class TypesCoder { + /** + * Maps account type identifier to a layout. + */ + private layouts; + constructor(idl: Idl); + encode(accountName: string, account: T): Buffer; + decode(accountName: string, ix: Buffer): T; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts.map new file mode 100644 index 0000000..d01da5d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/coder/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/coder/types.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAG7B;;GAEG;AACH,qBAAa,UAAU;IACrB;;OAEG;IACH,OAAO,CAAC,OAAO,CAAsB;gBAElB,GAAG,EAAE,GAAG;IAapB,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM;IAOxD,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC;CAI3D"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/error.d.ts b/tests/node_modules/@project-serum/anchor/dist/error.d.ts new file mode 100644 index 0000000..ab2034a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/error.d.ts @@ -0,0 +1,10 @@ +export declare class IdlError extends Error { +} +export declare class ProgramError extends Error { + readonly code: number; + readonly msg: string; + constructor(code: number, msg: string, ...params: any[]); + static parse(err: any, idlErrors: Map): ProgramError | null; + toString(): string; +} +//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/error.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/error.d.ts.map new file mode 100644 index 0000000..3d7b3db --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;CAAG;AAGtC,qBAAa,YAAa,SAAQ,KAAK;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM;gBAAlC,IAAI,EAAE,MAAM,EAAW,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;WAI3D,KAAK,CACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,YAAY,GAAG,IAAI;IA+Bf,QAAQ,IAAI,MAAM;CAG1B"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js new file mode 100644 index 0000000..20477dd --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js @@ -0,0 +1,40 @@ +import { IdlCoder } from "./idl"; +import { sha256 } from "js-sha256"; +/** + * Number of bytes of the account discriminator. + */ +export const ACCOUNT_DISCRIMINATOR_SIZE = 8; +/** + * Encodes and decodes account objects. + */ +export class AccountsCoder { + constructor(idl) { + if (idl.accounts === undefined) { + this.accountLayouts = new Map(); + return; + } + const layouts = idl.accounts.map((acc) => { + return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)]; + }); + this.accountLayouts = new Map(layouts); + } + async encode(accountName, account) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const layout = this.accountLayouts.get(accountName); + const len = layout.encode(account, buffer); + let accountData = buffer.slice(0, len); + let discriminator = await accountDiscriminator(accountName); + return Buffer.concat([discriminator, accountData]); + } + decode(accountName, ix) { + // Chop off the discriminator before decoding. + const data = ix.slice(8); + const layout = this.accountLayouts.get(accountName); + return layout.decode(data); + } +} +// Calculates unique 8 byte discriminator prepended to all anchor accounts. +export async function accountDiscriminator(name) { + return Buffer.from(sha256.digest(`account:${name}`)).slice(0, 8); +} +//# sourceMappingURL=accounts.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js.map new file mode 100644 index 0000000..0d3f7ff --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/accounts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/coder/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,aAAa;IAMxB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;YAChC,OAAO;SACR;QACD,MAAM,OAAO,GAAuB,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YAC3D,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,MAAM,CACjB,WAAmB,EACnB,OAAU;QAEV,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACpD,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3C,IAAI,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACvC,IAAI,aAAa,GAAG,MAAM,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;IACrD,CAAC;IAEM,MAAM,CAAU,WAAmB,EAAE,EAAU;QACpD,8CAA8C;QAC9C,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAY;IACrD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnE,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js new file mode 100644 index 0000000..a923e96 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js @@ -0,0 +1,102 @@ +import { snakeCase } from "snake-case"; +import { sha256 } from "js-sha256"; +import { IdlError } from "../error"; +export function accountSize(idl, idlAccount) { + if (idlAccount.type.kind === "enum") { + let variantSizes = idlAccount.type.variants.map((variant) => { + if (variant.fields === undefined) { + return 0; + } + return (variant.fields + // @ts-ignore + .map((f) => { + // @ts-ignore + if (f.name === undefined) { + throw new Error("Tuple enum variants not yet implemented."); + } + // @ts-ignore + return typeSize(idl, f.type); + }) + .reduce((a, b) => a + b)); + }); + return Math.max(...variantSizes) + 1; + } + if (idlAccount.type.fields === undefined) { + return 0; + } + return idlAccount.type.fields + .map((f) => typeSize(idl, f.type)) + .reduce((a, b) => a + b); +} +// Returns the size of the type in bytes. For variable length types, just return +// 1. Users should override this value in such cases. +function typeSize(idl, ty) { + switch (ty) { + case "bool": + return 1; + case "u8": + return 1; + case "i8": + return 1; + case "i16": + return 2; + case "u16": + return 2; + case "u32": + return 4; + case "i32": + return 4; + case "u64": + return 8; + case "i64": + return 8; + case "u128": + return 16; + case "i128": + return 16; + case "bytes": + return 1; + case "string": + return 1; + case "publicKey": + return 32; + default: + // @ts-ignore + if (ty.vec !== undefined) { + return 1; + } + // @ts-ignore + if (ty.option !== undefined) { + // @ts-ignore + return 1 + typeSize(idl, ty.option); + } + // @ts-ignore + if (ty.defined !== undefined) { + // @ts-ignore + const filtered = idl.types.filter((t) => t.name === ty.defined); + if (filtered.length !== 1) { + throw new IdlError(`Type not found: ${JSON.stringify(ty)}`); + } + let typeDef = filtered[0]; + return accountSize(idl, typeDef); + } + // @ts-ignore + if (ty.array !== undefined) { + // @ts-ignore + let arrayTy = ty.array[0]; + // @ts-ignore + let arraySize = ty.array[1]; + // @ts-ignore + return typeSize(idl, arrayTy) * arraySize; + } + throw new Error(`Invalid type ${JSON.stringify(ty)}`); + } +} +// Not technically sighash, since we don't include the arguments, as Rust +// doesn't allow function overloading. +export function sighash(nameSpace, ixName) { + let name = snakeCase(ixName); + let preimage = `${nameSpace}:${name}`; + return Buffer.from(sha256.digest(preimage)).slice(0, 8); +} +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js.map new file mode 100644 index 0000000..2cec7e2 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/coder/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,UAAU,WAAW,CACzB,GAAQ,EACR,UAAsB;IAEtB,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;QACnC,IAAI,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAC7C,CAAC,OAAuB,EAAE,EAAE;YAC1B,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;gBAChC,OAAO,CAAC,CAAC;aACV;YACD,OAAO,CACL,OAAO,CAAC,MAAM;gBACZ,aAAa;iBACZ,GAAG,CAAC,CAAC,CAAqB,EAAE,EAAE;gBAC7B,aAAa;gBACb,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE;oBACxB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;iBAC7D;gBACD,aAAa;gBACb,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC,CAAC;iBACD,MAAM,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAC3C,CAAC;QAC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C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js new file mode 100644 index 0000000..69d57a5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js @@ -0,0 +1,54 @@ +import * as base64 from "base64-js"; +import { sha256 } from "js-sha256"; +import { IdlCoder } from "./idl"; +export class EventCoder { + constructor(idl) { + if (idl.events === undefined) { + this.layouts = new Map(); + return; + } + const layouts = idl.events.map((event) => { + let eventTypeDef = { + name: event.name, + type: { + kind: "struct", + fields: event.fields.map((f) => { + return { name: f.name, type: f.type }; + }), + }, + }; + return [event.name, IdlCoder.typeDefLayout(eventTypeDef, idl.types)]; + }); + // @ts-ignore + this.layouts = new Map(layouts); + this.discriminators = new Map(idl.events === undefined + ? [] + : idl.events.map((e) => [ + base64.fromByteArray(eventDiscriminator(e.name)), + e.name, + ])); + } + decode(log) { + let logArr; + // This will throw if log length is not a multiple of 4. + try { + logArr = Buffer.from(base64.toByteArray(log)); + } + catch (e) { + return null; + } + const disc = base64.fromByteArray(logArr.slice(0, 8)); + // Only deserialize if the discriminator implies a proper event. + const eventName = this.discriminators.get(disc); + if (eventName === undefined) { + return null; + } + const layout = this.layouts.get(eventName); + const data = layout.decode(logArr.slice(8)); + return { data, name: eventName }; + } +} +export function eventDiscriminator(name) { + return Buffer.from(sha256.digest(`event:${name}`)).slice(0, 8); +} +//# sourceMappingURL=event.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js.map new file mode 100644 index 0000000..11aa4c6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/event.js.map @@ -0,0 +1 @@ +{"version":3,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AI,CAAC,CAAC;gBAChD,CAAC,CAAC,IAAI;aACP,CAAC,CACP,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,GAAW;QACvB,IAAI,MAAc,CAAC;QACnB,wDAAwD;QACxD,IAAI;YACF,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;SAC/C;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,IAAI,CAAC;SACb;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAEtD,gEAAgE;QAChE,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IACnC,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js new file mode 100644 index 0000000..8b0a8fc --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js @@ -0,0 +1,135 @@ +import camelCase from "camelcase"; +import * as borsh from "@project-serum/borsh"; +import { IdlError } from "../error"; +export class IdlCoder { + static fieldLayout(field, types) { + const fieldName = field.name !== undefined ? camelCase(field.name) : undefined; + switch (field.type) { + case "bool": { + return borsh.bool(fieldName); + } + case "u8": { + return borsh.u8(fieldName); + } + case "i8": { + return borsh.i8(fieldName); + } + case "u16": { + return borsh.u16(fieldName); + } + case "i16": { + return borsh.i16(fieldName); + } + case "u32": { + return borsh.u32(fieldName); + } + case "i32": { + return borsh.i32(fieldName); + } + case "u64": { + return borsh.u64(fieldName); + } + case "i64": { + return borsh.i64(fieldName); + } + case "u128": { + return borsh.u128(fieldName); + } + case "i128": { + return borsh.i128(fieldName); + } + case "bytes": { + return borsh.vecU8(fieldName); + } + case "string": { + return borsh.str(fieldName); + } + case "publicKey": { + return borsh.publicKey(fieldName); + } + default: { + // @ts-ignore + if (field.type.vec) { + return borsh.vec(IdlCoder.fieldLayout({ + name: undefined, + // @ts-ignore + type: field.type.vec, + }, types), fieldName); + // @ts-ignore + } + else if (field.type.option) { + return borsh.option(IdlCoder.fieldLayout({ + name: undefined, + // @ts-ignore + type: field.type.option, + }, types), fieldName); + // @ts-ignore + } + else if (field.type.defined) { + // User defined type. + if (types === undefined) { + throw new IdlError("User defined types not provided"); + } + // @ts-ignore + const filtered = types.filter((t) => t.name === field.type.defined); + if (filtered.length !== 1) { + throw new IdlError(`Type not found: ${JSON.stringify(field)}`); + } + return IdlCoder.typeDefLayout(filtered[0], types, fieldName); + // @ts-ignore + } + else if (field.type.array) { + // @ts-ignore + let arrayTy = field.type.array[0]; + // @ts-ignore + let arrayLen = field.type.array[1]; + let innerLayout = IdlCoder.fieldLayout({ + name: undefined, + type: arrayTy, + }, types); + return borsh.array(innerLayout, arrayLen, fieldName); + } + else { + throw new Error(`Not yet implemented: ${field}`); + } + } + } + } + static typeDefLayout(typeDef, types, name) { + if (typeDef.type.kind === "struct") { + const fieldLayouts = typeDef.type.fields.map((field) => { + const x = IdlCoder.fieldLayout(field, types); + return x; + }); + return borsh.struct(fieldLayouts, name); + } + else if (typeDef.type.kind === "enum") { + let variants = typeDef.type.variants.map((variant) => { + const name = camelCase(variant.name); + if (variant.fields === undefined) { + return borsh.struct([], name); + } + // @ts-ignore + const fieldLayouts = variant.fields.map((f) => { + // @ts-ignore + if (f.name === undefined) { + throw new Error("Tuple enum variants not yet implemented."); + } + // @ts-ignore + return IdlCoder.fieldLayout(f, types); + }); + return borsh.struct(fieldLayouts, name); + }); + if (name !== undefined) { + // Buffer-layout lib requires the name to be null (on construction) + // when used as a field. + return borsh.rustEnum(variants).replicate(name); + } + return borsh.rustEnum(variants, name); + } + else { + throw new Error(`Unknown type kint: ${typeDef}`); + } + } +} +//# sourceMappingURL=idl.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js.map new file mode 100644 index 0000000..d3603dc --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/idl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"idl.js","sourceRoot":"","sources":["../../../src/coder/idl.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,OAAO,QAAQ;IACZ,MAAM,CAAC,WAAW,CAAC,KAAe,EAAE,KAAoB;QAC7D,MAAM,SAAS,GACb,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/D,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,MAAM,CAAC,CAAC;gBACX,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC9B;YACD,KAAK,IAAI,CAAC,CAAC;gBACT,OAAO,KAAK,CAAC,EAAE,C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AAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE;wBACxB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;qBAC7D;oBACD,aAAa;oBACb,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;gBACH,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;YAEH,IAAI,IAAI,KAAK,SAAS,EAAE;gBACtB,mEAAmE;gBACnE,wBAAwB;gBACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;aACjD;YAED,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACvC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,sBAAsB,OAAO,EAAE,CAAC,CAAC;SAClD;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js new file mode 100644 index 0000000..4d3b059 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js @@ -0,0 +1,30 @@ +import { InstructionCoder } from "./instruction"; +import { AccountsCoder } from "./accounts"; +import { TypesCoder } from "./types"; +import { EventCoder } from "./event"; +import { StateCoder } from "./state"; +import { sighash } from "./common"; +export { accountSize } from "./common"; +export { TypesCoder } from "./types"; +export { InstructionCoder } from "./instruction"; +export { AccountsCoder, accountDiscriminator, ACCOUNT_DISCRIMINATOR_SIZE, } from "./accounts"; +export { EventCoder, eventDiscriminator } from "./event"; +export { StateCoder, stateDiscriminator } from "./state"; +/** + * Coder provides a facade for encoding and decoding all IDL related objects. + */ +export default class Coder { + constructor(idl) { + this.instruction = new InstructionCoder(idl); + this.accounts = new AccountsCoder(idl); + this.types = new TypesCoder(idl); + this.events = new EventCoder(idl); + if (idl.state) { + this.state = new StateCoder(idl); + } + } + sighash(nameSpace, ixName) { + return sighash(nameSpace, ixName); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js.map new file mode 100644 index 0000000..3b95b26 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/coder/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,KAAK;IA0BxB,YAAY,GAAQ;QAClB,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,KAAK,EAAE;YACb,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;SAClC;IACH,CAAC;IAEM,OAAO,CAAC,SAAiB,EAAE,MAAc;QAC9C,OAAO,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js new file mode 100644 index 0000000..ecf86f2 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js @@ -0,0 +1,276 @@ +import camelCase from "camelcase"; +import * as borsh from "@project-serum/borsh"; +import * as bs58 from "bs58"; +import { IdlCoder } from "./idl"; +import { sighash } from "./common"; +/** + * Namespace for state method function signatures. + */ +export const SIGHASH_STATE_NAMESPACE = "state"; +/** + * Namespace for global instruction function signatures (i.e. functions + * that aren't namespaced by the state or any of its trait implementations). + */ +export const SIGHASH_GLOBAL_NAMESPACE = "global"; +/** + * Encodes and decodes program instructions. + */ +export class InstructionCoder { + constructor(idl) { + this.idl = idl; + this.ixLayout = InstructionCoder.parseIxLayout(idl); + const sighashLayouts = new Map(); + idl.instructions.forEach((ix) => { + const sh = sighash(SIGHASH_GLOBAL_NAMESPACE, ix.name); + sighashLayouts.set(bs58.encode(sh), { + layout: this.ixLayout.get(ix.name), + name: ix.name, + }); + }); + if (idl.state) { + idl.state.methods.map((ix) => { + const sh = sighash(SIGHASH_STATE_NAMESPACE, ix.name); + sighashLayouts.set(bs58.encode(sh), { + layout: this.ixLayout.get(ix.name), + name: ix.name, + }); + }); + } + this.sighashLayouts = sighashLayouts; + } + /** + * Encodes a program instruction. + */ + encode(ixName, ix) { + return this._encode(SIGHASH_GLOBAL_NAMESPACE, ixName, ix); + } + /** + * Encodes a program state instruction. + */ + encodeState(ixName, ix) { + return this._encode(SIGHASH_STATE_NAMESPACE, ixName, ix); + } + _encode(nameSpace, ixName, ix) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const methodName = camelCase(ixName); + const len = this.ixLayout.get(methodName).encode(ix, buffer); + const data = buffer.slice(0, len); + return Buffer.concat([sighash(nameSpace, ixName), data]); + } + static parseIxLayout(idl) { + const stateMethods = idl.state ? idl.state.methods : []; + const ixLayouts = stateMethods + .map((m) => { + let fieldLayouts = m.args.map((arg) => { + var _a, _b; + return IdlCoder.fieldLayout(arg, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])])); + }); + const name = camelCase(m.name); + return [name, borsh.struct(fieldLayouts, name)]; + }) + .concat(idl.instructions.map((ix) => { + let fieldLayouts = ix.args.map((arg) => { + var _a, _b; + return IdlCoder.fieldLayout(arg, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])])); + }); + const name = camelCase(ix.name); + return [name, borsh.struct(fieldLayouts, name)]; + })); + // @ts-ignore + return new Map(ixLayouts); + } + /** + * Dewcodes a program instruction. + */ + decode(ix, encoding = "hex") { + if (typeof ix === "string") { + ix = encoding === "hex" ? Buffer.from(ix, "hex") : bs58.decode(ix); + } + let sighash = bs58.encode(ix.slice(0, 8)); + let data = ix.slice(8); + const decoder = this.sighashLayouts.get(sighash); + if (!decoder) { + return null; + } + return { + data: decoder.layout.decode(data), + name: decoder.name, + }; + } + /** + * Returns a formatted table of all the fields in the given instruction data. + */ + format(ix, accountMetas) { + return InstructionFormatter.format(ix, accountMetas, this.idl); + } +} +class InstructionFormatter { + static format(ix, accountMetas, idl) { + const idlIx = idl.instructions.filter((i) => ix.name === i.name)[0]; + if (idlIx === undefined) { + console.error("Invalid instruction given"); + return null; + } + const args = idlIx.args.map((idlField) => { + return { + name: idlField.name, + type: InstructionFormatter.formatIdlType(idlField.type), + data: InstructionFormatter.formatIdlData(idlField, ix.data[idlField.name], idl.types), + }; + }); + const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts(idlIx.accounts); + const accounts = accountMetas.map((meta, idx) => { + if (idx < flatIdlAccounts.length) { + return { + name: flatIdlAccounts[idx].name, + ...meta, + }; + } + // "Remaining accounts" are unnamed in Anchor. + else { + return { + name: undefined, + ...meta, + }; + } + }); + return { + args, + accounts, + }; + } + static formatIdlType(idlType) { + if (typeof idlType === "string") { + return idlType; + } + // @ts-ignore + if (idlType.vec) { + // @ts-ignore + return `Vec<${this.formatIdlType(idlType.vec)}>`; + } + // @ts-ignore + if (idlType.option) { + // @ts-ignore + return `Option<${this.formatIdlType(idlType.option)}>`; + } + // @ts-ignore + if (idlType.defined) { + // @ts-ignore + return idlType.defined; + } + } + static formatIdlData(idlField, data, types) { + if (typeof idlField.type === "string") { + return data.toString(); + } + // @ts-ignore + if (idlField.type.vec) { + // @ts-ignore + return ("[" + + data + // @ts-ignore + .map((d) => this.formatIdlData( + // @ts-ignore + { name: "", type: idlField.type.vec }, d)) + .join(", ") + + "]"); + } + // @ts-ignore + if (idlField.type.option) { + // @ts-ignore + return data === null + ? "null" + : this.formatIdlData( + // @ts-ignore + { name: "", type: idlField.type.option }, data); + } + // @ts-ignore + if (idlField.type.defined) { + if (types === undefined) { + throw new Error("User defined types not provided"); + } + // @ts-ignore + const filtered = types.filter((t) => t.name === idlField.type.defined); + if (filtered.length !== 1) { + // @ts-ignore + throw new Error(`Type not found: ${idlField.type.defined}`); + } + return InstructionFormatter.formatIdlDataDefined(filtered[0], data, types); + } + return "unknown"; + } + static formatIdlDataDefined(typeDef, data, types) { + if (typeDef.type.kind === "struct") { + const fields = Object.keys(data) + .map((k) => { + const f = typeDef.type.fields.filter((f) => f.name === k)[0]; + if (f === undefined) { + throw new Error("Unable to find type"); + } + return (k + ": " + InstructionFormatter.formatIdlData(f, data[k], types)); + }) + .join(", "); + return "{ " + fields + " }"; + } + else { + if (typeDef.type.variants.length === 0) { + return "{}"; + } + // Struct enum. + if (typeDef.type.variants[0].name) { + const variant = Object.keys(data)[0]; + const enumType = data[variant]; + const namedFields = Object.keys(enumType) + .map((f) => { + var _a; + const fieldData = enumType[f]; + const idlField = (_a = typeDef.type.variants[variant]) === null || _a === void 0 ? void 0 : _a.filter((v) => v.name === f)[0]; + if (idlField === undefined) { + throw new Error("Unable to find variant"); + } + return (f + + ": " + + InstructionFormatter.formatIdlData(idlField, fieldData, types)); + }) + .join(", "); + const variantName = camelCase(variant, { pascalCase: true }); + if (namedFields.length === 0) { + return variantName; + } + return `${variantName} { ${namedFields} }`; + } + // Tuple enum. + else { + // TODO. + return "Tuple formatting not yet implemented"; + } + } + } + static flattenIdlAccounts(accounts, prefix) { + // @ts-ignore + return accounts + .map((account) => { + const accName = sentenceCase(account.name); + // @ts-ignore + if (account.accounts) { + const newPrefix = prefix ? `${prefix} > ${accName}` : accName; + // @ts-ignore + return InstructionFormatter.flattenIdlAccounts( + // @ts-ignore + account.accounts, newPrefix); + } + else { + return { + ...account, + name: prefix ? `${prefix} > ${accName}` : accName, + }; + } + }) + .flat(); + } +} +function sentenceCase(field) { + const result = field.replace(/([A-Z])/g, " $1"); + return result.charAt(0).toUpperCase() + result.slice(1); +} +//# sourceMappingURL=instruction.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js.map new file mode 100644 index 0000000..faeed86 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/instruction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"instruction.js","sourceRoot":"","sources":["../../../src/coder/instruction.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAC9C,OAA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,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;gBAC9D,aAAa;gBACb,OAAO,oBAAoB,CAAC,kBAAkB;gBAC5C,aAAa;gBACb,OAAO,CAAC,QAAQ,EAChB,SAAS,CACV,CAAC;aACH;iBAAM;gBACL,OAAO;oBACL,GAAG,OAAO;oBACV,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO;iBAClD,CAAC;aACH;QACH,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IACZ,CAAC;CACF;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js new file mode 100644 index 0000000..2867e0d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js @@ -0,0 +1,29 @@ +import { sha256 } from "js-sha256"; +import { IdlCoder } from "./idl"; +import * as features from "../utils/features"; +export class StateCoder { + constructor(idl) { + if (idl.state === undefined) { + throw new Error("Idl state not defined."); + } + this.layout = IdlCoder.typeDefLayout(idl.state.struct, idl.types); + } + async encode(name, account) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const len = this.layout.encode(account, buffer); + const disc = await stateDiscriminator(name); + const accData = buffer.slice(0, len); + return Buffer.concat([disc, accData]); + } + decode(ix) { + // Chop off discriminator. + const data = ix.slice(8); + return this.layout.decode(data); + } +} +// Calculates unique 8 byte discriminator prepended to all anchor state accounts. +export async function stateDiscriminator(name) { + let ns = features.isSet("anchor-deprecated-state") ? "account" : "state"; + return Buffer.from(sha256.digest(`${ns}:${name}`)).slice(0, 8); +} +//# sourceMappingURL=state.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js.map new file mode 100644 index 0000000..ee0f84a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/coder/state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,OAAO,UAAU;IAGrB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;IAEM,KAAK,CAAC,MAAM,CAAU,IAAY,EAAE,OAAU;QACnD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;QACjE,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAEhD,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAErC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACxC,CAAC;IAEM,MAAM,CAAU,EAAU;QAC/B,0BAA0B;QAC1B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAED,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAY;IACnD,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js b/tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js new file mode 100644 index 0000000..2232207 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js @@ -0,0 +1,28 @@ +import { IdlCoder } from "./idl"; +/** + * Encodes and decodes user defined types. + */ +export class TypesCoder { + constructor(idl) { + if (idl.types === undefined) { + this.layouts = new Map(); + return; + } + const layouts = idl.types.map((acc) => { + return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)]; + }); + // @ts-ignore + this.layouts = new Map(layouts); + } + encode(accountName, account) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const layout = this.layouts.get(accountName); + const len = layout.encode(account, buffer); + return buffer.slice(0, len); + } + decode(accountName, ix) { + const layout = this.layouts.get(accountName); + return layout.decode(ix); + } +} +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js.map new file mode 100644 index 0000000..629756d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/coder/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/coder/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC;;GAEG;AACH,MAAM,OAAO,UAAU;IAMrB,YAAmB,GAAQ;QACzB,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;YAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;YACzB,OAAO;SACR;QACD,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACpC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,aAAa;QACb,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAEM,MAAM,CAAU,WAAmB,EAAE,OAAU;QACpD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC7C,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3C,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAU,WAAmB,EAAE,EAAU;QACpD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/error.js b/tests/node_modules/@project-serum/anchor/dist/esm/error.js new file mode 100644 index 0000000..668d0b1 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/error.js @@ -0,0 +1,157 @@ +export class IdlError extends Error { +} +// An error from a user defined program. +export class ProgramError extends Error { + constructor(code, msg, ...params) { + super(...params); + this.code = code; + this.msg = msg; + } + static parse(err, idlErrors) { + // TODO: don't rely on the error string. web3.js should preserve the error + // code information instead of giving us an untyped string. + let components = err.toString().split("custom program error: "); + if (components.length !== 2) { + return null; + } + let errorCode; + try { + errorCode = parseInt(components[1]); + } + catch (parseErr) { + return null; + } + // Parse user error. + let errorMsg = idlErrors.get(errorCode); + if (errorMsg !== undefined) { + return new ProgramError(errorCode, errorMsg); + } + // Parse framework internal error. + errorMsg = LangErrorMessage.get(errorCode); + if (errorMsg !== undefined) { + return new ProgramError(errorCode, errorMsg); + } + // Unable to parse the error. Just return the untranslated error. + return null; + } + toString() { + return this.msg; + } +} +const LangErrorCode = { + // Instructions. + InstructionMissing: 100, + InstructionFallbackNotFound: 101, + InstructionDidNotDeserialize: 102, + InstructionDidNotSerialize: 103, + // IDL instructions. + IdlInstructionStub: 120, + IdlInstructionInvalidProgram: 121, + // Constraints. + ConstraintMut: 140, + ConstraintHasOne: 141, + ConstraintSigner: 142, + ConstraintRaw: 143, + ConstraintOwner: 144, + ConstraintRentExempt: 145, + ConstraintSeeds: 146, + ConstraintExecutable: 147, + ConstraintState: 148, + ConstraintAssociated: 149, + ConstraintAssociatedInit: 150, + ConstraintClose: 151, + ConstraintAddress: 152, + // Accounts. + AccountDiscriminatorAlreadySet: 160, + AccountDiscriminatorNotFound: 161, + AccountDiscriminatorMismatch: 162, + AccountDidNotDeserialize: 163, + AccountDidNotSerialize: 164, + AccountNotEnoughKeys: 165, + AccountNotMutable: 166, + AccountNotProgramOwned: 167, + // State. + StateInvalidAddress: 180, + // Used for APIs that shouldn't be used anymore. + Deprecated: 299, +}; +const LangErrorMessage = new Map([ + // Instructions. + [ + LangErrorCode.InstructionMissing, + "8 byte instruction identifier not provided", + ], + [ + LangErrorCode.InstructionFallbackNotFound, + "Fallback functions are not supported", + ], + [ + LangErrorCode.InstructionDidNotDeserialize, + "The program could not deserialize the given instruction", + ], + [ + LangErrorCode.InstructionDidNotSerialize, + "The program could not serialize the given instruction", + ], + // Idl instructions. + [ + LangErrorCode.IdlInstructionStub, + "The program was compiled without idl instructions", + ], + [ + LangErrorCode.IdlInstructionInvalidProgram, + "The transaction was given an invalid program for the IDL instruction", + ], + // Constraints. + [LangErrorCode.ConstraintMut, "A mut constraint was violated"], + [LangErrorCode.ConstraintHasOne, "A has_one constraint was violated"], + [LangErrorCode.ConstraintSigner, "A signer constraint was violated"], + [LangErrorCode.ConstraintRaw, "A raw constraint as violated"], + [LangErrorCode.ConstraintOwner, "An owner constraint was violated"], + [LangErrorCode.ConstraintRentExempt, "A rent exempt constraint was violated"], + [LangErrorCode.ConstraintSeeds, "A seeds constraint was violated"], + [LangErrorCode.ConstraintExecutable, "An executable constraint was violated"], + [LangErrorCode.ConstraintState, "A state constraint was violated"], + [LangErrorCode.ConstraintAssociated, "An associated constraint was violated"], + [ + LangErrorCode.ConstraintAssociatedInit, + "An associated init constraint was violated", + ], + [LangErrorCode.ConstraintClose, "A close constraint was violated"], + [LangErrorCode.ConstraintAddress, "An address constraint was violated"], + // Accounts. + [ + LangErrorCode.AccountDiscriminatorAlreadySet, + "The account discriminator was already set on this account", + ], + [ + LangErrorCode.AccountDiscriminatorNotFound, + "No 8 byte discriminator was found on the account", + ], + [ + LangErrorCode.AccountDiscriminatorMismatch, + "8 byte discriminator did not match what was expected", + ], + [LangErrorCode.AccountDidNotDeserialize, "Failed to deserialize the account"], + [LangErrorCode.AccountDidNotSerialize, "Failed to serialize the account"], + [ + LangErrorCode.AccountNotEnoughKeys, + "Not enough account keys given to the instruction", + ], + [LangErrorCode.AccountNotMutable, "The given account is not mutable"], + [ + LangErrorCode.AccountNotProgramOwned, + "The given account is not owned by the executing program", + ], + // State. + [ + LangErrorCode.StateInvalidAddress, + "The given state account does not have the correct address", + ], + // Misc. + [ + LangErrorCode.Deprecated, + "The API being used is deprecated and should no longer be used", + ], +]); +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/error.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/error.js.map new file mode 100644 index 0000000..89a3e80 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;CAAG;AAEtC,wCAAwC;AACxC,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAqB,IAAY,EAAW,GAAW,EAAE,GAAG,MAAa;QACvE,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;QADE,SAAI,GAAJ,IAAI,CAAQ;QAAW,QAAG,GAAH,GAAG,CAAQ;IAEvD,CAAC;IAEM,MAAM,CAAC,KAAK,CACjB,GAAQ,EACR,SAA8B;QAE9B,0EAA0E;QAC1E,iEAAiE;QACjE,IAAI,UAAU,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACb;QAED,IAAI,SAAiB,CAAC;QACtB,IAAI;YACF,SAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACrC;QAAC,OAAO,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QAED,oBAAoB;QACpB,IAAI,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,OAAO,IAAI,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;SAC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AC;IAC7E,CAAC,aAAa,CAAC,sBAAsB,EAAE,iCAAiC,CAAC;IACzE;QACE,aAAa,CAAC,oBAAoB;QAClC,kDAAkD;KACnD;IACD,CAAC,aAAa,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IACrE;QACE,aAAa,CAAC,sBAAsB;QACpC,yDAAyD;KAC1D;IAED,SAAS;IACT;QACE,aAAa,CAAC,mBAAmB;QACjC,2DAA2D;KAC5D;IAED,QAAQ;IACR;QACE,aAAa,CAAC,UAAU;QACxB,+DAA+D;KAChE;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/idl.js b/tests/node_modules/@project-serum/anchor/dist/esm/idl.js new file mode 100644 index 0000000..420e8e9 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/idl.js @@ -0,0 +1,24 @@ +import { PublicKey } from "@solana/web3.js"; +import * as borsh from "@project-serum/borsh"; +// Deterministic IDL address as a function of the program id. +export async function idlAddress(programId) { + const base = (await PublicKey.findProgramAddress([], programId))[0]; + return await PublicKey.createWithSeed(base, seed(), programId); +} +// Seed for generating the idlAddress. +export function seed() { + return "anchor:idl"; +} +const IDL_ACCOUNT_LAYOUT = borsh.struct([ + borsh.publicKey("authority"), + borsh.vecU8("data"), +]); +export function decodeIdlAccount(data) { + return IDL_ACCOUNT_LAYOUT.decode(data); +} +export function encodeIdlAccount(acc) { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const len = IDL_ACCOUNT_LAYOUT.encode(acc, buffer); + return buffer.slice(0, len); +} +//# sourceMappingURL=idl.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/idl.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/idl.js.map new file mode 100644 index 0000000..7094a49 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/idl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"idl.js","sourceRoot":"","sources":["../../src/idl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAsH9C,6DAA6D;AAC7D,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAoB;IACnD,MAAM,IAAI,GAAG,CAAC,MAAM,SAAS,CAAC,kBAAkB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,OAAO,MAAM,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC;AACjE,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,IAAI;IAClB,OAAO,YAAY,CAAC;AACtB,CAAC;AAQD,MAAM,kBAAkB,GAAoC,KAAK,CAAC,MAAM,CAAC;IACvE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;IAC5B,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAsB;IACrD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,8BAA8B;IACjE,MAAM,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/index.js b/tests/node_modules/@project-serum/anchor/dist/esm/index.js new file mode 100644 index 0000000..3327495 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/index.js @@ -0,0 +1,11 @@ +import BN from "bn.js"; +import * as web3 from "@solana/web3.js"; +import Provider, { getProvider, setProvider, NodeWallet as Wallet, } from "./provider"; +import Coder, { InstructionCoder, EventCoder, StateCoder, TypesCoder, AccountsCoder, } from "./coder"; +import workspace from "./workspace"; +import * as utils from "./utils"; +import { Program } from "./program"; +import { AccountClient, StateClient, } from "./program/namespace"; +import { EventParser } from "./program/event"; +export { workspace, Program, AccountClient, StateClient, Coder, InstructionCoder, EventCoder, StateCoder, TypesCoder, AccountsCoder, setProvider, getProvider, Provider, BN, web3, utils, Wallet, EventParser, }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/index.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/index.js.map new file mode 100644 index 0000000..cfb3739 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,EAAE,EACf,WAAW,EACX,WAAW,EACX,UAAU,IAAI,MAAM,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAGL,aAAa,EACb,WAAW,GASZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,SAAS,EACT,OAAO,EAEP,aAAa,EACb,WAAW,EAYX,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,EAGb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,EAAE,EACF,IAAI,EAEJ,KAAK,EACL,MAAM,EAEN,WAAW,GACZ,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/common.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/common.js new file mode 100644 index 0000000..02a679e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/common.js @@ -0,0 +1,51 @@ +import { PublicKey } from "@solana/web3.js"; +export function parseIdlErrors(idl) { + const errors = new Map(); + if (idl.errors) { + idl.errors.forEach((e) => { + var _a; + let msg = (_a = e.msg) !== null && _a !== void 0 ? _a : e.name; + errors.set(e.code, msg); + }); + } + return errors; +} +// Allow either IdLInstruction or IdlStateMethod since the types share fields. +export function toInstruction(idlIx, ...args) { + if (idlIx.args.length != args.length) { + throw new Error("Invalid argument length"); + } + const ix = {}; + let idx = 0; + idlIx.args.forEach((ixArg) => { + ix[ixArg.name] = args[idx]; + idx += 1; + }); + return ix; +} +// Throws error if any account required for the `ix` is not given. +export function validateAccounts(ixAccounts, accounts) { + ixAccounts.forEach((acc) => { + // @ts-ignore + if (acc.accounts !== undefined) { + // @ts-ignore + validateAccounts(acc.accounts, accounts[acc.name]); + } + else { + if (accounts[acc.name] === undefined) { + throw new Error(`Invalid arguments: ${acc.name} not provided.`); + } + } + }); +} +// Translates an address to a Pubkey. +export function translateAddress(address) { + if (typeof address === "string") { + const pk = new PublicKey(address); + return pk; + } + else { + return address; + } +} +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/common.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/common.js.map new file mode 100644 index 0000000..2f6f4ed --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/program/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC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CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE;gBACpC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,CAAC,IAAI,gBAAgB,CAAC,CAAC;aACjE;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,EAAE,CAAC;KACX;SAAM;QACL,OAAO,OAAO,CAAC;KAChB;AACH,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/context.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/context.js new file mode 100644 index 0000000..5c6313d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/context.js @@ -0,0 +1,12 @@ +export function splitArgsAndCtx(idlIx, args) { + let options = {}; + const inputLen = idlIx.args ? idlIx.args.length : 0; + if (args.length > inputLen) { + if (args.length !== inputLen + 1) { + throw new Error("provided too many arguments ${args}"); + } + options = args.pop(); + } + return [args, options]; +} +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/context.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/context.js.map new file mode 100644 index 0000000..67f580b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/program/context.ts"],"names":[],"mappings":"AA6DA,MAAM,UAAU,eAAe,CAC7B,KAAqB,EACrB,IAAW;IAEX,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,EAAE;QAC1B,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,GAAG,CAAC,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QACD,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;KACtB;IAED,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/event.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/event.js new file mode 100644 index 0000000..07c6443 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/event.js @@ -0,0 +1,186 @@ +import * as assert from "assert"; +const LOG_START_INDEX = "Program log: ".length; +export class EventManager { + constructor(programId, provider, coder) { + this._programId = programId; + this._provider = provider; + this._eventParser = new EventParser(programId, coder); + this._eventCallbacks = new Map(); + this._eventListeners = new Map(); + this._listenerIdCount = 0; + } + addEventListener(eventName, callback) { + let listener = this._listenerIdCount; + this._listenerIdCount += 1; + // Store the listener into the event map. + if (!(eventName in this._eventCallbacks)) { + this._eventListeners.set(eventName, []); + } + this._eventListeners.set(eventName, this._eventListeners.get(eventName).concat(listener)); + // Store the callback into the listener map. + this._eventCallbacks.set(listener, [eventName, callback]); + // Create the subscription singleton, if needed. + if (this._onLogsSubscriptionId !== undefined) { + return; + } + this._onLogsSubscriptionId = this._provider.connection.onLogs(this._programId, (logs, ctx) => { + if (logs.err) { + console.error(logs); + return; + } + this._eventParser.parseLogs(logs.logs, (event) => { + const allListeners = this._eventListeners.get(eventName); + if (allListeners) { + allListeners.forEach((listener) => { + const [, callback] = this._eventCallbacks.get(listener); + callback(event.data, ctx.slot); + }); + } + }); + }); + return listener; + } + async removeEventListener(listener) { + // Get the callback. + const callback = this._eventCallbacks.get(listener); + if (!callback) { + throw new Error(`Event listener ${listener} doesn't exist!`); + } + const [eventName] = callback; + // Get the listeners. + let listeners = this._eventListeners.get(eventName); + if (!listeners) { + throw new Error(`Event listeners dont' exist for ${eventName}!`); + } + // Update both maps. + this._eventCallbacks.delete(listener); + listeners = listeners.filter((l) => l !== listener); + if (listeners.length === 0) { + this._eventListeners.delete(eventName); + } + // Kill the websocket connection if all listeners have been removed. + if (this._eventCallbacks.size == 0) { + assert.ok(this._eventListeners.size === 0); + await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId); + this._onLogsSubscriptionId = undefined; + } + } +} +export class EventParser { + constructor(programId, coder) { + this.coder = coder; + this.programId = programId; + } + // Each log given, represents an array of messages emitted by + // a single transaction, which can execute many different programs across + // CPI boundaries. However, the subscription is only interested in the + // events emitted by *this* program. In achieving this, we keep track of the + // program execution context by parsing each log and looking for a CPI + // `invoke` call. If one exists, we know a new program is executing. So we + // push the programId onto a stack and switch the program context. This + // allows us to track, for a given log, which program was executing during + // its emission, thereby allowing us to know if a given log event was + // emitted by *this* program. If it was, then we parse the raw string and + // emit the event if the string matches the event being subscribed to. + parseLogs(logs, callback) { + const logScanner = new LogScanner(logs); + const execution = new ExecutionContext(logScanner.next()); + let log = logScanner.next(); + while (log !== null) { + let [event, newProgram, didPop] = this.handleLog(execution, log); + if (event) { + callback(event); + } + if (newProgram) { + execution.push(newProgram); + } + if (didPop) { + execution.pop(); + } + log = logScanner.next(); + } + } + // Main log handler. Returns a three element array of the event, the + // next program that was invoked for CPI, and a boolean indicating if + // a program has completed execution (and thus should be popped off the + // execution stack). + handleLog(execution, log) { + // Executing program is this program. + if (execution.stack.length > 0 && + execution.program() === this.programId.toString()) { + return this.handleProgramLog(log); + } + // Executing program is not this program. + else { + return [null, ...this.handleSystemLog(log)]; + } + } + // Handles logs from *this* program. + handleProgramLog(log) { + // This is a `msg!` log. + if (log.startsWith("Program log:")) { + const logStr = log.slice(LOG_START_INDEX); + const event = this.coder.events.decode(logStr); + return [event, null, false]; + } + // System log. + else { + return [null, ...this.handleSystemLog(log)]; + } + } + // Handles logs when the current program being executing is *not* this. + handleSystemLog(log) { + // System component. + const logStart = log.split(":")[0]; + // Did the program finish executing? + if (logStart.match(/^Program (.*) success/g) !== null) { + return [null, true]; + // Recursive call. + } + else if (logStart.startsWith(`Program ${this.programId.toString()} invoke`)) { + return [this.programId.toString(), false]; + } + // CPI call. + else if (logStart.includes("invoke")) { + return ["cpi", false]; // Any string will do. + } + else { + return [null, false]; + } + } +} +// Stack frame execution context, allowing one to track what program is +// executing for a given log. +class ExecutionContext { + constructor(log) { + // Assumes the first log in every transaction is an `invoke` log from the + // runtime. + const program = /^Program (.*) invoke.*$/g.exec(log)[1]; + this.stack = [program]; + } + program() { + assert.ok(this.stack.length > 0); + return this.stack[this.stack.length - 1]; + } + push(newProgram) { + this.stack.push(newProgram); + } + pop() { + assert.ok(this.stack.length > 0); + this.stack.pop(); + } +} +class LogScanner { + constructor(logs) { + this.logs = logs; + } + next() { + if (this.logs.length === 0) { + return null; + } + let l = this.logs[0]; + this.logs = this.logs.slice(1); + return l; + } +} +//# sourceMappingURL=event.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/event.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/event.js.map new file mode 100644 index 0000000..0c175d1 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/event.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../src/program/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAIjC,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC;AAU/C,MAAM,OAAO,YAAY;IAoCvB,YAAY,SAAoB,EAAE,QAAkB,EAAE,KAAY;QAChE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACtD,IAAI,CAAC,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AAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,OAAO,CAAC,CAAC;IACX,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/index.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/index.js new file mode 100644 index 0000000..c59328e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/index.js @@ -0,0 +1,133 @@ +import { inflate } from "pako"; +import { idlAddress, decodeIdlAccount } from "../idl"; +import Coder from "../coder"; +import NamespaceFactory from "./namespace"; +import { getProvider } from "../"; +import { utf8 } from "../utils/bytes"; +import { EventManager } from "./event"; +import { translateAddress } from "./common"; +/** + * ## Program + * + * Program provides the IDL deserialized client representation of an Anchor + * program. + * + * This API is the one stop shop for all things related to communicating with + * on-chain programs. Among other things, one can send transactions, fetch + * deserialized accounts, decode instruction data, subscribe to account + * changes, and listen to events. + * + * In addition to field accessors and methods, the object provides a set of + * dynamically generated properties, also known as namespaces, that + * map one-to-one to program methods and accounts. These namespaces generally + * can be used as follows: + * + * ## Usage + * + * ```javascript + * program.. + * ``` + * + * API specifics are namespace dependent. The examples used in the documentation + * below will refer to the two counter examples found + * [here](https://github.com/project-serum/anchor#examples). + */ +export class Program { + /** + * @param idl The interface definition. + * @param programId The on-chain address of the program. + * @param provider The network and wallet context to use. If not provided + * then uses [[getProvider]]. + */ + constructor(idl, programId, provider) { + programId = translateAddress(programId); + // Fields. + this._idl = idl; + this._programId = programId; + this._provider = provider !== null && provider !== void 0 ? provider : getProvider(); + this._coder = new Coder(idl); + this._events = new EventManager(this._programId, this._provider, this._coder); + // Dynamic namespaces. + const [rpc, instruction, transaction, account, simulate, state,] = NamespaceFactory.build(idl, this._coder, programId, this._provider); + this.rpc = rpc; + this.instruction = instruction; + this.transaction = transaction; + this.account = account; + this.simulate = simulate; + this.state = state; + } + /** + * Address of the program. + */ + get programId() { + return this._programId; + } + /** + * IDL defining the program's interface. + */ + get idl() { + return this._idl; + } + /** + * Coder for serializing requests. + */ + get coder() { + return this._coder; + } + /** + * Wallet and network provider. + */ + get provider() { + return this._provider; + } + /** + * Generates a Program client by fetching the IDL from the network. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + static async at(address, provider) { + const programId = translateAddress(address); + const idl = await Program.fetchIdl(programId, provider); + return new Program(idl, programId, provider); + } + /** + * Fetches an idl from the blockchain. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + static async fetchIdl(address, provider) { + provider = provider !== null && provider !== void 0 ? provider : getProvider(); + const programId = translateAddress(address); + const idlAddr = await idlAddress(programId); + const accountInfo = await provider.connection.getAccountInfo(idlAddr); + // Chop off account discriminator. + let idlAccount = decodeIdlAccount(accountInfo.data.slice(8)); + const inflatedIdl = inflate(idlAccount.data); + return JSON.parse(utf8.decode(inflatedIdl)); + } + /** + * Invokes the given callback every time the given event is emitted. + * + * @param eventName The PascalCase name of the event, provided by the IDL. + * @param callback The function to invoke whenever the event is emitted from + * program logs. + */ + addEventListener(eventName, callback) { + return this._events.addEventListener(eventName, callback); + } + /** + * Unsubscribes from the given eventName. + */ + async removeEventListener(listener) { + return await this._events.removeEventListener(listener); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/index.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/index.js.map new file mode 100644 index 0000000..4c0a1b1 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/program/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAO,UAAU,EAAE,gBAAgB,EA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O,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;OAMG;IACI,gBAAgB,CACrB,SAAiB,EACjB,QAA4C;QAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,mBAAmB,CAAC,QAAgB;QAC/C,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js new file mode 100644 index 0000000..c5b949c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js @@ -0,0 +1,163 @@ +import camelCase from "camelcase"; +import EventEmitter from "eventemitter3"; +import * as bs58 from "bs58"; +import { SystemProgram, } from "@solana/web3.js"; +import Coder, { ACCOUNT_DISCRIMINATOR_SIZE, accountDiscriminator, accountSize, } from "../../coder"; +import { translateAddress } from "../common"; +import { getProvider } from "../../"; +import * as pubkeyUtil from "../../utils/pubkey"; +export default class AccountFactory { + static build(idl, coder, programId, provider) { + const accountFns = {}; + idl.accounts.forEach((idlAccount) => { + const name = camelCase(idlAccount.name); + accountFns[name] = new AccountClient(idl, idlAccount, programId, provider, coder); + }); + return accountFns; + } +} +export class AccountClient { + constructor(idl, idlAccount, programId, provider, coder) { + this._idlAccount = idlAccount; + this._programId = programId; + this._provider = provider !== null && provider !== void 0 ? provider : getProvider(); + this._coder = coder !== null && coder !== void 0 ? coder : new Coder(idl); + this._size = ACCOUNT_DISCRIMINATOR_SIZE + accountSize(idl, idlAccount); + } + /** + * Returns the number of bytes in this account. + */ + get size() { + return this._size; + } + /** + * Returns the program ID owning all accounts. + */ + get programId() { + return this._programId; + } + /** + * Returns the client's wallet and network provider. + */ + get provider() { + return this._provider; + } + /** + * Returns the coder. + */ + get coder() { + return this._coder; + } + /** + * Returns a deserialized account. + * + * @param address The address of the account to fetch. + */ + async fetch(address) { + const accountInfo = await this._provider.connection.getAccountInfo(translateAddress(address)); + if (accountInfo === null) { + throw new Error(`Account does not exist ${address.toString()}`); + } + // Assert the account discriminator is correct. + const discriminator = await accountDiscriminator(this._idlAccount.name); + if (discriminator.compare(accountInfo.data.slice(0, 8))) { + throw new Error("Invalid account discriminator"); + } + return this._coder.accounts.decode(this._idlAccount.name, accountInfo.data); + } + /** + * Returns all instances of this account type for the program. + */ + async all(filter) { + let bytes = await accountDiscriminator(this._idlAccount.name); + if (filter !== undefined) { + bytes = Buffer.concat([bytes, filter]); + } + let resp = await this._provider.connection.getProgramAccounts(this._programId, { + commitment: this._provider.connection.commitment, + filters: [ + { + memcmp: { + offset: 0, + bytes: bs58.encode(bytes), + }, + }, + ], + }); + return resp.map(({ pubkey, account }) => { + return { + publicKey: pubkey, + account: this._coder.accounts.decode(this._idlAccount.name, account.data), + }; + }); + } + /** + * Returns an `EventEmitter` emitting a "change" event whenever the account + * changes. + */ + subscribe(address, commitment) { + if (subscriptions.get(address.toString())) { + return subscriptions.get(address.toString()).ee; + } + const ee = new EventEmitter(); + address = translateAddress(address); + const listener = this._provider.connection.onAccountChange(address, (acc) => { + const account = this._coder.accounts.decode(this._idlAccount.name, acc.data); + ee.emit("change", account); + }, commitment); + subscriptions.set(address.toString(), { + ee, + listener, + }); + return ee; + } + /** + * Unsubscribes from the account at the given address. + */ + unsubscribe(address) { + let sub = subscriptions.get(address.toString()); + if (!sub) { + console.warn("Address is not subscribed"); + return; + } + if (subscriptions) { + this._provider.connection + .removeAccountChangeListener(sub.listener) + .then(() => { + subscriptions.delete(address.toString()); + }) + .catch(console.error); + } + } + /** + * Returns an instruction for creating this account. + */ + async createInstruction(signer, sizeOverride) { + const size = this.size; + return SystemProgram.createAccount({ + fromPubkey: this._provider.wallet.publicKey, + newAccountPubkey: signer.publicKey, + space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size, + lamports: await this._provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size), + programId: this._programId, + }); + } + /** + * Function returning the associated account. Args are keys to associate. + * Order matters. + */ + async associated(...args) { + const addr = await this.associatedAddress(...args); + return await this.fetch(addr); + } + /** + * Function returning the associated address. Args are keys to associate. + * Order matters. + */ + async associatedAddress(...args) { + return await pubkeyUtil.associated(this._programId, ...args); + } +} +// Tracks all subscriptions. +const subscriptions = new Map(); +//# sourceMappingURL=account.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js.map new file mode 100644 index 0000000..e6a3ee0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/account.js.map @@ -0,0 +1 @@ +{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../src/program/namespace/account.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAGL,aAAa,GAGd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAyB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,cAAc;IAC1B,MAAM,CAAC,KAAK,CACjB,GAAQ,EACR,KAAY,EACZ,SAAoB,EACpB,QA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,IAAI,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js new file mode 100644 index 0000000..70ee04c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js @@ -0,0 +1,40 @@ +import camelCase from "camelcase"; +import StateFactory from "./state"; +import InstructionFactory from "./instruction"; +import TransactionFactory from "./transaction"; +import RpcFactory from "./rpc"; +import AccountFactory from "./account"; +import SimulateFactory from "./simulate"; +import { parseIdlErrors } from "../common"; +// Re-exports. +export { StateClient } from "./state"; +export { AccountClient } from "./account"; +export default class NamespaceFactory { + /** + * Generates all namespaces for a given program. + */ + static build(idl, coder, programId, provider) { + const rpc = {}; + const instruction = {}; + const transaction = {}; + const simulate = {}; + const idlErrors = parseIdlErrors(idl); + const state = StateFactory.build(idl, coder, programId, provider); + idl.instructions.forEach((idlIx) => { + const ixItem = InstructionFactory.build(idlIx, (ixName, ix) => coder.instruction.encode(ixName, ix), programId); + const txItem = TransactionFactory.build(idlIx, ixItem); + const rpcItem = RpcFactory.build(idlIx, txItem, idlErrors, provider); + const simulateItem = SimulateFactory.build(idlIx, txItem, idlErrors, provider, coder, programId, idl); + const name = camelCase(idlIx.name); + instruction[name] = ixItem; + transaction[name] = txItem; + rpc[name] = rpcItem; + simulate[name] = simulateItem; + }); + const account = idl.accounts + ? AccountFactory.build(idl, coder, programId, provider) + : {}; + return [rpc, instruction, transaction, account, simulate, state]; + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js.map new file mode 100644 index 0000000..a877cfe --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/program/namespace/index.ts"],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,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACrE,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CACxC,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,CACJ,CAAC;YAEF,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAEnC,WAAW,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YAC3B,WAAW,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YAC3B,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ;YAC1B,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;YACvD,CAAC,CAAC,EAAE,CAAC;QAEP,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js new file mode 100644 index 0000000..3ae57b4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js @@ -0,0 +1,59 @@ +import { TransactionInstruction } from "@solana/web3.js"; +import { IdlError } from "../../error"; +import { toInstruction, validateAccounts, translateAddress, } from "../common"; +import { splitArgsAndCtx } from "../context"; +export default class InstructionNamespaceFactory { + static build(idlIx, encodeFn, programId) { + if (idlIx.name === "_inner") { + throw new IdlError("the _inner name is reserved"); + } + const ix = (...args) => { + const [ixArgs, ctx] = splitArgsAndCtx(idlIx, [...args]); + validateAccounts(idlIx.accounts, ctx.accounts); + validateInstruction(idlIx, ...args); + const keys = ix.accounts(ctx.accounts); + if (ctx.remainingAccounts !== undefined) { + keys.push(...ctx.remainingAccounts); + } + if (ctx.__private && ctx.__private.logAccounts) { + console.log("Outgoing account metas:", keys); + } + return new TransactionInstruction({ + keys, + programId, + data: encodeFn(idlIx.name, toInstruction(idlIx, ...ixArgs)), + }); + }; + // Utility fn for ordering the accounts for this instruction. + ix["accounts"] = (accs) => { + return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts); + }; + return ix; + } + static accountsArray(ctx, accounts) { + return accounts + .map((acc) => { + // Nested accounts. + // @ts-ignore + const nestedAccounts = acc.accounts; + if (nestedAccounts !== undefined) { + const rpcAccs = ctx[acc.name]; + return InstructionNamespaceFactory.accountsArray(rpcAccs, nestedAccounts).flat(); + } + else { + const account = acc; + return { + pubkey: translateAddress(ctx[acc.name]), + isWritable: account.isMut, + isSigner: account.isSigner, + }; + } + }) + .flat(); + } +} +// Throws error if any argument required for the `ix` is not given. +function validateInstruction(ix, ...args) { + // todo +} +//# sourceMappingURL=instruction.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js.map new file mode 100644 index 0000000..79baaf9 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/instruction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"instruction.js","sourceRoot":"","sources":["../../../../src/program/namespace/instruction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GAEjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAY,eAAe,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,OAA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CAAC;IACZ,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,GAAa,EAAE,QAA0B;QACnE,OAAO,QAAQ;aACZ,GAAG,CAAC,CAAC,GAAmB,EAAE,EAAE;YAC3B,mBAAmB;YACnB,aAAa;YACb,MAAM,cAAc,GAAiC,GAAG,CAAC,QAAQ,CAAC;YAClE,IAAI,cAAc,KAAK,SAAS,EAAE;gBAChC,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAa,CAAC;gBAC1C,OAAO,2BAA2B,CAAC,aAAa,CAC9C,OAAO,EACP,cAAc,CACf,CAAC,IAAI,EAAE,CAAC;aACV;iBAAM;gBACL,MAAM,OAAO,GAAe,GAAiB,CAAC;gBAC9C,OAAO;oBACL,MAAM,EAAE,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAY,CAAC;oBAClD,UAAU,EAAE,OAAO,CAAC,KAAK;oBACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;iBAC3B,CAAC;aACH;QACH,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IACZ,CAAC;CACF;AA+CD,mEAAmE;AACnE,SAAS,mBAAmB,CAAC,EAAkB,EAAE,GAAG,IAAW;IAC7D,OAAO;AACT,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js new file mode 100644 index 0000000..e54770d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js @@ -0,0 +1,24 @@ +import { splitArgsAndCtx } from "../context"; +import { ProgramError } from "../../error"; +export default class RpcFactory { + static build(idlIx, txFn, idlErrors, provider) { + const rpc = async (...args) => { + const tx = txFn(...args); + const [, ctx] = splitArgsAndCtx(idlIx, [...args]); + try { + const txSig = await provider.send(tx, ctx.signers, ctx.options); + return txSig; + } + catch (err) { + console.log("Translating error", err); + let translatedErr = ProgramError.parse(err, idlErrors); + if (translatedErr === null) { + throw err; + } + throw translatedErr; + } + }; + return rpc; + } +} +//# sourceMappingURL=rpc.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js.map new file mode 100644 index 0000000..7c6af1c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/rpc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../../src/program/namespace/rpc.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,UAAU;IACtB,MAAM,CAAC,KAAK,CACjB,KAAqB,EACrB,IAAmB,EACnB,SAA8B,EAC9B,QAAkB;QAElB,MAAM,GAAG,GAAG,KAAK,EAAE,GAAG,IAAW,EAAiC,EAAE;YAClE,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACzB,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,IAAI;gBACF,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;gBAChE,OAAO,KAAK,CAAC;aACd;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;gBACtC,IAAI,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACvD,IAAI,aAAa,KAAK,IAAI,EAAE;oBAC1B,MAAM,GAAG,CAAC;iBACX;gBACD,MAAM,aAAa,CAAC;aACrB;QACH,CAAC,CAAC;QAEF,OAAO,GAAG,CAAC;IACb,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js new file mode 100644 index 0000000..8f99635 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js @@ -0,0 +1,43 @@ +import { splitArgsAndCtx } from "../context"; +import { EventParser } from "../event"; +import { ProgramError } from "../../error"; +export default class SimulateFactory { + static build(idlIx, txFn, idlErrors, provider, coder, programId, idl) { + const simulate = async (...args) => { + const tx = txFn(...args); + const [, ctx] = splitArgsAndCtx(idlIx, [...args]); + let resp = undefined; + try { + resp = await provider.simulate(tx, ctx.signers, ctx.options); + } + catch (err) { + console.log("Translating error", err); + let translatedErr = ProgramError.parse(err, idlErrors); + if (translatedErr === null) { + throw err; + } + throw translatedErr; + } + if (resp === undefined) { + throw new Error("Unable to simulate transaction"); + } + if (resp.value.err) { + throw new Error(`Simulate error: ${resp.value.err.toString()}`); + } + const logs = resp.value.logs; + if (!logs) { + throw new Error("Simulated logs not found"); + } + const events = []; + if (idl.events) { + let parser = new EventParser(programId, coder); + parser.parseLogs(logs, (event) => { + events.push(event); + }); + } + return { events, raw: logs }; + }; + return simulate; + } +} +//# sourceMappingURL=simulate.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js.map new file mode 100644 index 0000000..ad6d726 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/simulate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"simulate.js","sourceRoot":"","sources":["../../../../src/program/namespace/simulate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAS,MAAM,UAAU,CAAC;AAG9C,OAAO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A0B,CAAC,CAAC;aAC7C;YAED,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAI,GAAG,CAAC,MAAM,EAAE;gBACd,IAAI,MAAM,GAAG,IAAI,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBAC/C,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;oBAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB,CAAC,CAAC,CAAC;aACJ;YACD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QAC/B,CAAC,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js new file mode 100644 index 0000000..98abac7 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js @@ -0,0 +1,175 @@ +import EventEmitter from "eventemitter3"; +import camelCase from "camelcase"; +import { SystemProgram } from "@solana/web3.js"; +import Coder, { stateDiscriminator } from "../../coder"; +import { getProvider } from "../../"; +import { validateAccounts, parseIdlErrors } from "../common"; +import { findProgramAddressSync, createWithSeedSync } from "../../utils/pubkey"; +import InstructionNamespaceFactory from "./instruction"; +import RpcNamespaceFactory from "./rpc"; +import TransactionNamespaceFactory from "./transaction"; +export default class StateFactory { + static build(idl, coder, programId, provider) { + if (idl.state === undefined) { + return undefined; + } + return new StateClient(idl, programId, provider, coder); + } +} +/** + * A client for the program state. Similar to the base [[Program]] client, + * one can use this to send transactions and read accounts for the state + * abstraction. + */ +export class StateClient { + constructor(idl, programId, provider, coder) { + this._idl = idl; + this._programId = programId; + this._address = programStateAddress(programId); + this._provider = provider !== null && provider !== void 0 ? provider : getProvider(); + this._coder = coder !== null && coder !== void 0 ? coder : new Coder(idl); + this._sub = null; + // Build namespaces. + const [instruction, transaction, rpc] = (() => { + let instruction = {}; + let transaction = {}; + let rpc = {}; + idl.state.methods.forEach((m) => { + // Build instruction method. + const ixItem = InstructionNamespaceFactory.build(m, (ixName, ix) => coder.instruction.encodeState(ixName, ix), programId); + ixItem["accounts"] = (accounts) => { + const keys = stateInstructionKeys(programId, provider, m, accounts); + return keys.concat(InstructionNamespaceFactory.accountsArray(accounts, m.accounts)); + }; + // Build transaction method. + const txItem = TransactionNamespaceFactory.build(m, ixItem); + // Build RPC method. + const rpcItem = RpcNamespaceFactory.build(m, txItem, parseIdlErrors(idl), provider); + // Attach them all to their respective namespaces. + const name = camelCase(m.name); + instruction[name] = ixItem; + transaction[name] = txItem; + rpc[name] = rpcItem; + }); + return [instruction, transaction, rpc]; + })(); + this.instruction = instruction; + this.transaction = transaction; + this.rpc = rpc; + } + /** + * Returns the program ID owning the state. + */ + get programId() { + return this._programId; + } + /** + * Returns the client's wallet and network provider. + */ + get provider() { + return this._provider; + } + /** + * Returns the coder. + */ + get coder() { + return this._coder; + } + /** + * Returns the deserialized state account. + */ + async fetch() { + const addr = this.address(); + const accountInfo = await this.provider.connection.getAccountInfo(addr); + if (accountInfo === null) { + throw new Error(`Account does not exist ${addr.toString()}`); + } + // Assert the account discriminator is correct. + const expectedDiscriminator = await stateDiscriminator(this._idl.state.struct.name); + if (expectedDiscriminator.compare(accountInfo.data.slice(0, 8))) { + throw new Error("Invalid account discriminator"); + } + return this.coder.state.decode(accountInfo.data); + } + /** + * Returns the state address. + */ + address() { + return this._address; + } + /** + * Returns an `EventEmitter` with a `"change"` event that's fired whenever + * the state account cahnges. + */ + subscribe(commitment) { + if (this._sub !== null) { + return this._sub.ee; + } + const ee = new EventEmitter(); + const listener = this.provider.connection.onAccountChange(this.address(), (acc) => { + const account = this.coder.state.decode(acc.data); + ee.emit("change", account); + }, commitment); + this._sub = { + ee, + listener, + }; + return ee; + } + /** + * Unsubscribes to state changes. + */ + unsubscribe() { + if (this._sub !== null) { + this.provider.connection + .removeAccountChangeListener(this._sub.listener) + .then(async () => { + this._sub = null; + }) + .catch(console.error); + } + } +} +// Calculates the deterministic address of the program's "state" account. +function programStateAddress(programId) { + let [registrySigner] = findProgramAddressSync([], programId); + return createWithSeedSync(registrySigner, "unversioned", programId); +} +// Returns the common keys that are prepended to all instructions targeting +// the "state" of a program. +function stateInstructionKeys(programId, provider, m, accounts) { + if (m.name === "new") { + // Ctor `new` method. + const [programSigner] = findProgramAddressSync([], programId); + return [ + { + pubkey: provider.wallet.publicKey, + isWritable: false, + isSigner: true, + }, + { + pubkey: programStateAddress(programId), + isWritable: true, + isSigner: false, + }, + { pubkey: programSigner, isWritable: false, isSigner: false }, + { + pubkey: SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + { pubkey: programId, isWritable: false, isSigner: false }, + ]; + } + else { + validateAccounts(m.accounts, accounts); + return [ + { + pubkey: programStateAddress(programId), + isWritable: true, + isSigner: false, + }, + ]; + } +} +//# sourceMappingURL=state.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js.map new file mode 100644 index 0000000..ac51301 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/program/namespace/state.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAa,aAAa,EAAc,MAAM,iBAAiB,CAAC;AAGvE,OAAO,KAAK,EAAE,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAgB,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AA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EAAE,IAAI;aACf;YACD;gBACE,MAAM,EAAE,mBAAmB,CAAC,SAAS,CAAC;gBACtC,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,KAAK;aAChB;YACD,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC7D;gBACE,MAAM,EAAE,aAAa,CAAC,SAAS;gBAC/B,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,KAAK;aAChB;YAED,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC1D,CAAC;KACH;SAAM;QACL,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACvC,OAAO;YACL;gBACE,MAAM,EAAE,mBAAmB,CAAC,SAAS,CAAC;gBACtC,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC;KACH;AACH,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js new file mode 100644 index 0000000..baea9ba --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js @@ -0,0 +1,17 @@ +import { Transaction } from "@solana/web3.js"; +import { splitArgsAndCtx } from "../context"; +export default class TransactionFactory { + static build(idlIx, ixFn) { + const txFn = (...args) => { + const [, ctx] = splitArgsAndCtx(idlIx, [...args]); + const tx = new Transaction(); + if (ctx.instructions !== undefined) { + tx.add(...ctx.instructions); + } + tx.add(ixFn(...args)); + return tx; + }; + return txFn; + } +} +//# sourceMappingURL=transaction.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js.map new file mode 100644 index 0000000..35d0452 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/program/namespace/transaction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../src/program/namespace/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAC9B,MAAM,CAAC,KAAK,CACjB,KAAqB,EACrB,IAAmB;QAEnB,MAAM,IAAI,GAAG,CAAC,GAAG,IAAW,EAAe,EAAE;YAC3C,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,MAAM,EAAE,GAAG,IAAI,WAAW,EAAE,CAAC;YAC7B,IAAI,GAAG,CAAC,YAAY,KAAK,SAAS,EAAE;gBAClC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;aAC7B;YACD,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACtB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/provider.js b/tests/node_modules/@project-serum/anchor/dist/esm/provider.js new file mode 100644 index 0000000..d9ca3c3 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/provider.js @@ -0,0 +1,206 @@ +import { Connection, Keypair, sendAndConfirmRawTransaction, } from "@solana/web3.js"; +import { isBrowser } from "./utils/common"; +/** + * The network and wallet context used to send transactions paid for and signed + * by the provider. + */ +export default class Provider { + /** + * @param connection The cluster connection where the program is deployed. + * @param wallet The wallet used to pay for and sign all transactions. + * @param opts Transaction confirmation options to use by default. + */ + constructor(connection, wallet, opts) { + this.connection = connection; + this.wallet = wallet; + this.opts = opts; + } + static defaultOptions() { + return { + preflightCommitment: "recent", + commitment: "recent", + }; + } + /** + * Returns a `Provider` with a wallet read from the local filesystem. + * + * @param url The network cluster url. + * @param opts The default transaction confirmation options. + * + * (This api is for Node only.) + */ + static local(url, opts) { + opts = opts !== null && opts !== void 0 ? opts : Provider.defaultOptions(); + const connection = new Connection(url !== null && url !== void 0 ? url : "http://localhost:8899", opts.preflightCommitment); + const wallet = NodeWallet.local(); + return new Provider(connection, wallet, opts); + } + /** + * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment + * variable + * + * (This api is for Node only.) + */ + static env() { + if (isBrowser) + return; + const process = require("process"); + const url = process.env.ANCHOR_PROVIDER_URL; + if (url === undefined) { + throw new Error("ANCHOR_PROVIDER_URL is not defined"); + } + const options = Provider.defaultOptions(); + const connection = new Connection(url, options.commitment); + const wallet = NodeWallet.local(); + return new Provider(connection, wallet, options); + } + /** + * Sends the given transaction, paid for and signed by the provider's wallet. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + async send(tx, signers, opts) { + if (signers === undefined) { + signers = []; + } + if (opts === undefined) { + opts = this.opts; + } + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = (await this.connection.getRecentBlockhash(opts.preflightCommitment)).blockhash; + await this.wallet.signTransaction(tx); + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + const rawTx = tx.serialize(); + const txId = await sendAndConfirmRawTransaction(this.connection, rawTx, opts); + return txId; + } + /** + * Similar to `send`, but for an array of transactions and signers. + */ + async sendAll(reqs, opts) { + if (opts === undefined) { + opts = this.opts; + } + const blockhash = await this.connection.getRecentBlockhash(opts.preflightCommitment); + let txs = reqs.map((r) => { + let tx = r.tx; + let signers = r.signers; + if (signers === undefined) { + signers = []; + } + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = blockhash.blockhash; + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + return tx; + }); + const signedTxs = await this.wallet.signAllTransactions(txs); + const sigs = []; + for (let k = 0; k < txs.length; k += 1) { + const tx = signedTxs[k]; + const rawTx = tx.serialize(); + sigs.push(await sendAndConfirmRawTransaction(this.connection, rawTx, opts)); + } + return sigs; + } + /** + * Simulates the given transaction, returning emitted logs from execution. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + async simulate(tx, signers, opts) { + var _a, _b; + if (signers === undefined) { + signers = []; + } + if (opts === undefined) { + opts = this.opts; + } + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = (await this.connection.getRecentBlockhash((_a = opts.preflightCommitment) !== null && _a !== void 0 ? _a : this.opts.preflightCommitment)).blockhash; + await this.wallet.signTransaction(tx); + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + return await simulateTransaction(this.connection, tx, (_b = opts.commitment) !== null && _b !== void 0 ? _b : this.opts.commitment); + } +} +/** + * Node only wallet. + */ +export class NodeWallet { + constructor(payer) { + this.payer = payer; + } + static local() { + const payer = Keypair.fromSecretKey(Buffer.from(JSON.parse(require("fs").readFileSync(require("os").homedir() + "/.config/solana/id.json", { + encoding: "utf-8", + })))); + return new NodeWallet(payer); + } + async signTransaction(tx) { + tx.partialSign(this.payer); + return tx; + } + async signAllTransactions(txs) { + return txs.map((t) => { + t.partialSign(this.payer); + return t; + }); + } + get publicKey() { + return this.payer.publicKey; + } +} +// Copy of Connection.simulateTransaction that takes a commitment parameter. +async function simulateTransaction(connection, transaction, commitment) { + // @ts-ignore + transaction.recentBlockhash = await connection._recentBlockhash( + // @ts-ignore + connection._disableBlockhashCaching); + const signData = transaction.serializeMessage(); + // @ts-ignore + const wireTransaction = transaction._serialize(signData); + const encodedTransaction = wireTransaction.toString("base64"); + const config = { encoding: "base64", commitment }; + const args = [encodedTransaction, config]; + // @ts-ignore + const res = await connection._rpcRequest("simulateTransaction", args); + if (res.error) { + throw new Error("failed to simulate transaction: " + res.error.message); + } + return res.result; +} +/** + * Sets the default provider on the client. + */ +export function setProvider(provider) { + _provider = provider; +} +/** + * Returns the default provider being used by the client. + */ +export function getProvider() { + if (_provider === null) { + return Provider.local(); + } + return _provider; +} +// Global provider used as the default when a provider is not given. +let _provider = null; +//# sourceMappingURL=provider.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/provider.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/provider.js.map new file mode 100644 index 0000000..9a2dcf0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EAMP,4BAA4B,GAI7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B;;;;OAIG;IACH,YACW,UAAsB,EACtB,MAAc,EACd,IAAoB;QAFpB,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAgB;IAC5B,CAAC;IAEJ,MAAM,CAAC,cAAc;QACnB,OAAO;YACL,mBAAmB,EAAE,QAAQ;YAC7B,UAAU,EAAE,QAAQ;SACrB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,KAAK,CAAC,GAAY,EAAE,IAAqB;QAC9C,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,UAAU,CAC/B,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,uBAAuB,EAC9B,IAAI,CAAC,mBAAmB,CACzB,CAAC;Q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,CAAC;IAChD,aAAa;IACb,MAAM,eAAe,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvD,MAAM,IAAI,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAE1C,aAAa;IACb,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;IACtE,IAAI,GAAG,CAAC,KAAK,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KACzE;IACD,OAAO,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,QAAkB;IAC5C,SAAS,GAAG,QAAQ,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,IAAI,SAAS,KAAK,IAAI,EAAE;QACtB,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;KACzB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,oEAAoE;AACpE,IAAI,SAAS,GAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js new file mode 100644 index 0000000..8a84d52 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js @@ -0,0 +1,8 @@ +import * as base64 from "base64-js"; +export function encode(data) { + return base64.fromByteArray(data); +} +export function decode(data) { + return Buffer.from(base64.toByteArray(data)); +} +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js.map new file mode 100644 index 0000000..d8f4072 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../../src/utils/bytes/base64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js new file mode 100644 index 0000000..e9ff2f1 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js @@ -0,0 +1,8 @@ +import * as bs58 from "bs58"; +export function encode(data) { + return bs58.encode(data); +} +export function decode(data) { + return bs58.decode(data); +} +//# sourceMappingURL=bs58.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js.map new file mode 100644 index 0000000..bbe1085 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/bs58.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bs58.js","sourceRoot":"","sources":["../../../../src/utils/bytes/bs58.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,UAAU,MAAM,CAAC,IAAoC;IACzD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js new file mode 100644 index 0000000..0c680aa --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js @@ -0,0 +1,17 @@ +export function encode(data) { + return data.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), "0x"); +} +export function decode(data) { + if (data.indexOf("0x") === 0) { + data = data.substr(2); + } + if (data.length % 2 === 1) { + data = "0" + data; + } + let key = data.match(/.{2}/g); + if (key === null) { + return Buffer.from([]); + } + return Buffer.from(key.map((byte) => parseInt(byte, 16))); +} +//# sourceMappingURL=hex.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js.map new file mode 100644 index 0000000..3096acc --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/hex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hex.js","sourceRoot":"","sources":["../../../../src/utils/bytes/hex.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,MAAM,CAChB,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EACvD,IAAI,CACL,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC5B,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACvB;IACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;QACzB,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;KACnB;IAED,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE9B,IAAI,GAAG,KAAK,IAAI,EAAE;QAChB,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACxB;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js new file mode 100644 index 0000000..3397977 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js @@ -0,0 +1,9 @@ +import * as hex_1 from "./hex"; +export { hex_1 as hex }; +import * as utf8_1 from "./utf8"; +export { utf8_1 as utf8 }; +import * as bs58_1 from "./bs58"; +export { bs58_1 as bs58 }; +import * as base64_1 from "./base64"; +export { base64_1 as base64 }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js.map new file mode 100644 index 0000000..b8400df --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/bytes/index.ts"],"names":[],"mappings":"uBAAqB,OAAO;kBAAhB,GAAG;wBACO,QAAQ;mBAAlB,IAAI;wBACM,QAAQ;mBAAlB,IAAI;0BACQ,UAAU;qBAAtB,MAAM"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js new file mode 100644 index 0000000..7a8be03 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js @@ -0,0 +1,13 @@ +export function decode(array) { + const decoder = typeof TextDecoder === "undefined" + ? new (require("util").TextDecoder)("utf-8") // Node. + : new TextDecoder("utf-8"); // Browser. + return decoder.decode(array); +} +export function encode(input) { + const encoder = typeof TextEncoder === "undefined" + ? new (require("util").TextEncoder)("utf-8") // Node. + : new TextEncoder(); // Browser. + return encoder.encode(input); +} +//# sourceMappingURL=utf8.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js.map new file mode 100644 index 0000000..3f22fd0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/bytes/utf8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../../src/utils/bytes/utf8.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,KAAiB;IACtC,MAAM,OAAO,GACX,OAAO,WAAW,KAAK,WAAW;QAChC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ;QACrD,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;IAC3C,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,MAAM,OAAO,GACX,OAAO,WAAW,KAAK,WAAW;QAChC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ;QACrD,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,WAAW;IACpC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js new file mode 100644 index 0000000..d3bdc8d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js @@ -0,0 +1,7 @@ +var _a; +/** + * Returns true if being run inside a web browser, + * false if in a Node process or electron app. + */ +export const isBrowser = typeof window !== "undefined" && !((_a = window.process) === null || _a === void 0 ? void 0 : _a.hasOwnProperty("type")); +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js.map new file mode 100644 index 0000000..1c21efc --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GACpB,OAAO,MAAM,KAAK,WAAW,IAAI,QAAC,MAAM,CAAC,OAAO,0CAAE,cAAc,CAAC,MAAM,EAAC,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js new file mode 100644 index 0000000..d1e465b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js @@ -0,0 +1,12 @@ +const _AVAILABLE_FEATURES = new Set(["anchor-deprecated-state"]); +const _FEATURES = new Map(); +export function set(key) { + if (!_AVAILABLE_FEATURES.has(key)) { + throw new Error("Invalid feature"); + } + _FEATURES.set(key, true); +} +export function isSet(key) { + return _FEATURES.get(key) !== undefined; +} +//# sourceMappingURL=features.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js.map new file mode 100644 index 0000000..3f2828e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/features.js.map @@ -0,0 +1 @@ +{"version":3,"file":"features.js","sourceRoot":"","sources":["../../../src/utils/features.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAEjE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;AAE5B,MAAM,UAAU,GAAG,CAAC,GAAW;IAC7B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACpC;IACD,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js new file mode 100644 index 0000000..89c8a3e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js @@ -0,0 +1,13 @@ +import * as sha256_1 from "./sha256"; +export { sha256_1 as sha256 }; +import * as rpc_1 from "./rpc"; +export { rpc_1 as rpc }; +import * as publicKey_1 from "./pubkey"; +export { publicKey_1 as publicKey }; +import * as bytes_1 from "./bytes"; +export { bytes_1 as bytes }; +import * as token_1 from "./token"; +export { token_1 as token }; +import * as features_1 from "./features"; +export { features_1 as features }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js.map new file mode 100644 index 0000000..aad1eec --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"0BAAwB,UAAU;qBAAtB,MAAM;uBACG,OAAO;kBAAhB,GAAG;6BACY,UAAU;wBAAzB,SAAS;yBACE,SAAS;oBAApB,KAAK;yBACM,SAAS;oBAApB,KAAK;4BACS,YAAY;uBAA1B,QAAQ"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js new file mode 100644 index 0000000..402a050 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js @@ -0,0 +1,78 @@ +import BN from "bn.js"; +import { sha256 as sha256Sync } from "js-sha256"; +import { PublicKey } from "@solana/web3.js"; +import { translateAddress } from "../program/common"; +// Sync version of web3.PublicKey.createWithSeed. +export function createWithSeedSync(fromPublicKey, seed, programId) { + const buffer = Buffer.concat([ + fromPublicKey.toBuffer(), + Buffer.from(seed), + programId.toBuffer(), + ]); + const hash = sha256Sync.digest(buffer); + return new PublicKey(Buffer.from(hash)); +} +// Sync version of web3.PublicKey.createProgramAddress. +export function createProgramAddressSync(seeds, programId) { + const MAX_SEED_LENGTH = 32; + let buffer = Buffer.alloc(0); + seeds.forEach(function (seed) { + if (seed.length > MAX_SEED_LENGTH) { + throw new TypeError(`Max seed length exceeded`); + } + buffer = Buffer.concat([buffer, toBuffer(seed)]); + }); + buffer = Buffer.concat([ + buffer, + programId.toBuffer(), + Buffer.from("ProgramDerivedAddress"), + ]); + let hash = sha256Sync(new Uint8Array(buffer)); + let publicKeyBytes = new BN(hash, 16).toArray(undefined, 32); + if (PublicKey.isOnCurve(new Uint8Array(publicKeyBytes))) { + throw new Error(`Invalid seeds, address must fall off the curve`); + } + return new PublicKey(publicKeyBytes); +} +// Sync version of web3.PublicKey.findProgramAddress. +export function findProgramAddressSync(seeds, programId) { + let nonce = 255; + let address; + while (nonce != 0) { + try { + const seedsWithNonce = seeds.concat(Buffer.from([nonce])); + address = createProgramAddressSync(seedsWithNonce, programId); + } + catch (err) { + if (err instanceof TypeError) { + throw err; + } + nonce--; + continue; + } + return [address, nonce]; + } + throw new Error(`Unable to find a viable program address nonce`); +} +const toBuffer = (arr) => { + if (arr instanceof Buffer) { + return arr; + } + else if (arr instanceof Uint8Array) { + return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength); + } + else { + return Buffer.from(arr); + } +}; +export async function associated(programId, ...args) { + let seeds = [Buffer.from([97, 110, 99, 104, 111, 114])]; // b"anchor". + args.forEach((arg) => { + seeds.push( + // @ts-ignore + arg.buffer !== undefined ? arg : translateAddress(arg).toBuffer()); + }); + const [assoc] = await PublicKey.findProgramAddress(seeds, translateAddress(programId)); + return assoc; +} +//# sourceMappingURL=pubkey.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js.map new file mode 100644 index 0000000..f5d9215 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/pubkey.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pubkey.js","sourceRoot":"","sources":["../../../src/utils/pubkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAW,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,iDAAiD;AACjD,MAAM,UAAU,kBAAkB,CAChC,aAAwB,EACxB,IAAY,EACZ,SAAoB;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC3B,aAAa,CAAC,QAAQ,EA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EAAE;QACnB,KAAK,CAAC,IAAI;QACR,aAAa;QACb,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAClE,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,SAAS,CAAC,kBAAkB,CAChD,KAAK,EACL,gBAAgB,CAAC,SAAS,CAAC,CAC5B,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js new file mode 100644 index 0000000..0a7de7c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js @@ -0,0 +1,65 @@ +import assert from "assert"; +import { PublicKey, Transaction, TransactionInstruction, } from "@solana/web3.js"; +import { translateAddress } from "../program/common"; +import { getProvider } from "../provider"; +/** + * Sends a transaction to a program with the given accounts and instruction + * data. + */ +export async function invoke(programId, accounts, data, provider) { + programId = translateAddress(programId); + if (!provider) { + provider = getProvider(); + } + const tx = new Transaction(); + tx.add(new TransactionInstruction({ + programId, + keys: accounts !== null && accounts !== void 0 ? accounts : [], + data, + })); + return await provider.send(tx); +} +export async function getMultipleAccounts(connection, publicKeys) { + const args = [publicKeys.map((k) => k.toBase58()), { commitment: "recent" }]; + // @ts-ignore + const res = await connection._rpcRequest("getMultipleAccounts", args); + if (res.error) { + throw new Error("failed to get info about accounts " + + publicKeys.map((k) => k.toBase58()).join(", ") + + ": " + + res.error.message); + } + assert(typeof res.result !== "undefined"); + const accounts = []; + for (const account of res.result.value) { + let value = null; + if (account === null) { + accounts.push(null); + continue; + } + if (res.result.value) { + const { executable, owner, lamports, data } = account; + assert(data[1] === "base64"); + value = { + executable, + owner: new PublicKey(owner), + lamports, + data: Buffer.from(data[0], "base64"), + }; + } + if (value === null) { + throw new Error("Invalid response"); + } + accounts.push(value); + } + return accounts.map((account, idx) => { + if (account === null) { + return null; + } + return { + publicKey: publicKeys[idx], + account, + }; + }); +} +//# sourceMappingURL=rpc.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js.map new file mode 100644 index 0000000..c3ddb67 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/rpc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/utils/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAIL,SAAS,EAET,WAAW,EACX,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAW,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,SAAkB,EAClB,QAA6B,EAC7B,IAAa,EACb,QAAmB;IAEnB,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,WAAW,EAAE,CAAC;KAC1B;IAED,MAAM,EAAE,GAAG,IAAI,WAAW,EAAE,CAAC;IAC7B,EAAE,CAAC,GAAG,CACJ,IAAI,sBAAsB,CAAC;QACzB,SAAS;QACT,IAAI,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE;QACpB,IAAI;KACL,CAAC,CACH,CAAC;IAEF,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,UAAsB,EACtB,UAAuB;IAIvB,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC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,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;SACrC;QACD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACtB;IACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;QACnC,IAAI,OAAO,KAAK,IAAI,EAAE;YACpB,OAAO,IAAI,CAAC;SACb;QACD,OAAO;YACL,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC;YAC1B,OAAO;SACR,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js new file mode 100644 index 0000000..110309a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js @@ -0,0 +1,5 @@ +import { sha256 } from "js-sha256"; +export function hash(data) { + return sha256(data); +} +//# sourceMappingURL=sha256.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js.map new file mode 100644 index 0000000..9ed256d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/sha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sha256.js","sourceRoot":"","sources":["../../../src/utils/sha256.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js b/tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js new file mode 100644 index 0000000..e91bf69 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js @@ -0,0 +1,7 @@ +import { PublicKey } from "@solana/web3.js"; +const TOKEN_PROGRAM_ID = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"); +const ASSOCIATED_PROGRAM_ID = new PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"); +export async function associatedAddress({ mint, owner, }) { + return (await PublicKey.findProgramAddress([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_PROGRAM_ID))[0]; +} +//# sourceMappingURL=token.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js.map new file mode 100644 index 0000000..ccfdf06 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/utils/token.js.map @@ -0,0 +1 @@ +{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/utils/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,gBAAgB,GAAG,IAAI,SAAS,CACpC,6CAA6C,CAC9C,CAAC;AACF,MAAM,qBAAqB,GAAG,IAAI,SAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,IAAI,EACJ,KAAK,GAIN;IACC,OAAO,CACL,MAAM,SAAS,CAAC,kBAAkB,CAChC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,gBAAgB,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,EAChE,qBAAqB,CACtB,CACF,CAAC,CAAC,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/workspace.js b/tests/node_modules/@project-serum/anchor/dist/esm/workspace.js new file mode 100644 index 0000000..e83c634 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/workspace.js @@ -0,0 +1,74 @@ +import camelCase from "camelcase"; +import * as toml from "toml"; +import { PublicKey } from "@solana/web3.js"; +import { Program } from "./program"; +import { isBrowser } from "./utils/common"; +let _populatedWorkspace = false; +/** + * The `workspace` namespace provides a convenience API to automatically + * search for and deserialize [[Program]] objects defined by compiled IDLs + * in an Anchor workspace. + * + * This API is for Node only. + */ +const workspace = new Proxy({}, { + get(workspaceCache, programName) { + if (isBrowser) { + console.log("Workspaces aren't available in the browser"); + return undefined; + } + const fs = require("fs"); + const process = require("process"); + if (!_populatedWorkspace) { + const path = require("path"); + let projectRoot = process.cwd(); + while (!fs.existsSync(path.join(projectRoot, "Anchor.toml"))) { + const parentDir = path.dirname(projectRoot); + if (parentDir === projectRoot) { + projectRoot = undefined; + } + projectRoot = parentDir; + } + if (projectRoot === undefined) { + throw new Error("Could not find workspace root."); + } + const idlFolder = `${projectRoot}/target/idl`; + if (!fs.existsSync(idlFolder)) { + throw new Error(`${idlFolder} doesn't exist. Did you use "anchor build"?`); + } + const idlMap = new Map(); + fs.readdirSync(idlFolder).forEach((file) => { + const filePath = `${idlFolder}/${file}`; + const idlStr = fs.readFileSync(filePath); + const idl = JSON.parse(idlStr); + idlMap.set(idl.name, idl); + const name = camelCase(idl.name, { pascalCase: true }); + if (idl.metadata && idl.metadata.address) { + workspaceCache[name] = new Program(idl, new PublicKey(idl.metadata.address)); + } + }); + // Override the workspace programs if the user put them in the config. + const anchorToml = toml.parse(fs.readFileSync(path.join(projectRoot, "Anchor.toml"), "utf-8")); + const clusterId = anchorToml.provider.cluster; + if (anchorToml.programs && anchorToml.programs[clusterId]) { + attachWorkspaceOverride(workspaceCache, anchorToml.programs[clusterId], idlMap); + } + _populatedWorkspace = true; + } + return workspaceCache[programName]; + }, +}); +function attachWorkspaceOverride(workspaceCache, overrideConfig, idlMap) { + Object.keys(overrideConfig).forEach((programName) => { + const wsProgramName = camelCase(programName, { pascalCase: true }); + const entry = overrideConfig[programName]; + const overrideAddress = new PublicKey(typeof entry === "string" ? entry : entry.address); + let idl = idlMap.get(programName); + if (typeof entry !== "string" && entry.idl) { + idl = JSON.parse(require("fs").readFileSync(entry.idl, "utf-8")); + } + workspaceCache[wsProgramName] = new Program(idl, overrideAddress); + }); +} +export default workspace; +//# sourceMappingURL=workspace.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/esm/workspace.js.map b/tests/node_modules/@project-serum/anchor/dist/esm/workspace.js.map new file mode 100644 index 0000000..d3c404d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/esm/workspace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,EAAS,EAAE;IACrC,GAAG,CAAC,cAA0C,EAAE,WAAmB;QACjE,IAAI,SAAS,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;YAC1D,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEnC,IAAI,CAAC,mBAAmB,EAAE;YACxB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YAE7B,IAAI,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;YAChC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,EAAE;g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AO,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/idl.d.ts b/tests/node_modules/@project-serum/anchor/dist/idl.d.ts new file mode 100644 index 0000000..0fd1037 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/idl.d.ts @@ -0,0 +1,87 @@ +/// +import { PublicKey } from "@solana/web3.js"; +export declare type Idl = { + version: string; + name: string; + instructions: IdlInstruction[]; + state?: IdlState; + accounts?: IdlTypeDef[]; + types?: IdlTypeDef[]; + events?: IdlEvent[]; + errors?: IdlErrorCode[]; +}; +export declare type IdlEvent = { + name: string; + fields: IdlEventField[]; +}; +export declare type IdlEventField = { + name: string; + type: IdlType; + index: boolean; +}; +export declare type IdlInstruction = { + name: string; + accounts: IdlAccountItem[]; + args: IdlField[]; +}; +export declare type IdlState = { + struct: IdlTypeDef; + methods: IdlStateMethod[]; +}; +export declare type IdlStateMethod = IdlInstruction; +export declare type IdlAccountItem = IdlAccount | IdlAccounts; +export declare type IdlAccount = { + name: string; + isMut: boolean; + isSigner: boolean; +}; +export declare type IdlAccounts = { + name: string; + accounts: IdlAccountItem[]; +}; +export declare type IdlField = { + name: string; + type: IdlType; +}; +export declare type IdlTypeDef = { + name: string; + type: IdlTypeDefTy; +}; +declare type IdlTypeDefTy = { + kind: "struct" | "enum"; + fields?: IdlTypeDefStruct; + variants?: IdlEnumVariant[]; +}; +declare type IdlTypeDefStruct = Array; +export declare type IdlType = "bool" | "u8" | "i8" | "u16" | "i16" | "u32" | "i32" | "u64" | "i64" | "u128" | "i128" | "bytes" | "string" | "publicKey" | IdlTypeVec | IdlTypeOption | IdlTypeDefined; +export declare type IdlTypeVec = { + vec: IdlType; +}; +export declare type IdlTypeOption = { + option: IdlType; +}; +export declare type IdlTypeDefined = { + defined: string; +}; +export declare type IdlEnumVariant = { + name: string; + fields?: IdlEnumFields; +}; +declare type IdlEnumFields = IdlEnumFieldsNamed | IdlEnumFieldsTuple; +declare type IdlEnumFieldsNamed = IdlField[]; +declare type IdlEnumFieldsTuple = IdlType[]; +declare type IdlErrorCode = { + code: number; + name: string; + msg?: string; +}; +export declare function idlAddress(programId: PublicKey): Promise; +export declare function seed(): string; +export interface IdlProgramAccount { + authority: PublicKey; + data: Buffer; +} +export declare function decodeIdlAccount(data: Buffer): IdlProgramAccount; +export declare function encodeIdlAccount(acc: IdlProgramAccount): Buffer; +export {}; +//# sourceMappingURL=idl.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/idl.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/idl.d.ts.map new file mode 100644 index 0000000..2cb7cb8 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/idl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"idl.d.ts","sourceRoot":"","sources":["../src/idl.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,oBAAY,GAAG,GAAG;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;CACzB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,oBAA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AO,CAAC;CACd,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAGF,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,aAAK,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAE7D,aAAK,kBAAkB,GAAG,QAAQ,EAAE,CAAC;AAErC,aAAK,kBAAkB,GAAG,OAAO,EAAE,CAAC;AAEpC,aAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,wBAAsB,UAAU,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAGzE;AAGD,wBAAgB,IAAI,IAAI,MAAM,CAE7B;AAGD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAOD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAEhE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAI/D"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/index.d.ts b/tests/node_modules/@project-serum/anchor/dist/index.d.ts new file mode 100644 index 0000000..ebeba3c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/index.d.ts @@ -0,0 +1,16 @@ +import BN from "bn.js"; +import * as web3 from "@solana/web3.js"; +import Provider, { getProvider, setProvider, NodeWallet as Wallet } from "./provider"; +import Coder, { InstructionCoder, EventCoder, StateCoder, TypesCoder, AccountsCoder } from "./coder"; +import { Instruction } from "./coder/instruction"; +import { Idl } from "./idl"; +import workspace from "./workspace"; +import * as utils from "./utils"; +import { Program } from "./program"; +import { Address } from "./program/common"; +import { Event } from "./program/event"; +import { ProgramAccount, AccountNamespace, AccountClient, StateClient, RpcNamespace, RpcFn, SimulateNamespace, SimulateFn, TransactionNamespace, TransactionFn, InstructionNamespace, InstructionFn } from "./program/namespace"; +import { Context, Accounts } from "./program/context"; +import { EventParser } from "./program/event"; +export { workspace, Program, AccountNamespace, AccountClient, StateClient, RpcNamespace, RpcFn, SimulateNamespace, SimulateFn, TransactionNamespace, TransactionFn, InstructionNamespace, InstructionFn, ProgramAccount, Context, Accounts, Coder, InstructionCoder, EventCoder, StateCoder, TypesCoder, AccountsCoder, Event, Instruction, setProvider, getProvider, Provider, BN, web3, Idl, utils, Wallet, Address, EventParser, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/index.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/index.d.ts.map new file mode 100644 index 0000000..70a6d13 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,EAAE,EACf,WAAW,EACX,WAAW,EACX,UAAU,IAAI,MAAM,EACrB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,OAAO,EACP,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,KAAK,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,GAAG,EACH,KAAK,EACL,MAAM,EACN,OAAO,EACP,WAAW,GACZ,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/common.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/common.d.ts new file mode 100644 index 0000000..51f4f28 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/common.d.ts @@ -0,0 +1,20 @@ +import EventEmitter from "eventemitter3"; +import { PublicKey } from "@solana/web3.js"; +import { Idl, IdlInstruction, IdlAccountItem, IdlStateMethod } from "../idl"; +import { Accounts } from "./context"; +export declare type Subscription = { + listener: number; + ee: EventEmitter; +}; +export declare function parseIdlErrors(idl: Idl): Map; +export declare function toInstruction(idlIx: IdlInstruction | IdlStateMethod, ...args: any[]): { + [key: string]: any; +}; +export declare function validateAccounts(ixAccounts: IdlAccountItem[], accounts: Accounts): void; +export declare function translateAddress(address: Address): PublicKey; +/** + * An address to identify an account on chain. Can be a [[PublicKey]], + * or Base 58 encoded string. + */ +export declare type Address = PublicKey | string; +//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/common.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/common.d.ts.map new file mode 100644 index 0000000..79775e4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/common.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/program/common.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,oBAAY,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,YAAY,CAAC;CAClB,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAS5D;AAGD,wBAAgB,aAAa,CAC3B,KAAK,EAAE,cAAc,GAAG,cAAc,EACtC,GAAG,IAAI,EAAE,GAAG,EAAE;;EAaf;AAGD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,cAAc,EAAE,EAC5B,QAAQ,EAAE,QAAQ,QAanB;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAO5D;AAED;;;GAGG;AACH,oBAAY,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/context.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/context.d.ts new file mode 100644 index 0000000..13934f5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/context.d.ts @@ -0,0 +1,52 @@ +import { AccountMeta, Signer, ConfirmOptions, TransactionInstruction } from "@solana/web3.js"; +import { Address } from "./common"; +import { IdlInstruction } from "../idl"; +/** + * Context provides all non-argument inputs for generating Anchor transactions. + */ +export declare type Context = { + /** + * Accounts used in the instruction context. + */ + accounts?: Accounts; + /** + * All accounts to pass into an instruction *after* the main `accounts`. + * This can be used for optional or otherwise unknown accounts. + */ + remainingAccounts?: AccountMeta[]; + /** + * Accounts that must sign a given transaction. + */ + signers?: Array; + /** + * Instructions to run *before* a given method. Often this is used, for + * example to create accounts prior to executing a method. + */ + instructions?: TransactionInstruction[]; + /** + * Commitment parameters to use for a transaction. + */ + options?: ConfirmOptions; + /** + * @hidden + * + * Private namespace for development. + */ + __private?: { + logAccounts: boolean; + }; +}; +/** + * A set of accounts mapping one-to-one to the program's accounts struct, i.e., + * the type deriving `#[derive(Accounts)]`. + * + * The name of each field should match the name for that account in the IDL. + * + * If multiple accounts are nested in the rust program, then they should be + * nested here. + */ +export declare type Accounts = { + [key: string]: Address | Accounts; +}; +export declare function splitArgsAndCtx(idlIx: IdlInstruction, args: any[]): [any[], Context]; +//# sourceMappingURL=context.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/context.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/context.d.ts.map new file mode 100644 index 0000000..c23dabf --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/context.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/program/context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,MAAM,EACN,cAAc,EACd,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC;;GAEG;AACH,oBAAY,OAAO,GAAG;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;;;OAIG;IACH,SAAS,CAAC,EAAE;QAAE,WAAW,EAAE,OAAO,CAAA;KAAE,CAAC;CACtC,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,QAAQ,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;CACnC,CAAC;AAEF,wBAAgB,eAAe,CAC7B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,GAAG,EAAE,GACV,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAYlB"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/event.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/event.d.ts new file mode 100644 index 0000000..d5f2aeb --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/event.d.ts @@ -0,0 +1,50 @@ +import { PublicKey } from "@solana/web3.js"; +import Coder from "../coder"; +import Provider from "../provider"; +export declare type Event = { + name: string; + data: Object; +}; +export declare class EventManager { + /** + * Program ID for event subscriptions. + */ + private _programId; + /** + * Network and wallet provider. + */ + private _provider; + /** + * Event parser to handle onLogs callbacks. + */ + private _eventParser; + /** + * Maps event listener id to [event-name, callback]. + */ + private _eventCallbacks; + /** + * Maps event name to all listeners for the event. + */ + private _eventListeners; + /** + * The next listener id to allocate. + */ + private _listenerIdCount; + /** + * The subscription id from the connection onLogs subscription. + */ + private _onLogsSubscriptionId; + constructor(programId: PublicKey, provider: Provider, coder: Coder); + addEventListener(eventName: string, callback: (event: any, slot: number) => void): number; + removeEventListener(listener: number): Promise; +} +export declare class EventParser { + private coder; + private programId; + constructor(programId: PublicKey, coder: Coder); + parseLogs(logs: string[], callback: (log: Event) => void): void; + private handleLog; + private handleProgramLog; + private handleSystemLog; +} +//# sourceMappingURL=event.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/event.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/event.d.ts.map new file mode 100644 index 0000000..c9dd2ae --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/event.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/program/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,QAAQ,MAAM,aAAa,CAAC;AAKnC,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAIF,qBAAa,YAAY;IACvB;;OAEG;IACH,OAAO,CAAC,UAAU,CAAY;IAE9B;;OAEG;IACH,OAAO,CAAC,SAAS,CAAW;IAE5B;;OAEG;IACH,OAAO,CAAC,YAAY,CAAc;IAElC;;OAEG;IACH,OAAO,CAAC,eAAe,CAAuC;IAE9D;;OAEG;IACH,OAAO,CAAC,eAAe,CAA6B;IAEpD;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;OAEG;IACH,OAAO,CAAC,qBAAqB,CAAqB;gBAEtC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK;IAS3D,gBAAgB,CACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAC3C,MAAM;IA0CI,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA8BlE;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,SAAS,CAAY;gBAEjB,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK;IAgBvC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI;IAuB/D,OAAO,CAAC,SAAS;IAkBjB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,eAAe;CAoBxB"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/index.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/index.d.ts new file mode 100644 index 0000000..efd3a1b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/index.d.ts @@ -0,0 +1,251 @@ +import { PublicKey } from "@solana/web3.js"; +import Provider from "../provider"; +import { Idl } from "../idl"; +import Coder from "../coder"; +import { RpcNamespace, InstructionNamespace, TransactionNamespace, AccountNamespace, StateClient, SimulateNamespace } from "./namespace"; +import { Address } from "./common"; +/** + * ## Program + * + * Program provides the IDL deserialized client representation of an Anchor + * program. + * + * This API is the one stop shop for all things related to communicating with + * on-chain programs. Among other things, one can send transactions, fetch + * deserialized accounts, decode instruction data, subscribe to account + * changes, and listen to events. + * + * In addition to field accessors and methods, the object provides a set of + * dynamically generated properties, also known as namespaces, that + * map one-to-one to program methods and accounts. These namespaces generally + * can be used as follows: + * + * ## Usage + * + * ```javascript + * program.. + * ``` + * + * API specifics are namespace dependent. The examples used in the documentation + * below will refer to the two counter examples found + * [here](https://github.com/project-serum/anchor#examples). + */ +export declare class Program { + /** + * Async methods to send signed transactions to *non*-state methods on the + * program, returning a [[TransactionSignature]]. + * + * ## Usage + * + * ```javascript + * rpc.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To send a transaction invoking the `increment` method above, + * + * ```javascript + * const txSignature = await program.rpc.increment({ + * accounts: { + * counter, + * authority, + * }, + * }); + * ``` + */ + readonly rpc: RpcNamespace; + /** + * The namespace provides handles to an [[AccountClient]] object for each + * account in the program. + * + * ## Usage + * + * ```javascript + * program.account. + * ``` + * + * ## Example + * + * To fetch a `Counter` account from the above example, + * + * ```javascript + * const counter = await program.account.counter.fetch(address); + * ``` + * + * For the full API, see the [[AccountClient]] reference. + */ + readonly account: AccountNamespace; + /** + * The namespace provides functions to build [[TransactionInstruction]] + * objects for each method of a program. + * + * ## Usage + * + * ```javascript + * program.instruction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.instruction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ + readonly instruction: InstructionNamespace; + /** + * The namespace provides functions to build [[Transaction]] objects for each + * method of a program. + * + * ## Usage + * + * ```javascript + * program.transaction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.transaction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ + readonly transaction: TransactionNamespace; + /** + * The namespace provides functions to simulate transactions for each method + * of a program, returning a list of deserialized events *and* raw program + * logs. + * + * One can use this to read data calculated from a program on chain, by + * emitting an event in the program and reading the emitted event client side + * via the `simulate` namespace. + * + * ## simulate + * + * ```javascript + * program.simulate.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To simulate the `increment` method above, + * + * ```javascript + * const events = await program.simulate.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ + readonly simulate: SimulateNamespace; + /** + * A client for the program state. Similar to the base [[Program]] client, + * one can use this to send transactions and read accounts for the state + * abstraction. + */ + readonly state: StateClient; + /** + * Address of the program. + */ + get programId(): PublicKey; + private _programId; + /** + * IDL defining the program's interface. + */ + get idl(): Idl; + private _idl; + /** + * Coder for serializing requests. + */ + get coder(): Coder; + private _coder; + /** + * Wallet and network provider. + */ + get provider(): Provider; + private _provider; + /** + * Handles event subscriptions. + */ + private _events; + /** + * @param idl The interface definition. + * @param programId The on-chain address of the program. + * @param provider The network and wallet context to use. If not provided + * then uses [[getProvider]]. + */ + constructor(idl: Idl, programId: Address, provider?: Provider); + /** + * Generates a Program client by fetching the IDL from the network. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + static at(address: Address, provider?: Provider): Promise; + /** + * Fetches an idl from the blockchain. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + static fetchIdl(address: Address, provider?: Provider): Promise; + /** + * Invokes the given callback every time the given event is emitted. + * + * @param eventName The PascalCase name of the event, provided by the IDL. + * @param callback The function to invoke whenever the event is emitted from + * program logs. + */ + addEventListener(eventName: string, callback: (event: any, slot: number) => void): number; + /** + * Unsubscribes from the given eventName. + */ + removeEventListener(listener: number): Promise; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/index.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/index.d.ts.map new file mode 100644 index 0000000..424a954 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/program/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,GAAG,EAAgC,MAAM,QAAQ,CAAC;AAC3D,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAyB,EACvB,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAE,OAAO,EAAoB,MAAM,UAAU,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,OAAO;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IAErC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAE5B;;OAEG;IACH,IAAW,SAAS,IAAI,SAAS,CAEhC;IACD,OAAO,CAAC,UAAU,CAAY;IAE9B;;OAEG;IACH,IAAW,GAAG,IAAI,GAAG,CAEpB;IACD,OAAO,CAAC,IAAI,CAAM;IAElB;;OAEG;IACH,IAAW,KAAK,IAAI,KAAK,CAExB;IACD,OAAO,CAAC,MAAM,CAAQ;IAEtB;;OAEG;IACH,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IACD,OAAO,CAAC,SAAS,CAAW;IAE5B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAe;IAE9B;;;;;OAKG;gBACgB,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ;IA+BpE;;;;;;;;OAQG;WACiB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAO5D;;;;;;;;OAQG;WACiB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAYlE;;;;;;OAMG;IACI,gBAAgB,CACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAC3C,MAAM;IAIT;;OAEG;IACU,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlE"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts new file mode 100644 index 0000000..0052604 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts @@ -0,0 +1,100 @@ +/// +import EventEmitter from "eventemitter3"; +import { Signer, PublicKey, TransactionInstruction, Commitment } from "@solana/web3.js"; +import Provider from "../../provider"; +import { Idl, IdlTypeDef } from "../../idl"; +import Coder from "../../coder"; +import { Address } from "../common"; +export default class AccountFactory { + static build(idl: Idl, coder: Coder, programId: PublicKey, provider: Provider): AccountNamespace; +} +/** + * The namespace provides handles to an [[AccountClient]] object for each + * account in a program. + * + * ## Usage + * + * ```javascript + * account. + * ``` + * + * ## Example + * + * To fetch a `Counter` account from the above example, + * + * ```javascript + * const counter = await program.account.counter.fetch(address); + * ``` + * + * For the full API, see the [[AccountClient]] reference. + */ +export interface AccountNamespace { + [key: string]: AccountClient; +} +export declare class AccountClient { + /** + * Returns the number of bytes in this account. + */ + get size(): number; + private _size; + /** + * Returns the program ID owning all accounts. + */ + get programId(): PublicKey; + private _programId; + /** + * Returns the client's wallet and network provider. + */ + get provider(): Provider; + private _provider; + /** + * Returns the coder. + */ + get coder(): Coder; + private _coder; + private _idlAccount; + constructor(idl: Idl, idlAccount: IdlTypeDef, programId: PublicKey, provider?: Provider, coder?: Coder); + /** + * Returns a deserialized account. + * + * @param address The address of the account to fetch. + */ + fetch(address: Address): Promise; + /** + * Returns all instances of this account type for the program. + */ + all(filter?: Buffer): Promise[]>; + /** + * Returns an `EventEmitter` emitting a "change" event whenever the account + * changes. + */ + subscribe(address: Address, commitment?: Commitment): EventEmitter; + /** + * Unsubscribes from the account at the given address. + */ + unsubscribe(address: Address): void; + /** + * Returns an instruction for creating this account. + */ + createInstruction(signer: Signer, sizeOverride?: number): Promise; + /** + * Function returning the associated account. Args are keys to associate. + * Order matters. + */ + associated(...args: Array): Promise; + /** + * Function returning the associated address. Args are keys to associate. + * Order matters. + */ + associatedAddress(...args: Array): Promise; +} +/** + * @hidden + * + * Deserialized account owned by a program. + */ +export declare type ProgramAccount = { + publicKey: PublicKey; + account: T; +}; +//# sourceMappingURL=account.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts.map new file mode 100644 index 0000000..3261dce --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/account.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/account.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,SAAS,EAET,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ACH,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY;IA2BlE;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,OAAO;IAgB5B;;OAEG;IACG,iBAAiB,CACrB,MAAM,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,sBAAsB,CAAC;IAclC;;;OAGG;IACG,UAAU,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAKlE;;;OAGG;IACG,iBAAiB,CACrB,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,GACjC,OAAO,CAAC,SAAS,CAAC;CAGtB;AAED;;;;GAIG;AACH,oBAAY,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI;IACpC,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts new file mode 100644 index 0000000..b6d808f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts @@ -0,0 +1,30 @@ +import { PublicKey } from "@solana/web3.js"; +import Coder from "../../coder"; +import Provider from "../../provider"; +import { Idl } from "../../idl"; +import { StateClient } from "./state"; +import { InstructionNamespace } from "./instruction"; +import { TransactionNamespace } from "./transaction"; +import { RpcNamespace } from "./rpc"; +import { AccountNamespace } from "./account"; +import { SimulateNamespace } from "./simulate"; +export { StateClient } from "./state"; +export { InstructionNamespace, InstructionFn } from "./instruction"; +export { TransactionNamespace, TransactionFn } from "./transaction"; +export { RpcNamespace, RpcFn } from "./rpc"; +export { AccountNamespace, AccountClient, ProgramAccount } from "./account"; +export { SimulateNamespace, SimulateFn } from "./simulate"; +export default class NamespaceFactory { + /** + * Generates all namespaces for a given program. + */ + static build(idl: Idl, coder: Coder, programId: PublicKey, provider: Provider): [ + RpcNamespace, + InstructionNamespace, + TransactionNamespace, + AccountNamespace, + SimulateNamespace, + StateClient + ]; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts.map new file mode 100644 index 0000000..37acb0f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAqB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAA2B,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACzE,OAA2B,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAmB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACjD,OAAuB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAwB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAIhE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC;;OAEG;WACW,KAAK,CACjB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GACjB;QACD,YAAY;QACZ,oBAAoB;QACpB,oBAAoB;QACpB,gBAAgB;QAChB,iBAAiB;QACjB,WAAW;KACZ;CA0CF"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts new file mode 100644 index 0000000..8cdb07a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts @@ -0,0 +1,52 @@ +/// +import { PublicKey } from "@solana/web3.js"; +import { IdlInstruction, IdlAccountItem } from "../../idl"; +import { Accounts } from "../context"; +export default class InstructionNamespaceFactory { + static build(idlIx: IdlInstruction, encodeFn: InstructionEncodeFn, programId: PublicKey): InstructionFn; + static accountsArray(ctx: Accounts, accounts: IdlAccountItem[]): any; +} +/** + * The namespace provides functions to build [[TransactionInstruction]] + * objects for each method of a program. + * + * ## Usage + * + * ```javascript + * instruction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.instruction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ +export interface InstructionNamespace { + [key: string]: InstructionFn; +} +/** + * Function to create a `TransactionInstruction` generated from an IDL. + * Additionally it provides an `accounts` utility method, returning a list + * of ordered accounts for the instruction. + */ +export declare type InstructionFn = IxProps & ((...args: any[]) => any); +declare type IxProps = { + accounts: (ctx: Accounts) => any; +}; +export declare type InstructionEncodeFn = (ixName: string, ix: any) => Buffer; +export {}; +//# sourceMappingURL=instruction.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts.map new file mode 100644 index 0000000..c28504e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/instruction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"instruction.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/instruction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAc,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQvE,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,2BAA2B;WAChC,KAAK,CACjB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,mBAAmB,EAC7B,SAAS,EAAE,SAAS,GACnB,aAAa;WAkCF,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,GAAG;CAuB5E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B;AAED;;;;GAIG;AACH,oBAAY,aAAa,GAAG,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;AAChE,aAAK,OAAO,GAAG;IACb,QAAQ,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,GAAG,CAAC;CAClC,CAAC;AAEF,oBAAY,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,MAAM,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts new file mode 100644 index 0000000..db8c23f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts @@ -0,0 +1,50 @@ +import { TransactionSignature } from "@solana/web3.js"; +import Provider from "../../provider"; +import { IdlInstruction } from "../../idl"; +import { TransactionFn } from "./transaction"; +export default class RpcFactory { + static build(idlIx: IdlInstruction, txFn: TransactionFn, idlErrors: Map, provider: Provider): RpcFn; +} +/** + * The namespace provides async methods to send signed transactions for each + * *non*-state method on Anchor program. + * + * Keys are method names, values are RPC functions returning a + * [[TransactionInstruction]]. + * + * ## Usage + * + * ```javascript + * rpc.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * ``` + * + * ## Example + * + * To send a transaction invoking the `increment` method above, + * + * ```javascript + * const txSignature = await program.rpc.increment({ + * accounts: { + * counter, + * authority, + * }, + * }); + * ``` + */ +export interface RpcNamespace { + [key: string]: RpcFn; +} +/** + * RpcFn is a single RPC method generated from an IDL, sending a transaction + * paid for and signed by the configured provider. + */ +export declare type RpcFn = (...args: any[]) => Promise; +//# sourceMappingURL=rpc.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts.map new file mode 100644 index 0000000..5010384 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/rpc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,UAAU;WACf,KAAK,CACjB,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,QAAQ,EAAE,QAAQ,GACjB,KAAK;CAmBT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB;AAED;;;GAGG;AACH,oBAAY,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts new file mode 100644 index 0000000..2809733 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts @@ -0,0 +1,60 @@ +import { PublicKey } from "@solana/web3.js"; +import Provider from "../../provider"; +import { IdlInstruction } from "../../idl"; +import { TransactionFn } from "./transaction"; +import { Event } from "../event"; +import Coder from "../../coder"; +import { Idl } from "../../idl"; +export default class SimulateFactory { + static build(idlIx: IdlInstruction, txFn: TransactionFn, idlErrors: Map, provider: Provider, coder: Coder, programId: PublicKey, idl: Idl): SimulateFn; +} +/** + * The namespace provides functions to simulate transactions for each method + * of a program, returning a list of deserialized events *and* raw program + * logs. + * + * One can use this to read data calculated from a program on chain, by + * emitting an event in the program and reading the emitted event client side + * via the `simulate` namespace. + * + * ## Usage + * + * ```javascript + * program.simulate.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To simulate the `increment` method above, + * + * ```javascript + * const events = await program.simulate.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ +export interface SimulateNamespace { + [key: string]: SimulateFn; +} +/** + * RpcFn is a single method generated from an IDL. It simulates a method + * against a cluster configured by the provider, returning a list of all the + * events and raw logs that were emitted during the execution of the + * method. + */ +export declare type SimulateFn = (...args: any[]) => Promise; +declare type SimulateResponse = { + events: Event[]; + raw: string[]; +}; +export {}; +//# sourceMappingURL=simulate.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts.map new file mode 100644 index 0000000..5042413 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/simulate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"simulate.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/simulate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAe,KAAK,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGhC,MAAM,CAAC,OAAO,OAAO,eAAe;WACpB,KAAK,CACjB,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,GAAG,GACP,UAAU;CAsCd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B;AAED;;;;;GAKG;AACH,oBAAY,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEvE,aAAK,gBAAgB,GAAG;IACtB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts new file mode 100644 index 0000000..93991a0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts @@ -0,0 +1,65 @@ +import EventEmitter from "eventemitter3"; +import { PublicKey, Commitment } from "@solana/web3.js"; +import Provider from "../../provider"; +import { Idl } from "../../idl"; +import Coder from "../../coder"; +import { RpcNamespace, InstructionNamespace, TransactionNamespace } from "./"; +export default class StateFactory { + static build(idl: Idl, coder: Coder, programId: PublicKey, provider: Provider): StateClient | undefined; +} +/** + * A client for the program state. Similar to the base [[Program]] client, + * one can use this to send transactions and read accounts for the state + * abstraction. + */ +export declare class StateClient { + /** + * [[RpcNamespace]] for all state methods. + */ + readonly rpc: RpcNamespace; + /** + * [[InstructionNamespace]] for all state methods. + */ + readonly instruction: InstructionNamespace; + /** + * [[TransactionNamespace]] for all state methods. + */ + readonly transaction: TransactionNamespace; + /** + * Returns the program ID owning the state. + */ + get programId(): PublicKey; + private _programId; + /** + * Returns the client's wallet and network provider. + */ + get provider(): Provider; + private _provider; + /** + * Returns the coder. + */ + get coder(): Coder; + private _address; + private _coder; + private _idl; + private _sub; + constructor(idl: Idl, programId: PublicKey, provider?: Provider, coder?: Coder); + /** + * Returns the deserialized state account. + */ + fetch(): Promise; + /** + * Returns the state address. + */ + address(): PublicKey; + /** + * Returns an `EventEmitter` with a `"change"` event that's fired whenever + * the state account cahnges. + */ + subscribe(commitment?: Commitment): EventEmitter; + /** + * Unsubscribes to state changes. + */ + unsubscribe(): void; +} +//# sourceMappingURL=state.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts.map new file mode 100644 index 0000000..7ece6fa --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/state.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/state.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAiB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAkB,MAAM,WAAW,CAAC;AAChD,OAAO,KAA6B,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAS9E,MAAM,CAAC,OAAO,OAAO,YAAY;WACjB,KAAK,CACjB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GACjB,WAAW,GAAG,SAAS;CAM3B;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAE3C;;OAEG;IACH,IAAI,SAAS,IAAI,SAAS,CAEzB;IACD,OAAO,CAAC,UAAU,CAAY;IAE9B;;OAEG;IACH,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IACD,OAAO,CAAC,SAAS,CAAW;IAE5B;;OAEG;IACH,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED,OAAO,CAAC,QAAQ,CAAY;IAC5B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,IAAI,CAAsB;gBAGhC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,QAAQ,CAAC,EAAE,QAAQ,EACnB,KAAK,CAAC,EAAE,KAAK;IAyDf;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAgB9B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;;OAGG;IACH,SAAS,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,YAAY;IAuBhD;;OAEG;IACH,WAAW;CAUZ"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts b/tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts new file mode 100644 index 0000000..f619f8c --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts @@ -0,0 +1,43 @@ +import { Transaction } from "@solana/web3.js"; +import { IdlInstruction } from "../../idl"; +import { InstructionFn } from "./instruction"; +export default class TransactionFactory { + static build(idlIx: IdlInstruction, ixFn: InstructionFn): TransactionFn; +} +/** + * The namespace provides functions to build [[Transaction]] objects for each + * method of a program. + * + * ## Usage + * + * ```javascript + * program.transaction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.transaction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ +export interface TransactionNamespace { + [key: string]: TransactionFn; +} +/** + * Tx is a function to create a `Transaction` for a given program instruction. + */ +export declare type TransactionFn = (...args: any[]) => Transaction; +//# sourceMappingURL=transaction.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts.map new file mode 100644 index 0000000..f19ee82 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/program/namespace/transaction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/program/namespace/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,kBAAkB;WACvB,KAAK,CACjB,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,aAAa,GAClB,aAAa;CAajB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B;AAED;;GAEG;AACH,oBAAY,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/provider.d.ts b/tests/node_modules/@project-serum/anchor/dist/provider.d.ts new file mode 100644 index 0000000..ec58d3e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/provider.d.ts @@ -0,0 +1,87 @@ +import { Connection, Keypair, Signer, PublicKey, Transaction, TransactionSignature, ConfirmOptions, RpcResponseAndContext, SimulatedTransactionResponse } from "@solana/web3.js"; +/** + * The network and wallet context used to send transactions paid for and signed + * by the provider. + */ +export default class Provider { + readonly connection: Connection; + readonly wallet: Wallet; + readonly opts: ConfirmOptions; + /** + * @param connection The cluster connection where the program is deployed. + * @param wallet The wallet used to pay for and sign all transactions. + * @param opts Transaction confirmation options to use by default. + */ + constructor(connection: Connection, wallet: Wallet, opts: ConfirmOptions); + static defaultOptions(): ConfirmOptions; + /** + * Returns a `Provider` with a wallet read from the local filesystem. + * + * @param url The network cluster url. + * @param opts The default transaction confirmation options. + * + * (This api is for Node only.) + */ + static local(url?: string, opts?: ConfirmOptions): Provider; + /** + * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment + * variable + * + * (This api is for Node only.) + */ + static env(): Provider; + /** + * Sends the given transaction, paid for and signed by the provider's wallet. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + send(tx: Transaction, signers?: Array, opts?: ConfirmOptions): Promise; + /** + * Similar to `send`, but for an array of transactions and signers. + */ + sendAll(reqs: Array, opts?: ConfirmOptions): Promise>; + /** + * Simulates the given transaction, returning emitted logs from execution. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + simulate(tx: Transaction, signers?: Array, opts?: ConfirmOptions): Promise>; +} +export declare type SendTxRequest = { + tx: Transaction; + signers: Array; +}; +/** + * Wallet interface for objects that can be used to sign provider transactions. + */ +export interface Wallet { + signTransaction(tx: Transaction): Promise; + signAllTransactions(txs: Transaction[]): Promise; + publicKey: PublicKey; +} +/** + * Node only wallet. + */ +export declare class NodeWallet implements Wallet { + readonly payer: Keypair; + constructor(payer: Keypair); + static local(): NodeWallet; + signTransaction(tx: Transaction): Promise; + signAllTransactions(txs: Transaction[]): Promise; + get publicKey(): PublicKey; +} +/** + * Sets the default provider on the client. + */ +export declare function setProvider(provider: Provider): void; +/** + * Returns the default provider being used by the client. + */ +export declare function getProvider(): Provider; +//# sourceMappingURL=provider.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/provider.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/provider.d.ts.map new file mode 100644 index 0000000..729fb5f --- /dev/null +++ b/tests/node_modules/@project-serum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AAC;CA4BhE;AAED,oBAAY,aAAa,GAAG;IAC1B,EAAE,EAAE,WAAW,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,eAAe,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACvD,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAChE,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,UAAW,YAAW,MAAM;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO;gBAAd,KAAK,EAAE,OAAO;IAEnC,MAAM,CAAC,KAAK,IAAI,UAAU;IAgBpB,eAAe,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAKtD,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAOrE,IAAI,SAAS,IAAI,SAAS,CAEzB;CACF;AA6BD;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,QAE7C;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAKtC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/tsconfig.cjs.tsbuildinfo b/tests/node_modules/@project-serum/anchor/dist/tsconfig.cjs.tsbuildinfo new file mode 100644 index 0000000..4c4b678 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/tsconfig.cjs.tsbuildinfo @@ -0,0 +1,2421 @@ +{ + "program": { + "fileInfos": { + "../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d", + "signature": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.d.ts": { + "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2016.d.ts": { + "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2017.d.ts": { + "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2018.d.ts": { + "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2019.d.ts": { + "version": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "signature": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84", + "signature": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.dom.iterable.d.ts": { + "version": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "signature": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481", + "signature": "7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd", + "signature": "097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.core.d.ts": { + "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.collection.d.ts": { + "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.generator.d.ts": { + "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.iterable.d.ts": { + "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.promise.d.ts": { + "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.proxy.d.ts": { + "version": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e", + "signature": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.reflect.d.ts": { + "version": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d", + "signature": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.symbol.d.ts": { + "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { + "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2016.array.include.d.ts": { + "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.object.d.ts": { + "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { + "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.string.d.ts": { + "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.intl.d.ts": { + "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { + "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": { + "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": { + "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.intl.d.ts": { + "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.promise.d.ts": { + "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.regexp.d.ts": { + "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.array.d.ts": { + "version": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "signature": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.object.d.ts": { + "version": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "signature": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.string.d.ts": { + "version": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "signature": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.symbol.d.ts": { + "version": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "signature": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2020.bigint.d.ts": { + "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.esnext.intl.d.ts": { + "version": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd", + "signature": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.full.d.ts": { + "version": "1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f", + "signature": "1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f", + "affectsGlobalScope": false + }, + "../src/error.ts": { + "version": "b50ad68cdd816e3065babe00434488882c00ad94b8f4e85e80fdfdc6aeebce2d", + "signature": "1fe36cefc6767342bf6f0959697a10bad046352b392f5b20dce3773ae825eeed", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/assert/strict.d.ts": { + "version": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "signature": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/globals.d.ts": { + "version": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "signature": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/async_hooks.d.ts": { + "version": "c9e8a340da877b05a52525554aa255b3f44958c7f6748ebf5cbe0bfbe6766878", + "signature": "c9e8a340da877b05a52525554aa255b3f44958c7f6748ebf5cbe0bfbe6766878", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/buffer.d.ts": { + "version": "a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b", + "signature": "a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/child_process.d.ts": { + "version": "a668dfae917097b30fc29bbebeeb869cee22529f2aa9976cea03c7e834a1b841", + "signature": "a668dfae917097b30fc29bbebeeb869cee22529f2aa9976cea03c7e834a1b841", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/cluster.d.ts": { + "version": "04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef", + "signature": "04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/console.d.ts": { + "version": "c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870", + "signature": "c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/constants.d.ts": { + "version": "45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491", + "signature": "45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/crypto.d.ts": { + "version": "51a77d65fbadc93dcdf454ea1d94bd9f1f146008d890bea4f168dd397192b9fb", + "signature": "51a77d65fbadc93dcdf454ea1d94bd9f1f146008d890bea4f168dd397192b9fb", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dgram.d.ts": { + "version": "797a9d37eb1f76143311c3f0a186ce5c0d8735e94c0ca08ff8712a876c9b4f9e", + "signature": "797a9d37eb1f76143311c3f0a186ce5c0d8735e94c0ca08ff8712a876c9b4f9e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dns.d.ts": { + "version": "ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28", + "signature": "ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dns/promises.d.ts": { + "version": "64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753", + "signature": "64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/domain.d.ts": { + "version": "2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5", + "signature": "2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/events.d.ts": { + "version": "36ba0e764ace4fb55e6165c5f33f2826f88b1d3767f7ec658fe2f6c85ac5e776", + "signature": "36ba0e764ace4fb55e6165c5f33f2826f88b1d3767f7ec658fe2f6c85ac5e776", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/fs.d.ts": { + "version": "d3315298050252531e7db9046296ca2162fa5218a85b10a62ed79140e3822e3c", + "signature": "d3315298050252531e7db9046296ca2162fa5218a85b10a62ed79140e3822e3c", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/fs/promises.d.ts": { + "version": "bdaf554ae2d9d09e2a42f58a29ef7f80e5b5c1d7b96bfb717243dc91a477216e", + "signature": "bdaf554ae2d9d09e2a42f58a29ef7f80e5b5c1d7b96bfb717243dc91a477216e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/http.d.ts": { + "version": "bd311ff12ac011f5531edd217189606e7a697376d6109e8a18361358f6249b46", + "signature": "bd311ff12ac011f5531edd217189606e7a697376d6109e8a18361358f6249b46", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/http2.d.ts": { + "version": "a870e564e578dccc7b34018d6919f9466bae462b4bafc3449ca63a2331ac27c5", + "signature": "a870e564e578dccc7b34018d6919f9466bae462b4bafc3449ca63a2331ac27c5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/https.d.ts": { + "version": "13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452", + "signature": "13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/inspector.d.ts": { + "version": "42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8", + "signature": "42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/module.d.ts": { + "version": "0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d", + "signature": "0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/net.d.ts": { + "version": "1eaf8fecdae37cc4c85f496d2bdb9e8d46c21b3643b7e27d3646a330585515a5", + "signature": "1eaf8fecdae37cc4c85f496d2bdb9e8d46c21b3643b7e27d3646a330585515a5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/os.d.ts": { + "version": "69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16", + "signature": "69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/path.d.ts": { + "version": "21e64a125f65dff99cc3ed366c96e922b90daed343eb52ecdace5f220401dcda", + "signature": "21e64a125f65dff99cc3ed366c96e922b90daed343eb52ecdace5f220401dcda", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/perf_hooks.d.ts": { + "version": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "signature": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/process.d.ts": { + "version": "61977e8f4c042abd392645828c90afd1b551a6fd32c51b93717c68003ce7c983", + "signature": "61977e8f4c042abd392645828c90afd1b551a6fd32c51b93717c68003ce7c983", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/punycode.d.ts": { + "version": "7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6", + "signature": "7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/querystring.d.ts": { + "version": "992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58", + "signature": "992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/readline.d.ts": { + "version": "3b790d08129aca55fd5ae1672d1d26594147ac0d5f2eedc30c7575eb18daef7e", + "signature": "3b790d08129aca55fd5ae1672d1d26594147ac0d5f2eedc30c7575eb18daef7e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/repl.d.ts": { + "version": "64535caf208a02420d2d04eb2029269efedd11eb8597ada0d5e6f3d54ec663ae", + "signature": "64535caf208a02420d2d04eb2029269efedd11eb8597ada0d5e6f3d54ec663ae", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/stream.d.ts": { + "version": "3b02b1e3c3a6730d79e2c8652f3be6a7caef1a604b9c5103abbbcea921694be1", + "signature": "3b02b1e3c3a6730d79e2c8652f3be6a7caef1a604b9c5103abbbcea921694be1", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/stream/promises.d.ts": { + "version": "fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6", + "signature": "fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/string_decoder.d.ts": { + "version": "4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50", + "signature": "4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/timers.d.ts": { + "version": "f49709e8c096b05aca0674d39f471aa05261de7c756df9abdf4a53ed0fa98901", + "signature": "f49709e8c096b05aca0674d39f471aa05261de7c756df9abdf4a53ed0fa98901", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/timers/promises.d.ts": { + "version": "baca27d1de400e027cdc70217ca73e414002baef5798aa24a921097c20066fa1", + "signature": "baca27d1de400e027cdc70217ca73e414002baef5798aa24a921097c20066fa1", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/tls.d.ts": { + "version": "f89a6d56f0267f6e73c707f8a89d2f38e9928e10bfa505f39a4f4bf954093aee", + "signature": "f89a6d56f0267f6e73c707f8a89d2f38e9928e10bfa505f39a4f4bf954093aee", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/trace_events.d.ts": { + "version": "7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4", + "signature": "7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/tty.d.ts": { + "version": "9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5", + "signature": "9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/url.d.ts": { + "version": "dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9", + "signature": "dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/util.d.ts": { + "version": "e649840284bab8c4d09cadc125cd7fbde7529690cc1a0881872b6a9cd202819b", + "signature": "e649840284bab8c4d09cadc125cd7fbde7529690cc1a0881872b6a9cd202819b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/v8.d.ts": { + "version": "a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d", + "signature": "a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/vm.d.ts": { + "version": "1aa7dbace2b7b2ef60897dcd4f66252ee6ba85e594ded8918c9acdcecda1896c", + "signature": "1aa7dbace2b7b2ef60897dcd4f66252ee6ba85e594ded8918c9acdcecda1896c", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/worker_threads.d.ts": { + "version": "1535aeef6e803bc8c784b14c99bd214dba9223df4914f3dee616af351ab46042", + "signature": "1535aeef6e803bc8c784b14c99bd214dba9223df4914f3dee616af351ab46042", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/zlib.d.ts": { + "version": "4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875", + "signature": "4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/globals.global.d.ts": { + "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/wasi.d.ts": { + "version": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "signature": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/ts3.6/base.d.ts": { + "version": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "signature": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/assert.d.ts": { + "version": "b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76", + "signature": "b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/base.d.ts": { + "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/index.d.ts": { + "version": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "signature": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "affectsGlobalScope": false + }, + "../node_modules/@solana/web3.js/lib/index.d.ts": { + "version": "b892606323166b0cfe878d78ff76f1a9da4ca97659d1c76752fd4b58959ebafa", + "signature": "b892606323166b0cfe878d78ff76f1a9da4ca97659d1c76752fd4b58959ebafa", + "affectsGlobalScope": false + }, + "../node_modules/@types/bn.js/index.d.ts": { + "version": "bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5", + "signature": "bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5", + "affectsGlobalScope": false + }, + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts": { + "version": "0cc80e64c15a85707e6f34f02d706a8803d85ad035707b2bc73f264583925032", + "signature": "0cc80e64c15a85707e6f34f02d706a8803d85ad035707b2bc73f264583925032", + "affectsGlobalScope": false + }, + "../src/idl.ts": { + "version": "e1b7bbe7af11c30f479349786db72fc4716421f15e2130d12eb8afcede8fa396", + "signature": "1614a1ca6221d0dcc9bb4df2e280edd49e619eed0f826ea123281af36b408cd9", + "affectsGlobalScope": false + }, + "../src/utils/common.ts": { + "version": "59f158073b53798c1a71d0d1ffd1d7ebeebebf181aa1b15795cfaa13127e924c", + "signature": "afe9119a49a42f00eb2494982677e30e6c9ee79a1342ea0fd611ef0b455ae5e1", + "affectsGlobalScope": false + }, + "../src/provider.ts": { + "version": "771c9605070c3ec9552bb2f4a030405e3b687f4d9e405f25ab61995a5fbb01d7", + "signature": "6ac20c77f7ae3491bc2d708c570d46feb43cbf3e4226e80da202aef6fd5cd257", + "affectsGlobalScope": false + }, + "../node_modules/camelcase/index.d.ts": { + "version": "b8e7261f41dd775524077306a69c01796bd5a2a742c7338e6607ff4e689bc356", + "signature": "b8e7261f41dd775524077306a69c01796bd5a2a742c7338e6607ff4e689bc356", + "affectsGlobalScope": false + }, + "../node_modules/base-x/src/index.d.ts": { + "version": "e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1", + "signature": "e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1", + "affectsGlobalScope": false + }, + "../node_modules/@types/bs58/index.d.ts": { + "version": "5cbc27193321e6ba10f4e9f3c5519649d9e2716cf103efd7eaa7a89e0f8ed1d4", + "signature": "5cbc27193321e6ba10f4e9f3c5519649d9e2716cf103efd7eaa7a89e0f8ed1d4", + "affectsGlobalScope": false + }, + "../src/coder/idl.ts": { + "version": "7b5f17f9b8990f26bafde9c42a0b6846cc2f7acc1183d872acd1bb356967de9e", + "signature": "aa639fe52eaf2c08061456ac327be72fe9d41b08800ef1b699330e100fd9ed72", + "affectsGlobalScope": false + }, + "../node_modules/no-case/dist/index.d.ts": { + "version": "b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37", + "signature": "b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37", + "affectsGlobalScope": false + }, + "../node_modules/dot-case/dist/index.d.ts": { + "version": "062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c", + "signature": "062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c", + "affectsGlobalScope": false + }, + "../node_modules/snake-case/dist/index.d.ts": { + "version": "74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17", + "signature": "74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17", + "affectsGlobalScope": false + }, + "../node_modules/js-sha256/index.d.ts": { + "version": "0afbe91142eb631d6f31be624cf8a550b03736bfd22b0f309405a6fe4d4c9517", + "signature": "0afbe91142eb631d6f31be624cf8a550b03736bfd22b0f309405a6fe4d4c9517", + "affectsGlobalScope": false + }, + "../src/coder/common.ts": { + "version": "71e2cb372dfd2abc19362e4895b86f61bbff54a0673c73631baf6e9ff646702c", + "signature": "42942638bbd3646027c2f27025148f8b8c675be73319c4b0f4c98d55a52d8789", + "affectsGlobalScope": false + }, + "../src/coder/instruction.ts": { + "version": "76aa880a20968f75bc9b46ce0f2a6424173bf893fda30524d243c7d75a660131", + "signature": "ce423291d1a4701149f825d76baab5b009daeeef70c6ce7c31363e27dc4a75c8", + "affectsGlobalScope": false + }, + "../src/coder/accounts.ts": { + "version": "cc447b548718d5aa275b40cdf7b7822963ddedcd8870e94a79487ba131c23be9", + "signature": "4064f4d87306414dd6b4aea958e46a1e659c9f3fe231eec400d0948441d76682", + "affectsGlobalScope": false + }, + "../src/coder/types.ts": { + "version": "9ac141925fe514633442e0914cc7259c1dd7fbf93e2b1ed39463be1923b4ef0a", + "signature": "0c2d187ce8b461daf1036c391d92072f6101331f97d8545892b0e247c2833b38", + "affectsGlobalScope": false + }, + "../node_modules/base64-js/index.d.ts": { + "version": "96da6c81cd788939a7cf6546ea1f65ab5ca38952e5bd7d8c284bfe1f3c22dce7", + "signature": "96da6c81cd788939a7cf6546ea1f65ab5ca38952e5bd7d8c284bfe1f3c22dce7", + "affectsGlobalScope": false + }, + "../src/program/event.ts": { + "version": "48c85a40fa7b3c414b0c72b0e2e3b7e31a341f12e8dc8ec3d3de1e53bca2a1fe", + "signature": "a53c254b535c8a6bb956654956a8cac22d36ebfd0865702c7b65d7fcbcde64dc", + "affectsGlobalScope": false + }, + "../src/coder/event.ts": { + "version": "cb4ad386bfe7f4a8b41841c092ef62220c577b063f14a6570e3523c17862fb8c", + "signature": "5a44f0efaf82fe9f865f61b2020c9f78f133b173fff5a79292096a8f8914910f", + "affectsGlobalScope": false + }, + "../src/utils/features.ts": { + "version": "5ddc99b15ae623edbdfca64997e17721ab8a475e4bb9170dd50e34401c478fb8", + "signature": "291b47b629e4c15e96bacb8d1f707573e72fedbb0fcab43f729e5f9d73560c3c", + "affectsGlobalScope": false + }, + "../src/coder/state.ts": { + "version": "b1079a8e1b361e7c2ede7f976b4003d7d495b60e6154c6e9f4c98636aeb203c8", + "signature": "afce3229233d36eb877e9bf4f5f1c7ee828cdda75f0d108ff0b4dbc2dbfe17f3", + "affectsGlobalScope": false + }, + "../src/coder/index.ts": { + "version": "70dbea49080689cd6728ade497012a08f0cfa67083ad4bce0d0488889fbc5431", + "signature": "51f475cb0a4a91a4359429c7eb9e2871270a6b990a2473eed846626fd2336058", + "affectsGlobalScope": false + }, + "../node_modules/toml/index.d.ts": { + "version": "a7fe7e88c50608567af53c49d3c59ea5f33bf5f59126d67b2a25f85eb41297ba", + "signature": "a7fe7e88c50608567af53c49d3c59ea5f33bf5f59126d67b2a25f85eb41297ba", + "affectsGlobalScope": false + }, + "../node_modules/@types/pako/index.d.ts": { + "version": "ac8256962829db28179e5b4ee97f4a0b27d85f219ad5c7b03b375673fadddd59", + "signature": "ac8256962829db28179e5b4ee97f4a0b27d85f219ad5c7b03b375673fadddd59", + "affectsGlobalScope": false + }, + "../node_modules/eventemitter3/index.d.ts": { + "version": "b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968", + "signature": "b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968", + "affectsGlobalScope": false + }, + "../src/program/context.ts": { + "version": "b50c07d7c78ce997cd24b96da5bb4b8d63343bf6ef24679f366cfaddc28212cf", + "signature": "e62fd19d48077f1de0be67b0530f5623ba9eb1b4e7f8c3a1d1ccb9295e58ba70", + "affectsGlobalScope": false + }, + "../src/program/common.ts": { + "version": "11ba9ad8904b00ff94b210d80ba02df844075360030b40854d1f0a146f12e726", + "signature": "e6ff39c5eb69d9f01557f478a7d0d2bb7fdbf7c03770b9632a6a2820cb89b7f9", + "affectsGlobalScope": false + }, + "../src/utils/pubkey.ts": { + "version": "633341637271b371afebe2423e2ba079df8aeadf64aa5363363a8d519d4e12a5", + "signature": "6f6e0910e0f211757febf2f3656d48d048f48097e444d2c9435aae4dd9678964", + "affectsGlobalScope": false + }, + "../src/program/namespace/instruction.ts": { + "version": "b8c5ada0ddd825526fae64b2c7048086e2f1caecb3fc289c67e9fa883ba154b2", + "signature": "faebee35452b1b6c08d54169f027200ca6c5a07477e19cfec43ef0a7c1350779", + "affectsGlobalScope": false + }, + "../src/program/namespace/transaction.ts": { + "version": "7eab8b19671f1daf640c9ecc2db36b073054b5796308dcc83df9ed8c791a320d", + "signature": "070ec7f6c859fc28cfcb979f1f29c3abdb888fbdb34cd9f8bca821d6dbda1810", + "affectsGlobalScope": false + }, + "../src/program/namespace/rpc.ts": { + "version": "e5f0a962eaabeb844919ba827996cb2b15558bfa392c04ab50e2c450bbd31881", + "signature": "a0b7830e8a09fde6726e46943a13b4c743e18faf46390df0fd779fb9413d31bf", + "affectsGlobalScope": false + }, + "../src/program/namespace/state.ts": { + "version": "68e9494ffdd44a185523aa663c600ea645787cb24cc23e6222caa6ba6403c604", + "signature": "6218f145c81ad3dc715760dffc687c47c12e7deb9ea92337efed3eb025849b58", + "affectsGlobalScope": false + }, + "../src/program/namespace/account.ts": { + "version": "53e070164af18725a3bf81efa08e6b49fe837d52bd46edf54d5e9000e2c2f41a", + "signature": "b4a4a1b442872ac195e970710000a5643a7abce88b24b7ab909717dd1d8ac643", + "affectsGlobalScope": false + }, + "../src/program/namespace/simulate.ts": { + "version": "08df74b9dab9f39aba50127225782ab1602a5ffdadc929cfa20f98ca247d7966", + "signature": "bb4e4bf30872ce790fcb1cb5a95a01847e20d3d69268b2ff6eeafbd6b1987ce3", + "affectsGlobalScope": false + }, + "../src/program/namespace/index.ts": { + "version": "1f5e9ab7a6694d2df90e8db9cee5859b88decc9b82e9ad1992f5bf253fe7c3b5", + "signature": "28354687c0f1267fd8cfa0645db7fc340a180cf7c299a58f91c3fe99bd6cd6d7", + "affectsGlobalScope": false + }, + "../src/utils/bytes/hex.ts": { + "version": "4e018730e9476d79f3520acd3cc9b83938ea1e164dd86743cee4dcb7c6e41847", + "signature": "dae492af52685ae68e6f6f90ff2a42422fe8a8fd99acd9b40705a9470c4f7bfd", + "affectsGlobalScope": false + }, + "../src/utils/bytes/utf8.ts": { + "version": "52ece3a38469c732d1ea141f7fd040bd014692975764a12613b053c1a859046f", + "signature": "139db12276e11f90df65778f7513bc3f85957d74fd0d1bbeb19e4a1dace4f662", + "affectsGlobalScope": false + }, + "../src/utils/bytes/bs58.ts": { + "version": "1dca6583aa437515cd12055e244344f357efe6eecf3fc567818d18556f507e49", + "signature": "2884fcc91f5d42a3288a75a558b036923e3d926354fa0c3fa0251c2c3d4b54e8", + "affectsGlobalScope": false + }, + "../src/utils/bytes/base64.ts": { + "version": "2d2f61212388dbfa9a9d161afcc5944be3f0873dcebcaa5dd644ad49bc4fdb9c", + "signature": "cc486017c03c0eb004237288602477ef2c636eed71d7ef0911da01c856b52ad6", + "affectsGlobalScope": false + }, + "../src/utils/bytes/index.ts": { + "version": "e7c96bb254ecb9128ed2dcf6d87ce579142f69482145fe8a26c28f934ae6cf98", + "signature": "7e6962ddd100e59959d982f7e1d0852bb157f49fc64318d02cd5988dfbd213fd", + "affectsGlobalScope": false + }, + "../src/program/index.ts": { + "version": "d0483090945334894f29ecbc75bc2cb0900e0879f569a69b57dc3037630942bb", + "signature": "d44878c770731a8ffaf4ff148cb456d5ffaf8e6c63eac130d8b14b5c1449bebf", + "affectsGlobalScope": false + }, + "../src/workspace.ts": { + "version": "94c178c879d1782f38e629bf36d060ff5ac422792976d2a4c03f627c1329c016", + "signature": "bf8be89d1adfc9f11e29e4c4149d3bf13d8d89b076ffdb09f2360f0adad90184", + "affectsGlobalScope": false + }, + "../src/utils/sha256.ts": { + "version": "3c0c533dd0f4090e2d26eee3e81e3285d24f7e01375973beeba3e54fd46cfc87", + "signature": "847ccc20490110124a2252c5a705dfe1355921470d2bd6da9af1d4943e54346b", + "affectsGlobalScope": false + }, + "../src/utils/rpc.ts": { + "version": "ad35ddf72a7f54ec60e44abcf2ac91aedb54fb3216c78c83454c687fd9a2a5d7", + "signature": "662c41728f7c1c8924e346722dc0baaf3d8203d2a93cbba182e388327c385f63", + "affectsGlobalScope": false + }, + "../src/utils/token.ts": { + "version": "fe13b83eb2d47b98ed7f0d9b3c25e32cb55442ea0eb1b17eba469973c6bc58f9", + "signature": "1a33fe7fba89d4ede6eeba8239dd1288df1b00314aa537c461f9a84d69395f3a", + "affectsGlobalScope": false + }, + "../src/utils/index.ts": { + "version": "d4590531cc59194ead6a80ee4b83769a9b5e4536f7e8d4d5b392ef3a4ccc684a", + "signature": "445a7f95d12db9018cf1bd75cb1d68d04cd544512e97c23a0ea683d88316464b", + "affectsGlobalScope": false + }, + "../src/index.ts": { + "version": "d057e76860c1782227528b81ab33cb27ffedcde659fc3bf7b1e74c4788468df3", + "signature": "61af8d66da57ed0702f52af48ce0f8043873dd5a8fb476556810d5a578156381", + "affectsGlobalScope": false + }, + "../types/buffer-layout/index.d.ts": { + "version": "2dc5486472ed06473788de247aadebdad84f9392e30e9f2a341bfb036b837102", + "signature": "2dc5486472ed06473788de247aadebdad84f9392e30e9f2a341bfb036b837102", + "affectsGlobalScope": false + }, + "../node_modules/@babel/types/lib/index.d.ts": { + "version": "bcb65ca77412000e1f33384efbbb615a8dac55aca6aa06a4552b01e7c8cd6577", + "signature": "bcb65ca77412000e1f33384efbbb615a8dac55aca6aa06a4552b01e7c8cd6577", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__generator/index.d.ts": { + "version": "b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e", + "signature": "b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__traverse/index.d.ts": { + "version": "8a278bfba7b081cd849434c1130655046639ae90617a682436ed6954e2b57403", + "signature": "8a278bfba7b081cd849434c1130655046639ae90617a682436ed6954e2b57403", + "affectsGlobalScope": false + }, + "../node_modules/@babel/parser/typings/babel-parser.d.ts": { + "version": "b1401d1d9117a5e4d981c965e3408dcb6e2b63022b716816e6d83599ab369a53", + "signature": "b1401d1d9117a5e4d981c965e3408dcb6e2b63022b716816e6d83599ab369a53", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__template/index.d.ts": { + "version": "3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed", + "signature": "3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__core/index.d.ts": { + "version": "a66e700ed470a0cb52d14f3376c1605c70fec8e9659e45f7e22ad07fcd06ae04", + "signature": "a66e700ed470a0cb52d14f3376c1605c70fec8e9659e45f7e22ad07fcd06ae04", + "affectsGlobalScope": false + }, + "../node_modules/@types/connect/index.d.ts": { + "version": "81c14b89fa607b86dd726e2e3e91360cf8155ce97468404324d404a5bd65b2eb", + "signature": "81c14b89fa607b86dd726e2e3e91360cf8155ce97468404324d404a5bd65b2eb", + "affectsGlobalScope": false + }, + "../node_modules/@types/range-parser/index.d.ts": { + "version": "4e88b833be14c7f384e0dcd57bb30acd799e8e34d212635d693e41a75a71164b", + "signature": "4e88b833be14c7f384e0dcd57bb30acd799e8e34d212635d693e41a75a71164b", + "affectsGlobalScope": false + }, + "../node_modules/@types/qs/index.d.ts": { + "version": "98437d5a640b67c41534f0de2dcb64c75433dcdff54ff8f8432e613663619a2e", + "signature": "98437d5a640b67c41534f0de2dcb64c75433dcdff54ff8f8432e613663619a2e", + "affectsGlobalScope": false + }, + "../node_modules/@types/express-serve-static-core/index.d.ts": { + "version": "e41a1ce538d71d5a3389b7fc2e39c15a4972f0d4cb14bf2fe8cda8c361150028", + "signature": "e41a1ce538d71d5a3389b7fc2e39c15a4972f0d4cb14bf2fe8cda8c361150028", + "affectsGlobalScope": true + }, + "../node_modules/@types/graceful-fs/index.d.ts": { + "version": "cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc", + "signature": "cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc", + "affectsGlobalScope": false + }, + "../node_modules/@types/istanbul-lib-coverage/index.d.ts": { + "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "affectsGlobalScope": false + }, + "../node_modules/@types/istanbul-lib-report/index.d.ts": { + "version": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee", + "signature": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee", + "affectsGlobalScope": false + }, + "../node_modules/@types/istanbul-reports/index.d.ts": { + "version": "905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab", + "signature": "905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/cleanupSemantic.d.ts": { + "version": "d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322", + "signature": "d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/types.d.ts": { + "version": "69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2", + "signature": "69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/diffLines.d.ts": { + "version": "561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9", + "signature": "561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/printDiffs.d.ts": { + "version": "62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f", + "signature": "62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/index.d.ts": { + "version": "b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc", + "signature": "b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc", + "affectsGlobalScope": false + }, + "../node_modules/pretty-format/build/types.d.ts": { + "version": "5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09", + "signature": "5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09", + "affectsGlobalScope": false + }, + "../node_modules/pretty-format/build/index.d.ts": { + "version": "02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c", + "signature": "02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c", + "affectsGlobalScope": false + }, + "../node_modules/@types/jest/index.d.ts": { + "version": "08c4a97a324b82f7dbc02b9e2bb278b7bb13c160e04e23a16dd04f9d732da20a", + "signature": "08c4a97a324b82f7dbc02b9e2bb278b7bb13c160e04e23a16dd04f9d732da20a", + "affectsGlobalScope": true + }, + "../node_modules/@types/json-schema/index.d.ts": { + "version": "b2be568d8ce95fcb26eebd04c035d94825655fdf689bf67d799f5ff8cbbb1024", + "signature": "b2be568d8ce95fcb26eebd04c035d94825655fdf689bf67d799f5ff8cbbb1024", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/common.d.ts": { + "version": "3594c022901a1c8993b0f78a3f534cfb81e7b619ed215348f7f6882f3db02abc", + "signature": "3594c022901a1c8993b0f78a3f534cfb81e7b619ed215348f7f6882f3db02abc", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/array.d.ts": { + "version": "438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2", + "signature": "438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/collection.d.ts": { + "version": "0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8", + "signature": "0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/date.d.ts": { + "version": "187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42", + "signature": "187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/function.d.ts": { + "version": "c9f396e71966bd3a890d8a36a6a497dbf260e9b868158ea7824d4b5421210afe", + "signature": "c9f396e71966bd3a890d8a36a6a497dbf260e9b868158ea7824d4b5421210afe", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/lang.d.ts": { + "version": "509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32", + "signature": "509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/math.d.ts": { + "version": "9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb", + "signature": "9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/number.d.ts": { + "version": "00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a", + "signature": "00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/object.d.ts": { + "version": "c311349ec71bb69399ffc4092853e7d8a86c1ca39ddb4cd129e775c19d985793", + "signature": "c311349ec71bb69399ffc4092853e7d8a86c1ca39ddb4cd129e775c19d985793", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/seq.d.ts": { + "version": "3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd", + "signature": "3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/string.d.ts": { + "version": "4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a", + "signature": "4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/util.d.ts": { + "version": "2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5", + "signature": "2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/index.d.ts": { + "version": "0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8", + "signature": "0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8", + "affectsGlobalScope": true + }, + "../node_modules/@types/minimist/index.d.ts": { + "version": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "signature": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "affectsGlobalScope": false + }, + "../node_modules/@types/normalize-package-data/index.d.ts": { + "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "affectsGlobalScope": false + }, + "../node_modules/@types/parse-json/index.d.ts": { + "version": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "signature": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "affectsGlobalScope": false + }, + "../node_modules/@types/prettier/index.d.ts": { + "version": "c4efa4df1372e991aa44b70b8d87b48865d94ecd26e76025854f2273df155253", + "signature": "c4efa4df1372e991aa44b70b8d87b48865d94ecd26e76025854f2273df155253", + "affectsGlobalScope": false + }, + "../node_modules/@types/stack-utils/index.d.ts": { + "version": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57", + "signature": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57", + "affectsGlobalScope": false + }, + "../node_modules/@types/yargs-parser/index.d.ts": { + "version": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "signature": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "affectsGlobalScope": false + }, + "../node_modules/@types/yargs/index.d.ts": { + "version": "19a1bd57c2b3dd10bc4ae33eaa9e88f0f067858e32b7765b7e9d38138cd07f30", + "signature": "19a1bd57c2b3dd10bc4ae33eaa9e88f0f067858e32b7765b7e9d38138cd07f30", + "affectsGlobalScope": false + } + }, + "options": { + "moduleResolution": 2, + "module": 1, + "target": 6, + "outDir": "./cjs", + "rootDir": "../src", + "declarationDir": "./", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noImplicitAny": false, + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "baseUrl": "..", + "typeRoots": [ + "../types", + "../node_modules/@types" + ], + "paths": { + "@solana/web3.js": [ + "./node_modules/@solana/web3.js/lib" + ] + }, + "pathsBasePath": "/home/armaniferrante/Documents/code/src/github.com/project-serum/anchor/ts", + "project": "../tsconfig.cjs.json", + "configFilePath": "../tsconfig.cjs.json" + }, + "referencedMap": { + "../node_modules/@babel/parser/typings/babel-parser.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/@types/node/index.d.ts", + "../types/buffer-layout/index.d.ts" + ], + "../node_modules/@solana/web3.js/lib/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/babel__core/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts", + "../node_modules/@types/babel__generator/index.d.ts", + "../node_modules/@types/babel__template/index.d.ts", + "../node_modules/@types/babel__traverse/index.d.ts" + ], + "../node_modules/@types/babel__generator/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__template/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__traverse/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/bn.js/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/bs58/index.d.ts": [ + "../node_modules/base-x/src/index.d.ts" + ], + "../node_modules/@types/connect/index.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/express-serve-static-core/index.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/qs/index.d.ts", + "../node_modules/@types/range-parser/index.d.ts" + ], + "../node_modules/@types/graceful-fs/index.d.ts": [ + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/istanbul-lib-report/index.d.ts": [ + "../node_modules/@types/istanbul-lib-coverage/index.d.ts" + ], + "../node_modules/@types/istanbul-reports/index.d.ts": [ + "../node_modules/@types/istanbul-lib-report/index.d.ts" + ], + "../node_modules/@types/jest/index.d.ts": [ + "../node_modules/jest-diff/build/index.d.ts", + "../node_modules/pretty-format/build/index.d.ts" + ], + "../node_modules/@types/lodash/common/array.d.ts": [ + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/collection.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/common.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/date.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/function.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/lang.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/math.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/number.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/object.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/seq.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/string.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/util.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/index.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts" + ], + "../node_modules/@types/node/assert/strict.d.ts": [ + "../node_modules/@types/node/assert.d.ts" + ], + "../node_modules/@types/node/base.d.ts": [ + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../node_modules/@types/node/child_process.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/cluster.d.ts": [ + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/console.d.ts": [ + "../node_modules/@types/node/util.d.ts" + ], + "../node_modules/@types/node/constants.d.ts": [ + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/os.d.ts" + ], + "../node_modules/@types/node/crypto.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/dgram.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/dns.d.ts": [ + "../node_modules/@types/node/dns/promises.d.ts" + ], + "../node_modules/@types/node/dns/promises.d.ts": [ + "../node_modules/@types/node/dns.d.ts" + ], + "../node_modules/@types/node/domain.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/events.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/fs.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/fs/promises.d.ts": [ + "../node_modules/@types/node/fs.d.ts" + ], + "../node_modules/@types/node/http.d.ts": [ + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/http2.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/https.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/index.d.ts": [ + "../node_modules/@types/node/base.d.ts" + ], + "../node_modules/@types/node/inspector.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/module.d.ts": [ + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/net.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/perf_hooks.d.ts": [ + "../node_modules/@types/node/async_hooks.d.ts" + ], + "../node_modules/@types/node/process.d.ts": [ + "../node_modules/@types/node/tty.d.ts" + ], + "../node_modules/@types/node/readline.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/repl.d.ts": [ + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/stream.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream/promises.d.ts" + ], + "../node_modules/@types/node/stream/promises.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/timers/promises.d.ts": [ + "../node_modules/@types/node/timers.d.ts" + ], + "../node_modules/@types/node/tls.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/ts3.6/base.d.ts": [ + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts" + ], + "../node_modules/@types/node/tty.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/url.d.ts": [ + "../node_modules/@types/node/querystring.d.ts" + ], + "../node_modules/@types/node/v8.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/worker_threads.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/zlib.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/yargs/index.d.ts": [ + "../node_modules/@types/yargs-parser/index.d.ts" + ], + "../node_modules/base-x/src/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/dot-case/dist/index.d.ts": [ + "../node_modules/no-case/dist/index.d.ts" + ], + "../node_modules/jest-diff/build/diffLines.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/index.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/diffLines.d.ts", + "../node_modules/jest-diff/build/printDiffs.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/printDiffs.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/pretty-format/build/index.d.ts": [ + "../node_modules/pretty-format/build/types.d.ts" + ], + "../node_modules/snake-case/dist/index.d.ts": [ + "../node_modules/dot-case/dist/index.d.ts" + ], + "../src/coder/accounts.ts": [ + "../node_modules/js-sha256/index.d.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/common.ts": [ + "../node_modules/js-sha256/index.d.ts", + "../node_modules/snake-case/dist/index.d.ts", + "../src/error.ts", + "../src/idl.ts" + ], + "../src/coder/event.ts": [ + "../node_modules/base64-js/index.d.ts", + "../node_modules/js-sha256/index.d.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../src/program/event.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/idl.ts": [ + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../src/error.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/index.ts": [ + "../src/coder/accounts.ts", + "../src/coder/common.ts", + "../src/coder/event.ts", + "../src/coder/instruction.ts", + "../src/coder/state.ts", + "../src/coder/types.ts", + "../src/idl.ts" + ], + "../src/coder/instruction.ts": [ + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bs58/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../src/coder/common.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/state.ts": [ + "../node_modules/js-sha256/index.d.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../src/utils/features.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/types.ts": [ + "../src/coder/idl.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/idl.ts": [ + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../src/coder/index.ts", + "../src/coder/instruction.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/index.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts", + "../src/utils/index.ts", + "../src/workspace.ts" + ], + "../src/program/common.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts" + ], + "../src/program/context.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/common.ts" + ], + "../src/program/event.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../src/coder/index.ts", + "../src/provider.ts" + ], + "../src/program/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/pako/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/program/event.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts", + "../src/utils/bytes/index.ts" + ], + "../src/program/namespace/account.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bs58/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/provider.ts", + "../src/utils/pubkey.ts" + ], + "../src/program/namespace/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/namespace/account.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/simulate.ts", + "../src/program/namespace/state.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/instruction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/context.ts" + ], + "../src/program/namespace/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/program/context.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/simulate.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/state.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/namespace/index.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts", + "../src/utils/pubkey.ts" + ], + "../src/program/namespace/transaction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts", + "../src/program/namespace/instruction.ts" + ], + "../src/provider.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/utils/common.ts" + ], + "../src/utils/bytes/base64.ts": [ + "../node_modules/base64-js/index.d.ts" + ], + "../src/utils/bytes/bs58.ts": [ + "../node_modules/@types/bs58/index.d.ts" + ], + "../src/utils/bytes/index.ts": [ + "../src/utils/bytes/base64.ts", + "../src/utils/bytes/bs58.ts", + "../src/utils/bytes/hex.ts", + "../src/utils/bytes/utf8.ts" + ], + "../src/utils/index.ts": [ + "../src/utils/bytes/index.ts", + "../src/utils/features.ts", + "../src/utils/pubkey.ts", + "../src/utils/rpc.ts", + "../src/utils/sha256.ts", + "../src/utils/token.ts" + ], + "../src/utils/pubkey.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/js-sha256/index.d.ts", + "../src/program/common.ts" + ], + "../src/utils/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../src/program/common.ts", + "../src/provider.ts" + ], + "../src/utils/sha256.ts": [ + "../node_modules/js-sha256/index.d.ts" + ], + "../src/utils/token.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/workspace.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/toml/index.d.ts", + "../src/idl.ts", + "../src/program/index.ts", + "../src/utils/common.ts" + ] + }, + "exportedModulesMap": { + "../node_modules/@babel/parser/typings/babel-parser.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/@types/node/index.d.ts", + "../types/buffer-layout/index.d.ts" + ], + "../node_modules/@solana/web3.js/lib/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/babel__core/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts", + "../node_modules/@types/babel__generator/index.d.ts", + "../node_modules/@types/babel__template/index.d.ts", + "../node_modules/@types/babel__traverse/index.d.ts" + ], + "../node_modules/@types/babel__generator/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__template/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__traverse/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/bn.js/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/bs58/index.d.ts": [ + "../node_modules/base-x/src/index.d.ts" + ], + "../node_modules/@types/connect/index.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/express-serve-static-core/index.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/qs/index.d.ts", + "../node_modules/@types/range-parser/index.d.ts" + ], + "../node_modules/@types/graceful-fs/index.d.ts": [ + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/istanbul-lib-report/index.d.ts": [ + "../node_modules/@types/istanbul-lib-coverage/index.d.ts" + ], + "../node_modules/@types/istanbul-reports/index.d.ts": [ + "../node_modules/@types/istanbul-lib-report/index.d.ts" + ], + "../node_modules/@types/jest/index.d.ts": [ + "../node_modules/jest-diff/build/index.d.ts", + "../node_modules/pretty-format/build/index.d.ts" + ], + "../node_modules/@types/lodash/common/array.d.ts": [ + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/collection.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/common.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/date.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/function.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/lang.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/math.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/number.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/object.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/seq.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/string.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/util.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/index.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts" + ], + "../node_modules/@types/node/assert/strict.d.ts": [ + "../node_modules/@types/node/assert.d.ts" + ], + "../node_modules/@types/node/base.d.ts": [ + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../node_modules/@types/node/child_process.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/cluster.d.ts": [ + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/console.d.ts": [ + "../node_modules/@types/node/util.d.ts" + ], + "../node_modules/@types/node/constants.d.ts": [ + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/os.d.ts" + ], + "../node_modules/@types/node/crypto.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/dgram.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/dns.d.ts": [ + "../node_modules/@types/node/dns/promises.d.ts" + ], + "../node_modules/@types/node/dns/promises.d.ts": [ + "../node_modules/@types/node/dns.d.ts" + ], + "../node_modules/@types/node/domain.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/events.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/fs.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/fs/promises.d.ts": [ + "../node_modules/@types/node/fs.d.ts" + ], + "../node_modules/@types/node/http.d.ts": [ + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/http2.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/https.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/index.d.ts": [ + "../node_modules/@types/node/base.d.ts" + ], + "../node_modules/@types/node/inspector.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/module.d.ts": [ + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/net.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/perf_hooks.d.ts": [ + "../node_modules/@types/node/async_hooks.d.ts" + ], + "../node_modules/@types/node/process.d.ts": [ + "../node_modules/@types/node/tty.d.ts" + ], + "../node_modules/@types/node/readline.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/repl.d.ts": [ + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/stream.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream/promises.d.ts" + ], + "../node_modules/@types/node/stream/promises.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/timers/promises.d.ts": [ + "../node_modules/@types/node/timers.d.ts" + ], + "../node_modules/@types/node/tls.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/ts3.6/base.d.ts": [ + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts" + ], + "../node_modules/@types/node/tty.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/url.d.ts": [ + "../node_modules/@types/node/querystring.d.ts" + ], + "../node_modules/@types/node/v8.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/worker_threads.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/zlib.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/yargs/index.d.ts": [ + "../node_modules/@types/yargs-parser/index.d.ts" + ], + "../node_modules/base-x/src/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/dot-case/dist/index.d.ts": [ + "../node_modules/no-case/dist/index.d.ts" + ], + "../node_modules/jest-diff/build/diffLines.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/index.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/diffLines.d.ts", + "../node_modules/jest-diff/build/printDiffs.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/printDiffs.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/pretty-format/build/index.d.ts": [ + "../node_modules/pretty-format/build/types.d.ts" + ], + "../node_modules/snake-case/dist/index.d.ts": [ + "../node_modules/dot-case/dist/index.d.ts" + ], + "../src/coder/accounts.ts": [ + "../src/idl.ts" + ], + "../src/coder/common.ts": [ + "../src/idl.ts" + ], + "../src/coder/event.ts": [ + "../src/idl.ts", + "../src/program/event.ts" + ], + "../src/coder/idl.ts": [ + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/index.ts": [ + "../src/coder/accounts.ts", + "../src/coder/common.ts", + "../src/coder/event.ts", + "../src/coder/instruction.ts", + "../src/coder/state.ts", + "../src/coder/types.ts", + "../src/idl.ts" + ], + "../src/coder/instruction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts" + ], + "../src/coder/state.ts": [ + "../src/idl.ts" + ], + "../src/coder/types.ts": [ + "../src/idl.ts" + ], + "../src/idl.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../src/coder/index.ts", + "../src/coder/instruction.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/index.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts", + "../src/utils/index.ts", + "../src/workspace.ts" + ], + "../src/program/common.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts" + ], + "../src/program/context.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/common.ts" + ], + "../src/program/event.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/provider.ts" + ], + "../src/program/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts" + ], + "../src/program/namespace/account.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/provider.ts" + ], + "../src/program/namespace/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/namespace/account.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/simulate.ts", + "../src/program/namespace/state.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/instruction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts" + ], + "../src/program/namespace/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/simulate.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/event.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/state.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts" + ], + "../src/program/namespace/transaction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/namespace/instruction.ts" + ], + "../src/provider.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/utils/bytes/index.ts": [ + "../src/utils/bytes/base64.ts", + "../src/utils/bytes/bs58.ts", + "../src/utils/bytes/hex.ts", + "../src/utils/bytes/utf8.ts" + ], + "../src/utils/index.ts": [ + "../src/utils/bytes/index.ts", + "../src/utils/features.ts", + "../src/utils/pubkey.ts", + "../src/utils/rpc.ts", + "../src/utils/sha256.ts", + "../src/utils/token.ts" + ], + "../src/utils/pubkey.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/program/common.ts" + ], + "../src/utils/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/program/common.ts", + "../src/provider.ts" + ], + "../src/utils/token.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts", + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/babel__core/index.d.ts", + "../node_modules/@types/babel__generator/index.d.ts", + "../node_modules/@types/babel__template/index.d.ts", + "../node_modules/@types/babel__traverse/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/@types/bs58/index.d.ts", + "../node_modules/@types/connect/index.d.ts", + "../node_modules/@types/express-serve-static-core/index.d.ts", + "../node_modules/@types/graceful-fs/index.d.ts", + "../node_modules/@types/istanbul-lib-coverage/index.d.ts", + "../node_modules/@types/istanbul-lib-report/index.d.ts", + "../node_modules/@types/istanbul-reports/index.d.ts", + "../node_modules/@types/jest/index.d.ts", + "../node_modules/@types/json-schema/index.d.ts", + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts", + "../node_modules/@types/minimist/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/base.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts", + "../node_modules/@types/normalize-package-data/index.d.ts", + "../node_modules/@types/pako/index.d.ts", + "../node_modules/@types/parse-json/index.d.ts", + "../node_modules/@types/prettier/index.d.ts", + "../node_modules/@types/qs/index.d.ts", + "../node_modules/@types/range-parser/index.d.ts", + "../node_modules/@types/stack-utils/index.d.ts", + "../node_modules/@types/yargs-parser/index.d.ts", + "../node_modules/@types/yargs/index.d.ts", + "../node_modules/base-x/src/index.d.ts", + "../node_modules/base64-js/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/dot-case/dist/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/diffLines.d.ts", + "../node_modules/jest-diff/build/index.d.ts", + "../node_modules/jest-diff/build/printDiffs.d.ts", + "../node_modules/jest-diff/build/types.d.ts", + "../node_modules/js-sha256/index.d.ts", + "../node_modules/no-case/dist/index.d.ts", + "../node_modules/pretty-format/build/index.d.ts", + "../node_modules/pretty-format/build/types.d.ts", + "../node_modules/snake-case/dist/index.d.ts", + "../node_modules/toml/index.d.ts", + "../node_modules/typescript/lib/lib.dom.d.ts", + "../node_modules/typescript/lib/lib.dom.iterable.d.ts", + "../node_modules/typescript/lib/lib.es2015.collection.d.ts", + "../node_modules/typescript/lib/lib.es2015.core.d.ts", + "../node_modules/typescript/lib/lib.es2015.d.ts", + "../node_modules/typescript/lib/lib.es2015.generator.d.ts", + "../node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "../node_modules/typescript/lib/lib.es2015.promise.d.ts", + "../node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "../node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "../node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "../node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "../node_modules/typescript/lib/lib.es2016.d.ts", + "../node_modules/typescript/lib/lib.es2017.d.ts", + "../node_modules/typescript/lib/lib.es2017.intl.d.ts", + "../node_modules/typescript/lib/lib.es2017.object.d.ts", + "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "../node_modules/typescript/lib/lib.es2017.string.d.ts", + "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "../node_modules/typescript/lib/lib.es2018.d.ts", + "../node_modules/typescript/lib/lib.es2018.intl.d.ts", + "../node_modules/typescript/lib/lib.es2018.promise.d.ts", + "../node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "../node_modules/typescript/lib/lib.es2019.array.d.ts", + "../node_modules/typescript/lib/lib.es2019.d.ts", + "../node_modules/typescript/lib/lib.es2019.full.d.ts", + "../node_modules/typescript/lib/lib.es2019.object.d.ts", + "../node_modules/typescript/lib/lib.es2019.string.d.ts", + "../node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "../node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "../node_modules/typescript/lib/lib.es5.d.ts", + "../node_modules/typescript/lib/lib.esnext.intl.d.ts", + "../node_modules/typescript/lib/lib.scripthost.d.ts", + "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts", + "../src/coder/accounts.ts", + "../src/coder/common.ts", + "../src/coder/event.ts", + "../src/coder/idl.ts", + "../src/coder/index.ts", + "../src/coder/instruction.ts", + "../src/coder/state.ts", + "../src/coder/types.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/index.ts", + "../src/program/namespace/account.ts", + "../src/program/namespace/index.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/simulate.ts", + "../src/program/namespace/state.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts", + "../src/utils/bytes/base64.ts", + "../src/utils/bytes/bs58.ts", + "../src/utils/bytes/hex.ts", + "../src/utils/bytes/index.ts", + "../src/utils/bytes/utf8.ts", + "../src/utils/common.ts", + "../src/utils/features.ts", + "../src/utils/index.ts", + "../src/utils/pubkey.ts", + "../src/utils/rpc.ts", + "../src/utils/sha256.ts", + "../src/utils/token.ts", + "../src/workspace.ts", + "../types/buffer-layout/index.d.ts" + ] + }, + "version": "4.1.3" +} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/tsconfig.tsbuildinfo b/tests/node_modules/@project-serum/anchor/dist/tsconfig.tsbuildinfo new file mode 100644 index 0000000..9c1c402 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/tsconfig.tsbuildinfo @@ -0,0 +1,2420 @@ +{ + "program": { + "fileInfos": { + "../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d", + "signature": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.d.ts": { + "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2016.d.ts": { + "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2017.d.ts": { + "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2018.d.ts": { + "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.es2019.d.ts": { + "version": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "signature": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "affectsGlobalScope": false + }, + "../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84", + "signature": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.dom.iterable.d.ts": { + "version": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "signature": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481", + "signature": "7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd", + "signature": "097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.core.d.ts": { + "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.collection.d.ts": { + "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.generator.d.ts": { + "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.iterable.d.ts": { + "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.promise.d.ts": { + "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.proxy.d.ts": { + "version": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e", + "signature": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.reflect.d.ts": { + "version": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d", + "signature": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.symbol.d.ts": { + "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { + "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2016.array.include.d.ts": { + "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.object.d.ts": { + "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { + "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.string.d.ts": { + "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.intl.d.ts": { + "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { + "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": { + "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": { + "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.intl.d.ts": { + "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.promise.d.ts": { + "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2018.regexp.d.ts": { + "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.array.d.ts": { + "version": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "signature": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.object.d.ts": { + "version": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "signature": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.string.d.ts": { + "version": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "signature": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.symbol.d.ts": { + "version": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "signature": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2020.bigint.d.ts": { + "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.esnext.intl.d.ts": { + "version": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd", + "signature": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd", + "affectsGlobalScope": true + }, + "../node_modules/typescript/lib/lib.es2019.full.d.ts": { + "version": "1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f", + "signature": "1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f", + "affectsGlobalScope": false + }, + "../src/error.ts": { + "version": "b50ad68cdd816e3065babe00434488882c00ad94b8f4e85e80fdfdc6aeebce2d", + "signature": "1fe36cefc6767342bf6f0959697a10bad046352b392f5b20dce3773ae825eeed", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/assert/strict.d.ts": { + "version": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "signature": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/globals.d.ts": { + "version": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "signature": "5402314c88d0127f63f94a0272f79e04ea0fc010ff6da6613807504c4163a1ad", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/async_hooks.d.ts": { + "version": "c9e8a340da877b05a52525554aa255b3f44958c7f6748ebf5cbe0bfbe6766878", + "signature": "c9e8a340da877b05a52525554aa255b3f44958c7f6748ebf5cbe0bfbe6766878", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/buffer.d.ts": { + "version": "a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b", + "signature": "a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/child_process.d.ts": { + "version": "a668dfae917097b30fc29bbebeeb869cee22529f2aa9976cea03c7e834a1b841", + "signature": "a668dfae917097b30fc29bbebeeb869cee22529f2aa9976cea03c7e834a1b841", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/cluster.d.ts": { + "version": "04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef", + "signature": "04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/console.d.ts": { + "version": "c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870", + "signature": "c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/constants.d.ts": { + "version": "45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491", + "signature": "45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/crypto.d.ts": { + "version": "51a77d65fbadc93dcdf454ea1d94bd9f1f146008d890bea4f168dd397192b9fb", + "signature": "51a77d65fbadc93dcdf454ea1d94bd9f1f146008d890bea4f168dd397192b9fb", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dgram.d.ts": { + "version": "797a9d37eb1f76143311c3f0a186ce5c0d8735e94c0ca08ff8712a876c9b4f9e", + "signature": "797a9d37eb1f76143311c3f0a186ce5c0d8735e94c0ca08ff8712a876c9b4f9e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dns.d.ts": { + "version": "ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28", + "signature": "ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/dns/promises.d.ts": { + "version": "64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753", + "signature": "64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/domain.d.ts": { + "version": "2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5", + "signature": "2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/events.d.ts": { + "version": "36ba0e764ace4fb55e6165c5f33f2826f88b1d3767f7ec658fe2f6c85ac5e776", + "signature": "36ba0e764ace4fb55e6165c5f33f2826f88b1d3767f7ec658fe2f6c85ac5e776", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/fs.d.ts": { + "version": "d3315298050252531e7db9046296ca2162fa5218a85b10a62ed79140e3822e3c", + "signature": "d3315298050252531e7db9046296ca2162fa5218a85b10a62ed79140e3822e3c", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/fs/promises.d.ts": { + "version": "bdaf554ae2d9d09e2a42f58a29ef7f80e5b5c1d7b96bfb717243dc91a477216e", + "signature": "bdaf554ae2d9d09e2a42f58a29ef7f80e5b5c1d7b96bfb717243dc91a477216e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/http.d.ts": { + "version": "bd311ff12ac011f5531edd217189606e7a697376d6109e8a18361358f6249b46", + "signature": "bd311ff12ac011f5531edd217189606e7a697376d6109e8a18361358f6249b46", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/http2.d.ts": { + "version": "a870e564e578dccc7b34018d6919f9466bae462b4bafc3449ca63a2331ac27c5", + "signature": "a870e564e578dccc7b34018d6919f9466bae462b4bafc3449ca63a2331ac27c5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/https.d.ts": { + "version": "13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452", + "signature": "13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/inspector.d.ts": { + "version": "42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8", + "signature": "42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/module.d.ts": { + "version": "0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d", + "signature": "0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/net.d.ts": { + "version": "1eaf8fecdae37cc4c85f496d2bdb9e8d46c21b3643b7e27d3646a330585515a5", + "signature": "1eaf8fecdae37cc4c85f496d2bdb9e8d46c21b3643b7e27d3646a330585515a5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/os.d.ts": { + "version": "69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16", + "signature": "69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/path.d.ts": { + "version": "21e64a125f65dff99cc3ed366c96e922b90daed343eb52ecdace5f220401dcda", + "signature": "21e64a125f65dff99cc3ed366c96e922b90daed343eb52ecdace5f220401dcda", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/perf_hooks.d.ts": { + "version": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "signature": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/process.d.ts": { + "version": "61977e8f4c042abd392645828c90afd1b551a6fd32c51b93717c68003ce7c983", + "signature": "61977e8f4c042abd392645828c90afd1b551a6fd32c51b93717c68003ce7c983", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/punycode.d.ts": { + "version": "7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6", + "signature": "7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/querystring.d.ts": { + "version": "992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58", + "signature": "992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/readline.d.ts": { + "version": "3b790d08129aca55fd5ae1672d1d26594147ac0d5f2eedc30c7575eb18daef7e", + "signature": "3b790d08129aca55fd5ae1672d1d26594147ac0d5f2eedc30c7575eb18daef7e", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/repl.d.ts": { + "version": "64535caf208a02420d2d04eb2029269efedd11eb8597ada0d5e6f3d54ec663ae", + "signature": "64535caf208a02420d2d04eb2029269efedd11eb8597ada0d5e6f3d54ec663ae", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/stream.d.ts": { + "version": "3b02b1e3c3a6730d79e2c8652f3be6a7caef1a604b9c5103abbbcea921694be1", + "signature": "3b02b1e3c3a6730d79e2c8652f3be6a7caef1a604b9c5103abbbcea921694be1", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/stream/promises.d.ts": { + "version": "fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6", + "signature": "fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/string_decoder.d.ts": { + "version": "4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50", + "signature": "4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/timers.d.ts": { + "version": "f49709e8c096b05aca0674d39f471aa05261de7c756df9abdf4a53ed0fa98901", + "signature": "f49709e8c096b05aca0674d39f471aa05261de7c756df9abdf4a53ed0fa98901", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/timers/promises.d.ts": { + "version": "baca27d1de400e027cdc70217ca73e414002baef5798aa24a921097c20066fa1", + "signature": "baca27d1de400e027cdc70217ca73e414002baef5798aa24a921097c20066fa1", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/tls.d.ts": { + "version": "f89a6d56f0267f6e73c707f8a89d2f38e9928e10bfa505f39a4f4bf954093aee", + "signature": "f89a6d56f0267f6e73c707f8a89d2f38e9928e10bfa505f39a4f4bf954093aee", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/trace_events.d.ts": { + "version": "7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4", + "signature": "7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/tty.d.ts": { + "version": "9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5", + "signature": "9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/url.d.ts": { + "version": "dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9", + "signature": "dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/util.d.ts": { + "version": "e649840284bab8c4d09cadc125cd7fbde7529690cc1a0881872b6a9cd202819b", + "signature": "e649840284bab8c4d09cadc125cd7fbde7529690cc1a0881872b6a9cd202819b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/v8.d.ts": { + "version": "a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d", + "signature": "a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/vm.d.ts": { + "version": "1aa7dbace2b7b2ef60897dcd4f66252ee6ba85e594ded8918c9acdcecda1896c", + "signature": "1aa7dbace2b7b2ef60897dcd4f66252ee6ba85e594ded8918c9acdcecda1896c", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/worker_threads.d.ts": { + "version": "1535aeef6e803bc8c784b14c99bd214dba9223df4914f3dee616af351ab46042", + "signature": "1535aeef6e803bc8c784b14c99bd214dba9223df4914f3dee616af351ab46042", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/zlib.d.ts": { + "version": "4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875", + "signature": "4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/globals.global.d.ts": { + "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "affectsGlobalScope": true + }, + "../node_modules/@types/node/wasi.d.ts": { + "version": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "signature": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/ts3.6/base.d.ts": { + "version": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "signature": "210ef68f34baca2a4499c07a51f05d51b4f0ef01d64efea3017cb3bc31c37e33", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/assert.d.ts": { + "version": "b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76", + "signature": "b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/base.d.ts": { + "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "affectsGlobalScope": false + }, + "../node_modules/@types/node/index.d.ts": { + "version": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "signature": "6c9c7e459e013ddf52c70b90f88bbdd925e483ef984d80f9bffb501029974e82", + "affectsGlobalScope": false + }, + "../node_modules/@solana/web3.js/lib/index.d.ts": { + "version": "b892606323166b0cfe878d78ff76f1a9da4ca97659d1c76752fd4b58959ebafa", + "signature": "b892606323166b0cfe878d78ff76f1a9da4ca97659d1c76752fd4b58959ebafa", + "affectsGlobalScope": false + }, + "../node_modules/@types/bn.js/index.d.ts": { + "version": "bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5", + "signature": "bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5", + "affectsGlobalScope": false + }, + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts": { + "version": "0cc80e64c15a85707e6f34f02d706a8803d85ad035707b2bc73f264583925032", + "signature": "0cc80e64c15a85707e6f34f02d706a8803d85ad035707b2bc73f264583925032", + "affectsGlobalScope": false + }, + "../src/idl.ts": { + "version": "e1b7bbe7af11c30f479349786db72fc4716421f15e2130d12eb8afcede8fa396", + "signature": "1614a1ca6221d0dcc9bb4df2e280edd49e619eed0f826ea123281af36b408cd9", + "affectsGlobalScope": false + }, + "../src/utils/common.ts": { + "version": "59f158073b53798c1a71d0d1ffd1d7ebeebebf181aa1b15795cfaa13127e924c", + "signature": "afe9119a49a42f00eb2494982677e30e6c9ee79a1342ea0fd611ef0b455ae5e1", + "affectsGlobalScope": false + }, + "../src/provider.ts": { + "version": "771c9605070c3ec9552bb2f4a030405e3b687f4d9e405f25ab61995a5fbb01d7", + "signature": "6ac20c77f7ae3491bc2d708c570d46feb43cbf3e4226e80da202aef6fd5cd257", + "affectsGlobalScope": false + }, + "../node_modules/camelcase/index.d.ts": { + "version": "b8e7261f41dd775524077306a69c01796bd5a2a742c7338e6607ff4e689bc356", + "signature": "b8e7261f41dd775524077306a69c01796bd5a2a742c7338e6607ff4e689bc356", + "affectsGlobalScope": false + }, + "../node_modules/base-x/src/index.d.ts": { + "version": "e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1", + "signature": "e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1", + "affectsGlobalScope": false + }, + "../node_modules/@types/bs58/index.d.ts": { + "version": "5cbc27193321e6ba10f4e9f3c5519649d9e2716cf103efd7eaa7a89e0f8ed1d4", + "signature": "5cbc27193321e6ba10f4e9f3c5519649d9e2716cf103efd7eaa7a89e0f8ed1d4", + "affectsGlobalScope": false + }, + "../src/coder/idl.ts": { + "version": "7b5f17f9b8990f26bafde9c42a0b6846cc2f7acc1183d872acd1bb356967de9e", + "signature": "aa639fe52eaf2c08061456ac327be72fe9d41b08800ef1b699330e100fd9ed72", + "affectsGlobalScope": false + }, + "../node_modules/no-case/dist/index.d.ts": { + "version": "b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37", + "signature": "b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37", + "affectsGlobalScope": false + }, + "../node_modules/dot-case/dist/index.d.ts": { + "version": "062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c", + "signature": "062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c", + "affectsGlobalScope": false + }, + "../node_modules/snake-case/dist/index.d.ts": { + "version": "74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17", + "signature": "74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17", + "affectsGlobalScope": false + }, + "../node_modules/js-sha256/index.d.ts": { + "version": "0afbe91142eb631d6f31be624cf8a550b03736bfd22b0f309405a6fe4d4c9517", + "signature": "0afbe91142eb631d6f31be624cf8a550b03736bfd22b0f309405a6fe4d4c9517", + "affectsGlobalScope": false + }, + "../src/coder/common.ts": { + "version": "71e2cb372dfd2abc19362e4895b86f61bbff54a0673c73631baf6e9ff646702c", + "signature": "42942638bbd3646027c2f27025148f8b8c675be73319c4b0f4c98d55a52d8789", + "affectsGlobalScope": false + }, + "../src/coder/instruction.ts": { + "version": "76aa880a20968f75bc9b46ce0f2a6424173bf893fda30524d243c7d75a660131", + "signature": "ce423291d1a4701149f825d76baab5b009daeeef70c6ce7c31363e27dc4a75c8", + "affectsGlobalScope": false + }, + "../src/coder/accounts.ts": { + "version": "cc447b548718d5aa275b40cdf7b7822963ddedcd8870e94a79487ba131c23be9", + "signature": "4064f4d87306414dd6b4aea958e46a1e659c9f3fe231eec400d0948441d76682", + "affectsGlobalScope": false + }, + "../src/coder/types.ts": { + "version": "9ac141925fe514633442e0914cc7259c1dd7fbf93e2b1ed39463be1923b4ef0a", + "signature": "0c2d187ce8b461daf1036c391d92072f6101331f97d8545892b0e247c2833b38", + "affectsGlobalScope": false + }, + "../node_modules/base64-js/index.d.ts": { + "version": "96da6c81cd788939a7cf6546ea1f65ab5ca38952e5bd7d8c284bfe1f3c22dce7", + "signature": "96da6c81cd788939a7cf6546ea1f65ab5ca38952e5bd7d8c284bfe1f3c22dce7", + "affectsGlobalScope": false + }, + "../src/program/event.ts": { + "version": "48c85a40fa7b3c414b0c72b0e2e3b7e31a341f12e8dc8ec3d3de1e53bca2a1fe", + "signature": "a53c254b535c8a6bb956654956a8cac22d36ebfd0865702c7b65d7fcbcde64dc", + "affectsGlobalScope": false + }, + "../src/coder/event.ts": { + "version": "cb4ad386bfe7f4a8b41841c092ef62220c577b063f14a6570e3523c17862fb8c", + "signature": "5a44f0efaf82fe9f865f61b2020c9f78f133b173fff5a79292096a8f8914910f", + "affectsGlobalScope": false + }, + "../src/utils/features.ts": { + "version": "5ddc99b15ae623edbdfca64997e17721ab8a475e4bb9170dd50e34401c478fb8", + "signature": "291b47b629e4c15e96bacb8d1f707573e72fedbb0fcab43f729e5f9d73560c3c", + "affectsGlobalScope": false + }, + "../src/coder/state.ts": { + "version": "b1079a8e1b361e7c2ede7f976b4003d7d495b60e6154c6e9f4c98636aeb203c8", + "signature": "afce3229233d36eb877e9bf4f5f1c7ee828cdda75f0d108ff0b4dbc2dbfe17f3", + "affectsGlobalScope": false + }, + "../src/coder/index.ts": { + "version": "70dbea49080689cd6728ade497012a08f0cfa67083ad4bce0d0488889fbc5431", + "signature": "51f475cb0a4a91a4359429c7eb9e2871270a6b990a2473eed846626fd2336058", + "affectsGlobalScope": false + }, + "../node_modules/toml/index.d.ts": { + "version": "a7fe7e88c50608567af53c49d3c59ea5f33bf5f59126d67b2a25f85eb41297ba", + "signature": "a7fe7e88c50608567af53c49d3c59ea5f33bf5f59126d67b2a25f85eb41297ba", + "affectsGlobalScope": false + }, + "../node_modules/@types/pako/index.d.ts": { + "version": "ac8256962829db28179e5b4ee97f4a0b27d85f219ad5c7b03b375673fadddd59", + "signature": "ac8256962829db28179e5b4ee97f4a0b27d85f219ad5c7b03b375673fadddd59", + "affectsGlobalScope": false + }, + "../node_modules/eventemitter3/index.d.ts": { + "version": "b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968", + "signature": "b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968", + "affectsGlobalScope": false + }, + "../src/program/context.ts": { + "version": "b50c07d7c78ce997cd24b96da5bb4b8d63343bf6ef24679f366cfaddc28212cf", + "signature": "e62fd19d48077f1de0be67b0530f5623ba9eb1b4e7f8c3a1d1ccb9295e58ba70", + "affectsGlobalScope": false + }, + "../src/program/common.ts": { + "version": "11ba9ad8904b00ff94b210d80ba02df844075360030b40854d1f0a146f12e726", + "signature": "e6ff39c5eb69d9f01557f478a7d0d2bb7fdbf7c03770b9632a6a2820cb89b7f9", + "affectsGlobalScope": false + }, + "../src/utils/pubkey.ts": { + "version": "633341637271b371afebe2423e2ba079df8aeadf64aa5363363a8d519d4e12a5", + "signature": "6f6e0910e0f211757febf2f3656d48d048f48097e444d2c9435aae4dd9678964", + "affectsGlobalScope": false + }, + "../src/program/namespace/instruction.ts": { + "version": "b8c5ada0ddd825526fae64b2c7048086e2f1caecb3fc289c67e9fa883ba154b2", + "signature": "faebee35452b1b6c08d54169f027200ca6c5a07477e19cfec43ef0a7c1350779", + "affectsGlobalScope": false + }, + "../src/program/namespace/transaction.ts": { + "version": "7eab8b19671f1daf640c9ecc2db36b073054b5796308dcc83df9ed8c791a320d", + "signature": "070ec7f6c859fc28cfcb979f1f29c3abdb888fbdb34cd9f8bca821d6dbda1810", + "affectsGlobalScope": false + }, + "../src/program/namespace/rpc.ts": { + "version": "e5f0a962eaabeb844919ba827996cb2b15558bfa392c04ab50e2c450bbd31881", + "signature": "a0b7830e8a09fde6726e46943a13b4c743e18faf46390df0fd779fb9413d31bf", + "affectsGlobalScope": false + }, + "../src/program/namespace/state.ts": { + "version": "68e9494ffdd44a185523aa663c600ea645787cb24cc23e6222caa6ba6403c604", + "signature": "6218f145c81ad3dc715760dffc687c47c12e7deb9ea92337efed3eb025849b58", + "affectsGlobalScope": false + }, + "../src/program/namespace/account.ts": { + "version": "53e070164af18725a3bf81efa08e6b49fe837d52bd46edf54d5e9000e2c2f41a", + "signature": "b4a4a1b442872ac195e970710000a5643a7abce88b24b7ab909717dd1d8ac643", + "affectsGlobalScope": false + }, + "../src/program/namespace/simulate.ts": { + "version": "08df74b9dab9f39aba50127225782ab1602a5ffdadc929cfa20f98ca247d7966", + "signature": "bb4e4bf30872ce790fcb1cb5a95a01847e20d3d69268b2ff6eeafbd6b1987ce3", + "affectsGlobalScope": false + }, + "../src/program/namespace/index.ts": { + "version": "1f5e9ab7a6694d2df90e8db9cee5859b88decc9b82e9ad1992f5bf253fe7c3b5", + "signature": "28354687c0f1267fd8cfa0645db7fc340a180cf7c299a58f91c3fe99bd6cd6d7", + "affectsGlobalScope": false + }, + "../src/utils/bytes/hex.ts": { + "version": "4e018730e9476d79f3520acd3cc9b83938ea1e164dd86743cee4dcb7c6e41847", + "signature": "dae492af52685ae68e6f6f90ff2a42422fe8a8fd99acd9b40705a9470c4f7bfd", + "affectsGlobalScope": false + }, + "../src/utils/bytes/utf8.ts": { + "version": "52ece3a38469c732d1ea141f7fd040bd014692975764a12613b053c1a859046f", + "signature": "139db12276e11f90df65778f7513bc3f85957d74fd0d1bbeb19e4a1dace4f662", + "affectsGlobalScope": false + }, + "../src/utils/bytes/bs58.ts": { + "version": "1dca6583aa437515cd12055e244344f357efe6eecf3fc567818d18556f507e49", + "signature": "2884fcc91f5d42a3288a75a558b036923e3d926354fa0c3fa0251c2c3d4b54e8", + "affectsGlobalScope": false + }, + "../src/utils/bytes/base64.ts": { + "version": "2d2f61212388dbfa9a9d161afcc5944be3f0873dcebcaa5dd644ad49bc4fdb9c", + "signature": "cc486017c03c0eb004237288602477ef2c636eed71d7ef0911da01c856b52ad6", + "affectsGlobalScope": false + }, + "../src/utils/bytes/index.ts": { + "version": "e7c96bb254ecb9128ed2dcf6d87ce579142f69482145fe8a26c28f934ae6cf98", + "signature": "7e6962ddd100e59959d982f7e1d0852bb157f49fc64318d02cd5988dfbd213fd", + "affectsGlobalScope": false + }, + "../src/program/index.ts": { + "version": "d0483090945334894f29ecbc75bc2cb0900e0879f569a69b57dc3037630942bb", + "signature": "d44878c770731a8ffaf4ff148cb456d5ffaf8e6c63eac130d8b14b5c1449bebf", + "affectsGlobalScope": false + }, + "../src/workspace.ts": { + "version": "94c178c879d1782f38e629bf36d060ff5ac422792976d2a4c03f627c1329c016", + "signature": "bf8be89d1adfc9f11e29e4c4149d3bf13d8d89b076ffdb09f2360f0adad90184", + "affectsGlobalScope": false + }, + "../src/utils/sha256.ts": { + "version": "3c0c533dd0f4090e2d26eee3e81e3285d24f7e01375973beeba3e54fd46cfc87", + "signature": "847ccc20490110124a2252c5a705dfe1355921470d2bd6da9af1d4943e54346b", + "affectsGlobalScope": false + }, + "../src/utils/rpc.ts": { + "version": "ad35ddf72a7f54ec60e44abcf2ac91aedb54fb3216c78c83454c687fd9a2a5d7", + "signature": "662c41728f7c1c8924e346722dc0baaf3d8203d2a93cbba182e388327c385f63", + "affectsGlobalScope": false + }, + "../src/utils/token.ts": { + "version": "fe13b83eb2d47b98ed7f0d9b3c25e32cb55442ea0eb1b17eba469973c6bc58f9", + "signature": "1a33fe7fba89d4ede6eeba8239dd1288df1b00314aa537c461f9a84d69395f3a", + "affectsGlobalScope": false + }, + "../src/utils/index.ts": { + "version": "d4590531cc59194ead6a80ee4b83769a9b5e4536f7e8d4d5b392ef3a4ccc684a", + "signature": "445a7f95d12db9018cf1bd75cb1d68d04cd544512e97c23a0ea683d88316464b", + "affectsGlobalScope": false + }, + "../src/index.ts": { + "version": "d057e76860c1782227528b81ab33cb27ffedcde659fc3bf7b1e74c4788468df3", + "signature": "61af8d66da57ed0702f52af48ce0f8043873dd5a8fb476556810d5a578156381", + "affectsGlobalScope": false + }, + "../types/buffer-layout/index.d.ts": { + "version": "2dc5486472ed06473788de247aadebdad84f9392e30e9f2a341bfb036b837102", + "signature": "2dc5486472ed06473788de247aadebdad84f9392e30e9f2a341bfb036b837102", + "affectsGlobalScope": false + }, + "../node_modules/@babel/types/lib/index.d.ts": { + "version": "bcb65ca77412000e1f33384efbbb615a8dac55aca6aa06a4552b01e7c8cd6577", + "signature": "bcb65ca77412000e1f33384efbbb615a8dac55aca6aa06a4552b01e7c8cd6577", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__generator/index.d.ts": { + "version": "b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e", + "signature": "b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__traverse/index.d.ts": { + "version": "8a278bfba7b081cd849434c1130655046639ae90617a682436ed6954e2b57403", + "signature": "8a278bfba7b081cd849434c1130655046639ae90617a682436ed6954e2b57403", + "affectsGlobalScope": false + }, + "../node_modules/@babel/parser/typings/babel-parser.d.ts": { + "version": "b1401d1d9117a5e4d981c965e3408dcb6e2b63022b716816e6d83599ab369a53", + "signature": "b1401d1d9117a5e4d981c965e3408dcb6e2b63022b716816e6d83599ab369a53", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__template/index.d.ts": { + "version": "3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed", + "signature": "3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed", + "affectsGlobalScope": false + }, + "../node_modules/@types/babel__core/index.d.ts": { + "version": "a66e700ed470a0cb52d14f3376c1605c70fec8e9659e45f7e22ad07fcd06ae04", + "signature": "a66e700ed470a0cb52d14f3376c1605c70fec8e9659e45f7e22ad07fcd06ae04", + "affectsGlobalScope": false + }, + "../node_modules/@types/connect/index.d.ts": { + "version": "81c14b89fa607b86dd726e2e3e91360cf8155ce97468404324d404a5bd65b2eb", + "signature": "81c14b89fa607b86dd726e2e3e91360cf8155ce97468404324d404a5bd65b2eb", + "affectsGlobalScope": false + }, + "../node_modules/@types/range-parser/index.d.ts": { + "version": "4e88b833be14c7f384e0dcd57bb30acd799e8e34d212635d693e41a75a71164b", + "signature": "4e88b833be14c7f384e0dcd57bb30acd799e8e34d212635d693e41a75a71164b", + "affectsGlobalScope": false + }, + "../node_modules/@types/qs/index.d.ts": { + "version": "98437d5a640b67c41534f0de2dcb64c75433dcdff54ff8f8432e613663619a2e", + "signature": "98437d5a640b67c41534f0de2dcb64c75433dcdff54ff8f8432e613663619a2e", + "affectsGlobalScope": false + }, + "../node_modules/@types/express-serve-static-core/index.d.ts": { + "version": "e41a1ce538d71d5a3389b7fc2e39c15a4972f0d4cb14bf2fe8cda8c361150028", + "signature": "e41a1ce538d71d5a3389b7fc2e39c15a4972f0d4cb14bf2fe8cda8c361150028", + "affectsGlobalScope": true + }, + "../node_modules/@types/graceful-fs/index.d.ts": { + "version": "cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc", + "signature": "cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc", + "affectsGlobalScope": false + }, + "../node_modules/@types/istanbul-lib-coverage/index.d.ts": { + "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "affectsGlobalScope": false + }, + "../node_modules/@types/istanbul-lib-report/index.d.ts": { + "version": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee", + "signature": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee", + "affectsGlobalScope": false + }, + "../node_modules/@types/istanbul-reports/index.d.ts": { + "version": "905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab", + "signature": "905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/cleanupSemantic.d.ts": { + "version": "d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322", + "signature": "d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/types.d.ts": { + "version": "69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2", + "signature": "69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/diffLines.d.ts": { + "version": "561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9", + "signature": "561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/printDiffs.d.ts": { + "version": "62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f", + "signature": "62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f", + "affectsGlobalScope": false + }, + "../node_modules/jest-diff/build/index.d.ts": { + "version": "b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc", + "signature": "b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc", + "affectsGlobalScope": false + }, + "../node_modules/pretty-format/build/types.d.ts": { + "version": "5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09", + "signature": "5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09", + "affectsGlobalScope": false + }, + "../node_modules/pretty-format/build/index.d.ts": { + "version": "02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c", + "signature": "02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c", + "affectsGlobalScope": false + }, + "../node_modules/@types/jest/index.d.ts": { + "version": "08c4a97a324b82f7dbc02b9e2bb278b7bb13c160e04e23a16dd04f9d732da20a", + "signature": "08c4a97a324b82f7dbc02b9e2bb278b7bb13c160e04e23a16dd04f9d732da20a", + "affectsGlobalScope": true + }, + "../node_modules/@types/json-schema/index.d.ts": { + "version": "b2be568d8ce95fcb26eebd04c035d94825655fdf689bf67d799f5ff8cbbb1024", + "signature": "b2be568d8ce95fcb26eebd04c035d94825655fdf689bf67d799f5ff8cbbb1024", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/common.d.ts": { + "version": "3594c022901a1c8993b0f78a3f534cfb81e7b619ed215348f7f6882f3db02abc", + "signature": "3594c022901a1c8993b0f78a3f534cfb81e7b619ed215348f7f6882f3db02abc", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/array.d.ts": { + "version": "438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2", + "signature": "438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/collection.d.ts": { + "version": "0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8", + "signature": "0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/date.d.ts": { + "version": "187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42", + "signature": "187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/function.d.ts": { + "version": "c9f396e71966bd3a890d8a36a6a497dbf260e9b868158ea7824d4b5421210afe", + "signature": "c9f396e71966bd3a890d8a36a6a497dbf260e9b868158ea7824d4b5421210afe", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/lang.d.ts": { + "version": "509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32", + "signature": "509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/math.d.ts": { + "version": "9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb", + "signature": "9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/number.d.ts": { + "version": "00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a", + "signature": "00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/object.d.ts": { + "version": "c311349ec71bb69399ffc4092853e7d8a86c1ca39ddb4cd129e775c19d985793", + "signature": "c311349ec71bb69399ffc4092853e7d8a86c1ca39ddb4cd129e775c19d985793", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/seq.d.ts": { + "version": "3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd", + "signature": "3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/string.d.ts": { + "version": "4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a", + "signature": "4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/common/util.d.ts": { + "version": "2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5", + "signature": "2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5", + "affectsGlobalScope": false + }, + "../node_modules/@types/lodash/index.d.ts": { + "version": "0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8", + "signature": "0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8", + "affectsGlobalScope": true + }, + "../node_modules/@types/minimist/index.d.ts": { + "version": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "signature": "e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88", + "affectsGlobalScope": false + }, + "../node_modules/@types/normalize-package-data/index.d.ts": { + "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "affectsGlobalScope": false + }, + "../node_modules/@types/parse-json/index.d.ts": { + "version": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "signature": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "affectsGlobalScope": false + }, + "../node_modules/@types/prettier/index.d.ts": { + "version": "c4efa4df1372e991aa44b70b8d87b48865d94ecd26e76025854f2273df155253", + "signature": "c4efa4df1372e991aa44b70b8d87b48865d94ecd26e76025854f2273df155253", + "affectsGlobalScope": false + }, + "../node_modules/@types/stack-utils/index.d.ts": { + "version": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57", + "signature": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57", + "affectsGlobalScope": false + }, + "../node_modules/@types/yargs-parser/index.d.ts": { + "version": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "signature": "3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f", + "affectsGlobalScope": false + }, + "../node_modules/@types/yargs/index.d.ts": { + "version": "19a1bd57c2b3dd10bc4ae33eaa9e88f0f067858e32b7765b7e9d38138cd07f30", + "signature": "19a1bd57c2b3dd10bc4ae33eaa9e88f0f067858e32b7765b7e9d38138cd07f30", + "affectsGlobalScope": false + } + }, + "options": { + "moduleResolution": 2, + "module": 5, + "target": 6, + "outDir": "./esm", + "rootDir": "../src", + "declarationDir": "./", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noImplicitAny": false, + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "baseUrl": "..", + "typeRoots": [ + "../types", + "../node_modules/@types" + ], + "paths": { + "@solana/web3.js": [ + "./node_modules/@solana/web3.js/lib" + ] + }, + "pathsBasePath": "/home/armaniferrante/Documents/code/src/github.com/project-serum/anchor/ts", + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../node_modules/@babel/parser/typings/babel-parser.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/@types/node/index.d.ts", + "../types/buffer-layout/index.d.ts" + ], + "../node_modules/@solana/web3.js/lib/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/babel__core/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts", + "../node_modules/@types/babel__generator/index.d.ts", + "../node_modules/@types/babel__template/index.d.ts", + "../node_modules/@types/babel__traverse/index.d.ts" + ], + "../node_modules/@types/babel__generator/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__template/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__traverse/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/bn.js/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/bs58/index.d.ts": [ + "../node_modules/base-x/src/index.d.ts" + ], + "../node_modules/@types/connect/index.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/express-serve-static-core/index.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/qs/index.d.ts", + "../node_modules/@types/range-parser/index.d.ts" + ], + "../node_modules/@types/graceful-fs/index.d.ts": [ + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/istanbul-lib-report/index.d.ts": [ + "../node_modules/@types/istanbul-lib-coverage/index.d.ts" + ], + "../node_modules/@types/istanbul-reports/index.d.ts": [ + "../node_modules/@types/istanbul-lib-report/index.d.ts" + ], + "../node_modules/@types/jest/index.d.ts": [ + "../node_modules/jest-diff/build/index.d.ts", + "../node_modules/pretty-format/build/index.d.ts" + ], + "../node_modules/@types/lodash/common/array.d.ts": [ + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/collection.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/common.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/date.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/function.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/lang.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/math.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/number.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/object.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/seq.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/string.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/util.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/index.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts" + ], + "../node_modules/@types/node/assert/strict.d.ts": [ + "../node_modules/@types/node/assert.d.ts" + ], + "../node_modules/@types/node/base.d.ts": [ + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../node_modules/@types/node/child_process.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/cluster.d.ts": [ + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/console.d.ts": [ + "../node_modules/@types/node/util.d.ts" + ], + "../node_modules/@types/node/constants.d.ts": [ + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/os.d.ts" + ], + "../node_modules/@types/node/crypto.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/dgram.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/dns.d.ts": [ + "../node_modules/@types/node/dns/promises.d.ts" + ], + "../node_modules/@types/node/dns/promises.d.ts": [ + "../node_modules/@types/node/dns.d.ts" + ], + "../node_modules/@types/node/domain.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/events.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/fs.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/fs/promises.d.ts": [ + "../node_modules/@types/node/fs.d.ts" + ], + "../node_modules/@types/node/http.d.ts": [ + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/http2.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/https.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/index.d.ts": [ + "../node_modules/@types/node/base.d.ts" + ], + "../node_modules/@types/node/inspector.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/module.d.ts": [ + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/net.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/perf_hooks.d.ts": [ + "../node_modules/@types/node/async_hooks.d.ts" + ], + "../node_modules/@types/node/process.d.ts": [ + "../node_modules/@types/node/tty.d.ts" + ], + "../node_modules/@types/node/readline.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/repl.d.ts": [ + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/stream.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream/promises.d.ts" + ], + "../node_modules/@types/node/stream/promises.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/timers/promises.d.ts": [ + "../node_modules/@types/node/timers.d.ts" + ], + "../node_modules/@types/node/tls.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/ts3.6/base.d.ts": [ + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts" + ], + "../node_modules/@types/node/tty.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/url.d.ts": [ + "../node_modules/@types/node/querystring.d.ts" + ], + "../node_modules/@types/node/v8.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/worker_threads.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/zlib.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/yargs/index.d.ts": [ + "../node_modules/@types/yargs-parser/index.d.ts" + ], + "../node_modules/base-x/src/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/dot-case/dist/index.d.ts": [ + "../node_modules/no-case/dist/index.d.ts" + ], + "../node_modules/jest-diff/build/diffLines.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/index.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/diffLines.d.ts", + "../node_modules/jest-diff/build/printDiffs.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/printDiffs.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/pretty-format/build/index.d.ts": [ + "../node_modules/pretty-format/build/types.d.ts" + ], + "../node_modules/snake-case/dist/index.d.ts": [ + "../node_modules/dot-case/dist/index.d.ts" + ], + "../src/coder/accounts.ts": [ + "../node_modules/js-sha256/index.d.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/common.ts": [ + "../node_modules/js-sha256/index.d.ts", + "../node_modules/snake-case/dist/index.d.ts", + "../src/error.ts", + "../src/idl.ts" + ], + "../src/coder/event.ts": [ + "../node_modules/base64-js/index.d.ts", + "../node_modules/js-sha256/index.d.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../src/program/event.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/idl.ts": [ + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../src/error.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/index.ts": [ + "../src/coder/accounts.ts", + "../src/coder/common.ts", + "../src/coder/event.ts", + "../src/coder/instruction.ts", + "../src/coder/state.ts", + "../src/coder/types.ts", + "../src/idl.ts" + ], + "../src/coder/instruction.ts": [ + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bs58/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../src/coder/common.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/state.ts": [ + "../node_modules/js-sha256/index.d.ts", + "../src/coder/idl.ts", + "../src/idl.ts", + "../src/utils/features.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/types.ts": [ + "../src/coder/idl.ts", + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/idl.ts": [ + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../src/coder/index.ts", + "../src/coder/instruction.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/index.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts", + "../src/utils/index.ts", + "../src/workspace.ts" + ], + "../src/program/common.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts" + ], + "../src/program/context.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/common.ts" + ], + "../src/program/event.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../src/coder/index.ts", + "../src/provider.ts" + ], + "../src/program/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/pako/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/program/event.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts", + "../src/utils/bytes/index.ts" + ], + "../src/program/namespace/account.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bs58/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/provider.ts", + "../src/utils/pubkey.ts" + ], + "../src/program/namespace/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/namespace/account.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/simulate.ts", + "../src/program/namespace/state.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/instruction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/context.ts" + ], + "../src/program/namespace/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/program/context.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/simulate.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/state.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/namespace/index.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts", + "../src/utils/pubkey.ts" + ], + "../src/program/namespace/transaction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts", + "../src/program/namespace/instruction.ts" + ], + "../src/provider.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/utils/common.ts" + ], + "../src/utils/bytes/base64.ts": [ + "../node_modules/base64-js/index.d.ts" + ], + "../src/utils/bytes/bs58.ts": [ + "../node_modules/@types/bs58/index.d.ts" + ], + "../src/utils/bytes/index.ts": [ + "../src/utils/bytes/base64.ts", + "../src/utils/bytes/bs58.ts", + "../src/utils/bytes/hex.ts", + "../src/utils/bytes/utf8.ts" + ], + "../src/utils/index.ts": [ + "../src/utils/bytes/index.ts", + "../src/utils/features.ts", + "../src/utils/pubkey.ts", + "../src/utils/rpc.ts", + "../src/utils/sha256.ts", + "../src/utils/token.ts" + ], + "../src/utils/pubkey.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/js-sha256/index.d.ts", + "../src/program/common.ts" + ], + "../src/utils/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../src/program/common.ts", + "../src/provider.ts" + ], + "../src/utils/sha256.ts": [ + "../node_modules/js-sha256/index.d.ts" + ], + "../src/utils/token.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/workspace.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/toml/index.d.ts", + "../src/idl.ts", + "../src/program/index.ts", + "../src/utils/common.ts" + ] + }, + "exportedModulesMap": { + "../node_modules/@babel/parser/typings/babel-parser.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/@types/node/index.d.ts", + "../types/buffer-layout/index.d.ts" + ], + "../node_modules/@solana/web3.js/lib/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/babel__core/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts", + "../node_modules/@types/babel__generator/index.d.ts", + "../node_modules/@types/babel__template/index.d.ts", + "../node_modules/@types/babel__traverse/index.d.ts" + ], + "../node_modules/@types/babel__generator/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__template/index.d.ts": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/babel__traverse/index.d.ts": [ + "../node_modules/@babel/types/lib/index.d.ts" + ], + "../node_modules/@types/bn.js/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/bs58/index.d.ts": [ + "../node_modules/base-x/src/index.d.ts" + ], + "../node_modules/@types/connect/index.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/express-serve-static-core/index.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/qs/index.d.ts", + "../node_modules/@types/range-parser/index.d.ts" + ], + "../node_modules/@types/graceful-fs/index.d.ts": [ + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/@types/istanbul-lib-report/index.d.ts": [ + "../node_modules/@types/istanbul-lib-coverage/index.d.ts" + ], + "../node_modules/@types/istanbul-reports/index.d.ts": [ + "../node_modules/@types/istanbul-lib-report/index.d.ts" + ], + "../node_modules/@types/jest/index.d.ts": [ + "../node_modules/jest-diff/build/index.d.ts", + "../node_modules/pretty-format/build/index.d.ts" + ], + "../node_modules/@types/lodash/common/array.d.ts": [ + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/collection.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/common.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/date.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/function.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/lang.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/math.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/number.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/object.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/seq.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/string.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/common/util.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/index.d.ts" + ], + "../node_modules/@types/lodash/index.d.ts": [ + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts" + ], + "../node_modules/@types/node/assert/strict.d.ts": [ + "../node_modules/@types/node/assert.d.ts" + ], + "../node_modules/@types/node/base.d.ts": [ + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../node_modules/@types/node/child_process.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/cluster.d.ts": [ + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/console.d.ts": [ + "../node_modules/@types/node/util.d.ts" + ], + "../node_modules/@types/node/constants.d.ts": [ + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/os.d.ts" + ], + "../node_modules/@types/node/crypto.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/dgram.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/dns.d.ts": [ + "../node_modules/@types/node/dns/promises.d.ts" + ], + "../node_modules/@types/node/dns/promises.d.ts": [ + "../node_modules/@types/node/dns.d.ts" + ], + "../node_modules/@types/node/domain.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/events.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/fs.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/fs/promises.d.ts": [ + "../node_modules/@types/node/fs.d.ts" + ], + "../node_modules/@types/node/http.d.ts": [ + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/http2.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/https.d.ts": [ + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/index.d.ts": [ + "../node_modules/@types/node/base.d.ts" + ], + "../node_modules/@types/node/inspector.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/module.d.ts": [ + "../node_modules/@types/node/url.d.ts" + ], + "../node_modules/@types/node/net.d.ts": [ + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/perf_hooks.d.ts": [ + "../node_modules/@types/node/async_hooks.d.ts" + ], + "../node_modules/@types/node/process.d.ts": [ + "../node_modules/@types/node/tty.d.ts" + ], + "../node_modules/@types/node/readline.d.ts": [ + "../node_modules/@types/node/events.d.ts" + ], + "../node_modules/@types/node/repl.d.ts": [ + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/stream.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/stream/promises.d.ts" + ], + "../node_modules/@types/node/stream/promises.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/timers/promises.d.ts": [ + "../node_modules/@types/node/timers.d.ts" + ], + "../node_modules/@types/node/tls.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/ts3.6/base.d.ts": [ + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts" + ], + "../node_modules/@types/node/tty.d.ts": [ + "../node_modules/@types/node/net.d.ts" + ], + "../node_modules/@types/node/url.d.ts": [ + "../node_modules/@types/node/querystring.d.ts" + ], + "../node_modules/@types/node/v8.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/node/worker_threads.d.ts": [ + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/vm.d.ts" + ], + "../node_modules/@types/node/zlib.d.ts": [ + "../node_modules/@types/node/stream.d.ts" + ], + "../node_modules/@types/yargs/index.d.ts": [ + "../node_modules/@types/yargs-parser/index.d.ts" + ], + "../node_modules/base-x/src/index.d.ts": [ + "../node_modules/@types/node/index.d.ts" + ], + "../node_modules/dot-case/dist/index.d.ts": [ + "../node_modules/no-case/dist/index.d.ts" + ], + "../node_modules/jest-diff/build/diffLines.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/index.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/diffLines.d.ts", + "../node_modules/jest-diff/build/printDiffs.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/jest-diff/build/printDiffs.d.ts": [ + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/types.d.ts" + ], + "../node_modules/pretty-format/build/index.d.ts": [ + "../node_modules/pretty-format/build/types.d.ts" + ], + "../node_modules/snake-case/dist/index.d.ts": [ + "../node_modules/dot-case/dist/index.d.ts" + ], + "../src/coder/accounts.ts": [ + "../src/idl.ts" + ], + "../src/coder/common.ts": [ + "../src/idl.ts" + ], + "../src/coder/event.ts": [ + "../src/idl.ts", + "../src/program/event.ts" + ], + "../src/coder/idl.ts": [ + "../src/idl.ts", + "../types/buffer-layout/index.d.ts" + ], + "../src/coder/index.ts": [ + "../src/coder/accounts.ts", + "../src/coder/common.ts", + "../src/coder/event.ts", + "../src/coder/instruction.ts", + "../src/coder/state.ts", + "../src/coder/types.ts", + "../src/idl.ts" + ], + "../src/coder/instruction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts" + ], + "../src/coder/state.ts": [ + "../src/idl.ts" + ], + "../src/coder/types.ts": [ + "../src/idl.ts" + ], + "../src/idl.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../src/coder/index.ts", + "../src/coder/instruction.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/index.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts", + "../src/utils/index.ts", + "../src/workspace.ts" + ], + "../src/program/common.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts" + ], + "../src/program/context.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/common.ts" + ], + "../src/program/event.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/provider.ts" + ], + "../src/program/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts" + ], + "../src/program/namespace/account.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/common.ts", + "../src/provider.ts" + ], + "../src/program/namespace/index.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/namespace/account.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/simulate.ts", + "../src/program/namespace/state.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/instruction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/context.ts" + ], + "../src/program/namespace/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/simulate.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/event.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts" + ], + "../src/program/namespace/state.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../src/coder/index.ts", + "../src/idl.ts", + "../src/program/namespace/index.ts", + "../src/provider.ts" + ], + "../src/program/namespace/transaction.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/idl.ts", + "../src/program/namespace/instruction.ts" + ], + "../src/provider.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ], + "../src/utils/bytes/index.ts": [ + "../src/utils/bytes/base64.ts", + "../src/utils/bytes/bs58.ts", + "../src/utils/bytes/hex.ts", + "../src/utils/bytes/utf8.ts" + ], + "../src/utils/index.ts": [ + "../src/utils/bytes/index.ts", + "../src/utils/features.ts", + "../src/utils/pubkey.ts", + "../src/utils/rpc.ts", + "../src/utils/sha256.ts", + "../src/utils/token.ts" + ], + "../src/utils/pubkey.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/program/common.ts" + ], + "../src/utils/rpc.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../src/program/common.ts", + "../src/provider.ts" + ], + "../src/utils/token.ts": [ + "../node_modules/@solana/web3.js/lib/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../node_modules/@babel/types/lib/index.d.ts", + "../node_modules/@project-serum/borsh/dist/lib/index.d.ts", + "../node_modules/@solana/web3.js/lib/index.d.ts", + "../node_modules/@types/babel__core/index.d.ts", + "../node_modules/@types/babel__generator/index.d.ts", + "../node_modules/@types/babel__template/index.d.ts", + "../node_modules/@types/babel__traverse/index.d.ts", + "../node_modules/@types/bn.js/index.d.ts", + "../node_modules/@types/bs58/index.d.ts", + "../node_modules/@types/connect/index.d.ts", + "../node_modules/@types/express-serve-static-core/index.d.ts", + "../node_modules/@types/graceful-fs/index.d.ts", + "../node_modules/@types/istanbul-lib-coverage/index.d.ts", + "../node_modules/@types/istanbul-lib-report/index.d.ts", + "../node_modules/@types/istanbul-reports/index.d.ts", + "../node_modules/@types/jest/index.d.ts", + "../node_modules/@types/json-schema/index.d.ts", + "../node_modules/@types/lodash/common/array.d.ts", + "../node_modules/@types/lodash/common/collection.d.ts", + "../node_modules/@types/lodash/common/common.d.ts", + "../node_modules/@types/lodash/common/date.d.ts", + "../node_modules/@types/lodash/common/function.d.ts", + "../node_modules/@types/lodash/common/lang.d.ts", + "../node_modules/@types/lodash/common/math.d.ts", + "../node_modules/@types/lodash/common/number.d.ts", + "../node_modules/@types/lodash/common/object.d.ts", + "../node_modules/@types/lodash/common/seq.d.ts", + "../node_modules/@types/lodash/common/string.d.ts", + "../node_modules/@types/lodash/common/util.d.ts", + "../node_modules/@types/lodash/index.d.ts", + "../node_modules/@types/minimist/index.d.ts", + "../node_modules/@types/node/assert.d.ts", + "../node_modules/@types/node/assert/strict.d.ts", + "../node_modules/@types/node/async_hooks.d.ts", + "../node_modules/@types/node/base.d.ts", + "../node_modules/@types/node/buffer.d.ts", + "../node_modules/@types/node/child_process.d.ts", + "../node_modules/@types/node/cluster.d.ts", + "../node_modules/@types/node/console.d.ts", + "../node_modules/@types/node/constants.d.ts", + "../node_modules/@types/node/crypto.d.ts", + "../node_modules/@types/node/dgram.d.ts", + "../node_modules/@types/node/dns.d.ts", + "../node_modules/@types/node/dns/promises.d.ts", + "../node_modules/@types/node/domain.d.ts", + "../node_modules/@types/node/events.d.ts", + "../node_modules/@types/node/fs.d.ts", + "../node_modules/@types/node/fs/promises.d.ts", + "../node_modules/@types/node/globals.d.ts", + "../node_modules/@types/node/globals.global.d.ts", + "../node_modules/@types/node/http.d.ts", + "../node_modules/@types/node/http2.d.ts", + "../node_modules/@types/node/https.d.ts", + "../node_modules/@types/node/index.d.ts", + "../node_modules/@types/node/inspector.d.ts", + "../node_modules/@types/node/module.d.ts", + "../node_modules/@types/node/net.d.ts", + "../node_modules/@types/node/os.d.ts", + "../node_modules/@types/node/path.d.ts", + "../node_modules/@types/node/perf_hooks.d.ts", + "../node_modules/@types/node/process.d.ts", + "../node_modules/@types/node/punycode.d.ts", + "../node_modules/@types/node/querystring.d.ts", + "../node_modules/@types/node/readline.d.ts", + "../node_modules/@types/node/repl.d.ts", + "../node_modules/@types/node/stream.d.ts", + "../node_modules/@types/node/stream/promises.d.ts", + "../node_modules/@types/node/string_decoder.d.ts", + "../node_modules/@types/node/timers.d.ts", + "../node_modules/@types/node/timers/promises.d.ts", + "../node_modules/@types/node/tls.d.ts", + "../node_modules/@types/node/trace_events.d.ts", + "../node_modules/@types/node/ts3.6/base.d.ts", + "../node_modules/@types/node/tty.d.ts", + "../node_modules/@types/node/url.d.ts", + "../node_modules/@types/node/util.d.ts", + "../node_modules/@types/node/v8.d.ts", + "../node_modules/@types/node/vm.d.ts", + "../node_modules/@types/node/wasi.d.ts", + "../node_modules/@types/node/worker_threads.d.ts", + "../node_modules/@types/node/zlib.d.ts", + "../node_modules/@types/normalize-package-data/index.d.ts", + "../node_modules/@types/pako/index.d.ts", + "../node_modules/@types/parse-json/index.d.ts", + "../node_modules/@types/prettier/index.d.ts", + "../node_modules/@types/qs/index.d.ts", + "../node_modules/@types/range-parser/index.d.ts", + "../node_modules/@types/stack-utils/index.d.ts", + "../node_modules/@types/yargs-parser/index.d.ts", + "../node_modules/@types/yargs/index.d.ts", + "../node_modules/base-x/src/index.d.ts", + "../node_modules/base64-js/index.d.ts", + "../node_modules/camelcase/index.d.ts", + "../node_modules/dot-case/dist/index.d.ts", + "../node_modules/eventemitter3/index.d.ts", + "../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../node_modules/jest-diff/build/diffLines.d.ts", + "../node_modules/jest-diff/build/index.d.ts", + "../node_modules/jest-diff/build/printDiffs.d.ts", + "../node_modules/jest-diff/build/types.d.ts", + "../node_modules/js-sha256/index.d.ts", + "../node_modules/no-case/dist/index.d.ts", + "../node_modules/pretty-format/build/index.d.ts", + "../node_modules/pretty-format/build/types.d.ts", + "../node_modules/snake-case/dist/index.d.ts", + "../node_modules/toml/index.d.ts", + "../node_modules/typescript/lib/lib.dom.d.ts", + "../node_modules/typescript/lib/lib.dom.iterable.d.ts", + "../node_modules/typescript/lib/lib.es2015.collection.d.ts", + "../node_modules/typescript/lib/lib.es2015.core.d.ts", + "../node_modules/typescript/lib/lib.es2015.d.ts", + "../node_modules/typescript/lib/lib.es2015.generator.d.ts", + "../node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "../node_modules/typescript/lib/lib.es2015.promise.d.ts", + "../node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "../node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "../node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "../node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "../node_modules/typescript/lib/lib.es2016.d.ts", + "../node_modules/typescript/lib/lib.es2017.d.ts", + "../node_modules/typescript/lib/lib.es2017.intl.d.ts", + "../node_modules/typescript/lib/lib.es2017.object.d.ts", + "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "../node_modules/typescript/lib/lib.es2017.string.d.ts", + "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "../node_modules/typescript/lib/lib.es2018.d.ts", + "../node_modules/typescript/lib/lib.es2018.intl.d.ts", + "../node_modules/typescript/lib/lib.es2018.promise.d.ts", + "../node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "../node_modules/typescript/lib/lib.es2019.array.d.ts", + "../node_modules/typescript/lib/lib.es2019.d.ts", + "../node_modules/typescript/lib/lib.es2019.full.d.ts", + "../node_modules/typescript/lib/lib.es2019.object.d.ts", + "../node_modules/typescript/lib/lib.es2019.string.d.ts", + "../node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "../node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "../node_modules/typescript/lib/lib.es5.d.ts", + "../node_modules/typescript/lib/lib.esnext.intl.d.ts", + "../node_modules/typescript/lib/lib.scripthost.d.ts", + "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts", + "../src/coder/accounts.ts", + "../src/coder/common.ts", + "../src/coder/event.ts", + "../src/coder/idl.ts", + "../src/coder/index.ts", + "../src/coder/instruction.ts", + "../src/coder/state.ts", + "../src/coder/types.ts", + "../src/error.ts", + "../src/idl.ts", + "../src/index.ts", + "../src/program/common.ts", + "../src/program/context.ts", + "../src/program/event.ts", + "../src/program/index.ts", + "../src/program/namespace/account.ts", + "../src/program/namespace/index.ts", + "../src/program/namespace/instruction.ts", + "../src/program/namespace/rpc.ts", + "../src/program/namespace/simulate.ts", + "../src/program/namespace/state.ts", + "../src/program/namespace/transaction.ts", + "../src/provider.ts", + "../src/utils/bytes/base64.ts", + "../src/utils/bytes/bs58.ts", + "../src/utils/bytes/hex.ts", + "../src/utils/bytes/index.ts", + "../src/utils/bytes/utf8.ts", + "../src/utils/common.ts", + "../src/utils/features.ts", + "../src/utils/index.ts", + "../src/utils/pubkey.ts", + "../src/utils/rpc.ts", + "../src/utils/sha256.ts", + "../src/utils/token.ts", + "../src/workspace.ts", + "../types/buffer-layout/index.d.ts" + ] + }, + "version": "4.1.3" +} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts new file mode 100644 index 0000000..04a09d0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts @@ -0,0 +1,4 @@ +/// +export declare function encode(data: Buffer): string; +export declare function decode(data: string): Buffer; +//# sourceMappingURL=base64.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts.map new file mode 100644 index 0000000..d99ad17 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/utils/bytes/base64.ts"],"names":[],"mappings":";AAEA,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3C"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts new file mode 100644 index 0000000..0d24ed3 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts @@ -0,0 +1,4 @@ +/// +export declare function encode(data: Buffer | number[] | Uint8Array): string; +export declare function decode(data: string): Buffer; +//# sourceMappingURL=bs58.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts.map new file mode 100644 index 0000000..247e539 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/bs58.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bs58.d.ts","sourceRoot":"","sources":["../../../src/utils/bytes/bs58.ts"],"names":[],"mappings":";AAEA,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,UAE1D;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,UAElC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts new file mode 100644 index 0000000..662345a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts @@ -0,0 +1,4 @@ +/// +export declare function encode(data: Buffer): string; +export declare function decode(data: string): Buffer; +//# sourceMappingURL=hex.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts.map new file mode 100644 index 0000000..5ff9af5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/hex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../../src/utils/bytes/hex.ts"],"names":[],"mappings":";AAAA,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK3C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAe3C"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts new file mode 100644 index 0000000..596582f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts @@ -0,0 +1,5 @@ +export * as hex from "./hex"; +export * as utf8 from "./utf8"; +export * as bs58 from "./bs58"; +export * as base64 from "./base64"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts.map new file mode 100644 index 0000000..0ee1f2a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/bytes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts new file mode 100644 index 0000000..e56620f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts @@ -0,0 +1,3 @@ +export declare function decode(array: Uint8Array): string; +export declare function encode(input: string): Uint8Array; +//# sourceMappingURL=utf8.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts.map new file mode 100644 index 0000000..611b482 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/bytes/utf8.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/bytes/utf8.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMhD;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAMhD"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts new file mode 100644 index 0000000..fd5a1a0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts @@ -0,0 +1,6 @@ +/** + * Returns true if being run inside a web browser, + * false if in a Node process or electron app. + */ +export declare const isBrowser: boolean; +//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts.map new file mode 100644 index 0000000..3b87588 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/common.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,SAAS,SACoD,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts new file mode 100644 index 0000000..e5f059d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts @@ -0,0 +1,3 @@ +export declare function set(key: string): void; +export declare function isSet(key: string): boolean; +//# sourceMappingURL=features.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts.map new file mode 100644 index 0000000..6cf7832 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/features.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/utils/features.ts"],"names":[],"mappings":"AAIA,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,QAK9B;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE1C"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts new file mode 100644 index 0000000..9896095 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts @@ -0,0 +1,7 @@ +export * as sha256 from "./sha256"; +export * as rpc from "./rpc"; +export * as publicKey from "./pubkey"; +export * as bytes from "./bytes"; +export * as token from "./token"; +export * as features from "./features"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts.map new file mode 100644 index 0000000..94997cf --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts new file mode 100644 index 0000000..311c51a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts @@ -0,0 +1,8 @@ +/// +import { PublicKey } from "@solana/web3.js"; +import { Address } from "../program/common"; +export declare function createWithSeedSync(fromPublicKey: PublicKey, seed: string, programId: PublicKey): PublicKey; +export declare function createProgramAddressSync(seeds: Array, programId: PublicKey): PublicKey; +export declare function findProgramAddressSync(seeds: Array, programId: PublicKey): [PublicKey, number]; +export declare function associated(programId: Address, ...args: Array): Promise; +//# sourceMappingURL=pubkey.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts.map new file mode 100644 index 0000000..de24b05 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/pubkey.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pubkey.d.ts","sourceRoot":"","sources":["../../src/utils/pubkey.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AAG9D,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,GACnB,SAAS,CAQX;AAGD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,EACjC,SAAS,EAAE,SAAS,GACnB,SAAS,CAqBX;AAGD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,EACjC,SAAS,EAAE,SAAS,GACnB,CAAC,SAAS,EAAE,MAAM,CAAC,CAiBrB;AAYD,wBAAsB,UAAU,CAC9B,SAAS,EAAE,OAAO,EAClB,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,GACjC,OAAO,CAAC,SAAS,CAAC,CAapB"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts new file mode 100644 index 0000000..1b33cf4 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts @@ -0,0 +1,14 @@ +/// +import { AccountInfo, AccountMeta, Connection, PublicKey, TransactionSignature } from "@solana/web3.js"; +import { Address } from "../program/common"; +import Provider from "../provider"; +/** + * Sends a transaction to a program with the given accounts and instruction + * data. + */ +export declare function invoke(programId: Address, accounts?: Array, data?: Buffer, provider?: Provider): Promise; +export declare function getMultipleAccounts(connection: Connection, publicKeys: PublicKey[]): Promise; +}>>; +//# sourceMappingURL=rpc.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts.map new file mode 100644 index 0000000..1f4a35e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/rpc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/utils/rpc.ts"],"names":[],"mappings":";AACA,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EACT,oBAAoB,EAGrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,QAAyB,MAAM,aAAa,CAAC;AAEpD;;;GAGG;AACH,wBAAsB,MAAM,CAC1B,SAAS,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,EAC7B,IAAI,CAAC,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,oBAAoB,CAAC,CAgB/B;AAED,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,SAAS,EAAE,GACtB,OAAO,CACR,KAAK,CAAC,IAAI,GAAG;IAAE,SAAS,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,CACrE,CAsDA"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts new file mode 100644 index 0000000..2f9b1f5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts @@ -0,0 +1,2 @@ +export declare function hash(data: string): string; +//# sourceMappingURL=sha256.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts.map new file mode 100644 index 0000000..ea583c1 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/sha256.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../src/utils/sha256.ts"],"names":[],"mappings":"AAEA,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts b/tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts new file mode 100644 index 0000000..ae9257f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts @@ -0,0 +1,6 @@ +import { PublicKey } from "@solana/web3.js"; +export declare function associatedAddress({ mint, owner, }: { + mint: PublicKey; + owner: PublicKey; +}): Promise; +//# sourceMappingURL=token.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts.map new file mode 100644 index 0000000..85cc29a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/utils/token.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/utils/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,wBAAsB,iBAAiB,CAAC,EACtC,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;CAClB,GAAG,OAAO,CAAC,SAAS,CAAC,CAOrB"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/workspace.d.ts b/tests/node_modules/@project-serum/anchor/dist/workspace.d.ts new file mode 100644 index 0000000..63ba1f6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/workspace.d.ts @@ -0,0 +1,10 @@ +/** + * The `workspace` namespace provides a convenience API to automatically + * search for and deserialize [[Program]] objects defined by compiled IDLs + * in an Anchor workspace. + * + * This API is for Node only. + */ +declare const workspace: any; +export default workspace; +//# sourceMappingURL=workspace.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/dist/workspace.d.ts.map b/tests/node_modules/@project-serum/anchor/dist/workspace.d.ts.map new file mode 100644 index 0000000..dde100a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/dist/workspace.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,QAAA,MAAM,SAAS,KAkEb,CAAC;AAqBH,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/anchor/jest.config.js b/tests/node_modules/@project-serum/anchor/jest.config.js new file mode 100644 index 0000000..04f4d41 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/jest.config.js @@ -0,0 +1,5 @@ +module.exports = { + preset: 'ts-jest/presets/default', + testEnvironment: 'node', + testTimeout: 90000 +}; diff --git a/tests/node_modules/@project-serum/anchor/package.json b/tests/node_modules/@project-serum/anchor/package.json new file mode 100644 index 0000000..e2202e0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/package.json @@ -0,0 +1,63 @@ +{ + "name": "@project-serum/anchor", + "version": "0.13.2", + "description": "Anchor client", + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "license": "(MIT OR Apache-2.0)", + "types": "dist/index.d.ts", + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=11" + }, + "scripts": { + "build": "rm -rf dist/ && yarn build:node", + "build:node": "tsc && tsc -p tsconfig.cjs.json", + "lint:fix": "prettier src/** tests/** -w", + "lint": "prettier src/** tests/** --check", + "watch": "tsc -p tsconfig.cjs.json --watch", + "prepublishOnly": "yarn build", + "docs": "typedoc --excludePrivate --includeVersion --out ../docs/src/.vuepress/dist/ts/ --readme none src/index.ts", + "test": "jest tests --detectOpenHandles" + }, + "dependencies": { + "@project-serum/borsh": "^0.2.2", + "@solana/web3.js": "^1.17.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.0", + "camelcase": "^5.3.1", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "find": "^0.3.0", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "toml": "^3.0.0" + }, + "devDependencies": { + "@commitlint/cli": "^11.0.0", + "@commitlint/config-conventional": "^11.0.0", + "@types/bn.js": "^4.11.6", + "@types/bs58": "^4.0.1", + "@types/crypto-hash": "^1.1.2", + "@types/jest": "^26.0.15", + "@types/pako": "^1.0.1", + "@typescript-eslint/eslint-plugin": "^4.6.0", + "@typescript-eslint/parser": "^4.6.0", + "eslint": "^7.12.1", + "eslint-config-prettier": "^6.15.0", + "husky": "^4.3.0", + "jest": "26.6.0", + "jest-config": "26.6.0", + "lint-staged": "^10.5.0", + "prettier": "^2.1.2", + "ts-jest": "^26.4.3", + "ts-node": "^9.0.0", + "typedoc": "^0.20.36", + "typescript": "^4.0.5" + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/accounts.ts b/tests/node_modules/@project-serum/anchor/src/coder/accounts.ts new file mode 100644 index 0000000..0eb9f6a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/accounts.ts @@ -0,0 +1,55 @@ +import { Layout } from "buffer-layout"; +import { Idl } from "../idl"; +import { IdlCoder } from "./idl"; +import { sha256 } from "js-sha256"; + +/** + * Number of bytes of the account discriminator. + */ +export const ACCOUNT_DISCRIMINATOR_SIZE = 8; + +/** + * Encodes and decodes account objects. + */ +export class AccountsCoder { + /** + * Maps account type identifier to a layout. + */ + private accountLayouts: Map; + + public constructor(idl: Idl) { + if (idl.accounts === undefined) { + this.accountLayouts = new Map(); + return; + } + const layouts: [string, Layout][] = idl.accounts.map((acc) => { + return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)]; + }); + + this.accountLayouts = new Map(layouts); + } + + public async encode( + accountName: string, + account: T + ): Promise { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const layout = this.accountLayouts.get(accountName); + const len = layout.encode(account, buffer); + let accountData = buffer.slice(0, len); + let discriminator = await accountDiscriminator(accountName); + return Buffer.concat([discriminator, accountData]); + } + + public decode(accountName: string, ix: Buffer): T { + // Chop off the discriminator before decoding. + const data = ix.slice(8); + const layout = this.accountLayouts.get(accountName); + return layout.decode(data); + } +} + +// Calculates unique 8 byte discriminator prepended to all anchor accounts. +export async function accountDiscriminator(name: string): Promise { + return Buffer.from(sha256.digest(`account:${name}`)).slice(0, 8); +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/common.ts b/tests/node_modules/@project-serum/anchor/src/coder/common.ts new file mode 100644 index 0000000..cc93f80 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/common.ts @@ -0,0 +1,113 @@ +import { snakeCase } from "snake-case"; +import { sha256 } from "js-sha256"; +import { Idl, IdlField, IdlTypeDef, IdlEnumVariant, IdlType } from "../idl"; +import { IdlError } from "../error"; + +export function accountSize( + idl: Idl, + idlAccount: IdlTypeDef +): number | undefined { + if (idlAccount.type.kind === "enum") { + let variantSizes = idlAccount.type.variants.map( + (variant: IdlEnumVariant) => { + if (variant.fields === undefined) { + return 0; + } + return ( + variant.fields + // @ts-ignore + .map((f: IdlField | IdlType) => { + // @ts-ignore + if (f.name === undefined) { + throw new Error("Tuple enum variants not yet implemented."); + } + // @ts-ignore + return typeSize(idl, f.type); + }) + .reduce((a: number, b: number) => a + b) + ); + } + ); + return Math.max(...variantSizes) + 1; + } + if (idlAccount.type.fields === undefined) { + return 0; + } + return idlAccount.type.fields + .map((f) => typeSize(idl, f.type)) + .reduce((a, b) => a + b); +} + +// Returns the size of the type in bytes. For variable length types, just return +// 1. Users should override this value in such cases. +function typeSize(idl: Idl, ty: IdlType): number { + switch (ty) { + case "bool": + return 1; + case "u8": + return 1; + case "i8": + return 1; + case "i16": + return 2; + case "u16": + return 2; + case "u32": + return 4; + case "i32": + return 4; + case "u64": + return 8; + case "i64": + return 8; + case "u128": + return 16; + case "i128": + return 16; + case "bytes": + return 1; + case "string": + return 1; + case "publicKey": + return 32; + default: + // @ts-ignore + if (ty.vec !== undefined) { + return 1; + } + // @ts-ignore + if (ty.option !== undefined) { + // @ts-ignore + return 1 + typeSize(idl, ty.option); + } + // @ts-ignore + if (ty.defined !== undefined) { + // @ts-ignore + const filtered = idl.types.filter((t) => t.name === ty.defined); + if (filtered.length !== 1) { + throw new IdlError(`Type not found: ${JSON.stringify(ty)}`); + } + let typeDef = filtered[0]; + + return accountSize(idl, typeDef); + } + // @ts-ignore + if (ty.array !== undefined) { + // @ts-ignore + let arrayTy = ty.array[0]; + // @ts-ignore + let arraySize = ty.array[1]; + // @ts-ignore + return typeSize(idl, arrayTy) * arraySize; + } + throw new Error(`Invalid type ${JSON.stringify(ty)}`); + } +} + +// Not technically sighash, since we don't include the arguments, as Rust +// doesn't allow function overloading. +export function sighash(nameSpace: string, ixName: string): Buffer { + let name = snakeCase(ixName); + let preimage = `${nameSpace}:${name}`; + return Buffer.from(sha256.digest(preimage)).slice(0, 8); +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/event.ts b/tests/node_modules/@project-serum/anchor/src/coder/event.ts new file mode 100644 index 0000000..82bee6a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/event.ts @@ -0,0 +1,73 @@ +import * as base64 from "base64-js"; +import { Layout } from "buffer-layout"; +import { sha256 } from "js-sha256"; +import { Idl, IdlTypeDef } from "../idl"; +import { Event } from "../program/event"; +import { IdlCoder } from "./idl"; + +export class EventCoder { + /** + * Maps account type identifier to a layout. + */ + private layouts: Map; + + /** + * Maps base64 encoded event discriminator to event name. + */ + private discriminators: Map; + + public constructor(idl: Idl) { + if (idl.events === undefined) { + this.layouts = new Map(); + return; + } + const layouts = idl.events.map((event) => { + let eventTypeDef: IdlTypeDef = { + name: event.name, + type: { + kind: "struct", + fields: event.fields.map((f) => { + return { name: f.name, type: f.type }; + }), + }, + }; + return [event.name, IdlCoder.typeDefLayout(eventTypeDef, idl.types)]; + }); + // @ts-ignore + this.layouts = new Map(layouts); + + this.discriminators = new Map( + idl.events === undefined + ? [] + : idl.events.map((e) => [ + base64.fromByteArray(eventDiscriminator(e.name)), + e.name, + ]) + ); + } + + public decode(log: string): Event | null { + let logArr: Buffer; + // This will throw if log length is not a multiple of 4. + try { + logArr = Buffer.from(base64.toByteArray(log)); + } catch (e) { + return null; + } + const disc = base64.fromByteArray(logArr.slice(0, 8)); + + // Only deserialize if the discriminator implies a proper event. + const eventName = this.discriminators.get(disc); + if (eventName === undefined) { + return null; + } + + const layout = this.layouts.get(eventName); + const data = layout.decode(logArr.slice(8)); + return { data, name: eventName }; + } +} + +export function eventDiscriminator(name: string): Buffer { + return Buffer.from(sha256.digest(`event:${name}`)).slice(0, 8); +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/idl.ts b/tests/node_modules/@project-serum/anchor/src/coder/idl.ts new file mode 100644 index 0000000..30be64a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/idl.ts @@ -0,0 +1,154 @@ +import camelCase from "camelcase"; +import { Layout } from "buffer-layout"; +import * as borsh from "@project-serum/borsh"; +import { IdlField, IdlTypeDef, IdlEnumVariant, IdlType } from "../idl"; +import { IdlError } from "../error"; + +export class IdlCoder { + public static fieldLayout(field: IdlField, types?: IdlTypeDef[]): Layout { + const fieldName = + field.name !== undefined ? camelCase(field.name) : undefined; + switch (field.type) { + case "bool": { + return borsh.bool(fieldName); + } + case "u8": { + return borsh.u8(fieldName); + } + case "i8": { + return borsh.i8(fieldName); + } + case "u16": { + return borsh.u16(fieldName); + } + case "i16": { + return borsh.i16(fieldName); + } + case "u32": { + return borsh.u32(fieldName); + } + case "i32": { + return borsh.i32(fieldName); + } + case "u64": { + return borsh.u64(fieldName); + } + case "i64": { + return borsh.i64(fieldName); + } + case "u128": { + return borsh.u128(fieldName); + } + case "i128": { + return borsh.i128(fieldName); + } + case "bytes": { + return borsh.vecU8(fieldName); + } + case "string": { + return borsh.str(fieldName); + } + case "publicKey": { + return borsh.publicKey(fieldName); + } + default: { + // @ts-ignore + if (field.type.vec) { + return borsh.vec( + IdlCoder.fieldLayout( + { + name: undefined, + // @ts-ignore + type: field.type.vec, + }, + types + ), + fieldName + ); + // @ts-ignore + } else if (field.type.option) { + return borsh.option( + IdlCoder.fieldLayout( + { + name: undefined, + // @ts-ignore + type: field.type.option, + }, + types + ), + fieldName + ); + // @ts-ignore + } else if (field.type.defined) { + // User defined type. + if (types === undefined) { + throw new IdlError("User defined types not provided"); + } + // @ts-ignore + const filtered = types.filter((t) => t.name === field.type.defined); + if (filtered.length !== 1) { + throw new IdlError(`Type not found: ${JSON.stringify(field)}`); + } + return IdlCoder.typeDefLayout(filtered[0], types, fieldName); + // @ts-ignore + } else if (field.type.array) { + // @ts-ignore + let arrayTy = field.type.array[0]; + // @ts-ignore + let arrayLen = field.type.array[1]; + let innerLayout = IdlCoder.fieldLayout( + { + name: undefined, + type: arrayTy, + }, + types + ); + return borsh.array(innerLayout, arrayLen, fieldName); + } else { + throw new Error(`Not yet implemented: ${field}`); + } + } + } + } + + public static typeDefLayout( + typeDef: IdlTypeDef, + types: IdlTypeDef[], + name?: string + ): Layout { + if (typeDef.type.kind === "struct") { + const fieldLayouts = typeDef.type.fields.map((field) => { + const x = IdlCoder.fieldLayout(field, types); + return x; + }); + return borsh.struct(fieldLayouts, name); + } else if (typeDef.type.kind === "enum") { + let variants = typeDef.type.variants.map((variant: IdlEnumVariant) => { + const name = camelCase(variant.name); + if (variant.fields === undefined) { + return borsh.struct([], name); + } + // @ts-ignore + const fieldLayouts = variant.fields.map((f: IdlField | IdlType) => { + // @ts-ignore + if (f.name === undefined) { + throw new Error("Tuple enum variants not yet implemented."); + } + // @ts-ignore + return IdlCoder.fieldLayout(f, types); + }); + return borsh.struct(fieldLayouts, name); + }); + + if (name !== undefined) { + // Buffer-layout lib requires the name to be null (on construction) + // when used as a field. + return borsh.rustEnum(variants).replicate(name); + } + + return borsh.rustEnum(variants, name); + } else { + throw new Error(`Unknown type kint: ${typeDef}`); + } + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/index.ts b/tests/node_modules/@project-serum/anchor/src/coder/index.ts new file mode 100644 index 0000000..e0ececb --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/index.ts @@ -0,0 +1,62 @@ +import { Idl } from "../idl"; +import { InstructionCoder } from "./instruction"; +import { AccountsCoder } from "./accounts"; +import { TypesCoder } from "./types"; +import { EventCoder } from "./event"; +import { StateCoder } from "./state"; +import { sighash } from "./common"; + +export { accountSize } from "./common"; +export { TypesCoder } from "./types"; +export { InstructionCoder } from "./instruction"; +export { + AccountsCoder, + accountDiscriminator, + ACCOUNT_DISCRIMINATOR_SIZE, +} from "./accounts"; +export { EventCoder, eventDiscriminator } from "./event"; +export { StateCoder, stateDiscriminator } from "./state"; + +/** + * Coder provides a facade for encoding and decoding all IDL related objects. + */ +export default class Coder { + /** + * Instruction coder. + */ + readonly instruction: InstructionCoder; + + /** + * Account coder. + */ + readonly accounts: AccountsCoder; + + /** + * Types coder. + */ + readonly types: TypesCoder; + + /** + * Coder for state structs. + */ + readonly state: StateCoder; + + /** + * Coder for events. + */ + readonly events: EventCoder; + + constructor(idl: Idl) { + this.instruction = new InstructionCoder(idl); + this.accounts = new AccountsCoder(idl); + this.types = new TypesCoder(idl); + this.events = new EventCoder(idl); + if (idl.state) { + this.state = new StateCoder(idl); + } + } + + public sighash(nameSpace: string, ixName: string): Buffer { + return sighash(nameSpace, ixName); + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/instruction.ts b/tests/node_modules/@project-serum/anchor/src/coder/instruction.ts new file mode 100644 index 0000000..a282c70 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/instruction.ts @@ -0,0 +1,381 @@ +import camelCase from "camelcase"; +import { Layout } from "buffer-layout"; +import * as borsh from "@project-serum/borsh"; +import * as bs58 from "bs58"; +import { + Idl, + IdlField, + IdlStateMethod, + IdlType, + IdlTypeDef, + IdlAccount, + IdlAccountItem, +} from "../idl"; +import { IdlCoder } from "./idl"; +import { sighash } from "./common"; +import { AccountMeta, PublicKey } from "@solana/web3.js"; + +/** + * Namespace for state method function signatures. + */ +export const SIGHASH_STATE_NAMESPACE = "state"; +/** + * Namespace for global instruction function signatures (i.e. functions + * that aren't namespaced by the state or any of its trait implementations). + */ +export const SIGHASH_GLOBAL_NAMESPACE = "global"; + +/** + * Encodes and decodes program instructions. + */ +export class InstructionCoder { + // Instruction args layout. Maps namespaced method + private ixLayout: Map; + + // Base58 encoded sighash to instruction layout. + private sighashLayouts: Map; + + public constructor(private idl: Idl) { + this.ixLayout = InstructionCoder.parseIxLayout(idl); + + const sighashLayouts = new Map(); + idl.instructions.forEach((ix) => { + const sh = sighash(SIGHASH_GLOBAL_NAMESPACE, ix.name); + sighashLayouts.set(bs58.encode(sh), { + layout: this.ixLayout.get(ix.name), + name: ix.name, + }); + }); + + if (idl.state) { + idl.state.methods.map((ix) => { + const sh = sighash(SIGHASH_STATE_NAMESPACE, ix.name); + sighashLayouts.set(bs58.encode(sh), { + layout: this.ixLayout.get(ix.name) as Layout, + name: ix.name, + }); + }); + } + + this.sighashLayouts = sighashLayouts; + } + + /** + * Encodes a program instruction. + */ + public encode(ixName: string, ix: any) { + return this._encode(SIGHASH_GLOBAL_NAMESPACE, ixName, ix); + } + + /** + * Encodes a program state instruction. + */ + public encodeState(ixName: string, ix: any) { + return this._encode(SIGHASH_STATE_NAMESPACE, ixName, ix); + } + + private _encode(nameSpace: string, ixName: string, ix: any): Buffer { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const methodName = camelCase(ixName); + const len = this.ixLayout.get(methodName).encode(ix, buffer); + const data = buffer.slice(0, len); + return Buffer.concat([sighash(nameSpace, ixName), data]); + } + + private static parseIxLayout(idl: Idl): Map { + const stateMethods = idl.state ? idl.state.methods : []; + + const ixLayouts = stateMethods + .map((m: IdlStateMethod) => { + let fieldLayouts = m.args.map((arg: IdlField) => { + return IdlCoder.fieldLayout( + arg, + Array.from([...(idl.accounts ?? []), ...(idl.types ?? [])]) + ); + }); + const name = camelCase(m.name); + return [name, borsh.struct(fieldLayouts, name)]; + }) + .concat( + idl.instructions.map((ix) => { + let fieldLayouts = ix.args.map((arg: IdlField) => + IdlCoder.fieldLayout( + arg, + Array.from([...(idl.accounts ?? []), ...(idl.types ?? [])]) + ) + ); + const name = camelCase(ix.name); + return [name, borsh.struct(fieldLayouts, name)]; + }) + ); + // @ts-ignore + return new Map(ixLayouts); + } + + /** + * Dewcodes a program instruction. + */ + public decode( + ix: Buffer | string, + encoding: "hex" | "base58" = "hex" + ): Instruction | null { + if (typeof ix === "string") { + ix = encoding === "hex" ? Buffer.from(ix, "hex") : bs58.decode(ix); + } + let sighash = bs58.encode(ix.slice(0, 8)); + let data = ix.slice(8); + const decoder = this.sighashLayouts.get(sighash); + if (!decoder) { + return null; + } + return { + data: decoder.layout.decode(data), + name: decoder.name, + }; + } + + /** + * Returns a formatted table of all the fields in the given instruction data. + */ + public format( + ix: Instruction, + accountMetas: AccountMeta[] + ): InstructionDisplay | null { + return InstructionFormatter.format(ix, accountMetas, this.idl); + } +} + +export type Instruction = { + name: string; + data: Object; +}; + +export type InstructionDisplay = { + args: { name: string; type: string; data: string }[]; + accounts: { + name?: string; + pubkey: PublicKey; + isSigner: boolean; + isWritable: boolean; + }[]; +}; + +class InstructionFormatter { + public static format( + ix: Instruction, + accountMetas: AccountMeta[], + idl: Idl + ): InstructionDisplay | null { + const idlIx = idl.instructions.filter((i) => ix.name === i.name)[0]; + if (idlIx === undefined) { + console.error("Invalid instruction given"); + return null; + } + + const args = idlIx.args.map((idlField) => { + return { + name: idlField.name, + type: InstructionFormatter.formatIdlType(idlField.type), + data: InstructionFormatter.formatIdlData( + idlField, + ix.data[idlField.name], + idl.types + ), + }; + }); + + const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts( + idlIx.accounts + ); + + const accounts = accountMetas.map((meta, idx) => { + if (idx < flatIdlAccounts.length) { + return { + name: flatIdlAccounts[idx].name, + ...meta, + }; + } + // "Remaining accounts" are unnamed in Anchor. + else { + return { + name: undefined, + ...meta, + }; + } + }); + + return { + args, + accounts, + }; + } + + private static formatIdlType(idlType: IdlType): string { + if (typeof idlType === "string") { + return idlType as string; + } + + // @ts-ignore + if (idlType.vec) { + // @ts-ignore + return `Vec<${this.formatIdlType(idlType.vec)}>`; + } + // @ts-ignore + if (idlType.option) { + // @ts-ignore + return `Option<${this.formatIdlType(idlType.option)}>`; + } + // @ts-ignore + if (idlType.defined) { + // @ts-ignore + return idlType.defined; + } + } + + private static formatIdlData( + idlField: IdlField, + data: Object, + types?: IdlTypeDef[] + ): string { + if (typeof idlField.type === "string") { + return data.toString(); + } + // @ts-ignore + if (idlField.type.vec) { + // @ts-ignore + return ( + "[" + + data + // @ts-ignore + .map((d: IdlField) => + this.formatIdlData( + // @ts-ignore + { name: "", type: idlField.type.vec }, + d + ) + ) + .join(", ") + + "]" + ); + } + // @ts-ignore + if (idlField.type.option) { + // @ts-ignore + return data === null + ? "null" + : this.formatIdlData( + // @ts-ignore + { name: "", type: idlField.type.option }, + data + ); + } + // @ts-ignore + if (idlField.type.defined) { + if (types === undefined) { + throw new Error("User defined types not provided"); + } + // @ts-ignore + const filtered = types.filter((t) => t.name === idlField.type.defined); + if (filtered.length !== 1) { + // @ts-ignore + throw new Error(`Type not found: ${idlField.type.defined}`); + } + return InstructionFormatter.formatIdlDataDefined( + filtered[0], + data, + types + ); + } + + return "unknown"; + } + + private static formatIdlDataDefined( + typeDef: IdlTypeDef, + data: Object, + types: IdlTypeDef[] + ): string { + if (typeDef.type.kind === "struct") { + const fields = Object.keys(data) + .map((k) => { + const f = typeDef.type.fields.filter((f) => f.name === k)[0]; + if (f === undefined) { + throw new Error("Unable to find type"); + } + return ( + k + ": " + InstructionFormatter.formatIdlData(f, data[k], types) + ); + }) + .join(", "); + return "{ " + fields + " }"; + } else { + if (typeDef.type.variants.length === 0) { + return "{}"; + } + // Struct enum. + if (typeDef.type.variants[0].name) { + const variant = Object.keys(data)[0]; + const enumType = data[variant]; + const namedFields = Object.keys(enumType) + .map((f) => { + const fieldData = enumType[f]; + const idlField = typeDef.type.variants[variant]?.filter( + (v: IdlField) => v.name === f + )[0]; + if (idlField === undefined) { + throw new Error("Unable to find variant"); + } + return ( + f + + ": " + + InstructionFormatter.formatIdlData(idlField, fieldData, types) + ); + }) + .join(", "); + + const variantName = camelCase(variant, { pascalCase: true }); + if (namedFields.length === 0) { + return variantName; + } + return `${variantName} { ${namedFields} }`; + } + // Tuple enum. + else { + // TODO. + return "Tuple formatting not yet implemented"; + } + } + } + + private static flattenIdlAccounts( + accounts: IdlAccountItem[], + prefix?: string + ): IdlAccount[] { + // @ts-ignore + return accounts + .map((account) => { + const accName = sentenceCase(account.name); + // @ts-ignore + if (account.accounts) { + const newPrefix = prefix ? `${prefix} > ${accName}` : accName; + // @ts-ignore + return InstructionFormatter.flattenIdlAccounts( + // @ts-ignore + account.accounts, + newPrefix + ); + } else { + return { + ...account, + name: prefix ? `${prefix} > ${accName}` : accName, + }; + } + }) + .flat(); + } +} + +function sentenceCase(field: string): string { + const result = field.replace(/([A-Z])/g, " $1"); + return result.charAt(0).toUpperCase() + result.slice(1); +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/state.ts b/tests/node_modules/@project-serum/anchor/src/coder/state.ts new file mode 100644 index 0000000..e3f2482 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/state.ts @@ -0,0 +1,38 @@ +import { Layout } from "buffer-layout"; +import { sha256 } from "js-sha256"; +import { Idl } from "../idl"; +import { IdlCoder } from "./idl"; +import * as features from "../utils/features"; + +export class StateCoder { + private layout: Layout; + + public constructor(idl: Idl) { + if (idl.state === undefined) { + throw new Error("Idl state not defined."); + } + this.layout = IdlCoder.typeDefLayout(idl.state.struct, idl.types); + } + + public async encode(name: string, account: T): Promise { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const len = this.layout.encode(account, buffer); + + const disc = await stateDiscriminator(name); + const accData = buffer.slice(0, len); + + return Buffer.concat([disc, accData]); + } + + public decode(ix: Buffer): T { + // Chop off discriminator. + const data = ix.slice(8); + return this.layout.decode(data); + } +} + +// Calculates unique 8 byte discriminator prepended to all anchor state accounts. +export async function stateDiscriminator(name: string): Promise { + let ns = features.isSet("anchor-deprecated-state") ? "account" : "state"; + return Buffer.from(sha256.digest(`${ns}:${name}`)).slice(0, 8); +} diff --git a/tests/node_modules/@project-serum/anchor/src/coder/types.ts b/tests/node_modules/@project-serum/anchor/src/coder/types.ts new file mode 100644 index 0000000..da3807b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/coder/types.ts @@ -0,0 +1,38 @@ +import { Layout } from "buffer-layout"; +import { Idl } from "../idl"; +import { IdlCoder } from "./idl"; + +/** + * Encodes and decodes user defined types. + */ +export class TypesCoder { + /** + * Maps account type identifier to a layout. + */ + private layouts: Map; + + public constructor(idl: Idl) { + if (idl.types === undefined) { + this.layouts = new Map(); + return; + } + const layouts = idl.types.map((acc) => { + return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)]; + }); + + // @ts-ignore + this.layouts = new Map(layouts); + } + + public encode(accountName: string, account: T): Buffer { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const layout = this.layouts.get(accountName); + const len = layout.encode(account, buffer); + return buffer.slice(0, len); + } + + public decode(accountName: string, ix: Buffer): T { + const layout = this.layouts.get(accountName); + return layout.decode(ix); + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/error.ts b/tests/node_modules/@project-serum/anchor/src/error.ts new file mode 100644 index 0000000..beda8f6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/error.ts @@ -0,0 +1,174 @@ +export class IdlError extends Error {} + +// An error from a user defined program. +export class ProgramError extends Error { + constructor(readonly code: number, readonly msg: string, ...params: any[]) { + super(...params); + } + + public static parse( + err: any, + idlErrors: Map + ): ProgramError | null { + // TODO: don't rely on the error string. web3.js should preserve the error + // code information instead of giving us an untyped string. + let components = err.toString().split("custom program error: "); + if (components.length !== 2) { + return null; + } + + let errorCode: number; + try { + errorCode = parseInt(components[1]); + } catch (parseErr) { + return null; + } + + // Parse user error. + let errorMsg = idlErrors.get(errorCode); + if (errorMsg !== undefined) { + return new ProgramError(errorCode, errorMsg); + } + + // Parse framework internal error. + errorMsg = LangErrorMessage.get(errorCode); + if (errorMsg !== undefined) { + return new ProgramError(errorCode, errorMsg); + } + + // Unable to parse the error. Just return the untranslated error. + return null; + } + + public toString(): string { + return this.msg; + } +} + +const LangErrorCode = { + // Instructions. + InstructionMissing: 100, + InstructionFallbackNotFound: 101, + InstructionDidNotDeserialize: 102, + InstructionDidNotSerialize: 103, + + // IDL instructions. + IdlInstructionStub: 120, + IdlInstructionInvalidProgram: 121, + + // Constraints. + ConstraintMut: 140, + ConstraintHasOne: 141, + ConstraintSigner: 142, + ConstraintRaw: 143, + ConstraintOwner: 144, + ConstraintRentExempt: 145, + ConstraintSeeds: 146, + ConstraintExecutable: 147, + ConstraintState: 148, + ConstraintAssociated: 149, + ConstraintAssociatedInit: 150, + ConstraintClose: 151, + ConstraintAddress: 152, + + // Accounts. + AccountDiscriminatorAlreadySet: 160, + AccountDiscriminatorNotFound: 161, + AccountDiscriminatorMismatch: 162, + AccountDidNotDeserialize: 163, + AccountDidNotSerialize: 164, + AccountNotEnoughKeys: 165, + AccountNotMutable: 166, + AccountNotProgramOwned: 167, + + // State. + StateInvalidAddress: 180, + + // Used for APIs that shouldn't be used anymore. + Deprecated: 299, +}; + +const LangErrorMessage = new Map([ + // Instructions. + [ + LangErrorCode.InstructionMissing, + "8 byte instruction identifier not provided", + ], + [ + LangErrorCode.InstructionFallbackNotFound, + "Fallback functions are not supported", + ], + [ + LangErrorCode.InstructionDidNotDeserialize, + "The program could not deserialize the given instruction", + ], + [ + LangErrorCode.InstructionDidNotSerialize, + "The program could not serialize the given instruction", + ], + + // Idl instructions. + [ + LangErrorCode.IdlInstructionStub, + "The program was compiled without idl instructions", + ], + [ + LangErrorCode.IdlInstructionInvalidProgram, + "The transaction was given an invalid program for the IDL instruction", + ], + + // Constraints. + [LangErrorCode.ConstraintMut, "A mut constraint was violated"], + [LangErrorCode.ConstraintHasOne, "A has_one constraint was violated"], + [LangErrorCode.ConstraintSigner, "A signer constraint was violated"], + [LangErrorCode.ConstraintRaw, "A raw constraint as violated"], + [LangErrorCode.ConstraintOwner, "An owner constraint was violated"], + [LangErrorCode.ConstraintRentExempt, "A rent exempt constraint was violated"], + [LangErrorCode.ConstraintSeeds, "A seeds constraint was violated"], + [LangErrorCode.ConstraintExecutable, "An executable constraint was violated"], + [LangErrorCode.ConstraintState, "A state constraint was violated"], + [LangErrorCode.ConstraintAssociated, "An associated constraint was violated"], + [ + LangErrorCode.ConstraintAssociatedInit, + "An associated init constraint was violated", + ], + [LangErrorCode.ConstraintClose, "A close constraint was violated"], + [LangErrorCode.ConstraintAddress, "An address constraint was violated"], + + // Accounts. + [ + LangErrorCode.AccountDiscriminatorAlreadySet, + "The account discriminator was already set on this account", + ], + [ + LangErrorCode.AccountDiscriminatorNotFound, + "No 8 byte discriminator was found on the account", + ], + [ + LangErrorCode.AccountDiscriminatorMismatch, + "8 byte discriminator did not match what was expected", + ], + [LangErrorCode.AccountDidNotDeserialize, "Failed to deserialize the account"], + [LangErrorCode.AccountDidNotSerialize, "Failed to serialize the account"], + [ + LangErrorCode.AccountNotEnoughKeys, + "Not enough account keys given to the instruction", + ], + [LangErrorCode.AccountNotMutable, "The given account is not mutable"], + [ + LangErrorCode.AccountNotProgramOwned, + "The given account is not owned by the executing program", + ], + + // State. + [ + LangErrorCode.StateInvalidAddress, + "The given state account does not have the correct address", + ], + + // Misc. + [ + LangErrorCode.Deprecated, + "The API being used is deprecated and should no longer be used", + ], +]); diff --git a/tests/node_modules/@project-serum/anchor/src/idl.ts b/tests/node_modules/@project-serum/anchor/src/idl.ts new file mode 100644 index 0000000..95aab38 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/idl.ts @@ -0,0 +1,150 @@ +import { PublicKey } from "@solana/web3.js"; +import * as borsh from "@project-serum/borsh"; + +export type Idl = { + version: string; + name: string; + instructions: IdlInstruction[]; + state?: IdlState; + accounts?: IdlTypeDef[]; + types?: IdlTypeDef[]; + events?: IdlEvent[]; + errors?: IdlErrorCode[]; +}; + +export type IdlEvent = { + name: string; + fields: IdlEventField[]; +}; + +export type IdlEventField = { + name: string; + type: IdlType; + index: boolean; +}; + +export type IdlInstruction = { + name: string; + accounts: IdlAccountItem[]; + args: IdlField[]; +}; + +export type IdlState = { + struct: IdlTypeDef; + methods: IdlStateMethod[]; +}; + +export type IdlStateMethod = IdlInstruction; + +export type IdlAccountItem = IdlAccount | IdlAccounts; + +export type IdlAccount = { + name: string; + isMut: boolean; + isSigner: boolean; +}; + +// A nested/recursive version of IdlAccount. +export type IdlAccounts = { + name: string; + accounts: IdlAccountItem[]; +}; + +export type IdlField = { + name: string; + type: IdlType; +}; + +export type IdlTypeDef = { + name: string; + type: IdlTypeDefTy; +}; + +type IdlTypeDefTy = { + kind: "struct" | "enum"; + fields?: IdlTypeDefStruct; + variants?: IdlEnumVariant[]; +}; + +type IdlTypeDefStruct = Array; + +export type IdlType = + | "bool" + | "u8" + | "i8" + | "u16" + | "i16" + | "u32" + | "i32" + | "u64" + | "i64" + | "u128" + | "i128" + | "bytes" + | "string" + | "publicKey" + | IdlTypeVec + | IdlTypeOption + | IdlTypeDefined; + +export type IdlTypeVec = { + vec: IdlType; +}; + +export type IdlTypeOption = { + option: IdlType; +}; + +// User defined type. +export type IdlTypeDefined = { + defined: string; +}; + +export type IdlEnumVariant = { + name: string; + fields?: IdlEnumFields; +}; + +type IdlEnumFields = IdlEnumFieldsNamed | IdlEnumFieldsTuple; + +type IdlEnumFieldsNamed = IdlField[]; + +type IdlEnumFieldsTuple = IdlType[]; + +type IdlErrorCode = { + code: number; + name: string; + msg?: string; +}; + +// Deterministic IDL address as a function of the program id. +export async function idlAddress(programId: PublicKey): Promise { + const base = (await PublicKey.findProgramAddress([], programId))[0]; + return await PublicKey.createWithSeed(base, seed(), programId); +} + +// Seed for generating the idlAddress. +export function seed(): string { + return "anchor:idl"; +} + +// The on-chain account of the IDL. +export interface IdlProgramAccount { + authority: PublicKey; + data: Buffer; +} + +const IDL_ACCOUNT_LAYOUT: borsh.Layout = borsh.struct([ + borsh.publicKey("authority"), + borsh.vecU8("data"), +]); + +export function decodeIdlAccount(data: Buffer): IdlProgramAccount { + return IDL_ACCOUNT_LAYOUT.decode(data); +} + +export function encodeIdlAccount(acc: IdlProgramAccount): Buffer { + const buffer = Buffer.alloc(1000); // TODO: use a tighter buffer. + const len = IDL_ACCOUNT_LAYOUT.encode(acc, buffer); + return buffer.slice(0, len); +} diff --git a/tests/node_modules/@project-serum/anchor/src/index.ts b/tests/node_modules/@project-serum/anchor/src/index.ts new file mode 100644 index 0000000..81283d3 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/index.ts @@ -0,0 +1,74 @@ +import BN from "bn.js"; +import * as web3 from "@solana/web3.js"; +import Provider, { + getProvider, + setProvider, + NodeWallet as Wallet, +} from "./provider"; +import Coder, { + InstructionCoder, + EventCoder, + StateCoder, + TypesCoder, + AccountsCoder, +} from "./coder"; +import { Instruction } from "./coder/instruction"; +import { Idl } from "./idl"; +import workspace from "./workspace"; +import * as utils from "./utils"; +import { Program } from "./program"; +import { Address } from "./program/common"; +import { Event } from "./program/event"; +import { + ProgramAccount, + AccountNamespace, + AccountClient, + StateClient, + RpcNamespace, + RpcFn, + SimulateNamespace, + SimulateFn, + TransactionNamespace, + TransactionFn, + InstructionNamespace, + InstructionFn, +} from "./program/namespace"; +import { Context, Accounts } from "./program/context"; +import { EventParser } from "./program/event"; + +export { + workspace, + Program, + AccountNamespace, + AccountClient, + StateClient, + RpcNamespace, + RpcFn, + SimulateNamespace, + SimulateFn, + TransactionNamespace, + TransactionFn, + InstructionNamespace, + InstructionFn, + ProgramAccount, + Context, + Accounts, + Coder, + InstructionCoder, + EventCoder, + StateCoder, + TypesCoder, + AccountsCoder, + Event, + Instruction, + setProvider, + getProvider, + Provider, + BN, + web3, + Idl, + utils, + Wallet, + Address, + EventParser, +}; diff --git a/tests/node_modules/@project-serum/anchor/src/program/common.ts b/tests/node_modules/@project-serum/anchor/src/program/common.ts new file mode 100644 index 0000000..0587a8b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/common.ts @@ -0,0 +1,72 @@ +import EventEmitter from "eventemitter3"; +import { PublicKey } from "@solana/web3.js"; +import { Idl, IdlInstruction, IdlAccountItem, IdlStateMethod } from "../idl"; +import { Accounts } from "./context"; + +export type Subscription = { + listener: number; + ee: EventEmitter; +}; + +export function parseIdlErrors(idl: Idl): Map { + const errors = new Map(); + if (idl.errors) { + idl.errors.forEach((e) => { + let msg = e.msg ?? e.name; + errors.set(e.code, msg); + }); + } + return errors; +} + +// Allow either IdLInstruction or IdlStateMethod since the types share fields. +export function toInstruction( + idlIx: IdlInstruction | IdlStateMethod, + ...args: any[] +) { + if (idlIx.args.length != args.length) { + throw new Error("Invalid argument length"); + } + const ix: { [key: string]: any } = {}; + let idx = 0; + idlIx.args.forEach((ixArg) => { + ix[ixArg.name] = args[idx]; + idx += 1; + }); + + return ix; +} + +// Throws error if any account required for the `ix` is not given. +export function validateAccounts( + ixAccounts: IdlAccountItem[], + accounts: Accounts +) { + ixAccounts.forEach((acc) => { + // @ts-ignore + if (acc.accounts !== undefined) { + // @ts-ignore + validateAccounts(acc.accounts, accounts[acc.name]); + } else { + if (accounts[acc.name] === undefined) { + throw new Error(`Invalid arguments: ${acc.name} not provided.`); + } + } + }); +} + +// Translates an address to a Pubkey. +export function translateAddress(address: Address): PublicKey { + if (typeof address === "string") { + const pk = new PublicKey(address); + return pk; + } else { + return address; + } +} + +/** + * An address to identify an account on chain. Can be a [[PublicKey]], + * or Base 58 encoded string. + */ +export type Address = PublicKey | string; diff --git a/tests/node_modules/@project-serum/anchor/src/program/context.ts b/tests/node_modules/@project-serum/anchor/src/program/context.ts new file mode 100644 index 0000000..721f413 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/context.ts @@ -0,0 +1,77 @@ +import { + AccountMeta, + Signer, + ConfirmOptions, + TransactionInstruction, +} from "@solana/web3.js"; +import { Address } from "./common"; +import { IdlInstruction } from "../idl"; + +/** + * Context provides all non-argument inputs for generating Anchor transactions. + */ +export type Context = { + /** + * Accounts used in the instruction context. + */ + accounts?: Accounts; + + /** + * All accounts to pass into an instruction *after* the main `accounts`. + * This can be used for optional or otherwise unknown accounts. + */ + remainingAccounts?: AccountMeta[]; + + /** + * Accounts that must sign a given transaction. + */ + signers?: Array; + + /** + * Instructions to run *before* a given method. Often this is used, for + * example to create accounts prior to executing a method. + */ + instructions?: TransactionInstruction[]; + + /** + * Commitment parameters to use for a transaction. + */ + options?: ConfirmOptions; + + /** + * @hidden + * + * Private namespace for development. + */ + __private?: { logAccounts: boolean }; +}; + +/** + * A set of accounts mapping one-to-one to the program's accounts struct, i.e., + * the type deriving `#[derive(Accounts)]`. + * + * The name of each field should match the name for that account in the IDL. + * + * If multiple accounts are nested in the rust program, then they should be + * nested here. + */ +export type Accounts = { + [key: string]: Address | Accounts; +}; + +export function splitArgsAndCtx( + idlIx: IdlInstruction, + args: any[] +): [any[], Context] { + let options = {}; + + const inputLen = idlIx.args ? idlIx.args.length : 0; + if (args.length > inputLen) { + if (args.length !== inputLen + 1) { + throw new Error("provided too many arguments ${args}"); + } + options = args.pop(); + } + + return [args, options]; +} diff --git a/tests/node_modules/@project-serum/anchor/src/program/event.ts b/tests/node_modules/@project-serum/anchor/src/program/event.ts new file mode 100644 index 0000000..ab35e6d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/event.ts @@ -0,0 +1,275 @@ +import { PublicKey } from "@solana/web3.js"; +import * as assert from "assert"; +import Coder from "../coder"; +import Provider from "../provider"; + +const LOG_START_INDEX = "Program log: ".length; + +// Deserialized event. +export type Event = { + name: string; + data: Object; +}; + +type EventCallback = (event: any, slot: number) => void; + +export class EventManager { + /** + * Program ID for event subscriptions. + */ + private _programId: PublicKey; + + /** + * Network and wallet provider. + */ + private _provider: Provider; + + /** + * Event parser to handle onLogs callbacks. + */ + private _eventParser: EventParser; + + /** + * Maps event listener id to [event-name, callback]. + */ + private _eventCallbacks: Map; + + /** + * Maps event name to all listeners for the event. + */ + private _eventListeners: Map>; + + /** + * The next listener id to allocate. + */ + private _listenerIdCount: number; + + /** + * The subscription id from the connection onLogs subscription. + */ + private _onLogsSubscriptionId: number | undefined; + + constructor(programId: PublicKey, provider: Provider, coder: Coder) { + this._programId = programId; + this._provider = provider; + this._eventParser = new EventParser(programId, coder); + this._eventCallbacks = new Map(); + this._eventListeners = new Map(); + this._listenerIdCount = 0; + } + + public addEventListener( + eventName: string, + callback: (event: any, slot: number) => void + ): number { + let listener = this._listenerIdCount; + this._listenerIdCount += 1; + + // Store the listener into the event map. + if (!(eventName in this._eventCallbacks)) { + this._eventListeners.set(eventName, []); + } + this._eventListeners.set( + eventName, + this._eventListeners.get(eventName).concat(listener) + ); + + // Store the callback into the listener map. + this._eventCallbacks.set(listener, [eventName, callback]); + + // Create the subscription singleton, if needed. + if (this._onLogsSubscriptionId !== undefined) { + return; + } + this._onLogsSubscriptionId = this._provider.connection.onLogs( + this._programId, + (logs, ctx) => { + if (logs.err) { + console.error(logs); + return; + } + this._eventParser.parseLogs(logs.logs, (event) => { + const allListeners = this._eventListeners.get(eventName); + if (allListeners) { + allListeners.forEach((listener) => { + const [, callback] = this._eventCallbacks.get(listener); + callback(event.data, ctx.slot); + }); + } + }); + } + ); + + return listener; + } + + public async removeEventListener(listener: number): Promise { + // Get the callback. + const callback = this._eventCallbacks.get(listener); + if (!callback) { + throw new Error(`Event listener ${listener} doesn't exist!`); + } + const [eventName] = callback; + + // Get the listeners. + let listeners = this._eventListeners.get(eventName); + if (!listeners) { + throw new Error(`Event listeners dont' exist for ${eventName}!`); + } + + // Update both maps. + this._eventCallbacks.delete(listener); + listeners = listeners.filter((l) => l !== listener); + if (listeners.length === 0) { + this._eventListeners.delete(eventName); + } + + // Kill the websocket connection if all listeners have been removed. + if (this._eventCallbacks.size == 0) { + assert.ok(this._eventListeners.size === 0); + await this._provider.connection.removeOnLogsListener( + this._onLogsSubscriptionId + ); + this._onLogsSubscriptionId = undefined; + } + } +} + +export class EventParser { + private coder: Coder; + private programId: PublicKey; + + constructor(programId: PublicKey, coder: Coder) { + this.coder = coder; + this.programId = programId; + } + + // Each log given, represents an array of messages emitted by + // a single transaction, which can execute many different programs across + // CPI boundaries. However, the subscription is only interested in the + // events emitted by *this* program. In achieving this, we keep track of the + // program execution context by parsing each log and looking for a CPI + // `invoke` call. If one exists, we know a new program is executing. So we + // push the programId onto a stack and switch the program context. This + // allows us to track, for a given log, which program was executing during + // its emission, thereby allowing us to know if a given log event was + // emitted by *this* program. If it was, then we parse the raw string and + // emit the event if the string matches the event being subscribed to. + public parseLogs(logs: string[], callback: (log: Event) => void) { + const logScanner = new LogScanner(logs); + const execution = new ExecutionContext(logScanner.next() as string); + let log = logScanner.next(); + while (log !== null) { + let [event, newProgram, didPop] = this.handleLog(execution, log); + if (event) { + callback(event); + } + if (newProgram) { + execution.push(newProgram); + } + if (didPop) { + execution.pop(); + } + log = logScanner.next(); + } + } + + // Main log handler. Returns a three element array of the event, the + // next program that was invoked for CPI, and a boolean indicating if + // a program has completed execution (and thus should be popped off the + // execution stack). + private handleLog( + execution: ExecutionContext, + log: string + ): [Event | null, string | null, boolean] { + // Executing program is this program. + if ( + execution.stack.length > 0 && + execution.program() === this.programId.toString() + ) { + return this.handleProgramLog(log); + } + // Executing program is not this program. + else { + return [null, ...this.handleSystemLog(log)]; + } + } + + // Handles logs from *this* program. + private handleProgramLog( + log: string + ): [Event | null, string | null, boolean] { + // This is a `msg!` log. + if (log.startsWith("Program log:")) { + const logStr = log.slice(LOG_START_INDEX); + const event = this.coder.events.decode(logStr); + return [event, null, false]; + } + // System log. + else { + return [null, ...this.handleSystemLog(log)]; + } + } + + // Handles logs when the current program being executing is *not* this. + private handleSystemLog(log: string): [string | null, boolean] { + // System component. + const logStart = log.split(":")[0]; + + // Did the program finish executing? + if (logStart.match(/^Program (.*) success/g) !== null) { + return [null, true]; + // Recursive call. + } else if ( + logStart.startsWith(`Program ${this.programId.toString()} invoke`) + ) { + return [this.programId.toString(), false]; + } + // CPI call. + else if (logStart.includes("invoke")) { + return ["cpi", false]; // Any string will do. + } else { + return [null, false]; + } + } +} + +// Stack frame execution context, allowing one to track what program is +// executing for a given log. +class ExecutionContext { + stack: string[]; + + constructor(log: string) { + // Assumes the first log in every transaction is an `invoke` log from the + // runtime. + const program = /^Program (.*) invoke.*$/g.exec(log)[1]; + this.stack = [program]; + } + + program(): string { + assert.ok(this.stack.length > 0); + return this.stack[this.stack.length - 1]; + } + + push(newProgram: string) { + this.stack.push(newProgram); + } + + pop() { + assert.ok(this.stack.length > 0); + this.stack.pop(); + } +} + +class LogScanner { + constructor(public logs: string[]) {} + + next(): string | null { + if (this.logs.length === 0) { + return null; + } + let l = this.logs[0]; + this.logs = this.logs.slice(1); + return l; + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/program/index.ts b/tests/node_modules/@project-serum/anchor/src/program/index.ts new file mode 100644 index 0000000..8831cf2 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/index.ts @@ -0,0 +1,336 @@ +import { inflate } from "pako"; +import { PublicKey } from "@solana/web3.js"; +import Provider from "../provider"; +import { Idl, idlAddress, decodeIdlAccount } from "../idl"; +import Coder from "../coder"; +import NamespaceFactory, { + RpcNamespace, + InstructionNamespace, + TransactionNamespace, + AccountNamespace, + StateClient, + SimulateNamespace, +} from "./namespace"; +import { getProvider } from "../"; +import { utf8 } from "../utils/bytes"; +import { EventManager } from "./event"; +import { Address, translateAddress } from "./common"; + +/** + * ## Program + * + * Program provides the IDL deserialized client representation of an Anchor + * program. + * + * This API is the one stop shop for all things related to communicating with + * on-chain programs. Among other things, one can send transactions, fetch + * deserialized accounts, decode instruction data, subscribe to account + * changes, and listen to events. + * + * In addition to field accessors and methods, the object provides a set of + * dynamically generated properties, also known as namespaces, that + * map one-to-one to program methods and accounts. These namespaces generally + * can be used as follows: + * + * ## Usage + * + * ```javascript + * program.. + * ``` + * + * API specifics are namespace dependent. The examples used in the documentation + * below will refer to the two counter examples found + * [here](https://github.com/project-serum/anchor#examples). + */ +export class Program { + /** + * Async methods to send signed transactions to *non*-state methods on the + * program, returning a [[TransactionSignature]]. + * + * ## Usage + * + * ```javascript + * rpc.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To send a transaction invoking the `increment` method above, + * + * ```javascript + * const txSignature = await program.rpc.increment({ + * accounts: { + * counter, + * authority, + * }, + * }); + * ``` + */ + readonly rpc: RpcNamespace; + + /** + * The namespace provides handles to an [[AccountClient]] object for each + * account in the program. + * + * ## Usage + * + * ```javascript + * program.account. + * ``` + * + * ## Example + * + * To fetch a `Counter` account from the above example, + * + * ```javascript + * const counter = await program.account.counter.fetch(address); + * ``` + * + * For the full API, see the [[AccountClient]] reference. + */ + readonly account: AccountNamespace; + + /** + * The namespace provides functions to build [[TransactionInstruction]] + * objects for each method of a program. + * + * ## Usage + * + * ```javascript + * program.instruction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.instruction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ + readonly instruction: InstructionNamespace; + + /** + * The namespace provides functions to build [[Transaction]] objects for each + * method of a program. + * + * ## Usage + * + * ```javascript + * program.transaction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.transaction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ + readonly transaction: TransactionNamespace; + + /** + * The namespace provides functions to simulate transactions for each method + * of a program, returning a list of deserialized events *and* raw program + * logs. + * + * One can use this to read data calculated from a program on chain, by + * emitting an event in the program and reading the emitted event client side + * via the `simulate` namespace. + * + * ## simulate + * + * ```javascript + * program.simulate.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To simulate the `increment` method above, + * + * ```javascript + * const events = await program.simulate.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ + readonly simulate: SimulateNamespace; + + /** + * A client for the program state. Similar to the base [[Program]] client, + * one can use this to send transactions and read accounts for the state + * abstraction. + */ + readonly state: StateClient; + + /** + * Address of the program. + */ + public get programId(): PublicKey { + return this._programId; + } + private _programId: PublicKey; + + /** + * IDL defining the program's interface. + */ + public get idl(): Idl { + return this._idl; + } + private _idl: Idl; + + /** + * Coder for serializing requests. + */ + public get coder(): Coder { + return this._coder; + } + private _coder: Coder; + + /** + * Wallet and network provider. + */ + public get provider(): Provider { + return this._provider; + } + private _provider: Provider; + + /** + * Handles event subscriptions. + */ + private _events: EventManager; + + /** + * @param idl The interface definition. + * @param programId The on-chain address of the program. + * @param provider The network and wallet context to use. If not provided + * then uses [[getProvider]]. + */ + public constructor(idl: Idl, programId: Address, provider?: Provider) { + programId = translateAddress(programId); + + // Fields. + this._idl = idl; + this._programId = programId; + this._provider = provider ?? getProvider(); + this._coder = new Coder(idl); + this._events = new EventManager( + this._programId, + this._provider, + this._coder + ); + + // Dynamic namespaces. + const [ + rpc, + instruction, + transaction, + account, + simulate, + state, + ] = NamespaceFactory.build(idl, this._coder, programId, this._provider); + this.rpc = rpc; + this.instruction = instruction; + this.transaction = transaction; + this.account = account; + this.simulate = simulate; + this.state = state; + } + + /** + * Generates a Program client by fetching the IDL from the network. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + public static async at(address: Address, provider?: Provider) { + const programId = translateAddress(address); + + const idl = await Program.fetchIdl(programId, provider); + return new Program(idl, programId, provider); + } + + /** + * Fetches an idl from the blockchain. + * + * In order to use this method, an IDL must have been previously initialized + * via the anchor CLI's `anchor idl init` command. + * + * @param programId The on-chain address of the program. + * @param provider The network and wallet context. + */ + public static async fetchIdl(address: Address, provider?: Provider) { + provider = provider ?? getProvider(); + const programId = translateAddress(address); + + const idlAddr = await idlAddress(programId); + const accountInfo = await provider.connection.getAccountInfo(idlAddr); + // Chop off account discriminator. + let idlAccount = decodeIdlAccount(accountInfo.data.slice(8)); + const inflatedIdl = inflate(idlAccount.data); + return JSON.parse(utf8.decode(inflatedIdl)); + } + + /** + * Invokes the given callback every time the given event is emitted. + * + * @param eventName The PascalCase name of the event, provided by the IDL. + * @param callback The function to invoke whenever the event is emitted from + * program logs. + */ + public addEventListener( + eventName: string, + callback: (event: any, slot: number) => void + ): number { + return this._events.addEventListener(eventName, callback); + } + + /** + * Unsubscribes from the given eventName. + */ + public async removeEventListener(listener: number): Promise { + return await this._events.removeEventListener(listener); + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/account.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/account.ts new file mode 100644 index 0000000..11dac65 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/account.ts @@ -0,0 +1,276 @@ +import camelCase from "camelcase"; +import EventEmitter from "eventemitter3"; +import * as bs58 from "bs58"; +import { + Signer, + PublicKey, + SystemProgram, + TransactionInstruction, + Commitment, +} from "@solana/web3.js"; +import Provider from "../../provider"; +import { Idl, IdlTypeDef } from "../../idl"; +import Coder, { + ACCOUNT_DISCRIMINATOR_SIZE, + accountDiscriminator, + accountSize, +} from "../../coder"; +import { Subscription, Address, translateAddress } from "../common"; +import { getProvider } from "../../"; +import * as pubkeyUtil from "../../utils/pubkey"; + +export default class AccountFactory { + public static build( + idl: Idl, + coder: Coder, + programId: PublicKey, + provider: Provider + ): AccountNamespace { + const accountFns: AccountNamespace = {}; + + idl.accounts.forEach((idlAccount) => { + const name = camelCase(idlAccount.name); + accountFns[name] = new AccountClient( + idl, + idlAccount, + programId, + provider, + coder + ); + }); + + return accountFns; + } +} + +/** + * The namespace provides handles to an [[AccountClient]] object for each + * account in a program. + * + * ## Usage + * + * ```javascript + * account. + * ``` + * + * ## Example + * + * To fetch a `Counter` account from the above example, + * + * ```javascript + * const counter = await program.account.counter.fetch(address); + * ``` + * + * For the full API, see the [[AccountClient]] reference. + */ +export interface AccountNamespace { + [key: string]: AccountClient; +} + +export class AccountClient { + /** + * Returns the number of bytes in this account. + */ + get size(): number { + return this._size; + } + private _size: number; + + /** + * Returns the program ID owning all accounts. + */ + get programId(): PublicKey { + return this._programId; + } + private _programId: PublicKey; + + /** + * Returns the client's wallet and network provider. + */ + get provider(): Provider { + return this._provider; + } + private _provider: Provider; + + /** + * Returns the coder. + */ + get coder(): Coder { + return this._coder; + } + private _coder: Coder; + + private _idlAccount: IdlTypeDef; + + constructor( + idl: Idl, + idlAccount: IdlTypeDef, + programId: PublicKey, + provider?: Provider, + coder?: Coder + ) { + this._idlAccount = idlAccount; + this._programId = programId; + this._provider = provider ?? getProvider(); + this._coder = coder ?? new Coder(idl); + this._size = ACCOUNT_DISCRIMINATOR_SIZE + accountSize(idl, idlAccount); + } + + /** + * Returns a deserialized account. + * + * @param address The address of the account to fetch. + */ + async fetch(address: Address): Promise { + const accountInfo = await this._provider.connection.getAccountInfo( + translateAddress(address) + ); + if (accountInfo === null) { + throw new Error(`Account does not exist ${address.toString()}`); + } + + // Assert the account discriminator is correct. + const discriminator = await accountDiscriminator(this._idlAccount.name); + if (discriminator.compare(accountInfo.data.slice(0, 8))) { + throw new Error("Invalid account discriminator"); + } + + return this._coder.accounts.decode(this._idlAccount.name, accountInfo.data); + } + + /** + * Returns all instances of this account type for the program. + */ + async all(filter?: Buffer): Promise[]> { + let bytes = await accountDiscriminator(this._idlAccount.name); + if (filter !== undefined) { + bytes = Buffer.concat([bytes, filter]); + } + + let resp = await this._provider.connection.getProgramAccounts( + this._programId, + { + commitment: this._provider.connection.commitment, + filters: [ + { + memcmp: { + offset: 0, + bytes: bs58.encode(bytes), + }, + }, + ], + } + ); + return resp.map(({ pubkey, account }) => { + return { + publicKey: pubkey, + account: this._coder.accounts.decode( + this._idlAccount.name, + account.data + ), + }; + }); + } + + /** + * Returns an `EventEmitter` emitting a "change" event whenever the account + * changes. + */ + subscribe(address: Address, commitment?: Commitment): EventEmitter { + if (subscriptions.get(address.toString())) { + return subscriptions.get(address.toString()).ee; + } + + const ee = new EventEmitter(); + address = translateAddress(address); + const listener = this._provider.connection.onAccountChange( + address, + (acc) => { + const account = this._coder.accounts.decode( + this._idlAccount.name, + acc.data + ); + ee.emit("change", account); + }, + commitment + ); + + subscriptions.set(address.toString(), { + ee, + listener, + }); + + return ee; + } + + /** + * Unsubscribes from the account at the given address. + */ + unsubscribe(address: Address) { + let sub = subscriptions.get(address.toString()); + if (!sub) { + console.warn("Address is not subscribed"); + return; + } + if (subscriptions) { + this._provider.connection + .removeAccountChangeListener(sub.listener) + .then(() => { + subscriptions.delete(address.toString()); + }) + .catch(console.error); + } + } + + /** + * Returns an instruction for creating this account. + */ + async createInstruction( + signer: Signer, + sizeOverride?: number + ): Promise { + const size = this.size; + + return SystemProgram.createAccount({ + fromPubkey: this._provider.wallet.publicKey, + newAccountPubkey: signer.publicKey, + space: sizeOverride ?? size, + lamports: await this._provider.connection.getMinimumBalanceForRentExemption( + sizeOverride ?? size + ), + programId: this._programId, + }); + } + + /** + * Function returning the associated account. Args are keys to associate. + * Order matters. + */ + async associated(...args: Array): Promise { + const addr = await this.associatedAddress(...args); + return await this.fetch(addr); + } + + /** + * Function returning the associated address. Args are keys to associate. + * Order matters. + */ + async associatedAddress( + ...args: Array + ): Promise { + return await pubkeyUtil.associated(this._programId, ...args); + } +} + +/** + * @hidden + * + * Deserialized account owned by a program. + */ +export type ProgramAccount = { + publicKey: PublicKey; + account: T; +}; + +// Tracks all subscriptions. +const subscriptions: Map = new Map(); diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/index.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/index.ts new file mode 100644 index 0000000..d3443a9 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/index.ts @@ -0,0 +1,80 @@ +import camelCase from "camelcase"; +import { PublicKey } from "@solana/web3.js"; +import Coder from "../../coder"; +import Provider from "../../provider"; +import { Idl } from "../../idl"; +import StateFactory, { StateClient } from "./state"; +import InstructionFactory, { InstructionNamespace } from "./instruction"; +import TransactionFactory, { TransactionNamespace } from "./transaction"; +import RpcFactory, { RpcNamespace } from "./rpc"; +import AccountFactory, { AccountNamespace } from "./account"; +import SimulateFactory, { SimulateNamespace } from "./simulate"; +import { parseIdlErrors } from "../common"; + +// Re-exports. +export { StateClient } from "./state"; +export { InstructionNamespace, InstructionFn } from "./instruction"; +export { TransactionNamespace, TransactionFn } from "./transaction"; +export { RpcNamespace, RpcFn } from "./rpc"; +export { AccountNamespace, AccountClient, ProgramAccount } from "./account"; +export { SimulateNamespace, SimulateFn } from "./simulate"; + +export default class NamespaceFactory { + /** + * Generates all namespaces for a given program. + */ + public static build( + idl: Idl, + coder: Coder, + programId: PublicKey, + provider: Provider + ): [ + RpcNamespace, + InstructionNamespace, + TransactionNamespace, + AccountNamespace, + SimulateNamespace, + StateClient + ] { + const rpc: RpcNamespace = {}; + const instruction: InstructionNamespace = {}; + const transaction: TransactionNamespace = {}; + const simulate: SimulateNamespace = {}; + + const idlErrors = parseIdlErrors(idl); + + const state = StateFactory.build(idl, coder, programId, provider); + + idl.instructions.forEach((idlIx) => { + const ixItem = InstructionFactory.build( + idlIx, + (ixName: string, ix: any) => coder.instruction.encode(ixName, ix), + programId + ); + const txItem = TransactionFactory.build(idlIx, ixItem); + const rpcItem = RpcFactory.build(idlIx, txItem, idlErrors, provider); + const simulateItem = SimulateFactory.build( + idlIx, + txItem, + idlErrors, + provider, + coder, + programId, + idl + ); + + const name = camelCase(idlIx.name); + + instruction[name] = ixItem; + transaction[name] = txItem; + rpc[name] = rpcItem; + simulate[name] = simulateItem; + }); + + const account = idl.accounts + ? AccountFactory.build(idl, coder, programId, provider) + : {}; + + return [rpc, instruction, transaction, account, simulate, state]; + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/instruction.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/instruction.ts new file mode 100644 index 0000000..92fc501 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/instruction.ts @@ -0,0 +1,124 @@ +import { PublicKey, TransactionInstruction } from "@solana/web3.js"; +import { IdlAccount, IdlInstruction, IdlAccountItem } from "../../idl"; +import { IdlError } from "../../error"; +import { + toInstruction, + validateAccounts, + translateAddress, + Address, +} from "../common"; +import { Accounts, splitArgsAndCtx } from "../context"; + +export default class InstructionNamespaceFactory { + public static build( + idlIx: IdlInstruction, + encodeFn: InstructionEncodeFn, + programId: PublicKey + ): InstructionFn { + if (idlIx.name === "_inner") { + throw new IdlError("the _inner name is reserved"); + } + + const ix = (...args: any[]): TransactionInstruction => { + const [ixArgs, ctx] = splitArgsAndCtx(idlIx, [...args]); + validateAccounts(idlIx.accounts, ctx.accounts); + validateInstruction(idlIx, ...args); + + const keys = ix.accounts(ctx.accounts); + + if (ctx.remainingAccounts !== undefined) { + keys.push(...ctx.remainingAccounts); + } + + if (ctx.__private && ctx.__private.logAccounts) { + console.log("Outgoing account metas:", keys); + } + return new TransactionInstruction({ + keys, + programId, + data: encodeFn(idlIx.name, toInstruction(idlIx, ...ixArgs)), + }); + }; + + // Utility fn for ordering the accounts for this instruction. + ix["accounts"] = (accs: Accounts) => { + return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts); + }; + + return ix; + } + + public static accountsArray(ctx: Accounts, accounts: IdlAccountItem[]): any { + return accounts + .map((acc: IdlAccountItem) => { + // Nested accounts. + // @ts-ignore + const nestedAccounts: IdlAccountItem[] | undefined = acc.accounts; + if (nestedAccounts !== undefined) { + const rpcAccs = ctx[acc.name] as Accounts; + return InstructionNamespaceFactory.accountsArray( + rpcAccs, + nestedAccounts + ).flat(); + } else { + const account: IdlAccount = acc as IdlAccount; + return { + pubkey: translateAddress(ctx[acc.name] as Address), + isWritable: account.isMut, + isSigner: account.isSigner, + }; + } + }) + .flat(); + } +} + +/** + * The namespace provides functions to build [[TransactionInstruction]] + * objects for each method of a program. + * + * ## Usage + * + * ```javascript + * instruction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.instruction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ +export interface InstructionNamespace { + [key: string]: InstructionFn; +} + +/** + * Function to create a `TransactionInstruction` generated from an IDL. + * Additionally it provides an `accounts` utility method, returning a list + * of ordered accounts for the instruction. + */ +export type InstructionFn = IxProps & ((...args: any[]) => any); +type IxProps = { + accounts: (ctx: Accounts) => any; +}; + +export type InstructionEncodeFn = (ixName: string, ix: any) => Buffer; + +// Throws error if any argument required for the `ix` is not given. +function validateInstruction(ix: IdlInstruction, ...args: any[]) { + // todo +} diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/rpc.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/rpc.ts new file mode 100644 index 0000000..c45b07b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/rpc.ts @@ -0,0 +1,77 @@ +import { TransactionSignature } from "@solana/web3.js"; +import Provider from "../../provider"; +import { IdlInstruction } from "../../idl"; +import { splitArgsAndCtx } from "../context"; +import { TransactionFn } from "./transaction"; +import { ProgramError } from "../../error"; + +export default class RpcFactory { + public static build( + idlIx: IdlInstruction, + txFn: TransactionFn, + idlErrors: Map, + provider: Provider + ): RpcFn { + const rpc = async (...args: any[]): Promise => { + const tx = txFn(...args); + const [, ctx] = splitArgsAndCtx(idlIx, [...args]); + try { + const txSig = await provider.send(tx, ctx.signers, ctx.options); + return txSig; + } catch (err) { + console.log("Translating error", err); + let translatedErr = ProgramError.parse(err, idlErrors); + if (translatedErr === null) { + throw err; + } + throw translatedErr; + } + }; + + return rpc; + } +} + +/** + * The namespace provides async methods to send signed transactions for each + * *non*-state method on Anchor program. + * + * Keys are method names, values are RPC functions returning a + * [[TransactionInstruction]]. + * + * ## Usage + * + * ```javascript + * rpc.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * ``` + * + * ## Example + * + * To send a transaction invoking the `increment` method above, + * + * ```javascript + * const txSignature = await program.rpc.increment({ + * accounts: { + * counter, + * authority, + * }, + * }); + * ``` + */ +export interface RpcNamespace { + [key: string]: RpcFn; +} + +/** + * RpcFn is a single RPC method generated from an IDL, sending a transaction + * paid for and signed by the configured provider. + */ +export type RpcFn = (...args: any[]) => Promise; diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/simulate.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/simulate.ts new file mode 100644 index 0000000..1581a59 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/simulate.ts @@ -0,0 +1,109 @@ +import { PublicKey } from "@solana/web3.js"; +import Provider from "../../provider"; +import { IdlInstruction } from "../../idl"; +import { splitArgsAndCtx } from "../context"; +import { TransactionFn } from "./transaction"; +import { EventParser, Event } from "../event"; +import Coder from "../../coder"; +import { Idl } from "../../idl"; +import { ProgramError } from "../../error"; + +export default class SimulateFactory { + public static build( + idlIx: IdlInstruction, + txFn: TransactionFn, + idlErrors: Map, + provider: Provider, + coder: Coder, + programId: PublicKey, + idl: Idl + ): SimulateFn { + const simulate = async (...args: any[]): Promise => { + const tx = txFn(...args); + const [, ctx] = splitArgsAndCtx(idlIx, [...args]); + let resp = undefined; + try { + resp = await provider.simulate(tx, ctx.signers, ctx.options); + } catch (err) { + console.log("Translating error", err); + let translatedErr = ProgramError.parse(err, idlErrors); + if (translatedErr === null) { + throw err; + } + throw translatedErr; + } + if (resp === undefined) { + throw new Error("Unable to simulate transaction"); + } + if (resp.value.err) { + throw new Error(`Simulate error: ${resp.value.err.toString()}`); + } + const logs = resp.value.logs; + if (!logs) { + throw new Error("Simulated logs not found"); + } + + const events = []; + if (idl.events) { + let parser = new EventParser(programId, coder); + parser.parseLogs(logs, (event) => { + events.push(event); + }); + } + return { events, raw: logs }; + }; + + return simulate; + } +} + +/** + * The namespace provides functions to simulate transactions for each method + * of a program, returning a list of deserialized events *and* raw program + * logs. + * + * One can use this to read data calculated from a program on chain, by + * emitting an event in the program and reading the emitted event client side + * via the `simulate` namespace. + * + * ## Usage + * + * ```javascript + * program.simulate.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To simulate the `increment` method above, + * + * ```javascript + * const events = await program.simulate.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ +export interface SimulateNamespace { + [key: string]: SimulateFn; +} + +/** + * RpcFn is a single method generated from an IDL. It simulates a method + * against a cluster configured by the provider, returning a list of all the + * events and raw logs that were emitted during the execution of the + * method. + */ +export type SimulateFn = (...args: any[]) => Promise; + +type SimulateResponse = { + events: Event[]; + raw: string[]; +}; diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/state.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/state.ts new file mode 100644 index 0000000..f341f3e --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/state.ts @@ -0,0 +1,255 @@ +import EventEmitter from "eventemitter3"; +import camelCase from "camelcase"; +import { PublicKey, SystemProgram, Commitment } from "@solana/web3.js"; +import Provider from "../../provider"; +import { Idl, IdlStateMethod } from "../../idl"; +import Coder, { stateDiscriminator } from "../../coder"; +import { RpcNamespace, InstructionNamespace, TransactionNamespace } from "./"; +import { getProvider } from "../../"; +import { Subscription, validateAccounts, parseIdlErrors } from "../common"; +import { findProgramAddressSync, createWithSeedSync } from "../../utils/pubkey"; +import { Accounts } from "../context"; +import InstructionNamespaceFactory from "./instruction"; +import RpcNamespaceFactory from "./rpc"; +import TransactionNamespaceFactory from "./transaction"; + +export default class StateFactory { + public static build( + idl: Idl, + coder: Coder, + programId: PublicKey, + provider: Provider + ): StateClient | undefined { + if (idl.state === undefined) { + return undefined; + } + return new StateClient(idl, programId, provider, coder); + } +} + +/** + * A client for the program state. Similar to the base [[Program]] client, + * one can use this to send transactions and read accounts for the state + * abstraction. + */ +export class StateClient { + /** + * [[RpcNamespace]] for all state methods. + */ + readonly rpc: RpcNamespace; + + /** + * [[InstructionNamespace]] for all state methods. + */ + readonly instruction: InstructionNamespace; + + /** + * [[TransactionNamespace]] for all state methods. + */ + readonly transaction: TransactionNamespace; + + /** + * Returns the program ID owning the state. + */ + get programId(): PublicKey { + return this._programId; + } + private _programId: PublicKey; + + /** + * Returns the client's wallet and network provider. + */ + get provider(): Provider { + return this._provider; + } + private _provider: Provider; + + /** + * Returns the coder. + */ + get coder(): Coder { + return this._coder; + } + + private _address: PublicKey; + private _coder: Coder; + private _idl: Idl; + private _sub: Subscription | null; + + constructor( + idl: Idl, + programId: PublicKey, + provider?: Provider, + coder?: Coder + ) { + this._idl = idl; + this._programId = programId; + this._address = programStateAddress(programId); + this._provider = provider ?? getProvider(); + this._coder = coder ?? new Coder(idl); + this._sub = null; + + // Build namespaces. + const [instruction, transaction, rpc] = ((): [ + InstructionNamespace, + TransactionNamespace, + RpcNamespace + ] => { + let instruction: InstructionNamespace = {}; + let transaction: TransactionNamespace = {}; + let rpc: RpcNamespace = {}; + + idl.state.methods.forEach((m: IdlStateMethod) => { + // Build instruction method. + const ixItem = InstructionNamespaceFactory.build( + m, + (ixName: string, ix: any) => + coder.instruction.encodeState(ixName, ix), + programId + ); + ixItem["accounts"] = (accounts: Accounts) => { + const keys = stateInstructionKeys(programId, provider, m, accounts); + return keys.concat( + InstructionNamespaceFactory.accountsArray(accounts, m.accounts) + ); + }; + // Build transaction method. + const txItem = TransactionNamespaceFactory.build(m, ixItem); + // Build RPC method. + const rpcItem = RpcNamespaceFactory.build( + m, + txItem, + parseIdlErrors(idl), + provider + ); + + // Attach them all to their respective namespaces. + const name = camelCase(m.name); + instruction[name] = ixItem; + transaction[name] = txItem; + rpc[name] = rpcItem; + }); + + return [instruction, transaction, rpc]; + })(); + this.instruction = instruction; + this.transaction = transaction; + this.rpc = rpc; + } + + /** + * Returns the deserialized state account. + */ + async fetch(): Promise { + const addr = this.address(); + const accountInfo = await this.provider.connection.getAccountInfo(addr); + if (accountInfo === null) { + throw new Error(`Account does not exist ${addr.toString()}`); + } + // Assert the account discriminator is correct. + const expectedDiscriminator = await stateDiscriminator( + this._idl.state.struct.name + ); + if (expectedDiscriminator.compare(accountInfo.data.slice(0, 8))) { + throw new Error("Invalid account discriminator"); + } + return this.coder.state.decode(accountInfo.data); + } + + /** + * Returns the state address. + */ + address(): PublicKey { + return this._address; + } + + /** + * Returns an `EventEmitter` with a `"change"` event that's fired whenever + * the state account cahnges. + */ + subscribe(commitment?: Commitment): EventEmitter { + if (this._sub !== null) { + return this._sub.ee; + } + const ee = new EventEmitter(); + + const listener = this.provider.connection.onAccountChange( + this.address(), + (acc) => { + const account = this.coder.state.decode(acc.data); + ee.emit("change", account); + }, + commitment + ); + + this._sub = { + ee, + listener, + }; + + return ee; + } + + /** + * Unsubscribes to state changes. + */ + unsubscribe() { + if (this._sub !== null) { + this.provider.connection + .removeAccountChangeListener(this._sub.listener) + .then(async () => { + this._sub = null; + }) + .catch(console.error); + } + } +} + +// Calculates the deterministic address of the program's "state" account. +function programStateAddress(programId: PublicKey): PublicKey { + let [registrySigner] = findProgramAddressSync([], programId); + return createWithSeedSync(registrySigner, "unversioned", programId); +} + +// Returns the common keys that are prepended to all instructions targeting +// the "state" of a program. +function stateInstructionKeys( + programId: PublicKey, + provider: Provider, + m: IdlStateMethod, + accounts: Accounts +) { + if (m.name === "new") { + // Ctor `new` method. + const [programSigner] = findProgramAddressSync([], programId); + return [ + { + pubkey: provider.wallet.publicKey, + isWritable: false, + isSigner: true, + }, + { + pubkey: programStateAddress(programId), + isWritable: true, + isSigner: false, + }, + { pubkey: programSigner, isWritable: false, isSigner: false }, + { + pubkey: SystemProgram.programId, + isWritable: false, + isSigner: false, + }, + + { pubkey: programId, isWritable: false, isSigner: false }, + ]; + } else { + validateAccounts(m.accounts, accounts); + return [ + { + pubkey: programStateAddress(programId), + isWritable: true, + isSigner: false, + }, + ]; + } +} diff --git a/tests/node_modules/@project-serum/anchor/src/program/namespace/transaction.ts b/tests/node_modules/@project-serum/anchor/src/program/namespace/transaction.ts new file mode 100644 index 0000000..484f7e0 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/program/namespace/transaction.ts @@ -0,0 +1,61 @@ +import { Transaction } from "@solana/web3.js"; +import { IdlInstruction } from "../../idl"; +import { splitArgsAndCtx } from "../context"; +import { InstructionFn } from "./instruction"; + +export default class TransactionFactory { + public static build( + idlIx: IdlInstruction, + ixFn: InstructionFn + ): TransactionFn { + const txFn = (...args: any[]): Transaction => { + const [, ctx] = splitArgsAndCtx(idlIx, [...args]); + const tx = new Transaction(); + if (ctx.instructions !== undefined) { + tx.add(...ctx.instructions); + } + tx.add(ixFn(...args)); + return tx; + }; + + return txFn; + } +} + +/** + * The namespace provides functions to build [[Transaction]] objects for each + * method of a program. + * + * ## Usage + * + * ```javascript + * program.transaction.(...args, ctx); + * ``` + * + * ## Parameters + * + * 1. `args` - The positional arguments for the program. The type and number + * of these arguments depend on the program being used. + * 2. `ctx` - [[Context]] non-argument parameters to pass to the method. + * Always the last parameter in the method call. + * + * ## Example + * + * To create an instruction for the `increment` method above, + * + * ```javascript + * const tx = await program.transaction.increment({ + * accounts: { + * counter, + * }, + * }); + * ``` + */ +export interface TransactionNamespace { + [key: string]: TransactionFn; +} + +/** + * Tx is a function to create a `Transaction` for a given program instruction. + */ +export type TransactionFn = (...args: any[]) => Transaction; diff --git a/tests/node_modules/@project-serum/anchor/src/provider.ts b/tests/node_modules/@project-serum/anchor/src/provider.ts new file mode 100644 index 0000000..a619e7a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/provider.ts @@ -0,0 +1,310 @@ +import { + Connection, + Keypair, + Signer, + PublicKey, + Transaction, + TransactionSignature, + ConfirmOptions, + sendAndConfirmRawTransaction, + RpcResponseAndContext, + SimulatedTransactionResponse, + Commitment, +} from "@solana/web3.js"; +import { isBrowser } from "./utils/common"; + +/** + * The network and wallet context used to send transactions paid for and signed + * by the provider. + */ +export default class Provider { + /** + * @param connection The cluster connection where the program is deployed. + * @param wallet The wallet used to pay for and sign all transactions. + * @param opts Transaction confirmation options to use by default. + */ + constructor( + readonly connection: Connection, + readonly wallet: Wallet, + readonly opts: ConfirmOptions + ) {} + + static defaultOptions(): ConfirmOptions { + return { + preflightCommitment: "recent", + commitment: "recent", + }; + } + + /** + * Returns a `Provider` with a wallet read from the local filesystem. + * + * @param url The network cluster url. + * @param opts The default transaction confirmation options. + * + * (This api is for Node only.) + */ + static local(url?: string, opts?: ConfirmOptions): Provider { + opts = opts ?? Provider.defaultOptions(); + const connection = new Connection( + url ?? "http://localhost:8899", + opts.preflightCommitment + ); + const wallet = NodeWallet.local(); + return new Provider(connection, wallet, opts); + } + + /** + * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment + * variable + * + * (This api is for Node only.) + */ + static env(): Provider { + if (isBrowser) return; + + const process = require("process"); + const url = process.env.ANCHOR_PROVIDER_URL; + if (url === undefined) { + throw new Error("ANCHOR_PROVIDER_URL is not defined"); + } + const options = Provider.defaultOptions(); + const connection = new Connection(url, options.commitment); + const wallet = NodeWallet.local(); + + return new Provider(connection, wallet, options); + } + + /** + * Sends the given transaction, paid for and signed by the provider's wallet. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + async send( + tx: Transaction, + signers?: Array, + opts?: ConfirmOptions + ): Promise { + if (signers === undefined) { + signers = []; + } + if (opts === undefined) { + opts = this.opts; + } + + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = ( + await this.connection.getRecentBlockhash(opts.preflightCommitment) + ).blockhash; + + await this.wallet.signTransaction(tx); + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + + const rawTx = tx.serialize(); + + const txId = await sendAndConfirmRawTransaction( + this.connection, + rawTx, + opts + ); + + return txId; + } + + /** + * Similar to `send`, but for an array of transactions and signers. + */ + async sendAll( + reqs: Array, + opts?: ConfirmOptions + ): Promise> { + if (opts === undefined) { + opts = this.opts; + } + const blockhash = await this.connection.getRecentBlockhash( + opts.preflightCommitment + ); + + let txs = reqs.map((r) => { + let tx = r.tx; + let signers = r.signers; + + if (signers === undefined) { + signers = []; + } + + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = blockhash.blockhash; + + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + + return tx; + }); + + const signedTxs = await this.wallet.signAllTransactions(txs); + + const sigs = []; + + for (let k = 0; k < txs.length; k += 1) { + const tx = signedTxs[k]; + const rawTx = tx.serialize(); + sigs.push( + await sendAndConfirmRawTransaction(this.connection, rawTx, opts) + ); + } + + return sigs; + } + + /** + * Simulates the given transaction, returning emitted logs from execution. + * + * @param tx The transaction to send. + * @param signers The set of signers in addition to the provdier wallet that + * will sign the transaction. + * @param opts Transaction confirmation options. + */ + async simulate( + tx: Transaction, + signers?: Array, + opts?: ConfirmOptions + ): Promise> { + if (signers === undefined) { + signers = []; + } + if (opts === undefined) { + opts = this.opts; + } + + tx.feePayer = this.wallet.publicKey; + tx.recentBlockhash = ( + await this.connection.getRecentBlockhash( + opts.preflightCommitment ?? this.opts.preflightCommitment + ) + ).blockhash; + + await this.wallet.signTransaction(tx); + signers + .filter((s) => s !== undefined) + .forEach((kp) => { + tx.partialSign(kp); + }); + + return await simulateTransaction( + this.connection, + tx, + opts.commitment ?? this.opts.commitment + ); + } +} + +export type SendTxRequest = { + tx: Transaction; + signers: Array; +}; + +/** + * Wallet interface for objects that can be used to sign provider transactions. + */ +export interface Wallet { + signTransaction(tx: Transaction): Promise; + signAllTransactions(txs: Transaction[]): Promise; + publicKey: PublicKey; +} + +/** + * Node only wallet. + */ +export class NodeWallet implements Wallet { + constructor(readonly payer: Keypair) {} + + static local(): NodeWallet { + const payer = Keypair.fromSecretKey( + Buffer.from( + JSON.parse( + require("fs").readFileSync( + require("os").homedir() + "/.config/solana/id.json", + { + encoding: "utf-8", + } + ) + ) + ) + ); + return new NodeWallet(payer); + } + + async signTransaction(tx: Transaction): Promise { + tx.partialSign(this.payer); + return tx; + } + + async signAllTransactions(txs: Transaction[]): Promise { + return txs.map((t) => { + t.partialSign(this.payer); + return t; + }); + } + + get publicKey(): PublicKey { + return this.payer.publicKey; + } +} + +// Copy of Connection.simulateTransaction that takes a commitment parameter. +async function simulateTransaction( + connection: Connection, + transaction: Transaction, + commitment: Commitment +): Promise> { + // @ts-ignore + transaction.recentBlockhash = await connection._recentBlockhash( + // @ts-ignore + connection._disableBlockhashCaching + ); + + const signData = transaction.serializeMessage(); + // @ts-ignore + const wireTransaction = transaction._serialize(signData); + const encodedTransaction = wireTransaction.toString("base64"); + const config: any = { encoding: "base64", commitment }; + const args = [encodedTransaction, config]; + + // @ts-ignore + const res = await connection._rpcRequest("simulateTransaction", args); + if (res.error) { + throw new Error("failed to simulate transaction: " + res.error.message); + } + return res.result; +} + +/** + * Sets the default provider on the client. + */ +export function setProvider(provider: Provider) { + _provider = provider; +} + +/** + * Returns the default provider being used by the client. + */ +export function getProvider(): Provider { + if (_provider === null) { + return Provider.local(); + } + return _provider; +} + +// Global provider used as the default when a provider is not given. +let _provider: Provider | null = null; diff --git a/tests/node_modules/@project-serum/anchor/src/utils/bytes/base64.ts b/tests/node_modules/@project-serum/anchor/src/utils/bytes/base64.ts new file mode 100644 index 0000000..33e9361 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/bytes/base64.ts @@ -0,0 +1,9 @@ +import * as base64 from "base64-js"; + +export function encode(data: Buffer): string { + return base64.fromByteArray(data); +} + +export function decode(data: string): Buffer { + return Buffer.from(base64.toByteArray(data)); +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/bytes/bs58.ts b/tests/node_modules/@project-serum/anchor/src/utils/bytes/bs58.ts new file mode 100644 index 0000000..08f5a53 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/bytes/bs58.ts @@ -0,0 +1,9 @@ +import * as bs58 from "bs58"; + +export function encode(data: Buffer | number[] | Uint8Array) { + return bs58.encode(data); +} + +export function decode(data: string) { + return bs58.decode(data); +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/bytes/hex.ts b/tests/node_modules/@project-serum/anchor/src/utils/bytes/hex.ts new file mode 100644 index 0000000..30e0f27 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/bytes/hex.ts @@ -0,0 +1,23 @@ +export function encode(data: Buffer): string { + return data.reduce( + (str, byte) => str + byte.toString(16).padStart(2, "0"), + "0x" + ); +} + +export function decode(data: string): Buffer { + if (data.indexOf("0x") === 0) { + data = data.substr(2); + } + if (data.length % 2 === 1) { + data = "0" + data; + } + + let key = data.match(/.{2}/g); + + if (key === null) { + return Buffer.from([]); + } + + return Buffer.from(key.map((byte) => parseInt(byte, 16))); +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/bytes/index.ts b/tests/node_modules/@project-serum/anchor/src/utils/bytes/index.ts new file mode 100644 index 0000000..3613a95 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/bytes/index.ts @@ -0,0 +1,4 @@ +export * as hex from "./hex"; +export * as utf8 from "./utf8"; +export * as bs58 from "./bs58"; +export * as base64 from "./base64"; diff --git a/tests/node_modules/@project-serum/anchor/src/utils/bytes/utf8.ts b/tests/node_modules/@project-serum/anchor/src/utils/bytes/utf8.ts new file mode 100644 index 0000000..2a20190 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/bytes/utf8.ts @@ -0,0 +1,15 @@ +export function decode(array: Uint8Array): string { + const decoder = + typeof TextDecoder === "undefined" + ? new (require("util").TextDecoder)("utf-8") // Node. + : new TextDecoder("utf-8"); // Browser. + return decoder.decode(array); +} + +export function encode(input: string): Uint8Array { + const encoder = + typeof TextEncoder === "undefined" + ? new (require("util").TextEncoder)("utf-8") // Node. + : new TextEncoder(); // Browser. + return encoder.encode(input); +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/common.ts b/tests/node_modules/@project-serum/anchor/src/utils/common.ts new file mode 100644 index 0000000..59d3f3b --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/common.ts @@ -0,0 +1,6 @@ +/** + * Returns true if being run inside a web browser, + * false if in a Node process or electron app. + */ +export const isBrowser = + typeof window !== "undefined" && !window.process?.hasOwnProperty("type"); diff --git a/tests/node_modules/@project-serum/anchor/src/utils/features.ts b/tests/node_modules/@project-serum/anchor/src/utils/features.ts new file mode 100644 index 0000000..9fd8c8a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/features.ts @@ -0,0 +1,14 @@ +const _AVAILABLE_FEATURES = new Set(["anchor-deprecated-state"]); + +const _FEATURES = new Map(); + +export function set(key: string) { + if (!_AVAILABLE_FEATURES.has(key)) { + throw new Error("Invalid feature"); + } + _FEATURES.set(key, true); +} + +export function isSet(key: string): boolean { + return _FEATURES.get(key) !== undefined; +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/index.ts b/tests/node_modules/@project-serum/anchor/src/utils/index.ts new file mode 100644 index 0000000..907a7a7 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/index.ts @@ -0,0 +1,6 @@ +export * as sha256 from "./sha256"; +export * as rpc from "./rpc"; +export * as publicKey from "./pubkey"; +export * as bytes from "./bytes"; +export * as token from "./token"; +export * as features from "./features"; diff --git a/tests/node_modules/@project-serum/anchor/src/utils/pubkey.ts b/tests/node_modules/@project-serum/anchor/src/utils/pubkey.ts new file mode 100644 index 0000000..8c60cc1 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/pubkey.ts @@ -0,0 +1,97 @@ +import BN from "bn.js"; +import { sha256 as sha256Sync } from "js-sha256"; +import { PublicKey } from "@solana/web3.js"; +import { Address, translateAddress } from "../program/common"; + +// Sync version of web3.PublicKey.createWithSeed. +export function createWithSeedSync( + fromPublicKey: PublicKey, + seed: string, + programId: PublicKey +): PublicKey { + const buffer = Buffer.concat([ + fromPublicKey.toBuffer(), + Buffer.from(seed), + programId.toBuffer(), + ]); + const hash = sha256Sync.digest(buffer); + return new PublicKey(Buffer.from(hash)); +} + +// Sync version of web3.PublicKey.createProgramAddress. +export function createProgramAddressSync( + seeds: Array, + programId: PublicKey +): PublicKey { + const MAX_SEED_LENGTH = 32; + + let buffer = Buffer.alloc(0); + seeds.forEach(function (seed) { + if (seed.length > MAX_SEED_LENGTH) { + throw new TypeError(`Max seed length exceeded`); + } + buffer = Buffer.concat([buffer, toBuffer(seed)]); + }); + buffer = Buffer.concat([ + buffer, + programId.toBuffer(), + Buffer.from("ProgramDerivedAddress"), + ]); + let hash = sha256Sync(new Uint8Array(buffer)); + let publicKeyBytes = new BN(hash, 16).toArray(undefined, 32); + if (PublicKey.isOnCurve(new Uint8Array(publicKeyBytes))) { + throw new Error(`Invalid seeds, address must fall off the curve`); + } + return new PublicKey(publicKeyBytes); +} + +// Sync version of web3.PublicKey.findProgramAddress. +export function findProgramAddressSync( + seeds: Array, + programId: PublicKey +): [PublicKey, number] { + let nonce = 255; + let address: PublicKey | undefined; + while (nonce != 0) { + try { + const seedsWithNonce = seeds.concat(Buffer.from([nonce])); + address = createProgramAddressSync(seedsWithNonce, programId); + } catch (err) { + if (err instanceof TypeError) { + throw err; + } + nonce--; + continue; + } + return [address, nonce]; + } + throw new Error(`Unable to find a viable program address nonce`); +} + +const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => { + if (arr instanceof Buffer) { + return arr; + } else if (arr instanceof Uint8Array) { + return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength); + } else { + return Buffer.from(arr); + } +}; + +export async function associated( + programId: Address, + ...args: Array +): Promise { + let seeds = [Buffer.from([97, 110, 99, 104, 111, 114])]; // b"anchor". + args.forEach((arg) => { + seeds.push( + // @ts-ignore + arg.buffer !== undefined ? arg : translateAddress(arg).toBuffer() + ); + }); + const [assoc] = await PublicKey.findProgramAddress( + seeds, + translateAddress(programId) + ); + return assoc; +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/rpc.ts b/tests/node_modules/@project-serum/anchor/src/utils/rpc.ts new file mode 100644 index 0000000..6060bfa --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/rpc.ts @@ -0,0 +1,100 @@ +import assert from "assert"; +import { + AccountInfo, + AccountMeta, + Connection, + PublicKey, + TransactionSignature, + Transaction, + TransactionInstruction, +} from "@solana/web3.js"; +import { Address, translateAddress } from "../program/common"; +import Provider, { getProvider } from "../provider"; + +/** + * Sends a transaction to a program with the given accounts and instruction + * data. + */ +export async function invoke( + programId: Address, + accounts?: Array, + data?: Buffer, + provider?: Provider +): Promise { + programId = translateAddress(programId); + if (!provider) { + provider = getProvider(); + } + + const tx = new Transaction(); + tx.add( + new TransactionInstruction({ + programId, + keys: accounts ?? [], + data, + }) + ); + + return await provider.send(tx); +} + +export async function getMultipleAccounts( + connection: Connection, + publicKeys: PublicKey[] +): Promise< + Array }> +> { + const args = [publicKeys.map((k) => k.toBase58()), { commitment: "recent" }]; + // @ts-ignore + const res = await connection._rpcRequest("getMultipleAccounts", args); + if (res.error) { + throw new Error( + "failed to get info about accounts " + + publicKeys.map((k) => k.toBase58()).join(", ") + + ": " + + res.error.message + ); + } + assert(typeof res.result !== "undefined"); + const accounts: Array = []; + for (const account of res.result.value) { + let value: { + executable: any; + owner: PublicKey; + lamports: any; + data: Buffer; + } | null = null; + if (account === null) { + accounts.push(null); + continue; + } + if (res.result.value) { + const { executable, owner, lamports, data } = account; + assert(data[1] === "base64"); + value = { + executable, + owner: new PublicKey(owner), + lamports, + data: Buffer.from(data[0], "base64"), + }; + } + if (value === null) { + throw new Error("Invalid response"); + } + accounts.push(value); + } + return accounts.map((account, idx) => { + if (account === null) { + return null; + } + return { + publicKey: publicKeys[idx], + account, + }; + }); +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/sha256.ts b/tests/node_modules/@project-serum/anchor/src/utils/sha256.ts new file mode 100644 index 0000000..64a6c23 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/sha256.ts @@ -0,0 +1,5 @@ +import { sha256 } from "js-sha256"; + +export function hash(data: string): string { + return sha256(data); +} diff --git a/tests/node_modules/@project-serum/anchor/src/utils/token.ts b/tests/node_modules/@project-serum/anchor/src/utils/token.ts new file mode 100644 index 0000000..c4e609f --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/utils/token.ts @@ -0,0 +1,23 @@ +import { PublicKey } from "@solana/web3.js"; + +const TOKEN_PROGRAM_ID = new PublicKey( + "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" +); +const ASSOCIATED_PROGRAM_ID = new PublicKey( + "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" +); + +export async function associatedAddress({ + mint, + owner, +}: { + mint: PublicKey; + owner: PublicKey; +}): Promise { + return ( + await PublicKey.findProgramAddress( + [owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], + ASSOCIATED_PROGRAM_ID + ) + )[0]; +} diff --git a/tests/node_modules/@project-serum/anchor/src/workspace.ts b/tests/node_modules/@project-serum/anchor/src/workspace.ts new file mode 100644 index 0000000..867ac1d --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/src/workspace.ts @@ -0,0 +1,104 @@ +import camelCase from "camelcase"; +import * as toml from "toml"; +import { PublicKey } from "@solana/web3.js"; +import { Program } from "./program"; +import { Idl } from "./idl"; +import { isBrowser } from "./utils/common"; + +let _populatedWorkspace = false; + +/** + * The `workspace` namespace provides a convenience API to automatically + * search for and deserialize [[Program]] objects defined by compiled IDLs + * in an Anchor workspace. + * + * This API is for Node only. + */ +const workspace = new Proxy({} as any, { + get(workspaceCache: { [key: string]: Program }, programName: string) { + if (isBrowser) { + console.log("Workspaces aren't available in the browser"); + return undefined; + } + + const fs = require("fs"); + const process = require("process"); + + if (!_populatedWorkspace) { + const path = require("path"); + + let projectRoot = process.cwd(); + while (!fs.existsSync(path.join(projectRoot, "Anchor.toml"))) { + const parentDir = path.dirname(projectRoot); + if (parentDir === projectRoot) { + projectRoot = undefined; + } + projectRoot = parentDir; + } + + if (projectRoot === undefined) { + throw new Error("Could not find workspace root."); + } + + const idlFolder = `${projectRoot}/target/idl`; + if (!fs.existsSync(idlFolder)) { + throw new Error( + `${idlFolder} doesn't exist. Did you use "anchor build"?` + ); + } + + const idlMap = new Map(); + fs.readdirSync(idlFolder).forEach((file) => { + const filePath = `${idlFolder}/${file}`; + const idlStr = fs.readFileSync(filePath); + const idl = JSON.parse(idlStr); + idlMap.set(idl.name, idl); + const name = camelCase(idl.name, { pascalCase: true }); + if (idl.metadata && idl.metadata.address) { + workspaceCache[name] = new Program( + idl, + new PublicKey(idl.metadata.address) + ); + } + }); + + // Override the workspace programs if the user put them in the config. + const anchorToml = toml.parse( + fs.readFileSync(path.join(projectRoot, "Anchor.toml"), "utf-8") + ); + const clusterId = anchorToml.provider.cluster; + if (anchorToml.programs && anchorToml.programs[clusterId]) { + attachWorkspaceOverride( + workspaceCache, + anchorToml.programs[clusterId], + idlMap + ); + } + + _populatedWorkspace = true; + } + + return workspaceCache[programName]; + }, +}); + +function attachWorkspaceOverride( + workspaceCache: { [key: string]: Program }, + overrideConfig: { [key: string]: string | { address: string; idl?: string } }, + idlMap: Map +) { + Object.keys(overrideConfig).forEach((programName) => { + const wsProgramName = camelCase(programName, { pascalCase: true }); + const entry = overrideConfig[programName]; + const overrideAddress = new PublicKey( + typeof entry === "string" ? entry : entry.address + ); + let idl = idlMap.get(programName); + if (typeof entry !== "string" && entry.idl) { + idl = JSON.parse(require("fs").readFileSync(entry.idl, "utf-8")); + } + workspaceCache[wsProgramName] = new Program(idl, overrideAddress); + }); +} + +export default workspace; diff --git a/tests/node_modules/@project-serum/anchor/tests/events.spec.ts b/tests/node_modules/@project-serum/anchor/tests/events.spec.ts new file mode 100644 index 0000000..85f13f6 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/tests/events.spec.ts @@ -0,0 +1,33 @@ +import { PublicKey } from "@solana/web3.js"; +import { EventParser } from "../src/program/event"; +import { Coder } from "../src"; + +describe("Events", () => { + it("Parses multiple instructions", async () => { + const logs = [ + "Program 11111111111111111111111111111111 invoke [1]", + "Program 11111111111111111111111111111111 success", + "Program J2XMGdW2qQLx7rAdwWtSZpTXDgAQ988BLP9QTgUZvm54 invoke [1]", + "Program J2XMGdW2qQLx7rAdwWtSZpTXDgAQ988BLP9QTgUZvm54 consumed 17867 of 200000 compute units", + "Program J2XMGdW2qQLx7rAdwWtSZpTXDgAQ988BLP9QTgUZvm54 success", + ]; + const idl = { + version: "0.0.0", + name: "basic_0", + instructions: [ + { + name: "initialize", + accounts: [], + args: [], + }, + ], + }; + const coder = new Coder(idl); + const programId = PublicKey.default; + const eventParser = new EventParser(programId, coder); + + eventParser.parseLogs(logs, () => { + throw new Error("Should never find logs"); + }); + }); +}); diff --git a/tests/node_modules/@project-serum/anchor/tsconfig.cjs.json b/tests/node_modules/@project-serum/anchor/tsconfig.cjs.json new file mode 100644 index 0000000..0a2e02a --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/tsconfig.cjs.json @@ -0,0 +1,11 @@ + +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "target": "es2019", + + "outDir": "dist/cjs/", + "rootDir": "./src" + } +} diff --git a/tests/node_modules/@project-serum/anchor/tsconfig.json b/tests/node_modules/@project-serum/anchor/tsconfig.json new file mode 100644 index 0000000..38d5398 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/tsconfig.json @@ -0,0 +1,29 @@ +{ + "include": ["./src/**/*"], + "compilerOptions": { + "moduleResolution": "node", + "module": "es6", + "target": "es2019", + + "outDir": "dist/esm/", + "rootDir": "./src", + "declarationDir": "dist", + + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noImplicitAny": false, + + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "baseUrl": ".", + "typeRoots": ["types/", "node_modules/@types"], + "paths": { + "@solana/web3.js": ["./node_modules/@solana/web3.js/lib"] + } + } +} diff --git a/tests/node_modules/@project-serum/anchor/types/buffer-layout/index.d.ts b/tests/node_modules/@project-serum/anchor/types/buffer-layout/index.d.ts new file mode 100644 index 0000000..f52eae5 --- /dev/null +++ b/tests/node_modules/@project-serum/anchor/types/buffer-layout/index.d.ts @@ -0,0 +1,88 @@ + +declare module 'buffer-layout' { + // TODO: remove `any`. + export class Layout { + span: number; + property?: string; + + constructor(span: number, property?: string); + + decode(b: Buffer, offset?: number): T; + encode(src: T, b: Buffer, offset?: number): number; + getSpan(b: Buffer, offset?: number): number; + replicate(name: string): this; + } + // TODO: remove any. + export class Structure extends Layout { + span: any; + } + export function greedy( + elementSpan?: number, + property?: string, + ): Layout; + export function offset( + layout: Layout, + offset?: number, + property?: string, + ): Layout; + export function u8(property?: string): Layout; + export function u16(property?: string): Layout; + export function u24(property?: string): Layout; + export function u32(property?: string): Layout; + export function u40(property?: string): Layout; + export function u48(property?: string): Layout; + export function nu64(property?: string): Layout; + export function u16be(property?: string): Layout; + export function u24be(property?: string): Layout; + export function u32be(property?: string): Layout; + export function u40be(property?: string): Layout; + export function u48be(property?: string): Layout; + export function nu64be(property?: string): Layout; + export function s8(property?: string): Layout; + export function s16(property?: string): Layout; + export function s24(property?: string): Layout; + export function s32(property?: string): Layout; + export function s40(property?: string): Layout; + export function s48(property?: string): Layout; + export function ns64(property?: string): Layout; + export function s16be(property?: string): Layout; + export function s24be(property?: string): Layout; + export function s32be(property?: string): Layout; + export function s40be(property?: string): Layout; + export function s48be(property?: string): Layout; + export function ns64be(property?: string): Layout; + export function f32(property?: string): Layout; + export function f32be(property?: string): Layout; + export function f64(property?: string): Layout; + export function f64be(property?: string): Layout; + export function struct( + fields: Layout[], + property?: string, + decodePrefixes?: boolean, + ): Layout; + export function bits( + word: Layout, + msb?: boolean, + property?: string, + ): any; + export function seq( + elementLayout: Layout, + count: number | Layout, + property?: string, + ): Layout; + export function union( + discr: Layout, + defaultLayout?: any, + property?: string, + ): any; + export function unionLayoutDiscriminator( + layout: Layout, + property?: string, + ): any; + export function blob( + length: number | Layout, + property?: string, + ): Layout; + export function cstr(property?: string): Layout; + export function utf8(maxSpan: number, property?: string): Layout; +} diff --git a/tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts b/tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts new file mode 100644 index 0000000..b2f653f --- /dev/null +++ b/tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts @@ -0,0 +1,29 @@ +/// +import { PublicKey } from '@solana/web3.js'; +import BN from 'bn.js'; +export { u8, s8 as i8, u16, s16 as i16, u32, s32 as i32, struct } from 'buffer-layout'; +export interface Layout { + span: number; + property?: string; + decode(b: Buffer, offset?: number): T; + encode(src: T, b: Buffer, offset?: number): number; + getSpan(b: Buffer, offset?: number): number; + replicate(name: string): this; +} +export declare function u64(property?: string): Layout; +export declare function i64(property?: string): Layout; +export declare function u128(property?: string): Layout; +export declare function i128(property?: string): Layout; +export declare function publicKey(property?: string): Layout; +export declare function option(layout: Layout, property?: string): Layout; +export declare function bool(property?: string): Layout; +export declare function vec(elementLayout: Layout, property?: string): Layout; +export declare function tagged(tag: BN, layout: Layout, property?: string): Layout; +export declare function vecU8(property?: string): Layout; +export declare function str(property?: string): Layout; +export interface EnumLayout extends Layout { + registry: Record>; +} +export declare function rustEnum(variants: Layout[], property?: string): EnumLayout; +export declare function array(elementLayout: Layout, length: number, property?: string): Layout; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts.map b/tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts.map new file mode 100644 index 0000000..34f620a --- /dev/null +++ b/tests/node_modules/@project-serum/borsh/dist/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvF,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAEtC,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEnD,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5C,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAgCD,wBAAgB,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAEjD;AAED,wBAAgB,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAEjD;AAED,wBA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,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,CAAC,CAAC,CAAC,CAMf;AAED,wBAAgB,KAAK,CAAC,CAAC,EACrB,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAAC,CAAC,EAAE,CAAC,CAUb"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/borsh/dist/lib/index.js b/tests/node_modules/@project-serum/borsh/dist/lib/index.js new file mode 100644 index 0000000..07884cc --- /dev/null +++ b/tests/node_modules/@project-serum/borsh/dist/lib/index.js @@ -0,0 +1,181 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0; +const buffer_layout_1 = require("buffer-layout"); +const web3_js_1 = require("@solana/web3.js"); +const bn_js_1 = __importDefault(require("bn.js")); +var buffer_layout_2 = require("buffer-layout"); +Object.defineProperty(exports, "u8", { enumerable: true, get: function () { return buffer_layout_2.u8; } }); +Object.defineProperty(exports, "i8", { enumerable: true, get: function () { return buffer_layout_2.s8; } }); +Object.defineProperty(exports, "u16", { enumerable: true, get: function () { return buffer_layout_2.u16; } }); +Object.defineProperty(exports, "i16", { enumerable: true, get: function () { return buffer_layout_2.s16; } }); +Object.defineProperty(exports, "u32", { enumerable: true, get: function () { return buffer_layout_2.u32; } }); +Object.defineProperty(exports, "i32", { enumerable: true, get: function () { return buffer_layout_2.s32; } }); +Object.defineProperty(exports, "struct", { enumerable: true, get: function () { return buffer_layout_2.struct; } }); +class BNLayout extends buffer_layout_1.Layout { + constructor(span, signed, property) { + super(span, property); + this.blob = buffer_layout_1.blob(span); + this.signed = signed; + } + decode(b, offset = 0) { + const num = new bn_js_1.default(this.blob.decode(b, offset), 10, 'le'); + if (this.signed) { + return num.fromTwos(this.span * 8).clone(); + } + return num; + } + encode(src, b, offset = 0) { + if (this.signed) { + src = src.toTwos(this.span * 8); + } + return this.blob.encode(src.toArrayLike(Buffer, 'le', this.span), b, offset); + } +} +function u64(property) { + return new BNLayout(8, false, property); +} +exports.u64 = u64; +function i64(property) { + return new BNLayout(8, true, property); +} +exports.i64 = i64; +function u128(property) { + return new BNLayout(16, false, property); +} +exports.u128 = u128; +function i128(property) { + return new BNLayout(16, true, property); +} +exports.i128 = i128; +class WrappedLayout extends buffer_layout_1.Layout { + constructor(layout, decoder, encoder, property) { + super(layout.span, property); + this.layout = layout; + this.decoder = decoder; + this.encoder = encoder; + } + decode(b, offset) { + return this.decoder(this.layout.decode(b, offset)); + } + encode(src, b, offset) { + return this.layout.encode(this.encoder(src), b, offset); + } + getSpan(b, offset) { + return this.layout.getSpan(b, offset); + } +} +function publicKey(property) { + return new WrappedLayout(buffer_layout_1.blob(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property); +} +exports.publicKey = publicKey; +class OptionLayout extends buffer_layout_1.Layout { + constructor(layout, property) { + super(-1, property); + this.layout = layout; + this.discriminator = buffer_layout_1.u8(); + } + encode(src, b, offset = 0) { + if (src === null || src === undefined) { + return this.discriminator.encode(0, b, offset); + } + this.discriminator.encode(1, b, offset); + return this.layout.encode(src, b, offset + 1) + 1; + } + decode(b, offset = 0) { + const discriminator = this.discriminator.decode(b, offset); + if (discriminator === 0) { + return null; + } + else if (discriminator === 1) { + return this.layout.decode(b, offset + 1); + } + throw new Error('Invalid option ' + this.property); + } + getSpan(b, offset = 0) { + const discriminator = this.discriminator.decode(b, offset); + if (discriminator === 0) { + return 1; + } + else if (discriminator === 1) { + return this.layout.getSpan(b, offset + 1) + 1; + } + throw new Error('Invalid option ' + this.property); + } +} +function option(layout, property) { + return new OptionLayout(layout, property); +} +exports.option = option; +function bool(property) { + return new WrappedLayout(buffer_layout_1.u8(), decodeBool, encodeBool, property); +} +exports.bool = bool; +function decodeBool(value) { + if (value === 0) { + return false; + } + else if (value === 1) { + return true; + } + throw new Error('Invalid bool: ' + value); +} +function encodeBool(value) { + return value ? 1 : 0; +} +function vec(elementLayout, property) { + const length = buffer_layout_1.u32('length'); + const layout = buffer_layout_1.struct([ + length, + buffer_layout_1.seq(elementLayout, buffer_layout_1.offset(length, -length.span), 'values'), + ]); + return new WrappedLayout(layout, ({ values }) => values, values => ({ values }), property); +} +exports.vec = vec; +function tagged(tag, layout, property) { + const wrappedLayout = buffer_layout_1.struct([ + u64('tag'), + layout.replicate('data'), + ]); + function decodeTag({ tag: receivedTag, data }) { + if (!receivedTag.eq(tag)) { + throw new Error('Invalid tag, expected: ' + + tag.toString('hex') + + ', got: ' + + receivedTag.toString('hex')); + } + return data; + } + return new WrappedLayout(wrappedLayout, decodeTag, data => ({ tag, data }), property); +} +exports.tagged = tagged; +function vecU8(property) { + const length = buffer_layout_1.u32('length'); + const layout = buffer_layout_1.struct([ + length, + buffer_layout_1.blob(buffer_layout_1.offset(length, -length.span), 'data'), + ]); + return new WrappedLayout(layout, ({ data }) => data, data => ({ data }), property); +} +exports.vecU8 = vecU8; +function str(property) { + return new WrappedLayout(vecU8(), data => data.toString('utf-8'), s => Buffer.from(s, 'utf-8'), property); +} +exports.str = str; +function rustEnum(variants, property) { + const unionLayout = buffer_layout_1.union(buffer_layout_1.u8(), property); + variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property)); + return unionLayout; +} +exports.rustEnum = rustEnum; +function array(elementLayout, length, property) { + const layout = buffer_layout_1.struct([ + buffer_layout_1.seq(elementLayout, length, 'values'), + ]); + return new WrappedLayout(layout, ({ values }) => values, values => ({ values }), property); +} +exports.array = array; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tests/node_modules/@project-serum/borsh/dist/lib/index.js.map b/tests/node_modules/@project-serum/borsh/dist/lib/index.js.map new file mode 100644 index 0000000..05acf5d --- /dev/null +++ b/tests/node_modules/@project-serum/borsh/dist/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDASuB;AACvB,6CAA4C;AAC5C,kDAAuB;AACvB,+CAAuF;AAA9E,mGAAA,EAAE,OAAA;AAAE,mGAAA,EAAE,OAAM;AAAE,oGAAA,GAAG,OAAA;AAAE,oGAAA,GAAG,OAAO;AAAE,oGAAA,GAAG,OAAA;AAAE,oGAAA,GAAG,OAAO;AAAE,uGAAA,MAAM,OAAA;AAe/D,MAAM,QAAS,SAAQ,sBAAa;IAIlC,YAAY,IAAY,EAAE,MAAe,EAAE,QAAiB;QAC1D,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,oBAAI,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,CAAS,EAAE,MAAM,GAAG,CAAC;QAC1B,MAAM,GAAG,GAAG,IAAI,eAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1D,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SAC5C;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,GAAO,EAAE,CAAS,EAAE,MAAM,GAAG,CAAC;QACnC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,IAAI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,EAAE,MAAM,EAAE,QAAQ,CAAC;KACrC,CAAC,CAAC;IACH,OAAO,IAAI,aAAa,CACtB,MAAM,EACN,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,EACtB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EACtB,QAAQ,CACT,CAAC;AACJ,CAAC;AAdD,sBAcC"} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/borsh/dist/tsconfig.tsbuildinfo b/tests/node_modules/@project-serum/borsh/dist/tsconfig.tsbuildinfo new file mode 100644 index 0000000..365b39e --- /dev/null +++ b/tests/node_modules/@project-serum/borsh/dist/tsconfig.tsbuildinfo @@ -0,0 +1,2420 @@ +{ + "program": { + "fileInfos": { + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es5.d.ts": { + "version": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d", + "signature": "9622e8bd7cc72a7dab819a8011ecbf81d443638082e5cb99ecf2e75ff56ffc9d", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.d.ts": { + "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6", + "affectsGlobalScope": false + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2016.d.ts": { + "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467", + "affectsGlobalScope": false + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.d.ts": { + "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9", + "affectsGlobalScope": false + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.d.ts": { + "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06", + "affectsGlobalScope": false + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.d.ts": { + "version": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "signature": "e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84", + "affectsGlobalScope": false + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.dom.d.ts": { + "version": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84", + "signature": "abadddbf660adeec27e9a56584907d52fa1d6e1e1dc49f639a921baa951b7a84", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts": { + "version": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "signature": "d42f4141bd9ce82b4e2902f26acb00c183e321be19a38bbc0e76a922c1724c94", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481", + "signature": "7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd", + "signature": "097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.core.d.ts": { + "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts": { + "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts": { + "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts": { + "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts": { + "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts": { + "version": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e", + "signature": "7207e317a2cb07a177e7d963ab7b8c0e85dde7f9ddb50351f830239bf597569e", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts": { + "version": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d", + "signature": "cb609802a8698aa28b9c56331d4b53f590ca3c1c3a255350304ae3d06017779d", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts": { + "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { + "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts": { + "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.object.d.ts": { + "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { + "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.string.d.ts": { + "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts": { + "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { + "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": { + "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": { + "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts": { + "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts": { + "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts": { + "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.array.d.ts": { + "version": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "signature": "9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.object.d.ts": { + "version": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "signature": "6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.string.d.ts": { + "version": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "signature": "93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.symbol.d.ts": { + "version": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "signature": "2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts": { + "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts": { + "version": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd", + "signature": "89bf2b7a601b73ea4311eda9c41f86a58994fec1bee3b87c4a14d68d9adcdcbd", + "affectsGlobalScope": true + }, + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.full.d.ts": { + "version": "1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f", + "signature": "1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f", + "affectsGlobalScope": false + }, + "../../../node_modules/@solana/web3.js/lib/index.d.ts": { + "version": "f508e463c47f861a4a978ced18b4170d1c34764c7cbf8386a5238ea2dbbc45f8", + "signature": "f508e463c47f861a4a978ced18b4170d1c34764c7cbf8386a5238ea2dbbc45f8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/globals.d.ts": { + "version": "1332704d6761c94b85753fc3cadc36109f53e5d92fad137ac3de18083febedf3", + "signature": "1332704d6761c94b85753fc3cadc36109f53e5d92fad137ac3de18083febedf3", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/async_hooks.d.ts": { + "version": "c438b413e94ff76dfa20ae005f33a1c84f2480d1d66e0fd687501020d0de9b50", + "signature": "c438b413e94ff76dfa20ae005f33a1c84f2480d1d66e0fd687501020d0de9b50", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/buffer.d.ts": { + "version": "bc6a78961535181265845bf9b9e8a147ffd0ca275097ceb670a9b92afa825152", + "signature": "bc6a78961535181265845bf9b9e8a147ffd0ca275097ceb670a9b92afa825152", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/child_process.d.ts": { + "version": "987249e7b75023387c5fd9dc2f959ee777cb8989b7900f5a9eb4a67d290f2cba", + "signature": "987249e7b75023387c5fd9dc2f959ee777cb8989b7900f5a9eb4a67d290f2cba", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/cluster.d.ts": { + "version": "123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803", + "signature": "123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/console.d.ts": { + "version": "eb5197aade83cb0e360ac407289c53a8009e8fdae7939892a0240d30444496b6", + "signature": "eb5197aade83cb0e360ac407289c53a8009e8fdae7939892a0240d30444496b6", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/constants.d.ts": { + "version": "90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720", + "signature": "90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/crypto.d.ts": { + "version": "c5ecc351d5eaa36dc682b4c398b57a9d37c108857b71a09464a06e0185831ac2", + "signature": "c5ecc351d5eaa36dc682b4c398b57a9d37c108857b71a09464a06e0185831ac2", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/dgram.d.ts": { + "version": "7e050b767ed10c7ffbc01f314defbf420bf0b5d54ce666e1c87507c035dfc191", + "signature": "7e050b767ed10c7ffbc01f314defbf420bf0b5d54ce666e1c87507c035dfc191", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/dns.d.ts": { + "version": "7db7569fbb3e2b01ba8751c761cdd3f0debd104170d5665b7dc20a11630df3a9", + "signature": "7db7569fbb3e2b01ba8751c761cdd3f0debd104170d5665b7dc20a11630df3a9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/domain.d.ts": { + "version": "cde4d7f6274468180fa39847b183aec22626e8212ff885d535c53f4cd7c225fd", + "signature": "cde4d7f6274468180fa39847b183aec22626e8212ff885d535c53f4cd7c225fd", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/events.d.ts": { + "version": "365e8358843a23944be84b810b1f774ea0223adfccc085f30fd7f4c13dc8a09f", + "signature": "365e8358843a23944be84b810b1f774ea0223adfccc085f30fd7f4c13dc8a09f", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/fs.d.ts": { + "version": "f87f95c015900102a5c0edcdebb17596de1382510e6cc17ab79f375d3505bb12", + "signature": "f87f95c015900102a5c0edcdebb17596de1382510e6cc17ab79f375d3505bb12", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/fs/promises.d.ts": { + "version": "05b5679a897598ebe556ee93415b3af1f456e674ea82e4d7afcd716bfe43aa98", + "signature": "05b5679a897598ebe556ee93415b3af1f456e674ea82e4d7afcd716bfe43aa98", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/http.d.ts": { + "version": "35fe02b2c10616cc7ac3db9c15778df7ed9c99276889efdd9be31f342841cfcd", + "signature": "35fe02b2c10616cc7ac3db9c15778df7ed9c99276889efdd9be31f342841cfcd", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/http2.d.ts": { + "version": "1c3fe66943f587685aa4a42f664f794655da1767401d2f85910177dac78aa45d", + "signature": "1c3fe66943f587685aa4a42f664f794655da1767401d2f85910177dac78aa45d", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/https.d.ts": { + "version": "c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a", + "signature": "c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/inspector.d.ts": { + "version": "6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947", + "signature": "6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/module.d.ts": { + "version": "bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665", + "signature": "bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/net.d.ts": { + "version": "8de97668870cfb20fc9d355d2ef379e897bdd8a98c889c7d8a6de40ee408ad52", + "signature": "8de97668870cfb20fc9d355d2ef379e897bdd8a98c889c7d8a6de40ee408ad52", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/os.d.ts": { + "version": "ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34", + "signature": "ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/path.d.ts": { + "version": "84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35", + "signature": "84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/perf_hooks.d.ts": { + "version": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "signature": "4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/process.d.ts": { + "version": "e64979f6084c279bf8cd58dbc9203567f68f1ed19a8ad91351f078f03323ddf6", + "signature": "e64979f6084c279bf8cd58dbc9203567f68f1ed19a8ad91351f078f03323ddf6", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/punycode.d.ts": { + "version": "3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c", + "signature": "3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/querystring.d.ts": { + "version": "884560fda6c3868f925f022adc3a1289fe6507bbb45adb10fa1bbcc73a941bb0", + "signature": "884560fda6c3868f925f022adc3a1289fe6507bbb45adb10fa1bbcc73a941bb0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/readline.d.ts": { + "version": "6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9", + "signature": "6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/repl.d.ts": { + "version": "acbed967a379b3e9f73237ba9473f8b337eeea14b7dc64d445430b5d695751da", + "signature": "acbed967a379b3e9f73237ba9473f8b337eeea14b7dc64d445430b5d695751da", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/stream.d.ts": { + "version": "272a46cc8f494677af587d17939e61e7db2b1925633e4da0c186ba17f6732521", + "signature": "272a46cc8f494677af587d17939e61e7db2b1925633e4da0c186ba17f6732521", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/string_decoder.d.ts": { + "version": "d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457", + "signature": "d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/timers.d.ts": { + "version": "b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9", + "signature": "b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/tls.d.ts": { + "version": "a0545ca910ec6b318b8e1d63813c980c3be44824cf217b6477a56fbe9c7927d5", + "signature": "a0545ca910ec6b318b8e1d63813c980c3be44824cf217b6477a56fbe9c7927d5", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/trace_events.d.ts": { + "version": "a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638", + "signature": "a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/tty.d.ts": { + "version": "3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748", + "signature": "3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/url.d.ts": { + "version": "80ffc1786a5dab91b4aa59a72720f02f25df8b7c76b593e04d5e381aec284ccb", + "signature": "80ffc1786a5dab91b4aa59a72720f02f25df8b7c76b593e04d5e381aec284ccb", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/util.d.ts": { + "version": "5ef157fbb39494a581bd24f21b60488fe248d452c479738b5e41b48720ea69b8", + "signature": "5ef157fbb39494a581bd24f21b60488fe248d452c479738b5e41b48720ea69b8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/v8.d.ts": { + "version": "289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953", + "signature": "289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/vm.d.ts": { + "version": "baf0b82ffc5d2616f44a6fb1f81e8d798545bebf0c30f5d8b003a1dba1acfb3f", + "signature": "baf0b82ffc5d2616f44a6fb1f81e8d798545bebf0c30f5d8b003a1dba1acfb3f", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/worker_threads.d.ts": { + "version": "c6a5b34f1e725019445754f1e733585f113e0dced75f137bd3c4af5853d3f6ab", + "signature": "c6a5b34f1e725019445754f1e733585f113e0dced75f137bd3c4af5853d3f6ab", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/zlib.d.ts": { + "version": "15fbe50526244954eb2f933546bca6cdcf0db16c9428d099b3b386c1db5799ab", + "signature": "15fbe50526244954eb2f933546bca6cdcf0db16c9428d099b3b386c1db5799ab", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/ts3.4/base.d.ts": { + "version": "d44028ae0127eb3e9fcfa5f55a8b81d64775ce15aca1020fe25c511bbb055834", + "signature": "d44028ae0127eb3e9fcfa5f55a8b81d64775ce15aca1020fe25c511bbb055834", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/globals.global.d.ts": { + "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/node/wasi.d.ts": { + "version": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "signature": "4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/ts3.6/base.d.ts": { + "version": "ad1ae5ae98eceb9af99061e83e867b9897d267aebc8f3b938c9424deabadf4bb", + "signature": "ad1ae5ae98eceb9af99061e83e867b9897d267aebc8f3b938c9424deabadf4bb", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/assert.d.ts": { + "version": "d0c575d48d6dad75648017ff18762eb97f9398cc9486541b3070e79ce12719e6", + "signature": "d0c575d48d6dad75648017ff18762eb97f9398cc9486541b3070e79ce12719e6", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/base.d.ts": { + "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/node/index.d.ts": { + "version": "5825520e2099309182c6e2a2b3061b060d42a098c58f67d1754880a7e2cce99a", + "signature": "5825520e2099309182c6e2a2b3061b060d42a098c58f67d1754880a7e2cce99a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/bn.js/index.d.ts": { + "version": "bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5", + "signature": "bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5", + "affectsGlobalScope": false + }, + "../src/index.ts": { + "version": "2b4c4a922cebca598e239a21b70902d7246e9cadc4ed569f1fe78b5abdec6908", + "signature": "0cc80e64c15a85707e6f34f02d706a8803d85ad035707b2bc73f264583925032", + "affectsGlobalScope": false + }, + "../../../types/buffer-layout/index.d.ts": { + "version": "80ac140e00a69330b1bf0f9576c8b941ad507ec5ffe54c3294c5c4d7e4f9e835", + "signature": "80ac140e00a69330b1bf0f9576c8b941ad507ec5ffe54c3294c5c4d7e4f9e835", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/anymatch/index.d.ts": { + "version": "48b52264fa193879a074197839dbb4796fa07e86350ff888e5361e06aa46df76", + "signature": "48b52264fa193879a074197839dbb4796fa07e86350ff888e5361e06aa46df76", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/aria-query/index.d.ts": { + "version": "17ce4c8c90dd63282e4ff0d6a90fb4c86244293d77a1eaa23947dbe4e8b66eb5", + "signature": "17ce4c8c90dd63282e4ff0d6a90fb4c86244293d77a1eaa23947dbe4e8b66eb5", + "affectsGlobalScope": false + }, + "../../../node_modules/@babel/types/lib/index.d.ts": { + "version": "cd5a5fd244fa901f9c331e45b833ea5a4efa162acdc129c6e52e5d74e924752b", + "signature": "cd5a5fd244fa901f9c331e45b833ea5a4efa162acdc129c6e52e5d74e924752b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/babel__generator/index.d.ts": { + "version": "b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e", + "signature": "b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/babel__traverse/index.d.ts": { + "version": "ef91066d2057cca50511e3af2d4aa54e07913a15f9cee1748f256139318eb413", + "signature": "ef91066d2057cca50511e3af2d4aa54e07913a15f9cee1748f256139318eb413", + "affectsGlobalScope": false + }, + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts": { + "version": "8678956904af215fe917b2df07b6c54f876fa64eb1f8a158e4ff38404cef3ff4", + "signature": "8678956904af215fe917b2df07b6c54f876fa64eb1f8a158e4ff38404cef3ff4", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/babel__template/index.d.ts": { + "version": "3e0a34f7207431d967dc32d593d1cda0c23975e9484bc8895b39d96ffca4a0d8", + "signature": "3e0a34f7207431d967dc32d593d1cda0c23975e9484bc8895b39d96ffca4a0d8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/babel__core/index.d.ts": { + "version": "a66e700ed470a0cb52d14f3376c1605c70fec8e9659e45f7e22ad07fcd06ae04", + "signature": "a66e700ed470a0cb52d14f3376c1605c70fec8e9659e45f7e22ad07fcd06ae04", + "affectsGlobalScope": false + }, + "../../../node_modules/base-x/src/index.d.ts": { + "version": "e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1", + "signature": "e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/bs58/index.d.ts": { + "version": "5cbc27193321e6ba10f4e9f3c5519649d9e2716cf103efd7eaa7a89e0f8ed1d4", + "signature": "5cbc27193321e6ba10f4e9f3c5519649d9e2716cf103efd7eaa7a89e0f8ed1d4", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/chartist/index.d.ts": { + "version": "a804408ee8a8b0de9aa9e541da8192a4212b1696d067f71c309f22f84eea056c", + "signature": "a804408ee8a8b0de9aa9e541da8192a4212b1696d067f71c309f22f84eea056c", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/connect/index.d.ts": { + "version": "e6ffa74698f0a1d23e4223242ed7dcdb89d02bbbb063a1930e9f91d0385abe16", + "signature": "e6ffa74698f0a1d23e4223242ed7dcdb89d02bbbb063a1930e9f91d0385abe16", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/eslint/helpers.d.ts": { + "version": "f345b0888d003fd69cb32bad3a0aa04c615ccafc572019e4bd86a52bd5e49e46", + "signature": "f345b0888d003fd69cb32bad3a0aa04c615ccafc572019e4bd86a52bd5e49e46", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/json-schema/index.d.ts": { + "version": "b2be568d8ce95fcb26eebd04c035d94825655fdf689bf67d799f5ff8cbbb1024", + "signature": "b2be568d8ce95fcb26eebd04c035d94825655fdf689bf67d799f5ff8cbbb1024", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/estree/index.d.ts": { + "version": "6a38e250306ceccbab257d11b846d5bd12491157d20901fa01afe4050c93c1b5", + "signature": "6a38e250306ceccbab257d11b846d5bd12491157d20901fa01afe4050c93c1b5", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/eslint/index.d.ts": { + "version": "be337886c0b7b94a0cec462da9d6136abfda99d51b4cd67830351cd691285387", + "signature": "be337886c0b7b94a0cec462da9d6136abfda99d51b4cd67830351cd691285387", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/range-parser/index.d.ts": { + "version": "4e88b833be14c7f384e0dcd57bb30acd799e8e34d212635d693e41a75a71164b", + "signature": "4e88b833be14c7f384e0dcd57bb30acd799e8e34d212635d693e41a75a71164b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/qs/index.d.ts": { + "version": "c236451df6139a965bb9b8fba15a43a8bebf4400ca589998e2bdc5e1291fa0f9", + "signature": "c236451df6139a965bb9b8fba15a43a8bebf4400ca589998e2bdc5e1291fa0f9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/express-serve-static-core/index.d.ts": { + "version": "495cc9f802a6bce4aa21dddf13f8e61b4f0b7976621af90e31c58a4dfe4802ef", + "signature": "495cc9f802a6bce4aa21dddf13f8e61b4f0b7976621af90e31c58a4dfe4802ef", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/minimatch/index.d.ts": { + "version": "1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633", + "signature": "1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/glob/index.d.ts": { + "version": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", + "signature": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/graceful-fs/index.d.ts": { + "version": "cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc", + "signature": "cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/history/DOMUtils.d.ts": { + "version": "271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63", + "signature": "271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/history/createBrowserHistory.d.ts": { + "version": "c6f2572e21f626260d2e4a65e4e1e42b9b273b6f43b5c3bc115c2926417d3eca", + "signature": "c6f2572e21f626260d2e4a65e4e1e42b9b273b6f43b5c3bc115c2926417d3eca", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/history/createHashHistory.d.ts": { + "version": "374ab77e05e0bf5a52acad6d65121d4bd31068108f23d70186dba5fcd7d6a1a3", + "signature": "374ab77e05e0bf5a52acad6d65121d4bd31068108f23d70186dba5fcd7d6a1a3", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/history/createMemoryHistory.d.ts": { + "version": "a4ecd4bb653aa71093375845fba6250ca0f3c633d0e933fc9bf4b301834eab27", + "signature": "a4ecd4bb653aa71093375845fba6250ca0f3c633d0e933fc9bf4b301834eab27", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/history/LocationUtils.d.ts": { + "version": "25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404", + "signature": "25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/history/PathUtils.d.ts": { + "version": "4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243", + "signature": "4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/history/index.d.ts": { + "version": "cc53cba64efb30576f2a36f1d7107e4453e84cbd0f371d49cd1dfd208e11233b", + "signature": "cc53cba64efb30576f2a36f1d7107e4453e84cbd0f371d49cd1dfd208e11233b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react/global.d.ts": { + "version": "ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6", + "signature": "ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6", + "affectsGlobalScope": true + }, + "../../../node_modules/csstype/index.d.ts": { + "version": "ea58e4cbcf3d760a15f9300978a360c46360f544b355c737b60c733a385b8858", + "signature": "ea58e4cbcf3d760a15f9300978a360c46360f544b355c737b60c733a385b8858", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/prop-types/index.d.ts": { + "version": "a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad", + "signature": "a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react/index.d.ts": { + "version": "416e5d547a57e2fc9bac063ff167eee2c34aad14296acf9688eaa24fee981e05", + "signature": "416e5d547a57e2fc9bac063ff167eee2c34aad14296acf9688eaa24fee981e05", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts": { + "version": "bfe1b52cf71aea9bf8815810cc5d9490fa9617313e3d3c2ee3809a28b80d0bb4", + "signature": "bfe1b52cf71aea9bf8815810cc5d9490fa9617313e3d3c2ee3809a28b80d0bb4", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/html-minifier-terser/index.d.ts": { + "version": "6767cce098e1e6369c26258b7a1f9e569c5467d501a47a090136d5ea6e80ae6d", + "signature": "6767cce098e1e6369c26258b7a1f9e569c5467d501a47a090136d5ea6e80ae6d", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts": { + "version": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "signature": "de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/istanbul-lib-report/index.d.ts": { + "version": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee", + "signature": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/istanbul-reports/index.d.ts": { + "version": "905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab", + "signature": "905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab", + "affectsGlobalScope": false + }, + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts": { + "version": "d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322", + "signature": "d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322", + "affectsGlobalScope": false + }, + "../../../node_modules/jest-diff/build/types.d.ts": { + "version": "69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2", + "signature": "69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2", + "affectsGlobalScope": false + }, + "../../../node_modules/jest-diff/build/diffLines.d.ts": { + "version": "561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9", + "signature": "561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9", + "affectsGlobalScope": false + }, + "../../../node_modules/jest-diff/build/printDiffs.d.ts": { + "version": "62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f", + "signature": "62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f", + "affectsGlobalScope": false + }, + "../../../node_modules/jest-diff/build/index.d.ts": { + "version": "b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc", + "signature": "b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc", + "affectsGlobalScope": false + }, + "../../../node_modules/pretty-format/build/types.d.ts": { + "version": "5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09", + "signature": "5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09", + "affectsGlobalScope": false + }, + "../../../node_modules/pretty-format/build/index.d.ts": { + "version": "02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c", + "signature": "02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/jest/index.d.ts": { + "version": "480dcf599750efc664ba6edba1ed91fb5761ef5ae0e45e475b69a994e312db73", + "signature": "480dcf599750efc664ba6edba1ed91fb5761ef5ae0e45e475b69a994e312db73", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/json5/index.d.ts": { + "version": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", + "signature": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/common.d.ts": { + "version": "29304d38d619bac17128f20c21af1a03256f9edf8f0b82e6674565e09e956dff", + "signature": "29304d38d619bac17128f20c21af1a03256f9edf8f0b82e6674565e09e956dff", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/array.d.ts": { + "version": "d03a1ae3d39f757c9f22e4e775b940a98d86bb50ec85529b59e32a17b65c2b90", + "signature": "d03a1ae3d39f757c9f22e4e775b940a98d86bb50ec85529b59e32a17b65c2b90", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/collection.d.ts": { + "version": "0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8", + "signature": "0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/date.d.ts": { + "version": "187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42", + "signature": "187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/function.d.ts": { + "version": "c9f396e71966bd3a890d8a36a6a497dbf260e9b868158ea7824d4b5421210afe", + "signature": "c9f396e71966bd3a890d8a36a6a497dbf260e9b868158ea7824d4b5421210afe", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/lang.d.ts": { + "version": "509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32", + "signature": "509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/math.d.ts": { + "version": "9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb", + "signature": "9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/number.d.ts": { + "version": "00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a", + "signature": "00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/object.d.ts": { + "version": "7fc5a3d7cff296cea5c225911726a56283b663328709088fcc912d61f73682fc", + "signature": "7fc5a3d7cff296cea5c225911726a56283b663328709088fcc912d61f73682fc", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/seq.d.ts": { + "version": "3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd", + "signature": "3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/string.d.ts": { + "version": "4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a", + "signature": "4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/common/util.d.ts": { + "version": "2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5", + "signature": "2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/lodash/index.d.ts": { + "version": "0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8", + "signature": "0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/react-addons-linked-state-mixin/index.d.ts": { + "version": "aa38590e6e8349c9cd820eab8d40163f96e9f4292491da61ae914a6f8e40d85e", + "signature": "aa38590e6e8349c9cd820eab8d40163f96e9f4292491da61ae914a6f8e40d85e", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/material-ui/index.d.ts": { + "version": "f35ff69e2b8cd08503691dde08db3581c2019f1669b55d4961fcebf4f5d1acda", + "signature": "f35ff69e2b8cd08503691dde08db3581c2019f1669b55d4961fcebf4f5d1acda", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/minimist/index.d.ts": { + "version": "3602dfff3072caea42f23a9b63fb34a7b0c95a62b93ce2add5fe6b159447845e", + "signature": "3602dfff3072caea42f23a9b63fb34a7b0c95a62b93ce2add5fe6b159447845e", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/normalize-package-data/index.d.ts": { + "version": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "signature": "c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/pako/index.d.ts": { + "version": "ac8256962829db28179e5b4ee97f4a0b27d85f219ad5c7b03b375673fadddd59", + "signature": "ac8256962829db28179e5b4ee97f4a0b27d85f219ad5c7b03b375673fadddd59", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/parse-json/index.d.ts": { + "version": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "signature": "2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/prettier/index.d.ts": { + "version": "7403a1397d48771d58d55c603d0c51aa3d4cd6467bca03140f085fdc432eb912", + "signature": "7403a1397d48771d58d55c603d0c51aa3d4cd6467bca03140f085fdc432eb912", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/q/index.d.ts": { + "version": "f9a2dd6a6084665f093ed0e9664b8e673be2a45e342a59dd4e0e4e552e68a9ad", + "signature": "f9a2dd6a6084665f093ed0e9664b8e673be2a45e342a59dd4e0e4e552e68a9ad", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-dom/index.d.ts": { + "version": "8483a29c17f7feb768a1f4333cf12ccf1e7341bd89dadcf407e012d5315228d0", + "signature": "8483a29c17f7feb768a1f4333cf12ccf1e7341bd89dadcf407e012d5315228d0", + "affectsGlobalScope": false + }, + "../../../node_modules/symbol-observable/index.d.ts": { + "version": "7ccece60f62968f5765383f1f5322ace6937e42c3a2068834ac214fe24f9b7bc", + "signature": "7ccece60f62968f5765383f1f5322ace6937e42c3a2068834ac214fe24f9b7bc", + "affectsGlobalScope": true + }, + "../../../node_modules/redux/index.d.ts": { + "version": "dc7b63bcdfaf08b68a9fabeab720173481db52014bbb40314f5a6757387b6516", + "signature": "dc7b63bcdfaf08b68a9fabeab720173481db52014bbb40314f5a6757387b6516", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-redux/index.d.ts": { + "version": "985e8dafd1a03093d3ec2cf3bc3e75dfc556a1a8b507f896325ebd6aeab57b43", + "signature": "985e8dafd1a03093d3ec2cf3bc3e75dfc556a1a8b507f896325ebd6aeab57b43", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-router/index.d.ts": { + "version": "0caf70f74777ccb2fff9869da0c51fb832923e9625a84249e00bf107b399bfaa", + "signature": "0caf70f74777ccb2fff9869da0c51fb832923e9625a84249e00bf107b399bfaa", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-router-dom/index.d.ts": { + "version": "fd0330b691c4c697c5a8c6b68bdb6727cbf966156a2e131108696a98716a5396", + "signature": "fd0330b691c4c697c5a8c6b68bdb6727cbf966156a2e131108696a98716a5396", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-transition-group/Transition.d.ts": { + "version": "92decc8ffcee1e19965486f4c7440ab3fee1d6dfde4054eb308fc57b466cc12a", + "signature": "92decc8ffcee1e19965486f4c7440ab3fee1d6dfde4054eb308fc57b466cc12a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-transition-group/CSSTransition.d.ts": { + "version": "1429ac61feca4fdc074f60eb9b07f8b9e2c0ef9335c26e18d05f8ab67653f72b", + "signature": "1429ac61feca4fdc074f60eb9b07f8b9e2c0ef9335c26e18d05f8ab67653f72b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-transition-group/TransitionGroup.d.ts": { + "version": "e0db728e68cfb650b729496d5b1cb436930f593b6bf5b4ad692c18ebe40e9ee0", + "signature": "e0db728e68cfb650b729496d5b1cb436930f593b6bf5b4ad692c18ebe40e9ee0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-transition-group/SwitchTransition.d.ts": { + "version": "9155a57743465e6540e3e81a73f3d0c0630a5c5ff80e1be6232fbd46bcb6dc90", + "signature": "9155a57743465e6540e3e81a73f3d0c0630a5c5ff80e1be6232fbd46bcb6dc90", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-transition-group/config.d.ts": { + "version": "960a68ced7820108787135bdae5265d2cc4b511b7dcfd5b8f213432a8483daf1", + "signature": "960a68ced7820108787135bdae5265d2cc4b511b7dcfd5b8f213432a8483daf1", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/react-transition-group/index.d.ts": { + "version": "a287b3414eb03d7697e2573baa57af270d64e44c3146dc4b721c1ba022f4121b", + "signature": "a287b3414eb03d7697e2573baa57af270d64e44c3146dc4b721c1ba022f4121b", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/resolve/index.d.ts": { + "version": "2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761", + "signature": "2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/source-list-map/index.d.ts": { + "version": "67fc055eb86a0632e2e072838f889ffe1754083cb13c8c80a06a7d895d877aae", + "signature": "67fc055eb86a0632e2e072838f889ffe1754083cb13c8c80a06a7d895d877aae", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/stack-utils/index.d.ts": { + "version": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57", + "signature": "c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/styled-components/index.d.ts": { + "version": "6839e1779e1f61e0ed62b1ca3ff7e74dc70479a5455077a38434d0e404103c28", + "signature": "6839e1779e1f61e0ed62b1ca3ff7e74dc70479a5455077a38434d0e404103c28", + "affectsGlobalScope": true + }, + "../../../node_modules/@types/tapable/index.d.ts": { + "version": "d558a0fe921ebcc88d3212c2c42108abf9f0d694d67ebdeba37d7728c044f579", + "signature": "d558a0fe921ebcc88d3212c2c42108abf9f0d694d67ebdeba37d7728c044f579", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/testing-library__jest-dom/index.d.ts": { + "version": "d196da9c61a0bec85db6f6ee9b1f46781d25e0627b1d2bedcaeea8ebb1749559", + "signature": "d196da9c61a0bec85db6f6ee9b1f46781d25e0627b1d2bedcaeea8ebb1749559", + "affectsGlobalScope": true + }, + "../../../node_modules/source-map/source-map.d.ts": { + "version": "2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579", + "signature": "2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/uglify-js/index.d.ts": { + "version": "0215efc2c3f40fd9ec91f19d277afc9efba41cee054fd0be4c92e75cb10cf2c0", + "signature": "0215efc2c3f40fd9ec91f19d277afc9efba41cee054fd0be4c92e75cb10cf2c0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts": { + "version": "b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9", + "signature": "b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts": { + "version": "8560a87b2e9f8e2c3808c8f6172c9b7eb6c9b08cb9f937db71c285ecf292c81d", + "signature": "8560a87b2e9f8e2c3808c8f6172c9b7eb6c9b08cb9f937db71c285ecf292c81d", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts": { + "version": "ffe3931ff864f28d80ae2f33bd11123ad3d7bad9896b910a1e61504cc093e1f5", + "signature": "ffe3931ff864f28d80ae2f33bd11123ad3d7bad9896b910a1e61504cc093e1f5", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts": { + "version": "083c1bd82f8dc3a1ed6fc9e8eaddf141f7c05df418eca386598821e045253af9", + "signature": "083c1bd82f8dc3a1ed6fc9e8eaddf141f7c05df418eca386598821e045253af9", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts": { + "version": "274ebe605bd7f71ce161f9f5328febc7d547a2929f803f04b44ec4a7d8729517", + "signature": "274ebe605bd7f71ce161f9f5328febc7d547a2929f803f04b44ec4a7d8729517", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts": { + "version": "6ca0207e70d985a24396583f55836b10dc181063ab6069733561bfde404d1bad", + "signature": "6ca0207e70d985a24396583f55836b10dc181063ab6069733561bfde404d1bad", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts": { + "version": "5908142efeaab38ffdf43927ee0af681ae77e0d7672b956dfb8b6c705dbfe106", + "signature": "5908142efeaab38ffdf43927ee0af681ae77e0d7672b956dfb8b6c705dbfe106", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts": { + "version": "f772b188b943549b5c5eb803133314b8aa7689eced80eed0b70e2f30ca07ab9c", + "signature": "f772b188b943549b5c5eb803133314b8aa7689eced80eed0b70e2f30ca07ab9c", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts": { + "version": "0026b816ef05cfbf290e8585820eef0f13250438669107dfc44482bac007b14f", + "signature": "0026b816ef05cfbf290e8585820eef0f13250438669107dfc44482bac007b14f", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts": { + "version": "8ef5aad624890acfe0fa48230edce255f00934016d16acb8de0edac0ea5b21bb", + "signature": "8ef5aad624890acfe0fa48230edce255f00934016d16acb8de0edac0ea5b21bb", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/index.d.ts": { + "version": "608f7279e195a33959d62ac32f42ca201a225a4c820a872f9af8562120b2865a", + "signature": "608f7279e195a33959d62ac32f42ca201a225a4c820a872f9af8562120b2865a", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts": { + "version": "d84398556ba4595ee6be554671da142cfe964cbdebb2f0c517a10f76f2b016c0", + "signature": "d84398556ba4595ee6be554671da142cfe964cbdebb2f0c517a10f76f2b016c0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack-sources/index.d.ts": { + "version": "004efa076dda36645bc670b0daaafb83a2d10ef60b6c6ed1cb39168d7e7fbfa8", + "signature": "004efa076dda36645bc670b0daaafb83a2d10ef60b6c6ed1cb39168d7e7fbfa8", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/webpack/index.d.ts": { + "version": "6a11a44c28aeb36e551aad316a3c30e5edd9244396378f664dea164c4ce49fe0", + "signature": "6a11a44c28aeb36e551aad316a3c30e5edd9244396378f664dea164c4ce49fe0", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/yargs-parser/index.d.ts": { + "version": "fdfbe321c556c39a2ecf791d537b999591d0849e971dd938d88f460fea0186f6", + "signature": "fdfbe321c556c39a2ecf791d537b999591d0849e971dd938d88f460fea0186f6", + "affectsGlobalScope": false + }, + "../../../node_modules/@types/yargs/index.d.ts": { + "version": "587e091276e4676b63121333f417206cd84cadf91b09949303431920d19bc04f", + "signature": "587e091276e4676b63121333f417206cd84cadf91b09949303431920d19bc04f", + "affectsGlobalScope": false + } + }, + "options": { + "module": 1, + "target": 6, + "outDir": "./lib", + "rootDir": "../src", + "composite": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "typeRoots": [ + "../../../types", + "../../../node_modules/@types" + ], + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts": [ + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@solana/web3.js/lib/index.d.ts": [ + "../../../types/buffer-layout/index.d.ts" + ], + "../../../node_modules/@types/babel__core/index.d.ts": [ + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../../../node_modules/@babel/types/lib/index.d.ts", + "../../../node_modules/@types/babel__generator/index.d.ts", + "../../../node_modules/@types/babel__template/index.d.ts", + "../../../node_modules/@types/babel__traverse/index.d.ts" + ], + "../../../node_modules/@types/babel__generator/index.d.ts": [ + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@types/babel__template/index.d.ts": [ + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@types/babel__traverse/index.d.ts": [ + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@types/bn.js/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/bs58/index.d.ts": [ + "../../../node_modules/base-x/src/index.d.ts" + ], + "../../../node_modules/@types/connect/index.d.ts": [ + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/eslint/index.d.ts": [ + "../../../node_modules/@types/eslint/helpers.d.ts", + "../../../node_modules/@types/estree/index.d.ts", + "../../../node_modules/@types/json-schema/index.d.ts" + ], + "../../../node_modules/@types/express-serve-static-core/index.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/qs/index.d.ts", + "../../../node_modules/@types/range-parser/index.d.ts" + ], + "../../../node_modules/@types/glob/index.d.ts": [ + "../../../node_modules/@types/minimatch/index.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/graceful-fs/index.d.ts": [ + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/history/LocationUtils.d.ts": [ + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/PathUtils.d.ts": [ + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/createBrowserHistory.d.ts": [ + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/createHashHistory.d.ts": [ + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/createMemoryHistory.d.ts": [ + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/index.d.ts": [ + "../../../node_modules/@types/history/LocationUtils.d.ts", + "../../../node_modules/@types/history/PathUtils.d.ts", + "../../../node_modules/@types/history/createBrowserHistory.d.ts", + "../../../node_modules/@types/history/createHashHistory.d.ts", + "../../../node_modules/@types/history/createMemoryHistory.d.ts" + ], + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/istanbul-lib-report/index.d.ts": [ + "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts" + ], + "../../../node_modules/@types/istanbul-reports/index.d.ts": [ + "../../../node_modules/@types/istanbul-lib-report/index.d.ts" + ], + "../../../node_modules/@types/jest/index.d.ts": [ + "../../../node_modules/jest-diff/build/index.d.ts", + "../../../node_modules/pretty-format/build/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/array.d.ts": [ + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/collection.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/common.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/date.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/function.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/lang.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/math.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/number.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/object.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/seq.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/string.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/util.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/index.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts" + ], + "../../../node_modules/@types/material-ui/index.d.ts": [ + "../../../node_modules/@types/react-addons-linked-state-mixin/index.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/node/base.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../../../node_modules/@types/node/child_process.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/cluster.d.ts": [ + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/console.d.ts": [ + "../../../node_modules/@types/node/util.d.ts" + ], + "../../../node_modules/@types/node/constants.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/os.d.ts" + ], + "../../../node_modules/@types/node/crypto.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/dgram.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/domain.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/fs.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/fs/promises.d.ts": [ + "../../../node_modules/@types/node/fs.d.ts" + ], + "../../../node_modules/@types/node/http.d.ts": [ + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/http2.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/https.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/index.d.ts": [ + "../../../node_modules/@types/node/base.d.ts" + ], + "../../../node_modules/@types/node/inspector.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/module.d.ts": [ + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/net.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/perf_hooks.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts" + ], + "../../../node_modules/@types/node/process.d.ts": [ + "../../../node_modules/@types/node/tty.d.ts" + ], + "../../../node_modules/@types/node/readline.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/repl.d.ts": [ + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/stream.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/tls.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/ts3.4/base.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/buffer.d.ts", + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/console.d.ts", + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/globals.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/inspector.d.ts", + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/os.d.ts", + "../../../node_modules/@types/node/path.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts", + "../../../node_modules/@types/node/process.d.ts", + "../../../node_modules/@types/node/punycode.d.ts", + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/string_decoder.d.ts", + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/trace_events.d.ts", + "../../../node_modules/@types/node/tty.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/v8.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts", + "../../../node_modules/@types/node/zlib.d.ts" + ], + "../../../node_modules/@types/node/ts3.6/base.d.ts": [ + "../../../node_modules/@types/node/globals.global.d.ts", + "../../../node_modules/@types/node/ts3.4/base.d.ts", + "../../../node_modules/@types/node/wasi.d.ts" + ], + "../../../node_modules/@types/node/tty.d.ts": [ + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/url.d.ts": [ + "../../../node_modules/@types/node/querystring.d.ts" + ], + "../../../node_modules/@types/node/v8.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/worker_threads.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/zlib.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/react-addons-linked-state-mixin/index.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-dom/index.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-redux/index.d.ts": [ + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts", + "../../../node_modules/@types/react/index.d.ts", + "../../../node_modules/redux/index.d.ts" + ], + "../../../node_modules/@types/react-router-dom/index.d.ts": [ + "../../../node_modules/@types/history/index.d.ts", + "../../../node_modules/@types/react-router/index.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-router/index.d.ts": [ + "../../../node_modules/@types/history/index.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/CSSTransition.d.ts": [ + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/SwitchTransition.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/Transition.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/TransitionGroup.d.ts": [ + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/index.d.ts": [ + "../../../node_modules/@types/react-transition-group/CSSTransition.d.ts", + "../../../node_modules/@types/react-transition-group/SwitchTransition.d.ts", + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react-transition-group/TransitionGroup.d.ts", + "../../../node_modules/@types/react-transition-group/config.d.ts" + ], + "../../../node_modules/@types/react/index.d.ts": [ + "../../../node_modules/@types/prop-types/index.d.ts", + "../../../node_modules/@types/react/global.d.ts", + "../../../node_modules/csstype/index.d.ts" + ], + "../../../node_modules/@types/resolve/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/styled-components/index.d.ts": [ + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts", + "../../../node_modules/@types/react/index.d.ts", + "../../../node_modules/csstype/index.d.ts" + ], + "../../../node_modules/@types/testing-library__jest-dom/index.d.ts": [ + "../../../node_modules/@types/jest/index.d.ts" + ], + "../../../node_modules/@types/uglify-js/index.d.ts": [ + "../../../node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts": [ + "../../../node_modules/@types/source-list-map/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts": [ + "../../../node_modules/@types/source-list-map/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/index.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack/index.d.ts": [ + "../../../node_modules/@types/anymatch/index.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/tapable/index.d.ts", + "../../../node_modules/@types/uglify-js/index.d.ts", + "../../../node_modules/@types/webpack-sources/index.d.ts", + "../../../node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/yargs/index.d.ts": [ + "../../../node_modules/@types/yargs-parser/index.d.ts" + ], + "../../../node_modules/base-x/src/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/jest-diff/build/diffLines.d.ts": [ + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts" + ], + "../../../node_modules/jest-diff/build/index.d.ts": [ + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/diffLines.d.ts", + "../../../node_modules/jest-diff/build/printDiffs.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts" + ], + "../../../node_modules/jest-diff/build/printDiffs.d.ts": [ + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts" + ], + "../../../node_modules/pretty-format/build/index.d.ts": [ + "../../../node_modules/pretty-format/build/types.d.ts" + ], + "../../../node_modules/redux/index.d.ts": [ + "../../../node_modules/symbol-observable/index.d.ts" + ], + "../src/index.ts": [ + "../../../node_modules/@solana/web3.js/lib/index.d.ts", + "../../../node_modules/@types/bn.js/index.d.ts", + "../../../types/buffer-layout/index.d.ts" + ] + }, + "exportedModulesMap": { + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts": [ + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@solana/web3.js/lib/index.d.ts": [ + "../../../types/buffer-layout/index.d.ts" + ], + "../../../node_modules/@types/babel__core/index.d.ts": [ + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../../../node_modules/@babel/types/lib/index.d.ts", + "../../../node_modules/@types/babel__generator/index.d.ts", + "../../../node_modules/@types/babel__template/index.d.ts", + "../../../node_modules/@types/babel__traverse/index.d.ts" + ], + "../../../node_modules/@types/babel__generator/index.d.ts": [ + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@types/babel__template/index.d.ts": [ + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@types/babel__traverse/index.d.ts": [ + "../../../node_modules/@babel/types/lib/index.d.ts" + ], + "../../../node_modules/@types/bn.js/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/bs58/index.d.ts": [ + "../../../node_modules/base-x/src/index.d.ts" + ], + "../../../node_modules/@types/connect/index.d.ts": [ + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/eslint/index.d.ts": [ + "../../../node_modules/@types/eslint/helpers.d.ts", + "../../../node_modules/@types/estree/index.d.ts", + "../../../node_modules/@types/json-schema/index.d.ts" + ], + "../../../node_modules/@types/express-serve-static-core/index.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/qs/index.d.ts", + "../../../node_modules/@types/range-parser/index.d.ts" + ], + "../../../node_modules/@types/glob/index.d.ts": [ + "../../../node_modules/@types/minimatch/index.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/graceful-fs/index.d.ts": [ + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/history/LocationUtils.d.ts": [ + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/PathUtils.d.ts": [ + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/createBrowserHistory.d.ts": [ + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/createHashHistory.d.ts": [ + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/createMemoryHistory.d.ts": [ + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/index.d.ts" + ], + "../../../node_modules/@types/history/index.d.ts": [ + "../../../node_modules/@types/history/LocationUtils.d.ts", + "../../../node_modules/@types/history/PathUtils.d.ts", + "../../../node_modules/@types/history/createBrowserHistory.d.ts", + "../../../node_modules/@types/history/createHashHistory.d.ts", + "../../../node_modules/@types/history/createMemoryHistory.d.ts" + ], + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/istanbul-lib-report/index.d.ts": [ + "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts" + ], + "../../../node_modules/@types/istanbul-reports/index.d.ts": [ + "../../../node_modules/@types/istanbul-lib-report/index.d.ts" + ], + "../../../node_modules/@types/jest/index.d.ts": [ + "../../../node_modules/jest-diff/build/index.d.ts", + "../../../node_modules/pretty-format/build/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/array.d.ts": [ + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/collection.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/common.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/date.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/function.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/lang.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/math.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/number.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/object.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/seq.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/string.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/common/util.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/index.d.ts" + ], + "../../../node_modules/@types/lodash/index.d.ts": [ + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts" + ], + "../../../node_modules/@types/material-ui/index.d.ts": [ + "../../../node_modules/@types/react-addons-linked-state-mixin/index.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/node/base.d.ts": [ + "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/ts3.6/base.d.ts" + ], + "../../../node_modules/@types/node/child_process.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/cluster.d.ts": [ + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/console.d.ts": [ + "../../../node_modules/@types/node/util.d.ts" + ], + "../../../node_modules/@types/node/constants.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/os.d.ts" + ], + "../../../node_modules/@types/node/crypto.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/dgram.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/domain.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/fs.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/fs/promises.d.ts": [ + "../../../node_modules/@types/node/fs.d.ts" + ], + "../../../node_modules/@types/node/http.d.ts": [ + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/http2.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/https.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/index.d.ts": [ + "../../../node_modules/@types/node/base.d.ts" + ], + "../../../node_modules/@types/node/inspector.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/module.d.ts": [ + "../../../node_modules/@types/node/url.d.ts" + ], + "../../../node_modules/@types/node/net.d.ts": [ + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/perf_hooks.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts" + ], + "../../../node_modules/@types/node/process.d.ts": [ + "../../../node_modules/@types/node/tty.d.ts" + ], + "../../../node_modules/@types/node/readline.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/repl.d.ts": [ + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/stream.d.ts": [ + "../../../node_modules/@types/node/events.d.ts" + ], + "../../../node_modules/@types/node/tls.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/ts3.4/base.d.ts": [ + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/buffer.d.ts", + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/console.d.ts", + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/globals.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/inspector.d.ts", + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/os.d.ts", + "../../../node_modules/@types/node/path.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts", + "../../../node_modules/@types/node/process.d.ts", + "../../../node_modules/@types/node/punycode.d.ts", + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/string_decoder.d.ts", + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/trace_events.d.ts", + "../../../node_modules/@types/node/tty.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/v8.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts", + "../../../node_modules/@types/node/zlib.d.ts" + ], + "../../../node_modules/@types/node/ts3.6/base.d.ts": [ + "../../../node_modules/@types/node/globals.global.d.ts", + "../../../node_modules/@types/node/ts3.4/base.d.ts", + "../../../node_modules/@types/node/wasi.d.ts" + ], + "../../../node_modules/@types/node/tty.d.ts": [ + "../../../node_modules/@types/node/net.d.ts" + ], + "../../../node_modules/@types/node/url.d.ts": [ + "../../../node_modules/@types/node/querystring.d.ts" + ], + "../../../node_modules/@types/node/v8.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/node/worker_threads.d.ts": [ + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/vm.d.ts" + ], + "../../../node_modules/@types/node/zlib.d.ts": [ + "../../../node_modules/@types/node/stream.d.ts" + ], + "../../../node_modules/@types/react-addons-linked-state-mixin/index.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-dom/index.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-redux/index.d.ts": [ + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts", + "../../../node_modules/@types/react/index.d.ts", + "../../../node_modules/redux/index.d.ts" + ], + "../../../node_modules/@types/react-router-dom/index.d.ts": [ + "../../../node_modules/@types/history/index.d.ts", + "../../../node_modules/@types/react-router/index.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-router/index.d.ts": [ + "../../../node_modules/@types/history/index.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/CSSTransition.d.ts": [ + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/SwitchTransition.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/Transition.d.ts": [ + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/TransitionGroup.d.ts": [ + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react/index.d.ts" + ], + "../../../node_modules/@types/react-transition-group/index.d.ts": [ + "../../../node_modules/@types/react-transition-group/CSSTransition.d.ts", + "../../../node_modules/@types/react-transition-group/SwitchTransition.d.ts", + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react-transition-group/TransitionGroup.d.ts", + "../../../node_modules/@types/react-transition-group/config.d.ts" + ], + "../../../node_modules/@types/react/index.d.ts": [ + "../../../node_modules/@types/prop-types/index.d.ts", + "../../../node_modules/@types/react/global.d.ts", + "../../../node_modules/csstype/index.d.ts" + ], + "../../../node_modules/@types/resolve/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/@types/styled-components/index.d.ts": [ + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts", + "../../../node_modules/@types/react/index.d.ts", + "../../../node_modules/csstype/index.d.ts" + ], + "../../../node_modules/@types/testing-library__jest-dom/index.d.ts": [ + "../../../node_modules/@types/jest/index.d.ts" + ], + "../../../node_modules/@types/uglify-js/index.d.ts": [ + "../../../node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts": [ + "../../../node_modules/@types/source-list-map/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts": [ + "../../../node_modules/@types/source-list-map/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts": [ + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack-sources/lib/index.d.ts": [ + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/webpack/index.d.ts": [ + "../../../node_modules/@types/anymatch/index.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/tapable/index.d.ts", + "../../../node_modules/@types/uglify-js/index.d.ts", + "../../../node_modules/@types/webpack-sources/index.d.ts", + "../../../node_modules/source-map/source-map.d.ts" + ], + "../../../node_modules/@types/yargs/index.d.ts": [ + "../../../node_modules/@types/yargs-parser/index.d.ts" + ], + "../../../node_modules/base-x/src/index.d.ts": [ + "../../../node_modules/@types/node/index.d.ts" + ], + "../../../node_modules/jest-diff/build/diffLines.d.ts": [ + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts" + ], + "../../../node_modules/jest-diff/build/index.d.ts": [ + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/diffLines.d.ts", + "../../../node_modules/jest-diff/build/printDiffs.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts" + ], + "../../../node_modules/jest-diff/build/printDiffs.d.ts": [ + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts" + ], + "../../../node_modules/pretty-format/build/index.d.ts": [ + "../../../node_modules/pretty-format/build/types.d.ts" + ], + "../../../node_modules/redux/index.d.ts": [ + "../../../node_modules/symbol-observable/index.d.ts" + ], + "../src/index.ts": [ + "../../../node_modules/@solana/web3.js/lib/index.d.ts", + "../../../node_modules/@types/bn.js/index.d.ts", + "../../../types/buffer-layout/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.dom.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.core.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2016.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.object.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.string.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.array.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.full.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.object.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.string.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.es5.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.scripthost.d.ts", + "../../../../../../../../../.nvm/versions/node/v14.7.0/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts", + "../../../node_modules/@babel/parser/typings/babel-parser.d.ts", + "../../../node_modules/@babel/types/lib/index.d.ts", + "../../../node_modules/@solana/web3.js/lib/index.d.ts", + "../../../node_modules/@types/anymatch/index.d.ts", + "../../../node_modules/@types/aria-query/index.d.ts", + "../../../node_modules/@types/babel__core/index.d.ts", + "../../../node_modules/@types/babel__generator/index.d.ts", + "../../../node_modules/@types/babel__template/index.d.ts", + "../../../node_modules/@types/babel__traverse/index.d.ts", + "../../../node_modules/@types/bn.js/index.d.ts", + "../../../node_modules/@types/bs58/index.d.ts", + "../../../node_modules/@types/chartist/index.d.ts", + "../../../node_modules/@types/connect/index.d.ts", + "../../../node_modules/@types/eslint/helpers.d.ts", + "../../../node_modules/@types/eslint/index.d.ts", + "../../../node_modules/@types/estree/index.d.ts", + "../../../node_modules/@types/express-serve-static-core/index.d.ts", + "../../../node_modules/@types/glob/index.d.ts", + "../../../node_modules/@types/graceful-fs/index.d.ts", + "../../../node_modules/@types/history/DOMUtils.d.ts", + "../../../node_modules/@types/history/LocationUtils.d.ts", + "../../../node_modules/@types/history/PathUtils.d.ts", + "../../../node_modules/@types/history/createBrowserHistory.d.ts", + "../../../node_modules/@types/history/createHashHistory.d.ts", + "../../../node_modules/@types/history/createMemoryHistory.d.ts", + "../../../node_modules/@types/history/index.d.ts", + "../../../node_modules/@types/hoist-non-react-statics/index.d.ts", + "../../../node_modules/@types/html-minifier-terser/index.d.ts", + "../../../node_modules/@types/istanbul-lib-coverage/index.d.ts", + "../../../node_modules/@types/istanbul-lib-report/index.d.ts", + "../../../node_modules/@types/istanbul-reports/index.d.ts", + "../../../node_modules/@types/jest/index.d.ts", + "../../../node_modules/@types/json-schema/index.d.ts", + "../../../node_modules/@types/json5/index.d.ts", + "../../../node_modules/@types/lodash/common/array.d.ts", + "../../../node_modules/@types/lodash/common/collection.d.ts", + "../../../node_modules/@types/lodash/common/common.d.ts", + "../../../node_modules/@types/lodash/common/date.d.ts", + "../../../node_modules/@types/lodash/common/function.d.ts", + "../../../node_modules/@types/lodash/common/lang.d.ts", + "../../../node_modules/@types/lodash/common/math.d.ts", + "../../../node_modules/@types/lodash/common/number.d.ts", + "../../../node_modules/@types/lodash/common/object.d.ts", + "../../../node_modules/@types/lodash/common/seq.d.ts", + "../../../node_modules/@types/lodash/common/string.d.ts", + "../../../node_modules/@types/lodash/common/util.d.ts", + "../../../node_modules/@types/lodash/index.d.ts", + "../../../node_modules/@types/material-ui/index.d.ts", + "../../../node_modules/@types/minimatch/index.d.ts", + "../../../node_modules/@types/minimist/index.d.ts", + "../../../node_modules/@types/node/assert.d.ts", + "../../../node_modules/@types/node/async_hooks.d.ts", + "../../../node_modules/@types/node/base.d.ts", + "../../../node_modules/@types/node/buffer.d.ts", + "../../../node_modules/@types/node/child_process.d.ts", + "../../../node_modules/@types/node/cluster.d.ts", + "../../../node_modules/@types/node/console.d.ts", + "../../../node_modules/@types/node/constants.d.ts", + "../../../node_modules/@types/node/crypto.d.ts", + "../../../node_modules/@types/node/dgram.d.ts", + "../../../node_modules/@types/node/dns.d.ts", + "../../../node_modules/@types/node/domain.d.ts", + "../../../node_modules/@types/node/events.d.ts", + "../../../node_modules/@types/node/fs.d.ts", + "../../../node_modules/@types/node/fs/promises.d.ts", + "../../../node_modules/@types/node/globals.d.ts", + "../../../node_modules/@types/node/globals.global.d.ts", + "../../../node_modules/@types/node/http.d.ts", + "../../../node_modules/@types/node/http2.d.ts", + "../../../node_modules/@types/node/https.d.ts", + "../../../node_modules/@types/node/index.d.ts", + "../../../node_modules/@types/node/inspector.d.ts", + "../../../node_modules/@types/node/module.d.ts", + "../../../node_modules/@types/node/net.d.ts", + "../../../node_modules/@types/node/os.d.ts", + "../../../node_modules/@types/node/path.d.ts", + "../../../node_modules/@types/node/perf_hooks.d.ts", + "../../../node_modules/@types/node/process.d.ts", + "../../../node_modules/@types/node/punycode.d.ts", + "../../../node_modules/@types/node/querystring.d.ts", + "../../../node_modules/@types/node/readline.d.ts", + "../../../node_modules/@types/node/repl.d.ts", + "../../../node_modules/@types/node/stream.d.ts", + "../../../node_modules/@types/node/string_decoder.d.ts", + "../../../node_modules/@types/node/timers.d.ts", + "../../../node_modules/@types/node/tls.d.ts", + "../../../node_modules/@types/node/trace_events.d.ts", + "../../../node_modules/@types/node/ts3.4/base.d.ts", + "../../../node_modules/@types/node/ts3.6/base.d.ts", + "../../../node_modules/@types/node/tty.d.ts", + "../../../node_modules/@types/node/url.d.ts", + "../../../node_modules/@types/node/util.d.ts", + "../../../node_modules/@types/node/v8.d.ts", + "../../../node_modules/@types/node/vm.d.ts", + "../../../node_modules/@types/node/wasi.d.ts", + "../../../node_modules/@types/node/worker_threads.d.ts", + "../../../node_modules/@types/node/zlib.d.ts", + "../../../node_modules/@types/normalize-package-data/index.d.ts", + "../../../node_modules/@types/pako/index.d.ts", + "../../../node_modules/@types/parse-json/index.d.ts", + "../../../node_modules/@types/prettier/index.d.ts", + "../../../node_modules/@types/prop-types/index.d.ts", + "../../../node_modules/@types/q/index.d.ts", + "../../../node_modules/@types/qs/index.d.ts", + "../../../node_modules/@types/range-parser/index.d.ts", + "../../../node_modules/@types/react-addons-linked-state-mixin/index.d.ts", + "../../../node_modules/@types/react-dom/index.d.ts", + "../../../node_modules/@types/react-redux/index.d.ts", + "../../../node_modules/@types/react-router-dom/index.d.ts", + "../../../node_modules/@types/react-router/index.d.ts", + "../../../node_modules/@types/react-transition-group/CSSTransition.d.ts", + "../../../node_modules/@types/react-transition-group/SwitchTransition.d.ts", + "../../../node_modules/@types/react-transition-group/Transition.d.ts", + "../../../node_modules/@types/react-transition-group/TransitionGroup.d.ts", + "../../../node_modules/@types/react-transition-group/config.d.ts", + "../../../node_modules/@types/react-transition-group/index.d.ts", + "../../../node_modules/@types/react/global.d.ts", + "../../../node_modules/@types/react/index.d.ts", + "../../../node_modules/@types/resolve/index.d.ts", + "../../../node_modules/@types/source-list-map/index.d.ts", + "../../../node_modules/@types/stack-utils/index.d.ts", + "../../../node_modules/@types/styled-components/index.d.ts", + "../../../node_modules/@types/tapable/index.d.ts", + "../../../node_modules/@types/testing-library__jest-dom/index.d.ts", + "../../../node_modules/@types/uglify-js/index.d.ts", + "../../../node_modules/@types/webpack-sources/index.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/Source.d.ts", + "../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts", + "../../../node_modules/@types/webpack-sources/lib/index.d.ts", + "../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts", + "../../../node_modules/@types/webpack/index.d.ts", + "../../../node_modules/@types/yargs-parser/index.d.ts", + "../../../node_modules/@types/yargs/index.d.ts", + "../../../node_modules/base-x/src/index.d.ts", + "../../../node_modules/csstype/index.d.ts", + "../../../node_modules/jest-diff/build/cleanupSemantic.d.ts", + "../../../node_modules/jest-diff/build/diffLines.d.ts", + "../../../node_modules/jest-diff/build/index.d.ts", + "../../../node_modules/jest-diff/build/printDiffs.d.ts", + "../../../node_modules/jest-diff/build/types.d.ts", + "../../../node_modules/pretty-format/build/index.d.ts", + "../../../node_modules/pretty-format/build/types.d.ts", + "../../../node_modules/redux/index.d.ts", + "../../../node_modules/source-map/source-map.d.ts", + "../../../node_modules/symbol-observable/index.d.ts", + "../src/index.ts", + "../../../types/buffer-layout/index.d.ts" + ] + }, + "version": "4.1.3" +} \ No newline at end of file diff --git a/tests/node_modules/@project-serum/borsh/package.json b/tests/node_modules/@project-serum/borsh/package.json new file mode 100644 index 0000000..5023258 --- /dev/null +++ b/tests/node_modules/@project-serum/borsh/package.json @@ -0,0 +1,34 @@ +{ + "name": "@project-serum/borsh", + "version": "0.2.2", + "description": "Serum Borsh", + "main": "dist/lib/index.js", + "types": "dist/lib/index.d.ts", + "exports": { + ".": "./dist/lib/index.js" + }, + "license": "Apache-2.0", + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "build": "tsc", + "docs": "typedoc --out ../../docs/borsh --mode library --composite false --rootDir src src/index.ts src/*.d.ts", + "test": "", + "clean": "rm -rf dist", + "prepare": "run-s clean build" + }, + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "peerDependencies": { + "@solana/web3.js": "^1.2.0" + }, + "files": [ + "dist" + ] +} diff --git a/tests/node_modules/@solana/buffer-layout/LICENSE b/tests/node_modules/@solana/buffer-layout/LICENSE new file mode 100644 index 0000000..74f2fd4 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2018 Peter A. Bigot + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/node_modules/@solana/buffer-layout/README.md b/tests/node_modules/@solana/buffer-layout/README.md new file mode 100644 index 0000000..02e3667 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/README.md @@ -0,0 +1,397 @@ +# buffer-layout + +[![NPM version](https://img.shields.io/npm/v/buffer-layout.svg)](https://www.npmjs.com/package/buffer-layout "View this project on NPM") +[![Build Status](https://travis-ci.org/pabigot/buffer-layout.svg?branch=master)](https://travis-ci.org/pabigot/buffer-layout "Check build status on TravisCI") +[![Coverage Status](https://coveralls.io/repos/pabigot/buffer-layout/badge.svg?branch=master&service=github)](https://coveralls.io/github/pabigot/buffer-layout?branch=master "Check coverage status on Coveralls") + +buffer-layout is a utility module implemented in pure JavaScript that +supports translations between JavaScript values and Buffers. It is made +available through [github](https://github.com/pabigot/buffer-layout) and +released under the MIT license. + +Layout support is provided for these types of data: + +* Signed and unsigned integral values from 1 to 6 bytes in length, in + little-endian or big-endian format; +* Signed and unsigned 64-bit integral values decoded as integral + Numbers; +* Float and double values (also little-endian or big-endian); +* Sequences of instances of an arbitrary layout, with constant or + data-dependent length; +* Structures with named fields containing arbitrary layouts; +* Unions of variant layouts where the type of data is recorded in a + prefix value, another layout element, or provided externally; +* Bit fields within 8, 16, 24, or 32-bit unsigned integers, numbering + from the least or most significant bit; +* NUL-terminated C strings; +* Blobs of fixed or variable-length raw data. + +## Installation + +Development and testing is done using Node.js, supporting versions 4.5 +and later. Install with `npm install buffer-layout`. + +## Examples + +All examples are from the `test/examples.js` unit test and assume the +following context: + + const assert = require('assert'); + const util = require('util'); + const lo = require('buffer-layout'); + +The examples give only a taste of what can be done. Structures, unions, +and sequences can nest; [union +discriminators](http://pabigot.github.io/buffer-layout/module-Layout-UnionDiscriminator.html) +can be within the union or external to it; sequence and blob lengths may +be fixed or read from the buffer. + +For full details see the [documentation](http://pabigot.github.io/buffer-layout/). + +### Four-element array of 16-bit signed little-endian integers + +The C definition: + + int16_t arr[4] = { 1, -1, 3, -3 }; + +The buffer-layout way: + + const ds = lo.seq(lo.s16(), 4); + const b = Buffer.alloc(8); + assert.equal(ds.encode([1, -1, 3, -3], b), 4 * 2); + assert.equal(Buffer.from('0100ffff0300fdff', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), [1, -1, 3, -3]); + +See [Int](http://pabigot.github.io/buffer-layout/module-Layout-Int.html) +and [Sequence](http://pabigot.github.io/buffer-layout/module-Layout-Sequence.html). + +### A native C `struct` on a 32-bit little-endian machine + +The C definition: + + struct ds { + uint8_t v; + uint32_t u32; + } st; + +The buffer-layout way: + + const ds = lo.struct([lo.u8('v'), + lo.seq(lo.u8(), 3), // alignment padding + lo.u32('u32')]); + assert.equal(ds.offsetOf('u32'), 4); + const b = Buffer.alloc(8); + b.fill(0xbd); + assert.equal(ds.encode({v: 1, u32: 0x12345678}, b), 1 + 3 + 4); + assert.equal(Buffer.from('01bdbdbd78563412', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), {v: 1, u32: 0x12345678}); + +Note that the C language requires padding which must be explicitly added +in the buffer-layout structure definition. Since the padding is not +accessible, the corresponding layout has no +[property](http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#property). + +See [Structure](http://pabigot.github.io/buffer-layout/module-Layout-Structure.html). + +### A packed C `struct` on a 32-bit little-endian machine + +The C definition: + + struct ds { + uint8_t v; + uint32_t u32; + } __attribute__((__packed__)) st; + +The buffer-layout way: + + const ds = lo.struct([lo.u8('v'), + lo.u32('u32')]); + assert.equal(ds.offsetOf('u32'), 1); + const b = Buffer.alloc(5); + b.fill(0xbd); + assert.equal(ds.encode({v: 1, u32: 0x12345678}, b), 1 + 4); + assert.equal(Buffer.from('0178563412', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), {v: 1, u32: 0x12345678}); + +### A tagged union of 4-byte values + +Assume a 5-byte packed structure where the interpretation of the last +four bytes depends on the first byte. The C definition: + + struct { + uint8_t t; + union ds { + uint8_t u8[4]; // default interpretation + int16_t s16[2]; // when t is 'h' + uint32_t u32; // when t is 'w' + float f32; // when t is 'f' + } u; + } __attribute__((__packed__)) un; + +The buffer-layout way: + + const t = lo.u8('t'); + const un = lo.union(t, lo.seq(lo.u8(), 4, 'u8')); + const nul = un.addVariant('n'.charCodeAt(0), 'nul'); + const u32 = un.addVariant('w'.charCodeAt(0), lo.u32(), 'u32'); + const s16 = un.addVariant('h'.charCodeAt(0), lo.seq(lo.s16(), 2), 's16'); + const f32 = un.addVariant('f'.charCodeAt(0), lo.f32(), 'f32'); + const b = Buffer.alloc(un.span); + assert.deepEqual(un.decode(b), {t: 0, u8: [0, 0, 0, 0]}); + assert.deepEqual(un.decode(Buffer.from('6e01020304', 'hex')), + {nul: true}); + assert.deepEqual(un.decode(Buffer.from('7778563412', 'hex')), + {u32: 0x12345678}); + assert.deepEqual(un.decode(Buffer.from('660000bd41', 'hex')), + {f32: 23.625}); + assert.deepEqual(un.decode(Buffer.from('a5a5a5a5a5', 'hex')), + {t: 0xa5, u8: [0xa5, 0xa5, 0xa5, 0xa5]}); + assert.equal(s16.encode({s16: [123, -123]}, b), 1 + 2 * 2); + assert.equal(Buffer.from('687b0085ff', 'hex').compare(b), 0); + +See [Union](http://pabigot.github.io/buffer-layout/module-Layout-Union.html). + +### Decoding into class instances + +Using the same 5-byte packet structure but with JavaScript classes +representing the union and the variants: + + function Union() { } + lo.bindConstructorLayout(Union, + lo.union(lo.u8('t'), lo.seq(lo.u8(), 4, 'u8'))); + + function Vn() {} + util.inherits(Vn, Union); + lo.bindConstructorLayout(Vn, + Union.layout_.addVariant('n'.charCodeAt(0), 'nul')); + + function Vu32(v) { this.u32 = v; } + util.inherits(Vu32, Union); + lo.bindConstructorLayout(Vu32, + Union.layout_.addVariant('w'.charCodeAt(0), lo.u32(), 'u32')); + + function Vs16(v) { this.s16 = v; } + util.inherits(Vs16, Union); + lo.bindConstructorLayout(Vs16, + Union.layout_.addVariant('h'.charCodeAt(0), lo.seq(lo.s16(), 2), 's16')); + + function Vf32(v) { this.f32 = v; } + util.inherits(Vf32, Union); + lo.bindConstructorLayout(Vf32, + Union.layout_.addVariant('f'.charCodeAt(0), lo.f32(), 'f32')); + + let v = Union.decode(Buffer.from('7778563412', 'hex')); + assert(v instanceof Vu32); + assert(v instanceof Union); + assert.equal(v.u32, 0x12345678); + + v = Union.decode(Buffer.from('a5a5a5a5a5', 'hex')); + assert(v instanceof Union); + assert.equal(v.t, 0xa5); + assert.deepEqual(v.u8, [0xa5, 0xa5, 0xa5, 0xa5]); + + const b = Buffer.alloc(Union.layout_.span); + v = new Vf32(23.625); + v.encode(b); + assert.equal(Buffer.from('660000bd41', 'hex').compare(b), 0); + + b.fill(0xFF); + v = new Vn(); + v.encode(b); + assert.equal(Buffer.from('6effffffff', 'hex').compare(b), 0); + +Note that one variant (`'n'`) carries no data, leaving the remainder of +the buffer unchanged when stored. + +See +[Layout.makeDestinationObject()](http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#makeDestinationObject) +and +[bindConstructorLayout](http://pabigot.github.io/buffer-layout/module-Layout.html#.bindConstructorLayout). + +### Packed bit fields on a little-endian machine + +The C definition: + + struct ds { + unsigned int b00l03: 3; + unsigned int flg03: 1; + unsigned int b04l18: 24; + unsigned int b1Cl04: 4; + } st; + +The buffer-layout way: + + const ds = lo.bits(lo.u32()); + const b = Buffer.alloc(4); + ds.addField(3, 'b00l03'); + ds.addBoolean('flg03'); + ds.addField(24, 'b04l18'); + ds.addField(4, 'b1Cl04'); + b.fill(0xff); + assert.equal(ds.encode({b00l03: 3, b04l18: 24, b1Cl04: 4}, b), 4); + assert.equal(Buffer.from('8b010040', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), + {b00l03: 3, flg03: true, b04l18: 24, b1Cl04: 4}); + +See [BitStructure](http://pabigot.github.io/buffer-layout/module-Layout-BitStructure.html). + +### 64-bit values as Numbers + +The C definition: + + uint64_t v = 0x0102030405060708ULL; + +The buffer-layout way: + + const ds = lo.nu64be(); + const b = Buffer.from('0102030405060708', 'hex'); + const v = 72623859790382856; + const nv = v - 6; + assert.equal(v, nv); + assert.equal(ds.decode(b), nv); + +Note that because the exact value is not less than 2^53 it cannot be +represented as a JavaScript Number, and is instead approximated by a +nearby representable integer that is equivalent within Numbers. + +See [NearUInt64](http://pabigot.github.io/buffer-layout/module-Layout-NearUInt64.html). + +### A NUL-terminated C string + +The C definition: + + const char str[] = "hi!"; + +The buffer-layout way: + + const ds = lo.cstr(); + const b = Buffer.alloc(8); + assert.equal(ds.encode('hi!', b), 3 + 1); + const slen = ds.getSpan(b); + assert.equal(slen, 4); + assert.equal(Buffer.from('68692100', 'hex').compare(b.slice(0, slen)), 0); + assert.equal(ds.decode(b), 'hi!'); + +See [CString](http://pabigot.github.io/buffer-layout/module-Layout-CString.html). + +### A fixed-length block of data offset within a buffer + +The buffer-layout way: + + const ds = lo.blob(4); + const b = Buffer.from('0102030405060708', 'hex'); + assert.equal(Buffer.from('03040506', 'hex').compare(ds.decode(b, 2)), 0); + +See [Blob](http://pabigot.github.io/buffer-layout/module-Layout-Blob.html). + +### A variable-length array of pairs of C strings + +The buffer-layout way: + + const pr = lo.seq(lo.cstr(), 2); + const n = lo.u8('n'); + const vla = lo.seq(pr, lo.offset(n, -1), 'a'); + const st = lo.struct([n, vla], 'st'); + const b = Buffer.alloc(32); + const arr = [['k1', 'v1'], ['k2', 'v2'], ['k3', 'etc']]; + b.fill(0); + assert.equal(st.encode({a: arr}, b), + 1 + (2 * ((2 + 1) + (2 + 1)) + (2 + 1) + (3 + 1))); + const span = st.getSpan(b); + assert.equal(span, 20); + assert.equal(Buffer.from('036b31007631006b32007632006b330065746300', 'hex') + .compare(b.slice(0, span)), 0); + assert.deepEqual(st.decode(b), {n: 3, a: arr}); + +See [OffsetLayout](http://pabigot.github.io/buffer-layout/module-Layout-OffsetLayout.html). + +### A C flexible array member with implicit length + +When data is obtained over a packetized interface the length of the +packet can provide implicit limits on the last field. + +The C definition: + + struct ds { + uint8_t prop; + uint16_t data[]; + }; + +The buffer-layout way: + + const st = lo.struct([lo.u8('prop'), + lo.seq(lo.u16(), + lo.greedy(lo.u16().span), + 'data')], + 'ds'); + const b = Buffer.from('21010002030405', 'hex'); + assert.deepEqual(st.decode(b), {prop: 33, data: [0x0001, 0x0302, 0x0504]}); + b.fill(0xFF); + assert.equal(st.encode({prop: 9, data: [5, 6]}, b), 1 + 2 * 2); + assert.equal(Buffer.from('0905000600FFFF', 'hex').compare(b), 0); + +### Tagged values, or variable-length unions + +Storing arbitrary data using a leading byte to identify the content then +a value that takes up only as much room as is necessary. + +The example also shows how to extend the variant recognition API to +support abitrary constant without consuming space for them in the +encoded union. This could be used to make something similar to +[BSON](http://bsonspec.org/spec.html). + +Here's the code that defines the union, the variants, and the +recognition of `true` and `false` values for `b` as distinct variants: + + const un = lo.union(lo.u8('t')); + const u8 = un.addVariant('B'.charCodeAt(0), lo.u8(), 'u8'); + const s16 = un.addVariant('h'.charCodeAt(0), lo.s16(), 's16'); + const s48 = un.addVariant('Q'.charCodeAt(0), lo.s48(), 's48'); + const cstr = un.addVariant('s'.charCodeAt(0), lo.cstr(), 'str'); + const tr = un.addVariant('T'.charCodeAt(0), lo.const(true), 'b'); + const fa = un.addVariant('F'.charCodeAt(0), lo.const(false), 'b'); + const b = Buffer.alloc(1 + 6); + un.configGetSourceVariant(function(src) { + if (src.hasOwnProperty('b')) { + return src.b ? tr : fa; + } + return this.defaultGetSourceVariant(src); + }); + +And here are examples of encoding, checking the encoded length, and +decoding each of the alternatives: + + b.fill(0xff); + assert.equal(un.encode({u8: 1}, b), 1 + 1); + assert.equal(un.getSpan(b), 2); + assert.equal(Buffer.from('4201ffffffffff', 'hex').compare(b), 0); + assert.equal(un.decode(b).u8, 1); + + b.fill(0xff); + assert.equal(un.encode({s16: -32000}, b), 1 + 2); + assert.equal(un.getSpan(b), 3); + assert.equal(Buffer.from('680083ffffffff', 'hex').compare(b), 0); + assert.equal(un.decode(b).s16, -32000); + + b.fill(0xff); + const v48 = Math.pow(2, 47) - 1; + assert.equal(un.encode({s48: v48}, b), 1 + 6); + assert.equal(un.getSpan(b), 7); + assert.equal(Buffer.from('51ffffffffff7f', 'hex').compare(b), 0); + assert.equal(un.decode(b).s48, v48); + + b.fill(0xff); + assert.equal(un.encode({b: true}, b), 1); + assert.equal(un.getSpan(b), 1); + assert.equal(Buffer.from('54ffffffffffff', 'hex').compare(b), 0); + assert.strictEqual(un.decode(b).b, true); + + b.fill(0xff); + assert.equal(un.encode({b: false}, b), 1); + assert.equal(un.getSpan(b), 1); + assert.equal(Buffer.from('46ffffffffffff', 'hex').compare(b), 0); + assert.strictEqual(un.decode(b).b, false); + +**NOTE** This code tickles a long-standing [bug in +Buffer.writeInt{L,B}E](https://github.com/nodejs/node/pull/3994); if you +are using Node prior to 4.2.4 or 5.2.0 you should update. diff --git a/tests/node_modules/@solana/buffer-layout/lib/Layout.d.ts b/tests/node_modules/@solana/buffer-layout/lib/Layout.d.ts new file mode 100644 index 0000000..5c03fe5 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/lib/Layout.d.ts @@ -0,0 +1,1187 @@ +import { Buffer } from 'buffer'; +export declare type LayoutObject = { + [key: string]: any; +}; +export declare function checkUint8Array(b: Uint8Array): void; +export declare function uint8ArrayToBuffer(b: Uint8Array): Buffer; +/** + * Base class for layout objects. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support the {@link + * Layout#encode|encode} or {@link Layout#decode|decode} functions. + * + * @param {Number} span - Initializer for {@link Layout#span|span}. The + * parameter must be an integer; a negative value signifies that the + * span is {@link Layout#getSpan|value-specific}. + * + * @param {string} [property] - Initializer for {@link + * Layout#property|property}. + * + * @abstract + */ +export declare class Layout { + span: number; + property?: string; + boundConstructor_?: any; + constructor(span: number, property?: string); + /** Function to create an Object into which decoded properties will + * be written. + * + * Used only for layouts that {@link Layout#decode|decode} to Object + * instances, which means: + * * {@link Structure} + * * {@link Union} + * * {@link VariantLayout} + * * {@link BitStructure} + * + * If left undefined the JavaScript representation of these layouts + * will be Object instances. + * + * See {@link bindConstructorLayout}. + */ + makeDestinationObject(): LayoutObject; + /** + * Decode from a Uint8Array into a JavaScript value. + * + * @param {Uint8Array} b - the buffer from which encoded data is read. + * + * @param {Number} [offset] - the offset at which the encoded data + * starts. If absent a zero offset is inferred. + * + * @returns {(Number|Array|Object)} - the value of the decoded data. + * + * @abstract + */ + decode(b: Uint8Array, offset?: number): any; + /** + * Encode a JavaScript value into a Uint8Array. + * + * @param {(Number|Array|Object)} src - the value to be encoded into + * the buffer. The type accepted depends on the (sub-)type of {@link + * Layout}. + * + * @param {Uint8Array} b - the buffer into which encoded data will be + * written. + * + * @param {Number} [offset] - the offset at which the encoded data + * starts. If absent a zero offset is inferred. + * + * @returns {Number} - the number of bytes encoded, including the + * space skipped for internal padding, but excluding data such as + * {@link Sequence#count|lengths} when stored {@link + * ExternalLayout|externally}. This is the adjustment to `offset` + * producing the offset where data for the next layout would be + * written. + * + * @abstract + */ + encode(src: any, b: Uint8Array, offset?: number): number; + /** + * Calculate the span of a specific instance of a layout. + * + * @param {Uint8Array} b - the buffer that contains an encoded instance. + * + * @param {Number} [offset] - the offset at which the encoded instance + * starts. If absent a zero offset is inferred. + * + * @return {Number} - the number of bytes covered by the layout + * instance. If this method is not overridden in a subclass the + * definition-time constant {@link Layout#span|span} will be + * returned. + * + * @throws {RangeError} - if the length of the value cannot be + * determined. + */ + getSpan(b?: Uint8Array, offset?: number): number; + /** + * Replicate the layout using a new property. + * + * This function must be used to get a structurally-equivalent layout + * with a different name since all {@link Layout} instances are + * immutable. + * + * **NOTE** This is a shallow copy. All fields except {@link + * Layout#property|property} are strictly equal to the origin layout. + * + * @param {String} property - the value for {@link + * Layout#property|property} in the replica. + * + * @returns {Layout} - the copy with {@link Layout#property|property} + * set to `property`. + */ + replicate(property: string): Layout; + /** + * Create an object from layout properties and an array of values. + * + * **NOTE** This function returns `undefined` if invoked on a layout + * that does not return its value as an Object. Objects are + * returned for things that are a {@link Structure}, which includes + * {@link VariantLayout|variant layouts} if they are structures, and + * excludes {@link Union}s. If you want this feature for a union + * you must use {@link Union.getVariant|getVariant} to select the + * desired layout. + * + * @param {Array} values - an array of values that correspond to the + * default order for properties. As with {@link Layout#decode|decode} + * layout elements that have no property name are skipped when + * iterating over the array values. Only the top-level properties are + * assigned; arguments are not assigned to properties of contained + * layouts. Any unused values are ignored. + * + * @return {(Object|undefined)} + */ + fromArray(values: Array): LayoutObject | undefined; +} +export declare function nameWithProperty(name: string, lo: any): string; +/** + * Augment a class so that instances can be encoded/decoded using a + * given layout. + * + * Calling this function couples `Class` with `layout` in several ways: + * + * * `Class.layout_` becomes a static member property equal to `layout`; + * * `layout.boundConstructor_` becomes a static member property equal + * to `Class`; + * * The {@link Layout#makeDestinationObject|makeDestinationObject()} + * property of `layout` is set to a function that returns a `new + * Class()`; + * * `Class.decode(b, offset)` becomes a static member function that + * delegates to {@link Layout#decode|layout.decode}. The + * synthesized function may be captured and extended. + * * `Class.prototype.encode(b, offset)` provides an instance member + * function that delegates to {@link Layout#encode|layout.encode} + * with `src` set to `this`. The synthesized function may be + * captured and extended, but when the extension is invoked `this` + * must be explicitly bound to the instance. + * + * @param {class} Class - a JavaScript class with a nullary + * constructor. + * + * @param {Layout} layout - the {@link Layout} instance used to encode + * instances of `Class`. + */ +export declare function bindConstructorLayout(Class: any, layout: Layout): void; +/** + * An object that behaves like a layout but does not consume space + * within its containing layout. + * + * This is primarily used to obtain metadata about a member, such as a + * {@link OffsetLayout} that can provide data about a {@link + * Layout#getSpan|value-specific span}. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support {@link + * ExternalLayout#isCount|isCount} or other {@link Layout} functions. + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @abstract + * @augments {Layout} + */ +export declare class ExternalLayout extends Layout { + /** + * Return `true` iff the external layout decodes to an unsigned + * integer layout. + * + * In that case it can be used as the source of {@link + * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths}, + * or as {@link UnionLayoutDiscriminator#layout|external union + * discriminators}. + * + * @abstract + */ + isCount(): boolean; +} +/** + * An {@link ExternalLayout} that determines its {@link + * Layout#decode|value} based on offset into and length of the buffer + * on which it is invoked. + * + * *Factory*: {@link module:Layout.greedy|greedy} + * + * @param {Number} [elementSpan] - initializer for {@link + * GreedyCount#elementSpan|elementSpan}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {ExternalLayout} + */ +export declare class GreedyCount extends ExternalLayout { + elementSpan: number; + constructor(elementSpan: number, property?: string); + /** @override */ + isCount(): boolean; + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: any, b: Uint8Array, offset?: number): number; +} +/** + * An {@link ExternalLayout} that supports accessing a {@link Layout} + * at a fixed offset from the start of another Layout. The offset may + * be before, within, or after the base layout. + * + * *Factory*: {@link module:Layout.offset|offset} + * + * @param {Layout} layout - initializer for {@link + * OffsetLayout#layout|layout}, modulo `property`. + * + * @param {Number} [offset] - Initializes {@link + * OffsetLayout#offset|offset}. Defaults to zero. + * + * @param {string} [property] - Optional new property name for a + * {@link Layout#replicate| replica} of `layout` to be used as {@link + * OffsetLayout#layout|layout}. If not provided the `layout` is used + * unchanged. + * + * @augments {Layout} + */ +export declare class OffsetLayout extends ExternalLayout { + layout: Layout; + offset: number; + constructor(layout: Layout, offset?: number, property?: string); + /** @override */ + isCount(): boolean; + /** @override */ + decode(b: Uint8Array, offset?: number): any; + /** @override */ + encode(src: any, b: Uint8Array, offset?: number): number; +} +/** + * Represent an unsigned integer in little-endian format. + * + * *Factory*: {@link module:Layout.u8|u8}, {@link + * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link + * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link + * module:Layout.u48|u48} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class UInt extends Layout { + constructor(span: number, property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent an unsigned integer in big-endian format. + * + * *Factory*: {@link module:Layout.u8be|u8be}, {@link + * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be}, + * {@link module:Layout.u32be|u32be}, {@link + * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class UIntBE extends Layout { + constructor(span: number, property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a signed integer in little-endian format. + * + * *Factory*: {@link module:Layout.s8|s8}, {@link + * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link + * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link + * module:Layout.s48|s48} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Int extends Layout { + constructor(span: number, property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a signed integer in big-endian format. + * + * *Factory*: {@link module:Layout.s8be|s8be}, {@link + * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be}, + * {@link module:Layout.s32be|s32be}, {@link + * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class IntBE extends Layout { + constructor(span: number, property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent an unsigned 64-bit integer in little-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.nu64|nu64} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +export declare class NearUInt64 extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent an unsigned 64-bit integer in big-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.nu64be|nu64be} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +export declare class NearUInt64BE extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a signed 64-bit integer in little-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.ns64|ns64} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +export declare class NearInt64 extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a signed 64-bit integer in big-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.ns64be|ns64be} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +export declare class NearInt64BE extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a 32-bit floating point number in little-endian format. + * + * *Factory*: {@link module:Layout.f32|f32} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Float extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a 32-bit floating point number in big-endian format. + * + * *Factory*: {@link module:Layout.f32be|f32be} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class FloatBE extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a 64-bit floating point number in little-endian format. + * + * *Factory*: {@link module:Layout.f64|f64} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Double extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a 64-bit floating point number in big-endian format. + * + * *Factory*: {@link module:Layout.f64be|f64be} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class DoubleBE extends Layout { + constructor(property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): number; + /** @override */ + encode(src: number, b: Uint8Array, offset?: number): number; +} +/** + * Represent a contiguous sequence of a specific layout as an Array. + * + * *Factory*: {@link module:Layout.seq|seq} + * + * @param {Layout} elementLayout - initializer for {@link + * Sequence#elementLayout|elementLayout}. + * + * @param {(Number|ExternalLayout)} count - initializer for {@link + * Sequence#count|count}. The parameter must be either a positive + * integer or an instance of {@link ExternalLayout}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Sequence extends Layout { + elementLayout: Layout; + count: number | ExternalLayout; + constructor(elementLayout: Layout, count: number | ExternalLayout, property?: string); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** @override */ + decode(b: Uint8Array, offset?: number): Array; + /** Implement {@link Layout#encode|encode} for {@link Sequence}. + * + * **NOTE** If `src` is shorter than {@link Sequence#count|count} then + * the unused space in the buffer is left unchanged. If `src` is + * longer than {@link Sequence#count|count} the unneeded elements are + * ignored. + * + * **NOTE** If {@link Layout#count|count} is an instance of {@link + * ExternalLayout} then the length of `src` will be encoded as the + * count after `src` is encoded. */ + encode(src: Array, b: Uint8Array, offset?: number): number; +} +/** + * Represent a contiguous sequence of arbitrary layout elements as an + * Object. + * + * *Factory*: {@link module:Layout.struct|struct} + * + * **NOTE** The {@link Layout#span|span} of the structure is variable + * if any layout in {@link Structure#fields|fields} has a variable + * span. When {@link Layout#encode|encoding} we must have a value for + * all variable-length fields, or we wouldn't be able to figure out + * how much space to use for storage. We can only identify the value + * for a field when it has a {@link Layout#property|property}. As + * such, although a structure may contain both unnamed fields and + * variable-length fields, it cannot contain an unnamed + * variable-length field. + * + * @param {Layout[]} fields - initializer for {@link + * Structure#fields|fields}. An error is raised if this contains a + * variable-length field for which a {@link Layout#property|property} + * is not defined. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @param {Boolean} [decodePrefixes] - initializer for {@link + * Structure#decodePrefixes|property}. + * + * @throws {Error} - if `fields` contains an unnamed variable-length + * layout. + * + * @augments {Layout} + */ +export declare class Structure extends Layout { + fields: Layout[]; + decodePrefixes: boolean; + constructor(fields: Layout[], property?: string, decodePrefixes?: boolean); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** @override */ + decode(b: Uint8Array, offset?: number): LayoutObject; + /** Implement {@link Layout#encode|encode} for {@link Structure}. + * + * If `src` is missing a property for a member with a defined {@link + * Layout#property|property} the corresponding region of the buffer is + * left unmodified. */ + encode(src: LayoutObject, b: Uint8Array, offset?: number): number; + /** @override */ + fromArray(values: Array): LayoutObject; + /** + * Get access to the layout of a given property. + * + * @param {String} property - the structure member of interest. + * + * @return {Layout} - the layout associated with `property`, or + * undefined if there is no such property. + */ + layoutFor(property: string): Layout | undefined; + /** + * Get the offset of a structure member. + * + * @param {String} property - the structure member of interest. + * + * @return {Number} - the offset in bytes to the start of `property` + * within the structure, or undefined if `property` is not a field + * within the structure. If the property is a member but follows a + * variable-length structure member a negative number will be + * returned. + */ + offsetOf(property: string): number | undefined; +} +/** + * An object that can provide a {@link + * Union#discriminator|discriminator} API for {@link Union}. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support the {@link + * UnionDiscriminator#encode|encode} or {@link + * UnionDiscriminator#decode|decode} functions. + * + * @param {string} [property] - Default for {@link + * UnionDiscriminator#property|property}. + * + * @abstract + */ +export declare class UnionDiscriminator { + property: string; + constructor(property: string); + /** Analog to {@link Layout#decode|Layout decode} for union discriminators. + * + * The implementation of this method need not reference the buffer if + * variant information is available through other means. */ + decode(b?: Uint8Array, offset?: number): any; + /** Analog to {@link Layout#decode|Layout encode} for union discriminators. + * + * The implementation of this method need not store the value if + * variant information is maintained through other means. */ + encode(src: any, b: Uint8Array, offset?: number): void; +} +/** + * An object that can provide a {@link + * UnionDiscriminator|discriminator API} for {@link Union} using an + * unsigned integral {@link Layout} instance located either inside or + * outside the union. + * + * @param {ExternalLayout} layout - initializes {@link + * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link + * ExternalLayout#isCount|isCount()}. + * + * @param {string} [property] - Default for {@link + * UnionDiscriminator#property|property}, superseding the property + * from `layout`, but defaulting to `variant` if neither `property` + * nor layout provide a property name. + * + * @augments {UnionDiscriminator} + */ +export declare class UnionLayoutDiscriminator extends UnionDiscriminator { + layout: ExternalLayout; + constructor(layout: ExternalLayout, property?: string); + /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */ + decode(b: Uint8Array, offset?: number): number; + /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */ + encode(src: any, b: Uint8Array, offset?: number): any; +} +/** + * Represent any number of span-compatible layouts. + * + * *Factory*: {@link module:Layout.union|union} + * + * If the union has a {@link Union#defaultLayout|default layout} that + * layout must have a non-negative {@link Layout#span|span}. The span + * of a fixed-span union includes its {@link + * Union#discriminator|discriminator} if the variant is a {@link + * Union#usesPrefixDiscriminator|prefix of the union}, plus the span + * of its {@link Union#defaultLayout|default layout}. + * + * If the union does not have a default layout then the encoded span + * of the union depends on the encoded span of its variant (which may + * be fixed or variable). + * + * {@link VariantLayout#layout|Variant layout}s are added through + * {@link Union#addVariant|addVariant}. If the union has a default + * layout, the span of the {@link VariantLayout#layout|layout + * contained by the variant} must not exceed the span of the {@link + * Union#defaultLayout|default layout} (minus the span of a {@link + * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The + * span of the variant will equal the span of the union itself. + * + * The variant for a buffer can only be identified from the {@link + * Union#discriminator|discriminator} {@link + * UnionDiscriminator#property|property} (in the case of the {@link + * Union#defaultLayout|default layout}), or by using {@link + * Union#getVariant|getVariant} and examining the resulting {@link + * VariantLayout} instance. + * + * A variant compatible with a JavaScript object can be identified + * using {@link Union#getSourceVariant|getSourceVariant}. + * + * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to + * identify the layout used to interpret the union contents. The + * parameter must be an instance of {@link UnionDiscriminator}, an + * {@link ExternalLayout} that satisfies {@link + * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link + * UIntBE}). When a non-external layout element is passed the layout + * appears at the start of the union. In all cases the (synthesized) + * {@link UnionDiscriminator} instance is recorded as {@link + * Union#discriminator|discriminator}. + * + * @param {(Layout|null)} defaultLayout - initializer for {@link + * Union#defaultLayout|defaultLayout}. If absent defaults to `null`. + * If `null` there is no default layout: the union has data-dependent + * length and attempts to decode or encode unrecognized variants will + * throw an exception. A {@link Layout} instance must have a + * non-negative {@link Layout#span|span}, and if it lacks a {@link + * Layout#property|property} the {@link + * Union#defaultLayout|defaultLayout} will be a {@link + * Layout#replicate|replica} with property `content`. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Union extends Layout { + discriminator: UnionDiscriminator; + usesPrefixDiscriminator: boolean; + defaultLayout: Layout | null; + registry: { + [key: number]: VariantLayout; + }; + getSourceVariant: (src: LayoutObject) => VariantLayout | undefined; + configGetSourceVariant: (getSourceVariant: (src: LayoutObject) => VariantLayout | undefined) => void; + constructor(discr: Layout | UnionDiscriminator, defaultLayout: Layout | null, property: string); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** + * Method to infer a registered Union variant compatible with `src`. + * + * The first satisfied rule in the following sequence defines the + * return value: + * * If `src` has properties matching the Union discriminator and + * the default layout, `undefined` is returned regardless of the + * value of the discriminator property (this ensures the default + * layout will be used); + * * If `src` has a property matching the Union discriminator, the + * value of the discriminator identifies a registered variant, and + * either (a) the variant has no layout, or (b) `src` has the + * variant's property, then the variant is returned (because the + * source satisfies the constraints of the variant it identifies); + * * If `src` does not have a property matching the Union + * discriminator, but does have a property matching a registered + * variant, then the variant is returned (because the source + * matches a variant without an explicit conflict); + * * An error is thrown (because we either can't identify a variant, + * or we were explicitly told the variant but can't satisfy it). + * + * @param {Object} src - an object presumed to be compatible with + * the content of the Union. + * + * @return {(undefined|VariantLayout)} - as described above. + * + * @throws {Error} - if `src` cannot be associated with a default or + * registered variant. + */ + defaultGetSourceVariant(src: LayoutObject): VariantLayout | undefined; + /** Implement {@link Layout#decode|decode} for {@link Union}. + * + * If the variant is {@link Union#addVariant|registered} the return + * value is an instance of that variant, with no explicit + * discriminator. Otherwise the {@link Union#defaultLayout|default + * layout} is used to decode the content. */ + decode(b: Uint8Array, offset?: number): LayoutObject; + /** Implement {@link Layout#encode|encode} for {@link Union}. + * + * This API assumes the `src` object is consistent with the union's + * {@link Union#defaultLayout|default layout}. To encode variants + * use the appropriate variant-specific {@link VariantLayout#encode} + * method. */ + encode(src: LayoutObject, b: Uint8Array, offset?: number): number; + /** Register a new variant structure within a union. The newly + * created variant is returned. + * + * @param {Number} variant - initializer for {@link + * VariantLayout#variant|variant}. + * + * @param {Layout} layout - initializer for {@link + * VariantLayout#layout|layout}. + * + * @param {String} property - initializer for {@link + * Layout#property|property}. + * + * @return {VariantLayout} */ + addVariant(variant: number, layout: Layout, property: string): VariantLayout; + /** + * Get the layout associated with a registered variant. + * + * If `vb` does not produce a registered variant the function returns + * `undefined`. + * + * @param {(Number|Uint8Array)} vb - either the variant number, or a + * buffer from which the discriminator is to be read. + * + * @param {Number} offset - offset into `vb` for the start of the + * union. Used only when `vb` is an instance of {Uint8Array}. + * + * @return {({VariantLayout}|undefined)} + */ + getVariant(vb: Uint8Array | number, offset?: number): VariantLayout | undefined; +} +/** + * Represent a specific variant within a containing union. + * + * **NOTE** The {@link Layout#span|span} of the variant may include + * the span of the {@link Union#discriminator|discriminator} used to + * identify it, but values read and written using the variant strictly + * conform to the content of {@link VariantLayout#layout|layout}. + * + * **NOTE** User code should not invoke this constructor directly. Use + * the union {@link Union#addVariant|addVariant} helper method. + * + * @param {Union} union - initializer for {@link + * VariantLayout#union|union}. + * + * @param {Number} variant - initializer for {@link + * VariantLayout#variant|variant}. + * + * @param {Layout} [layout] - initializer for {@link + * VariantLayout#layout|layout}. If absent the variant carries no + * data. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. Unlike many other layouts, variant + * layouts normally include a property name so they can be identified + * within their containing {@link Union}. The property identifier may + * be absent only if `layout` is is absent. + * + * @augments {Layout} + */ +export declare class VariantLayout extends Layout { + union: Union; + variant: number; + layout: Layout | null; + constructor(union: Union, variant: number, layout: Layout | null, property: string); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** @override */ + decode(b: Uint8Array, offset?: number): LayoutObject; + /** @override */ + encode(src: LayoutObject, b: Uint8Array, offset?: number): number; + /** Delegate {@link Layout#fromArray|fromArray} to {@link + * VariantLayout#layout|layout}. */ + fromArray(values: Array): LayoutObject | undefined; +} +/** + * Contain a sequence of bit fields as an unsigned integer. + * + * *Factory*: {@link module:Layout.bits|bits} + * + * This is a container element; within it there are {@link BitField} + * instances that provide the extracted properties. The container + * simply defines the aggregate representation and its bit ordering. + * The representation is an object containing properties with numeric + * or {@link Boolean} values. + * + * {@link BitField}s are added with the {@link + * BitStructure#addField|addField} and {@link + * BitStructure#addBoolean|addBoolean} methods. + + * @param {Layout} word - initializer for {@link + * BitStructure#word|word}. The parameter must be an instance of + * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide. + * + * @param {bool} [msb] - `true` if the bit numbering starts at the + * most significant bit of the containing word; `false` (default) if + * it starts at the least significant bit of the containing word. If + * the parameter at this position is a string and `property` is + * `undefined` the value of this argument will instead be used as the + * value of `property`. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class BitStructure extends Layout { + fields: BitField[]; + word: Layout; + msb: boolean; + _packedSetValue: (v: number) => BitStructure; + _packedGetValue: () => number; + constructor(word: Layout, msb: boolean | string, property?: string); + /** @override */ + decode(b: Uint8Array, offset?: number): LayoutObject; + /** Implement {@link Layout#encode|encode} for {@link BitStructure}. + * + * If `src` is missing a property for a member with a defined {@link + * Layout#property|property} the corresponding region of the packed + * value is left unmodified. Unused bits are also left unmodified. */ + encode(src: LayoutObject, b: Uint8Array, offset?: number): number; + /** Register a new bitfield with a containing bit structure. The + * resulting bitfield is returned. + * + * @param {Number} bits - initializer for {@link BitField#bits|bits}. + * + * @param {string} property - initializer for {@link + * Layout#property|property}. + * + * @return {BitField} */ + addField(bits: number, property: string): BitField; + /** As with {@link BitStructure#addField|addField} for single-bit + * fields with `boolean` value representation. + * + * @param {string} property - initializer for {@link + * Layout#property|property}. + * + * @return {Boolean} */ + addBoolean(property: string): Boolean; + /** + * Get access to the bit field for a given property. + * + * @param {String} property - the bit field of interest. + * + * @return {BitField} - the field associated with `property`, or + * undefined if there is no such property. + */ + fieldFor(property: string): BitField | undefined; +} +/** + * Represent a sequence of bits within a {@link BitStructure}. + * + * All bit field values are represented as unsigned integers. + * + * **NOTE** User code should not invoke this constructor directly. + * Use the container {@link BitStructure#addField|addField} helper + * method. + * + * **NOTE** BitField instances are not instances of {@link Layout} + * since {@link Layout#span|span} measures 8-bit units. + * + * @param {BitStructure} container - initializer for {@link + * BitField#container|container}. + * + * @param {Number} bits - initializer for {@link BitField#bits|bits}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + */ +export declare class BitField { + container: BitStructure; + bits: number; + valueMask: number; + start: number; + wordMask: number; + property: string; + constructor(container: BitStructure, bits: number, property: string); + /** Store a value into the corresponding subsequence of the containing + * bit field. */ + decode(b?: Uint8Array, offset?: number): any; + /** Store a value into the corresponding subsequence of the containing + * bit field. + * + * **NOTE** This is not a specialization of {@link + * Layout#encode|Layout.encode} and there is no return value. */ + encode(value: number): void; +} +/** + * Represent a single bit within a {@link BitStructure} as a + * JavaScript boolean. + * + * **NOTE** User code should not invoke this constructor directly. + * Use the container {@link BitStructure#addBoolean|addBoolean} helper + * method. + * + * @param {BitStructure} container - initializer for {@link + * BitField#container|container}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {BitField} + */ +export declare class Boolean extends BitField { + constructor(container: BitStructure, property: string); + /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}. + * + * @returns {boolean} */ + decode(b: Uint8Array, offset?: number): boolean; + /** @override */ + encode(value: number | boolean): any; +} +/** + * Contain a fixed-length block of arbitrary data, represented as a + * Uint8Array. + * + * *Factory*: {@link module:Layout.blob|blob} + * + * @param {(Number|ExternalLayout)} length - initializes {@link + * Blob#length|length}. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Blob extends Layout { + length: number | ExternalLayout; + constructor(length: number | ExternalLayout, property?: string); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** @override */ + decode(b: Uint8Array, offset?: number): Buffer; + /** Implement {@link Layout#encode|encode} for {@link Blob}. + * + * **NOTE** If {@link Layout#count|count} is an instance of {@link + * ExternalLayout} then the length of `src` will be encoded as the + * count after `src` is encoded. */ + encode(src: Uint8Array, b: Uint8Array, offset: number): number; +} +/** + * Contain a `NUL`-terminated UTF8 string. + * + * *Factory*: {@link module:Layout.cstr|cstr} + * + * **NOTE** Any UTF8 string that incorporates a zero-valued byte will + * not be correctly decoded by this layout. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class CString extends Layout { + constructor(property?: string); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** @override */ + decode(b: Uint8Array, offset?: number): string; + /** @override */ + encode(src: string, b: Uint8Array, offset?: number): number; +} +/** + * Contain a UTF8 string with implicit length. + * + * *Factory*: {@link module:Layout.utf8|utf8} + * + * **NOTE** Because the length is implicit in the size of the buffer + * this layout should be used only in isolation, or in a situation + * where the length can be expressed by operating on a slice of the + * containing buffer. + * + * @param {Number} [maxSpan] - the maximum length allowed for encoded + * string content. If not provided there is no bound on the allowed + * content. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class UTF8 extends Layout { + maxSpan: number; + constructor(maxSpan?: number | string, property?: string); + /** @override */ + getSpan(b: Uint8Array, offset?: number): number; + /** @override */ + decode(b: Uint8Array, offset?: number): string; + /** @override */ + encode(src: string | LayoutObject, b: Uint8Array, offset?: number): number; +} +/** + * Contain a constant value. + * + * This layout may be used in cases where a JavaScript value can be + * inferred without an expression in the binary encoding. An example + * would be a {@link VariantLayout|variant layout} where the content + * is implied by the union {@link Union#discriminator|discriminator}. + * + * @param {Object|Number|String} value - initializer for {@link + * Constant#value|value}. If the value is an object (or array) and + * the application intends the object to remain unchanged regardless + * of what is done to values decoded by this layout, the value should + * be frozen prior passing it to this constructor. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +export declare class Constant extends Layout { + value: any; + constructor(value: any, property?: string); + /** @override */ + decode(b?: Uint8Array, offset?: number): any; + /** @override */ + encode(src: any, b?: Uint8Array, offset?: number): number; +} +/** Factory for {@link GreedyCount}. */ +export declare const greedy: (elementSpan: number, property?: string | undefined) => GreedyCount; +/** Factory for {@link OffsetLayout}. */ +export declare const offset: (layout: Layout, offset?: number | undefined, property?: string | undefined) => OffsetLayout; +/** Factory for {@link UInt|unsigned int layouts} spanning one + * byte. */ +export declare const u8: (property?: string | undefined) => UInt; +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning two bytes. */ +export declare const u16: (property?: string | undefined) => UInt; +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning three bytes. */ +export declare const u24: (property?: string | undefined) => UInt; +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning four bytes. */ +export declare const u32: (property?: string | undefined) => UInt; +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning five bytes. */ +export declare const u40: (property?: string | undefined) => UInt; +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning six bytes. */ +export declare const u48: (property?: string | undefined) => UInt; +/** Factory for {@link NearUInt64|little-endian unsigned int + * layouts} interpreted as Numbers. */ +export declare const nu64: (property?: string | undefined) => NearUInt64; +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning two bytes. */ +export declare const u16be: (property?: string | undefined) => UIntBE; +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning three bytes. */ +export declare const u24be: (property?: string | undefined) => UIntBE; +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning four bytes. */ +export declare const u32be: (property?: string | undefined) => UIntBE; +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning five bytes. */ +export declare const u40be: (property?: string | undefined) => UIntBE; +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning six bytes. */ +export declare const u48be: (property?: string | undefined) => UIntBE; +/** Factory for {@link NearUInt64BE|big-endian unsigned int + * layouts} interpreted as Numbers. */ +export declare const nu64be: (property?: string | undefined) => NearUInt64BE; +/** Factory for {@link Int|signed int layouts} spanning one + * byte. */ +export declare const s8: (property?: string | undefined) => Int; +/** Factory for {@link Int|little-endian signed int layouts} + * spanning two bytes. */ +export declare const s16: (property?: string | undefined) => Int; +/** Factory for {@link Int|little-endian signed int layouts} + * spanning three bytes. */ +export declare const s24: (property?: string | undefined) => Int; +/** Factory for {@link Int|little-endian signed int layouts} + * spanning four bytes. */ +export declare const s32: (property?: string | undefined) => Int; +/** Factory for {@link Int|little-endian signed int layouts} + * spanning five bytes. */ +export declare const s40: (property?: string | undefined) => Int; +/** Factory for {@link Int|little-endian signed int layouts} + * spanning six bytes. */ +export declare const s48: (property?: string | undefined) => Int; +/** Factory for {@link NearInt64|little-endian signed int layouts} + * interpreted as Numbers. */ +export declare const ns64: (property?: string | undefined) => NearInt64; +/** Factory for {@link Int|big-endian signed int layouts} + * spanning two bytes. */ +export declare const s16be: (property?: string | undefined) => IntBE; +/** Factory for {@link Int|big-endian signed int layouts} + * spanning three bytes. */ +export declare const s24be: (property?: string | undefined) => IntBE; +/** Factory for {@link Int|big-endian signed int layouts} + * spanning four bytes. */ +export declare const s32be: (property?: string | undefined) => IntBE; +/** Factory for {@link Int|big-endian signed int layouts} + * spanning five bytes. */ +export declare const s40be: (property?: string | undefined) => IntBE; +/** Factory for {@link Int|big-endian signed int layouts} + * spanning six bytes. */ +export declare const s48be: (property?: string | undefined) => IntBE; +/** Factory for {@link NearInt64BE|big-endian signed int layouts} + * interpreted as Numbers. */ +export declare const ns64be: (property?: string | undefined) => NearInt64BE; +/** Factory for {@link Float|little-endian 32-bit floating point} values. */ +export declare const f32: (property?: string | undefined) => Float; +/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */ +export declare const f32be: (property?: string | undefined) => FloatBE; +/** Factory for {@link Double|little-endian 64-bit floating point} values. */ +export declare const f64: (property?: string | undefined) => Double; +/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */ +export declare const f64be: (property?: string | undefined) => DoubleBE; +/** Factory for {@link Structure} values. */ +export declare const struct: (fields: Layout[], property?: string | undefined, decodePrefixes?: boolean | undefined) => Structure; +/** Factory for {@link BitStructure} values. */ +export declare const bits: (word: Layout, msb: boolean | string, property?: string | undefined) => BitStructure; +/** Factory for {@link Sequence} values. */ +export declare const seq: (elementLayout: Layout, count: number | ExternalLayout, property?: string | undefined) => Sequence; +/** Factory for {@link Union} values. */ +export declare const union: (discr: Layout | UnionDiscriminator, defaultLayout: Layout | null, property: string) => Union; +/** Factory for {@link UnionLayoutDiscriminator} values. */ +export declare const unionLayoutDiscriminator: (layout: ExternalLayout, property: string) => UnionLayoutDiscriminator; +/** Factory for {@link Blob} values. */ +export declare const blob: (length: number | ExternalLayout, property?: string | undefined) => Blob; +/** Factory for {@link CString} values. */ +export declare const cstr: (property?: string | undefined) => CString; +/** Factory for {@link UTF8} values. */ +export declare const utf8: (maxSpan: number, property?: string | undefined) => UTF8; +/** Factory for {@link Constant} values. */ +export declare const constant: (value: any, property?: string | undefined) => Constant; diff --git a/tests/node_modules/@solana/buffer-layout/lib/Layout.js b/tests/node_modules/@solana/buffer-layout/lib/Layout.js new file mode 100644 index 0000000..5a0ad8c --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/lib/Layout.js @@ -0,0 +1,2691 @@ +/* The MIT License (MIT) + * + * Copyright 2015-2018 Peter A. Bigot + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +/** + * Support for translating between Uint8Array instances and JavaScript + * native types. + * + * {@link module:Layout~Layout|Layout} is the basis of a class + * hierarchy that associates property names with sequences of encoded + * bytes. + * + * Layouts are supported for these scalar (numeric) types: + * * {@link module:Layout~UInt|Unsigned integers in little-endian + * format} with {@link module:Layout.u8|8-bit}, {@link + * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, + * {@link module:Layout.u32|32-bit}, {@link + * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} + * representation ranges; + * * {@link module:Layout~UIntBE|Unsigned integers in big-endian + * format} with {@link module:Layout.u16be|16-bit}, {@link + * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, + * {@link module:Layout.u40be|40-bit}, and {@link + * module:Layout.u48be|48-bit} representation ranges; + * * {@link module:Layout~Int|Signed integers in little-endian + * format} with {@link module:Layout.s8|8-bit}, {@link + * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, + * {@link module:Layout.s32|32-bit}, {@link + * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} + * representation ranges; + * * {@link module:Layout~IntBE|Signed integers in big-endian format} + * with {@link module:Layout.s16be|16-bit}, {@link + * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, + * {@link module:Layout.s40be|40-bit}, and {@link + * module:Layout.s48be|48-bit} representation ranges; + * * 64-bit integral values that decode to an exact (if magnitude is + * less than 2^53) or nearby integral Number in {@link + * module:Layout.nu64|unsigned little-endian}, {@link + * module:Layout.nu64be|unsigned big-endian}, {@link + * module:Layout.ns64|signed little-endian}, and {@link + * module:Layout.ns64be|unsigned big-endian} encodings; + * * 32-bit floating point values with {@link + * module:Layout.f32|little-endian} and {@link + * module:Layout.f32be|big-endian} representations; + * * 64-bit floating point values with {@link + * module:Layout.f64|little-endian} and {@link + * module:Layout.f64be|big-endian} representations; + * * {@link module:Layout.const|Constants} that take no space in the + * encoded expression. + * + * and for these aggregate types: + * * {@link module:Layout.seq|Sequence}s of instances of a {@link + * module:Layout~Layout|Layout}, with JavaScript representation as + * an Array and constant or data-dependent {@link + * module:Layout~Sequence#count|length}; + * * {@link module:Layout.struct|Structure}s that aggregate a + * heterogeneous sequence of {@link module:Layout~Layout|Layout} + * instances, with JavaScript representation as an Object; + * * {@link module:Layout.union|Union}s that support multiple {@link + * module:Layout~VariantLayout|variant layouts} over a fixed + * (padded) or variable (not padded) span of bytes, using an + * unsigned integer at the start of the data or a separate {@link + * module:Layout.unionLayoutDiscriminator|layout element} to + * determine which layout to use when interpreting the buffer + * contents; + * * {@link module:Layout.bits|BitStructure}s that contain a sequence + * of individual {@link + * module:Layout~BitStructure#addField|BitField}s packed into an 8, + * 16, 24, or 32-bit unsigned integer starting at the least- or + * most-significant bit; + * * {@link module:Layout.cstr|C strings} of varying length; + * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link + * module:Layout~Blob#length|length} raw data. + * + * All {@link module:Layout~Layout|Layout} instances are immutable + * after construction, to prevent internal state from becoming + * inconsistent. + * + * @local Layout + * @local ExternalLayout + * @local GreedyCount + * @local OffsetLayout + * @local UInt + * @local UIntBE + * @local Int + * @local IntBE + * @local NearUInt64 + * @local NearUInt64BE + * @local NearInt64 + * @local NearInt64BE + * @local Float + * @local FloatBE + * @local Double + * @local DoubleBE + * @local Sequence + * @local Structure + * @local UnionDiscriminator + * @local UnionLayoutDiscriminator + * @local Union + * @local VariantLayout + * @local BitStructure + * @local BitField + * @local Boolean + * @local Blob + * @local CString + * @local Constant + * @local bindConstructorLayout + * @module Layout + * @license MIT + * @author Peter A. Bigot + * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} + */ +'use strict'; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +exports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0; +exports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0; +var buffer_1 = require("buffer"); +/* Check if a value is a Uint8Array. + * + * @ignore */ +function checkUint8Array(b) { + if (!(b instanceof Uint8Array)) { + throw new TypeError('b must be a Uint8Array'); + } +} +exports.checkUint8Array = checkUint8Array; +/* Create a Buffer instance from a Uint8Array. + * + * @ignore */ +function uint8ArrayToBuffer(b) { + checkUint8Array(b); + return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length); +} +exports.uint8ArrayToBuffer = uint8ArrayToBuffer; +/** + * Base class for layout objects. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support the {@link + * Layout#encode|encode} or {@link Layout#decode|decode} functions. + * + * @param {Number} span - Initializer for {@link Layout#span|span}. The + * parameter must be an integer; a negative value signifies that the + * span is {@link Layout#getSpan|value-specific}. + * + * @param {string} [property] - Initializer for {@link + * Layout#property|property}. + * + * @abstract + */ +var Layout = /** @class */ (function () { + function Layout(span, property) { + if (!Number.isInteger(span)) { + throw new TypeError('span must be an integer'); + } + /** The span of the layout in bytes. + * + * Positive values are generally expected. + * + * Zero will only appear in {@link Constant}s and in {@link + * Sequence}s where the {@link Sequence#count|count} is zero. + * + * A negative value indicates that the span is value-specific, and + * must be obtained using {@link Layout#getSpan|getSpan}. */ + this.span = span; + /** The property name used when this layout is represented in an + * Object. + * + * Used only for layouts that {@link Layout#decode|decode} to Object + * instances. If left undefined the span of the unnamed layout will + * be treated as padding: it will not be mutated by {@link + * Layout#encode|encode} nor represented as a property in the + * decoded Object. */ + this.property = property; + } + /** Function to create an Object into which decoded properties will + * be written. + * + * Used only for layouts that {@link Layout#decode|decode} to Object + * instances, which means: + * * {@link Structure} + * * {@link Union} + * * {@link VariantLayout} + * * {@link BitStructure} + * + * If left undefined the JavaScript representation of these layouts + * will be Object instances. + * + * See {@link bindConstructorLayout}. + */ + Layout.prototype.makeDestinationObject = function () { + return {}; + }; + /** + * Decode from a Uint8Array into a JavaScript value. + * + * @param {Uint8Array} b - the buffer from which encoded data is read. + * + * @param {Number} [offset] - the offset at which the encoded data + * starts. If absent a zero offset is inferred. + * + * @returns {(Number|Array|Object)} - the value of the decoded data. + * + * @abstract + */ + Layout.prototype.decode = function (b, offset) { + throw new Error('Layout is abstract'); + }; + /** + * Encode a JavaScript value into a Uint8Array. + * + * @param {(Number|Array|Object)} src - the value to be encoded into + * the buffer. The type accepted depends on the (sub-)type of {@link + * Layout}. + * + * @param {Uint8Array} b - the buffer into which encoded data will be + * written. + * + * @param {Number} [offset] - the offset at which the encoded data + * starts. If absent a zero offset is inferred. + * + * @returns {Number} - the number of bytes encoded, including the + * space skipped for internal padding, but excluding data such as + * {@link Sequence#count|lengths} when stored {@link + * ExternalLayout|externally}. This is the adjustment to `offset` + * producing the offset where data for the next layout would be + * written. + * + * @abstract + */ + Layout.prototype.encode = function (src, b, offset) { + throw new Error('Layout is abstract'); + }; + /** + * Calculate the span of a specific instance of a layout. + * + * @param {Uint8Array} b - the buffer that contains an encoded instance. + * + * @param {Number} [offset] - the offset at which the encoded instance + * starts. If absent a zero offset is inferred. + * + * @return {Number} - the number of bytes covered by the layout + * instance. If this method is not overridden in a subclass the + * definition-time constant {@link Layout#span|span} will be + * returned. + * + * @throws {RangeError} - if the length of the value cannot be + * determined. + */ + Layout.prototype.getSpan = function (b, offset) { + if (0 > this.span) { + throw new RangeError('indeterminate span'); + } + return this.span; + }; + /** + * Replicate the layout using a new property. + * + * This function must be used to get a structurally-equivalent layout + * with a different name since all {@link Layout} instances are + * immutable. + * + * **NOTE** This is a shallow copy. All fields except {@link + * Layout#property|property} are strictly equal to the origin layout. + * + * @param {String} property - the value for {@link + * Layout#property|property} in the replica. + * + * @returns {Layout} - the copy with {@link Layout#property|property} + * set to `property`. + */ + Layout.prototype.replicate = function (property) { + var rv = Object.create(this.constructor.prototype); + Object.assign(rv, this); + rv.property = property; + return rv; + }; + /** + * Create an object from layout properties and an array of values. + * + * **NOTE** This function returns `undefined` if invoked on a layout + * that does not return its value as an Object. Objects are + * returned for things that are a {@link Structure}, which includes + * {@link VariantLayout|variant layouts} if they are structures, and + * excludes {@link Union}s. If you want this feature for a union + * you must use {@link Union.getVariant|getVariant} to select the + * desired layout. + * + * @param {Array} values - an array of values that correspond to the + * default order for properties. As with {@link Layout#decode|decode} + * layout elements that have no property name are skipped when + * iterating over the array values. Only the top-level properties are + * assigned; arguments are not assigned to properties of contained + * layouts. Any unused values are ignored. + * + * @return {(Object|undefined)} + */ + Layout.prototype.fromArray = function (values) { + return undefined; + }; + return Layout; +}()); +exports.Layout = Layout; +/* Provide text that carries a name (such as for a function that will + * be throwing an error) annotated with the property of a given layout + * (such as one for which the value was unacceptable). + * + * @ignore */ +function nameWithProperty(name, lo) { + if (lo.property) { + return name + '[' + lo.property + ']'; + } + return name; +} +exports.nameWithProperty = nameWithProperty; +/** + * Augment a class so that instances can be encoded/decoded using a + * given layout. + * + * Calling this function couples `Class` with `layout` in several ways: + * + * * `Class.layout_` becomes a static member property equal to `layout`; + * * `layout.boundConstructor_` becomes a static member property equal + * to `Class`; + * * The {@link Layout#makeDestinationObject|makeDestinationObject()} + * property of `layout` is set to a function that returns a `new + * Class()`; + * * `Class.decode(b, offset)` becomes a static member function that + * delegates to {@link Layout#decode|layout.decode}. The + * synthesized function may be captured and extended. + * * `Class.prototype.encode(b, offset)` provides an instance member + * function that delegates to {@link Layout#encode|layout.encode} + * with `src` set to `this`. The synthesized function may be + * captured and extended, but when the extension is invoked `this` + * must be explicitly bound to the instance. + * + * @param {class} Class - a JavaScript class with a nullary + * constructor. + * + * @param {Layout} layout - the {@link Layout} instance used to encode + * instances of `Class`. + */ +function bindConstructorLayout(Class, layout) { + if ('function' !== typeof Class) { + throw new TypeError('Class must be constructor'); + } + if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) { + throw new Error('Class is already bound to a layout'); + } + if (!(layout && (layout instanceof Layout))) { + throw new TypeError('layout must be a Layout'); + } + if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) { + throw new Error('layout is already bound to a constructor'); + } + Class.layout_ = layout; + layout.boundConstructor_ = Class; + layout.makeDestinationObject = (function () { return new Class(); }); + Object.defineProperty(Class.prototype, 'encode', { + value: function (b, offset) { + return layout.encode(this, b, offset); + }, + writable: true + }); + Object.defineProperty(Class, 'decode', { + value: function (b, offset) { + return layout.decode(b, offset); + }, + writable: true + }); +} +exports.bindConstructorLayout = bindConstructorLayout; +/** + * An object that behaves like a layout but does not consume space + * within its containing layout. + * + * This is primarily used to obtain metadata about a member, such as a + * {@link OffsetLayout} that can provide data about a {@link + * Layout#getSpan|value-specific span}. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support {@link + * ExternalLayout#isCount|isCount} or other {@link Layout} functions. + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @abstract + * @augments {Layout} + */ +var ExternalLayout = /** @class */ (function (_super) { + __extends(ExternalLayout, _super); + function ExternalLayout() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Return `true` iff the external layout decodes to an unsigned + * integer layout. + * + * In that case it can be used as the source of {@link + * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths}, + * or as {@link UnionLayoutDiscriminator#layout|external union + * discriminators}. + * + * @abstract + */ + ExternalLayout.prototype.isCount = function () { + throw new Error('ExternalLayout is abstract'); + }; + return ExternalLayout; +}(Layout)); +exports.ExternalLayout = ExternalLayout; +/** + * An {@link ExternalLayout} that determines its {@link + * Layout#decode|value} based on offset into and length of the buffer + * on which it is invoked. + * + * *Factory*: {@link module:Layout.greedy|greedy} + * + * @param {Number} [elementSpan] - initializer for {@link + * GreedyCount#elementSpan|elementSpan}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {ExternalLayout} + */ +var GreedyCount = /** @class */ (function (_super) { + __extends(GreedyCount, _super); + function GreedyCount(elementSpan, property) { + var _this = this; + if (undefined === elementSpan) { + elementSpan = 1; + } + if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) { + throw new TypeError('elementSpan must be a (positive) integer'); + } + _this = _super.call(this, -1, property) || this; + /** The layout for individual elements of the sequence. The value + * must be a positive integer. If not provided, the value will be + * 1. */ + _this.elementSpan = elementSpan; + return _this; + } + /** @override */ + GreedyCount.prototype.isCount = function () { + return true; + }; + /** @override */ + GreedyCount.prototype.decode = function (b, offset) { + checkUint8Array(b); + if (undefined === offset) { + offset = 0; + } + var rem = b.length - offset; + return Math.floor(rem / this.elementSpan); + }; + /** @override */ + GreedyCount.prototype.encode = function (src, b, offset) { + return 0; + }; + return GreedyCount; +}(ExternalLayout)); +exports.GreedyCount = GreedyCount; +/** + * An {@link ExternalLayout} that supports accessing a {@link Layout} + * at a fixed offset from the start of another Layout. The offset may + * be before, within, or after the base layout. + * + * *Factory*: {@link module:Layout.offset|offset} + * + * @param {Layout} layout - initializer for {@link + * OffsetLayout#layout|layout}, modulo `property`. + * + * @param {Number} [offset] - Initializes {@link + * OffsetLayout#offset|offset}. Defaults to zero. + * + * @param {string} [property] - Optional new property name for a + * {@link Layout#replicate| replica} of `layout` to be used as {@link + * OffsetLayout#layout|layout}. If not provided the `layout` is used + * unchanged. + * + * @augments {Layout} + */ +var OffsetLayout = /** @class */ (function (_super) { + __extends(OffsetLayout, _super); + function OffsetLayout(layout, offset, property) { + var _this = this; + if (!(layout instanceof Layout)) { + throw new TypeError('layout must be a Layout'); + } + if (undefined === offset) { + offset = 0; + } + else if (!Number.isInteger(offset)) { + throw new TypeError('offset must be integer or undefined'); + } + _this = _super.call(this, layout.span, property || layout.property) || this; + /** The subordinated layout. */ + _this.layout = layout; + /** The location of {@link OffsetLayout#layout} relative to the + * start of another layout. + * + * The value may be positive or negative, but an error will thrown + * if at the point of use it goes outside the span of the Uint8Array + * being accessed. */ + _this.offset = offset; + return _this; + } + /** @override */ + OffsetLayout.prototype.isCount = function () { + return ((this.layout instanceof UInt) + || (this.layout instanceof UIntBE)); + }; + /** @override */ + OffsetLayout.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return this.layout.decode(b, offset + this.offset); + }; + /** @override */ + OffsetLayout.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + return this.layout.encode(src, b, offset + this.offset); + }; + return OffsetLayout; +}(ExternalLayout)); +exports.OffsetLayout = OffsetLayout; +/** + * Represent an unsigned integer in little-endian format. + * + * *Factory*: {@link module:Layout.u8|u8}, {@link + * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link + * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link + * module:Layout.u48|u48} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var UInt = /** @class */ (function (_super) { + __extends(UInt, _super); + function UInt(span, property) { + var _this = _super.call(this, span, property) || this; + if (6 < _this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + return _this; + } + /** @override */ + UInt.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readUIntLE(offset, this.span); + }; + /** @override */ + UInt.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span); + return this.span; + }; + return UInt; +}(Layout)); +exports.UInt = UInt; +/** + * Represent an unsigned integer in big-endian format. + * + * *Factory*: {@link module:Layout.u8be|u8be}, {@link + * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be}, + * {@link module:Layout.u32be|u32be}, {@link + * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var UIntBE = /** @class */ (function (_super) { + __extends(UIntBE, _super); + function UIntBE(span, property) { + var _this = _super.call(this, span, property) || this; + if (6 < _this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + return _this; + } + /** @override */ + UIntBE.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readUIntBE(offset, this.span); + }; + /** @override */ + UIntBE.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span); + return this.span; + }; + return UIntBE; +}(Layout)); +exports.UIntBE = UIntBE; +/** + * Represent a signed integer in little-endian format. + * + * *Factory*: {@link module:Layout.s8|s8}, {@link + * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link + * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link + * module:Layout.s48|s48} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Int = /** @class */ (function (_super) { + __extends(Int, _super); + function Int(span, property) { + var _this = _super.call(this, span, property) || this; + if (6 < _this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + return _this; + } + /** @override */ + Int.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readIntLE(offset, this.span); + }; + /** @override */ + Int.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span); + return this.span; + }; + return Int; +}(Layout)); +exports.Int = Int; +/** + * Represent a signed integer in big-endian format. + * + * *Factory*: {@link module:Layout.s8be|s8be}, {@link + * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be}, + * {@link module:Layout.s32be|s32be}, {@link + * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var IntBE = /** @class */ (function (_super) { + __extends(IntBE, _super); + function IntBE(span, property) { + var _this = _super.call(this, span, property) || this; + if (6 < _this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + return _this; + } + /** @override */ + IntBE.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readIntBE(offset, this.span); + }; + /** @override */ + IntBE.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span); + return this.span; + }; + return IntBE; +}(Layout)); +exports.IntBE = IntBE; +var V2E32 = Math.pow(2, 32); +/* True modulus high and low 32-bit words, where low word is always + * non-negative. */ +function divmodInt64(src) { + var hi32 = Math.floor(src / V2E32); + var lo32 = src - (hi32 * V2E32); + return { hi32: hi32, lo32: lo32 }; +} +/* Reconstruct Number from quotient and non-negative remainder */ +function roundedInt64(hi32, lo32) { + return hi32 * V2E32 + lo32; +} +/** + * Represent an unsigned 64-bit integer in little-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.nu64|nu64} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +var NearUInt64 = /** @class */ (function (_super) { + __extends(NearUInt64, _super); + function NearUInt64(property) { + return _super.call(this, 8, property) || this; + } + /** @override */ + NearUInt64.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var buffer = uint8ArrayToBuffer(b); + var lo32 = buffer.readUInt32LE(offset); + var hi32 = buffer.readUInt32LE(offset + 4); + return roundedInt64(hi32, lo32); + }; + /** @override */ + NearUInt64.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var split = divmodInt64(src); + var buffer = uint8ArrayToBuffer(b); + buffer.writeUInt32LE(split.lo32, offset); + buffer.writeUInt32LE(split.hi32, offset + 4); + return 8; + }; + return NearUInt64; +}(Layout)); +exports.NearUInt64 = NearUInt64; +/** + * Represent an unsigned 64-bit integer in big-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.nu64be|nu64be} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +var NearUInt64BE = /** @class */ (function (_super) { + __extends(NearUInt64BE, _super); + function NearUInt64BE(property) { + return _super.call(this, 8, property) || this; + } + /** @override */ + NearUInt64BE.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var buffer = uint8ArrayToBuffer(b); + var hi32 = buffer.readUInt32BE(offset); + var lo32 = buffer.readUInt32BE(offset + 4); + return roundedInt64(hi32, lo32); + }; + /** @override */ + NearUInt64BE.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var split = divmodInt64(src); + var buffer = uint8ArrayToBuffer(b); + buffer.writeUInt32BE(split.hi32, offset); + buffer.writeUInt32BE(split.lo32, offset + 4); + return 8; + }; + return NearUInt64BE; +}(Layout)); +exports.NearUInt64BE = NearUInt64BE; +/** + * Represent a signed 64-bit integer in little-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.ns64|ns64} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +var NearInt64 = /** @class */ (function (_super) { + __extends(NearInt64, _super); + function NearInt64(property) { + return _super.call(this, 8, property) || this; + } + /** @override */ + NearInt64.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var buffer = uint8ArrayToBuffer(b); + var lo32 = buffer.readUInt32LE(offset); + var hi32 = buffer.readInt32LE(offset + 4); + return roundedInt64(hi32, lo32); + }; + /** @override */ + NearInt64.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var split = divmodInt64(src); + var buffer = uint8ArrayToBuffer(b); + buffer.writeUInt32LE(split.lo32, offset); + buffer.writeInt32LE(split.hi32, offset + 4); + return 8; + }; + return NearInt64; +}(Layout)); +exports.NearInt64 = NearInt64; +/** + * Represent a signed 64-bit integer in big-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.ns64be|ns64be} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +var NearInt64BE = /** @class */ (function (_super) { + __extends(NearInt64BE, _super); + function NearInt64BE(property) { + return _super.call(this, 8, property) || this; + } + /** @override */ + NearInt64BE.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var buffer = uint8ArrayToBuffer(b); + var hi32 = buffer.readInt32BE(offset); + var lo32 = buffer.readUInt32BE(offset + 4); + return roundedInt64(hi32, lo32); + }; + /** @override */ + NearInt64BE.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var split = divmodInt64(src); + var buffer = uint8ArrayToBuffer(b); + buffer.writeInt32BE(split.hi32, offset); + buffer.writeUInt32BE(split.lo32, offset + 4); + return 8; + }; + return NearInt64BE; +}(Layout)); +exports.NearInt64BE = NearInt64BE; +/** + * Represent a 32-bit floating point number in little-endian format. + * + * *Factory*: {@link module:Layout.f32|f32} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Float = /** @class */ (function (_super) { + __extends(Float, _super); + function Float(property) { + return _super.call(this, 4, property) || this; + } + /** @override */ + Float.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readFloatLE(offset); + }; + /** @override */ + Float.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeFloatLE(src, offset); + return 4; + }; + return Float; +}(Layout)); +exports.Float = Float; +/** + * Represent a 32-bit floating point number in big-endian format. + * + * *Factory*: {@link module:Layout.f32be|f32be} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var FloatBE = /** @class */ (function (_super) { + __extends(FloatBE, _super); + function FloatBE(property) { + return _super.call(this, 4, property) || this; + } + /** @override */ + FloatBE.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readFloatBE(offset); + }; + /** @override */ + FloatBE.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeFloatBE(src, offset); + return 4; + }; + return FloatBE; +}(Layout)); +exports.FloatBE = FloatBE; +/** + * Represent a 64-bit floating point number in little-endian format. + * + * *Factory*: {@link module:Layout.f64|f64} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Double = /** @class */ (function (_super) { + __extends(Double, _super); + function Double(property) { + return _super.call(this, 8, property) || this; + } + /** @override */ + Double.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readDoubleLE(offset); + }; + /** @override */ + Double.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeDoubleLE(src, offset); + return 8; + }; + return Double; +}(Layout)); +exports.Double = Double; +/** + * Represent a 64-bit floating point number in big-endian format. + * + * *Factory*: {@link module:Layout.f64be|f64be} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var DoubleBE = /** @class */ (function (_super) { + __extends(DoubleBE, _super); + function DoubleBE(property) { + return _super.call(this, 8, property) || this; + } + /** @override */ + DoubleBE.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + return uint8ArrayToBuffer(b).readDoubleBE(offset); + }; + /** @override */ + DoubleBE.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + uint8ArrayToBuffer(b).writeDoubleBE(src, offset); + return 8; + }; + return DoubleBE; +}(Layout)); +exports.DoubleBE = DoubleBE; +/** + * Represent a contiguous sequence of a specific layout as an Array. + * + * *Factory*: {@link module:Layout.seq|seq} + * + * @param {Layout} elementLayout - initializer for {@link + * Sequence#elementLayout|elementLayout}. + * + * @param {(Number|ExternalLayout)} count - initializer for {@link + * Sequence#count|count}. The parameter must be either a positive + * integer or an instance of {@link ExternalLayout}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Sequence = /** @class */ (function (_super) { + __extends(Sequence, _super); + function Sequence(elementLayout, count, property) { + var _this = this; + if (!(elementLayout instanceof Layout)) { + throw new TypeError('elementLayout must be a Layout'); + } + if (!(((count instanceof ExternalLayout) && count.isCount()) + || (Number.isInteger(count) && (0 <= count)))) { + throw new TypeError('count must be non-negative integer ' + + 'or an unsigned integer ExternalLayout'); + } + var span = -1; + if ((!(count instanceof ExternalLayout)) + && (0 < elementLayout.span)) { + span = count * elementLayout.span; + } + _this = _super.call(this, span, property) || this; + /** The layout for individual elements of the sequence. */ + _this.elementLayout = elementLayout; + /** The number of elements in the sequence. + * + * This will be either a non-negative integer or an instance of + * {@link ExternalLayout} for which {@link + * ExternalLayout#isCount|isCount()} is `true`. */ + _this.count = count; + return _this; + } + /** @override */ + Sequence.prototype.getSpan = function (b, offset) { + if (0 <= this.span) { + return this.span; + } + if (undefined === offset) { + offset = 0; + } + var span = 0; + var count = this.count; + if (count instanceof ExternalLayout) { + count = count.decode(b, offset); + } + if (0 < this.elementLayout.span) { + span = count * this.elementLayout.span; + } + else { + var idx = 0; + while (idx < count) { + span += this.elementLayout.getSpan(b, offset + span); + ++idx; + } + } + return span; + }; + /** @override */ + Sequence.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var rv = []; + var i = 0; + var count = this.count; + if (count instanceof ExternalLayout) { + count = count.decode(b, offset); + } + while (i < count) { + rv.push(this.elementLayout.decode(b, offset)); + offset += this.elementLayout.getSpan(b, offset); + i += 1; + } + return rv; + }; + /** Implement {@link Layout#encode|encode} for {@link Sequence}. + * + * **NOTE** If `src` is shorter than {@link Sequence#count|count} then + * the unused space in the buffer is left unchanged. If `src` is + * longer than {@link Sequence#count|count} the unneeded elements are + * ignored. + * + * **NOTE** If {@link Layout#count|count} is an instance of {@link + * ExternalLayout} then the length of `src` will be encoded as the + * count after `src` is encoded. */ + Sequence.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var elo = this.elementLayout; + var span = src.reduce(function (span, v) { + return span + elo.encode(v, b, offset + span); + }, 0); + if (this.count instanceof ExternalLayout) { + this.count.encode(src.length, b, offset); + } + return span; + }; + return Sequence; +}(Layout)); +exports.Sequence = Sequence; +/** + * Represent a contiguous sequence of arbitrary layout elements as an + * Object. + * + * *Factory*: {@link module:Layout.struct|struct} + * + * **NOTE** The {@link Layout#span|span} of the structure is variable + * if any layout in {@link Structure#fields|fields} has a variable + * span. When {@link Layout#encode|encoding} we must have a value for + * all variable-length fields, or we wouldn't be able to figure out + * how much space to use for storage. We can only identify the value + * for a field when it has a {@link Layout#property|property}. As + * such, although a structure may contain both unnamed fields and + * variable-length fields, it cannot contain an unnamed + * variable-length field. + * + * @param {Layout[]} fields - initializer for {@link + * Structure#fields|fields}. An error is raised if this contains a + * variable-length field for which a {@link Layout#property|property} + * is not defined. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @param {Boolean} [decodePrefixes] - initializer for {@link + * Structure#decodePrefixes|property}. + * + * @throws {Error} - if `fields` contains an unnamed variable-length + * layout. + * + * @augments {Layout} + */ +var Structure = /** @class */ (function (_super) { + __extends(Structure, _super); + function Structure(fields, property, decodePrefixes) { + var _this = this; + if (!(Array.isArray(fields) + && fields.reduce(function (acc, v) { return acc && (v instanceof Layout); }, true))) { + throw new TypeError('fields must be array of Layout instances'); + } + if (('boolean' === typeof property) + && (undefined === decodePrefixes)) { + decodePrefixes = property; + property = undefined; + } + /* Verify absence of unnamed variable-length fields. */ + for (var _i = 0, fields_1 = fields; _i < fields_1.length; _i++) { + var fd = fields_1[_i]; + if ((0 > fd.span) + && (undefined === fd.property)) { + throw new Error('fields cannot contain unnamed variable-length layout'); + } + } + var span = -1; + try { + span = fields.reduce(function (span, fd) { return span + fd.getSpan(); }, 0); + } + catch (e) { + // ignore error + } + _this = _super.call(this, span, property) || this; + /** The sequence of {@link Layout} values that comprise the + * structure. + * + * The individual elements need not be the same type, and may be + * either scalar or aggregate layouts. If a member layout leaves + * its {@link Layout#property|property} undefined the + * corresponding region of the buffer associated with the element + * will not be mutated. + * + * @type {Layout[]} */ + _this.fields = fields; + /** Control behavior of {@link Layout#decode|decode()} given short + * buffers. + * + * In some situations a structure many be extended with additional + * fields over time, with older installations providing only a + * prefix of the full structure. If this property is `true` + * decoding will accept those buffers and leave subsequent fields + * undefined, as long as the buffer ends at a field boundary. + * Defaults to `false`. */ + _this.decodePrefixes = !!decodePrefixes; + return _this; + } + /** @override */ + Structure.prototype.getSpan = function (b, offset) { + if (0 <= this.span) { + return this.span; + } + if (undefined === offset) { + offset = 0; + } + var span = 0; + try { + span = this.fields.reduce(function (span, fd) { + var fsp = fd.getSpan(b, offset); + offset += fsp; + return span + fsp; + }, 0); + } + catch (e) { + throw new RangeError('indeterminate span'); + } + return span; + }; + /** @override */ + Structure.prototype.decode = function (b, offset) { + checkUint8Array(b); + if (undefined === offset) { + offset = 0; + } + var dest = this.makeDestinationObject(); + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if (undefined !== fd.property) { + dest[fd.property] = fd.decode(b, offset); + } + offset += fd.getSpan(b, offset); + if (this.decodePrefixes + && (b.length === offset)) { + break; + } + } + return dest; + }; + /** Implement {@link Layout#encode|encode} for {@link Structure}. + * + * If `src` is missing a property for a member with a defined {@link + * Layout#property|property} the corresponding region of the buffer is + * left unmodified. */ + Structure.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var firstOffset = offset; + var lastOffset = 0; + var lastWrote = 0; + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + var span = fd.span; + lastWrote = (0 < span) ? span : 0; + if (undefined !== fd.property) { + var fv = src[fd.property]; + if (undefined !== fv) { + lastWrote = fd.encode(fv, b, offset); + if (0 > span) { + /* Read the as-encoded span, which is not necessarily the + * same as what we wrote. */ + span = fd.getSpan(b, offset); + } + } + } + lastOffset = offset; + offset += span; + } + /* Use (lastOffset + lastWrote) instead of offset because the last + * item may have had a dynamic length and we don't want to include + * the padding between it and the end of the space reserved for + * it. */ + return (lastOffset + lastWrote) - firstOffset; + }; + /** @override */ + Structure.prototype.fromArray = function (values) { + var dest = this.makeDestinationObject(); + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if ((undefined !== fd.property) + && (0 < values.length)) { + dest[fd.property] = values.shift(); + } + } + return dest; + }; + /** + * Get access to the layout of a given property. + * + * @param {String} property - the structure member of interest. + * + * @return {Layout} - the layout associated with `property`, or + * undefined if there is no such property. + */ + Structure.prototype.layoutFor = function (property) { + if ('string' !== typeof property) { + throw new TypeError('property must be string'); + } + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if (fd.property === property) { + return fd; + } + } + return undefined; + }; + /** + * Get the offset of a structure member. + * + * @param {String} property - the structure member of interest. + * + * @return {Number} - the offset in bytes to the start of `property` + * within the structure, or undefined if `property` is not a field + * within the structure. If the property is a member but follows a + * variable-length structure member a negative number will be + * returned. + */ + Structure.prototype.offsetOf = function (property) { + if ('string' !== typeof property) { + throw new TypeError('property must be string'); + } + var offset = 0; + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if (fd.property === property) { + return offset; + } + if (0 > fd.span) { + offset = -1; + } + else if (0 <= offset) { + offset += fd.span; + } + } + return undefined; + }; + return Structure; +}(Layout)); +exports.Structure = Structure; +/** + * An object that can provide a {@link + * Union#discriminator|discriminator} API for {@link Union}. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support the {@link + * UnionDiscriminator#encode|encode} or {@link + * UnionDiscriminator#decode|decode} functions. + * + * @param {string} [property] - Default for {@link + * UnionDiscriminator#property|property}. + * + * @abstract + */ +var UnionDiscriminator = /** @class */ (function () { + function UnionDiscriminator(property) { + /** The {@link Layout#property|property} to be used when the + * discriminator is referenced in isolation (generally when {@link + * Union#decode|Union decode} cannot delegate to a specific + * variant). */ + this.property = property; + } + /** Analog to {@link Layout#decode|Layout decode} for union discriminators. + * + * The implementation of this method need not reference the buffer if + * variant information is available through other means. */ + UnionDiscriminator.prototype.decode = function (b, offset) { + throw new Error('UnionDiscriminator is abstract'); + }; + /** Analog to {@link Layout#decode|Layout encode} for union discriminators. + * + * The implementation of this method need not store the value if + * variant information is maintained through other means. */ + UnionDiscriminator.prototype.encode = function (src, b, offset) { + throw new Error('UnionDiscriminator is abstract'); + }; + return UnionDiscriminator; +}()); +exports.UnionDiscriminator = UnionDiscriminator; +/** + * An object that can provide a {@link + * UnionDiscriminator|discriminator API} for {@link Union} using an + * unsigned integral {@link Layout} instance located either inside or + * outside the union. + * + * @param {ExternalLayout} layout - initializes {@link + * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link + * ExternalLayout#isCount|isCount()}. + * + * @param {string} [property] - Default for {@link + * UnionDiscriminator#property|property}, superseding the property + * from `layout`, but defaulting to `variant` if neither `property` + * nor layout provide a property name. + * + * @augments {UnionDiscriminator} + */ +var UnionLayoutDiscriminator = /** @class */ (function (_super) { + __extends(UnionLayoutDiscriminator, _super); + function UnionLayoutDiscriminator(layout, property) { + var _this = this; + if (!((layout instanceof ExternalLayout) + && layout.isCount())) { + throw new TypeError('layout must be an unsigned integer ExternalLayout'); + } + _this = _super.call(this, property || layout.property || 'variant') || this; + /** The {@link ExternalLayout} used to access the discriminator + * value. */ + _this.layout = layout; + return _this; + } + /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */ + UnionLayoutDiscriminator.prototype.decode = function (b, offset) { + return this.layout.decode(b, offset); + }; + /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */ + UnionLayoutDiscriminator.prototype.encode = function (src, b, offset) { + return this.layout.encode(src, b, offset); + }; + return UnionLayoutDiscriminator; +}(UnionDiscriminator)); +exports.UnionLayoutDiscriminator = UnionLayoutDiscriminator; +/** + * Represent any number of span-compatible layouts. + * + * *Factory*: {@link module:Layout.union|union} + * + * If the union has a {@link Union#defaultLayout|default layout} that + * layout must have a non-negative {@link Layout#span|span}. The span + * of a fixed-span union includes its {@link + * Union#discriminator|discriminator} if the variant is a {@link + * Union#usesPrefixDiscriminator|prefix of the union}, plus the span + * of its {@link Union#defaultLayout|default layout}. + * + * If the union does not have a default layout then the encoded span + * of the union depends on the encoded span of its variant (which may + * be fixed or variable). + * + * {@link VariantLayout#layout|Variant layout}s are added through + * {@link Union#addVariant|addVariant}. If the union has a default + * layout, the span of the {@link VariantLayout#layout|layout + * contained by the variant} must not exceed the span of the {@link + * Union#defaultLayout|default layout} (minus the span of a {@link + * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The + * span of the variant will equal the span of the union itself. + * + * The variant for a buffer can only be identified from the {@link + * Union#discriminator|discriminator} {@link + * UnionDiscriminator#property|property} (in the case of the {@link + * Union#defaultLayout|default layout}), or by using {@link + * Union#getVariant|getVariant} and examining the resulting {@link + * VariantLayout} instance. + * + * A variant compatible with a JavaScript object can be identified + * using {@link Union#getSourceVariant|getSourceVariant}. + * + * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to + * identify the layout used to interpret the union contents. The + * parameter must be an instance of {@link UnionDiscriminator}, an + * {@link ExternalLayout} that satisfies {@link + * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link + * UIntBE}). When a non-external layout element is passed the layout + * appears at the start of the union. In all cases the (synthesized) + * {@link UnionDiscriminator} instance is recorded as {@link + * Union#discriminator|discriminator}. + * + * @param {(Layout|null)} defaultLayout - initializer for {@link + * Union#defaultLayout|defaultLayout}. If absent defaults to `null`. + * If `null` there is no default layout: the union has data-dependent + * length and attempts to decode or encode unrecognized variants will + * throw an exception. A {@link Layout} instance must have a + * non-negative {@link Layout#span|span}, and if it lacks a {@link + * Layout#property|property} the {@link + * Union#defaultLayout|defaultLayout} will be a {@link + * Layout#replicate|replica} with property `content`. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Union = /** @class */ (function (_super) { + __extends(Union, _super); + function Union(discr, defaultLayout, property) { + var _this = this; + var upv = ((discr instanceof UInt) + || (discr instanceof UIntBE)); + var discriminator; + if (upv) { + discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr)); + } + else if ((discr instanceof ExternalLayout) + && discr.isCount()) { + discriminator = new UnionLayoutDiscriminator(discr); + } + else if (!(discr instanceof UnionDiscriminator)) { + throw new TypeError('discr must be a UnionDiscriminator ' + + 'or an unsigned integer layout'); + } + else { + discriminator = discr; + } + if (undefined === defaultLayout) { + defaultLayout = null; + } + if (!((null === defaultLayout) + || (defaultLayout instanceof Layout))) { + throw new TypeError('defaultLayout must be null or a Layout'); + } + if (null !== defaultLayout) { + if (0 > defaultLayout.span) { + throw new Error('defaultLayout must have constant span'); + } + if (undefined === defaultLayout.property) { + defaultLayout = defaultLayout.replicate('content'); + } + } + /* The union span can be estimated only if there's a default + * layout. The union spans its default layout, plus any prefix + * variant layout. By construction both layouts, if present, have + * non-negative span. */ + var span = -1; + if (defaultLayout) { + span = defaultLayout.span; + if ((0 <= span) && upv) { + span += discriminator.layout.span; + } + } + _this = _super.call(this, span, property) || this; + /** The interface for the discriminator value in isolation. + * + * This a {@link UnionDiscriminator} either passed to the + * constructor or synthesized from the `discr` constructor + * argument. {@link + * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be + * `true` iff the `discr` parameter was a non-offset {@link + * Layout} instance. */ + _this.discriminator = discriminator; + /** `true` if the {@link Union#discriminator|discriminator} is the + * first field in the union. + * + * If `false` the discriminator is obtained from somewhere + * else. */ + _this.usesPrefixDiscriminator = upv; + /** The layout for non-discriminator content when the value of the + * discriminator is not recognized. + * + * This is the value passed to the constructor. It is + * structurally equivalent to the second component of {@link + * Union#layout|layout} but may have a different property + * name. */ + _this.defaultLayout = defaultLayout; + /** A registry of allowed variants. + * + * The keys are unsigned integers which should be compatible with + * {@link Union.discriminator|discriminator}. The property value + * is the corresponding {@link VariantLayout} instances assigned + * to this union by {@link Union#addVariant|addVariant}. + * + * **NOTE** The registry remains mutable so that variants can be + * {@link Union#addVariant|added} at any time. Users should not + * manipulate the content of this property. */ + _this.registry = {}; + /* Private variable used when invoking getSourceVariant */ + var boundGetSourceVariant = _this.defaultGetSourceVariant.bind(_this); + /** Function to infer the variant selected by a source object. + * + * Defaults to {@link + * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may + * be overridden using {@link + * Union#configGetSourceVariant|configGetSourceVariant}. + * + * @param {Object} src - as with {@link + * Union#defaultGetSourceVariant|defaultGetSourceVariant}. + * + * @returns {(undefined|VariantLayout)} The default variant + * (`undefined`) or first registered variant that uses a property + * available in `src`. */ + _this.getSourceVariant = function (src) { + return boundGetSourceVariant(src); + }; + /** Function to override the implementation of {@link + * Union#getSourceVariant|getSourceVariant}. + * + * Use this if the desired variant cannot be identified using the + * algorithm of {@link + * Union#defaultGetSourceVariant|defaultGetSourceVariant}. + * + * **NOTE** The provided function will be invoked bound to this + * Union instance, providing local access to {@link + * Union#registry|registry}. + * + * @param {Function} gsv - a function that follows the API of + * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */ + _this.configGetSourceVariant = function (gsv) { + boundGetSourceVariant = gsv.bind(this); + }; + return _this; + } + /** @override */ + Union.prototype.getSpan = function (b, offset) { + if (0 <= this.span) { + return this.span; + } + if (undefined === offset) { + offset = 0; + } + /* Default layouts always have non-negative span, so we don't have + * one and we have to recognize the variant which will in turn + * determine the span. */ + var vlo = this.getVariant(b, offset); + if (!vlo) { + throw new Error('unable to determine span for unrecognized variant'); + } + return vlo.getSpan(b, offset); + }; + /** + * Method to infer a registered Union variant compatible with `src`. + * + * The first satisfied rule in the following sequence defines the + * return value: + * * If `src` has properties matching the Union discriminator and + * the default layout, `undefined` is returned regardless of the + * value of the discriminator property (this ensures the default + * layout will be used); + * * If `src` has a property matching the Union discriminator, the + * value of the discriminator identifies a registered variant, and + * either (a) the variant has no layout, or (b) `src` has the + * variant's property, then the variant is returned (because the + * source satisfies the constraints of the variant it identifies); + * * If `src` does not have a property matching the Union + * discriminator, but does have a property matching a registered + * variant, then the variant is returned (because the source + * matches a variant without an explicit conflict); + * * An error is thrown (because we either can't identify a variant, + * or we were explicitly told the variant but can't satisfy it). + * + * @param {Object} src - an object presumed to be compatible with + * the content of the Union. + * + * @return {(undefined|VariantLayout)} - as described above. + * + * @throws {Error} - if `src` cannot be associated with a default or + * registered variant. + */ + Union.prototype.defaultGetSourceVariant = function (src) { + if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) { + if (this.defaultLayout && this.defaultLayout.property + && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) { + return undefined; + } + var vlo = this.registry[src[this.discriminator.property]]; + if (vlo + && ((!vlo.layout) + || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) { + return vlo; + } + } + else { + for (var tag in this.registry) { + var vlo = this.registry[tag]; + if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) { + return vlo; + } + } + } + throw new Error('unable to infer src variant'); + }; + /** Implement {@link Layout#decode|decode} for {@link Union}. + * + * If the variant is {@link Union#addVariant|registered} the return + * value is an instance of that variant, with no explicit + * discriminator. Otherwise the {@link Union#defaultLayout|default + * layout} is used to decode the content. */ + Union.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var dest; + var dlo = this.discriminator; + var discr = dlo.decode(b, offset); + var clo = this.registry[discr]; + if (undefined === clo) { + var defaultLayout = this.defaultLayout; + var contentOffset = 0; + if (this.usesPrefixDiscriminator) { + contentOffset = dlo.layout.span; + } + dest = this.makeDestinationObject(); + dest[dlo.property] = discr; + dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset); + } + else { + dest = clo.decode(b, offset); + } + return dest; + }; + /** Implement {@link Layout#encode|encode} for {@link Union}. + * + * This API assumes the `src` object is consistent with the union's + * {@link Union#defaultLayout|default layout}. To encode variants + * use the appropriate variant-specific {@link VariantLayout#encode} + * method. */ + Union.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var vlo = this.getSourceVariant(src); + if (undefined === vlo) { + var dlo = this.discriminator; + // this.defaultLayout is not undefined when vlo is undefined + var clo = this.defaultLayout; + var contentOffset = 0; + if (this.usesPrefixDiscriminator) { + contentOffset = dlo.layout.span; + } + dlo.encode(src[dlo.property], b, offset); + // clo.property is not undefined when vlo is undefined + return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset); + } + return vlo.encode(src, b, offset); + }; + /** Register a new variant structure within a union. The newly + * created variant is returned. + * + * @param {Number} variant - initializer for {@link + * VariantLayout#variant|variant}. + * + * @param {Layout} layout - initializer for {@link + * VariantLayout#layout|layout}. + * + * @param {String} property - initializer for {@link + * Layout#property|property}. + * + * @return {VariantLayout} */ + Union.prototype.addVariant = function (variant, layout, property) { + var rv = new VariantLayout(this, variant, layout, property); + this.registry[variant] = rv; + return rv; + }; + /** + * Get the layout associated with a registered variant. + * + * If `vb` does not produce a registered variant the function returns + * `undefined`. + * + * @param {(Number|Uint8Array)} vb - either the variant number, or a + * buffer from which the discriminator is to be read. + * + * @param {Number} offset - offset into `vb` for the start of the + * union. Used only when `vb` is an instance of {Uint8Array}. + * + * @return {({VariantLayout}|undefined)} + */ + Union.prototype.getVariant = function (vb, offset) { + var variant; + if (vb instanceof Uint8Array) { + if (undefined === offset) { + offset = 0; + } + variant = this.discriminator.decode(vb, offset); + } + else { + variant = vb; + } + return this.registry[variant]; + }; + return Union; +}(Layout)); +exports.Union = Union; +/** + * Represent a specific variant within a containing union. + * + * **NOTE** The {@link Layout#span|span} of the variant may include + * the span of the {@link Union#discriminator|discriminator} used to + * identify it, but values read and written using the variant strictly + * conform to the content of {@link VariantLayout#layout|layout}. + * + * **NOTE** User code should not invoke this constructor directly. Use + * the union {@link Union#addVariant|addVariant} helper method. + * + * @param {Union} union - initializer for {@link + * VariantLayout#union|union}. + * + * @param {Number} variant - initializer for {@link + * VariantLayout#variant|variant}. + * + * @param {Layout} [layout] - initializer for {@link + * VariantLayout#layout|layout}. If absent the variant carries no + * data. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. Unlike many other layouts, variant + * layouts normally include a property name so they can be identified + * within their containing {@link Union}. The property identifier may + * be absent only if `layout` is is absent. + * + * @augments {Layout} + */ +var VariantLayout = /** @class */ (function (_super) { + __extends(VariantLayout, _super); + function VariantLayout(union, variant, layout, property) { + var _this = this; + if (!(union instanceof Union)) { + throw new TypeError('union must be a Union'); + } + if ((!Number.isInteger(variant)) || (0 > variant)) { + throw new TypeError('variant must be a (non-negative) integer'); + } + if (('string' === typeof layout) + && (undefined === property)) { + property = layout; + layout = null; + } + if (layout) { + if (!(layout instanceof Layout)) { + throw new TypeError('layout must be a Layout'); + } + if ((null !== union.defaultLayout) + && (0 <= layout.span) + && (layout.span > union.defaultLayout.span)) { + throw new Error('variant span exceeds span of containing union'); + } + if ('string' !== typeof property) { + throw new TypeError('variant must have a String property'); + } + } + var span = union.span; + if (0 > union.span) { + span = layout ? layout.span : 0; + if ((0 <= span) && union.usesPrefixDiscriminator) { + span += union.discriminator.layout.span; + } + } + _this = _super.call(this, span, property) || this; + /** The {@link Union} to which this variant belongs. */ + _this.union = union; + /** The unsigned integral value identifying this variant within + * the {@link Union#discriminator|discriminator} of the containing + * union. */ + _this.variant = variant; + /** The {@link Layout} to be used when reading/writing the + * non-discriminator part of the {@link + * VariantLayout#union|union}. If `null` the variant carries no + * data. */ + _this.layout = layout || null; + return _this; + } + /** @override */ + VariantLayout.prototype.getSpan = function (b, offset) { + if (0 <= this.span) { + /* Will be equal to the containing union span if that is not + * variable. */ + return this.span; + } + if (undefined === offset) { + offset = 0; + } + var contentOffset = 0; + if (this.union.usesPrefixDiscriminator) { + contentOffset = this.union.discriminator.layout.span; + } + /* Span is defined solely by the variant (and prefix discriminator) */ + var span = 0; + if (this.layout) { + span = this.layout.getSpan(b, offset + contentOffset); + } + return contentOffset + span; + }; + /** @override */ + VariantLayout.prototype.decode = function (b, offset) { + var dest = this.makeDestinationObject(); + if (undefined === offset) { + offset = 0; + } + if (this !== this.union.getVariant(b, offset)) { + throw new Error('variant mismatch'); + } + var contentOffset = 0; + if (this.union.usesPrefixDiscriminator) { + contentOffset = this.union.discriminator.layout.span; + } + // VariantLayout property is never undefined + var property = this.property; + if (this.layout) { + dest[property] = this.layout.decode(b, offset + contentOffset); + } + else if (property) { + dest[property] = true; + } + else if (this.union.usesPrefixDiscriminator) { + dest[this.union.discriminator.property] = this.variant; + } + return dest; + }; + /** @override */ + VariantLayout.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var contentOffset = 0; + if (this.union.usesPrefixDiscriminator) { + contentOffset = this.union.discriminator.layout.span; + } + // VariantLayout property is never undefined + var property = this.property; + if (this.layout + && (!Object.prototype.hasOwnProperty.call(src, property))) { + throw new TypeError('variant lacks property ' + property); + } + this.union.discriminator.encode(this.variant, b, offset); + var span = contentOffset; + if (this.layout) { + this.layout.encode(src[property], b, offset + contentOffset); + span += this.layout.getSpan(b, offset + contentOffset); + if ((0 <= this.union.span) + && (span > this.union.span)) { + throw new Error('encoded variant overruns containing union'); + } + } + return span; + }; + /** Delegate {@link Layout#fromArray|fromArray} to {@link + * VariantLayout#layout|layout}. */ + VariantLayout.prototype.fromArray = function (values) { + if (this.layout) { + return this.layout.fromArray(values); + } + return undefined; + }; + return VariantLayout; +}(Layout)); +exports.VariantLayout = VariantLayout; +/** JavaScript chose to define bitwise operations as operating on + * signed 32-bit values in 2's complement form, meaning any integer + * with bit 31 set is going to look negative. For right shifts that's + * not a problem, because `>>>` is a logical shift, but for every + * other bitwise operator we have to compensate for possible negative + * results. */ +function fixBitwiseResult(v) { + if (0 > v) { + v += 0x100000000; + } + return v; +} +/** + * Contain a sequence of bit fields as an unsigned integer. + * + * *Factory*: {@link module:Layout.bits|bits} + * + * This is a container element; within it there are {@link BitField} + * instances that provide the extracted properties. The container + * simply defines the aggregate representation and its bit ordering. + * The representation is an object containing properties with numeric + * or {@link Boolean} values. + * + * {@link BitField}s are added with the {@link + * BitStructure#addField|addField} and {@link + * BitStructure#addBoolean|addBoolean} methods. + + * @param {Layout} word - initializer for {@link + * BitStructure#word|word}. The parameter must be an instance of + * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide. + * + * @param {bool} [msb] - `true` if the bit numbering starts at the + * most significant bit of the containing word; `false` (default) if + * it starts at the least significant bit of the containing word. If + * the parameter at this position is a string and `property` is + * `undefined` the value of this argument will instead be used as the + * value of `property`. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var BitStructure = /** @class */ (function (_super) { + __extends(BitStructure, _super); + function BitStructure(word, msb, property) { + var _this = this; + if (!((word instanceof UInt) + || (word instanceof UIntBE))) { + throw new TypeError('word must be a UInt or UIntBE layout'); + } + if (('string' === typeof msb) + && (undefined === property)) { + property = msb; + msb = false; + } + if (4 < word.span) { + throw new RangeError('word cannot exceed 32 bits'); + } + _this = _super.call(this, word.span, property) || this; + /** The layout used for the packed value. {@link BitField} + * instances are packed sequentially depending on {@link + * BitStructure#msb|msb}. */ + _this.word = word; + /** Whether the bit sequences are packed starting at the most + * significant bit growing down (`true`), or the least significant + * bit growing up (`false`). + * + * **NOTE** Regardless of this value, the least significant bit of + * any {@link BitField} value is the least significant bit of the + * corresponding section of the packed value. */ + _this.msb = !!msb; + /** The sequence of {@link BitField} layouts that comprise the + * packed structure. + * + * **NOTE** The array remains mutable to allow fields to be {@link + * BitStructure#addField|added} after construction. Users should + * not manipulate the content of this property.*/ + _this.fields = []; + /* Storage for the value. Capture a variable instead of using an + * instance property because we don't want anything to change the + * value without going through the mutator. */ + var value = 0; + _this._packedSetValue = function (v) { + value = fixBitwiseResult(v); + return this; + }; + _this._packedGetValue = function () { + return value; + }; + return _this; + } + /** @override */ + BitStructure.prototype.decode = function (b, offset) { + var dest = this.makeDestinationObject(); + if (undefined === offset) { + offset = 0; + } + var value = this.word.decode(b, offset); + this._packedSetValue(value); + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if (undefined !== fd.property) { + dest[fd.property] = fd.decode(value); + } + } + return dest; + }; + /** Implement {@link Layout#encode|encode} for {@link BitStructure}. + * + * If `src` is missing a property for a member with a defined {@link + * Layout#property|property} the corresponding region of the packed + * value is left unmodified. Unused bits are also left unmodified. */ + BitStructure.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + var value = this.word.decode(b, offset); + this._packedSetValue(value); + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if (undefined !== fd.property) { + var fv = src[fd.property]; + if (undefined !== fv) { + fd.encode(fv); + } + } + } + return this.word.encode(this._packedGetValue(), b, offset); + }; + /** Register a new bitfield with a containing bit structure. The + * resulting bitfield is returned. + * + * @param {Number} bits - initializer for {@link BitField#bits|bits}. + * + * @param {string} property - initializer for {@link + * Layout#property|property}. + * + * @return {BitField} */ + BitStructure.prototype.addField = function (bits, property) { + var bf = new BitField(this, bits, property); + this.fields.push(bf); + return bf; + }; + /** As with {@link BitStructure#addField|addField} for single-bit + * fields with `boolean` value representation. + * + * @param {string} property - initializer for {@link + * Layout#property|property}. + * + * @return {Boolean} */ + BitStructure.prototype.addBoolean = function (property) { + // This is my Boolean, not the Javascript one. + // eslint-disable-next-line no-new-wrappers + var bf = new Boolean(this, property); + this.fields.push(bf); + return bf; + }; + /** + * Get access to the bit field for a given property. + * + * @param {String} property - the bit field of interest. + * + * @return {BitField} - the field associated with `property`, or + * undefined if there is no such property. + */ + BitStructure.prototype.fieldFor = function (property) { + if ('string' !== typeof property) { + throw new TypeError('property must be string'); + } + for (var _i = 0, _a = this.fields; _i < _a.length; _i++) { + var fd = _a[_i]; + if (fd.property === property) { + return fd; + } + } + return undefined; + }; + return BitStructure; +}(Layout)); +exports.BitStructure = BitStructure; +/** + * Represent a sequence of bits within a {@link BitStructure}. + * + * All bit field values are represented as unsigned integers. + * + * **NOTE** User code should not invoke this constructor directly. + * Use the container {@link BitStructure#addField|addField} helper + * method. + * + * **NOTE** BitField instances are not instances of {@link Layout} + * since {@link Layout#span|span} measures 8-bit units. + * + * @param {BitStructure} container - initializer for {@link + * BitField#container|container}. + * + * @param {Number} bits - initializer for {@link BitField#bits|bits}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + */ +var BitField = /** @class */ (function () { + function BitField(container, bits, property) { + if (!(container instanceof BitStructure)) { + throw new TypeError('container must be a BitStructure'); + } + if ((!Number.isInteger(bits)) || (0 >= bits)) { + throw new TypeError('bits must be positive integer'); + } + var totalBits = 8 * container.span; + var usedBits = container.fields.reduce(function (sum, fd) { return sum + fd.bits; }, 0); + if ((bits + usedBits) > totalBits) { + throw new Error('bits too long for span remainder (' + + (totalBits - usedBits) + ' of ' + + totalBits + ' remain)'); + } + /** The {@link BitStructure} instance to which this bit field + * belongs. */ + this.container = container; + /** The span of this value in bits. */ + this.bits = bits; + /** A mask of {@link BitField#bits|bits} bits isolating value bits + * that fit within the field. + * + * That is, it masks a value that has not yet been shifted into + * position within its containing packed integer. */ + this.valueMask = (1 << bits) - 1; + if (32 === bits) { // shifted value out of range + this.valueMask = 0xFFFFFFFF; + } + /** The offset of the value within the containing packed unsigned + * integer. The least significant bit of the packed value is at + * offset zero, regardless of bit ordering used. */ + this.start = usedBits; + if (this.container.msb) { + this.start = totalBits - usedBits - bits; + } + /** A mask of {@link BitField#bits|bits} isolating the field value + * within the containing packed unsigned integer. */ + this.wordMask = fixBitwiseResult(this.valueMask << this.start); + /** The property name used when this bitfield is represented in an + * Object. + * + * Intended to be functionally equivalent to {@link + * Layout#property}. + * + * If left undefined the corresponding span of bits will be + * treated as padding: it will not be mutated by {@link + * Layout#encode|encode} nor represented as a property in the + * decoded Object. */ + this.property = property; + } + /** Store a value into the corresponding subsequence of the containing + * bit field. */ + BitField.prototype.decode = function (b, offset) { + var word = this.container._packedGetValue(); + var wordValue = fixBitwiseResult(word & this.wordMask); + var value = wordValue >>> this.start; + return value; + }; + /** Store a value into the corresponding subsequence of the containing + * bit field. + * + * **NOTE** This is not a specialization of {@link + * Layout#encode|Layout.encode} and there is no return value. */ + BitField.prototype.encode = function (value) { + if ((!Number.isInteger(value)) + || (value !== fixBitwiseResult(value & this.valueMask))) { + throw new TypeError(nameWithProperty('BitField.encode', this) + + ' value must be integer not exceeding ' + this.valueMask); + } + var word = this.container._packedGetValue(); + var wordValue = fixBitwiseResult(value << this.start); + this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) + | wordValue); + }; + return BitField; +}()); +exports.BitField = BitField; +/** + * Represent a single bit within a {@link BitStructure} as a + * JavaScript boolean. + * + * **NOTE** User code should not invoke this constructor directly. + * Use the container {@link BitStructure#addBoolean|addBoolean} helper + * method. + * + * @param {BitStructure} container - initializer for {@link + * BitField#container|container}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {BitField} + */ +/* eslint-disable no-extend-native */ +var Boolean = /** @class */ (function (_super) { + __extends(Boolean, _super); + function Boolean(container, property) { + return _super.call(this, container, 1, property) || this; + } + /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}. + * + * @returns {boolean} */ + Boolean.prototype.decode = function (b, offset) { + return !!BitField.prototype.decode.call(this, b, offset); + }; + /** @override */ + Boolean.prototype.encode = function (value) { + if ('boolean' === typeof value) { + // BitField requires integer values + value = +value; + } + return BitField.prototype.encode.call(this, value); + }; + return Boolean; +}(BitField)); +exports.Boolean = Boolean; +/* eslint-enable no-extend-native */ +/** + * Contain a fixed-length block of arbitrary data, represented as a + * Uint8Array. + * + * *Factory*: {@link module:Layout.blob|blob} + * + * @param {(Number|ExternalLayout)} length - initializes {@link + * Blob#length|length}. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Blob = /** @class */ (function (_super) { + __extends(Blob, _super); + function Blob(length, property) { + var _this = this; + if (!(((length instanceof ExternalLayout) && length.isCount()) + || (Number.isInteger(length) && (0 <= length)))) { + throw new TypeError('length must be positive integer ' + + 'or an unsigned integer ExternalLayout'); + } + var span = -1; + if (!(length instanceof ExternalLayout)) { + span = length; + } + _this = _super.call(this, span, property) || this; + /** The number of bytes in the blob. + * + * This may be a non-negative integer, or an instance of {@link + * ExternalLayout} that satisfies {@link + * ExternalLayout#isCount|isCount()}. */ + _this.length = length; + return _this; + } + /** @override */ + Blob.prototype.getSpan = function (b, offset) { + var span = this.span; + if (0 > span) { + span = this.length.decode(b, offset); + } + return span; + }; + /** @override */ + Blob.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var span = this.span; + if (0 > span) { + span = this.length.decode(b, offset); + } + return uint8ArrayToBuffer(b).slice(offset, offset + span); + }; + /** Implement {@link Layout#encode|encode} for {@link Blob}. + * + * **NOTE** If {@link Layout#count|count} is an instance of {@link + * ExternalLayout} then the length of `src` will be encoded as the + * count after `src` is encoded. */ + Blob.prototype.encode = function (src, b, offset) { + var span = this.length; + if (this.length instanceof ExternalLayout) { + span = src.length; + } + if (!(src instanceof Uint8Array && span === src.length)) { + throw new TypeError(nameWithProperty('Blob.encode', this) + + ' requires (length ' + span + ') Uint8Array as src'); + } + if ((offset + span) > b.length) { + throw new RangeError('encoding overruns Uint8Array'); + } + var srcBuffer = uint8ArrayToBuffer(src); + uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex'); + if (this.length instanceof ExternalLayout) { + this.length.encode(span, b, offset); + } + return span; + }; + return Blob; +}(Layout)); +exports.Blob = Blob; +/** + * Contain a `NUL`-terminated UTF8 string. + * + * *Factory*: {@link module:Layout.cstr|cstr} + * + * **NOTE** Any UTF8 string that incorporates a zero-valued byte will + * not be correctly decoded by this layout. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var CString = /** @class */ (function (_super) { + __extends(CString, _super); + function CString(property) { + return _super.call(this, -1, property) || this; + } + /** @override */ + CString.prototype.getSpan = function (b, offset) { + checkUint8Array(b); + if (undefined === offset) { + offset = 0; + } + var idx = offset; + while ((idx < b.length) && (0 !== b[idx])) { + idx += 1; + } + return 1 + idx - offset; + }; + /** @override */ + CString.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var span = this.getSpan(b, offset); + return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8'); + }; + /** @override */ + CString.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + /* Must force this to a string, lest it be a number and the + * "utf8-encoding" below actually allocate a buffer of length + * src */ + if ('string' !== typeof src) { + src = src.toString(); + } + var srcb = buffer_1.Buffer.from(src, 'utf8'); + var span = srcb.length; + if ((offset + span) > b.length) { + throw new RangeError('encoding overruns Buffer'); + } + var buffer = uint8ArrayToBuffer(b); + srcb.copy(buffer, offset); + buffer[offset + span] = 0; + return span + 1; + }; + return CString; +}(Layout)); +exports.CString = CString; +/** + * Contain a UTF8 string with implicit length. + * + * *Factory*: {@link module:Layout.utf8|utf8} + * + * **NOTE** Because the length is implicit in the size of the buffer + * this layout should be used only in isolation, or in a situation + * where the length can be expressed by operating on a slice of the + * containing buffer. + * + * @param {Number} [maxSpan] - the maximum length allowed for encoded + * string content. If not provided there is no bound on the allowed + * content. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var UTF8 = /** @class */ (function (_super) { + __extends(UTF8, _super); + function UTF8(maxSpan, property) { + var _this = this; + if (('string' === typeof maxSpan) && (undefined === property)) { + property = maxSpan; + maxSpan = undefined; + } + if (undefined === maxSpan) { + maxSpan = -1; + } + else if (!Number.isInteger(maxSpan)) { + throw new TypeError('maxSpan must be an integer'); + } + _this = _super.call(this, -1, property) || this; + /** The maximum span of the layout in bytes. + * + * Positive values are generally expected. Zero is abnormal. + * Attempts to encode or decode a value that exceeds this length + * will throw a `RangeError`. + * + * A negative value indicates that there is no bound on the length + * of the content. */ + _this.maxSpan = maxSpan; + return _this; + } + /** @override */ + UTF8.prototype.getSpan = function (b, offset) { + checkUint8Array(b); + if (undefined === offset) { + offset = 0; + } + return b.length - offset; + }; + /** @override */ + UTF8.prototype.decode = function (b, offset) { + if (undefined === offset) { + offset = 0; + } + var span = this.getSpan(b, offset); + if ((0 <= this.maxSpan) + && (this.maxSpan < span)) { + throw new RangeError('text length exceeds maxSpan'); + } + return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8'); + }; + /** @override */ + UTF8.prototype.encode = function (src, b, offset) { + if (undefined === offset) { + offset = 0; + } + /* Must force this to a string, lest it be a number and the + * "utf8-encoding" below actually allocate a buffer of length + * src */ + if ('string' !== typeof src) { + src = src.toString(); + } + var srcb = buffer_1.Buffer.from(src, 'utf8'); + var span = srcb.length; + if ((0 <= this.maxSpan) + && (this.maxSpan < span)) { + throw new RangeError('text length exceeds maxSpan'); + } + if ((offset + span) > b.length) { + throw new RangeError('encoding overruns Buffer'); + } + srcb.copy(uint8ArrayToBuffer(b), offset); + return span; + }; + return UTF8; +}(Layout)); +exports.UTF8 = UTF8; +/** + * Contain a constant value. + * + * This layout may be used in cases where a JavaScript value can be + * inferred without an expression in the binary encoding. An example + * would be a {@link VariantLayout|variant layout} where the content + * is implied by the union {@link Union#discriminator|discriminator}. + * + * @param {Object|Number|String} value - initializer for {@link + * Constant#value|value}. If the value is an object (or array) and + * the application intends the object to remain unchanged regardless + * of what is done to values decoded by this layout, the value should + * be frozen prior passing it to this constructor. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +var Constant = /** @class */ (function (_super) { + __extends(Constant, _super); + function Constant(value, property) { + var _this = _super.call(this, 0, property) || this; + /** The value produced by this constant when the layout is {@link + * Constant#decode|decoded}. + * + * Any JavaScript value including `null` and `undefined` is + * permitted. + * + * **WARNING** If `value` passed in the constructor was not + * frozen, it is possible for users of decoded values to change + * the content of the value. */ + _this.value = value; + return _this; + } + /** @override */ + Constant.prototype.decode = function (b, offset) { + return this.value; + }; + /** @override */ + Constant.prototype.encode = function (src, b, offset) { + /* Constants take no space */ + return 0; + }; + return Constant; +}(Layout)); +exports.Constant = Constant; +/** Factory for {@link GreedyCount}. */ +exports.greedy = (function (elementSpan, property) { return new GreedyCount(elementSpan, property); }); +/** Factory for {@link OffsetLayout}. */ +exports.offset = (function (layout, offset, property) { return new OffsetLayout(layout, offset, property); }); +/** Factory for {@link UInt|unsigned int layouts} spanning one + * byte. */ +exports.u8 = (function (property) { return new UInt(1, property); }); +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning two bytes. */ +exports.u16 = (function (property) { return new UInt(2, property); }); +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning three bytes. */ +exports.u24 = (function (property) { return new UInt(3, property); }); +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning four bytes. */ +exports.u32 = (function (property) { return new UInt(4, property); }); +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning five bytes. */ +exports.u40 = (function (property) { return new UInt(5, property); }); +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning six bytes. */ +exports.u48 = (function (property) { return new UInt(6, property); }); +/** Factory for {@link NearUInt64|little-endian unsigned int + * layouts} interpreted as Numbers. */ +exports.nu64 = (function (property) { return new NearUInt64(property); }); +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning two bytes. */ +exports.u16be = (function (property) { return new UIntBE(2, property); }); +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning three bytes. */ +exports.u24be = (function (property) { return new UIntBE(3, property); }); +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning four bytes. */ +exports.u32be = (function (property) { return new UIntBE(4, property); }); +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning five bytes. */ +exports.u40be = (function (property) { return new UIntBE(5, property); }); +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning six bytes. */ +exports.u48be = (function (property) { return new UIntBE(6, property); }); +/** Factory for {@link NearUInt64BE|big-endian unsigned int + * layouts} interpreted as Numbers. */ +exports.nu64be = (function (property) { return new NearUInt64BE(property); }); +/** Factory for {@link Int|signed int layouts} spanning one + * byte. */ +exports.s8 = (function (property) { return new Int(1, property); }); +/** Factory for {@link Int|little-endian signed int layouts} + * spanning two bytes. */ +exports.s16 = (function (property) { return new Int(2, property); }); +/** Factory for {@link Int|little-endian signed int layouts} + * spanning three bytes. */ +exports.s24 = (function (property) { return new Int(3, property); }); +/** Factory for {@link Int|little-endian signed int layouts} + * spanning four bytes. */ +exports.s32 = (function (property) { return new Int(4, property); }); +/** Factory for {@link Int|little-endian signed int layouts} + * spanning five bytes. */ +exports.s40 = (function (property) { return new Int(5, property); }); +/** Factory for {@link Int|little-endian signed int layouts} + * spanning six bytes. */ +exports.s48 = (function (property) { return new Int(6, property); }); +/** Factory for {@link NearInt64|little-endian signed int layouts} + * interpreted as Numbers. */ +exports.ns64 = (function (property) { return new NearInt64(property); }); +/** Factory for {@link Int|big-endian signed int layouts} + * spanning two bytes. */ +exports.s16be = (function (property) { return new IntBE(2, property); }); +/** Factory for {@link Int|big-endian signed int layouts} + * spanning three bytes. */ +exports.s24be = (function (property) { return new IntBE(3, property); }); +/** Factory for {@link Int|big-endian signed int layouts} + * spanning four bytes. */ +exports.s32be = (function (property) { return new IntBE(4, property); }); +/** Factory for {@link Int|big-endian signed int layouts} + * spanning five bytes. */ +exports.s40be = (function (property) { return new IntBE(5, property); }); +/** Factory for {@link Int|big-endian signed int layouts} + * spanning six bytes. */ +exports.s48be = (function (property) { return new IntBE(6, property); }); +/** Factory for {@link NearInt64BE|big-endian signed int layouts} + * interpreted as Numbers. */ +exports.ns64be = (function (property) { return new NearInt64BE(property); }); +/** Factory for {@link Float|little-endian 32-bit floating point} values. */ +exports.f32 = (function (property) { return new Float(property); }); +/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */ +exports.f32be = (function (property) { return new FloatBE(property); }); +/** Factory for {@link Double|little-endian 64-bit floating point} values. */ +exports.f64 = (function (property) { return new Double(property); }); +/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */ +exports.f64be = (function (property) { return new DoubleBE(property); }); +/** Factory for {@link Structure} values. */ +exports.struct = (function (fields, property, decodePrefixes) { + return new Structure(fields, property, decodePrefixes); +}); +/** Factory for {@link BitStructure} values. */ +exports.bits = (function (word, msb, property) { return new BitStructure(word, msb, property); }); +/** Factory for {@link Sequence} values. */ +exports.seq = (function (elementLayout, count, property) { + return new Sequence(elementLayout, count, property); +}); +/** Factory for {@link Union} values. */ +exports.union = (function (discr, defaultLayout, property) { + return new Union(discr, defaultLayout, property); +}); +/** Factory for {@link UnionLayoutDiscriminator} values. */ +exports.unionLayoutDiscriminator = (function (layout, property) { return new UnionLayoutDiscriminator(layout, property); }); +/** Factory for {@link Blob} values. */ +exports.blob = (function (length, property) { return new Blob(length, property); }); +/** Factory for {@link CString} values. */ +exports.cstr = (function (property) { return new CString(property); }); +/** Factory for {@link UTF8} values. */ +exports.utf8 = (function (maxSpan, property) { return new UTF8(maxSpan, property); }); +/** Factory for {@link Constant} values. */ +exports.constant = (function (value, property) { return new Constant(value, property); }); +//# sourceMappingURL=Layout.js.map \ No newline at end of file diff --git a/tests/node_modules/@solana/buffer-layout/lib/Layout.js.map b/tests/node_modules/@solana/buffer-layout/lib/Layout.js.map new file mode 100644 index 0000000..71c09b2 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/lib/Layout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2GG;AAEH,YAAY,CAAC;;;;;;;;;;;;;;;;;;;AAEb,iCAA8B;AAS9B;;aAEa;AACb,SAAgB,eAAe,CAAC,CAAa;IAC3C,IAAI,CAAC,CAAC,CAAC,YAAY,UAAU,CAAC,EAAE;QAC9B,MAAM,IAAI,SAAS,CAAC,wBAAwB,CAAC,CAAC;KAC/C;AACH,CAAC;AAJD,0CAIC;AAED;;aAEa;AACb,SAAgB,kBAAkB,CAAC,CAAa;IAC9C,eAAe,CAAC,CAAC,CAAC,CAAC;IACnB,OAAO,eAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAA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,CAAC,EAArB,CAAqB,CAAC,CAAC;AAEnE,uCAAuC;AAC1B,QAAA,IAAI,GAAG,CAAC,UAAC,OAAe,EAAE,QAAiB,IAAK,OAAA,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAA3B,CAA2B,CAAC,CAAC;AAE1F,2CAA2C;AAC9B,QAAA,QAAQ,GAAG,CAAC,UAAC,KAAU,EAAE,QAAiB,IAAK,OAAA,IAAI,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,EAA7B,CAA6B,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/node_modules/@solana/buffer-layout/node_modules/buffer/AUTHORS.md b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/AUTHORS.md new file mode 100644 index 0000000..468aa19 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/AUTHORS.md @@ -0,0 +1,73 @@ +# Authors + +#### Ordered by first contribution. + +- Romain Beauxis (toots@rastageeks.org) +- Tobias Koppers (tobias.koppers@googlemail.com) +- Janus (ysangkok@gmail.com) +- Rainer Dreyer (rdrey1@gmail.com) +- Tõnis Tiigi (tonistiigi@gmail.com) +- James Halliday (mail@substack.net) +- Michael Williamson (mike@zwobble.org) +- elliottcable (github@elliottcable.name) +- rafael (rvalle@livelens.net) +- Andrew Kelley (superjoe30@gmail.com) +- Andreas Madsen (amwebdk@gmail.com) +- Mike Brevoort (mike.brevoort@pearson.com) +- Brian White (mscdex@mscdex.net) +- Feross Aboukhadijeh (feross@feross.org) +- Ruben Verborgh (ruben@verborgh.org) +- eliang (eliang.cs@gmail.com) +- Jesse Tane (jesse.tane@gmail.com) +- Alfonso Boza (alfonso@cloud.com) +- Mathias Buus (mathiasbuus@gmail.com) +- Devon Govett (devongovett@gmail.com) +- Daniel Cousens (github@dcousens.com) +- Joseph Dykstra (josephdykstra@gmail.com) +- Parsha Pourkhomami (parshap+git@gmail.com) +- Damjan Košir (damjan.kosir@gmail.com) +- daverayment (dave.rayment@gmail.com) +- kawanet (u-suke@kawa.net) +- Linus Unnebäck (linus@folkdatorn.se) +- Nolan Lawson (nolan.lawson@gmail.com) +- Calvin Metcalf (calvin.metcalf@gmail.com) +- Koki Takahashi (hakatasiloving@gmail.com) +- Guy Bedford (guybedford@gmail.com) +- Jan Schär (jscissr@gmail.com) +- RaulTsc (tomescu.raul@gmail.com) +- Matthieu Monsch (monsch@alum.mit.edu) +- Dan Ehrenberg (littledan@chromium.org) +- Kirill Fomichev (fanatid@ya.ru) +- Yusuke Kawasaki (u-suke@kawa.net) +- DC (dcposch@dcpos.ch) +- John-David Dalton (john.david.dalton@gmail.com) +- adventure-yunfei (adventure030@gmail.com) +- Emil Bay (github@tixz.dk) +- Sam Sudar (sudar.sam@gmail.com) +- Volker Mische (volker.mische@gmail.com) +- David Walton (support@geekstocks.com) +- Сковорода Никита Андреевич (chalkerx@gmail.com) +- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) +- ukstv (sergey.ukustov@machinomy.com) +- Renée Kooi (renee@kooi.me) +- ranbochen (ranbochen@qq.com) +- Vladimir Borovik (bobahbdb@gmail.com) +- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) +- kumavis (aaron@kumavis.me) +- Sergey Ukustov (sergey.ukustov@machinomy.com) +- Fei Liu (liu.feiwood@gmail.com) +- Blaine Bublitz (blaine.bublitz@gmail.com) +- clement (clement@seald.io) +- Koushik Dutta (koushd@gmail.com) +- Jordan Harband (ljharb@gmail.com) +- Niklas Mischkulnig (mischnic@users.noreply.github.com) +- Nikolai Vavilov (vvnicholas@gmail.com) +- Fedor Nezhivoi (gyzerok@users.noreply.github.com) +- shuse2 (shus.toda@gmail.com) +- Peter Newman (peternewman@users.noreply.github.com) +- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com) +- jkkang (jkkang@smartauth.kr) +- Deklan Webster (deklanw@gmail.com) +- Martin Heidegger (martin.heidegger@gmail.com) + +#### Generated by bin/update-authors.sh. diff --git a/tests/node_modules/@solana/buffer-layout/node_modules/buffer/LICENSE b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/LICENSE new file mode 100644 index 0000000..d6bf75d --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh, and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/node_modules/@solana/buffer-layout/node_modules/buffer/README.md b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/README.md new file mode 100644 index 0000000..451e235 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/README.md @@ -0,0 +1,410 @@ +# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg +[travis-url]: https://travis-ci.org/feross/buffer +[npm-image]: https://img.shields.io/npm/v/buffer.svg +[npm-url]: https://npmjs.org/package/buffer +[downloads-image]: https://img.shields.io/npm/dm/buffer.svg +[downloads-url]: https://npmjs.org/package/buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### The buffer module from [node.js](https://nodejs.org/), for the browser. + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg +[saucelabs-url]: https://saucelabs.com/u/buffer + +With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. + +The goal is to provide an API that is 100% identical to +[node's Buffer API](https://nodejs.org/api/buffer.html). Read the +[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, +instance methods, and class methods that are supported. + +## features + +- Manipulate binary data like a boss, in all browsers! +- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) +- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments) +- Excellent browser support (Chrome, Firefox, Edge, Safari 11+, iOS 11+, Android, etc.) +- Preserves Node API exactly, with one minor difference (see below) +- Square-bracket `buf[4]` notation works! +- Does not modify any browser prototypes or put anything on `window` +- Comprehensive test suite (including all buffer tests from node.js core) + +## install + +To use this module directly (without browserify), install it: + +```bash +npm install buffer +``` + +This module was previously called **native-buffer-browserify**, but please use **buffer** +from now on. + +If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer). + +## usage + +The module's API is identical to node's `Buffer` API. Read the +[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, +instance methods, and class methods that are supported. + +As mentioned above, `require('buffer')` or use the `Buffer` global with +[browserify](http://browserify.org) and this module will automatically be included +in your bundle. Almost any npm module will work in the browser, even if it assumes that +the node `Buffer` API will be available. + +To depend on this module explicitly (without browserify), require it like this: + +```js +var Buffer = require('buffer/').Buffer // note: the trailing slash is important! +``` + +To require this module explicitly, use `require('buffer/')` which tells the node.js module +lookup algorithm (also used by browserify) to use the **npm module** named `buffer` +instead of the **node.js core** module named `buffer`! + + +## how does it work? + +The Buffer constructor returns instances of `Uint8Array` that have their prototype +changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, +so the returned instances will have all the node `Buffer` methods and the +`Uint8Array` methods. Square bracket notation works as expected -- it returns a +single octet. + +The `Uint8Array` prototype remains unmodified. + + +## tracking the latest node api + +This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer +API is considered **stable** in the +[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), +so it is unlikely that there will ever be breaking changes. +Nonetheless, when/if the Buffer API changes in node, this module's API will change +accordingly. + +## related packages + +- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer +- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer +- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package + +## conversion packages + +### convert typed array to buffer + +Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast. + +### convert buffer to typed array + +`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`. + +### convert blob to buffer + +Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`. + +### convert buffer to blob + +To convert a `Buffer` to a `Blob`, use the `Blob` constructor: + +```js +var blob = new Blob([ buffer ]) +``` + +Optionally, specify a mimetype: + +```js +var blob = new Blob([ buffer ], { type: 'text/html' }) +``` + +### convert arraybuffer to buffer + +To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast. + +```js +var buffer = Buffer.from(arrayBuffer) +``` + +### convert buffer to arraybuffer + +To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects): + +```js +var arrayBuffer = buffer.buffer.slice( + buffer.byteOffset, buffer.byteOffset + buffer.byteLength +) +``` + +Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module. + +## performance + +See perf tests in `/perf`. + +`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a +sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will +always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, +which is included to compare against. + +NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README. + +### Chrome 38 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | +| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | +| | | | | +| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | +| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | +| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | +| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | +| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | +| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | +| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | +| | | | | +| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | +| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | +| | | | | +| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | +| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | +| | | | | +| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | +| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | +| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | + + +### Firefox 33 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | +| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | +| | | | | +| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | +| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | +| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | +| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | +| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | +| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | +| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | +| | | | | +| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | +| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | +| | | | | +| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | +| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | +| | | | | +| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | +| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | +| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | + +### Safari 8 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | +| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | +| | | | | +| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | +| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | +| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | +| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | +| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | +| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | +| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | +| | | | | +| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | +| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | +| | | | | +| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | +| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | +| | | | | +| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | +| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | +| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | + + +### Node 0.11.14 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | +| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | +| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | +| | | | | +| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | +| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | +| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | +| | | | | +| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | +| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | +| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | +| | | | | +| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | +| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | +| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | +| | | | | +| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | +| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | +| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | +| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | +| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | +| | | | | +| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | +| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | +| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | +| | | | | +| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | +| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | +| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | +| | | | | +| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | +| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | +| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | +| | | | | +| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | +| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | +| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | +| | | | | +| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | +| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | +| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | + +### iojs 1.8.1 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | +| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | +| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | +| | | | | +| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | +| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | +| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | +| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | +| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | +| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | +| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | +| | | | | +| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | +| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | +| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | +| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | +| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | +| | | | | +| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | +| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | +| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | +| | | | | +| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | +| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | +| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | +| | | | | +| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | +| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | +| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | +| | | | | +| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | +| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | +| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | +| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | +| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | +| | | | | + +## Testing the project + +First, install the project: + + npm install + +Then, to run tests in Node.js, run: + + npm run test-node + +To test locally in a browser, you can run: + + npm run test-browser-es5-local # For ES5 browsers that don't support ES6 + npm run test-browser-es6-local # For ES6 compliant browsers + +This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap). + +To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: + + npm test + +This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files. + +## JavaScript Standard Style + +This module uses [JavaScript Standard Style](https://github.com/feross/standard). + +[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +To test that the code conforms to the style, `npm install` and run: + + ./node_modules/.bin/standard + +## credit + +This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). + +## Security Policies and Procedures + +The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues. + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.d.ts b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.d.ts new file mode 100644 index 0000000..07096a2 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.d.ts @@ -0,0 +1,194 @@ +export class Buffer extends Uint8Array { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readBigUInt64LE(offset: number): BigInt; + readBigUInt64BE(offset: number): BigInt; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readBigInt64LE(offset: number): BigInt; + readBigInt64BE(offset: number): BigInt; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeBigUInt64LE(value: number, offset: number): BigInt; + writeBigUInt64BE(value: number, offset: number): BigInt; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeBigInt64LE(value: number, offset: number): BigInt; + writeBigInt64BE(value: number, offset: number): BigInt; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer | Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Uint8Array[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Uint8Array, buf2: Uint8Array): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initializing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; +} diff --git a/tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.js b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.js new file mode 100644 index 0000000..7a0e9c2 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/index.js @@ -0,0 +1,2106 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +const base64 = require('base64-js') +const ieee754 = require('ieee754') +const customInspectSymbol = + (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation + ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation + : null + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +const K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + const arr = new Uint8Array(1) + const proto = { foo: function () { return 42 } } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + const buf = new Uint8Array(length) + Object.setPrototypeOf(buf, Buffer.prototype) + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayView(value) + } + + if (value == null) { + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof SharedArrayBuffer !== 'undefined' && + (isInstance(value, SharedArrayBuffer) || + (value && isInstance(value.buffer, SharedArrayBuffer)))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + const valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + const b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) +Object.setPrototypeOf(Buffer, Uint8Array) + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpreted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + const length = byteLength(string, encoding) | 0 + let buf = createBuffer(length) + + const actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + const length = array.length < 0 ? 0 : checked(array.length) | 0 + const buf = createBuffer(length) + for (let i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayView (arrayView) { + if (isInstance(arrayView, Uint8Array)) { + const copy = new Uint8Array(arrayView) + return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) + } + return fromArrayLike(arrayView) +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + let buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(buf, Buffer.prototype) + + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + const len = checked(obj.length) | 0 + const buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + let x = a.length + let y = b.length + + for (let i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + let i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + const buffer = Buffer.allocUnsafe(length) + let pos = 0 + for (i = 0; i < list.length; ++i) { + let buf = list[i] + if (isInstance(buf, Uint8Array)) { + if (pos + buf.length > buffer.length) { + if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) + buf.copy(buffer, pos) + } else { + Uint8Array.prototype.set.call( + buffer, + buf, + pos + ) + } + } else if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } else { + buf.copy(buffer, pos) + } + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + const len = string.length + const mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + let loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + let loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coercion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + const i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + const len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (let i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + const len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (let i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + const len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (let i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + const length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + let str = '' + const max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} +if (customInspectSymbol) { + Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + let x = thisEnd - thisStart + let y = end - start + const len = Math.min(x, y) + + const thisCopy = this.slice(thisStart, thisEnd) + const targetCopy = target.slice(start, end) + + for (let i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + let indexSize = 1 + let arrLength = arr.length + let valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + let i + if (dir) { + let foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + let found = true + for (let j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + const remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + const strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + let i + for (i = 0; i < length; ++i) { + const parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + const remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + let loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + case 'latin1': + case 'binary': + return asciiWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + const res = [] + + let i = start + while (i < end) { + const firstByte = buf[i] + let codePoint = null + let bytesPerSequence = (firstByte > 0xEF) + ? 4 + : (firstByte > 0xDF) + ? 3 + : (firstByte > 0xBF) + ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +const MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + const len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + let res = '' + let i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + const len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + let out = '' + for (let i = start; i < end; ++i) { + out += hexSliceLookupTable[buf[i]] + } + return out +} + +function utf16leSlice (buf, start, end) { + const bytes = buf.slice(start, end) + let res = '' + // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) + for (let i = 0; i < bytes.length - 1; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + const len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + const newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(newBuf, Buffer.prototype) + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUintLE = +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUintBE = +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + let val = this[offset + --byteLength] + let mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUint8 = +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUint16LE = +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUint16BE = +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUint32LE = +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUint32BE = +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const lo = first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24 + + const hi = this[++offset] + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + last * 2 ** 24 + + return BigInt(lo) + (BigInt(hi) << BigInt(32)) +}) + +Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const hi = first * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + + const lo = this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last + + return (BigInt(hi) << BigInt(32)) + BigInt(lo) +}) + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let i = byteLength + let mul = 1 + let val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const val = this[offset + 4] + + this[offset + 5] * 2 ** 8 + + this[offset + 6] * 2 ** 16 + + (last << 24) // Overflow + + return (BigInt(val) << BigInt(32)) + + BigInt(first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24) +}) + +Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const val = (first << 24) + // Overflow + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + + return (BigInt(val) << BigInt(32)) + + BigInt(this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last) +}) + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUintLE = +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + let mul = 1 + let i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUintBE = +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + let i = byteLength - 1 + let mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUint8 = +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUint16LE = +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUint16BE = +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUint32LE = +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUint32BE = +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function wrtBigUInt64LE (buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + + let lo = Number(value & BigInt(0xffffffff)) + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + return offset +} + +function wrtBigUInt64BE (buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + + let lo = Number(value & BigInt(0xffffffff)) + buf[offset + 7] = lo + lo = lo >> 8 + buf[offset + 6] = lo + lo = lo >> 8 + buf[offset + 5] = lo + lo = lo >> 8 + buf[offset + 4] = lo + let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) + buf[offset + 3] = hi + hi = hi >> 8 + buf[offset + 2] = hi + hi = hi >> 8 + buf[offset + 1] = hi + hi = hi >> 8 + buf[offset] = hi + return offset + 8 +} + +Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) +}) + +Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) +}) + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + let i = 0 + let mul = 1 + let sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + let i = byteLength - 1 + let mul = 1 + let sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) +}) + +Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) +}) + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + const len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + const code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } else if (typeof val === 'boolean') { + val = Number(val) + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + let i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + const bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + const len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// CUSTOM ERRORS +// ============= + +// Simplified versions from Node, changed for Buffer-only usage +const errors = {} +function E (sym, getMessage, Base) { + errors[sym] = class NodeError extends Base { + constructor () { + super() + + Object.defineProperty(this, 'message', { + value: getMessage.apply(this, arguments), + writable: true, + configurable: true + }) + + // Add the error code to the name to include it in the stack trace. + this.name = `${this.name} [${sym}]` + // Access the stack to generate the error message including the error code + // from the name. + this.stack // eslint-disable-line no-unused-expressions + // Reset the name to the actual name. + delete this.name + } + + get code () { + return sym + } + + set code (value) { + Object.defineProperty(this, 'code', { + configurable: true, + enumerable: true, + value, + writable: true + }) + } + + toString () { + return `${this.name} [${sym}]: ${this.message}` + } + } +} + +E('ERR_BUFFER_OUT_OF_BOUNDS', + function (name) { + if (name) { + return `${name} is outside of buffer bounds` + } + + return 'Attempt to access memory outside buffer bounds' + }, RangeError) +E('ERR_INVALID_ARG_TYPE', + function (name, actual) { + return `The "${name}" argument must be of type number. Received type ${typeof actual}` + }, TypeError) +E('ERR_OUT_OF_RANGE', + function (str, range, input) { + let msg = `The value of "${str}" is out of range.` + let received = input + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)) + } else if (typeof input === 'bigint') { + received = String(input) + if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) { + received = addNumericalSeparator(received) + } + received += 'n' + } + msg += ` It must be ${range}. Received ${received}` + return msg + }, RangeError) + +function addNumericalSeparator (val) { + let res = '' + let i = val.length + const start = val[0] === '-' ? 1 : 0 + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}` + } + return `${val.slice(0, i)}${res}` +} + +// CHECK FUNCTIONS +// =============== + +function checkBounds (buf, offset, byteLength) { + validateNumber(offset, 'offset') + if (buf[offset] === undefined || buf[offset + byteLength] === undefined) { + boundsError(offset, buf.length - (byteLength + 1)) + } +} + +function checkIntBI (value, min, max, buf, offset, byteLength) { + if (value > max || value < min) { + const n = typeof min === 'bigint' ? 'n' : '' + let range + if (byteLength > 3) { + if (min === 0 || min === BigInt(0)) { + range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}` + } else { + range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + + `${(byteLength + 1) * 8 - 1}${n}` + } + } else { + range = `>= ${min}${n} and <= ${max}${n}` + } + throw new errors.ERR_OUT_OF_RANGE('value', range, value) + } + checkBounds(buf, offset, byteLength) +} + +function validateNumber (value, name) { + if (typeof value !== 'number') { + throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value) + } +} + +function boundsError (value, length, type) { + if (Math.floor(value) !== value) { + validateNumber(value, type) + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value) + } + + if (length < 0) { + throw new errors.ERR_BUFFER_OUT_OF_BOUNDS() + } + + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', + `>= ${type ? 1 : 0} and <= ${length}`, + value) +} + +// HELPER FUNCTIONS +// ================ + +const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function utf8ToBytes (string, units) { + units = units || Infinity + let codePoint + const length = string.length + let leadSurrogate = null + const bytes = [] + + for (let i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + let c, hi, lo + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + let i + for (i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +// Create lookup table for `toString('hex')` +// See: https://github.com/feross/buffer/issues/219 +const hexSliceLookupTable = (function () { + const alphabet = '0123456789abcdef' + const table = new Array(256) + for (let i = 0; i < 16; ++i) { + const i16 = i * 16 + for (let j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j] + } + } + return table +})() + +// Return not function with Error if BigInt not supported +function defineBigIntMethod (fn) { + return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn +} + +function BufferBigIntNotDefined () { + throw new Error('BigInt not supported') +} diff --git a/tests/node_modules/@solana/buffer-layout/node_modules/buffer/package.json b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/package.json new file mode 100644 index 0000000..ca1ad9a --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/node_modules/buffer/package.json @@ -0,0 +1,93 @@ +{ + "name": "buffer", + "description": "Node.js Buffer API, for the browser", + "version": "6.0.3", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/buffer/issues" + }, + "contributors": [ + "Romain Beauxis ", + "James Halliday " + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + }, + "devDependencies": { + "airtap": "^3.0.0", + "benchmark": "^2.1.4", + "browserify": "^17.0.0", + "concat-stream": "^2.0.0", + "hyperquest": "^2.1.3", + "is-buffer": "^2.0.5", + "is-nan": "^1.3.0", + "split": "^1.0.1", + "standard": "*", + "tape": "^5.0.1", + "through2": "^4.0.2", + "uglify-js": "^3.11.5" + }, + "homepage": "https://github.com/feross/buffer", + "jspm": { + "map": { + "./index.js": { + "node": "@node/buffer" + } + } + }, + "keywords": [ + "arraybuffer", + "browser", + "browserify", + "buffer", + "compatible", + "dataview", + "uint8array" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/buffer.git" + }, + "scripts": { + "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", + "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", + "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", + "test": "standard && node ./bin/test.js", + "test-browser-old": "airtap -- test/*.js", + "test-browser-old-local": "airtap --local -- test/*.js", + "test-browser-new": "airtap -- test/*.js test/node/*.js", + "test-browser-new-local": "airtap --local -- test/*.js test/node/*.js", + "test-node": "tape test/*.js test/node/*.js", + "update-authors": "./bin/update-authors.sh" + }, + "standard": { + "ignore": [ + "test/node/**/*.js", + "test/common.js", + "test/_polyfill.js", + "perf/**/*.js" + ] + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/tests/node_modules/@solana/buffer-layout/package.json b/tests/node_modules/@solana/buffer-layout/package.json new file mode 100644 index 0000000..25118b1 --- /dev/null +++ b/tests/node_modules/@solana/buffer-layout/package.json @@ -0,0 +1,50 @@ +{ + "name": "@solana/buffer-layout", + "version": "3.0.0", + "description": "Translation between JavaScript values and Buffers", + "keywords": [ + "Buffer", + "struct", + "endian", + "pack data" + ], + "homepage": "https://github.com/pabigot/buffer-layout", + "bugs": "https://github.com/pabigot/buffer-layout/issues", + "repository": { + "type": "git", + "url": "https://github.com/pabigot/buffer-layout.git" + }, + "license": "MIT", + "author": "Peter A. Bigot ", + "main": "./lib/Layout.js", + "types": "./lib/Layout.d.ts", + "files": [ + "/lib" + ], + "dependencies": { + "buffer": "~6.0.3" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^4.28.2", + "@typescript-eslint/parser": "^4.28.2", + "coveralls": "^3.0.0", + "eslint": "~7.30.0", + "istanbul": "~0.4.5", + "jsdoc": "~3.5.5", + "lodash": "~4.17.5", + "mocha": "~5.0.4", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=5.10" + }, + "scripts": { + "build": "tsc", + "coverage": "npm run build && istanbul cover _mocha -- -u tdd", + "coveralls": "npm run build && istanbul cover _mocha --report lcovonly -- -u tdd && cat ./coverage/lcov.info | coveralls", + "eslint": "eslint src/ --ext .ts", + "jsdoc": "jsdoc -c jsdoc/conf.json", + "prepare": "npm run build", + "test": "npm run build && mocha -u tdd" + } +} diff --git a/tests/node_modules/@solana/web3.js/LICENSE b/tests/node_modules/@solana/web3.js/LICENSE new file mode 100644 index 0000000..adfd203 --- /dev/null +++ b/tests/node_modules/@solana/web3.js/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2018 Solana Labs, Inc + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/@solana/web3.js/README.md b/tests/node_modules/@solana/web3.js/README.md new file mode 100644 index 0000000..fef94a2 --- /dev/null +++ b/tests/node_modules/@solana/web3.js/README.md @@ -0,0 +1,157 @@ +[![Build status][travis-image]][travis-url] +[![codecov][codecov-image]][codecov-url] +
+[![npm][npm-image]][npm-url] +[![npm-downloads][npm-downloads-image]][npm-url] +
+[![semantic-release][semantic-release-image]][semantic-release-url] +[![code-style-prettier][code-style-prettier-image]][code-style-prettier-url] + +[travis-image]: https://api.travis-ci.org/solana-labs/solana-web3.js.svg?branch=master +[travis-url]: https://travis-ci.org/solana-labs/solana-web3.js +[codecov-image]: https://codecov.io/gh/solana-labs/solana-web3.js/branch/master/graph/badge.svg +[codecov-url]: https://codecov.io/gh/solana-labs/solana-web3.js +[npm-image]: https://img.shields.io/npm/v/@solana/web3.js.svg?style=flat +[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/web3.js.svg?style=flat +[npm-url]: https://www.npmjs.com/package/@solana/web3.js +[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg +[semantic-release-url]: https://github.com/semantic-release/semantic-release +[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square +[code-style-prettier-url]: https://github.com/prettier/prettier + +# Solana JavaScript API + +This is the Solana Javascript API built on the Solana [JSON RPC API](https://docs.solana.com/apps/jsonrpc-api) + +[Latest API Documentation](https://solana-labs.github.io/solana-web3.js/) + +## Installation + +### Yarn + +``` +$ yarn add @solana/web3.js +``` + +### npm + +``` +$ npm install --save @solana/web3.js +``` + +### Browser bundle + +```html + + + + + +``` + +## Development Environment Setup + +Install the latest Solana release from https://docs.solana.com/cli/install-solana-cli-tools + +### Run test validator + +**Use `solana-test-validator` from the latest Solana release** + +### BPF program development + +**Use `cargo build-bpf` from the latest Solana release** + +## Usage + +### Javascript + +```js +const solanaWeb3 = require('@solana/web3.js'); +console.log(solanaWeb3); +``` + +### ES6 + +```js +import * as solanaWeb3 from '@solana/web3.js'; +console.log(solanaWeb3); +``` + +### Browser bundle + +```js +// `solanaWeb3` is provided in the global namespace by the `solanaWeb3.min.js` script bundle. +console.log(solanaWeb3); +``` + +## Examples + +Example scripts for the web3.js repo and native programs: + +- [Web3 Examples](./examples) + +Example scripts for the Solana Program Library: + +- [Token Program Examples](https://github.com/solana-labs/solana-program-library/tree/master/token/js/examples) + +## Flow + +A [Flow library definition](https://flow.org/en/docs/libdefs/) is provided at +https://unpkg.com/@solana/web3.js@latest/module.flow.js. +Download the file and add the following line under the [libs] section of your project's `.flowconfig` to +activate it: + +```ini +[libs] +node_modules/@solana/web3.js/module.flow.js +``` + +## Releases + +Releases are available on [Github](https://github.com/solana-labs/solana-web3.js/releases) +and [npmjs.com](https://www.npmjs.com/package/@solana/web3.js) + +Each Github release features a tarball containing API documentation and a +minified version of the module suitable for direct use in a browser environment +(`` + +[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme) + +## methods + +`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `byteLength` - Takes a base64 string and returns length of byte array +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT diff --git a/tests/node_modules/base64-js/base64js.min.js b/tests/node_modules/base64-js/base64js.min.js new file mode 100644 index 0000000..908ac83 --- /dev/null +++ b/tests/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} diff --git a/tests/node_modules/base64-js/package.json b/tests/node_modules/base64-js/package.json new file mode 100644 index 0000000..c3972e3 --- /dev/null +++ b/tests/node_modules/base64-js/package.json @@ -0,0 +1,47 @@ +{ + "name": "base64-js", + "description": "Base64 encoding/decoding in pure JS", + "version": "1.5.1", + "author": "T. Jameson Little ", + "typings": "index.d.ts", + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "devDependencies": { + "babel-minify": "^0.5.1", + "benchmark": "^2.1.4", + "browserify": "^16.3.0", + "standard": "*", + "tape": "4.x" + }, + "homepage": "https://github.com/beatgammit/base64-js", + "keywords": [ + "base64" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "build": "browserify -s base64js -r ./ | minify > base64js.min.js", + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/tests/node_modules/binary-extensions/binary-extensions.json b/tests/node_modules/binary-extensions/binary-extensions.json new file mode 100644 index 0000000..4aab383 --- /dev/null +++ b/tests/node_modules/binary-extensions/binary-extensions.json @@ -0,0 +1,260 @@ +[ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "appimage", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "flatpak", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "odp", + "ods", + "odt", + "oga", + "ogg", + "ogv", + "otf", + "ott", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rpm", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "snap", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +] diff --git a/tests/node_modules/binary-extensions/binary-extensions.json.d.ts b/tests/node_modules/binary-extensions/binary-extensions.json.d.ts new file mode 100644 index 0000000..94a248c --- /dev/null +++ b/tests/node_modules/binary-extensions/binary-extensions.json.d.ts @@ -0,0 +1,3 @@ +declare const binaryExtensionsJson: readonly string[]; + +export = binaryExtensionsJson; diff --git a/tests/node_modules/binary-extensions/index.d.ts b/tests/node_modules/binary-extensions/index.d.ts new file mode 100644 index 0000000..f469ac5 --- /dev/null +++ b/tests/node_modules/binary-extensions/index.d.ts @@ -0,0 +1,14 @@ +/** +List of binary file extensions. + +@example +``` +import binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` +*/ +declare const binaryExtensions: readonly string[]; + +export = binaryExtensions; diff --git a/tests/node_modules/binary-extensions/index.js b/tests/node_modules/binary-extensions/index.js new file mode 100644 index 0000000..d46e468 --- /dev/null +++ b/tests/node_modules/binary-extensions/index.js @@ -0,0 +1 @@ +module.exports = require('./binary-extensions.json'); diff --git a/tests/node_modules/binary-extensions/license b/tests/node_modules/binary-extensions/license new file mode 100644 index 0000000..401b1c7 --- /dev/null +++ b/tests/node_modules/binary-extensions/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/binary-extensions/package.json b/tests/node_modules/binary-extensions/package.json new file mode 100644 index 0000000..c4d3641 --- /dev/null +++ b/tests/node_modules/binary-extensions/package.json @@ -0,0 +1,38 @@ +{ + "name": "binary-extensions", + "version": "2.2.0", + "description": "List of binary file extensions", + "license": "MIT", + "repository": "sindresorhus/binary-extensions", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "binary-extensions.json", + "binary-extensions.json.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "json", + "list", + "array" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/tests/node_modules/binary-extensions/readme.md b/tests/node_modules/binary-extensions/readme.md new file mode 100644 index 0000000..3e25dd8 --- /dev/null +++ b/tests/node_modules/binary-extensions/readme.md @@ -0,0 +1,41 @@ +# binary-extensions + +> List of binary file extensions + +The list is just a [JSON file](binary-extensions.json) and can be used anywhere. + + +## Install + +``` +$ npm install binary-extensions +``` + + +## Usage + +```js +const binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` + + +## Related + +- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file +- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/tests/node_modules/bn.js/CHANGELOG.md b/tests/node_modules/bn.js/CHANGELOG.md new file mode 100644 index 0000000..c89125b --- /dev/null +++ b/tests/node_modules/bn.js/CHANGELOG.md @@ -0,0 +1,51 @@ +5.2.0 / 2021-02-23 +------------------ + +- fix: Buffer not using global in browser (#260) +- Fix LE constructor for HEX (#265) + +5.1.3 / 2020-08-14 +------------------ + +- Add support for defined but not implemented Symbol.for (#252) + +5.1.2 / 2020-05-20 +------------------ + +- Fix BN v5/v4 interoperability issue (#249) + +5.1.1 / 2019-12-24 +------------------ + +- Temporary workaround for BN#_move (#236) +- Add eslintrc instead config in package.json (#237) + +5.1.0 / 2019-12-23 +------------------ + +- Benchmark for BigInt (#226) +- Add documentation for max/min (#232) +- Update BN#inspect for Symbols (#225) +- Improve performance of toArrayLike (#222) +- temporary disable jumboMulTo in BN#mulTo (#221) +- optimize toBitArray function (#212) +- fix iaddn sign issue (#216) + +5.0.0 / 2019-07-04 +------------------ + +- travis: update node versions (#205) +- Refactor buffer constructor (#200) +- lib: fix for negative numbers: imuln, modrn, idivn (#185) +- bn: fix Red#imod (#178) +- check unexpected high bits for invalid characters (#173) +- document support very large integers (#158) +- only define toBuffer if Buffer is defined (#172) +- lib: better validation of string input (#151) +- tests: reject decimal input in constructor (#91) +- bn: make .strip() an internal method (#105) +- lib: deprecate `.modn()` introduce `.modrn()` (#112 #129 #130) +- bn: don't accept invalid characters (#141) +- package: use `files` insteadof `.npmignore` (#152) +- bn: improve allocation speed for buffers (#167) +- toJSON to default to interoperable hex (length % 2) (#164) diff --git a/tests/node_modules/bn.js/LICENSE b/tests/node_modules/bn.js/LICENSE new file mode 100644 index 0000000..c328f04 --- /dev/null +++ b/tests/node_modules/bn.js/LICENSE @@ -0,0 +1,19 @@ +Copyright Fedor Indutny, 2015. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/node_modules/bn.js/README.md b/tests/node_modules/bn.js/README.md new file mode 100644 index 0000000..70ca4a0 --- /dev/null +++ b/tests/node_modules/bn.js/README.md @@ -0,0 +1,208 @@ +# bn.js + +> BigNum in pure javascript + +[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js) + +## Install +`npm install --save bn.js` + +## Usage + +```js +const BN = require('bn.js'); + +var a = new BN('dead', 16); +var b = new BN('101010', 2); + +var res = a.add(b); +console.log(res.toString(10)); // 57047 +``` + +**Note**: decimals are not supported in this library. + +## Notation + +### Prefixes + +There are several prefixes to instructions that affect the way the work. Here +is the list of them in the order of appearance in the function name: + +* `i` - perform operation in-place, storing the result in the host object (on + which the method was invoked). Might be used to avoid number allocation costs +* `u` - unsigned, ignore the sign of operands when performing operation, or + always return positive value. Second case applies to reduction operations + like `mod()`. In such cases if the result will be negative - modulo will be + added to the result to make it positive + +### Postfixes + +* `n` - the argument of the function must be a plain JavaScript + Number. Decimals are not supported. +* `rn` - both argument and return value of the function are plain JavaScript + Numbers. Decimals are not supported. + +### Examples + +* `a.iadd(b)` - perform addition on `a` and `b`, storing the result in `a` +* `a.umod(b)` - reduce `a` modulo `b`, returning positive value +* `a.iushln(13)` - shift bits of `a` left by 13 + +## Instructions + +Prefixes/postfixes are put in parens at the of the line. `endian` - could be +either `le` (little-endian) or `be` (big-endian). + +### Utilities + +* `a.clone()` - clone number +* `a.toString(base, length)` - convert to base-string and pad with zeroes +* `a.toNumber()` - convert to Javascript Number (limited to 53 bits) +* `a.toJSON()` - convert to JSON compatible hex string (alias of `toString(16)`) +* `a.toArray(endian, length)` - convert to byte `Array`, and optionally zero + pad to length, throwing if already exceeding +* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`, + which must behave like an `Array` +* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available). For + compatibility with browserify and similar tools, use this instead: + `a.toArrayLike(Buffer, endian, length)` +* `a.bitLength()` - get number of bits occupied +* `a.zeroBits()` - return number of less-significant consequent zero bits + (example: `1010000` has 4 zero bits) +* `a.byteLength()` - return number of bytes occupied +* `a.isNeg()` - true if the number is negative +* `a.isEven()` - no comments +* `a.isOdd()` - no comments +* `a.isZero()` - no comments +* `a.cmp(b)` - compare numbers and return `-1` (a `<` b), `0` (a `==` b), or `1` (a `>` b) + depending on the comparison result (`ucmp`, `cmpn`) +* `a.lt(b)` - `a` less than `b` (`n`) +* `a.lte(b)` - `a` less than or equals `b` (`n`) +* `a.gt(b)` - `a` greater than `b` (`n`) +* `a.gte(b)` - `a` greater than or equals `b` (`n`) +* `a.eq(b)` - `a` equals `b` (`n`) +* `a.toTwos(width)` - convert to two's complement representation, where `width` is bit width +* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width +* `BN.isBN(object)` - returns true if the supplied `object` is a BN.js instance +* `BN.max(a, b)` - return `a` if `a` bigger than `b` +* `BN.min(a, b)` - return `a` if `a` less than `b` + +### Arithmetics + +* `a.neg()` - negate sign (`i`) +* `a.abs()` - absolute value (`i`) +* `a.add(b)` - addition (`i`, `n`, `in`) +* `a.sub(b)` - subtraction (`i`, `n`, `in`) +* `a.mul(b)` - multiply (`i`, `n`, `in`) +* `a.sqr()` - square (`i`) +* `a.pow(b)` - raise `a` to the power of `b` +* `a.div(b)` - divide (`divn`, `idivn`) +* `a.mod(b)` - reduct (`u`, `n`) (but no `umodn`) +* `a.divmod(b)` - quotient and modulus obtained by dividing +* `a.divRound(b)` - rounded division + +### Bit operations + +* `a.or(b)` - or (`i`, `u`, `iu`) +* `a.and(b)` - and (`i`, `u`, `iu`, `andln`) (NOTE: `andln` is going to be replaced + with `andn` in future) +* `a.xor(b)` - xor (`i`, `u`, `iu`) +* `a.setn(b, value)` - set specified bit to `value` +* `a.shln(b)` - shift left (`i`, `u`, `iu`) +* `a.shrn(b)` - shift right (`i`, `u`, `iu`) +* `a.testn(b)` - test if specified bit is set +* `a.maskn(b)` - clear bits with indexes higher or equal to `b` (`i`) +* `a.bincn(b)` - add `1 << b` to the number +* `a.notn(w)` - not (for the width specified by `w`) (`i`) + +### Reduction + +* `a.gcd(b)` - GCD +* `a.egcd(b)` - Extended GCD results (`{ a: ..., b: ..., gcd: ... }`) +* `a.invm(b)` - inverse `a` modulo `b` + +## Fast reduction + +When doing lots of reductions using the same modulo, it might be beneficial to +use some tricks: like [Montgomery multiplication][0], or using special algorithm +for [Mersenne Prime][1]. + +### Reduction context + +To enable this tricks one should create a reduction context: + +```js +var red = BN.red(num); +``` +where `num` is just a BN instance. + +Or: + +```js +var red = BN.red(primeName); +``` + +Where `primeName` is either of these [Mersenne Primes][1]: + +* `'k256'` +* `'p224'` +* `'p192'` +* `'p25519'` + +Or: + +```js +var red = BN.mont(num); +``` + +To reduce numbers with [Montgomery trick][0]. `.mont()` is generally faster than +`.red(num)`, but slower than `BN.red(primeName)`. + +### Converting numbers + +Before performing anything in reduction context - numbers should be converted +to it. Usually, this means that one should: + +* Convert inputs to reducted ones +* Operate on them in reduction context +* Convert outputs back from the reduction context + +Here is how one may convert numbers to `red`: + +```js +var redA = a.toRed(red); +``` +Where `red` is a reduction context created using instructions above + +Here is how to convert them back: + +```js +var a = redA.fromRed(); +``` + +### Red instructions + +Most of the instructions from the very start of this readme have their +counterparts in red context: + +* `a.redAdd(b)`, `a.redIAdd(b)` +* `a.redSub(b)`, `a.redISub(b)` +* `a.redShl(num)` +* `a.redMul(b)`, `a.redIMul(b)` +* `a.redSqr()`, `a.redISqr()` +* `a.redSqrt()` - square root modulo reduction context's prime +* `a.redInvm()` - modular inverse of the number +* `a.redNeg()` +* `a.redPow(b)` - modular exponentiation + +### Number Size + +Optimized for elliptic curves that work with 256-bit numbers. +There is no limitation on the size of the numbers. + +## LICENSE + +This software is licensed under the MIT License. + +[0]: https://en.wikipedia.org/wiki/Montgomery_modular_multiplication +[1]: https://en.wikipedia.org/wiki/Mersenne_prime diff --git a/tests/node_modules/bn.js/lib/bn.js b/tests/node_modules/bn.js/lib/bn.js new file mode 100644 index 0000000..c9773da --- /dev/null +++ b/tests/node_modules/bn.js/lib/bn.js @@ -0,0 +1,3547 @@ +(function (module, exports) { + 'use strict'; + + // Utils + function assert (val, msg) { + if (!val) throw new Error(msg || 'Assertion failed'); + } + + // Could use `inherits` module, but don't want to move from single file + // architecture yet. + function inherits (ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + + // BN + + function BN (number, base, endian) { + if (BN.isBN(number)) { + return number; + } + + this.negative = 0; + this.words = null; + this.length = 0; + + // Reduction context + this.red = null; + + if (number !== null) { + if (base === 'le' || base === 'be') { + endian = base; + base = 10; + } + + this._init(number || 0, base || 10, endian || 'be'); + } + } + if (typeof module === 'object') { + module.exports = BN; + } else { + exports.BN = BN; + } + + BN.BN = BN; + BN.wordSize = 26; + + var Buffer; + try { + if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') { + Buffer = window.Buffer; + } else { + Buffer = require('buffer').Buffer; + } + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); + }; + + BN.max = function max (left, right) { + if (left.cmp(right) > 0) return left; + return right; + }; + + BN.min = function min (left, right) { + if (left.cmp(right) < 0) return left; + return right; + }; + + BN.prototype._init = function init (number, base, endian) { + if (typeof number === 'number') { + return this._initNumber(number, base, endian); + } + + if (typeof number === 'object') { + return this._initArray(number, base, endian); + } + + if (base === 'hex') { + base = 16; + } + assert(base === (base | 0) && base >= 2 && base <= 36); + + number = number.toString().replace(/\s+/g, ''); + var start = 0; + if (number[0] === '-') { + start++; + this.negative = 1; + } + + if (start < number.length) { + if (base === 16) { + this._parseHex(number, start, endian); + } else { + this._parseBase(number, base, start); + if (endian === 'le') { + this._initArray(this.toArray(), base, endian); + } + } + } + }; + + BN.prototype._initNumber = function _initNumber (number, base, endian) { + if (number < 0) { + this.negative = 1; + number = -number; + } + if (number < 0x4000000) { + this.words = [number & 0x3ffffff]; + this.length = 1; + } else if (number < 0x10000000000000) { + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff + ]; + this.length = 2; + } else { + assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) + this.words = [ + number & 0x3ffffff, + (number / 0x4000000) & 0x3ffffff, + 1 + ]; + this.length = 3; + } + + if (endian !== 'le') return; + + // Reverse the bytes + this._initArray(this.toArray(), base, endian); + }; + + BN.prototype._initArray = function _initArray (number, base, endian) { + // Perhaps a Uint8Array + assert(typeof number.length === 'number'); + if (number.length <= 0) { + this.words = [0]; + this.length = 1; + return this; + } + + this.length = Math.ceil(number.length / 3); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + var j, w; + var off = 0; + if (endian === 'be') { + for (i = number.length - 1, j = 0; i >= 0; i -= 3) { + w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } else if (endian === 'le') { + for (i = 0, j = 0; i < number.length; i += 3) { + w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); + this.words[j] |= (w << off) & 0x3ffffff; + this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; + off += 24; + if (off >= 26) { + off -= 26; + j++; + } + } + } + return this._strip(); + }; + + function parseHex4Bits (string, index) { + var c = string.charCodeAt(index); + // '0' - '9' + if (c >= 48 && c <= 57) { + return c - 48; + // 'A' - 'F' + } else if (c >= 65 && c <= 70) { + return c - 55; + // 'a' - 'f' + } else if (c >= 97 && c <= 102) { + return c - 87; + } else { + assert(false, 'Invalid character in ' + string); + } + } + + function parseHexByte (string, lowerBound, index) { + var r = parseHex4Bits(string, index); + if (index - 1 >= lowerBound) { + r |= parseHex4Bits(string, index - 1) << 4; + } + return r; + } + + BN.prototype._parseHex = function _parseHex (number, start, endian) { + // Create possibly bigger array to ensure that it fits the number + this.length = Math.ceil((number.length - start) / 6); + this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + this.words[i] = 0; + } + + // 24-bits chunks + var off = 0; + var j = 0; + + var w; + if (endian === 'be') { + for (i = number.length - 1; i >= start; i -= 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } else { + var parseLength = number.length - start; + for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) { + w = parseHexByte(number, start, i) << off; + this.words[j] |= w & 0x3ffffff; + if (off >= 18) { + off -= 18; + j += 1; + this.words[j] |= w >>> 26; + } else { + off += 8; + } + } + } + + this._strip(); + }; + + function parseBase (str, start, end, mul) { + var r = 0; + var b = 0; + var len = Math.min(str.length, end); + for (var i = start; i < len; i++) { + var c = str.charCodeAt(i) - 48; + + r *= mul; + + // 'a' + if (c >= 49) { + b = c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + b = c - 17 + 0xa; + + // '0' - '9' + } else { + b = c; + } + assert(c >= 0 && b < mul, 'Invalid character'); + r += b; + } + return r; + } + + BN.prototype._parseBase = function _parseBase (number, base, start) { + // Initialize as zero + this.words = [0]; + this.length = 1; + + // Find length of limb in base + for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { + limbLen++; + } + limbLen--; + limbPow = (limbPow / base) | 0; + + var total = number.length - start; + var mod = total % limbLen; + var end = Math.min(total, total - mod) + start; + + var word = 0; + for (var i = start; i < end; i += limbLen) { + word = parseBase(number, i, i + limbLen, base); + + this.imuln(limbPow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + if (mod !== 0) { + var pow = 1; + word = parseBase(number, i, number.length, base); + + for (i = 0; i < mod; i++) { + pow *= base; + } + + this.imuln(pow); + if (this.words[0] + word < 0x4000000) { + this.words[0] += word; + } else { + this._iaddn(word); + } + } + + this._strip(); + }; + + BN.prototype.copy = function copy (dest) { + dest.words = new Array(this.length); + for (var i = 0; i < this.length; i++) { + dest.words[i] = this.words[i]; + } + dest.length = this.length; + dest.negative = this.negative; + dest.red = this.red; + }; + + function move (dest, src) { + dest.words = src.words; + dest.length = src.length; + dest.negative = src.negative; + dest.red = src.red; + } + + BN.prototype._move = function _move (dest) { + move(dest, this); + }; + + BN.prototype.clone = function clone () { + var r = new BN(null); + this.copy(r); + return r; + }; + + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + + // Remove leading `0` from `this` + BN.prototype._strip = function strip () { + while (this.length > 1 && this.words[this.length - 1] === 0) { + this.length--; + } + return this._normSign(); + }; + + BN.prototype._normSign = function _normSign () { + // -0 = 0 + if (this.length === 1 && this.words[0] === 0) { + this.negative = 0; + } + return this; + }; + + // Check Symbol.for because not everywhere where Symbol defined + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility + if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') { + try { + BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect; + } catch (e) { + BN.prototype.inspect = inspect; + } + } else { + BN.prototype.inspect = inspect; + } + + function inspect () { + return (this.red ? ''; + } + + /* + + var zeros = []; + var groupSizes = []; + var groupBases = []; + + var s = ''; + var i = -1; + while (++i < BN.wordSize) { + zeros[i] = s; + s += '0'; + } + groupSizes[0] = 0; + groupSizes[1] = 0; + groupBases[0] = 0; + groupBases[1] = 0; + var base = 2 - 1; + while (++base < 36 + 1) { + var groupSize = 0; + var groupBase = 1; + while (groupBase < (1 << BN.wordSize) / base) { + groupBase *= base; + groupSize += 1; + } + groupSizes[base] = groupSize; + groupBases[base] = groupBase; + } + + */ + + var zeros = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000' + ]; + + var groupSizes = [ + 0, 0, + 25, 16, 12, 11, 10, 9, 8, + 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5 + ]; + + var groupBases = [ + 0, 0, + 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, + 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, + 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, + 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, + 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 + ]; + + BN.prototype.toString = function toString (base, padding) { + base = base || 10; + padding = padding | 0 || 1; + + var out; + if (base === 16 || base === 'hex') { + out = ''; + var off = 0; + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = this.words[i]; + var word = (((w << off) | carry) & 0xffffff).toString(16); + carry = (w >>> (24 - off)) & 0xffffff; + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + } + if (carry !== 0) { + out = carry.toString(16) + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + if (base === (base | 0) && base >= 2 && base <= 36) { + // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); + var groupSize = groupSizes[base]; + // var groupBase = Math.pow(base, groupSize); + var groupBase = groupBases[base]; + out = ''; + var c = this.clone(); + c.negative = 0; + while (!c.isZero()) { + var r = c.modrn(groupBase).toString(base); + c = c.idivn(groupBase); + + if (!c.isZero()) { + out = zeros[groupSize - r.length] + r + out; + } else { + out = r + out; + } + } + if (this.isZero()) { + out = '0' + out; + } + while (out.length % padding !== 0) { + out = '0' + out; + } + if (this.negative !== 0) { + out = '-' + out; + } + return out; + } + + assert(false, 'Base should be between 2 and 36'); + }; + + BN.prototype.toNumber = function toNumber () { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { + // NOTE: at this stage it is known that the top bit is set + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { + assert(false, 'Number can only safely store up to 53 bits'); + } + return (this.negative !== 0) ? -ret : ret; + }; + + BN.prototype.toJSON = function toJSON () { + return this.toString(16, 2); + }; + + if (Buffer) { + BN.prototype.toBuffer = function toBuffer (endian, length) { + return this.toArrayLike(Buffer, endian, length); + }; + } + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + var allocate = function allocate (ArrayType, size) { + if (ArrayType.allocUnsafe) { + return ArrayType.allocUnsafe(size); + } + return new ArrayType(size); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + this._strip(); + + var byteLength = this.byteLength(); + var reqLength = length || Math.max(1, byteLength); + assert(byteLength <= reqLength, 'byte array longer than desired length'); + assert(reqLength > 0, 'Requested array length <= 0'); + + var res = allocate(ArrayType, reqLength); + var postfix = endian === 'le' ? 'LE' : 'BE'; + this['_toArrayLike' + postfix](res, byteLength); + return res; + }; + + BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) { + var position = 0; + var carry = 0; + + for (var i = 0, shift = 0; i < this.length; i++) { + var word = (this.words[i] << shift) | carry; + + res[position++] = word & 0xff; + if (position < res.length) { + res[position++] = (word >> 8) & 0xff; + } + if (position < res.length) { + res[position++] = (word >> 16) & 0xff; + } + + if (shift === 6) { + if (position < res.length) { + res[position++] = (word >> 24) & 0xff; + } + carry = 0; + shift = 0; + } else { + carry = word >>> 24; + shift += 2; + } + } + + if (position < res.length) { + res[position++] = carry; + + while (position < res.length) { + res[position++] = 0; + } + } + }; + + BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) { + var position = res.length - 1; + var carry = 0; + + for (var i = 0, shift = 0; i < this.length; i++) { + var word = (this.words[i] << shift) | carry; + + res[position--] = word & 0xff; + if (position >= 0) { + res[position--] = (word >> 8) & 0xff; + } + if (position >= 0) { + res[position--] = (word >> 16) & 0xff; + } + + if (shift === 6) { + if (position >= 0) { + res[position--] = (word >> 24) & 0xff; + } + carry = 0; + shift = 0; + } else { + carry = word >>> 24; + shift += 2; + } + } + + if (position >= 0) { + res[position--] = carry; + + while (position >= 0) { + res[position--] = 0; + } + } + }; + + if (Math.clz32) { + BN.prototype._countBits = function _countBits (w) { + return 32 - Math.clz32(w); + }; + } else { + BN.prototype._countBits = function _countBits (w) { + var t = w; + var r = 0; + if (t >= 0x1000) { + r += 13; + t >>>= 13; + } + if (t >= 0x40) { + r += 7; + t >>>= 7; + } + if (t >= 0x8) { + r += 4; + t >>>= 4; + } + if (t >= 0x02) { + r += 2; + t >>>= 2; + } + return r + t; + }; + } + + BN.prototype._zeroBits = function _zeroBits (w) { + // Short-cut + if (w === 0) return 26; + + var t = w; + var r = 0; + if ((t & 0x1fff) === 0) { + r += 13; + t >>>= 13; + } + if ((t & 0x7f) === 0) { + r += 7; + t >>>= 7; + } + if ((t & 0xf) === 0) { + r += 4; + t >>>= 4; + } + if ((t & 0x3) === 0) { + r += 2; + t >>>= 2; + } + if ((t & 0x1) === 0) { + r++; + } + return r; + }; + + // Return number of used bits in a BN + BN.prototype.bitLength = function bitLength () { + var w = this.words[this.length - 1]; + var hi = this._countBits(w); + return (this.length - 1) * 26 + hi; + }; + + function toBitArray (num) { + var w = new Array(num.bitLength()); + + for (var bit = 0; bit < w.length; bit++) { + var off = (bit / 26) | 0; + var wbit = bit % 26; + + w[bit] = (num.words[off] >>> wbit) & 0x01; + } + + return w; + } + + // Number of trailing zero bits + BN.prototype.zeroBits = function zeroBits () { + if (this.isZero()) return 0; + + var r = 0; + for (var i = 0; i < this.length; i++) { + var b = this._zeroBits(this.words[i]); + r += b; + if (b !== 26) break; + } + return r; + }; + + BN.prototype.byteLength = function byteLength () { + return Math.ceil(this.bitLength() / 8); + }; + + BN.prototype.toTwos = function toTwos (width) { + if (this.negative !== 0) { + return this.abs().inotn(width).iaddn(1); + } + return this.clone(); + }; + + BN.prototype.fromTwos = function fromTwos (width) { + if (this.testn(width - 1)) { + return this.notn(width).iaddn(1).ineg(); + } + return this.clone(); + }; + + BN.prototype.isNeg = function isNeg () { + return this.negative !== 0; + }; + + // Return negative clone of `this` + BN.prototype.neg = function neg () { + return this.clone().ineg(); + }; + + BN.prototype.ineg = function ineg () { + if (!this.isZero()) { + this.negative ^= 1; + } + + return this; + }; + + // Or `num` with `this` in-place + BN.prototype.iuor = function iuor (num) { + while (this.length < num.length) { + this.words[this.length++] = 0; + } + + for (var i = 0; i < num.length; i++) { + this.words[i] = this.words[i] | num.words[i]; + } + + return this._strip(); + }; + + BN.prototype.ior = function ior (num) { + assert((this.negative | num.negative) === 0); + return this.iuor(num); + }; + + // Or `num` with `this` + BN.prototype.or = function or (num) { + if (this.length > num.length) return this.clone().ior(num); + return num.clone().ior(this); + }; + + BN.prototype.uor = function uor (num) { + if (this.length > num.length) return this.clone().iuor(num); + return num.clone().iuor(this); + }; + + // And `num` with `this` in-place + BN.prototype.iuand = function iuand (num) { + // b = min-length(num, this) + var b; + if (this.length > num.length) { + b = num; + } else { + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = this.words[i] & num.words[i]; + } + + this.length = b.length; + + return this._strip(); + }; + + BN.prototype.iand = function iand (num) { + assert((this.negative | num.negative) === 0); + return this.iuand(num); + }; + + // And `num` with `this` + BN.prototype.and = function and (num) { + if (this.length > num.length) return this.clone().iand(num); + return num.clone().iand(this); + }; + + BN.prototype.uand = function uand (num) { + if (this.length > num.length) return this.clone().iuand(num); + return num.clone().iuand(this); + }; + + // Xor `num` with `this` in-place + BN.prototype.iuxor = function iuxor (num) { + // a.length > b.length + var a; + var b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + for (var i = 0; i < b.length; i++) { + this.words[i] = a.words[i] ^ b.words[i]; + } + + if (this !== a) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = a.length; + + return this._strip(); + }; + + BN.prototype.ixor = function ixor (num) { + assert((this.negative | num.negative) === 0); + return this.iuxor(num); + }; + + // Xor `num` with `this` + BN.prototype.xor = function xor (num) { + if (this.length > num.length) return this.clone().ixor(num); + return num.clone().ixor(this); + }; + + BN.prototype.uxor = function uxor (num) { + if (this.length > num.length) return this.clone().iuxor(num); + return num.clone().iuxor(this); + }; + + // Not ``this`` with ``width`` bitwidth + BN.prototype.inotn = function inotn (width) { + assert(typeof width === 'number' && width >= 0); + + var bytesNeeded = Math.ceil(width / 26) | 0; + var bitsLeft = width % 26; + + // Extend the buffer with leading zeroes + this._expand(bytesNeeded); + + if (bitsLeft > 0) { + bytesNeeded--; + } + + // Handle complete words + for (var i = 0; i < bytesNeeded; i++) { + this.words[i] = ~this.words[i] & 0x3ffffff; + } + + // Handle the residue + if (bitsLeft > 0) { + this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); + } + + // And remove leading zeroes + return this._strip(); + }; + + BN.prototype.notn = function notn (width) { + return this.clone().inotn(width); + }; + + // Set `bit` of `this` + BN.prototype.setn = function setn (bit, val) { + assert(typeof bit === 'number' && bit >= 0); + + var off = (bit / 26) | 0; + var wbit = bit % 26; + + this._expand(off + 1); + + if (val) { + this.words[off] = this.words[off] | (1 << wbit); + } else { + this.words[off] = this.words[off] & ~(1 << wbit); + } + + return this._strip(); + }; + + // Add `num` to `this` in-place + BN.prototype.iadd = function iadd (num) { + var r; + + // negative + positive + if (this.negative !== 0 && num.negative === 0) { + this.negative = 0; + r = this.isub(num); + this.negative ^= 1; + return this._normSign(); + + // positive + negative + } else if (this.negative === 0 && num.negative !== 0) { + num.negative = 0; + r = this.isub(num); + num.negative = 1; + return r._normSign(); + } + + // a.length > b.length + var a, b; + if (this.length > num.length) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) + (b.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + this.words[i] = r & 0x3ffffff; + carry = r >>> 26; + } + + this.length = a.length; + if (carry !== 0) { + this.words[this.length] = carry; + this.length++; + // Copy the rest of the words + } else if (a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + return this; + }; + + // Add `num` to `this` + BN.prototype.add = function add (num) { + var res; + if (num.negative !== 0 && this.negative === 0) { + num.negative = 0; + res = this.sub(num); + num.negative ^= 1; + return res; + } else if (num.negative === 0 && this.negative !== 0) { + this.negative = 0; + res = num.sub(this); + this.negative = 1; + return res; + } + + if (this.length > num.length) return this.clone().iadd(num); + + return num.clone().iadd(this); + }; + + // Subtract `num` from `this` in-place + BN.prototype.isub = function isub (num) { + // this - (-num) = this + num + if (num.negative !== 0) { + num.negative = 0; + var r = this.iadd(num); + num.negative = 1; + return r._normSign(); + + // -this - num = -(this + num) + } else if (this.negative !== 0) { + this.negative = 0; + this.iadd(num); + this.negative = 1; + return this._normSign(); + } + + // At this point both numbers are positive + var cmp = this.cmp(num); + + // Optimization - zeroify + if (cmp === 0) { + this.negative = 0; + this.length = 1; + this.words[0] = 0; + return this; + } + + // a > b + var a, b; + if (cmp > 0) { + a = this; + b = num; + } else { + a = num; + b = this; + } + + var carry = 0; + for (var i = 0; i < b.length; i++) { + r = (a.words[i] | 0) - (b.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + for (; carry !== 0 && i < a.length; i++) { + r = (a.words[i] | 0) + carry; + carry = r >> 26; + this.words[i] = r & 0x3ffffff; + } + + // Copy rest of the words + if (carry === 0 && i < a.length && a !== this) { + for (; i < a.length; i++) { + this.words[i] = a.words[i]; + } + } + + this.length = Math.max(this.length, i); + + if (a !== this) { + this.negative = 1; + } + + return this._strip(); + }; + + // Subtract `num` from `this` + BN.prototype.sub = function sub (num) { + return this.clone().isub(num); + }; + + function smallMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + var len = (self.length + num.length) | 0; + out.length = len; + len = (len - 1) | 0; + + // Peel one iteration (compiler can't do it, because of code complexity) + var a = self.words[0] | 0; + var b = num.words[0] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + var carry = (r / 0x4000000) | 0; + out.words[0] = lo; + + for (var k = 1; k < len; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = carry >>> 26; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = (k - j) | 0; + a = self.words[i] | 0; + b = num.words[j] | 0; + r = a * b + rword; + ncarry += (r / 0x4000000) | 0; + rword = r & 0x3ffffff; + } + out.words[k] = rword | 0; + carry = ncarry | 0; + } + if (carry !== 0) { + out.words[k] = carry | 0; + } else { + out.length--; + } + + return out._strip(); + } + + // TODO(indutny): it may be reasonable to omit it for users who don't need + // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit + // multiplication (like elliptic secp256k1). + var comb10MulTo = function comb10MulTo (self, num, out) { + var a = self.words; + var b = num.words; + var o = out.words; + var c = 0; + var lo; + var mid; + var hi; + var a0 = a[0] | 0; + var al0 = a0 & 0x1fff; + var ah0 = a0 >>> 13; + var a1 = a[1] | 0; + var al1 = a1 & 0x1fff; + var ah1 = a1 >>> 13; + var a2 = a[2] | 0; + var al2 = a2 & 0x1fff; + var ah2 = a2 >>> 13; + var a3 = a[3] | 0; + var al3 = a3 & 0x1fff; + var ah3 = a3 >>> 13; + var a4 = a[4] | 0; + var al4 = a4 & 0x1fff; + var ah4 = a4 >>> 13; + var a5 = a[5] | 0; + var al5 = a5 & 0x1fff; + var ah5 = a5 >>> 13; + var a6 = a[6] | 0; + var al6 = a6 & 0x1fff; + var ah6 = a6 >>> 13; + var a7 = a[7] | 0; + var al7 = a7 & 0x1fff; + var ah7 = a7 >>> 13; + var a8 = a[8] | 0; + var al8 = a8 & 0x1fff; + var ah8 = a8 >>> 13; + var a9 = a[9] | 0; + var al9 = a9 & 0x1fff; + var ah9 = a9 >>> 13; + var b0 = b[0] | 0; + var bl0 = b0 & 0x1fff; + var bh0 = b0 >>> 13; + var b1 = b[1] | 0; + var bl1 = b1 & 0x1fff; + var bh1 = b1 >>> 13; + var b2 = b[2] | 0; + var bl2 = b2 & 0x1fff; + var bh2 = b2 >>> 13; + var b3 = b[3] | 0; + var bl3 = b3 & 0x1fff; + var bh3 = b3 >>> 13; + var b4 = b[4] | 0; + var bl4 = b4 & 0x1fff; + var bh4 = b4 >>> 13; + var b5 = b[5] | 0; + var bl5 = b5 & 0x1fff; + var bh5 = b5 >>> 13; + var b6 = b[6] | 0; + var bl6 = b6 & 0x1fff; + var bh6 = b6 >>> 13; + var b7 = b[7] | 0; + var bl7 = b7 & 0x1fff; + var bh7 = b7 >>> 13; + var b8 = b[8] | 0; + var bl8 = b8 & 0x1fff; + var bh8 = b8 >>> 13; + var b9 = b[9] | 0; + var bl9 = b9 & 0x1fff; + var bh9 = b9 >>> 13; + + out.negative = self.negative ^ num.negative; + out.length = 19; + /* k = 0 */ + lo = Math.imul(al0, bl0); + mid = Math.imul(al0, bh0); + mid = (mid + Math.imul(ah0, bl0)) | 0; + hi = Math.imul(ah0, bh0); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; + w0 &= 0x3ffffff; + /* k = 1 */ + lo = Math.imul(al1, bl0); + mid = Math.imul(al1, bh0); + mid = (mid + Math.imul(ah1, bl0)) | 0; + hi = Math.imul(ah1, bh0); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; + w1 &= 0x3ffffff; + /* k = 2 */ + lo = Math.imul(al2, bl0); + mid = Math.imul(al2, bh0); + mid = (mid + Math.imul(ah2, bl0)) | 0; + hi = Math.imul(ah2, bh0); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; + w2 &= 0x3ffffff; + /* k = 3 */ + lo = Math.imul(al3, bl0); + mid = Math.imul(al3, bh0); + mid = (mid + Math.imul(ah3, bl0)) | 0; + hi = Math.imul(ah3, bh0); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; + w3 &= 0x3ffffff; + /* k = 4 */ + lo = Math.imul(al4, bl0); + mid = Math.imul(al4, bh0); + mid = (mid + Math.imul(ah4, bl0)) | 0; + hi = Math.imul(ah4, bh0); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; + w4 &= 0x3ffffff; + /* k = 5 */ + lo = Math.imul(al5, bl0); + mid = Math.imul(al5, bh0); + mid = (mid + Math.imul(ah5, bl0)) | 0; + hi = Math.imul(ah5, bh0); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; + w5 &= 0x3ffffff; + /* k = 6 */ + lo = Math.imul(al6, bl0); + mid = Math.imul(al6, bh0); + mid = (mid + Math.imul(ah6, bl0)) | 0; + hi = Math.imul(ah6, bh0); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; + w6 &= 0x3ffffff; + /* k = 7 */ + lo = Math.imul(al7, bl0); + mid = Math.imul(al7, bh0); + mid = (mid + Math.imul(ah7, bl0)) | 0; + hi = Math.imul(ah7, bh0); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; + w7 &= 0x3ffffff; + /* k = 8 */ + lo = Math.imul(al8, bl0); + mid = Math.imul(al8, bh0); + mid = (mid + Math.imul(ah8, bl0)) | 0; + hi = Math.imul(ah8, bh0); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; + w8 &= 0x3ffffff; + /* k = 9 */ + lo = Math.imul(al9, bl0); + mid = Math.imul(al9, bh0); + mid = (mid + Math.imul(ah9, bl0)) | 0; + hi = Math.imul(ah9, bh0); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; + w9 &= 0x3ffffff; + /* k = 10 */ + lo = Math.imul(al9, bl1); + mid = Math.imul(al9, bh1); + mid = (mid + Math.imul(ah9, bl1)) | 0; + hi = Math.imul(ah9, bh1); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; + w10 &= 0x3ffffff; + /* k = 11 */ + lo = Math.imul(al9, bl2); + mid = Math.imul(al9, bh2); + mid = (mid + Math.imul(ah9, bl2)) | 0; + hi = Math.imul(ah9, bh2); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; + w11 &= 0x3ffffff; + /* k = 12 */ + lo = Math.imul(al9, bl3); + mid = Math.imul(al9, bh3); + mid = (mid + Math.imul(ah9, bl3)) | 0; + hi = Math.imul(ah9, bh3); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; + w12 &= 0x3ffffff; + /* k = 13 */ + lo = Math.imul(al9, bl4); + mid = Math.imul(al9, bh4); + mid = (mid + Math.imul(ah9, bl4)) | 0; + hi = Math.imul(ah9, bh4); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; + w13 &= 0x3ffffff; + /* k = 14 */ + lo = Math.imul(al9, bl5); + mid = Math.imul(al9, bh5); + mid = (mid + Math.imul(ah9, bl5)) | 0; + hi = Math.imul(ah9, bh5); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; + w14 &= 0x3ffffff; + /* k = 15 */ + lo = Math.imul(al9, bl6); + mid = Math.imul(al9, bh6); + mid = (mid + Math.imul(ah9, bl6)) | 0; + hi = Math.imul(ah9, bh6); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; + w15 &= 0x3ffffff; + /* k = 16 */ + lo = Math.imul(al9, bl7); + mid = Math.imul(al9, bh7); + mid = (mid + Math.imul(ah9, bl7)) | 0; + hi = Math.imul(ah9, bh7); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; + w16 &= 0x3ffffff; + /* k = 17 */ + lo = Math.imul(al9, bl8); + mid = Math.imul(al9, bh8); + mid = (mid + Math.imul(ah9, bl8)) | 0; + hi = Math.imul(ah9, bh8); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; + w17 &= 0x3ffffff; + /* k = 18 */ + lo = Math.imul(al9, bl9); + mid = Math.imul(al9, bh9); + mid = (mid + Math.imul(ah9, bl9)) | 0; + hi = Math.imul(ah9, bh9); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; + w18 &= 0x3ffffff; + o[0] = w0; + o[1] = w1; + o[2] = w2; + o[3] = w3; + o[4] = w4; + o[5] = w5; + o[6] = w6; + o[7] = w7; + o[8] = w8; + o[9] = w9; + o[10] = w10; + o[11] = w11; + o[12] = w12; + o[13] = w13; + o[14] = w14; + o[15] = w15; + o[16] = w16; + o[17] = w17; + o[18] = w18; + if (c !== 0) { + o[19] = c; + out.length++; + } + return out; + }; + + // Polyfill comb + if (!Math.imul) { + comb10MulTo = smallMulTo; + } + + function bigMulTo (self, num, out) { + out.negative = num.negative ^ self.negative; + out.length = self.length + num.length; + + var carry = 0; + var hncarry = 0; + for (var k = 0; k < out.length - 1; k++) { + // Sum all words with the same `i + j = k` and accumulate `ncarry`, + // note that ncarry could be >= 0x3ffffff + var ncarry = hncarry; + hncarry = 0; + var rword = carry & 0x3ffffff; + var maxJ = Math.min(k, num.length - 1); + for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { + var i = k - j; + var a = self.words[i] | 0; + var b = num.words[j] | 0; + var r = a * b; + + var lo = r & 0x3ffffff; + ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; + lo = (lo + rword) | 0; + rword = lo & 0x3ffffff; + ncarry = (ncarry + (lo >>> 26)) | 0; + + hncarry += ncarry >>> 26; + ncarry &= 0x3ffffff; + } + out.words[k] = rword; + carry = ncarry; + ncarry = hncarry; + } + if (carry !== 0) { + out.words[k] = carry; + } else { + out.length--; + } + + return out._strip(); + } + + function jumboMulTo (self, num, out) { + // Temporary disable, see https://github.com/indutny/bn.js/issues/211 + // var fftm = new FFTM(); + // return fftm.mulp(self, num, out); + return bigMulTo(self, num, out); + } + + BN.prototype.mulTo = function mulTo (num, out) { + var res; + var len = this.length + num.length; + if (this.length === 10 && num.length === 10) { + res = comb10MulTo(this, num, out); + } else if (len < 63) { + res = smallMulTo(this, num, out); + } else if (len < 1024) { + res = bigMulTo(this, num, out); + } else { + res = jumboMulTo(this, num, out); + } + + return res; + }; + + // Cooley-Tukey algorithm for FFT + // slightly revisited to rely on looping instead of recursion + + function FFTM (x, y) { + this.x = x; + this.y = y; + } + + FFTM.prototype.makeRBT = function makeRBT (N) { + var t = new Array(N); + var l = BN.prototype._countBits(N) - 1; + for (var i = 0; i < N; i++) { + t[i] = this.revBin(i, l, N); + } + + return t; + }; + + // Returns binary-reversed representation of `x` + FFTM.prototype.revBin = function revBin (x, l, N) { + if (x === 0 || x === N - 1) return x; + + var rb = 0; + for (var i = 0; i < l; i++) { + rb |= (x & 1) << (l - i - 1); + x >>= 1; + } + + return rb; + }; + + // Performs "tweedling" phase, therefore 'emulating' + // behaviour of the recursive algorithm + FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { + for (var i = 0; i < N; i++) { + rtws[i] = rws[rbt[i]]; + itws[i] = iws[rbt[i]]; + } + }; + + FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { + this.permute(rbt, rws, iws, rtws, itws, N); + + for (var s = 1; s < N; s <<= 1) { + var l = s << 1; + + var rtwdf = Math.cos(2 * Math.PI / l); + var itwdf = Math.sin(2 * Math.PI / l); + + for (var p = 0; p < N; p += l) { + var rtwdf_ = rtwdf; + var itwdf_ = itwdf; + + for (var j = 0; j < s; j++) { + var re = rtws[p + j]; + var ie = itws[p + j]; + + var ro = rtws[p + j + s]; + var io = itws[p + j + s]; + + var rx = rtwdf_ * ro - itwdf_ * io; + + io = rtwdf_ * io + itwdf_ * ro; + ro = rx; + + rtws[p + j] = re + ro; + itws[p + j] = ie + io; + + rtws[p + j + s] = re - ro; + itws[p + j + s] = ie - io; + + /* jshint maxdepth : false */ + if (j !== l) { + rx = rtwdf * rtwdf_ - itwdf * itwdf_; + + itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; + rtwdf_ = rx; + } + } + } + } + }; + + FFTM.prototype.guessLen13b = function guessLen13b (n, m) { + var N = Math.max(m, n) | 1; + var odd = N & 1; + var i = 0; + for (N = N / 2 | 0; N; N = N >>> 1) { + i++; + } + + return 1 << i + 1 + odd; + }; + + FFTM.prototype.conjugate = function conjugate (rws, iws, N) { + if (N <= 1) return; + + for (var i = 0; i < N / 2; i++) { + var t = rws[i]; + + rws[i] = rws[N - i - 1]; + rws[N - i - 1] = t; + + t = iws[i]; + + iws[i] = -iws[N - i - 1]; + iws[N - i - 1] = -t; + } + }; + + FFTM.prototype.normalize13b = function normalize13b (ws, N) { + var carry = 0; + for (var i = 0; i < N / 2; i++) { + var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + + Math.round(ws[2 * i] / N) + + carry; + + ws[i] = w & 0x3ffffff; + + if (w < 0x4000000) { + carry = 0; + } else { + carry = w / 0x4000000 | 0; + } + } + + return ws; + }; + + FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { + var carry = 0; + for (var i = 0; i < len; i++) { + carry = carry + (ws[i] | 0); + + rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; + rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; + } + + // Pad with zeroes + for (i = 2 * len; i < N; ++i) { + rws[i] = 0; + } + + assert(carry === 0); + assert((carry & ~0x1fff) === 0); + }; + + FFTM.prototype.stub = function stub (N) { + var ph = new Array(N); + for (var i = 0; i < N; i++) { + ph[i] = 0; + } + + return ph; + }; + + FFTM.prototype.mulp = function mulp (x, y, out) { + var N = 2 * this.guessLen13b(x.length, y.length); + + var rbt = this.makeRBT(N); + + var _ = this.stub(N); + + var rws = new Array(N); + var rwst = new Array(N); + var iwst = new Array(N); + + var nrws = new Array(N); + var nrwst = new Array(N); + var niwst = new Array(N); + + var rmws = out.words; + rmws.length = N; + + this.convert13b(x.words, x.length, rws, N); + this.convert13b(y.words, y.length, nrws, N); + + this.transform(rws, _, rwst, iwst, N, rbt); + this.transform(nrws, _, nrwst, niwst, N, rbt); + + for (var i = 0; i < N; i++) { + var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; + iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; + rwst[i] = rx; + } + + this.conjugate(rwst, iwst, N); + this.transform(rwst, iwst, rmws, _, N, rbt); + this.conjugate(rmws, _, N); + this.normalize13b(rmws, N); + + out.negative = x.negative ^ y.negative; + out.length = x.length + y.length; + return out._strip(); + }; + + // Multiply `this` by `num` + BN.prototype.mul = function mul (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return this.mulTo(num, out); + }; + + // Multiply employing FFT + BN.prototype.mulf = function mulf (num) { + var out = new BN(null); + out.words = new Array(this.length + num.length); + return jumboMulTo(this, num, out); + }; + + // In-place Multiplication + BN.prototype.imul = function imul (num) { + return this.clone().mulTo(num, this); + }; + + BN.prototype.imuln = function imuln (num) { + var isNegNum = num < 0; + if (isNegNum) num = -num; + + assert(typeof num === 'number'); + assert(num < 0x4000000); + + // Carry + var carry = 0; + for (var i = 0; i < this.length; i++) { + var w = (this.words[i] | 0) * num; + var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); + carry >>= 26; + carry += (w / 0x4000000) | 0; + // NOTE: lo is 27bit maximum + carry += lo >>> 26; + this.words[i] = lo & 0x3ffffff; + } + + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + + return isNegNum ? this.ineg() : this; + }; + + BN.prototype.muln = function muln (num) { + return this.clone().imuln(num); + }; + + // `this` * `this` + BN.prototype.sqr = function sqr () { + return this.mul(this); + }; + + // `this` * `this` in-place + BN.prototype.isqr = function isqr () { + return this.imul(this.clone()); + }; + + // Math.pow(`this`, `num`) + BN.prototype.pow = function pow (num) { + var w = toBitArray(num); + if (w.length === 0) return new BN(1); + + // Skip leading zeroes + var res = this; + for (var i = 0; i < w.length; i++, res = res.sqr()) { + if (w[i] !== 0) break; + } + + if (++i < w.length) { + for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { + if (w[i] === 0) continue; + + res = res.mul(q); + } + } + + return res; + }; + + // Shift-left in-place + BN.prototype.iushln = function iushln (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); + var i; + + if (r !== 0) { + var carry = 0; + + for (i = 0; i < this.length; i++) { + var newCarry = this.words[i] & carryMask; + var c = ((this.words[i] | 0) - newCarry) << r; + this.words[i] = c | carry; + carry = newCarry >>> (26 - r); + } + + if (carry) { + this.words[i] = carry; + this.length++; + } + } + + if (s !== 0) { + for (i = this.length - 1; i >= 0; i--) { + this.words[i + s] = this.words[i]; + } + + for (i = 0; i < s; i++) { + this.words[i] = 0; + } + + this.length += s; + } + + return this._strip(); + }; + + BN.prototype.ishln = function ishln (bits) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushln(bits); + }; + + // Shift-right in-place + // NOTE: `hint` is a lowest bit before trailing zeroes + // NOTE: if `extended` is present - it will be filled with destroyed bits + BN.prototype.iushrn = function iushrn (bits, hint, extended) { + assert(typeof bits === 'number' && bits >= 0); + var h; + if (hint) { + h = (hint - (hint % 26)) / 26; + } else { + h = 0; + } + + var r = bits % 26; + var s = Math.min((bits - r) / 26, this.length); + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + var maskedWords = extended; + + h -= s; + h = Math.max(0, h); + + // Extended mode, copy masked part + if (maskedWords) { + for (var i = 0; i < s; i++) { + maskedWords.words[i] = this.words[i]; + } + maskedWords.length = s; + } + + if (s === 0) { + // No-op, we should not move anything at all + } else if (this.length > s) { + this.length -= s; + for (i = 0; i < this.length; i++) { + this.words[i] = this.words[i + s]; + } + } else { + this.words[0] = 0; + this.length = 1; + } + + var carry = 0; + for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { + var word = this.words[i] | 0; + this.words[i] = (carry << (26 - r)) | (word >>> r); + carry = word & mask; + } + + // Push carried bits as a mask + if (maskedWords && carry !== 0) { + maskedWords.words[maskedWords.length++] = carry; + } + + if (this.length === 0) { + this.words[0] = 0; + this.length = 1; + } + + return this._strip(); + }; + + BN.prototype.ishrn = function ishrn (bits, hint, extended) { + // TODO(indutny): implement me + assert(this.negative === 0); + return this.iushrn(bits, hint, extended); + }; + + // Shift-left + BN.prototype.shln = function shln (bits) { + return this.clone().ishln(bits); + }; + + BN.prototype.ushln = function ushln (bits) { + return this.clone().iushln(bits); + }; + + // Shift-right + BN.prototype.shrn = function shrn (bits) { + return this.clone().ishrn(bits); + }; + + BN.prototype.ushrn = function ushrn (bits) { + return this.clone().iushrn(bits); + }; + + // Test if n bit is set + BN.prototype.testn = function testn (bit) { + assert(typeof bit === 'number' && bit >= 0); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) return false; + + // Check bit and return + var w = this.words[s]; + + return !!(w & q); + }; + + // Return only lowers bits of number (in-place) + BN.prototype.imaskn = function imaskn (bits) { + assert(typeof bits === 'number' && bits >= 0); + var r = bits % 26; + var s = (bits - r) / 26; + + assert(this.negative === 0, 'imaskn works only with positive numbers'); + + if (this.length <= s) { + return this; + } + + if (r !== 0) { + s++; + } + this.length = Math.min(s, this.length); + + if (r !== 0) { + var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); + this.words[this.length - 1] &= mask; + } + + return this._strip(); + }; + + // Return only lowers bits of number + BN.prototype.maskn = function maskn (bits) { + return this.clone().imaskn(bits); + }; + + // Add plain number `num` to `this` + BN.prototype.iaddn = function iaddn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.isubn(-num); + + // Possible sign change + if (this.negative !== 0) { + if (this.length === 1 && (this.words[0] | 0) <= num) { + this.words[0] = num - (this.words[0] | 0); + this.negative = 0; + return this; + } + + this.negative = 0; + this.isubn(num); + this.negative = 1; + return this; + } + + // Add without checks + return this._iaddn(num); + }; + + BN.prototype._iaddn = function _iaddn (num) { + this.words[0] += num; + + // Carry + for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { + this.words[i] -= 0x4000000; + if (i === this.length - 1) { + this.words[i + 1] = 1; + } else { + this.words[i + 1]++; + } + } + this.length = Math.max(this.length, i + 1); + + return this; + }; + + // Subtract plain number `num` from `this` + BN.prototype.isubn = function isubn (num) { + assert(typeof num === 'number'); + assert(num < 0x4000000); + if (num < 0) return this.iaddn(-num); + + if (this.negative !== 0) { + this.negative = 0; + this.iaddn(num); + this.negative = 1; + return this; + } + + this.words[0] -= num; + + if (this.length === 1 && this.words[0] < 0) { + this.words[0] = -this.words[0]; + this.negative = 1; + } else { + // Carry + for (var i = 0; i < this.length && this.words[i] < 0; i++) { + this.words[i] += 0x4000000; + this.words[i + 1] -= 1; + } + } + + return this._strip(); + }; + + BN.prototype.addn = function addn (num) { + return this.clone().iaddn(num); + }; + + BN.prototype.subn = function subn (num) { + return this.clone().isubn(num); + }; + + BN.prototype.iabs = function iabs () { + this.negative = 0; + + return this; + }; + + BN.prototype.abs = function abs () { + return this.clone().iabs(); + }; + + BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { + var len = num.length + shift; + var i; + + this._expand(len); + + var w; + var carry = 0; + for (i = 0; i < num.length; i++) { + w = (this.words[i + shift] | 0) + carry; + var right = (num.words[i] | 0) * mul; + w -= right & 0x3ffffff; + carry = (w >> 26) - ((right / 0x4000000) | 0); + this.words[i + shift] = w & 0x3ffffff; + } + for (; i < this.length - shift; i++) { + w = (this.words[i + shift] | 0) + carry; + carry = w >> 26; + this.words[i + shift] = w & 0x3ffffff; + } + + if (carry === 0) return this._strip(); + + // Subtraction overflow + assert(carry === -1); + carry = 0; + for (i = 0; i < this.length; i++) { + w = -(this.words[i] | 0) + carry; + carry = w >> 26; + this.words[i] = w & 0x3ffffff; + } + this.negative = 1; + + return this._strip(); + }; + + BN.prototype._wordDiv = function _wordDiv (num, mode) { + var shift = this.length - num.length; + + var a = this.clone(); + var b = num; + + // Normalize + var bhi = b.words[b.length - 1] | 0; + var bhiBits = this._countBits(bhi); + shift = 26 - bhiBits; + if (shift !== 0) { + b = b.ushln(shift); + a.iushln(shift); + bhi = b.words[b.length - 1] | 0; + } + + // Initialize quotient + var m = a.length - b.length; + var q; + + if (mode !== 'mod') { + q = new BN(null); + q.length = m + 1; + q.words = new Array(q.length); + for (var i = 0; i < q.length; i++) { + q.words[i] = 0; + } + } + + var diff = a.clone()._ishlnsubmul(b, 1, m); + if (diff.negative === 0) { + a = diff; + if (q) { + q.words[m] = 1; + } + } + + for (var j = m - 1; j >= 0; j--) { + var qj = (a.words[b.length + j] | 0) * 0x4000000 + + (a.words[b.length + j - 1] | 0); + + // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max + // (0x7ffffff) + qj = Math.min((qj / bhi) | 0, 0x3ffffff); + + a._ishlnsubmul(b, qj, j); + while (a.negative !== 0) { + qj--; + a.negative = 0; + a._ishlnsubmul(b, 1, j); + if (!a.isZero()) { + a.negative ^= 1; + } + } + if (q) { + q.words[j] = qj; + } + } + if (q) { + q._strip(); + } + a._strip(); + + // Denormalize + if (mode !== 'div' && shift !== 0) { + a.iushrn(shift); + } + + return { + div: q || null, + mod: a + }; + }; + + // NOTE: 1) `mode` can be set to `mod` to request mod only, + // to `div` to request div only, or be absent to + // request both div & mod + // 2) `positive` is true if unsigned mod is requested + BN.prototype.divmod = function divmod (num, mode, positive) { + assert(!num.isZero()); + + if (this.isZero()) { + return { + div: new BN(0), + mod: new BN(0) + }; + } + + var div, mod, res; + if (this.negative !== 0 && num.negative === 0) { + res = this.neg().divmod(num, mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.iadd(num); + } + } + + return { + div: div, + mod: mod + }; + } + + if (this.negative === 0 && num.negative !== 0) { + res = this.divmod(num.neg(), mode); + + if (mode !== 'mod') { + div = res.div.neg(); + } + + return { + div: div, + mod: res.mod + }; + } + + if ((this.negative & num.negative) !== 0) { + res = this.neg().divmod(num.neg(), mode); + + if (mode !== 'div') { + mod = res.mod.neg(); + if (positive && mod.negative !== 0) { + mod.isub(num); + } + } + + return { + div: res.div, + mod: mod + }; + } + + // Both numbers are positive at this point + + // Strip both numbers to approximate shift value + if (num.length > this.length || this.cmp(num) < 0) { + return { + div: new BN(0), + mod: this + }; + } + + // Very short reduction + if (num.length === 1) { + if (mode === 'div') { + return { + div: this.divn(num.words[0]), + mod: null + }; + } + + if (mode === 'mod') { + return { + div: null, + mod: new BN(this.modrn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modrn(num.words[0])) + }; + } + + return this._wordDiv(num, mode); + }; + + // Find `this` / `num` + BN.prototype.div = function div (num) { + return this.divmod(num, 'div', false).div; + }; + + // Find `this` % `num` + BN.prototype.mod = function mod (num) { + return this.divmod(num, 'mod', false).mod; + }; + + BN.prototype.umod = function umod (num) { + return this.divmod(num, 'mod', true).mod; + }; + + // Find Round(`this` / `num`) + BN.prototype.divRound = function divRound (num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; + + var half = num.ushrn(1); + var r2 = num.andln(1); + var cmp = mod.cmp(half); + + // Round down + if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); + }; + + BN.prototype.modrn = function modrn (num) { + var isNegNum = num < 0; + if (isNegNum) num = -num; + + assert(num <= 0x3ffffff); + var p = (1 << 26) % num; + + var acc = 0; + for (var i = this.length - 1; i >= 0; i--) { + acc = (p * acc + (this.words[i] | 0)) % num; + } + + return isNegNum ? -acc : acc; + }; + + // WARNING: DEPRECATED + BN.prototype.modn = function modn (num) { + return this.modrn(num); + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + var isNegNum = num < 0; + if (isNegNum) num = -num; + + assert(num <= 0x3ffffff); + + var carry = 0; + for (var i = this.length - 1; i >= 0; i--) { + var w = (this.words[i] | 0) + carry * 0x4000000; + this.words[i] = (w / num) | 0; + carry = w % num; + } + + this._strip(); + return isNegNum ? this.ineg() : this; + }; + + BN.prototype.divn = function divn (num) { + return this.clone().idivn(num); + }; + + BN.prototype.egcd = function egcd (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var x = this; + var y = p.clone(); + + if (x.negative !== 0) { + x = x.umod(p); + } else { + x = x.clone(); + } + + // A * x + B * y = x + var A = new BN(1); + var B = new BN(0); + + // C * x + D * y = y + var C = new BN(0); + var D = new BN(1); + + var g = 0; + + while (x.isEven() && y.isEven()) { + x.iushrn(1); + y.iushrn(1); + ++g; + } + + var yp = y.clone(); + var xp = x.clone(); + + while (!x.isZero()) { + for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + x.iushrn(i); + while (i-- > 0) { + if (A.isOdd() || B.isOdd()) { + A.iadd(yp); + B.isub(xp); + } + + A.iushrn(1); + B.iushrn(1); + } + } + + for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + y.iushrn(j); + while (j-- > 0) { + if (C.isOdd() || D.isOdd()) { + C.iadd(yp); + D.isub(xp); + } + + C.iushrn(1); + D.iushrn(1); + } + } + + if (x.cmp(y) >= 0) { + x.isub(y); + A.isub(C); + B.isub(D); + } else { + y.isub(x); + C.isub(A); + D.isub(B); + } + } + + return { + a: C, + b: D, + gcd: y.iushln(g) + }; + }; + + // This is reduced incarnation of the binary EEA + // above, designated to invert members of the + // _prime_ fields F(p) at a maximal speed + BN.prototype._invmp = function _invmp (p) { + assert(p.negative === 0); + assert(!p.isZero()); + + var a = this; + var b = p.clone(); + + if (a.negative !== 0) { + a = a.umod(p); + } else { + a = a.clone(); + } + + var x1 = new BN(1); + var x2 = new BN(0); + + var delta = b.clone(); + + while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { + for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); + if (i > 0) { + a.iushrn(i); + while (i-- > 0) { + if (x1.isOdd()) { + x1.iadd(delta); + } + + x1.iushrn(1); + } + } + + for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); + if (j > 0) { + b.iushrn(j); + while (j-- > 0) { + if (x2.isOdd()) { + x2.iadd(delta); + } + + x2.iushrn(1); + } + } + + if (a.cmp(b) >= 0) { + a.isub(b); + x1.isub(x2); + } else { + b.isub(a); + x2.isub(x1); + } + } + + var res; + if (a.cmpn(1) === 0) { + res = x1; + } else { + res = x2; + } + + if (res.cmpn(0) < 0) { + res.iadd(p); + } + + return res; + }; + + BN.prototype.gcd = function gcd (num) { + if (this.isZero()) return num.abs(); + if (num.isZero()) return this.abs(); + + var a = this.clone(); + var b = num.clone(); + a.negative = 0; + b.negative = 0; + + // Remove common factor of two + for (var shift = 0; a.isEven() && b.isEven(); shift++) { + a.iushrn(1); + b.iushrn(1); + } + + do { + while (a.isEven()) { + a.iushrn(1); + } + while (b.isEven()) { + b.iushrn(1); + } + + var r = a.cmp(b); + if (r < 0) { + // Swap `a` and `b` to make `a` always bigger than `b` + var t = a; + a = b; + b = t; + } else if (r === 0 || b.cmpn(1) === 0) { + break; + } + + a.isub(b); + } while (true); + + return b.iushln(shift); + }; + + // Invert number in the field F(num) + BN.prototype.invm = function invm (num) { + return this.egcd(num).a.umod(num); + }; + + BN.prototype.isEven = function isEven () { + return (this.words[0] & 1) === 0; + }; + + BN.prototype.isOdd = function isOdd () { + return (this.words[0] & 1) === 1; + }; + + // And first word and num + BN.prototype.andln = function andln (num) { + return this.words[0] & num; + }; + + // Increment at the bit position in-line + BN.prototype.bincn = function bincn (bit) { + assert(typeof bit === 'number'); + var r = bit % 26; + var s = (bit - r) / 26; + var q = 1 << r; + + // Fast case: bit is much higher than all existing words + if (this.length <= s) { + this._expand(s + 1); + this.words[s] |= q; + return this; + } + + // Add bit and propagate, if needed + var carry = q; + for (var i = s; carry !== 0 && i < this.length; i++) { + var w = this.words[i] | 0; + w += carry; + carry = w >>> 26; + w &= 0x3ffffff; + this.words[i] = w; + } + if (carry !== 0) { + this.words[i] = carry; + this.length++; + } + return this; + }; + + BN.prototype.isZero = function isZero () { + return this.length === 1 && this.words[0] === 0; + }; + + BN.prototype.cmpn = function cmpn (num) { + var negative = num < 0; + + if (this.negative !== 0 && !negative) return -1; + if (this.negative === 0 && negative) return 1; + + this._strip(); + + var res; + if (this.length > 1) { + res = 1; + } else { + if (negative) { + num = -num; + } + + assert(num <= 0x3ffffff, 'Number is too big'); + + var w = this.words[0] | 0; + res = w === num ? 0 : w < num ? -1 : 1; + } + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Compare two numbers and return: + // 1 - if `this` > `num` + // 0 - if `this` == `num` + // -1 - if `this` < `num` + BN.prototype.cmp = function cmp (num) { + if (this.negative !== 0 && num.negative === 0) return -1; + if (this.negative === 0 && num.negative !== 0) return 1; + + var res = this.ucmp(num); + if (this.negative !== 0) return -res | 0; + return res; + }; + + // Unsigned comparison + BN.prototype.ucmp = function ucmp (num) { + // At this point both numbers have the same sign + if (this.length > num.length) return 1; + if (this.length < num.length) return -1; + + var res = 0; + for (var i = this.length - 1; i >= 0; i--) { + var a = this.words[i] | 0; + var b = num.words[i] | 0; + + if (a === b) continue; + if (a < b) { + res = -1; + } else if (a > b) { + res = 1; + } + break; + } + return res; + }; + + BN.prototype.gtn = function gtn (num) { + return this.cmpn(num) === 1; + }; + + BN.prototype.gt = function gt (num) { + return this.cmp(num) === 1; + }; + + BN.prototype.gten = function gten (num) { + return this.cmpn(num) >= 0; + }; + + BN.prototype.gte = function gte (num) { + return this.cmp(num) >= 0; + }; + + BN.prototype.ltn = function ltn (num) { + return this.cmpn(num) === -1; + }; + + BN.prototype.lt = function lt (num) { + return this.cmp(num) === -1; + }; + + BN.prototype.lten = function lten (num) { + return this.cmpn(num) <= 0; + }; + + BN.prototype.lte = function lte (num) { + return this.cmp(num) <= 0; + }; + + BN.prototype.eqn = function eqn (num) { + return this.cmpn(num) === 0; + }; + + BN.prototype.eq = function eq (num) { + return this.cmp(num) === 0; + }; + + // + // A reduce context, could be using montgomery or something better, depending + // on the `m` itself. + // + BN.red = function red (num) { + return new Red(num); + }; + + BN.prototype.toRed = function toRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + assert(this.negative === 0, 'red works only with positives'); + return ctx.convertTo(this)._forceRed(ctx); + }; + + BN.prototype.fromRed = function fromRed () { + assert(this.red, 'fromRed works only with numbers in reduction context'); + return this.red.convertFrom(this); + }; + + BN.prototype._forceRed = function _forceRed (ctx) { + this.red = ctx; + return this; + }; + + BN.prototype.forceRed = function forceRed (ctx) { + assert(!this.red, 'Already a number in reduction context'); + return this._forceRed(ctx); + }; + + BN.prototype.redAdd = function redAdd (num) { + assert(this.red, 'redAdd works only with red numbers'); + return this.red.add(this, num); + }; + + BN.prototype.redIAdd = function redIAdd (num) { + assert(this.red, 'redIAdd works only with red numbers'); + return this.red.iadd(this, num); + }; + + BN.prototype.redSub = function redSub (num) { + assert(this.red, 'redSub works only with red numbers'); + return this.red.sub(this, num); + }; + + BN.prototype.redISub = function redISub (num) { + assert(this.red, 'redISub works only with red numbers'); + return this.red.isub(this, num); + }; + + BN.prototype.redShl = function redShl (num) { + assert(this.red, 'redShl works only with red numbers'); + return this.red.shl(this, num); + }; + + BN.prototype.redMul = function redMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.mul(this, num); + }; + + BN.prototype.redIMul = function redIMul (num) { + assert(this.red, 'redMul works only with red numbers'); + this.red._verify2(this, num); + return this.red.imul(this, num); + }; + + BN.prototype.redSqr = function redSqr () { + assert(this.red, 'redSqr works only with red numbers'); + this.red._verify1(this); + return this.red.sqr(this); + }; + + BN.prototype.redISqr = function redISqr () { + assert(this.red, 'redISqr works only with red numbers'); + this.red._verify1(this); + return this.red.isqr(this); + }; + + // Square root over p + BN.prototype.redSqrt = function redSqrt () { + assert(this.red, 'redSqrt works only with red numbers'); + this.red._verify1(this); + return this.red.sqrt(this); + }; + + BN.prototype.redInvm = function redInvm () { + assert(this.red, 'redInvm works only with red numbers'); + this.red._verify1(this); + return this.red.invm(this); + }; + + // Return negative clone of `this` % `red modulo` + BN.prototype.redNeg = function redNeg () { + assert(this.red, 'redNeg works only with red numbers'); + this.red._verify1(this); + return this.red.neg(this); + }; + + BN.prototype.redPow = function redPow (num) { + assert(this.red && !num.red, 'redPow(normalNum)'); + this.red._verify1(this); + return this.red.pow(this, num); + }; + + // Prime numbers with efficient reduction + var primes = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + + // Pseudo-Mersenne prime + function MPrime (name, p) { + // P = 2 ^ N - K + this.name = name; + this.p = new BN(p, 16); + this.n = this.p.bitLength(); + this.k = new BN(1).iushln(this.n).isub(this.p); + + this.tmp = this._tmp(); + } + + MPrime.prototype._tmp = function _tmp () { + var tmp = new BN(null); + tmp.words = new Array(Math.ceil(this.n / 13)); + return tmp; + }; + + MPrime.prototype.ireduce = function ireduce (num) { + // Assumes that `num` is less than `P^2` + // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) + var r = num; + var rlen; + + do { + this.split(r, this.tmp); + r = this.imulK(r); + r = r.iadd(this.tmp); + rlen = r.bitLength(); + } while (rlen > this.n); + + var cmp = rlen < this.n ? -1 : r.ucmp(this.p); + if (cmp === 0) { + r.words[0] = 0; + r.length = 1; + } else if (cmp > 0) { + r.isub(this.p); + } else { + if (r.strip !== undefined) { + // r is a BN v4 instance + r.strip(); + } else { + // r is a BN v5 instance + r._strip(); + } + } + + return r; + }; + + MPrime.prototype.split = function split (input, out) { + input.iushrn(this.n, 0, out); + }; + + MPrime.prototype.imulK = function imulK (num) { + return num.imul(this.k); + }; + + function K256 () { + MPrime.call( + this, + 'k256', + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + inherits(K256, MPrime); + + K256.prototype.split = function split (input, output) { + // 256 = 9 * 26 + 22 + var mask = 0x3fffff; + + var outLen = Math.min(input.length, 9); + for (var i = 0; i < outLen; i++) { + output.words[i] = input.words[i]; + } + output.length = outLen; + + if (input.length <= 9) { + input.words[0] = 0; + input.length = 1; + return; + } + + // Shift by 9 limbs + var prev = input.words[9]; + output.words[output.length++] = prev & mask; + + for (i = 10; i < input.length; i++) { + var next = input.words[i] | 0; + input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); + prev = next; + } + prev >>>= 22; + input.words[i - 10] = prev; + if (prev === 0 && input.length > 10) { + input.length -= 10; + } else { + input.length -= 9; + } + }; + + K256.prototype.imulK = function imulK (num) { + // K = 0x1000003d1 = [ 0x40, 0x3d1 ] + num.words[num.length] = 0; + num.words[num.length + 1] = 0; + num.length += 2; + + // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 + var lo = 0; + for (var i = 0; i < num.length; i++) { + var w = num.words[i] | 0; + lo += w * 0x3d1; + num.words[i] = lo & 0x3ffffff; + lo = w * 0x40 + ((lo / 0x4000000) | 0); + } + + // Fast length reduction + if (num.words[num.length - 1] === 0) { + num.length--; + if (num.words[num.length - 1] === 0) { + num.length--; + } + } + return num; + }; + + function P224 () { + MPrime.call( + this, + 'p224', + 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + inherits(P224, MPrime); + + function P192 () { + MPrime.call( + this, + 'p192', + 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + inherits(P192, MPrime); + + function P25519 () { + // 2 ^ 255 - 19 + MPrime.call( + this, + '25519', + '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + inherits(P25519, MPrime); + + P25519.prototype.imulK = function imulK (num) { + // K = 0x13 + var carry = 0; + for (var i = 0; i < num.length; i++) { + var hi = (num.words[i] | 0) * 0x13 + carry; + var lo = hi & 0x3ffffff; + hi >>>= 26; + + num.words[i] = lo; + carry = hi; + } + if (carry !== 0) { + num.words[num.length++] = carry; + } + return num; + }; + + // Exported mostly for testing purposes, use plain name instead + BN._prime = function prime (name) { + // Cached version of prime + if (primes[name]) return primes[name]; + + var prime; + if (name === 'k256') { + prime = new K256(); + } else if (name === 'p224') { + prime = new P224(); + } else if (name === 'p192') { + prime = new P192(); + } else if (name === 'p25519') { + prime = new P25519(); + } else { + throw new Error('Unknown prime ' + name); + } + primes[name] = prime; + + return prime; + }; + + // + // Base reduction engine + // + function Red (m) { + if (typeof m === 'string') { + var prime = BN._prime(m); + this.m = prime.p; + this.prime = prime; + } else { + assert(m.gtn(1), 'modulus must be greater than 1'); + this.m = m; + this.prime = null; + } + } + + Red.prototype._verify1 = function _verify1 (a) { + assert(a.negative === 0, 'red works only with positives'); + assert(a.red, 'red works only with red numbers'); + }; + + Red.prototype._verify2 = function _verify2 (a, b) { + assert((a.negative | b.negative) === 0, 'red works only with positives'); + assert(a.red && a.red === b.red, + 'red works only with red numbers'); + }; + + Red.prototype.imod = function imod (a) { + if (this.prime) return this.prime.ireduce(a)._forceRed(this); + + move(a, a.umod(this.m)._forceRed(this)); + return a; + }; + + Red.prototype.neg = function neg (a) { + if (a.isZero()) { + return a.clone(); + } + + return this.m.sub(a)._forceRed(this); + }; + + Red.prototype.add = function add (a, b) { + this._verify2(a, b); + + var res = a.add(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.iadd = function iadd (a, b) { + this._verify2(a, b); + + var res = a.iadd(b); + if (res.cmp(this.m) >= 0) { + res.isub(this.m); + } + return res; + }; + + Red.prototype.sub = function sub (a, b) { + this._verify2(a, b); + + var res = a.sub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res._forceRed(this); + }; + + Red.prototype.isub = function isub (a, b) { + this._verify2(a, b); + + var res = a.isub(b); + if (res.cmpn(0) < 0) { + res.iadd(this.m); + } + return res; + }; + + Red.prototype.shl = function shl (a, num) { + this._verify1(a); + return this.imod(a.ushln(num)); + }; + + Red.prototype.imul = function imul (a, b) { + this._verify2(a, b); + return this.imod(a.imul(b)); + }; + + Red.prototype.mul = function mul (a, b) { + this._verify2(a, b); + return this.imod(a.mul(b)); + }; + + Red.prototype.isqr = function isqr (a) { + return this.imul(a, a.clone()); + }; + + Red.prototype.sqr = function sqr (a) { + return this.mul(a, a); + }; + + Red.prototype.sqrt = function sqrt (a) { + if (a.isZero()) return a.clone(); + + var mod3 = this.m.andln(3); + assert(mod3 % 2 === 1); + + // Fast case + if (mod3 === 3) { + var pow = this.m.add(new BN(1)).iushrn(2); + return this.pow(a, pow); + } + + // Tonelli-Shanks algorithm (Totally unoptimized and slow) + // + // Find Q and S, that Q * 2 ^ S = (P - 1) + var q = this.m.subn(1); + var s = 0; + while (!q.isZero() && q.andln(1) === 0) { + s++; + q.iushrn(1); + } + assert(!q.isZero()); + + var one = new BN(1).toRed(this); + var nOne = one.redNeg(); + + // Find quadratic non-residue + // NOTE: Max is such because of generalized Riemann hypothesis. + var lpow = this.m.subn(1).iushrn(1); + var z = this.m.bitLength(); + z = new BN(2 * z * z).toRed(this); + + while (this.pow(z, lpow).cmp(nOne) !== 0) { + z.redIAdd(nOne); + } + + var c = this.pow(z, q); + var r = this.pow(a, q.addn(1).iushrn(1)); + var t = this.pow(a, q); + var m = s; + while (t.cmp(one) !== 0) { + var tmp = t; + for (var i = 0; tmp.cmp(one) !== 0; i++) { + tmp = tmp.redSqr(); + } + assert(i < m); + var b = this.pow(c, new BN(1).iushln(m - i - 1)); + + r = r.redMul(b); + c = b.redSqr(); + t = t.redMul(c); + m = i; + } + + return r; + }; + + Red.prototype.invm = function invm (a) { + var inv = a._invmp(this.m); + if (inv.negative !== 0) { + inv.negative = 0; + return this.imod(inv).redNeg(); + } else { + return this.imod(inv); + } + }; + + Red.prototype.pow = function pow (a, num) { + if (num.isZero()) return new BN(1).toRed(this); + if (num.cmpn(1) === 0) return a.clone(); + + var windowSize = 4; + var wnd = new Array(1 << windowSize); + wnd[0] = new BN(1).toRed(this); + wnd[1] = a; + for (var i = 2; i < wnd.length; i++) { + wnd[i] = this.mul(wnd[i - 1], a); + } + + var res = wnd[0]; + var current = 0; + var currentLen = 0; + var start = num.bitLength() % 26; + if (start === 0) { + start = 26; + } + + for (i = num.length - 1; i >= 0; i--) { + var word = num.words[i]; + for (var j = start - 1; j >= 0; j--) { + var bit = (word >> j) & 1; + if (res !== wnd[0]) { + res = this.sqr(res); + } + + if (bit === 0 && current === 0) { + currentLen = 0; + continue; + } + + current <<= 1; + current |= bit; + currentLen++; + if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; + + res = this.mul(res, wnd[current]); + currentLen = 0; + current = 0; + } + start = 26; + } + + return res; + }; + + Red.prototype.convertTo = function convertTo (num) { + var r = num.umod(this.m); + + return r === num ? r.clone() : r; + }; + + Red.prototype.convertFrom = function convertFrom (num) { + var res = num.clone(); + res.red = null; + return res; + }; + + // + // Montgomery method engine + // + + BN.mont = function mont (num) { + return new Mont(num); + }; + + function Mont (m) { + Red.call(this, m); + + this.shift = this.m.bitLength(); + if (this.shift % 26 !== 0) { + this.shift += 26 - (this.shift % 26); + } + + this.r = new BN(1).iushln(this.shift); + this.r2 = this.imod(this.r.sqr()); + this.rinv = this.r._invmp(this.m); + + this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); + this.minv = this.minv.umod(this.r); + this.minv = this.r.sub(this.minv); + } + inherits(Mont, Red); + + Mont.prototype.convertTo = function convertTo (num) { + return this.imod(num.ushln(this.shift)); + }; + + Mont.prototype.convertFrom = function convertFrom (num) { + var r = this.imod(num.mul(this.rinv)); + r.red = null; + return r; + }; + + Mont.prototype.imul = function imul (a, b) { + if (a.isZero() || b.isZero()) { + a.words[0] = 0; + a.length = 1; + return a; + } + + var t = a.imul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.mul = function mul (a, b) { + if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); + + var t = a.mul(b); + var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); + var u = t.isub(c).iushrn(this.shift); + var res = u; + if (u.cmp(this.m) >= 0) { + res = u.isub(this.m); + } else if (u.cmpn(0) < 0) { + res = u.iadd(this.m); + } + + return res._forceRed(this); + }; + + Mont.prototype.invm = function invm (a) { + // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R + var res = this.imod(a._invmp(this.m).mul(this.r2)); + return res._forceRed(this); + }; +})(typeof module === 'undefined' || module, this); diff --git a/tests/node_modules/bn.js/package.json b/tests/node_modules/bn.js/package.json new file mode 100644 index 0000000..4994435 --- /dev/null +++ b/tests/node_modules/bn.js/package.json @@ -0,0 +1,39 @@ +{ + "name": "bn.js", + "version": "5.2.0", + "description": "Big number implementation in pure javascript", + "keywords": [ + "BN", + "Big number", + "BigNum", + "Modulo", + "Montgomery" + ], + "homepage": "https://github.com/indutny/bn.js", + "bugs": { + "url": "https://github.com/indutny/bn.js/issues" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/bn.js" + }, + "license": "MIT", + "author": "Fedor Indutny ", + "files": [ + "lib/bn.js" + ], + "main": "lib/bn.js", + "browser": { + "buffer": false + }, + "scripts": { + "lint": "standardx", + "test": "npm run lint && npm run unit", + "unit": "mocha --reporter=spec test/*-test.js" + }, + "devDependencies": { + "eslint-plugin-es5": "^1.5.0", + "mocha": "^8.3.0", + "standardx": "^7.0.0" + } +} diff --git a/tests/node_modules/borsh/.eslintrc.yml b/tests/node_modules/borsh/.eslintrc.yml new file mode 100644 index 0000000..e9c92a7 --- /dev/null +++ b/tests/node_modules/borsh/.eslintrc.yml @@ -0,0 +1,21 @@ +env: + es6: true + node: true +extends: + - 'eslint:recommended' +parserOptions: + ecmaVersion: 2018 +rules: + indent: + - error + - 4 + linebreak-style: + - error + - unix + quotes: + - error + - single + semi: + - error + - always + no-console: 0 diff --git a/tests/node_modules/borsh/.travis.yml b/tests/node_modules/borsh/.travis.yml new file mode 100644 index 0000000..7083439 --- /dev/null +++ b/tests/node_modules/borsh/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - 12 + +before_script: + - "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash" + +script: + - fossa init + - fossa analyze --server-scan + - fossa test diff --git a/tests/node_modules/borsh/CNAME b/tests/node_modules/borsh/CNAME new file mode 100644 index 0000000..d329411 --- /dev/null +++ b/tests/node_modules/borsh/CNAME @@ -0,0 +1 @@ +borsh.io \ No newline at end of file diff --git a/tests/node_modules/borsh/CODEOWNERS b/tests/node_modules/borsh/CODEOWNERS new file mode 100644 index 0000000..662efce --- /dev/null +++ b/tests/node_modules/borsh/CODEOWNERS @@ -0,0 +1 @@ +* @volovyk-s @ailisp diff --git a/tests/node_modules/borsh/LICENSE-APACHE b/tests/node_modules/borsh/LICENSE-APACHE new file mode 100644 index 0000000..263ddc7 --- /dev/null +++ b/tests/node_modules/borsh/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Near + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tests/node_modules/borsh/LICENSE-MIT.txt b/tests/node_modules/borsh/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/tests/node_modules/borsh/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/borsh/README.md b/tests/node_modules/borsh/README.md new file mode 100644 index 0000000..fc3beb2 --- /dev/null +++ b/tests/node_modules/borsh/README.md @@ -0,0 +1,83 @@ +# Borsh JS + +[![Project license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![Project license](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) +[![Discord](https://img.shields.io/discord/490367152054992913?label=discord)](https://discord.gg/Vyp7ETM) +[![Travis status](https://travis-ci.com/near/borsh.svg?branch=master)](https://travis-ci.com/near/borsh-js) +[![NPM version](https://img.shields.io/npm/v/borsh.svg?style=flat-square)](https://npmjs.com/borsh) +[![Size on NPM](https://img.shields.io/bundlephobia/minzip/borsh.svg?style=flat-square)](https://npmjs.com/borsh) + +**Borsh JS** is an implementation of the [Borsh] binary serialization format for +JavaScript and TypeScript projects. + +Borsh stands for _Binary Object Representation Serializer for Hashing_. It is meant to be used in security-critical projects as it prioritizes consistency, +safety, speed, and comes with a strict specification. + +## Examples +### Serializing an object +```javascript +const value = new Test({ x: 255, y: 20, z: '123', q: [1, 2, 3] }); +const schema = new Map([[Test, { kind: 'struct', fields: [['x', 'u8'], ['y', 'u64'], ['z', 'string'], ['q', [3]]] }]]); +const buffer = borsh.serialize(schema, value); +``` + +### Deserializing an object +```javascript +const newValue = borsh.deserialize(schema, Test, buffer); +``` + +## Type Mappings + +| Borsh | TypeScript | +|-----------------------|----------------| +| `u8` integer | `number` | +| `u16` integer | `number` | +| `u32` integer | `number` | +| `u64` integer | `BN` | +| `u128` integer | `BN` | +| `u256` integer | `BN` | +| `u512` integer | `BN` | +| `f32` float | N/A | +| `f64` float | N/A | +| fixed-size byte array | `Uint8Array` | +| UTF-8 string | `string` | +| option | `null` or type | +| map | N/A | +| set | N/A | +| structs | `any` | + +## Contributing + +Install dependencies: +```bash +yarn install +``` + +Continuously build with: +```bash +yarn dev +``` + +Run tests: +```bash +yarn test +``` + +Run linter +```bash +yarn lint +``` +## Publish + +Prepare `dist` version by running: +```bash +yarn build +``` + +When publishing to npm use [np](https://github.com/sindresorhus/np). + +# License +This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). +See [LICENSE-MIT](LICENSE-MIT.txt) and [LICENSE-APACHE](LICENSE-APACHE) for details. + +[Borsh]: https://borsh.io diff --git a/tests/node_modules/borsh/borsh-ts/.eslintrc.yml b/tests/node_modules/borsh/borsh-ts/.eslintrc.yml new file mode 100644 index 0000000..2ddf2ee --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/.eslintrc.yml @@ -0,0 +1,18 @@ +env: + es6: true + node: true +extends: + - 'eslint:recommended' + - 'plugin:@typescript-eslint/eslint-recommended' + - 'plugin:@typescript-eslint/recommended' +parser: '@typescript-eslint/parser' +rules: + no-inner-declarations: 1 + '@typescript-eslint/no-explicit-any': 1 + '@typescript-eslint/camelcase': 1 + '@typescript-eslint/explicit-function-return-type': 1 + '@typescript-eslint/no-use-before-define': 1 + +parserOptions: + ecmaVersion: 2018 + sourceType: module \ No newline at end of file diff --git a/tests/node_modules/borsh/borsh-ts/index.ts b/tests/node_modules/borsh/borsh-ts/index.ts new file mode 100644 index 0000000..afeed2a --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/index.ts @@ -0,0 +1,386 @@ +import BN from 'bn.js'; +import bs58 from 'bs58'; + +// TODO: Make sure this polyfill not included when not required +import * as encoding from 'text-encoding-utf-8'; +const TextDecoder = (typeof (global as any).TextDecoder !== 'function') ? encoding.TextDecoder : (global as any).TextDecoder; +const textDecoder = new TextDecoder('utf-8', { fatal: true }); + +export function baseEncode(value: Uint8Array | string): string { + if (typeof(value) === 'string') { + value = Buffer.from(value, 'utf8'); + } + return bs58.encode(Buffer.from(value)); +} + +export function baseDecode(value: string): Buffer { + return Buffer.from(bs58.decode(value)); +} + +const INITIAL_LENGTH = 1024; + +export type Schema = Map; + +export class BorshError extends Error { + originalMessage: string; + fieldPath: string[] = []; + + constructor(message: string) { + super(message); + this.originalMessage = message; + } + + addToFieldPath(fieldName: string) { + this.fieldPath.splice(0, 0, fieldName); + // NOTE: Modifying message directly as jest doesn't use .toString() + this.message = this.originalMessage + ': ' + this.fieldPath.join('.'); + } +} + +/// Binary encoder. +export class BinaryWriter { + buf: Buffer; + length: number; + + public constructor() { + this.buf = Buffer.alloc(INITIAL_LENGTH); + this.length = 0; + } + + maybeResize() { + if (this.buf.length < 16 + this.length) { + this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]); + } + } + + public writeU8(value: number) { + this.maybeResize(); + this.buf.writeUInt8(value, this.length); + this.length += 1; + } + + public writeU16(value: number) { + this.maybeResize(); + this.buf.writeUInt16LE(value, this.length); + this.length += 2; + } + + public writeU32(value: number) { + this.maybeResize(); + this.buf.writeUInt32LE(value, this.length); + this.length += 4; + } + + public writeU64(value: number | BN) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new BN(value).toArray('le', 8))); + } + + public writeU128(value: number | BN) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new BN(value).toArray('le', 16))); + } + + public writeU256(value: number | BN) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new BN(value).toArray('le', 32))); + } + + public writeU512(value: number | BN) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new BN(value).toArray('le', 64))); + } + + private writeBuffer(buffer: Buffer) { + // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser + this.buf = Buffer.concat([Buffer.from(this.buf.subarray(0, this.length)), buffer, Buffer.alloc(INITIAL_LENGTH)]); + this.length += buffer.length; + } + + public writeString(str: string) { + this.maybeResize(); + const b = Buffer.from(str, 'utf8'); + this.writeU32(b.length); + this.writeBuffer(b); + } + + public writeFixedArray(array: Uint8Array) { + this.writeBuffer(Buffer.from(array)); + } + + public writeArray(array: any[], fn: any) { + this.maybeResize(); + this.writeU32(array.length); + for (const elem of array) { + this.maybeResize(); + fn(elem); + } + } + + public toArray(): Uint8Array { + return this.buf.subarray(0, this.length); + } +} + +function handlingRangeError(target: any, propertyKey: string, propertyDescriptor: PropertyDescriptor) { + const originalMethod = propertyDescriptor.value; + propertyDescriptor.value = function (...args: any[]) { + try { + return originalMethod.apply(this, args); + } catch (e) { + if (e instanceof RangeError) { + const code = (e as any).code; + if (['ERR_BUFFER_OUT_OF_BOUNDS', 'ERR_OUT_OF_RANGE'].indexOf(code) >= 0) { + throw new BorshError('Reached the end of buffer when deserializing'); + } + } + throw e; + } + }; +} + +export class BinaryReader { + buf: Buffer; + offset: number; + + public constructor(buf: Buffer) { + this.buf = buf; + this.offset = 0; + } + + @handlingRangeError + readU8(): number { + const value = this.buf.readUInt8(this.offset); + this.offset += 1; + return value; + } + + @handlingRangeError + readU16(): number { + const value = this.buf.readUInt16LE(this.offset); + this.offset += 2; + return value; + } + + @handlingRangeError + readU32(): number { + const value = this.buf.readUInt32LE(this.offset); + this.offset += 4; + return value; + } + + @handlingRangeError + readU64(): BN { + const buf = this.readBuffer(8); + return new BN(buf, 'le'); + } + + @handlingRangeError + readU128(): BN { + const buf = this.readBuffer(16); + return new BN(buf, 'le'); + } + + @handlingRangeError + readU256(): BN { + const buf = this.readBuffer(32); + return new BN(buf, 'le'); + } + + @handlingRangeError + readU512(): BN { + const buf = this.readBuffer(64); + return new BN(buf, 'le'); + } + + private readBuffer(len: number): Buffer { + if ((this.offset + len) > this.buf.length) { + throw new BorshError(`Expected buffer length ${len} isn't within bounds`); + } + const result = this.buf.slice(this.offset, this.offset + len); + this.offset += len; + return result; + } + + @handlingRangeError + readString(): string { + const len = this.readU32(); + const buf = this.readBuffer(len); + try { + // NOTE: Using TextDecoder to fail on invalid UTF-8 + return textDecoder.decode(buf); + } catch (e) { + throw new BorshError(`Error decoding UTF-8 string: ${e}`); + } + } + + @handlingRangeError + readFixedArray(len: number): Uint8Array { + return new Uint8Array(this.readBuffer(len)); + } + + @handlingRangeError + readArray(fn: any): any[] { + const len = this.readU32(); + const result = Array(); + for (let i = 0; i < len; ++i) { + result.push(fn()); + } + return result; + } +} + +function capitalizeFirstLetter(string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + +function serializeField(schema: Schema, fieldName: string, value: any, fieldType: any, writer: any) { + try { + // TODO: Handle missing values properly (make sure they never result in just skipped write) + if (typeof fieldType === 'string') { + writer[`write${capitalizeFirstLetter(fieldType)}`](value); + + } else if (fieldType instanceof Array) { + if (typeof fieldType[0] === 'number') { + if (value.length !== fieldType[0]) { + throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`); + } + writer.writeFixedArray(value); + } else { + writer.writeArray(value, (item: any) => { serializeField(schema, fieldName, item, fieldType[0], writer); }); + } + } else if (fieldType.kind !== undefined) { + switch (fieldType.kind) { + case 'option': { + if (value === null || value === undefined) { + writer.writeU8(0); + } else { + writer.writeU8(1); + serializeField(schema, fieldName, value, fieldType.type, writer); + } + break; + } + default: throw new BorshError(`FieldType ${fieldType} unrecognized`); + } + } else { + serializeStruct(schema, value, writer); + } + } catch (error) { + if (error instanceof BorshError) { + error.addToFieldPath(fieldName); + } + throw error; + } +} + +function serializeStruct(schema: Schema, obj: any, writer: any) { + const structSchema = schema.get(obj.constructor); + if (!structSchema) { + throw new BorshError(`Class ${obj.constructor.name} is missing in schema`); + } + if (structSchema.kind === 'struct') { + structSchema.fields.map(([fieldName, fieldType]: [any, any]) => { + serializeField(schema, fieldName, obj[fieldName], fieldType, writer); + }); + } else if (structSchema.kind === 'enum') { + const name = obj[structSchema.field]; + for (let idx = 0; idx < structSchema.values.length; ++idx) { + const [fieldName, fieldType]: [any, any] = structSchema.values[idx]; + if (fieldName === name) { + writer.writeU8(idx); + serializeField(schema, fieldName, obj[fieldName], fieldType, writer); + break; + } + } + } else { + throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`); + } +} + +/// Serialize given object using schema of the form: +/// { class_name -> [ [field_name, field_type], .. ], .. } +export function serialize(schema: Schema, obj: any): Uint8Array { + const writer = new BinaryWriter(); + serializeStruct(schema, obj, writer); + return writer.toArray(); +} + +function deserializeField(schema: Schema, fieldName: string, fieldType: any, reader: BinaryReader): any { + try { + if (typeof fieldType === 'string') { + return reader[`read${capitalizeFirstLetter(fieldType)}`](); + } + + if (fieldType instanceof Array) { + if (typeof fieldType[0] === 'number') { + return reader.readFixedArray(fieldType[0]); + } + + return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader)); + } + + if (fieldType.kind === 'option') { + const option = reader.readU8(); + if (option) { + return deserializeField( + schema, + fieldName, + fieldType.type, + reader + ); + } + + return undefined; + } + + return deserializeStruct(schema, fieldType, reader); + } catch (error) { + if (error instanceof BorshError) { + error.addToFieldPath(fieldName); + } + throw error; + } +} + +function deserializeStruct(schema: Schema, classType: any, reader: BinaryReader) { + const structSchema = schema.get(classType); + if (!structSchema) { + throw new BorshError(`Class ${classType.name} is missing in schema`); + } + + if (structSchema.kind === 'struct') { + const result = {}; + for (const [fieldName, fieldType] of schema.get(classType).fields) { + result[fieldName] = deserializeField(schema, fieldName, fieldType, reader); + } + return new classType(result); + } + + if (structSchema.kind === 'enum') { + const idx = reader.readU8(); + if (idx >= structSchema.values.length) { + throw new BorshError(`Enum index: ${idx} is out of range`); + } + const [fieldName, fieldType] = structSchema.values[idx]; + const fieldValue = deserializeField(schema, fieldName, fieldType, reader); + return new classType({ [fieldName]: fieldValue }); + } + + throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`); +} + +/// Deserializes object from bytes using schema. +export function deserialize(schema: Schema, classType: any, buffer: Buffer): any { + const reader = new BinaryReader(buffer); + const result = deserializeStruct(schema, classType, reader); + if (reader.offset < buffer.length) { + throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`); + } + return result; +} + +/// Deserializes object from bytes using schema, without checking the length read +export function deserializeUnchecked(schema: Schema, classType: any, buffer: Buffer): any { + const reader = new BinaryReader(buffer); + return deserializeStruct(schema, classType, reader); +} diff --git a/tests/node_modules/borsh/borsh-ts/test/.eslintrc.yml b/tests/node_modules/borsh/borsh-ts/test/.eslintrc.yml new file mode 100644 index 0000000..ab46369 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/.eslintrc.yml @@ -0,0 +1,3 @@ +extends: '../../.eslintrc.yml' +env: + jest: true diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/borsh-roundtrip.js b/tests/node_modules/borsh/borsh-ts/test/fuzz/borsh-roundtrip.js new file mode 100644 index 0000000..f790375 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/borsh-roundtrip.js @@ -0,0 +1,19 @@ +const borsh = require('../../../lib/index.js'); +const transaction = require('./transaction-example/transaction'); + +exports.fuzz = input => { + try { + const deserialized = borsh.deserialize(transaction.SCHEMA, transaction.Transaction, input); + const serialized = borsh.serialize(transaction.SCHEMA, deserialized); + if (!serialized.equals(input)) { + console.log(`Mismatching output:\n${serialized.toString('hex')}\nand input:\n${input.toString('hex')}`); + throw new Error('Mismatching input and output'); + } + } catch (e) { + if (e instanceof borsh.BorshError) { + // Do nothing + } else { + throw e; + } + } +}; \ No newline at end of file diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/004b705c22403d1c22ceab37181f6340b5b269b7faee05d97fe65b1ab91cd171 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/004b705c22403d1c22ceab37181f6340b5b269b7faee05d97fe65b1ab91cd171 new file mode 100644 index 0000000000000000000000000000000000000000..fcfea9a29697dc2d94ce838889c3553ef75f0a19 GIT binary patch literal 160 zcmZQz0D{Vx?OVSVnLc;ASUO?Sher&B3(jhP=9ABmZQx6v94FAh2vP(DVnAG6Qks&P zuUl50?3-F#oLFj^YGRn{`@Xrlxz%|lzj4F*J}nFJyWja=PGdCPwDwX|`fM%6w;%(U ixPU}rN(xw8dMY=NSFKc%T2Z28rKD8b&>{yEzytt67B2As literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/25b2da453a8cb0d574d31a06f0a57fc7b5f2cb5c08ba00ff900a79ebd0637da7 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/25b2da453a8cb0d574d31a06f0a57fc7b5f2cb5c08ba00ff900a79ebd0637da7 new file mode 100644 index 0000000000000000000000000000000000000000..3e55b9a7f45b59ea242c6cdbd0dee8f1d4104891 GIT binary patch literal 163 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn$iPsoRFYaz0#XbF z0zh0`Qks&PuUl50TxywWVwmguzPY-&)p;hral`sPEer9x-}zroV>I2g_EJ>(Y%RvO lKrMGh!{2>`26FGm0X literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/2f6f8117189cb82e111a13b3ffb19fcaf35deef41f8c084726c5aac5a4551696 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/2f6f8117189cb82e111a13b3ffb19fcaf35deef41f8c084726c5aac5a4551696 new file mode 100644 index 0000000000000000000000000000000000000000..9f09c84d6a89cc14a382a943328c8fd347767bd0 GIT binary patch literal 168 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn$iPsoRFYaz0#y3| zhy{SSxTG{CGher?Jh{{|)xe&f~n?K=b8M*4eR@~OvLYg=YKhk(QMP&OHt{wwHV)m3}E5{ k5{W4(zNy8i3><1 nrlk0$78fU`!*!-|1BI)VN>VFIl&qALY8zVQfC5M$62b-mG&nH7 literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/67fc403d488908e0a27d74a2de056c34c40850bbe61b9ebc82cf48365484f4fc b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/67fc403d488908e0a27d74a2de056c34c40850bbe61b9ebc82cf48365484f4fc new file mode 100644 index 0000000000000000000000000000000000000000..77435fee1f33b572c943a5939a934f1d0d8d127a GIT binary patch literal 155 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn2vP(D0zh0`Qks&P zuUl50TxywWVwmguzPY-&)p;hral`sPEer9x-}zroV>I2g_EJ>(Y%RvOAiYdnKq4_E g#W%IMI59ny8_26xDoL#bI0}5aQ01<&Ki3>=; cc(^b literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/824d229c23c200a937bcd558a5c55d25830a8efffb9e8661a81e2db3584ca512 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/824d229c23c200a937bcd558a5c55d25830a8efffb9e8661a81e2db3584ca512 new file mode 100644 index 0000000000000000000000000000000000000000..f7c9ac58b4c75f59f733b9ea2d09e7f718b858af GIT binary patch literal 155 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn2vWr0#vlMBi%UvV zGV^uI%9BeiQ%wwWecv}%H@7;^i3><1 irlk0$78fU`r*Z>%)k-C)6(vemN=mg2Epk8sOaK5dAuTHa literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/9d6a787b7d95c13bb67d02137cf3e506f550fcfa19363050d1e4917250d83d32 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/9d6a787b7d95c13bb67d02137cf3e506f550fcfa19363050d1e4917250d83d32 new file mode 100644 index 0000000000000000000000000000000000000000..630b94ad0b64803456fe83b17806ed1c307dc17f GIT binary patch literal 168 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn$iPsoRFYaz0#XbF z0zh0`Qks&PuUl50TxywWVwjutzPY-&)p;hral`sPEer9x-}zroV>I2g_EJ>(Y%RvO oKre&f~n?K=b8M*4eR@~EX41A=YKhk(QMP&OHt{wwHV)m3}E5{ k5{W4(zNy8ecv}%H@7;^7e+ZXmB(sU)?cM9E4?skWg-4k!QyzZe*R2nqm>U@)}+ literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/b7361e727623b1cdafda1411e27c119009d0fcccbdddd5fe669c8c02bf04f7dd b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/b7361e727623b1cdafda1411e27c119009d0fcccbdddd5fe669c8c02bf04f7dd new file mode 100644 index 0000000000000000000000000000000000000000..d0f9ae0329c0ca85e30e55962b0d41ade18cc9cd GIT binary patch literal 170 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn2vWr0#vlMBi%UvV zGF|F#&3%48U$?A0xzsY%#4y+QeRFkltMg2L2{g&QxxoaJ5oNYDI~Xm6B3zLyH_x00~4w*Z^FmG_L>v literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/b98f80e8a618038000215158136c1f2dbd9ed3cad450556faf7b18db4184b42e b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/b98f80e8a618038000215158136c1f2dbd9ed3cad450556faf7b18db4184b42e new file mode 100644 index 0000000000000000000000000000000000000000..0181e35d13a2d5fe0a567dd7e7fa99296ad0245a GIT binary patch literal 155 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn2vWqr$RGeDi%UvV zGV^uI%9BeiQ%wwWecv}%H@7;^i3><1 irlk0$78fU`r*Z>%)k-C)6(vemN=mg2Epk8sOaK4|-YmHQ literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/bec080831059d96afd82176d6e8ee36819bb22b7304f4e23f61d189a6c221f92 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/bec080831059d96afd82176d6e8ee36819bb22b7304f4e23f61d189a6c221f92 new file mode 100644 index 0000000000000000000000000000000000000000..b04b3f05854aa3d7637fae48b14de189d4a50cb6 GIT binary patch literal 164 zcmZQz0D{Vx?OVSVnLc+)ES)gv!y|^m1!uKC^T}t(Ht?lSjuYr$1StXnF(583DNV`D z*DWhg_DwA=zF2CRYGRn{`@Xrlxz%|lzj4F*KCPG27)v*;y%d!`TZZv1NG}r?kVs5P o0qICgFHeSQO63L$S1XmIR+K1NDJj)9w8#MkV3q-ykw6Rt0QN{QR{#J2 literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/cf94b13d93b7accf950d3d2a1be308f7d25d21f81622a7ffc7da3733c03eb572 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/cf94b13d93b7accf950d3d2a1be308f7d25d21f81622a7ffc7da3733c03eb572 new file mode 100644 index 0000000000000000000000000000000000000000..5ade500ec2b0052071865b84132da79f2fe64e4a GIT binary patch literal 160 zcmZQz0D{Vx?OVSVnLc;ASUO?Sher&B3(jhP=9ABmZQx6v94FAh$WRMX#vlg7#U-UF znfbb9<;ibTi;ELWEmKVlbA8`8S2wph&*V35Sl_2*A%6Ee|I2BNrkmDYib|iY#pufj m)X2mIBob3nd_mgMQ@Me>YNe9YiV`I&B_)Q27CE2*CIA46HZJi1 literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/d2897d4dc13f861fb5e7caf8e5b7e1c9962a36c8489ada9cb0f798c1ec967eb7 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/d2897d4dc13f861fb5e7caf8e5b7e1c9962a36c8489ada9cb0f798c1ec967eb7 new file mode 100644 index 0000000000000000000000000000000000000000..86c116b9414d856cb4b88364dfc37699623ba442 GIT binary patch literal 109 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn2vP(D0zh0`Qks&P wuUl50TxywWVwmguzPY-&)p;hral`sPEer9x-}zroV>I2g_EJi3><1 lrlk0$78fU`r*Z>%)k-C)6(vemN=mg2Epk8sG>~dy2mt&aEnolu literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/e08ccfae0c2fd6432c8e1bf841050f0b2d78fa519ac76f178db0757d1bd3e96e b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/e08ccfae0c2fd6432c8e1bf841050f0b2d78fa519ac76f178db0757d1bd3e96e new file mode 100644 index 0000000000000000000000000000000000000000..212ab60fe57278568a39376e388dee96da8129a1 GIT binary patch literal 174 zcmZQz0D{Vx?OVSVDLr?(SUO?Sher&B3(jhP=9ABmZQx6v94FSn2vWr0#vlMBi%UvV zGV^uI%9BeiznB>2`o3?jZf2kA@&=}hGY3Rf$Yq*jzDSt%*iHnhkA1z-T-7NAHZL=*tFkT+%k literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/ecd71b60d1820dbbcb06d1f981ab86d16876888bb7ba665637c5717c0a8916b2 b/tests/node_modules/borsh/borsh-ts/test/fuzz/corpus/ecd71b60d1820dbbcb06d1f981ab86d16876888bb7ba665637c5717c0a8916b2 new file mode 100644 index 0000000000000000000000000000000000000000..82dc8f8e8159af961fe9392b5612129507348459 GIT binary patch literal 155 zcmZQz0D{Vx?OVSVDLr?(SUO>nz$1pj1!uKC^T}t(Ht?lSjuY!(1Sw*0V-Nt6#U-UF znfbb9<;kU%A508$ecv}%H@7;^i3><1 irlk0$78fU`r*Z>%)k-C)6(vemN=mg2Epk8sOaK7uJS^4# literal 0 HcmV?d00001 diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.d.ts b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.d.ts new file mode 100644 index 0000000..4d0a3da --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.d.ts @@ -0,0 +1,7 @@ +export declare abstract class Enum { + enum: string; + constructor(properties: any); +} +export declare abstract class Assignable { + constructor(properties: any); +} diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.js b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.js new file mode 100644 index 0000000..68d950c --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/enums.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class Enum { + constructor(properties) { + if (Object.keys(properties).length !== 1) { + throw new Error('Enum can only take single value'); + } + Object.keys(properties).map((key) => { + this[key] = properties[key]; + this.enum = key; + }); + } +} +exports.Enum = Enum; +class Assignable { + constructor(properties) { + Object.keys(properties).map((key) => { + this[key] = properties[key]; + }); + } +} +exports.Assignable = Assignable; diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.d.ts b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.d.ts new file mode 100644 index 0000000..cf7a473 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.d.ts @@ -0,0 +1,61 @@ +import { Assignable } from './enums'; +export declare type Arrayish = string | ArrayLike; +export interface Signature { + signature: Uint8Array; + publicKey: PublicKey; +} +/** All supported key types */ +export declare enum KeyType { + ED25519 = 0 +} +/** + * PublicKey representation that has type and bytes of the key. + */ +export declare class PublicKey extends Assignable { + keyType: KeyType; + data: Uint8Array; + static from(value: string | PublicKey): PublicKey; + static fromString(encodedKey: string): PublicKey; + toString(): string; +} +export declare abstract class KeyPair { + abstract sign(message: Uint8Array): Signature; + abstract verify(message: Uint8Array, signature: Uint8Array): boolean; + abstract toString(): string; + abstract getPublicKey(): PublicKey; + /** + * @param curve Name of elliptical curve, case-insensitive + * @returns Random KeyPair based on the curve + */ + static fromRandom(curve: string): KeyPair; + static fromString(encodedKey: string): KeyPair; +} +/** + * This class provides key pair functionality for Ed25519 curve: + * generating key pairs, encoding key pairs, signing and verifying. + */ +export declare class KeyPairEd25519 extends KeyPair { + readonly publicKey: PublicKey; + readonly secretKey: string; + /** + * Construct an instance of key pair given a secret key. + * It's generally assumed that these are encoded in base58. + * @param {string} secretKey + */ + constructor(secretKey: string); + /** + * Generate a new random keypair. + * @example + * const keyRandom = KeyPair.fromRandom(); + * keyRandom.publicKey + * // returns [PUBLIC_KEY] + * + * keyRandom.secretKey + * // returns [SECRET_KEY] + */ + static fromRandom(): KeyPairEd25519; + sign(message: Uint8Array): Signature; + verify(message: Uint8Array, signature: Uint8Array): boolean; + toString(): string; + getPublicKey(): PublicKey; +} diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.js b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.js new file mode 100644 index 0000000..16182d5 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/key_pair.js @@ -0,0 +1,125 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const tweetnacl_1 = __importDefault(require("tweetnacl")); +const serialize_1 = require("./serialize"); +const enums_1 = require("./enums"); +/** All supported key types */ +var KeyType; +(function (KeyType) { + KeyType[KeyType["ED25519"] = 0] = "ED25519"; +})(KeyType = exports.KeyType || (exports.KeyType = {})); +function key_type_to_str(keyType) { + switch (keyType) { + case KeyType.ED25519: return 'ed25519'; + default: throw new Error(`Unknown key type ${keyType}`); + } +} +function str_to_key_type(keyType) { + switch (keyType.toLowerCase()) { + case 'ed25519': return KeyType.ED25519; + default: throw new Error(`Unknown key type ${keyType}`); + } +} +/** + * PublicKey representation that has type and bytes of the key. + */ +class PublicKey extends enums_1.Assignable { + static from(value) { + if (typeof value === 'string') { + return PublicKey.fromString(value); + } + return value; + } + static fromString(encodedKey) { + const parts = encodedKey.split(':'); + if (parts.length === 1) { + return new PublicKey({ keyType: KeyType.ED25519, data: serialize_1.base_decode(parts[0]) }); + } + else if (parts.length === 2) { + return new PublicKey({ keyType: str_to_key_type(parts[0]), data: serialize_1.base_decode(parts[1]) }); + } + else { + throw new Error('Invalid encoded key format, must be :'); + } + } + toString() { + return `${key_type_to_str(this.keyType)}:${serialize_1.base_encode(this.data)}`; + } +} +exports.PublicKey = PublicKey; +class KeyPair { + /** + * @param curve Name of elliptical curve, case-insensitive + * @returns Random KeyPair based on the curve + */ + static fromRandom(curve) { + switch (curve.toUpperCase()) { + case 'ED25519': return KeyPairEd25519.fromRandom(); + default: throw new Error(`Unknown curve ${curve}`); + } + } + static fromString(encodedKey) { + const parts = encodedKey.split(':'); + if (parts.length === 1) { + return new KeyPairEd25519(parts[0]); + } + else if (parts.length === 2) { + switch (parts[0].toUpperCase()) { + case 'ED25519': return new KeyPairEd25519(parts[1]); + default: throw new Error(`Unknown curve: ${parts[0]}`); + } + } + else { + throw new Error('Invalid encoded key format, must be :'); + } + } +} +exports.KeyPair = KeyPair; +/** + * This class provides key pair functionality for Ed25519 curve: + * generating key pairs, encoding key pairs, signing and verifying. + */ +class KeyPairEd25519 extends KeyPair { + /** + * Construct an instance of key pair given a secret key. + * It's generally assumed that these are encoded in base58. + * @param {string} secretKey + */ + constructor(secretKey) { + super(); + const keyPair = tweetnacl_1.default.sign.keyPair.fromSecretKey(serialize_1.base_decode(secretKey)); + this.publicKey = new PublicKey({ keyType: KeyType.ED25519, data: keyPair.publicKey }); + this.secretKey = secretKey; + } + /** + * Generate a new random keypair. + * @example + * const keyRandom = KeyPair.fromRandom(); + * keyRandom.publicKey + * // returns [PUBLIC_KEY] + * + * keyRandom.secretKey + * // returns [SECRET_KEY] + */ + static fromRandom() { + const newKeyPair = tweetnacl_1.default.sign.keyPair(); + return new KeyPairEd25519(serialize_1.base_encode(newKeyPair.secretKey)); + } + sign(message) { + const signature = tweetnacl_1.default.sign.detached(message, serialize_1.base_decode(this.secretKey)); + return { signature, publicKey: this.publicKey }; + } + verify(message, signature) { + return tweetnacl_1.default.sign.detached.verify(message, signature, this.publicKey.data); + } + toString() { + return `ed25519:${this.secretKey}`; + } + getPublicKey() { + return this.publicKey; + } +} +exports.KeyPairEd25519 = KeyPairEd25519; diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.d.ts b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.d.ts new file mode 100644 index 0000000..6db96b5 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.d.ts @@ -0,0 +1,41 @@ +/// +import BN from 'bn.js'; +export declare function base_encode(value: Uint8Array | string): string; +export declare function base_decode(value: string): Uint8Array; +export declare type Schema = Map; +export declare class BorshError extends Error { + originalMessage: string; + fieldPath: string[]; + constructor(message: string); + addToFieldPath(fieldName: string): void; +} +export declare class BinaryWriter { + buf: Buffer; + length: number; + constructor(); + maybe_resize(): void; + write_u8(value: number): void; + write_u32(value: number): void; + write_u64(value: BN): void; + write_u128(value: BN): void; + private write_buffer; + write_string(str: string): void; + write_fixed_array(array: Uint8Array): void; + write_array(array: any[], fn: any): void; + toArray(): Uint8Array; +} +export declare class BinaryReader { + buf: Buffer; + offset: number; + constructor(buf: Buffer); + read_u8(): number; + read_u32(): number; + read_u64(): BN; + read_u128(): BN; + private read_buffer; + read_string(): string; + read_fixed_array(len: number): Uint8Array; + read_array(fn: any): any[]; +} +export declare function serialize(schema: Schema, obj: any): Uint8Array; +export declare function deserialize(schema: Schema, classType: any, buffer: Buffer): any; diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.js b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.js new file mode 100644 index 0000000..8084fc5 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/serialize.js @@ -0,0 +1,16 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const bs58_1 = __importDefault(require("bs58")); +function base_encode(value) { + if (typeof (value) === 'string') { + value = Buffer.from(value, 'utf8'); + } + return bs58_1.default.encode(Buffer.from(value)); +} +exports.base_encode = base_encode; +function base_decode(value) { + return Buffer.from(bs58_1.default.decode(value)); +} +exports.base_decode = base_decode; diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.d.ts b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.d.ts new file mode 100644 index 0000000..36775b6 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.d.ts @@ -0,0 +1,63 @@ +import { Signature, KeyPair, PublicKey } from './key_pair'; +import { KeyStore } from './key_stores'; +/** + * General signing interface, can be used for in memory signing, RPC singing, external wallet, HSM, etc. + */ +export declare abstract class Signer { + /** + * Creates new key and returns public key. + */ + abstract createKey(accountId: string, networkId?: string): Promise; + /** + * Returns public key for given account / network. + * @param accountId accountId to retrieve from. + * @param networkId The targeted network. (ex. default, betanet, etc…) + */ + abstract getPublicKey(accountId?: string, networkId?: string): Promise; + /** + * Signs given message, by first hashing with sha256. + * @param message message to sign. + * @param accountId accountId to use for signing. + * @param networkId The targeted network. (ex. default, betanet, etc…) + */ + abstract signMessage(message: Uint8Array, accountId?: string, networkId?: string): Promise; +} +/** + * Signs using in memory key store. + */ +export declare class InMemorySigner extends Signer { + readonly keyStore: KeyStore; + constructor(keyStore: KeyStore); + /** + * Creates a single account Signer instance with account, network and keyPair provided. + * + * Intended to be useful for temporary keys (e.g. claiming a Linkdrop). + * + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @param accountId The NEAR account to assign the key pair to + * @param keyPair The keyPair to use for signing + */ + static fromKeyPair(networkId: string, accountId: string, keyPair: KeyPair): Promise; + /** + * Creates a public key for the account given + * @param accountId The NEAR account to assign a public key to + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @returns {Promise} + */ + createKey(accountId: string, networkId: string): Promise; + /** + * Gets the existing public key for a given account + * @param accountId The NEAR account to assign a public key to + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @returns {Promise} Returns the public key or null if not found + */ + getPublicKey(accountId?: string, networkId?: string): Promise; + /** + * @param message A message to be signed, typically a serialized transaction + * @param accountId the NEAR account signing the message + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @returns {Promise} + */ + signMessage(message: Uint8Array, accountId?: string, networkId?: string): Promise; + toString(): string; +} diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.js b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.js new file mode 100644 index 0000000..933db3a --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/signer.js @@ -0,0 +1,82 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const js_sha256_1 = __importDefault(require("js-sha256")); +const key_pair_1 = require("./key_pair"); +const key_stores_1 = require("./key_stores"); +/** + * General signing interface, can be used for in memory signing, RPC singing, external wallet, HSM, etc. + */ +class Signer { +} +exports.Signer = Signer; +/** + * Signs using in memory key store. + */ +class InMemorySigner extends Signer { + constructor(keyStore) { + super(); + this.keyStore = keyStore; + } + /** + * Creates a single account Signer instance with account, network and keyPair provided. + * + * Intended to be useful for temporary keys (e.g. claiming a Linkdrop). + * + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @param accountId The NEAR account to assign the key pair to + * @param keyPair The keyPair to use for signing + */ + static async fromKeyPair(networkId, accountId, keyPair) { + const keyStore = new key_stores_1.InMemoryKeyStore(); + await keyStore.setKey(networkId, accountId, keyPair); + return new InMemorySigner(keyStore); + } + /** + * Creates a public key for the account given + * @param accountId The NEAR account to assign a public key to + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @returns {Promise} + */ + async createKey(accountId, networkId) { + const keyPair = key_pair_1.KeyPair.fromRandom('ed25519'); + await this.keyStore.setKey(networkId, accountId, keyPair); + return keyPair.getPublicKey(); + } + /** + * Gets the existing public key for a given account + * @param accountId The NEAR account to assign a public key to + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @returns {Promise} Returns the public key or null if not found + */ + async getPublicKey(accountId, networkId) { + const keyPair = await this.keyStore.getKey(networkId, accountId); + if (keyPair === null) { + return null; + } + return keyPair.getPublicKey(); + } + /** + * @param message A message to be signed, typically a serialized transaction + * @param accountId the NEAR account signing the message + * @param networkId The targeted network. (ex. default, betanet, etc…) + * @returns {Promise} + */ + async signMessage(message, accountId, networkId) { + const hash = new Uint8Array(js_sha256_1.default.sha256.array(message)); + if (!accountId) { + throw new Error('InMemorySigner requires provided account id'); + } + const keyPair = await this.keyStore.getKey(networkId, accountId); + if (keyPair === null) { + throw new Error(`Key for ${accountId} not found in ${networkId}`); + } + return keyPair.sign(hash); + } + toString() { + return `InMemorySigner(${this.keyStore})`; + } +} +exports.InMemorySigner = InMemorySigner; diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.d.ts b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.d.ts new file mode 100644 index 0000000..bedf27f --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.d.ts @@ -0,0 +1,106 @@ +/// +import BN from 'bn.js'; +import { Enum, Assignable } from './enums'; +import { KeyType, PublicKey } from './key_pair'; +import { Signer } from './signer'; +export declare class FunctionCallPermission extends Assignable { + allowance?: BN; + receiverId: string; + methodNames: string[]; +} +export declare class FullAccessPermission extends Assignable { +} +export declare class AccessKeyPermission extends Enum { + functionCall: FunctionCallPermission; + fullAccess: FullAccessPermission; +} +export declare class AccessKey extends Assignable { + nonce: number; + permission: AccessKeyPermission; +} +export declare function fullAccessKey(): AccessKey; +export declare function functionCallAccessKey(receiverId: string, methodNames: string[], allowance?: BN): AccessKey; +export declare class IAction extends Assignable { +} +export declare class CreateAccount extends IAction { +} +export declare class DeployContract extends IAction { + code: Uint8Array; +} +export declare class FunctionCall extends IAction { + methodName: string; + args: Uint8Array; + gas: BN; + deposit: BN; +} +export declare class Transfer extends IAction { + deposit: BN; +} +export declare class Stake extends IAction { + stake: BN; + publicKey: PublicKey; +} +export declare class AddKey extends IAction { + publicKey: PublicKey; + accessKey: AccessKey; +} +export declare class DeleteKey extends IAction { + publicKey: PublicKey; +} +export declare class DeleteAccount extends IAction { + beneficiaryId: string; +} +export declare function createAccount(): Action; +export declare function deployContract(code: Uint8Array): Action; +/** + * Constructs {@link Action} instance representing contract method call. + * + * @param methodName the name of the method to call + * @param args arguments to pass to method. Can be either plain JS object which gets serialized as JSON automatically + * or `Uint8Array` instance which represents bytes passed as is. + * @param gas max amount of gas that method call can use + * @param deposit amount of NEAR (in yoctoNEAR) to send together with the call + */ +export declare function functionCall(methodName: string, args: Uint8Array | object, gas: BN, deposit: BN): Action; +export declare function transfer(deposit: BN): Action; +export declare function stake(stake: BN, publicKey: PublicKey): Action; +export declare function addKey(publicKey: PublicKey, accessKey: AccessKey): Action; +export declare function deleteKey(publicKey: PublicKey): Action; +export declare function deleteAccount(beneficiaryId: string): Action; +export declare class Signature extends Assignable { + keyType: KeyType; + data: Uint8Array; +} +export declare class Transaction extends Assignable { + signerId: string; + publicKey: PublicKey; + nonce: number; + receiverId: string; + actions: Action[]; + blockHash: Uint8Array; + encode(): Uint8Array; + static decode(bytes: Buffer): Transaction; +} +export declare class SignedTransaction extends Assignable { + transaction: Transaction; + signature: Signature; + encode(): Uint8Array; + static decode(bytes: Buffer): SignedTransaction; +} +/** + * Contains a list of the valid transaction Actions available with this API + */ +export declare class Action extends Enum { + createAccount: CreateAccount; + deployContract: DeployContract; + functionCall: FunctionCall; + transfer: Transfer; + stake: Stake; + addKey: AddKey; + deleteKey: DeleteKey; + deleteAccount: DeleteAccount; +} +export declare const SCHEMA: Map; +export declare function createTransaction(signerId: string, publicKey: PublicKey, receiverId: string, nonce: number, actions: Action[], blockHash: Uint8Array): Transaction; +export declare function signTransaction(transaction: Transaction, signer: Signer, accountId?: string, networkId?: string): Promise<[Uint8Array, SignedTransaction]>; +export declare function signTransaction(receiverId: string, nonce: number, actions: Action[], blockHash: Uint8Array, signer: Signer, accountId?: string, networkId?: string): Promise<[Uint8Array, SignedTransaction]>; diff --git a/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.js b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.js new file mode 100644 index 0000000..a70bcab --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/fuzz/transaction-example/transaction.js @@ -0,0 +1,234 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const js_sha256_1 = __importDefault(require("js-sha256")); +const enums_1 = require("./enums"); +const serialize_1 = require("./serialize"); +const key_pair_1 = require("./key_pair"); +class FunctionCallPermission extends enums_1.Assignable { +} +exports.FunctionCallPermission = FunctionCallPermission; +class FullAccessPermission extends enums_1.Assignable { +} +exports.FullAccessPermission = FullAccessPermission; +class AccessKeyPermission extends enums_1.Enum { +} +exports.AccessKeyPermission = AccessKeyPermission; +class AccessKey extends enums_1.Assignable { +} +exports.AccessKey = AccessKey; +function fullAccessKey() { + return new AccessKey({ nonce: 0, permission: new AccessKeyPermission({ fullAccess: new FullAccessPermission({}) }) }); +} +exports.fullAccessKey = fullAccessKey; +function functionCallAccessKey(receiverId, methodNames, allowance) { + return new AccessKey({ nonce: 0, permission: new AccessKeyPermission({ functionCall: new FunctionCallPermission({ receiverId, allowance, methodNames }) }) }); +} +exports.functionCallAccessKey = functionCallAccessKey; +class IAction extends enums_1.Assignable { +} +exports.IAction = IAction; +class CreateAccount extends IAction { +} +exports.CreateAccount = CreateAccount; +class DeployContract extends IAction { +} +exports.DeployContract = DeployContract; +class FunctionCall extends IAction { +} +exports.FunctionCall = FunctionCall; +class Transfer extends IAction { +} +exports.Transfer = Transfer; +class Stake extends IAction { +} +exports.Stake = Stake; +class AddKey extends IAction { +} +exports.AddKey = AddKey; +class DeleteKey extends IAction { +} +exports.DeleteKey = DeleteKey; +class DeleteAccount extends IAction { +} +exports.DeleteAccount = DeleteAccount; +function createAccount() { + return new Action({ createAccount: new CreateAccount({}) }); +} +exports.createAccount = createAccount; +function deployContract(code) { + return new Action({ deployContract: new DeployContract({ code }) }); +} +exports.deployContract = deployContract; +/** + * Constructs {@link Action} instance representing contract method call. + * + * @param methodName the name of the method to call + * @param args arguments to pass to method. Can be either plain JS object which gets serialized as JSON automatically + * or `Uint8Array` instance which represents bytes passed as is. + * @param gas max amount of gas that method call can use + * @param deposit amount of NEAR (in yoctoNEAR) to send together with the call + */ +function functionCall(methodName, args, gas, deposit) { + const anyArgs = args; + const isUint8Array = anyArgs.byteLength !== undefined && anyArgs.byteLength === anyArgs.length; + const serializedArgs = isUint8Array ? args : Buffer.from(JSON.stringify(args)); + return new Action({ functionCall: new FunctionCall({ methodName, args: serializedArgs, gas, deposit }) }); +} +exports.functionCall = functionCall; +function transfer(deposit) { + return new Action({ transfer: new Transfer({ deposit }) }); +} +exports.transfer = transfer; +function stake(stake, publicKey) { + return new Action({ stake: new Stake({ stake, publicKey }) }); +} +exports.stake = stake; +function addKey(publicKey, accessKey) { + return new Action({ addKey: new AddKey({ publicKey, accessKey }) }); +} +exports.addKey = addKey; +function deleteKey(publicKey) { + return new Action({ deleteKey: new DeleteKey({ publicKey }) }); +} +exports.deleteKey = deleteKey; +function deleteAccount(beneficiaryId) { + return new Action({ deleteAccount: new DeleteAccount({ beneficiaryId }) }); +} +exports.deleteAccount = deleteAccount; +class Signature extends enums_1.Assignable { +} +exports.Signature = Signature; +class Transaction extends enums_1.Assignable { + encode() { + return serialize_1.serialize(exports.SCHEMA, this); + } + static decode(bytes) { + return serialize_1.deserialize(exports.SCHEMA, Transaction, bytes); + } +} +exports.Transaction = Transaction; +class SignedTransaction extends enums_1.Assignable { + encode() { + return serialize_1.serialize(exports.SCHEMA, this); + } + static decode(bytes) { + return serialize_1.deserialize(exports.SCHEMA, SignedTransaction, bytes); + } +} +exports.SignedTransaction = SignedTransaction; +/** + * Contains a list of the valid transaction Actions available with this API + */ +class Action extends enums_1.Enum { +} +exports.Action = Action; +exports.SCHEMA = new Map([ + [Signature, { kind: 'struct', fields: [ + ['keyType', 'u8'], + ['data', [64]] + ] }], + [SignedTransaction, { kind: 'struct', fields: [ + ['transaction', Transaction], + ['signature', Signature] + ] }], + [Transaction, { kind: 'struct', fields: [ + ['signerId', 'string'], + ['publicKey', key_pair_1.PublicKey], + ['nonce', 'u64'], + ['receiverId', 'string'], + ['blockHash', [32]], + ['actions', [Action]] + ] }], + [key_pair_1.PublicKey, { kind: 'struct', fields: [ + ['keyType', 'u8'], + ['data', [32]] + ] }], + [AccessKey, { kind: 'struct', fields: [ + ['nonce', 'u64'], + ['permission', AccessKeyPermission], + ] }], + [AccessKeyPermission, { kind: 'enum', field: 'enum', values: [ + ['functionCall', FunctionCallPermission], + ['fullAccess', FullAccessPermission], + ] }], + [FunctionCallPermission, { kind: 'struct', fields: [ + ['allowance', { kind: 'option', type: 'u128' }], + ['receiverId', 'string'], + ['methodNames', ['string']], + ] }], + [FullAccessPermission, { kind: 'struct', fields: [] }], + [Action, { kind: 'enum', field: 'enum', values: [ + ['createAccount', CreateAccount], + ['deployContract', DeployContract], + ['functionCall', FunctionCall], + ['transfer', Transfer], + ['stake', Stake], + ['addKey', AddKey], + ['deleteKey', DeleteKey], + ['deleteAccount', DeleteAccount], + ] }], + [CreateAccount, { kind: 'struct', fields: [] }], + [DeployContract, { kind: 'struct', fields: [ + ['code', ['u8']] + ] }], + [FunctionCall, { kind: 'struct', fields: [ + ['methodName', 'string'], + ['args', ['u8']], + ['gas', 'u64'], + ['deposit', 'u128'] + ] }], + [Transfer, { kind: 'struct', fields: [ + ['deposit', 'u128'] + ] }], + [Stake, { kind: 'struct', fields: [ + ['stake', 'u128'], + ['publicKey', key_pair_1.PublicKey] + ] }], + [AddKey, { kind: 'struct', fields: [ + ['publicKey', key_pair_1.PublicKey], + ['accessKey', AccessKey] + ] }], + [DeleteKey, { kind: 'struct', fields: [ + ['publicKey', key_pair_1.PublicKey] + ] }], + [DeleteAccount, { kind: 'struct', fields: [ + ['beneficiaryId', 'string'] + ] }], +]); +function createTransaction(signerId, publicKey, receiverId, nonce, actions, blockHash) { + return new Transaction({ signerId, publicKey, nonce, receiverId, actions, blockHash }); +} +exports.createTransaction = createTransaction; +/** + * Signs a given transaction from an account with given keys, applied to the given network + * @param transaction The Transaction object to sign + * @param signer The {Signer} object that assists with signing keys + * @param accountId The human-readable NEAR account name + * @param networkId The targeted network. (ex. default, betanet, etc…) + */ +async function signTransactionObject(transaction, signer, accountId, networkId) { + const message = serialize_1.serialize(exports.SCHEMA, transaction); + const hash = new Uint8Array(js_sha256_1.default.sha256.array(message)); + const signature = await signer.signMessage(message, accountId, networkId); + const signedTx = new SignedTransaction({ + transaction, + signature: new Signature({ keyType: transaction.publicKey.keyType, data: signature.signature }) + }); + return [hash, signedTx]; +} +async function signTransaction(...args) { + if (args[0].constructor === Transaction) { + const [transaction, signer, accountId, networkId] = args; + return signTransactionObject(transaction, signer, accountId, networkId); + } + else { + const [receiverId, nonce, actions, blockHash, signer, accountId, networkId] = args; + const publicKey = await signer.getPublicKey(accountId, networkId); + const transaction = createTransaction(accountId, publicKey, receiverId, nonce, actions, blockHash); + return signTransactionObject(transaction, signer, accountId, networkId); + } +} +exports.signTransaction = signTransaction; diff --git a/tests/node_modules/borsh/borsh-ts/test/serialize.test.js b/tests/node_modules/borsh/borsh-ts/test/serialize.test.js new file mode 100644 index 0000000..9e7dcd7 --- /dev/null +++ b/tests/node_modules/borsh/borsh-ts/test/serialize.test.js @@ -0,0 +1,91 @@ +const borsh = require('../../lib/index'); +const BN = require('bn.js'); + +class Assignable { + constructor(properties) { + Object.keys(properties).map((key) => { + this[key] = properties[key]; + }); + } +} + +class Test extends Assignable { } + +test('serialize object', async () => { + const value = new Test({ x: 255, y: 20, z: '123', q: [1, 2, 3] }); + const schema = new Map([[Test, { kind: 'struct', fields: [['x', 'u8'], ['y', 'u64'], ['z', 'string'], ['q', [3]]] }]]); + const buf = borsh.serialize(schema, value); + const newValue = borsh.deserialize(schema, Test, buf); + expect(newValue.x).toEqual(255); + expect(newValue.y.toString()).toEqual('20'); + expect(newValue.z).toEqual('123'); + expect(newValue.q).toEqual(new Uint8Array([1, 2, 3])); +}); + +test('serialize optional field', async () => { + const schema = new Map([[Test, { kind: 'struct', fields: [['x', { kind: 'option', type: 'string' }]]}]]); + + let buf = borsh.serialize(schema, new Test({ x: '123', })); + let newValue = borsh.deserialize(schema, Test, buf); + expect(newValue.x).toEqual('123'); + + buf = borsh.serialize(schema, new Test({ })); + newValue = borsh.deserialize(schema, Test, buf); + expect(newValue.x).toEqual(undefined); +}); + +test('serialize max uint', async () => { + const u64MaxHex = 'ffffffffffffffff'; + const value = new Test({ + x: 255, + y: 65535, + z: 4294967295, + q: new BN(u64MaxHex, 16), + r: new BN(u64MaxHex.repeat(2), 16), + s: new BN(u64MaxHex.repeat(4), 16), + t: new BN(u64MaxHex.repeat(8), 16) + }); + const schema = new Map([[Test, { + kind: 'struct', + fields: [ + ['x', 'u8'], + ['y', 'u16'], + ['z', 'u32'], + ['q', 'u64'], + ['r', 'u128'], + ['s', 'u256'], + ['t', 'u512'] + ] + }]]); + const buf = borsh.serialize(schema, value); + const newValue = borsh.deserialize(schema, Test, buf); + expect(newValue.x).toEqual(255); + expect(newValue.y).toEqual(65535); + expect(newValue.z).toEqual(4294967295); + expect(newValue.q.toString()).toEqual('18446744073709551615'); + expect(newValue.r.toString()).toEqual('340282366920938463463374607431768211455'); + expect(newValue.s.toString()).toEqual('115792089237316195423570985008687907853269984665640564039457584007913129639935'); + expect(newValue.t.toString()).toEqual('13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095'); +}); + +test('baseEncode string test', async () => { + const encodedValue = borsh.baseEncode("244ZQ9cgj3CQ6bWBdytfrJMuMQ1jdXLFGnr4HhvtCTnM"); + const expectedValue = "HKk9gqNj4xb4rLdJuzT5zzJbLa4vHBdYCxQT9H99csQh6nz3Hfpqn4jtWA92"; + expect(encodedValue).toEqual(expectedValue); +}); + +test('baseEncode array test', async () => { + expect(borsh.baseEncode([1, 2, 3, 4, 5])).toEqual('7bWpTW'); +}); + +test('baseDecode test', async () => { + const value = "HKk9gqNj4xb4rLdJu"; + const expectedDecodedArray = [3, 96, 254, 84, 10, 240, 93, 199, 52, 244, 164, 240, 6]; + const expectedBuffer = Buffer.from(expectedDecodedArray); + expect(borsh.baseDecode(value)).toEqual(expectedBuffer); +}); + +test('base encode and decode test', async () => { + const value = '244ZQ9cgj3CQ6bWBdytfrJMuMQ1jdXLFGnr4HhvtCTnM'; + expect(borsh.baseEncode(borsh.baseDecode(value))).toEqual(value); +}); diff --git a/tests/node_modules/borsh/lib/index.d.ts b/tests/node_modules/borsh/lib/index.d.ts new file mode 100644 index 0000000..7795d0e --- /dev/null +++ b/tests/node_modules/borsh/lib/index.d.ts @@ -0,0 +1,48 @@ +/// +import BN from 'bn.js'; +export declare function baseEncode(value: Uint8Array | string): string; +export declare function baseDecode(value: string): Buffer; +export declare type Schema = Map; +export declare class BorshError extends Error { + originalMessage: string; + fieldPath: string[]; + constructor(message: string); + addToFieldPath(fieldName: string): void; +} +export declare class BinaryWriter { + buf: Buffer; + length: number; + constructor(); + maybeResize(): void; + writeU8(value: number): void; + writeU16(value: number): void; + writeU32(value: number): void; + writeU64(value: number | BN): void; + writeU128(value: number | BN): void; + writeU256(value: number | BN): void; + writeU512(value: number | BN): void; + private writeBuffer; + writeString(str: string): void; + writeFixedArray(array: Uint8Array): void; + writeArray(array: any[], fn: any): void; + toArray(): Uint8Array; +} +export declare class BinaryReader { + buf: Buffer; + offset: number; + constructor(buf: Buffer); + readU8(): number; + readU16(): number; + readU32(): number; + readU64(): BN; + readU128(): BN; + readU256(): BN; + readU512(): BN; + private readBuffer; + readString(): string; + readFixedArray(len: number): Uint8Array; + readArray(fn: any): any[]; +} +export declare function serialize(schema: Schema, obj: any): Uint8Array; +export declare function deserialize(schema: Schema, classType: any, buffer: Buffer): any; +export declare function deserializeUnchecked(schema: Schema, classType: any, buffer: Buffer): any; diff --git a/tests/node_modules/borsh/lib/index.js b/tests/node_modules/borsh/lib/index.js new file mode 100644 index 0000000..c344756 --- /dev/null +++ b/tests/node_modules/borsh/lib/index.js @@ -0,0 +1,391 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0; +const bn_js_1 = __importDefault(require("bn.js")); +const bs58_1 = __importDefault(require("bs58")); +// TODO: Make sure this polyfill not included when not required +const encoding = __importStar(require("text-encoding-utf-8")); +const TextDecoder = (typeof global.TextDecoder !== 'function') ? encoding.TextDecoder : global.TextDecoder; +const textDecoder = new TextDecoder('utf-8', { fatal: true }); +function baseEncode(value) { + if (typeof (value) === 'string') { + value = Buffer.from(value, 'utf8'); + } + return bs58_1.default.encode(Buffer.from(value)); +} +exports.baseEncode = baseEncode; +function baseDecode(value) { + return Buffer.from(bs58_1.default.decode(value)); +} +exports.baseDecode = baseDecode; +const INITIAL_LENGTH = 1024; +class BorshError extends Error { + constructor(message) { + super(message); + this.fieldPath = []; + this.originalMessage = message; + } + addToFieldPath(fieldName) { + this.fieldPath.splice(0, 0, fieldName); + // NOTE: Modifying message directly as jest doesn't use .toString() + this.message = this.originalMessage + ': ' + this.fieldPath.join('.'); + } +} +exports.BorshError = BorshError; +/// Binary encoder. +class BinaryWriter { + constructor() { + this.buf = Buffer.alloc(INITIAL_LENGTH); + this.length = 0; + } + maybeResize() { + if (this.buf.length < 16 + this.length) { + this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]); + } + } + writeU8(value) { + this.maybeResize(); + this.buf.writeUInt8(value, this.length); + this.length += 1; + } + writeU16(value) { + this.maybeResize(); + this.buf.writeUInt16LE(value, this.length); + this.length += 2; + } + writeU32(value) { + this.maybeResize(); + this.buf.writeUInt32LE(value, this.length); + this.length += 4; + } + writeU64(value) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray('le', 8))); + } + writeU128(value) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray('le', 16))); + } + writeU256(value) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray('le', 32))); + } + writeU512(value) { + this.maybeResize(); + this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray('le', 64))); + } + writeBuffer(buffer) { + // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser + this.buf = Buffer.concat([Buffer.from(this.buf.subarray(0, this.length)), buffer, Buffer.alloc(INITIAL_LENGTH)]); + this.length += buffer.length; + } + writeString(str) { + this.maybeResize(); + const b = Buffer.from(str, 'utf8'); + this.writeU32(b.length); + this.writeBuffer(b); + } + writeFixedArray(array) { + this.writeBuffer(Buffer.from(array)); + } + writeArray(array, fn) { + this.maybeResize(); + this.writeU32(array.length); + for (const elem of array) { + this.maybeResize(); + fn(elem); + } + } + toArray() { + return this.buf.subarray(0, this.length); + } +} +exports.BinaryWriter = BinaryWriter; +function handlingRangeError(target, propertyKey, propertyDescriptor) { + const originalMethod = propertyDescriptor.value; + propertyDescriptor.value = function (...args) { + try { + return originalMethod.apply(this, args); + } + catch (e) { + if (e instanceof RangeError) { + const code = e.code; + if (['ERR_BUFFER_OUT_OF_BOUNDS', 'ERR_OUT_OF_RANGE'].indexOf(code) >= 0) { + throw new BorshError('Reached the end of buffer when deserializing'); + } + } + throw e; + } + }; +} +class BinaryReader { + constructor(buf) { + this.buf = buf; + this.offset = 0; + } + readU8() { + const value = this.buf.readUInt8(this.offset); + this.offset += 1; + return value; + } + readU16() { + const value = this.buf.readUInt16LE(this.offset); + this.offset += 2; + return value; + } + readU32() { + const value = this.buf.readUInt32LE(this.offset); + this.offset += 4; + return value; + } + readU64() { + const buf = this.readBuffer(8); + return new bn_js_1.default(buf, 'le'); + } + readU128() { + const buf = this.readBuffer(16); + return new bn_js_1.default(buf, 'le'); + } + readU256() { + const buf = this.readBuffer(32); + return new bn_js_1.default(buf, 'le'); + } + readU512() { + const buf = this.readBuffer(64); + return new bn_js_1.default(buf, 'le'); + } + readBuffer(len) { + if ((this.offset + len) > this.buf.length) { + throw new BorshError(`Expected buffer length ${len} isn't within bounds`); + } + const result = this.buf.slice(this.offset, this.offset + len); + this.offset += len; + return result; + } + readString() { + const len = this.readU32(); + const buf = this.readBuffer(len); + try { + // NOTE: Using TextDecoder to fail on invalid UTF-8 + return textDecoder.decode(buf); + } + catch (e) { + throw new BorshError(`Error decoding UTF-8 string: ${e}`); + } + } + readFixedArray(len) { + return new Uint8Array(this.readBuffer(len)); + } + readArray(fn) { + const len = this.readU32(); + const result = Array(); + for (let i = 0; i < len; ++i) { + result.push(fn()); + } + return result; + } +} +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU8", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU16", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU32", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU64", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU128", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU256", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readU512", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readString", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readFixedArray", null); +__decorate([ + handlingRangeError +], BinaryReader.prototype, "readArray", null); +exports.BinaryReader = BinaryReader; +function capitalizeFirstLetter(string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} +function serializeField(schema, fieldName, value, fieldType, writer) { + try { + // TODO: Handle missing values properly (make sure they never result in just skipped write) + if (typeof fieldType === 'string') { + writer[`write${capitalizeFirstLetter(fieldType)}`](value); + } + else if (fieldType instanceof Array) { + if (typeof fieldType[0] === 'number') { + if (value.length !== fieldType[0]) { + throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`); + } + writer.writeFixedArray(value); + } + else { + writer.writeArray(value, (item) => { serializeField(schema, fieldName, item, fieldType[0], writer); }); + } + } + else if (fieldType.kind !== undefined) { + switch (fieldType.kind) { + case 'option': { + if (value === null || value === undefined) { + writer.writeU8(0); + } + else { + writer.writeU8(1); + serializeField(schema, fieldName, value, fieldType.type, writer); + } + break; + } + default: throw new BorshError(`FieldType ${fieldType} unrecognized`); + } + } + else { + serializeStruct(schema, value, writer); + } + } + catch (error) { + if (error instanceof BorshError) { + error.addToFieldPath(fieldName); + } + throw error; + } +} +function serializeStruct(schema, obj, writer) { + const structSchema = schema.get(obj.constructor); + if (!structSchema) { + throw new BorshError(`Class ${obj.constructor.name} is missing in schema`); + } + if (structSchema.kind === 'struct') { + structSchema.fields.map(([fieldName, fieldType]) => { + serializeField(schema, fieldName, obj[fieldName], fieldType, writer); + }); + } + else if (structSchema.kind === 'enum') { + const name = obj[structSchema.field]; + for (let idx = 0; idx < structSchema.values.length; ++idx) { + const [fieldName, fieldType] = structSchema.values[idx]; + if (fieldName === name) { + writer.writeU8(idx); + serializeField(schema, fieldName, obj[fieldName], fieldType, writer); + break; + } + } + } + else { + throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`); + } +} +/// Serialize given object using schema of the form: +/// { class_name -> [ [field_name, field_type], .. ], .. } +function serialize(schema, obj) { + const writer = new BinaryWriter(); + serializeStruct(schema, obj, writer); + return writer.toArray(); +} +exports.serialize = serialize; +function deserializeField(schema, fieldName, fieldType, reader) { + try { + if (typeof fieldType === 'string') { + return reader[`read${capitalizeFirstLetter(fieldType)}`](); + } + if (fieldType instanceof Array) { + if (typeof fieldType[0] === 'number') { + return reader.readFixedArray(fieldType[0]); + } + return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader)); + } + if (fieldType.kind === 'option') { + const option = reader.readU8(); + if (option) { + return deserializeField(schema, fieldName, fieldType.type, reader); + } + return undefined; + } + return deserializeStruct(schema, fieldType, reader); + } + catch (error) { + if (error instanceof BorshError) { + error.addToFieldPath(fieldName); + } + throw error; + } +} +function deserializeStruct(schema, classType, reader) { + const structSchema = schema.get(classType); + if (!structSchema) { + throw new BorshError(`Class ${classType.name} is missing in schema`); + } + if (structSchema.kind === 'struct') { + const result = {}; + for (const [fieldName, fieldType] of schema.get(classType).fields) { + result[fieldName] = deserializeField(schema, fieldName, fieldType, reader); + } + return new classType(result); + } + if (structSchema.kind === 'enum') { + const idx = reader.readU8(); + if (idx >= structSchema.values.length) { + throw new BorshError(`Enum index: ${idx} is out of range`); + } + const [fieldName, fieldType] = structSchema.values[idx]; + const fieldValue = deserializeField(schema, fieldName, fieldType, reader); + return new classType({ [fieldName]: fieldValue }); + } + throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`); +} +/// Deserializes object from bytes using schema. +function deserialize(schema, classType, buffer) { + const reader = new BinaryReader(buffer); + const result = deserializeStruct(schema, classType, reader); + if (reader.offset < buffer.length) { + throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`); + } + return result; +} +exports.deserialize = deserialize; +/// Deserializes object from bytes using schema, without checking the length read +function deserializeUnchecked(schema, classType, buffer) { + const reader = new BinaryReader(buffer); + return deserializeStruct(schema, classType, reader); +} +exports.deserializeUnchecked = deserializeUnchecked; diff --git a/tests/node_modules/borsh/package.json b/tests/node_modules/borsh/package.json new file mode 100644 index 0000000..49173b2 --- /dev/null +++ b/tests/node_modules/borsh/package.json @@ -0,0 +1,53 @@ +{ + "name": "borsh", + "version": "0.4.0", + "description": "Binary Object Representation Serializer for Hashing", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc -p ./tsconfig.json", + "test": "jest test --runInBand", + "fuzz": "jsfuzz borsh-ts/test/fuzz/borsh-roundtrip.js borsh-ts/test/fuzz/corpus/", + "dev": "yarn build -w", + "pretest": "yarn build", + "lint": "eslint borsh-ts/**/*.ts", + "fix": "eslint borsh-ts/**/*.ts --fix" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nearprotocol/borsh.git" + }, + "keywords": [ + "serializer", + "binary", + "serializer", + "deserializer", + "consistency", + "deterministic" + ], + "author": "Near Inc", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/nearprotocol/borsh/issues" + }, + "homepage": "https://github.com/nearprotocol/borsh#readme", + "devDependencies": { + "@types/babel__core": "^7.1.2", + "@types/babel__template": "^7.0.2", + "@types/node": "^12.7.3", + "@typescript-eslint/eslint-plugin": "^2.18.0", + "@typescript-eslint/parser": "^2.18.0", + "bs58": "^4.0.0", + "eslint": "^6.5.1", + "jest": "^26.0.1", + "js-sha256": "^0.9.0", + "jsfuzz": "^1.0.14", + "typescript": "^3.6.2" + }, + "dependencies": { + "@types/bn.js": "^4.11.5", + "bn.js": "^5.0.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } +} diff --git a/tests/node_modules/borsh/tsconfig.json b/tests/node_modules/borsh/tsconfig.json new file mode 100644 index 0000000..fe2ec2d --- /dev/null +++ b/tests/node_modules/borsh/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "lib": [ + "es2015", + "esnext", + "dom" + ], + "module": "commonjs", + "target": "esnext", + "moduleResolution": "node", + "outDir": "./lib", + "declaration": true, + "preserveSymlinks": true, + "preserveWatchOutput": true, + "pretty": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": false, + "noImplicitReturns": true, + "experimentalDecorators": true, + "noUnusedLocals": true + }, + "files": ["./borsh-ts/index.ts"] +} + diff --git a/tests/node_modules/brace-expansion/LICENSE b/tests/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000..de32266 --- /dev/null +++ b/tests/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/node_modules/brace-expansion/README.md b/tests/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..6b4e0e1 --- /dev/null +++ b/tests/node_modules/brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/node_modules/brace-expansion/index.js b/tests/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..0478be8 --- /dev/null +++ b/tests/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/tests/node_modules/brace-expansion/package.json b/tests/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..a18faa8 --- /dev/null +++ b/tests/node_modules/brace-expansion/package.json @@ -0,0 +1,47 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.11", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/tests/node_modules/braces/CHANGELOG.md b/tests/node_modules/braces/CHANGELOG.md new file mode 100644 index 0000000..36f798b --- /dev/null +++ b/tests/node_modules/braces/CHANGELOG.md @@ -0,0 +1,184 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [3.0.0] - 2018-04-08 + +v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler. + +**Breaking Changes** + +- The undocumented `.makeRe` method was removed + +**Non-breaking changes** + +- Caching was removed + +## [2.3.2] - 2018-04-08 + +- start refactoring +- cover sets +- better range handling + +## [2.3.1] - 2018-02-17 + +- Remove unnecessary escape in Regex. (#14) + +## [2.3.0] - 2017-10-19 + +- minor code reorganization +- optimize regex +- expose `maxLength` option + +## [2.2.1] - 2017-05-30 + +- don't condense when braces contain extglobs + +## [2.2.0] - 2017-05-28 + +- ensure word boundaries are preserved +- fixes edge case where extglob characters precede a brace pattern + +## [2.1.1] - 2017-04-27 + +- use snapdragon-node +- handle edge case +- optimizations, lint + +## [2.0.4] - 2017-04-11 + +- pass opts to compiler +- minor optimization in create method +- re-write parser handlers to remove negation regex + +## [2.0.3] - 2016-12-10 + +- use split-string +- clear queue at the end +- adds sequences example +- add unit tests + +## [2.0.2] - 2016-10-21 + +- fix comma handling in nested extglobs + +## [2.0.1] - 2016-10-20 + +- add comments +- more tests, ensure quotes are stripped + +## [2.0.0] - 2016-10-19 + +- don't expand braces inside character classes +- add quantifier pattern + +## [1.8.5] - 2016-05-21 + +- Refactor (#10) + +## [1.8.4] - 2016-04-20 + +- fixes https://github.com/jonschlinkert/micromatch/issues/66 + +## [1.8.0] - 2015-03-18 + +- adds exponent examples, tests +- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38 + +## [1.6.0] - 2015-01-30 + +- optimizations, `bash` mode: +- improve path escaping + +## [1.5.0] - 2015-01-28 + +- Merge pull request #5 from eush77/lib-files + +## [1.4.0] - 2015-01-24 + +- add extglob tests +- externalize exponent function +- better whitespace handling + +## [1.3.0] - 2015-01-24 + +- make regex patterns explicity + +## [1.1.0] - 2015-01-11 + +- don't create a match group with `makeRe` + +## [1.0.0] - 2014-12-23 + +- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e' +- support empty brace syntax +- better bash coverage +- better support for regex strings + +## [0.1.4] - 2014-11-14 + +- improve recognition of bad args, recognize mismatched argument types +- support escaping +- remove pathname-expansion +- support whitespace in patterns + +## [0.1.0] + +- first commit + +[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2 +[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1 +[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0 +[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1 +[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0 +[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0 +[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0 +[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5 +[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4 +[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0 +[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0 +[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0 +[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4 + +[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/tests/node_modules/braces/LICENSE b/tests/node_modules/braces/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/tests/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/node_modules/braces/README.md b/tests/node_modules/braces/README.md new file mode 100644 index 0000000..cba2f60 --- /dev/null +++ b/tests/node_modules/braces/README.md @@ -0,0 +1,593 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +* **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +* **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +* **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +* **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +* **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +* [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +* [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +* [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `65,536` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + } +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + } +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.unescape + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +* [brace expansion](#brace-expansion) is for generating new lists +* [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +* brace expansion can eat up a huge amount of processing resources +* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs)| N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +# range (expanded) + braces x 29,040 ops/sec ±3.69% (91 runs sampled)) + minimatch x 4,735 ops/sec ±1.28% (90 runs sampled) + +# range (optimized for regex) + braces x 382,878 ops/sec ±0.56% (94 runs sampled) + minimatch x 1,040 ops/sec ±0.44% (93 runs sampled) + +# nested ranges (expanded) + braces x 19,744 ops/sec ±2.27% (92 runs sampled)) + minimatch x 4,579 ops/sec ±0.50% (93 runs sampled) + +# nested ranges (optimized for regex) + braces x 246,019 ops/sec ±2.02% (93 runs sampled) + minimatch x 1,028 ops/sec ±0.39% (94 runs sampled) + +# set (expanded) + braces x 138,641 ops/sec ±0.53% (95 runs sampled) + minimatch x 219,582 ops/sec ±0.98% (94 runs sampled) + +# set (optimized for regex) + braces x 388,408 ops/sec ±0.41% (95 runs sampled) + minimatch x 44,724 ops/sec ±0.91% (89 runs sampled) + +# nested sets (expanded) + braces x 84,966 ops/sec ±0.48% (94 runs sampled) + minimatch x 140,720 ops/sec ±0.37% (95 runs sampled) + +# nested sets (optimized for regex) + braces x 263,340 ops/sec ±2.06% (92 runs sampled) + minimatch x 28,714 ops/sec ±0.40% (90 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/tests/node_modules/braces/index.js b/tests/node_modules/braces/index.js new file mode 100644 index 0000000..0eee0f5 --- /dev/null +++ b/tests/node_modules/braces/index.js @@ -0,0 +1,170 @@ +'use strict'; + +const stringify = require('./lib/stringify'); +const compile = require('./lib/compile'); +const expand = require('./lib/expand'); +const parse = require('./lib/parse'); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; diff --git a/tests/node_modules/braces/lib/compile.js b/tests/node_modules/braces/lib/compile.js new file mode 100644 index 0000000..3e984a4 --- /dev/null +++ b/tests/node_modules/braces/lib/compile.js @@ -0,0 +1,57 @@ +'use strict'; + +const fill = require('fill-range'); +const utils = require('./utils'); + +const compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? (prefix + node.value) : '('; + } + + if (node.type === 'close') { + return invalid ? (prefix + node.value) : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + let range = fill(...args, { ...options, wrap: false, toRegex: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + + return walk(ast); +}; + +module.exports = compile; diff --git a/tests/node_modules/braces/lib/constants.js b/tests/node_modules/braces/lib/constants.js new file mode 100644 index 0000000..a937943 --- /dev/null +++ b/tests/node_modules/braces/lib/constants.js @@ -0,0 +1,57 @@ +'use strict'; + +module.exports = { + MAX_LENGTH: 1024 * 64, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; diff --git a/tests/node_modules/braces/lib/expand.js b/tests/node_modules/braces/lib/expand.js new file mode 100644 index 0000000..376c748 --- /dev/null +++ b/tests/node_modules/braces/lib/expand.js @@ -0,0 +1,113 @@ +'use strict'; + +const fill = require('fill-range'); +const stringify = require('./stringify'); +const utils = require('./utils'); + +const append = (queue = '', stash = '', enclose = false) => { + let result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; + + let walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; diff --git a/tests/node_modules/braces/lib/parse.js b/tests/node_modules/braces/lib/parse.js new file mode 100644 index 0000000..145ea26 --- /dev/null +++ b/tests/node_modules/braces/lib/parse.js @@ -0,0 +1,333 @@ +'use strict'; + +const stringify = require('./stringify'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = require('./constants'); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let closed = true; + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + let type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; diff --git a/tests/node_modules/braces/lib/stringify.js b/tests/node_modules/braces/lib/stringify.js new file mode 100644 index 0000000..414b7bc --- /dev/null +++ b/tests/node_modules/braces/lib/stringify.js @@ -0,0 +1,32 @@ +'use strict'; + +const utils = require('./utils'); + +module.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + diff --git a/tests/node_modules/braces/lib/utils.js b/tests/node_modules/braces/lib/utils.js new file mode 100644 index 0000000..e3551a6 --- /dev/null +++ b/tests/node_modules/braces/lib/utils.js @@ -0,0 +1,112 @@ +'use strict'; + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args); + return result; +}; diff --git a/tests/node_modules/braces/package.json b/tests/node_modules/braces/package.json new file mode 100644 index 0000000..3f52e34 --- /dev/null +++ b/tests/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.2", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.0.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/tests/node_modules/brorand/.npmignore b/tests/node_modules/brorand/.npmignore new file mode 100644 index 0000000..1ca9571 --- /dev/null +++ b/tests/node_modules/brorand/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/tests/node_modules/brorand/README.md b/tests/node_modules/brorand/README.md new file mode 100644 index 0000000..f80437d --- /dev/null +++ b/tests/node_modules/brorand/README.md @@ -0,0 +1,26 @@ +# Brorand + +#### LICENSE + +This software is licensed under the MIT License. + +Copyright Fedor Indutny, 2014. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/brorand/index.js b/tests/node_modules/brorand/index.js new file mode 100644 index 0000000..9a0fff4 --- /dev/null +++ b/tests/node_modules/brorand/index.js @@ -0,0 +1,65 @@ +var r; + +module.exports = function rand(len) { + if (!r) + r = new Rand(null); + + return r.generate(len); +}; + +function Rand(rand) { + this.rand = rand; +} +module.exports.Rand = Rand; + +Rand.prototype.generate = function generate(len) { + return this._rand(len); +}; + +// Emulate crypto API using randy +Rand.prototype._rand = function _rand(n) { + if (this.rand.getBytes) + return this.rand.getBytes(n); + + var res = new Uint8Array(n); + for (var i = 0; i < res.length; i++) + res[i] = this.rand.getByte(); + return res; +}; + +if (typeof self === 'object') { + if (self.crypto && self.crypto.getRandomValues) { + // Modern browsers + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.crypto.getRandomValues(arr); + return arr; + }; + } else if (self.msCrypto && self.msCrypto.getRandomValues) { + // IE + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.msCrypto.getRandomValues(arr); + return arr; + }; + + // Safari's WebWorkers do not have `crypto` + } else if (typeof window === 'object') { + // Old junk + Rand.prototype._rand = function() { + throw new Error('Not implemented yet'); + }; + } +} else { + // Node.js or Web worker with no crypto support + try { + var crypto = require('crypto'); + if (typeof crypto.randomBytes !== 'function') + throw new Error('Not supported'); + + Rand.prototype._rand = function _rand(n) { + return crypto.randomBytes(n); + }; + } catch (e) { + } +} diff --git a/tests/node_modules/brorand/package.json b/tests/node_modules/brorand/package.json new file mode 100644 index 0000000..f213c9d --- /dev/null +++ b/tests/node_modules/brorand/package.json @@ -0,0 +1,31 @@ +{ + "name": "brorand", + "version": "1.1.0", + "description": "Random number generator for browsers and node.js", + "main": "index.js", + "scripts": { + "test": "mocha --reporter=spec test/**/*-test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/brorand" + }, + "keywords": [ + "Random", + "RNG", + "browser", + "crypto" + ], + "author": "Fedor Indutny ", + "license": "MIT", + "bugs": { + "url": "https://github.com/indutny/brorand/issues" + }, + "homepage": "https://github.com/indutny/brorand", + "devDependencies": { + "mocha": "^2.0.1" + }, + "browser": { + "crypto": false + } +} diff --git a/tests/node_modules/brorand/test/api-test.js b/tests/node_modules/brorand/test/api-test.js new file mode 100644 index 0000000..b6c876d --- /dev/null +++ b/tests/node_modules/brorand/test/api-test.js @@ -0,0 +1,8 @@ +var brorand = require('../'); +var assert = require('assert'); + +describe('Brorand', function() { + it('should generate random numbers', function() { + assert.equal(brorand(100).length, 100); + }); +}); diff --git a/tests/node_modules/browser-stdout/LICENSE b/tests/node_modules/browser-stdout/LICENSE new file mode 100644 index 0000000..775f6ce --- /dev/null +++ b/tests/node_modules/browser-stdout/LICENSE @@ -0,0 +1,5 @@ +Copyright 2018 kumavis + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tests/node_modules/browser-stdout/README.md b/tests/node_modules/browser-stdout/README.md new file mode 100644 index 0000000..f32028a --- /dev/null +++ b/tests/node_modules/browser-stdout/README.md @@ -0,0 +1,40 @@ +### wat? + +`process.stdout` in your browser. + +### wai? + +iono. cuz hakz. + +### hau? + +```js +var BrowserStdout = require('browser-stdout') + +myStream.pipe(BrowserStdout()) +``` + +### monkey + +You can monkey-patch `process.stdout` for your dependency graph like this: + +``` +process.stdout = require('browser-stdout')() +var coolTool = require('module-that-uses-stdout-somewhere-in-its-depths') +``` + +### opts + +opts are passed directly to `stream.Writable`. +additionally, a label arg can be used to label console output. + +```js +BrowserStdout({ + objectMode: true, + label: 'dataz', +}) +``` + +### ur doin it rong + +i accept pr's. \ No newline at end of file diff --git a/tests/node_modules/browser-stdout/index.js b/tests/node_modules/browser-stdout/index.js new file mode 100644 index 0000000..daf39c3 --- /dev/null +++ b/tests/node_modules/browser-stdout/index.js @@ -0,0 +1,25 @@ +var WritableStream = require('stream').Writable +var inherits = require('util').inherits + +module.exports = BrowserStdout + + +inherits(BrowserStdout, WritableStream) + +function BrowserStdout(opts) { + if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) + + opts = opts || {} + WritableStream.call(this, opts) + this.label = (opts.label !== undefined) ? opts.label : 'stdout' +} + +BrowserStdout.prototype._write = function(chunks, encoding, cb) { + var output = chunks.toString ? chunks.toString() : chunks + if (this.label === false) { + console.log(output) + } else { + console.log(this.label+':', output) + } + process.nextTick(cb) +} diff --git a/tests/node_modules/browser-stdout/package.json b/tests/node_modules/browser-stdout/package.json new file mode 100644 index 0000000..66a054e --- /dev/null +++ b/tests/node_modules/browser-stdout/package.json @@ -0,0 +1,15 @@ +{ + "name": "browser-stdout", + "version": "1.3.1", + "description": "", + "repository": { + "type": "git", + "url": "http://github.com/kumavis/browser-stdout.git" + }, + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "kumavis", + "license": "ISC" +} diff --git a/tests/node_modules/bs58/CHANGELOG.md b/tests/node_modules/bs58/CHANGELOG.md new file mode 100644 index 0000000..f6f1ffb --- /dev/null +++ b/tests/node_modules/bs58/CHANGELOG.md @@ -0,0 +1,61 @@ +4.0.0 / 2016-12-3 +------------------ +- `decode` now returns a `Buffer` again, to avoid potential cryptographic errors. [Daniel Cousens / #21](https://github.com/cryptocoinjs/bs58/pull/21) + +3.0.0 / 2015-08-18 +------------------ +- refactored module into generic [`base-x`](https://github.com/cryptocoinjs/base-x). + +2.0.1 / 2014-12-23 +------------------ +- performance boost in `encode()` [#10](https://github.com/cryptocoinjs/bs58/pull/10) + +2.0.0 / 2014-10-03 +------------------ +- `decode` now returns an `Array` instead of `Buffer` to keep things simple. [Daniel Cousens / #9](https://github.com/cryptocoinjs/bs58/pull/9) + +1.2.1 / 2014-07-24 +------------------ +* speed optimizations [Daniel Cousens / #8](https://github.com/cryptocoinjs/bs58/pull/8) + +1.2.0 / 2014-06-29 +------------------ +* removed `bigi` dep, implemented direct byte conversion [Jared Deckard / #6](https://github.com/cryptocoinjs/bs58/pull/6) + +1.1.0 / 2014-06-26 +------------------ +* user `Buffer` internally for calculations, providing cleaner code and a performance increase. [Daniel Cousens](https://github.com/cryptocoinjs/bs58/commit/129c71de8bc1e36f113bce06da0616066f41c5ca) + +1.0.0 / 2014-05-27 +------------------ +* removed `binstring` dep, `Buffer` now only input to `encode()` and output of `decode()` +* update `bigi` from `~0.3.0` to `^1.1.0` +* added travis-ci support +* added coveralls support +* modified tests and library to handle fixture style testing (thanks to bitcoinjs-lib devs and [Daniel Cousens](https://github.com/dcousens)) + + +0.3.0 / 2014-02-24 +------------------ +* duck type input to `encode` and change output of `decode` to `Buffer`. + + +0.2.1 / 2014-02-24 +------------------ +* removed bower and component support. Closes #1 +* convert from 4 spaces to 2 + + +0.2.0 / 2013-12-07 +------------------ +* renamed from `cryptocoin-base58` to `bs58` + + +0.1.0 / 2013-11-20 +------------------ +* removed AMD support + + +0.0.1 / 2013-11-04 +------------------ +* initial release diff --git a/tests/node_modules/bs58/README.md b/tests/node_modules/bs58/README.md new file mode 100644 index 0000000..2d5e624 --- /dev/null +++ b/tests/node_modules/bs58/README.md @@ -0,0 +1,71 @@ +bs58 +==== + +[![build status](https://travis-ci.org/cryptocoinjs/bs58.svg)](https://travis-ci.org/cryptocoinjs/bs58) + +JavaScript component to compute base 58 encoding. This encoding is typically used for crypto currencies such as Bitcoin. + +**Note:** If you're looking for **base 58 check** encoding, see: [https://github.com/bitcoinjs/bs58check](https://github.com/bitcoinjs/bs58check), which depends upon this library. + + +Install +------- + + npm i --save bs58 + + +API +--- + +### encode(input) + +`input` must be a [Buffer](https://nodejs.org/api/buffer.html) or an `Array`. It returns a `string`. + +**example**: + +```js +const bs58 = require('bs58') + +const bytes = Buffer.from('003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', 'hex') +const address = bs58.encode(bytes) +console.log(address) +// => 16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS +``` + + +### decode(input) + +`input` must be a base 58 encoded string. Returns a [Buffer](https://nodejs.org/api/buffer.html). + +**example**: + +```js +const bs58 = require('bs58') + +const address = '16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS' +const bytes = bs58.decode(address) +console.log(out.toString('hex')) +// => 003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187 +``` + +Hack / Test +----------- + +Uses JavaScript standard style. Read more: + +[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + + +Credits +------- +- [Mike Hearn](https://github.com/mikehearn) for original Java implementation +- [Stefan Thomas](https://github.com/justmoon) for porting to JavaScript +- [Stephan Pair](https://github.com/gasteve) for buffer improvements +- [Daniel Cousens](https://github.com/dcousens) for cleanup and merging improvements from bitcoinjs-lib +- [Jared Deckard](https://github.com/deckar01) for killing `bigi` as a dependency + + +License +------- + +MIT diff --git a/tests/node_modules/bs58/index.js b/tests/node_modules/bs58/index.js new file mode 100644 index 0000000..c6ae375 --- /dev/null +++ b/tests/node_modules/bs58/index.js @@ -0,0 +1,4 @@ +var basex = require('base-x') +var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' + +module.exports = basex(ALPHABET) diff --git a/tests/node_modules/bs58/package.json b/tests/node_modules/bs58/package.json new file mode 100644 index 0000000..da0ca3c --- /dev/null +++ b/tests/node_modules/bs58/package.json @@ -0,0 +1,37 @@ +{ + "name": "bs58", + "version": "4.0.1", + "description": "Base 58 encoding / decoding", + "keywords": [ + "base58", + "bitcoin", + "crypto", + "crytography", + "decode", + "decoding", + "encode", + "encoding", + "litecoin" + ], + "license": "MIT", + "devDependencies": { + "standard": "*", + "tape": "^4.6.3" + }, + "repository": { + "url": "https://github.com/cryptocoinjs/bs58", + "type": "git" + }, + "files": [ + "./index.js" + ], + "main": "./index.js", + "scripts": { + "standard": "standard", + "test": "npm run standard && npm run unit", + "unit": "tape test/index.js" + }, + "dependencies": { + "base-x": "^3.0.2" + } +} diff --git a/tests/node_modules/buffer-layout/.eslintrc.js b/tests/node_modules/buffer-layout/.eslintrc.js new file mode 100644 index 0000000..76dcc0a --- /dev/null +++ b/tests/node_modules/buffer-layout/.eslintrc.js @@ -0,0 +1,45 @@ +module.exports = { + extends: 'google', + env: { + node: true, + mocha: true + }, + plugins: [ + 'pabigot' + ], + rules: { + 'guard-for-in': 'off', + 'prefer-rest-params': 'off', + 'prefer-spread': 'off', + __temporary: 'off', + 'arrow-parens': ['error', 'as-needed'], + camelcase: 'off', + curly: 'error', + eqeqeq: 'error', + 'max-len': ['error', {code: 120, tabWidth: 2}], + 'no-constant-condition': 'off', + 'no-fallthrough': ['error', {commentPattern: 'FALLTHRU'}], + 'no-implicit-coercion': 'off', + 'no-irregular-whitespace': ['error', {skipComments: true}], + 'no-multi-spaces': ['error', {ignoreEOLComments: true}], + 'operator-linebreak': ['error', 'before'], + 'pabigot/affixed-ids': ['error', { + allowedSuffixes: [ + '_dCel', + '_ppt' + ] + }], + quotes: ['error', 'single', { + avoidEscape: true, + allowTemplateLiterals: true + }], + radix: ['error', 'as-needed'], + 'require-jsdoc': 'off', + 'spaced-comment': ['error', 'always', {line: {markers: ['#']}}], + 'valid-jsdoc': 'off', + yoda: ['error', 'always', {exceptRange: true}] + }, + parserOptions: { + sourceType: 'module' + } +} diff --git a/tests/node_modules/buffer-layout/.travis.yml b/tests/node_modules/buffer-layout/.travis.yml new file mode 100644 index 0000000..77ce389 --- /dev/null +++ b/tests/node_modules/buffer-layout/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - "node" + - "8" + - "6" + - "4" +after_success: + - npm run eslint + - npm run coveralls diff --git a/tests/node_modules/buffer-layout/CHANGELOG.md b/tests/node_modules/buffer-layout/CHANGELOG.md new file mode 100644 index 0000000..87e70a1 --- /dev/null +++ b/tests/node_modules/buffer-layout/CHANGELOG.md @@ -0,0 +1,222 @@ +# Change Log + +## [1.2.2] - 2021-07-05 + +* Improve [browser compatibility][pr#26] by eliminating a dependence on + the Node assert module. + +## [1.2.1] - 2021-04-29 + +* Improve [browser compatibility][pr#24] by using `Buffer.isBuffer` instead of + `instanceof` to confirm Buffer types. + +## [1.2.0] - 2018-03-14 + +* **API** Add [UTF8][doc:UTF8] to encode UTF strings in a possibly + bounded buffer, resolving [issue #21][issue#21]. +* **API** Allow the layout parameter of + a [VariantLayout][doc:VariantLayout] to be omitted in cases where no + data beyond the discriminator is required, + resolving [issue #20][issue#20]. + +## [1.1.0] - 2018-01-06 + +* **API** Add a third parameter to Structure specifying it should decode + short buffers as prefixes, resolving [issue #19][issue#19]. +* **API** Interpret string argument to BitStructure `msb` parameter as + a `property` parameter, resolving [issue #17][issue#17]. + +## [1.0.0] - 2017-12-17 + +* Minimum Node version increased to 4.5 to support dependency + on + [Buffer.alloc()](https://nodejs.org/dist/latest-v4.x/docs/api/buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding). +* Removed [patch][node:issue#3994] for [ancient buffer bug][node:issue#3992] +* Update to ES6 classes and other features +* Documentation clarifications. +* Update dependent packages. +* Switch to [npm:eslint] and deal with fallout. + +## [0.13.0] - 2016-03-27 + +* **API** Add [fieldFor][doc:BitStructure.fieldFor]. +* Fix incorrect encoding of [boolean-valued bit fields][doc:Boolean]. +* **API** Add [offsetOf][doc:Structure.offsetOf] and [layoutFor][doc:Structure.layoutFor]. + +## [0.12.1] - 2016-03-08 + +* Disable coverage testing for [patchIssue3992][doc:patchIssue3992] to + avoid taking a penalty on node versions that have been updated. + +## [0.12.0] - 2016-03-08 + +* **API** Replace `setClassLayout` with [bindConstructorLayout][doc:bindConstructorLayout]. +* **API** Replace `objectPrototype` with [makeDestinationObject][doc:makeDestinationObject]. + +## [0.11.0] - 2016-02-10 + +* **API** Provide prototypes to use for decoded objects, resolving + [issue #15][issue#15]. + +## [0.10.0] - 2016-01-23 + +* **API** Change some exceptions (especially integer value spans) to + throw `RangeError` instead of `TypeError`, resolving + [issue #12][issue#12]. +* **API** [Add][issue#14] [boolean-valued bit fields][doc:Boolean]. +* Increase coverage of primary module to 100%. +* Update dev dependency modules. +* Fix always-false pre-convert type check. + +## [0.9.0] - 2015-12-22 + +* **API** Support inferring [Sequence][doc:Sequence.count] and + [Blob][doc:Blob.length] spans from available data. +* **API** Define return value for [Layout.encode][doc:Layout.encode] so + we know how much was written. +* **API** Change name of [Sequence][doc:Sequence] property + `elementLayout` (from `element_layout`) and [Union][doc:Union] + property `defaultLayout` (from (`default layout`) for coding standard + conformance. +* Convert to [Google coding style][npm:jscs]. + +## [0.8.0] - 2015-11-29 + +* [Add][issue#13] [64-bit integers][doc:NearInt64]. + +## [0.7.1] - 2015-11-23 + +* Stop publishing emacs backup files to npm. + +## [0.7.0] - 2015-11-23 + +* [Fix][doc:patchIssue3992] [bug in Buffer.writeInt][node:issue#3992]. +* **API** Support [variable lengths][doc:Layout.getSpan] in + unions. +* **API** Add [zero-width constants][doc:Constant]. +* **API** Add function to infer [union variant for object][doc:Union.getSourceVariant]. +* **API** Rework how [union discriminators][doc:UnionDiscriminator] are + defined. + +## [0.6.0] - 2015-11-21 + +* **API** [Support][issue#11] variable lengths in + [Blob][doc:Blob.length] and [Sequence][doc:Sequence.count]. +* **API** Add [NUL-terminated C strings][doc:CString]. +* **API** Add API to access layout [span][doc:Layout.span] +* **API** Leave data associated with unnamed properties unchanged in + [Structure][doc:structure] and [BitStructure][doc:BitStructure] regions + (formerly was zeroed on encode). +* Add [offset layout][doc:OffsetLayout] support. +* **API** Eliminate failed support for [anonymous containers][issue#8]. + +## [0.5.0] - 2015-11-20 + +* Add [factories for various layouts][issue#10]. +* Integrate [travis support][ci:travis]. +* Integrate [coverage testing][ci:coveralls] using [Istanbul][npm:istanbul]. + +## [0.4.0] - 2015-11-19 + +* [Support][issue#9] [data blobs][doc:Blob]. +* Add tests for support of [anonymous containers][issue#8] *(feature + ultimately rejected)*. +* [Allow][issue#7] [external discriminators][doc:UnionDiscriminator] for + unions. +* [Respect union property names][issue#6]. + +## [0.3.0] - 2015-11-07 + +* [Add support][issue#5] for [bit fields][doc:BitField]. +* Various [corrections and enhancements in examples][issue#4]. + +## [0.2.0] - 2015-10-25 + +* Add [fromArray helper][issue#3] to simplify construction from argument + list. +* Document [destination parameter to decode][issue#2]. +* Allow [user-defined name for union discriminators][issue#1]. + +## 0.1.0 - 2015-10-25 + +* Initial release. + +[1.2.2]: https://github.com/pabigot/buffer-layout/compare/v1.2.1...v1.2.2 +[1.2.1]: https://github.com/pabigot/buffer-layout/compare/v1.2.0...v1.2.1 +[1.2.0]: https://github.com/pabigot/buffer-layout/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/pabigot/buffer-layout/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/pabigot/buffer-layout/compare/v0.13.0...v1.0.0 +[0.13.0]: https://github.com/pabigot/buffer-layout/compare/v0.12.0...v0.13.0 +[0.12.1]: https://github.com/pabigot/buffer-layout/compare/v0.12.0...v0.12.1 +[0.12.0]: https://github.com/pabigot/buffer-layout/compare/v0.11.0...v0.12.0 +[0.11.0]: https://github.com/pabigot/buffer-layout/compare/v0.10.0...v0.11.0 +[0.10.0]: https://github.com/pabigot/buffer-layout/compare/v0.9.0...v0.10.0 +[0.9.0]: https://github.com/pabigot/buffer-layout/compare/v0.8.0...v0.9.0 +[0.8.0]: https://github.com/pabigot/buffer-layout/compare/v0.7.0...v0.8.0 +[0.7.1]: https://github.com/pabigot/buffer-layout/compare/v0.7.0...v0.7.1 +[0.7.0]: https://github.com/pabigot/buffer-layout/compare/v0.6.0...v0.7.0 +[0.6.0]: https://github.com/pabigot/buffer-layout/compare/v0.5.0...v0.6.0 +[0.5.0]: https://github.com/pabigot/buffer-layout/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/pabigot/buffer-layout/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/pabigot/buffer-layout/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/pabigot/buffer-layout/compare/v0.1.0...v0.2.0 +[doc:bindConstructorLayout]: http://pabigot.github.io/buffer-layout/module-Layout.html#.bindConstructorLayout +[doc:BitField]: http://pabigot.github.io/buffer-layout/module-Layout-BitField.html +[doc:BitStructure]: http://pabigot.github.io/buffer-layout/module-Layout-BitStructure.html +[doc:BitStructure.fieldFor]: http://pabigot.github.io/buffer-layout/module-Layout-BitStructure.html#fieldFor +[doc:Blob]: http://pabigot.github.io/buffer-layout/module-Layout-Blob.html +[doc:Blob.length]: http://pabigot.github.io/buffer-layout/module-Layout-Blob.html#length +[doc:Boolean]: http://pabigot.github.io/buffer-layout/module-Layout-Boolean.html +[doc:Constant]: http://pabigot.github.io/buffer-layout/module-Layout-Constant.html +[doc:CString]: http://pabigot.github.io/buffer-layout/module-Layout-CString.html +[doc:Layout.encode]: http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#encode +[doc:Layout.getSpan]: http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#getSpan +[doc:Layout.span]: http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#span +[doc:makeDestinationObject]: http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#makeDestinationObject +[doc:NearInt64]: http://pabigot.github.io/buffer-layout/module-Layout-NearInt64.html +[doc:OffsetLayout]: http://pabigot.github.io/buffer-layout/module-Layout-OffsetLayout.html +[doc:patchIssue3992]: http://pabigot.github.io/buffer-layout/module-patchIssue3992.html +[doc:Sequence]: http://pabigot.github.io/buffer-layout/module-Layout-Sequence.html +[doc:Sequence.count]: http://pabigot.github.io/buffer-layout/module-Layout-Sequence.html#count +[doc:Structure]: http://pabigot.github.io/buffer-layout/module-Layout-Structure.html +[doc:Structure.layoutFor]: http://pabigot.github.io/buffer-layout/module-Layout-Structure.html#layoutFor +[doc:Structure.offsetOf]: http://pabigot.github.io/buffer-layout/module-Layout-Structure.html#offsetOf +[doc:Union]: http://pabigot.github.io/buffer-layout/module-Layout-Union.html +[doc:Union.getSourceVariant]: http://pabigot.github.io/buffer-layout/module-Layout-Union.html#getSourceVariant +[doc:UnionDiscriminator]: http://pabigot.github.io/buffer-layout/module-Layout-UnionDiscriminator.html +[doc:UTF8]: http://pabigot.github.io/buffer-layout/module-Layout-UTF8.html +[doc:VariantLayout]: http://pabigot.github.io/buffer-layout/module-Layout-VariantLayout.html +[issue#1]: https://github.com/pabigot/buffer-layout/issues/1 +[issue#2]: https://github.com/pabigot/buffer-layout/issues/2 +[issue#3]: https://github.com/pabigot/buffer-layout/issues/3 +[issue#4]: https://github.com/pabigot/buffer-layout/issues/4 +[issue#5]: https://github.com/pabigot/buffer-layout/issues/5 +[issue#6]: https://github.com/pabigot/buffer-layout/issues/6 +[issue#7]: https://github.com/pabigot/buffer-layout/issues/7 +[issue#8]: https://github.com/pabigot/buffer-layout/issues/8 +[issue#9]: https://github.com/pabigot/buffer-layout/issues/9 +[issue#10]: https://github.com/pabigot/buffer-layout/issues/10 +[issue#11]: https://github.com/pabigot/buffer-layout/issues/11 +[issue#12]: https://github.com/pabigot/buffer-layout/issues/12 +[issue#13]: https://github.com/pabigot/buffer-layout/issues/13 +[issue#14]: https://github.com/pabigot/buffer-layout/issues/14 +[issue#15]: https://github.com/pabigot/buffer-layout/issues/15 +[issue#17]: https://github.com/pabigot/buffer-layout/issues/17 +[issue#19]: https://github.com/pabigot/buffer-layout/issues/19 +[issue#20]: https://github.com/pabigot/buffer-layout/issues/20 +[issue#21]: https://github.com/pabigot/buffer-layout/issues/21 +[pr#24]: https://github.com/pabigot/buffer-layout/pull/24 +[pr#26]: https://github.com/pabigot/buffer-layout/pull/26 +[ci:travis]: https://travis-ci.org/pabigot/buffer-layout +[ci:coveralls]: https://coveralls.io/github/pabigot/buffer-layout +[node:issue#3992]: https://github.com/nodejs/node/issues/3992 +[node:issue#3994]: https://github.com/nodejs/node/issues/3994 +[npm:istanbul]: https://www.npmjs.com/package/istanbul +[npm:jscs]: https://www.npmjs.com/package/jscs +[npm:eslint]: https://www.npmjs.com/package/eslint + + diff --git a/tests/node_modules/buffer-layout/LICENSE b/tests/node_modules/buffer-layout/LICENSE new file mode 100644 index 0000000..74f2fd4 --- /dev/null +++ b/tests/node_modules/buffer-layout/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2018 Peter A. Bigot + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/node_modules/buffer-layout/README.md b/tests/node_modules/buffer-layout/README.md new file mode 100644 index 0000000..f0d1860 --- /dev/null +++ b/tests/node_modules/buffer-layout/README.md @@ -0,0 +1,397 @@ +# buffer-layout + +[![NPM version](https://img.shields.io/npm/v/buffer-layout.svg)](https://www.npmjs.com/package/buffer-layout "View this project on NPM") +[![Build Status](https://travis-ci.com/pabigot/buffer-layout.svg?branch=master)](https://travis-ci.com/pabigot/buffer-layout "Check build status on TravisCI") +[![Coverage Status](https://coveralls.io/repos/pabigot/buffer-layout/badge.svg?branch=master&service=github)](https://coveralls.io/github/pabigot/buffer-layout?branch=master "Check coverage status on Coveralls") + +buffer-layout is a utility module implemented in pure JavaScript that +supports translations between JavaScript values and Buffers. It is made +available through [github](https://github.com/pabigot/buffer-layout) and +released under the MIT license. + +Layout support is provided for these types of data: + +* Signed and unsigned integral values from 1 to 6 bytes in length, in + little-endian or big-endian format; +* Signed and unsigned 64-bit integral values decoded as integral + Numbers; +* Float and double values (also little-endian or big-endian); +* Sequences of instances of an arbitrary layout, with constant or + data-dependent length; +* Structures with named fields containing arbitrary layouts; +* Unions of variant layouts where the type of data is recorded in a + prefix value, another layout element, or provided externally; +* Bit fields within 8, 16, 24, or 32-bit unsigned integers, numbering + from the least or most significant bit; +* NUL-terminated C strings; +* Blobs of fixed or variable-length raw data. + +## Installation + +Development and testing is done using Node.js, supporting versions 4.5 +and later. Install with `npm install buffer-layout`. + +## Examples + +All examples are from the `test/examples.js` unit test and assume the +following context: + + const assert = require('assert'); + const util = require('util'); + const lo = require('buffer-layout'); + +The examples give only a taste of what can be done. Structures, unions, +and sequences can nest; [union +discriminators](http://pabigot.github.io/buffer-layout/module-Layout-UnionDiscriminator.html) +can be within the union or external to it; sequence and blob lengths may +be fixed or read from the buffer. + +For full details see the [documentation](http://pabigot.github.io/buffer-layout/). + +### Four-element array of 16-bit signed little-endian integers + +The C definition: + + int16_t arr[4] = { 1, -1, 3, -3 }; + +The buffer-layout way: + + const ds = lo.seq(lo.s16(), 4); + const b = Buffer.alloc(8); + assert.equal(ds.encode([1, -1, 3, -3], b), 4 * 2); + assert.equal(Buffer.from('0100ffff0300fdff', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), [1, -1, 3, -3]); + +See [Int](http://pabigot.github.io/buffer-layout/module-Layout-Int.html) +and [Sequence](http://pabigot.github.io/buffer-layout/module-Layout-Sequence.html). + +### A native C `struct` on a 32-bit little-endian machine + +The C definition: + + struct ds { + uint8_t v; + uint32_t u32; + } st; + +The buffer-layout way: + + const ds = lo.struct([lo.u8('v'), + lo.seq(lo.u8(), 3), // alignment padding + lo.u32('u32')]); + assert.equal(ds.offsetOf('u32'), 4); + const b = Buffer.alloc(8); + b.fill(0xbd); + assert.equal(ds.encode({v: 1, u32: 0x12345678}, b), 1 + 3 + 4); + assert.equal(Buffer.from('01bdbdbd78563412', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), {v: 1, u32: 0x12345678}); + +Note that the C language requires padding which must be explicitly added +in the buffer-layout structure definition. Since the padding is not +accessible, the corresponding layout has no +[property](http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#property). + +See [Structure](http://pabigot.github.io/buffer-layout/module-Layout-Structure.html). + +### A packed C `struct` on a 32-bit little-endian machine + +The C definition: + + struct ds { + uint8_t v; + uint32_t u32; + } __attribute__((__packed__)) st; + +The buffer-layout way: + + const ds = lo.struct([lo.u8('v'), + lo.u32('u32')]); + assert.equal(ds.offsetOf('u32'), 1); + const b = Buffer.alloc(5); + b.fill(0xbd); + assert.equal(ds.encode({v: 1, u32: 0x12345678}, b), 1 + 4); + assert.equal(Buffer.from('0178563412', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), {v: 1, u32: 0x12345678}); + +### A tagged union of 4-byte values + +Assume a 5-byte packed structure where the interpretation of the last +four bytes depends on the first byte. The C definition: + + struct { + uint8_t t; + union ds { + uint8_t u8[4]; // default interpretation + int16_t s16[2]; // when t is 'h' + uint32_t u32; // when t is 'w' + float f32; // when t is 'f' + } u; + } __attribute__((__packed__)) un; + +The buffer-layout way: + + const t = lo.u8('t'); + const un = lo.union(t, lo.seq(lo.u8(), 4, 'u8')); + const nul = un.addVariant('n'.charCodeAt(0), 'nul'); + const u32 = un.addVariant('w'.charCodeAt(0), lo.u32(), 'u32'); + const s16 = un.addVariant('h'.charCodeAt(0), lo.seq(lo.s16(), 2), 's16'); + const f32 = un.addVariant('f'.charCodeAt(0), lo.f32(), 'f32'); + const b = Buffer.alloc(un.span); + assert.deepEqual(un.decode(b), {t: 0, u8: [0, 0, 0, 0]}); + assert.deepEqual(un.decode(Buffer.from('6e01020304', 'hex')), + {nul: true}); + assert.deepEqual(un.decode(Buffer.from('7778563412', 'hex')), + {u32: 0x12345678}); + assert.deepEqual(un.decode(Buffer.from('660000bd41', 'hex')), + {f32: 23.625}); + assert.deepEqual(un.decode(Buffer.from('a5a5a5a5a5', 'hex')), + {t: 0xa5, u8: [0xa5, 0xa5, 0xa5, 0xa5]}); + assert.equal(s16.encode({s16: [123, -123]}, b), 1 + 2 * 2); + assert.equal(Buffer.from('687b0085ff', 'hex').compare(b), 0); + +See [Union](http://pabigot.github.io/buffer-layout/module-Layout-Union.html). + +### Decoding into class instances + +Using the same 5-byte packet structure but with JavaScript classes +representing the union and the variants: + + function Union() { } + lo.bindConstructorLayout(Union, + lo.union(lo.u8('t'), lo.seq(lo.u8(), 4, 'u8'))); + + function Vn() {} + util.inherits(Vn, Union); + lo.bindConstructorLayout(Vn, + Union.layout_.addVariant('n'.charCodeAt(0), 'nul')); + + function Vu32(v) { this.u32 = v; } + util.inherits(Vu32, Union); + lo.bindConstructorLayout(Vu32, + Union.layout_.addVariant('w'.charCodeAt(0), lo.u32(), 'u32')); + + function Vs16(v) { this.s16 = v; } + util.inherits(Vs16, Union); + lo.bindConstructorLayout(Vs16, + Union.layout_.addVariant('h'.charCodeAt(0), lo.seq(lo.s16(), 2), 's16')); + + function Vf32(v) { this.f32 = v; } + util.inherits(Vf32, Union); + lo.bindConstructorLayout(Vf32, + Union.layout_.addVariant('f'.charCodeAt(0), lo.f32(), 'f32')); + + let v = Union.decode(Buffer.from('7778563412', 'hex')); + assert(v instanceof Vu32); + assert(v instanceof Union); + assert.equal(v.u32, 0x12345678); + + v = Union.decode(Buffer.from('a5a5a5a5a5', 'hex')); + assert(v instanceof Union); + assert.equal(v.t, 0xa5); + assert.deepEqual(v.u8, [0xa5, 0xa5, 0xa5, 0xa5]); + + const b = Buffer.alloc(Union.layout_.span); + v = new Vf32(23.625); + v.encode(b); + assert.equal(Buffer.from('660000bd41', 'hex').compare(b), 0); + + b.fill(0xFF); + v = new Vn(); + v.encode(b); + assert.equal(Buffer.from('6effffffff', 'hex').compare(b), 0); + +Note that one variant (`'n'`) carries no data, leaving the remainder of +the buffer unchanged when stored. + +See +[Layout.makeDestinationObject()](http://pabigot.github.io/buffer-layout/module-Layout-Layout.html#makeDestinationObject) +and +[bindConstructorLayout](http://pabigot.github.io/buffer-layout/module-Layout.html#.bindConstructorLayout). + +### Packed bit fields on a little-endian machine + +The C definition: + + struct ds { + unsigned int b00l03: 3; + unsigned int flg03: 1; + unsigned int b04l18: 24; + unsigned int b1Cl04: 4; + } st; + +The buffer-layout way: + + const ds = lo.bits(lo.u32()); + const b = Buffer.alloc(4); + ds.addField(3, 'b00l03'); + ds.addBoolean('flg03'); + ds.addField(24, 'b04l18'); + ds.addField(4, 'b1Cl04'); + b.fill(0xff); + assert.equal(ds.encode({b00l03: 3, b04l18: 24, b1Cl04: 4}, b), 4); + assert.equal(Buffer.from('8b010040', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), + {b00l03: 3, flg03: true, b04l18: 24, b1Cl04: 4}); + +See [BitStructure](http://pabigot.github.io/buffer-layout/module-Layout-BitStructure.html). + +### 64-bit values as Numbers + +The C definition: + + uint64_t v = 0x0102030405060708ULL; + +The buffer-layout way: + + const ds = lo.nu64be(); + const b = Buffer.from('0102030405060708', 'hex'); + const v = 72623859790382856; + const nv = v - 6; + assert.equal(v, nv); + assert.equal(ds.decode(b), nv); + +Note that because the exact value is not less than 2^53 it cannot be +represented as a JavaScript Number, and is instead approximated by a +nearby representable integer that is equivalent within Numbers. + +See [NearUInt64](http://pabigot.github.io/buffer-layout/module-Layout-NearUInt64.html). + +### A NUL-terminated C string + +The C definition: + + const char str[] = "hi!"; + +The buffer-layout way: + + const ds = lo.cstr(); + const b = Buffer.alloc(8); + assert.equal(ds.encode('hi!', b), 3 + 1); + const slen = ds.getSpan(b); + assert.equal(slen, 4); + assert.equal(Buffer.from('68692100', 'hex').compare(b.slice(0, slen)), 0); + assert.equal(ds.decode(b), 'hi!'); + +See [CString](http://pabigot.github.io/buffer-layout/module-Layout-CString.html). + +### A fixed-length block of data offset within a buffer + +The buffer-layout way: + + const ds = lo.blob(4); + const b = Buffer.from('0102030405060708', 'hex'); + assert.equal(Buffer.from('03040506', 'hex').compare(ds.decode(b, 2)), 0); + +See [Blob](http://pabigot.github.io/buffer-layout/module-Layout-Blob.html). + +### A variable-length array of pairs of C strings + +The buffer-layout way: + + const pr = lo.seq(lo.cstr(), 2); + const n = lo.u8('n'); + const vla = lo.seq(pr, lo.offset(n, -1), 'a'); + const st = lo.struct([n, vla], 'st'); + const b = Buffer.alloc(32); + const arr = [['k1', 'v1'], ['k2', 'v2'], ['k3', 'etc']]; + b.fill(0); + assert.equal(st.encode({a: arr}, b), + 1 + (2 * ((2 + 1) + (2 + 1)) + (2 + 1) + (3 + 1))); + const span = st.getSpan(b); + assert.equal(span, 20); + assert.equal(Buffer.from('036b31007631006b32007632006b330065746300', 'hex') + .compare(b.slice(0, span)), 0); + assert.deepEqual(st.decode(b), {n: 3, a: arr}); + +See [OffsetLayout](http://pabigot.github.io/buffer-layout/module-Layout-OffsetLayout.html). + +### A C flexible array member with implicit length + +When data is obtained over a packetized interface the length of the +packet can provide implicit limits on the last field. + +The C definition: + + struct ds { + uint8_t prop; + uint16_t data[]; + }; + +The buffer-layout way: + + const st = lo.struct([lo.u8('prop'), + lo.seq(lo.u16(), + lo.greedy(lo.u16().span), + 'data')], + 'ds'); + const b = Buffer.from('21010002030405', 'hex'); + assert.deepEqual(st.decode(b), {prop: 33, data: [0x0001, 0x0302, 0x0504]}); + b.fill(0xFF); + assert.equal(st.encode({prop: 9, data: [5, 6]}, b), 1 + 2 * 2); + assert.equal(Buffer.from('0905000600FFFF', 'hex').compare(b), 0); + +### Tagged values, or variable-length unions + +Storing arbitrary data using a leading byte to identify the content then +a value that takes up only as much room as is necessary. + +The example also shows how to extend the variant recognition API to +support abitrary constant without consuming space for them in the +encoded union. This could be used to make something similar to +[BSON](http://bsonspec.org/spec.html). + +Here's the code that defines the union, the variants, and the +recognition of `true` and `false` values for `b` as distinct variants: + + const un = lo.union(lo.u8('t')); + const u8 = un.addVariant('B'.charCodeAt(0), lo.u8(), 'u8'); + const s16 = un.addVariant('h'.charCodeAt(0), lo.s16(), 's16'); + const s48 = un.addVariant('Q'.charCodeAt(0), lo.s48(), 's48'); + const cstr = un.addVariant('s'.charCodeAt(0), lo.cstr(), 'str'); + const tr = un.addVariant('T'.charCodeAt(0), lo.const(true), 'b'); + const fa = un.addVariant('F'.charCodeAt(0), lo.const(false), 'b'); + const b = Buffer.alloc(1 + 6); + un.configGetSourceVariant(function(src) { + if (src.hasOwnProperty('b')) { + return src.b ? tr : fa; + } + return this.defaultGetSourceVariant(src); + }); + +And here are examples of encoding, checking the encoded length, and +decoding each of the alternatives: + + b.fill(0xff); + assert.equal(un.encode({u8: 1}, b), 1 + 1); + assert.equal(un.getSpan(b), 2); + assert.equal(Buffer.from('4201ffffffffff', 'hex').compare(b), 0); + assert.equal(un.decode(b).u8, 1); + + b.fill(0xff); + assert.equal(un.encode({s16: -32000}, b), 1 + 2); + assert.equal(un.getSpan(b), 3); + assert.equal(Buffer.from('680083ffffffff', 'hex').compare(b), 0); + assert.equal(un.decode(b).s16, -32000); + + b.fill(0xff); + const v48 = Math.pow(2, 47) - 1; + assert.equal(un.encode({s48: v48}, b), 1 + 6); + assert.equal(un.getSpan(b), 7); + assert.equal(Buffer.from('51ffffffffff7f', 'hex').compare(b), 0); + assert.equal(un.decode(b).s48, v48); + + b.fill(0xff); + assert.equal(un.encode({b: true}, b), 1); + assert.equal(un.getSpan(b), 1); + assert.equal(Buffer.from('54ffffffffffff', 'hex').compare(b), 0); + assert.strictEqual(un.decode(b).b, true); + + b.fill(0xff); + assert.equal(un.encode({b: false}, b), 1); + assert.equal(un.getSpan(b), 1); + assert.equal(Buffer.from('46ffffffffffff', 'hex').compare(b), 0); + assert.strictEqual(un.decode(b).b, false); + +**NOTE** This code tickles a long-standing [bug in +Buffer.writeInt{L,B}E](https://github.com/nodejs/node/pull/3994); if you +are using Node prior to 4.2.4 or 5.2.0 you should update. diff --git a/tests/node_modules/buffer-layout/jsdoc/conf.json b/tests/node_modules/buffer-layout/jsdoc/conf.json new file mode 100644 index 0000000..32e8511 --- /dev/null +++ b/tests/node_modules/buffer-layout/jsdoc/conf.json @@ -0,0 +1,10 @@ +{ + "opts": { + "recurse": true, + "destination": "./jsdoc/html/" + }, + "source": { + "include": ["./lib/", "README.md"] + }, + "plugins": ["plugins/markdown", "custom/local"] +} diff --git a/tests/node_modules/buffer-layout/jsdoc/custom/local.js b/tests/node_modules/buffer-layout/jsdoc/custom/local.js new file mode 100644 index 0000000..70e460b --- /dev/null +++ b/tests/node_modules/buffer-layout/jsdoc/custom/local.js @@ -0,0 +1,75 @@ +/** + @overview Make references to local things local. + @module plugins/local + @author Michael Mathews + @author Peter A. Bigot + @see {@link https://github.com/jsdoc3/jsdoc/issues/101|issue #101} + */ + +var thisModule = '', + registry = {}; + +function reset() { + thisModule = ''; + registry = {}; +} + +exports.defineTags = function(dictionary) { + dictionary.defineTag('local', { + onTagged: function(doclet, tag) { + registry[tag.text] = true; + } + }); +} + +function buildRE(prefix, tag) { + var pat = '(' + prefix + ')\\b(' + tag + ')\\b'; + return new RegExp(pat, 'g'); +} + +exports.handlers = { + jsdocCommentFound: function(e) { + if (thisModule) for (var local in registry) { + /* Handle {@link local} => {@link module~local|local} (across EOL) */ + var re = new RegExp('({@link\\s*\\*?\\s*)\\b(' + local + '\\b[^|}]*)}', 'g'); + e.comment = e.comment.replace(re, + '$1' + thisModule + '~$2\|$2}'); + + /* Handle {local} => {thisModule~local}. Brace reference + * doesn't support providing alternative text. */ + e.comment = e.comment.replace(buildRE('{', local), + '$1' + thisModule + '~$2'); + + /* Handle `@cmd local` => `@cmd thisModule~local` for + * certain commands (across EOL) */ + e.comment = e.comment.replace(buildRE('@(event|link|memberof|name)\\s*\\*?\\s*', local), + '$1' + thisModule + '~$3'); + } + }, + + newDoclet: function(e) { + if (e.doclet.kind === 'module') { + thisModule = e.doclet.longname; + } + else { + if (thisModule) for (var local in registry) { + var augment; + if (e.doclet.augments) { + for (var i = 0, len = e.doclet.augments.length; i < len; i++) { + augment = e.doclet.augments[i]; + if (augment && augment.indexOf(local) === 0) { + e.doclet.augments[i] = thisModule+'~'+e.doclet.augments[i]; + } + } + } + + if (e.doclet.longname.indexOf(local) === 0) { + e.doclet.longname = thisModule+'~'+e.doclet.longname; + } + } + } + }, + fileComplete: function(e) { + reset(); + } +}; diff --git a/tests/node_modules/buffer-layout/lib/Layout.js b/tests/node_modules/buffer-layout/lib/Layout.js new file mode 100644 index 0000000..1e9b06c --- /dev/null +++ b/tests/node_modules/buffer-layout/lib/Layout.js @@ -0,0 +1,2712 @@ +/* The MIT License (MIT) + * + * Copyright 2015-2018 Peter A. Bigot + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * Support for translating between Buffer instances and JavaScript + * native types. + * + * {@link module:Layout~Layout|Layout} is the basis of a class + * hierarchy that associates property names with sequences of encoded + * bytes. + * + * Layouts are supported for these scalar (numeric) types: + * * {@link module:Layout~UInt|Unsigned integers in little-endian + * format} with {@link module:Layout.u8|8-bit}, {@link + * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, + * {@link module:Layout.u32|32-bit}, {@link + * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} + * representation ranges; + * * {@link module:Layout~UIntBE|Unsigned integers in big-endian + * format} with {@link module:Layout.u16be|16-bit}, {@link + * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, + * {@link module:Layout.u40be|40-bit}, and {@link + * module:Layout.u48be|48-bit} representation ranges; + * * {@link module:Layout~Int|Signed integers in little-endian + * format} with {@link module:Layout.s8|8-bit}, {@link + * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, + * {@link module:Layout.s32|32-bit}, {@link + * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} + * representation ranges; + * * {@link module:Layout~IntBE|Signed integers in big-endian format} + * with {@link module:Layout.s16be|16-bit}, {@link + * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, + * {@link module:Layout.s40be|40-bit}, and {@link + * module:Layout.s48be|48-bit} representation ranges; + * * 64-bit integral values that decode to an exact (if magnitude is + * less than 2^53) or nearby integral Number in {@link + * module:Layout.nu64|unsigned little-endian}, {@link + * module:Layout.nu64be|unsigned big-endian}, {@link + * module:Layout.ns64|signed little-endian}, and {@link + * module:Layout.ns64be|unsigned big-endian} encodings; + * * 32-bit floating point values with {@link + * module:Layout.f32|little-endian} and {@link + * module:Layout.f32be|big-endian} representations; + * * 64-bit floating point values with {@link + * module:Layout.f64|little-endian} and {@link + * module:Layout.f64be|big-endian} representations; + * * {@link module:Layout.const|Constants} that take no space in the + * encoded expression. + * + * and for these aggregate types: + * * {@link module:Layout.seq|Sequence}s of instances of a {@link + * module:Layout~Layout|Layout}, with JavaScript representation as + * an Array and constant or data-dependent {@link + * module:Layout~Sequence#count|length}; + * * {@link module:Layout.struct|Structure}s that aggregate a + * heterogeneous sequence of {@link module:Layout~Layout|Layout} + * instances, with JavaScript representation as an Object; + * * {@link module:Layout.union|Union}s that support multiple {@link + * module:Layout~VariantLayout|variant layouts} over a fixed + * (padded) or variable (not padded) span of bytes, using an + * unsigned integer at the start of the data or a separate {@link + * module:Layout.unionLayoutDiscriminator|layout element} to + * determine which layout to use when interpreting the buffer + * contents; + * * {@link module:Layout.bits|BitStructure}s that contain a sequence + * of individual {@link + * module:Layout~BitStructure#addField|BitField}s packed into an 8, + * 16, 24, or 32-bit unsigned integer starting at the least- or + * most-significant bit; + * * {@link module:Layout.cstr|C strings} of varying length; + * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link + * module:Layout~Blob#length|length} raw data. + * + * All {@link module:Layout~Layout|Layout} instances are immutable + * after construction, to prevent internal state from becoming + * inconsistent. + * + * @local Layout + * @local ExternalLayout + * @local GreedyCount + * @local OffsetLayout + * @local UInt + * @local UIntBE + * @local Int + * @local IntBE + * @local NearUInt64 + * @local NearUInt64BE + * @local NearInt64 + * @local NearInt64BE + * @local Float + * @local FloatBE + * @local Double + * @local DoubleBE + * @local Sequence + * @local Structure + * @local UnionDiscriminator + * @local UnionLayoutDiscriminator + * @local Union + * @local VariantLayout + * @local BitStructure + * @local BitField + * @local Boolean + * @local Blob + * @local CString + * @local Constant + * @local bindConstructorLayout + * @module Layout + * @license MIT + * @author Peter A. Bigot + * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} + */ + +'use strict'; + +/** + * Base class for layout objects. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support the {@link + * Layout#encode|encode} or {@link Layout#decode|decode} functions. + * + * @param {Number} span - Initializer for {@link Layout#span|span}. The + * parameter must be an integer; a negative value signifies that the + * span is {@link Layout#getSpan|value-specific}. + * + * @param {string} [property] - Initializer for {@link + * Layout#property|property}. + * + * @abstract + */ +class Layout { + constructor(span, property) { + if (!Number.isInteger(span)) { + throw new TypeError('span must be an integer'); + } + + /** The span of the layout in bytes. + * + * Positive values are generally expected. + * + * Zero will only appear in {@link Constant}s and in {@link + * Sequence}s where the {@link Sequence#count|count} is zero. + * + * A negative value indicates that the span is value-specific, and + * must be obtained using {@link Layout#getSpan|getSpan}. */ + this.span = span; + + /** The property name used when this layout is represented in an + * Object. + * + * Used only for layouts that {@link Layout#decode|decode} to Object + * instances. If left undefined the span of the unnamed layout will + * be treated as padding: it will not be mutated by {@link + * Layout#encode|encode} nor represented as a property in the + * decoded Object. */ + this.property = property; + } + + /** Function to create an Object into which decoded properties will + * be written. + * + * Used only for layouts that {@link Layout#decode|decode} to Object + * instances, which means: + * * {@link Structure} + * * {@link Union} + * * {@link VariantLayout} + * * {@link BitStructure} + * + * If left undefined the JavaScript representation of these layouts + * will be Object instances. + * + * See {@link bindConstructorLayout}. + */ + makeDestinationObject() { + return {}; + } + + /** + * Decode from a Buffer into an JavaScript value. + * + * @param {Buffer} b - the buffer from which encoded data is read. + * + * @param {Number} [offset] - the offset at which the encoded data + * starts. If absent a zero offset is inferred. + * + * @returns {(Number|Array|Object)} - the value of the decoded data. + * + * @abstract + */ + decode(b, offset) { + throw new Error('Layout is abstract'); + } + + /** + * Encode a JavaScript value into a Buffer. + * + * @param {(Number|Array|Object)} src - the value to be encoded into + * the buffer. The type accepted depends on the (sub-)type of {@link + * Layout}. + * + * @param {Buffer} b - the buffer into which encoded data will be + * written. + * + * @param {Number} [offset] - the offset at which the encoded data + * starts. If absent a zero offset is inferred. + * + * @returns {Number} - the number of bytes encoded, including the + * space skipped for internal padding, but excluding data such as + * {@link Sequence#count|lengths} when stored {@link + * ExternalLayout|externally}. This is the adjustment to `offset` + * producing the offset where data for the next layout would be + * written. + * + * @abstract + */ + encode(src, b, offset) { + throw new Error('Layout is abstract'); + } + + /** + * Calculate the span of a specific instance of a layout. + * + * @param {Buffer} b - the buffer that contains an encoded instance. + * + * @param {Number} [offset] - the offset at which the encoded instance + * starts. If absent a zero offset is inferred. + * + * @return {Number} - the number of bytes covered by the layout + * instance. If this method is not overridden in a subclass the + * definition-time constant {@link Layout#span|span} will be + * returned. + * + * @throws {RangeError} - if the length of the value cannot be + * determined. + */ + getSpan(b, offset) { + if (0 > this.span) { + throw new RangeError('indeterminate span'); + } + return this.span; + } + + /** + * Replicate the layout using a new property. + * + * This function must be used to get a structurally-equivalent layout + * with a different name since all {@link Layout} instances are + * immutable. + * + * **NOTE** This is a shallow copy. All fields except {@link + * Layout#property|property} are strictly equal to the origin layout. + * + * @param {String} property - the value for {@link + * Layout#property|property} in the replica. + * + * @returns {Layout} - the copy with {@link Layout#property|property} + * set to `property`. + */ + replicate(property) { + const rv = Object.create(this.constructor.prototype); + Object.assign(rv, this); + rv.property = property; + return rv; + } + + /** + * Create an object from layout properties and an array of values. + * + * **NOTE** This function returns `undefined` if invoked on a layout + * that does not return its value as an Object. Objects are + * returned for things that are a {@link Structure}, which includes + * {@link VariantLayout|variant layouts} if they are structures, and + * excludes {@link Union}s. If you want this feature for a union + * you must use {@link Union.getVariant|getVariant} to select the + * desired layout. + * + * @param {Array} values - an array of values that correspond to the + * default order for properties. As with {@link Layout#decode|decode} + * layout elements that have no property name are skipped when + * iterating over the array values. Only the top-level properties are + * assigned; arguments are not assigned to properties of contained + * layouts. Any unused values are ignored. + * + * @return {(Object|undefined)} + */ + fromArray(values) { + return undefined; + } +} +exports.Layout = Layout; + +/* Provide text that carries a name (such as for a function that will + * be throwing an error) annotated with the property of a given layout + * (such as one for which the value was unacceptable). + * + * @ignore */ +function nameWithProperty(name, lo) { + if (lo.property) { + return name + '[' + lo.property + ']'; + } + return name; +} +exports.nameWithProperty = nameWithProperty; + +/** + * Augment a class so that instances can be encoded/decoded using a + * given layout. + * + * Calling this function couples `Class` with `layout` in several ways: + * + * * `Class.layout_` becomes a static member property equal to `layout`; + * * `layout.boundConstructor_` becomes a static member property equal + * to `Class`; + * * The {@link Layout#makeDestinationObject|makeDestinationObject()} + * property of `layout` is set to a function that returns a `new + * Class()`; + * * `Class.decode(b, offset)` becomes a static member function that + * delegates to {@link Layout#decode|layout.decode}. The + * synthesized function may be captured and extended. + * * `Class.prototype.encode(b, offset)` provides an instance member + * function that delegates to {@link Layout#encode|layout.encode} + * with `src` set to `this`. The synthesized function may be + * captured and extended, but when the extension is invoked `this` + * must be explicitly bound to the instance. + * + * @param {class} Class - a JavaScript class with a nullary + * constructor. + * + * @param {Layout} layout - the {@link Layout} instance used to encode + * instances of `Class`. + */ +function bindConstructorLayout(Class, layout) { + if ('function' !== typeof Class) { + throw new TypeError('Class must be constructor'); + } + if (Class.hasOwnProperty('layout_')) { + throw new Error('Class is already bound to a layout'); + } + if (!(layout && (layout instanceof Layout))) { + throw new TypeError('layout must be a Layout'); + } + if (layout.hasOwnProperty('boundConstructor_')) { + throw new Error('layout is already bound to a constructor'); + } + Class.layout_ = layout; + layout.boundConstructor_ = Class; + layout.makeDestinationObject = (() => new Class()); + Object.defineProperty(Class.prototype, 'encode', { + value: function(b, offset) { + return layout.encode(this, b, offset); + }, + writable: true, + }); + Object.defineProperty(Class, 'decode', { + value: function(b, offset) { + return layout.decode(b, offset); + }, + writable: true, + }); +} +exports.bindConstructorLayout = bindConstructorLayout; + +/** + * An object that behaves like a layout but does not consume space + * within its containing layout. + * + * This is primarily used to obtain metadata about a member, such as a + * {@link OffsetLayout} that can provide data about a {@link + * Layout#getSpan|value-specific span}. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support {@link + * ExternalLayout#isCount|isCount} or other {@link Layout} functions. + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @abstract + * @augments {Layout} + */ +class ExternalLayout extends Layout { + /** + * Return `true` iff the external layout decodes to an unsigned + * integer layout. + * + * In that case it can be used as the source of {@link + * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths}, + * or as {@link UnionLayoutDiscriminator#layout|external union + * discriminators}. + * + * @abstract + */ + isCount() { + throw new Error('ExternalLayout is abstract'); + } +} + +/** + * An {@link ExternalLayout} that determines its {@link + * Layout#decode|value} based on offset into and length of the buffer + * on which it is invoked. + * + * *Factory*: {@link module:Layout.greedy|greedy} + * + * @param {Number} [elementSpan] - initializer for {@link + * GreedyCount#elementSpan|elementSpan}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {ExternalLayout} + */ +class GreedyCount extends ExternalLayout { + constructor(elementSpan, property) { + if (undefined === elementSpan) { + elementSpan = 1; + } + if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) { + throw new TypeError('elementSpan must be a (positive) integer'); + } + super(-1, property); + + /** The layout for individual elements of the sequence. The value + * must be a positive integer. If not provided, the value will be + * 1. */ + this.elementSpan = elementSpan; + } + + /** @override */ + isCount() { + return true; + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const rem = b.length - offset; + return Math.floor(rem / this.elementSpan); + } + + /** @override */ + encode(src, b, offset) { + return 0; + } +} + +/** + * An {@link ExternalLayout} that supports accessing a {@link Layout} + * at a fixed offset from the start of another Layout. The offset may + * be before, within, or after the base layout. + * + * *Factory*: {@link module:Layout.offset|offset} + * + * @param {Layout} layout - initializer for {@link + * OffsetLayout#layout|layout}, modulo `property`. + * + * @param {Number} [offset] - Initializes {@link + * OffsetLayout#offset|offset}. Defaults to zero. + * + * @param {string} [property] - Optional new property name for a + * {@link Layout#replicate| replica} of `layout` to be used as {@link + * OffsetLayout#layout|layout}. If not provided the `layout` is used + * unchanged. + * + * @augments {Layout} + */ +class OffsetLayout extends ExternalLayout { + constructor(layout, offset, property) { + if (!(layout instanceof Layout)) { + throw new TypeError('layout must be a Layout'); + } + + if (undefined === offset) { + offset = 0; + } else if (!Number.isInteger(offset)) { + throw new TypeError('offset must be integer or undefined'); + } + + super(layout.span, property || layout.property); + + /** The subordinated layout. */ + this.layout = layout; + + /** The location of {@link OffsetLayout#layout} relative to the + * start of another layout. + * + * The value may be positive or negative, but an error will thrown + * if at the point of use it goes outside the span of the Buffer + * being accessed. */ + this.offset = offset; + } + + /** @override */ + isCount() { + return ((this.layout instanceof UInt) + || (this.layout instanceof UIntBE)); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return this.layout.decode(b, offset + this.offset); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + return this.layout.encode(src, b, offset + this.offset); + } +} + +/** + * Represent an unsigned integer in little-endian format. + * + * *Factory*: {@link module:Layout.u8|u8}, {@link + * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link + * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link + * module:Layout.u48|u48} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class UInt extends Layout { + constructor(span, property) { + super(span, property); + if (6 < this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readUIntLE(offset, this.span); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeUIntLE(src, offset, this.span); + return this.span; + } +} + +/** + * Represent an unsigned integer in big-endian format. + * + * *Factory*: {@link module:Layout.u8be|u8be}, {@link + * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be}, + * {@link module:Layout.u32be|u32be}, {@link + * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class UIntBE extends Layout { + constructor(span, property) { + super( span, property); + if (6 < this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readUIntBE(offset, this.span); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeUIntBE(src, offset, this.span); + return this.span; + } +} + +/** + * Represent a signed integer in little-endian format. + * + * *Factory*: {@link module:Layout.s8|s8}, {@link + * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link + * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link + * module:Layout.s48|s48} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Int extends Layout { + constructor(span, property) { + super(span, property); + if (6 < this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readIntLE(offset, this.span); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeIntLE(src, offset, this.span); + return this.span; + } +} + +/** + * Represent a signed integer in big-endian format. + * + * *Factory*: {@link module:Layout.s8be|s8be}, {@link + * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be}, + * {@link module:Layout.s32be|s32be}, {@link + * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be} + * + * @param {Number} span - initializer for {@link Layout#span|span}. + * The parameter can range from 1 through 6. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class IntBE extends Layout { + constructor(span, property) { + super(span, property); + if (6 < this.span) { + throw new RangeError('span must not exceed 6 bytes'); + } + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readIntBE(offset, this.span); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeIntBE(src, offset, this.span); + return this.span; + } +} + +const V2E32 = Math.pow(2, 32); + +/* True modulus high and low 32-bit words, where low word is always + * non-negative. */ +function divmodInt64(src) { + const hi32 = Math.floor(src / V2E32); + const lo32 = src - (hi32 * V2E32); + return {hi32, lo32}; +} +/* Reconstruct Number from quotient and non-negative remainder */ +function roundedInt64(hi32, lo32) { + return hi32 * V2E32 + lo32; +} + +/** + * Represent an unsigned 64-bit integer in little-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.nu64|nu64} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +class NearUInt64 extends Layout { + constructor(property) { + super(8, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const lo32 = b.readUInt32LE(offset); + const hi32 = b.readUInt32LE(offset + 4); + return roundedInt64(hi32, lo32); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const split = divmodInt64(src); + b.writeUInt32LE(split.lo32, offset); + b.writeUInt32LE(split.hi32, offset + 4); + return 8; + } +} + +/** + * Represent an unsigned 64-bit integer in big-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.nu64be|nu64be} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +class NearUInt64BE extends Layout { + constructor(property) { + super(8, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const hi32 = b.readUInt32BE(offset); + const lo32 = b.readUInt32BE(offset + 4); + return roundedInt64(hi32, lo32); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const split = divmodInt64(src); + b.writeUInt32BE(split.hi32, offset); + b.writeUInt32BE(split.lo32, offset + 4); + return 8; + } +} + +/** + * Represent a signed 64-bit integer in little-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.ns64|ns64} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +class NearInt64 extends Layout { + constructor(property) { + super(8, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const lo32 = b.readUInt32LE(offset); + const hi32 = b.readInt32LE(offset + 4); + return roundedInt64(hi32, lo32); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const split = divmodInt64(src); + b.writeUInt32LE(split.lo32, offset); + b.writeInt32LE(split.hi32, offset + 4); + return 8; + } +} + +/** + * Represent a signed 64-bit integer in big-endian format when + * encoded and as a near integral JavaScript Number when decoded. + * + * *Factory*: {@link module:Layout.ns64be|ns64be} + * + * **NOTE** Values with magnitude greater than 2^52 may not decode to + * the exact value of the encoded representation. + * + * @augments {Layout} + */ +class NearInt64BE extends Layout { + constructor(property) { + super(8, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const hi32 = b.readInt32BE(offset); + const lo32 = b.readUInt32BE(offset + 4); + return roundedInt64(hi32, lo32); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const split = divmodInt64(src); + b.writeInt32BE(split.hi32, offset); + b.writeUInt32BE(split.lo32, offset + 4); + return 8; + } +} + +/** + * Represent a 32-bit floating point number in little-endian format. + * + * *Factory*: {@link module:Layout.f32|f32} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Float extends Layout { + constructor(property) { + super(4, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readFloatLE(offset); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeFloatLE(src, offset); + return 4; + } +} + +/** + * Represent a 32-bit floating point number in big-endian format. + * + * *Factory*: {@link module:Layout.f32be|f32be} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class FloatBE extends Layout { + constructor(property) { + super(4, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readFloatBE(offset); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeFloatBE(src, offset); + return 4; + } +} + +/** + * Represent a 64-bit floating point number in little-endian format. + * + * *Factory*: {@link module:Layout.f64|f64} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Double extends Layout { + constructor(property) { + super(8, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readDoubleLE(offset); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeDoubleLE(src, offset); + return 8; + } +} + +/** + * Represent a 64-bit floating point number in big-endian format. + * + * *Factory*: {@link module:Layout.f64be|f64be} + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class DoubleBE extends Layout { + constructor(property) { + super(8, property); + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + return b.readDoubleBE(offset); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + b.writeDoubleBE(src, offset); + return 8; + } +} + +/** + * Represent a contiguous sequence of a specific layout as an Array. + * + * *Factory*: {@link module:Layout.seq|seq} + * + * @param {Layout} elementLayout - initializer for {@link + * Sequence#elementLayout|elementLayout}. + * + * @param {(Number|ExternalLayout)} count - initializer for {@link + * Sequence#count|count}. The parameter must be either a positive + * integer or an instance of {@link ExternalLayout}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Sequence extends Layout { + constructor(elementLayout, count, property) { + if (!(elementLayout instanceof Layout)) { + throw new TypeError('elementLayout must be a Layout'); + } + if (!(((count instanceof ExternalLayout) && count.isCount()) + || (Number.isInteger(count) && (0 <= count)))) { + throw new TypeError('count must be non-negative integer ' + + 'or an unsigned integer ExternalLayout'); + } + let span = -1; + if ((!(count instanceof ExternalLayout)) + && (0 < elementLayout.span)) { + span = count * elementLayout.span; + } + + super(span, property); + + /** The layout for individual elements of the sequence. */ + this.elementLayout = elementLayout; + + /** The number of elements in the sequence. + * + * This will be either a non-negative integer or an instance of + * {@link ExternalLayout} for which {@link + * ExternalLayout#isCount|isCount()} is `true`. */ + this.count = count; + } + + /** @override */ + getSpan(b, offset) { + if (0 <= this.span) { + return this.span; + } + if (undefined === offset) { + offset = 0; + } + let span = 0; + let count = this.count; + if (count instanceof ExternalLayout) { + count = count.decode(b, offset); + } + if (0 < this.elementLayout.span) { + span = count * this.elementLayout.span; + } else { + let idx = 0; + while (idx < count) { + span += this.elementLayout.getSpan(b, offset + span); + ++idx; + } + } + return span; + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const rv = []; + let i = 0; + let count = this.count; + if (count instanceof ExternalLayout) { + count = count.decode(b, offset); + } + while (i < count) { + rv.push(this.elementLayout.decode(b, offset)); + offset += this.elementLayout.getSpan(b, offset); + i += 1; + } + return rv; + } + + /** Implement {@link Layout#encode|encode} for {@link Sequence}. + * + * **NOTE** If `src` is shorter than {@link Sequence#count|count} then + * the unused space in the buffer is left unchanged. If `src` is + * longer than {@link Sequence#count|count} the unneeded elements are + * ignored. + * + * **NOTE** If {@link Layout#count|count} is an instance of {@link + * ExternalLayout} then the length of `src` will be encoded as the + * count after `src` is encoded. */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const elo = this.elementLayout; + const span = src.reduce((span, v) => { + return span + elo.encode(v, b, offset + span); + }, 0); + if (this.count instanceof ExternalLayout) { + this.count.encode(src.length, b, offset); + } + return span; + } +} + +/** + * Represent a contiguous sequence of arbitrary layout elements as an + * Object. + * + * *Factory*: {@link module:Layout.struct|struct} + * + * **NOTE** The {@link Layout#span|span} of the structure is variable + * if any layout in {@link Structure#fields|fields} has a variable + * span. When {@link Layout#encode|encoding} we must have a value for + * all variable-length fields, or we wouldn't be able to figure out + * how much space to use for storage. We can only identify the value + * for a field when it has a {@link Layout#property|property}. As + * such, although a structure may contain both unnamed fields and + * variable-length fields, it cannot contain an unnamed + * variable-length field. + * + * @param {Layout[]} fields - initializer for {@link + * Structure#fields|fields}. An error is raised if this contains a + * variable-length field for which a {@link Layout#property|property} + * is not defined. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @param {Boolean} [decodePrefixes] - initializer for {@link + * Structure#decodePrefixes|property}. + * + * @throws {Error} - if `fields` contains an unnamed variable-length + * layout. + * + * @augments {Layout} + */ +class Structure extends Layout { + constructor(fields, property, decodePrefixes) { + if (!(Array.isArray(fields) + && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) { + throw new TypeError('fields must be array of Layout instances'); + } + if (('boolean' === typeof property) + && (undefined === decodePrefixes)) { + decodePrefixes = property; + property = undefined; + } + + /* Verify absence of unnamed variable-length fields. */ + for (const fd of fields) { + if ((0 > fd.span) + && (undefined === fd.property)) { + throw new Error('fields cannot contain unnamed variable-length layout'); + } + } + + let span = -1; + try { + span = fields.reduce((span, fd) => span + fd.getSpan(), 0); + } catch (e) { + } + super(span, property); + + /** The sequence of {@link Layout} values that comprise the + * structure. + * + * The individual elements need not be the same type, and may be + * either scalar or aggregate layouts. If a member layout leaves + * its {@link Layout#property|property} undefined the + * corresponding region of the buffer associated with the element + * will not be mutated. + * + * @type {Layout[]} */ + this.fields = fields; + + /** Control behavior of {@link Layout#decode|decode()} given short + * buffers. + * + * In some situations a structure many be extended with additional + * fields over time, with older installations providing only a + * prefix of the full structure. If this property is `true` + * decoding will accept those buffers and leave subsequent fields + * undefined, as long as the buffer ends at a field boundary. + * Defaults to `false`. */ + this.decodePrefixes = !!decodePrefixes; + } + + /** @override */ + getSpan(b, offset) { + if (0 <= this.span) { + return this.span; + } + if (undefined === offset) { + offset = 0; + } + let span = 0; + try { + span = this.fields.reduce((span, fd) => { + const fsp = fd.getSpan(b, offset); + offset += fsp; + return span + fsp; + }, 0); + } catch (e) { + throw new RangeError('indeterminate span'); + } + return span; + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + const dest = this.makeDestinationObject(); + for (const fd of this.fields) { + if (undefined !== fd.property) { + dest[fd.property] = fd.decode(b, offset); + } + offset += fd.getSpan(b, offset); + if (this.decodePrefixes + && (b.length === offset)) { + break; + } + } + return dest; + } + + /** Implement {@link Layout#encode|encode} for {@link Structure}. + * + * If `src` is missing a property for a member with a defined {@link + * Layout#property|property} the corresponding region of the buffer is + * left unmodified. */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const firstOffset = offset; + let lastOffset = 0; + let lastWrote = 0; + for (const fd of this.fields) { + let span = fd.span; + lastWrote = (0 < span) ? span : 0; + if (undefined !== fd.property) { + const fv = src[fd.property]; + if (undefined !== fv) { + lastWrote = fd.encode(fv, b, offset); + if (0 > span) { + /* Read the as-encoded span, which is not necessarily the + * same as what we wrote. */ + span = fd.getSpan(b, offset); + } + } + } + lastOffset = offset; + offset += span; + } + /* Use (lastOffset + lastWrote) instead of offset because the last + * item may have had a dynamic length and we don't want to include + * the padding between it and the end of the space reserved for + * it. */ + return (lastOffset + lastWrote) - firstOffset; + } + + /** @override */ + fromArray(values) { + const dest = this.makeDestinationObject(); + for (const fd of this.fields) { + if ((undefined !== fd.property) + && (0 < values.length)) { + dest[fd.property] = values.shift(); + } + } + return dest; + } + + /** + * Get access to the layout of a given property. + * + * @param {String} property - the structure member of interest. + * + * @return {Layout} - the layout associated with `property`, or + * undefined if there is no such property. + */ + layoutFor(property) { + if ('string' !== typeof property) { + throw new TypeError('property must be string'); + } + for (const fd of this.fields) { + if (fd.property === property) { + return fd; + } + } + } + + /** + * Get the offset of a structure member. + * + * @param {String} property - the structure member of interest. + * + * @return {Number} - the offset in bytes to the start of `property` + * within the structure, or undefined if `property` is not a field + * within the structure. If the property is a member but follows a + * variable-length structure member a negative number will be + * returned. + */ + offsetOf(property) { + if ('string' !== typeof property) { + throw new TypeError('property must be string'); + } + let offset = 0; + for (const fd of this.fields) { + if (fd.property === property) { + return offset; + } + if (0 > fd.span) { + offset = -1; + } else if (0 <= offset) { + offset += fd.span; + } + } + } +} + +/** + * An object that can provide a {@link + * Union#discriminator|discriminator} API for {@link Union}. + * + * **NOTE** This is an abstract base class; you can create instances + * if it amuses you, but they won't support the {@link + * UnionDiscriminator#encode|encode} or {@link + * UnionDiscriminator#decode|decode} functions. + * + * @param {string} [property] - Default for {@link + * UnionDiscriminator#property|property}. + * + * @abstract + */ +class UnionDiscriminator { + constructor(property) { + /** The {@link Layout#property|property} to be used when the + * discriminator is referenced in isolation (generally when {@link + * Union#decode|Union decode} cannot delegate to a specific + * variant). */ + this.property = property; + } + + /** Analog to {@link Layout#decode|Layout decode} for union discriminators. + * + * The implementation of this method need not reference the buffer if + * variant information is available through other means. */ + decode() { + throw new Error('UnionDiscriminator is abstract'); + } + + /** Analog to {@link Layout#decode|Layout encode} for union discriminators. + * + * The implementation of this method need not store the value if + * variant information is maintained through other means. */ + encode() { + throw new Error('UnionDiscriminator is abstract'); + } +} + +/** + * An object that can provide a {@link + * UnionDiscriminator|discriminator API} for {@link Union} using an + * unsigned integral {@link Layout} instance located either inside or + * outside the union. + * + * @param {ExternalLayout} layout - initializes {@link + * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link + * ExternalLayout#isCount|isCount()}. + * + * @param {string} [property] - Default for {@link + * UnionDiscriminator#property|property}, superseding the property + * from `layout`, but defaulting to `variant` if neither `property` + * nor layout provide a property name. + * + * @augments {UnionDiscriminator} + */ +class UnionLayoutDiscriminator extends UnionDiscriminator { + constructor(layout, property) { + if (!((layout instanceof ExternalLayout) + && layout.isCount())) { + throw new TypeError('layout must be an unsigned integer ExternalLayout'); + } + + super(property || layout.property || 'variant'); + + /** The {@link ExternalLayout} used to access the discriminator + * value. */ + this.layout = layout; + } + + /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */ + decode(b, offset) { + return this.layout.decode(b, offset); + } + + /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */ + encode(src, b, offset) { + return this.layout.encode(src, b, offset); + } +} + +/** + * Represent any number of span-compatible layouts. + * + * *Factory*: {@link module:Layout.union|union} + * + * If the union has a {@link Union#defaultLayout|default layout} that + * layout must have a non-negative {@link Layout#span|span}. The span + * of a fixed-span union includes its {@link + * Union#discriminator|discriminator} if the variant is a {@link + * Union#usesPrefixDiscriminator|prefix of the union}, plus the span + * of its {@link Union#defaultLayout|default layout}. + * + * If the union does not have a default layout then the encoded span + * of the union depends on the encoded span of its variant (which may + * be fixed or variable). + * + * {@link VariantLayout#layout|Variant layout}s are added through + * {@link Union#addVariant|addVariant}. If the union has a default + * layout, the span of the {@link VariantLayout#layout|layout + * contained by the variant} must not exceed the span of the {@link + * Union#defaultLayout|default layout} (minus the span of a {@link + * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The + * span of the variant will equal the span of the union itself. + * + * The variant for a buffer can only be identified from the {@link + * Union#discriminator|discriminator} {@link + * UnionDiscriminator#property|property} (in the case of the {@link + * Union#defaultLayout|default layout}), or by using {@link + * Union#getVariant|getVariant} and examining the resulting {@link + * VariantLayout} instance. + * + * A variant compatible with a JavaScript object can be identified + * using {@link Union#getSourceVariant|getSourceVariant}. + * + * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to + * identify the layout used to interpret the union contents. The + * parameter must be an instance of {@link UnionDiscriminator}, an + * {@link ExternalLayout} that satisfies {@link + * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link + * UIntBE}). When a non-external layout element is passed the layout + * appears at the start of the union. In all cases the (synthesized) + * {@link UnionDiscriminator} instance is recorded as {@link + * Union#discriminator|discriminator}. + * + * @param {(Layout|null)} defaultLayout - initializer for {@link + * Union#defaultLayout|defaultLayout}. If absent defaults to `null`. + * If `null` there is no default layout: the union has data-dependent + * length and attempts to decode or encode unrecognized variants will + * throw an exception. A {@link Layout} instance must have a + * non-negative {@link Layout#span|span}, and if it lacks a {@link + * Layout#property|property} the {@link + * Union#defaultLayout|defaultLayout} will be a {@link + * Layout#replicate|replica} with property `content`. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Union extends Layout { + constructor(discr, defaultLayout, property) { + const upv = ((discr instanceof UInt) + || (discr instanceof UIntBE)); + if (upv) { + discr = new UnionLayoutDiscriminator(new OffsetLayout(discr)); + } else if ((discr instanceof ExternalLayout) + && discr.isCount()) { + discr = new UnionLayoutDiscriminator(discr); + } else if (!(discr instanceof UnionDiscriminator)) { + throw new TypeError('discr must be a UnionDiscriminator ' + + 'or an unsigned integer layout'); + } + if (undefined === defaultLayout) { + defaultLayout = null; + } + if (!((null === defaultLayout) + || (defaultLayout instanceof Layout))) { + throw new TypeError('defaultLayout must be null or a Layout'); + } + if (null !== defaultLayout) { + if (0 > defaultLayout.span) { + throw new Error('defaultLayout must have constant span'); + } + if (undefined === defaultLayout.property) { + defaultLayout = defaultLayout.replicate('content'); + } + } + + /* The union span can be estimated only if there's a default + * layout. The union spans its default layout, plus any prefix + * variant layout. By construction both layouts, if present, have + * non-negative span. */ + let span = -1; + if (defaultLayout) { + span = defaultLayout.span; + if ((0 <= span) && upv) { + span += discr.layout.span; + } + } + super(span, property); + + /** The interface for the discriminator value in isolation. + * + * This a {@link UnionDiscriminator} either passed to the + * constructor or synthesized from the `discr` constructor + * argument. {@link + * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be + * `true` iff the `discr` parameter was a non-offset {@link + * Layout} instance. */ + this.discriminator = discr; + + /** `true` if the {@link Union#discriminator|discriminator} is the + * first field in the union. + * + * If `false` the discriminator is obtained from somewhere + * else. */ + this.usesPrefixDiscriminator = upv; + + /** The layout for non-discriminator content when the value of the + * discriminator is not recognized. + * + * This is the value passed to the constructor. It is + * structurally equivalent to the second component of {@link + * Union#layout|layout} but may have a different property + * name. */ + this.defaultLayout = defaultLayout; + + /** A registry of allowed variants. + * + * The keys are unsigned integers which should be compatible with + * {@link Union.discriminator|discriminator}. The property value + * is the corresponding {@link VariantLayout} instances assigned + * to this union by {@link Union#addVariant|addVariant}. + * + * **NOTE** The registry remains mutable so that variants can be + * {@link Union#addVariant|added} at any time. Users should not + * manipulate the content of this property. */ + this.registry = {}; + + /* Private variable used when invoking getSourceVariant */ + let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this); + + /** Function to infer the variant selected by a source object. + * + * Defaults to {@link + * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may + * be overridden using {@link + * Union#configGetSourceVariant|configGetSourceVariant}. + * + * @param {Object} src - as with {@link + * Union#defaultGetSourceVariant|defaultGetSourceVariant}. + * + * @returns {(undefined|VariantLayout)} The default variant + * (`undefined`) or first registered variant that uses a property + * available in `src`. */ + this.getSourceVariant = function(src) { + return boundGetSourceVariant(src); + }; + + /** Function to override the implementation of {@link + * Union#getSourceVariant|getSourceVariant}. + * + * Use this if the desired variant cannot be identified using the + * algorithm of {@link + * Union#defaultGetSourceVariant|defaultGetSourceVariant}. + * + * **NOTE** The provided function will be invoked bound to this + * Union instance, providing local access to {@link + * Union#registry|registry}. + * + * @param {Function} gsv - a function that follows the API of + * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */ + this.configGetSourceVariant = function(gsv) { + boundGetSourceVariant = gsv.bind(this); + }; + } + + /** @override */ + getSpan(b, offset) { + if (0 <= this.span) { + return this.span; + } + if (undefined === offset) { + offset = 0; + } + /* Default layouts always have non-negative span, so we don't have + * one and we have to recognize the variant which will in turn + * determine the span. */ + const vlo = this.getVariant(b, offset); + if (!vlo) { + throw new Error('unable to determine span for unrecognized variant'); + } + return vlo.getSpan(b, offset); + } + + /** + * Method to infer a registered Union variant compatible with `src`. + * + * The first satisified rule in the following sequence defines the + * return value: + * * If `src` has properties matching the Union discriminator and + * the default layout, `undefined` is returned regardless of the + * value of the discriminator property (this ensures the default + * layout will be used); + * * If `src` has a property matching the Union discriminator, the + * value of the discriminator identifies a registered variant, and + * either (a) the variant has no layout, or (b) `src` has the + * variant's property, then the variant is returned (because the + * source satisfies the constraints of the variant it identifies); + * * If `src` does not have a property matching the Union + * discriminator, but does have a property matching a registered + * variant, then the variant is returned (because the source + * matches a variant without an explicit conflict); + * * An error is thrown (because we either can't identify a variant, + * or we were explicitly told the variant but can't satisfy it). + * + * @param {Object} src - an object presumed to be compatible with + * the content of the Union. + * + * @return {(undefined|VariantLayout)} - as described above. + * + * @throws {Error} - if `src` cannot be associated with a default or + * registered variant. + */ + defaultGetSourceVariant(src) { + if (src.hasOwnProperty(this.discriminator.property)) { + if (this.defaultLayout + && src.hasOwnProperty(this.defaultLayout.property)) { + return undefined; + } + const vlo = this.registry[src[this.discriminator.property]]; + if (vlo + && ((!vlo.layout) + || src.hasOwnProperty(vlo.property))) { + return vlo; + } + } else { + for (const tag in this.registry) { + const vlo = this.registry[tag]; + if (src.hasOwnProperty(vlo.property)) { + return vlo; + } + } + } + throw new Error('unable to infer src variant'); + } + + /** Implement {@link Layout#decode|decode} for {@link Union}. + * + * If the variant is {@link Union#addVariant|registered} the return + * value is an instance of that variant, with no explicit + * discriminator. Otherwise the {@link Union#defaultLayout|default + * layout} is used to decode the content. */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + let dest; + const dlo = this.discriminator; + const discr = dlo.decode(b, offset); + let clo = this.registry[discr]; + if (undefined === clo) { + let contentOffset = 0; + clo = this.defaultLayout; + if (this.usesPrefixDiscriminator) { + contentOffset = dlo.layout.span; + } + dest = this.makeDestinationObject(); + dest[dlo.property] = discr; + dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset); + } else { + dest = clo.decode(b, offset); + } + return dest; + } + + /** Implement {@link Layout#encode|encode} for {@link Union}. + * + * This API assumes the `src` object is consistent with the union's + * {@link Union#defaultLayout|default layout}. To encode variants + * use the appropriate variant-specific {@link VariantLayout#encode} + * method. */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const vlo = this.getSourceVariant(src); + if (undefined === vlo) { + const dlo = this.discriminator; + const clo = this.defaultLayout; + let contentOffset = 0; + if (this.usesPrefixDiscriminator) { + contentOffset = dlo.layout.span; + } + dlo.encode(src[dlo.property], b, offset); + return contentOffset + clo.encode(src[clo.property], b, + offset + contentOffset); + } + return vlo.encode(src, b, offset); + } + + /** Register a new variant structure within a union. The newly + * created variant is returned. + * + * @param {Number} variant - initializer for {@link + * VariantLayout#variant|variant}. + * + * @param {Layout} layout - initializer for {@link + * VariantLayout#layout|layout}. + * + * @param {String} property - initializer for {@link + * Layout#property|property}. + * + * @return {VariantLayout} */ + addVariant(variant, layout, property) { + const rv = new VariantLayout(this, variant, layout, property); + this.registry[variant] = rv; + return rv; + } + + /** + * Get the layout associated with a registered variant. + * + * If `vb` does not produce a registered variant the function returns + * `undefined`. + * + * @param {(Number|Buffer)} vb - either the variant number, or a + * buffer from which the discriminator is to be read. + * + * @param {Number} offset - offset into `vb` for the start of the + * union. Used only when `vb` is an instance of {Buffer}. + * + * @return {({VariantLayout}|undefined)} + */ + getVariant(vb, offset) { + let variant = vb; + if (Buffer.isBuffer(vb)) { + if (undefined === offset) { + offset = 0; + } + variant = this.discriminator.decode(vb, offset); + } + return this.registry[variant]; + } +} + +/** + * Represent a specific variant within a containing union. + * + * **NOTE** The {@link Layout#span|span} of the variant may include + * the span of the {@link Union#discriminator|discriminator} used to + * identify it, but values read and written using the variant strictly + * conform to the content of {@link VariantLayout#layout|layout}. + * + * **NOTE** User code should not invoke this constructor directly. Use + * the union {@link Union#addVariant|addVariant} helper method. + * + * @param {Union} union - initializer for {@link + * VariantLayout#union|union}. + * + * @param {Number} variant - initializer for {@link + * VariantLayout#variant|variant}. + * + * @param {Layout} [layout] - initializer for {@link + * VariantLayout#layout|layout}. If absent the variant carries no + * data. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. Unlike many other layouts, variant + * layouts normally include a property name so they can be identified + * within their containing {@link Union}. The property identifier may + * be absent only if `layout` is is absent. + * + * @augments {Layout} + */ +class VariantLayout extends Layout { + constructor(union, variant, layout, property) { + if (!(union instanceof Union)) { + throw new TypeError('union must be a Union'); + } + if ((!Number.isInteger(variant)) || (0 > variant)) { + throw new TypeError('variant must be a (non-negative) integer'); + } + if (('string' === typeof layout) + && (undefined === property)) { + property = layout; + layout = null; + } + if (layout) { + if (!(layout instanceof Layout)) { + throw new TypeError('layout must be a Layout'); + } + if ((null !== union.defaultLayout) + && (0 <= layout.span) + && (layout.span > union.defaultLayout.span)) { + throw new Error('variant span exceeds span of containing union'); + } + if ('string' !== typeof property) { + throw new TypeError('variant must have a String property'); + } + } + let span = union.span; + if (0 > union.span) { + span = layout ? layout.span : 0; + if ((0 <= span) && union.usesPrefixDiscriminator) { + span += union.discriminator.layout.span; + } + } + super(span, property); + + /** The {@link Union} to which this variant belongs. */ + this.union = union; + + /** The unsigned integral value identifying this variant within + * the {@link Union#discriminator|discriminator} of the containing + * union. */ + this.variant = variant; + + /** The {@link Layout} to be used when reading/writing the + * non-discriminator part of the {@link + * VariantLayout#union|union}. If `null` the variant carries no + * data. */ + this.layout = layout || null; + } + + /** @override */ + getSpan(b, offset) { + if (0 <= this.span) { + /* Will be equal to the containing union span if that is not + * variable. */ + return this.span; + } + if (undefined === offset) { + offset = 0; + } + let contentOffset = 0; + if (this.union.usesPrefixDiscriminator) { + contentOffset = this.union.discriminator.layout.span; + } + /* Span is defined solely by the variant (and prefix discriminator) */ + return contentOffset + this.layout.getSpan(b, offset + contentOffset); + } + + /** @override */ + decode(b, offset) { + const dest = this.makeDestinationObject(); + if (undefined === offset) { + offset = 0; + } + if (this !== this.union.getVariant(b, offset)) { + throw new Error('variant mismatch'); + } + let contentOffset = 0; + if (this.union.usesPrefixDiscriminator) { + contentOffset = this.union.discriminator.layout.span; + } + if (this.layout) { + dest[this.property] = this.layout.decode(b, offset + contentOffset); + } else if (this.property) { + dest[this.property] = true; + } else if (this.union.usesPrefixDiscriminator) { + dest[this.union.discriminator.property] = this.variant; + } + return dest; + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + let contentOffset = 0; + if (this.union.usesPrefixDiscriminator) { + contentOffset = this.union.discriminator.layout.span; + } + if (this.layout + && (!src.hasOwnProperty(this.property))) { + throw new TypeError('variant lacks property ' + this.property); + } + this.union.discriminator.encode(this.variant, b, offset); + let span = contentOffset; + if (this.layout) { + this.layout.encode(src[this.property], b, offset + contentOffset); + span += this.layout.getSpan(b, offset + contentOffset); + if ((0 <= this.union.span) + && (span > this.union.span)) { + throw new Error('encoded variant overruns containing union'); + } + } + return span; + } + + /** Delegate {@link Layout#fromArray|fromArray} to {@link + * VariantLayout#layout|layout}. */ + fromArray(values) { + if (this.layout) { + return this.layout.fromArray(values); + } + } +} + +/** JavaScript chose to define bitwise operations as operating on + * signed 32-bit values in 2's complement form, meaning any integer + * with bit 31 set is going to look negative. For right shifts that's + * not a problem, because `>>>` is a logical shift, but for every + * other bitwise operator we have to compensate for possible negative + * results. */ +function fixBitwiseResult(v) { + if (0 > v) { + v += 0x100000000; + } + return v; +} + +/** + * Contain a sequence of bit fields as an unsigned integer. + * + * *Factory*: {@link module:Layout.bits|bits} + * + * This is a container element; within it there are {@link BitField} + * instances that provide the extracted properties. The container + * simply defines the aggregate representation and its bit ordering. + * The representation is an object containing properties with numeric + * or {@link Boolean} values. + * + * {@link BitField}s are added with the {@link + * BitStructure#addField|addField} and {@link + * BitStructure#addBoolean|addBoolean} methods. + + * @param {Layout} word - initializer for {@link + * BitStructure#word|word}. The parameter must be an instance of + * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide. + * + * @param {bool} [msb] - `true` if the bit numbering starts at the + * most significant bit of the containing word; `false` (default) if + * it starts at the least significant bit of the containing word. If + * the parameter at this position is a string and `property` is + * `undefined` the value of this argument will instead be used as the + * value of `property`. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class BitStructure extends Layout { + constructor(word, msb, property) { + if (!((word instanceof UInt) + || (word instanceof UIntBE))) { + throw new TypeError('word must be a UInt or UIntBE layout'); + } + if (('string' === typeof msb) + && (undefined === property)) { + property = msb; + msb = undefined; + } + if (4 < word.span) { + throw new RangeError('word cannot exceed 32 bits'); + } + super(word.span, property); + + /** The layout used for the packed value. {@link BitField} + * instances are packed sequentially depending on {@link + * BitStructure#msb|msb}. */ + this.word = word; + + /** Whether the bit sequences are packed starting at the most + * significant bit growing down (`true`), or the least significant + * bit growing up (`false`). + * + * **NOTE** Regardless of this value, the least significant bit of + * any {@link BitField} value is the least significant bit of the + * corresponding section of the packed value. */ + this.msb = !!msb; + + /** The sequence of {@link BitField} layouts that comprise the + * packed structure. + * + * **NOTE** The array remains mutable to allow fields to be {@link + * BitStructure#addField|added} after construction. Users should + * not manipulate the content of this property.*/ + this.fields = []; + + /* Storage for the value. Capture a variable instead of using an + * instance property because we don't want anything to change the + * value without going through the mutator. */ + let value = 0; + this._packedSetValue = function(v) { + value = fixBitwiseResult(v); + return this; + }; + this._packedGetValue = function() { + return value; + }; + } + + /** @override */ + decode(b, offset) { + const dest = this.makeDestinationObject(); + if (undefined === offset) { + offset = 0; + } + const value = this.word.decode(b, offset); + this._packedSetValue(value); + for (const fd of this.fields) { + if (undefined !== fd.property) { + dest[fd.property] = fd.decode(value); + } + } + return dest; + } + + /** Implement {@link Layout#encode|encode} for {@link BitStructure}. + * + * If `src` is missing a property for a member with a defined {@link + * Layout#property|property} the corresponding region of the packed + * value is left unmodified. Unused bits are also left unmodified. */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + const value = this.word.decode(b, offset); + this._packedSetValue(value); + for (const fd of this.fields) { + if (undefined !== fd.property) { + const fv = src[fd.property]; + if (undefined !== fv) { + fd.encode(fv); + } + } + } + return this.word.encode(this._packedGetValue(), b, offset); + } + + /** Register a new bitfield with a containing bit structure. The + * resulting bitfield is returned. + * + * @param {Number} bits - initializer for {@link BitField#bits|bits}. + * + * @param {string} property - initializer for {@link + * Layout#property|property}. + * + * @return {BitField} */ + addField(bits, property) { + const bf = new BitField(this, bits, property); + this.fields.push(bf); + return bf; + } + + /** As with {@link BitStructure#addField|addField} for single-bit + * fields with `boolean` value representation. + * + * @param {string} property - initializer for {@link + * Layout#property|property}. + * + * @return {Boolean} */ + addBoolean(property) { + // This is my Boolean, not the Javascript one. + // eslint-disable-next-line no-new-wrappers + const bf = new Boolean(this, property); + this.fields.push(bf); + return bf; + } + + /** + * Get access to the bit field for a given property. + * + * @param {String} property - the bit field of interest. + * + * @return {BitField} - the field associated with `property`, or + * undefined if there is no such property. + */ + fieldFor(property) { + if ('string' !== typeof property) { + throw new TypeError('property must be string'); + } + for (const fd of this.fields) { + if (fd.property === property) { + return fd; + } + } + } +} + +/** + * Represent a sequence of bits within a {@link BitStructure}. + * + * All bit field values are represented as unsigned integers. + * + * **NOTE** User code should not invoke this constructor directly. + * Use the container {@link BitStructure#addField|addField} helper + * method. + * + * **NOTE** BitField instances are not instances of {@link Layout} + * since {@link Layout#span|span} measures 8-bit units. + * + * @param {BitStructure} container - initializer for {@link + * BitField#container|container}. + * + * @param {Number} bits - initializer for {@link BitField#bits|bits}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + */ +class BitField { + constructor(container, bits, property) { + if (!(container instanceof BitStructure)) { + throw new TypeError('container must be a BitStructure'); + } + if ((!Number.isInteger(bits)) || (0 >= bits)) { + throw new TypeError('bits must be positive integer'); + } + const totalBits = 8 * container.span; + const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0); + if ((bits + usedBits) > totalBits) { + throw new Error('bits too long for span remainder (' + + (totalBits - usedBits) + ' of ' + + totalBits + ' remain)'); + } + + /** The {@link BitStructure} instance to which this bit field + * belongs. */ + this.container = container; + + /** The span of this value in bits. */ + this.bits = bits; + + /** A mask of {@link BitField#bits|bits} bits isolating value bits + * that fit within the field. + * + * That is, it masks a value that has not yet been shifted into + * position within its containing packed integer. */ + this.valueMask = (1 << bits) - 1; + if (32 === bits) { // shifted value out of range + this.valueMask = 0xFFFFFFFF; + } + + /** The offset of the value within the containing packed unsigned + * integer. The least significant bit of the packed value is at + * offset zero, regardless of bit ordering used. */ + this.start = usedBits; + if (this.container.msb) { + this.start = totalBits - usedBits - bits; + } + + /** A mask of {@link BitField#bits|bits} isolating the field value + * within the containing packed unsigned integer. */ + this.wordMask = fixBitwiseResult(this.valueMask << this.start); + + /** The property name used when this bitfield is represented in an + * Object. + * + * Intended to be functionally equivalent to {@link + * Layout#property}. + * + * If left undefined the corresponding span of bits will be + * treated as padding: it will not be mutated by {@link + * Layout#encode|encode} nor represented as a property in the + * decoded Object. */ + this.property = property; + } + + /** Store a value into the corresponding subsequence of the containing + * bit field. */ + decode() { + const word = this.container._packedGetValue(); + const wordValue = fixBitwiseResult(word & this.wordMask); + const value = wordValue >>> this.start; + return value; + } + + /** Store a value into the corresponding subsequence of the containing + * bit field. + * + * **NOTE** This is not a specialization of {@link + * Layout#encode|Layout.encode} and there is no return value. */ + encode(value) { + if ((!Number.isInteger(value)) + || (value !== fixBitwiseResult(value & this.valueMask))) { + throw new TypeError(nameWithProperty('BitField.encode', this) + + ' value must be integer not exceeding ' + this.valueMask); + } + const word = this.container._packedGetValue(); + const wordValue = fixBitwiseResult(value << this.start); + this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) + | wordValue); + }; +} + +/** + * Represent a single bit within a {@link BitStructure} as a + * JavaScript boolean. + * + * **NOTE** User code should not invoke this constructor directly. + * Use the container {@link BitStructure#addBoolean|addBoolean} helper + * method. + * + * @param {BitStructure} container - initializer for {@link + * BitField#container|container}. + * + * @param {string} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {BitField} + */ +/* eslint-disable no-extend-native */ +class Boolean extends BitField { + constructor(container, property) { + super(container, 1, property); + } + + /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}. + * + * @returns {boolean} */ + decode(b, offset) { + return !!BitField.prototype.decode.call(this, b, offset); + } + + /** @override */ + encode(value) { + if ('boolean' === typeof value) { + // BitField requires integer values + value = +value; + } + return BitField.prototype.encode.call(this, value); + } +} +/* eslint-enable no-extend-native */ + +/** + * Contain a fixed-length block of arbitrary data, represented as a + * Buffer. + * + * *Factory*: {@link module:Layout.blob|blob} + * + * @param {(Number|ExternalLayout)} length - initializes {@link + * Blob#length|length}. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Blob extends Layout { + constructor(length, property) { + if (!(((length instanceof ExternalLayout) && length.isCount()) + || (Number.isInteger(length) && (0 <= length)))) { + throw new TypeError('length must be positive integer ' + + 'or an unsigned integer ExternalLayout'); + } + + let span = -1; + if (!(length instanceof ExternalLayout)) { + span = length; + } + super(span, property); + + /** The number of bytes in the blob. + * + * This may be a non-negative integer, or an instance of {@link + * ExternalLayout} that satisfies {@link + * ExternalLayout#isCount|isCount()}. */ + this.length = length; + } + + /** @override */ + getSpan(b, offset) { + let span = this.span; + if (0 > span) { + span = this.length.decode(b, offset); + } + return span; + } + + /** @override */ + decode(b, offset) { + if (undefined === offset) { + offset = 0; + } + let span = this.span; + if (0 > span) { + span = this.length.decode(b, offset); + } + return b.slice(offset, offset + span); + } + + /** Implement {@link Layout#encode|encode} for {@link Blob}. + * + * **NOTE** If {@link Layout#count|count} is an instance of {@link + * ExternalLayout} then the length of `src` will be encoded as the + * count after `src` is encoded. */ + encode(src, b, offset) { + let span = this.length; + if (this.length instanceof ExternalLayout) { + span = src.length; + } + if (!(Buffer.isBuffer(src) + && (span === src.length))) { + throw new TypeError(nameWithProperty('Blob.encode', this) + + ' requires (length ' + span + ') Buffer as src'); + } + if ((offset + span) > b.length) { + throw new RangeError('encoding overruns Buffer'); + } + b.write(src.toString('hex'), offset, span, 'hex'); + if (this.length instanceof ExternalLayout) { + this.length.encode(span, b, offset); + } + return span; + } +} + +/** + * Contain a `NUL`-terminated UTF8 string. + * + * *Factory*: {@link module:Layout.cstr|cstr} + * + * **NOTE** Any UTF8 string that incorporates a zero-valued byte will + * not be correctly decoded by this layout. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class CString extends Layout { + constructor(property) { + super(-1, property); + } + + /** @override */ + getSpan(b, offset) { + if (!Buffer.isBuffer(b)) { + throw new TypeError('b must be a Buffer'); + } + if (undefined === offset) { + offset = 0; + } + let idx = offset; + while ((idx < b.length) && (0 !== b[idx])) { + idx += 1; + } + return 1 + idx - offset; + } + + /** @override */ + decode(b, offset, dest) { + if (undefined === offset) { + offset = 0; + } + let span = this.getSpan(b, offset); + return b.slice(offset, offset + span - 1).toString('utf-8'); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + /* Must force this to a string, lest it be a number and the + * "utf8-encoding" below actually allocate a buffer of length + * src */ + if ('string' !== typeof src) { + src = src.toString(); + } + const srcb = new Buffer(src, 'utf8'); + const span = srcb.length; + if ((offset + span) > b.length) { + throw new RangeError('encoding overruns Buffer'); + } + srcb.copy(b, offset); + b[offset + span] = 0; + return span + 1; + } +} + +/** + * Contain a UTF8 string with implicit length. + * + * *Factory*: {@link module:Layout.utf8|utf8} + * + * **NOTE** Because the length is implicit in the size of the buffer + * this layout should be used only in isolation, or in a situation + * where the length can be expressed by operating on a slice of the + * containing buffer. + * + * @param {Number} [maxSpan] - the maximum length allowed for encoded + * string content. If not provided there is no bound on the allowed + * content. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class UTF8 extends Layout { + constructor(maxSpan, property) { + if (('string' === typeof maxSpan) + && (undefined === property)) { + property = maxSpan; + maxSpan = undefined; + } + if (undefined === maxSpan) { + maxSpan = -1; + } else if (!Number.isInteger(maxSpan)) { + throw new TypeError('maxSpan must be an integer'); + } + + super(-1, property); + + /** The maximum span of the layout in bytes. + * + * Positive values are generally expected. Zero is abnormal. + * Attempts to encode or decode a value that exceeds this length + * will throw a `RangeError`. + * + * A negative value indicates that there is no bound on the length + * of the content. */ + this.maxSpan = maxSpan; + } + + /** @override */ + getSpan(b, offset) { + if (!Buffer.isBuffer(b)) { + throw new TypeError('b must be a Buffer'); + } + if (undefined === offset) { + offset = 0; + } + return b.length - offset; + } + + /** @override */ + decode(b, offset, dest) { + if (undefined === offset) { + offset = 0; + } + let span = this.getSpan(b, offset); + if ((0 <= this.maxSpan) + && (this.maxSpan < span)) { + throw new RangeError('text length exceeds maxSpan'); + } + return b.slice(offset, offset + span).toString('utf-8'); + } + + /** @override */ + encode(src, b, offset) { + if (undefined === offset) { + offset = 0; + } + /* Must force this to a string, lest it be a number and the + * "utf8-encoding" below actually allocate a buffer of length + * src */ + if ('string' !== typeof src) { + src = src.toString(); + } + const srcb = new Buffer(src, 'utf8'); + const span = srcb.length; + if ((0 <= this.maxSpan) + && (this.maxSpan < span)) { + throw new RangeError('text length exceeds maxSpan'); + } + if ((offset + span) > b.length) { + throw new RangeError('encoding overruns Buffer'); + } + srcb.copy(b, offset); + return span; + } +} + +/** + * Contain a constant value. + * + * This layout may be used in cases where a JavaScript value can be + * inferred without an expression in the binary encoding. An example + * would be a {@link VariantLayout|variant layout} where the content + * is implied by the union {@link Union#discriminator|discriminator}. + * + * @param {Object|Number|String} value - initializer for {@link + * Constant#value|value}. If the value is an object (or array) and + * the application intends the object to remain unchanged regardless + * of what is done to values decoded by this layout, the value should + * be frozen prior passing it to this constructor. + * + * @param {String} [property] - initializer for {@link + * Layout#property|property}. + * + * @augments {Layout} + */ +class Constant extends Layout { + constructor(value, property) { + super(0, property); + + /** The value produced by this constant when the layout is {@link + * Constant#decode|decoded}. + * + * Any JavaScript value including `null` and `undefined` is + * permitted. + * + * **WARNING** If `value` passed in the constructor was not + * frozen, it is possible for users of decoded values to change + * the content of the value. */ + this.value = value; + } + + /** @override */ + decode(b, offset, dest) { + return this.value; + } + + /** @override */ + encode(src, b, offset) { + /* Constants take no space */ + return 0; + } +} + +exports.ExternalLayout = ExternalLayout; +exports.GreedyCount = GreedyCount; +exports.OffsetLayout = OffsetLayout; +exports.UInt = UInt; +exports.UIntBE = UIntBE; +exports.Int = Int; +exports.IntBE = IntBE; +exports.Float = Float; +exports.FloatBE = FloatBE; +exports.Double = Double; +exports.DoubleBE = DoubleBE; +exports.Sequence = Sequence; +exports.Structure = Structure; +exports.UnionDiscriminator = UnionDiscriminator; +exports.UnionLayoutDiscriminator = UnionLayoutDiscriminator; +exports.Union = Union; +exports.VariantLayout = VariantLayout; +exports.BitStructure = BitStructure; +exports.BitField = BitField; +exports.Boolean = Boolean; +exports.Blob = Blob; +exports.CString = CString; +exports.UTF8 = UTF8; +exports.Constant = Constant; + +/** Factory for {@link GreedyCount}. */ +exports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property)); + +/** Factory for {@link OffsetLayout}. */ +exports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property)); + +/** Factory for {@link UInt|unsigned int layouts} spanning one + * byte. */ +exports.u8 = (property => new UInt(1, property)); + +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning two bytes. */ +exports.u16 = (property => new UInt(2, property)); + +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning three bytes. */ +exports.u24 = (property => new UInt(3, property)); + +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning four bytes. */ +exports.u32 = (property => new UInt(4, property)); + +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning five bytes. */ +exports.u40 = (property => new UInt(5, property)); + +/** Factory for {@link UInt|little-endian unsigned int layouts} + * spanning six bytes. */ +exports.u48 = (property => new UInt(6, property)); + +/** Factory for {@link NearUInt64|little-endian unsigned int + * layouts} interpreted as Numbers. */ +exports.nu64 = (property => new NearUInt64(property)); + +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning two bytes. */ +exports.u16be = (property => new UIntBE(2, property)); + +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning three bytes. */ +exports.u24be = (property => new UIntBE(3, property)); + +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning four bytes. */ +exports.u32be = (property => new UIntBE(4, property)); + +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning five bytes. */ +exports.u40be = (property => new UIntBE(5, property)); + +/** Factory for {@link UInt|big-endian unsigned int layouts} + * spanning six bytes. */ +exports.u48be = (property => new UIntBE(6, property)); + +/** Factory for {@link NearUInt64BE|big-endian unsigned int + * layouts} interpreted as Numbers. */ +exports.nu64be = (property => new NearUInt64BE(property)); + +/** Factory for {@link Int|signed int layouts} spanning one + * byte. */ +exports.s8 = (property => new Int(1, property)); + +/** Factory for {@link Int|little-endian signed int layouts} + * spanning two bytes. */ +exports.s16 = (property => new Int(2, property)); + +/** Factory for {@link Int|little-endian signed int layouts} + * spanning three bytes. */ +exports.s24 = (property => new Int(3, property)); + +/** Factory for {@link Int|little-endian signed int layouts} + * spanning four bytes. */ +exports.s32 = (property => new Int(4, property)); + +/** Factory for {@link Int|little-endian signed int layouts} + * spanning five bytes. */ +exports.s40 = (property => new Int(5, property)); + +/** Factory for {@link Int|little-endian signed int layouts} + * spanning six bytes. */ +exports.s48 = (property => new Int(6, property)); + +/** Factory for {@link NearInt64|little-endian signed int layouts} + * interpreted as Numbers. */ +exports.ns64 = (property => new NearInt64(property)); + +/** Factory for {@link Int|big-endian signed int layouts} + * spanning two bytes. */ +exports.s16be = (property => new IntBE(2, property)); + +/** Factory for {@link Int|big-endian signed int layouts} + * spanning three bytes. */ +exports.s24be = (property => new IntBE(3, property)); + +/** Factory for {@link Int|big-endian signed int layouts} + * spanning four bytes. */ +exports.s32be = (property => new IntBE(4, property)); + +/** Factory for {@link Int|big-endian signed int layouts} + * spanning five bytes. */ +exports.s40be = (property => new IntBE(5, property)); + +/** Factory for {@link Int|big-endian signed int layouts} + * spanning six bytes. */ +exports.s48be = (property => new IntBE(6, property)); + +/** Factory for {@link NearInt64BE|big-endian signed int layouts} + * interpreted as Numbers. */ +exports.ns64be = (property => new NearInt64BE(property)); + +/** Factory for {@link Float|little-endian 32-bit floating point} values. */ +exports.f32 = (property => new Float(property)); + +/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */ +exports.f32be = (property => new FloatBE(property)); + +/** Factory for {@link Double|little-endian 64-bit floating point} values. */ +exports.f64 = (property => new Double(property)); + +/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */ +exports.f64be = (property => new DoubleBE(property)); + +/** Factory for {@link Structure} values. */ +exports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes)); + +/** Factory for {@link BitStructure} values. */ +exports.bits = ((word, msb, property) => new BitStructure(word, msb, property)); + +/** Factory for {@link Sequence} values. */ +exports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property)); + +/** Factory for {@link Union} values. */ +exports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property)); + +/** Factory for {@link UnionLayoutDiscriminator} values. */ +exports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property)); + +/** Factory for {@link Blob} values. */ +exports.blob = ((length, property) => new Blob(length, property)); + +/** Factory for {@link CString} values. */ +exports.cstr = (property => new CString(property)); + +/** Factory for {@link UTF8} values. */ +exports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property)); + +/** Factory for {@link Constant} values. */ +exports.const = ((value, property) => new Constant(value, property)); diff --git a/tests/node_modules/buffer-layout/package.json b/tests/node_modules/buffer-layout/package.json new file mode 100644 index 0000000..d61017a --- /dev/null +++ b/tests/node_modules/buffer-layout/package.json @@ -0,0 +1,40 @@ +{ + "name": "buffer-layout", + "version": "1.2.2", + "description": "Translation between JavaScript values and Buffers", + "keywords": [ + "Buffer", + "struct", + "endian", + "pack data" + ], + "homepage": "https://github.com/pabigot/buffer-layout", + "bugs": "https://github.com/pabigot/buffer-layout/issues", + "repository": { + "type": "git", + "url": "https://github.com/pabigot/buffer-layout.git" + }, + "license": "MIT", + "author": "Peter A. Bigot ", + "main": "./lib/Layout.js", + "devDependencies": { + "coveralls": "^3.0.0", + "eslint": "~4.18.2", + "eslint-config-google": "~0.9.1", + "eslint-plugin-pabigot": "~1.1.0", + "istanbul": "~0.4.5", + "jsdoc": "~3.5.5", + "lodash": "~4.17.5", + "mocha": "~5.0.4" + }, + "engines": { + "node": ">=4.5" + }, + "scripts": { + "coverage": "istanbul cover _mocha -- -u tdd", + "coveralls": "istanbul cover _mocha --report lcovonly -- -u tdd && cat ./coverage/lcov.info | coveralls", + "eslint": "eslint lib/ test/", + "jsdoc": "jsdoc -c jsdoc/conf.json", + "test": "mocha -u tdd" + } +} diff --git a/tests/node_modules/buffer-layout/test/LayoutTest.js b/tests/node_modules/buffer-layout/test/LayoutTest.js new file mode 100644 index 0000000..ebc7576 --- /dev/null +++ b/tests/node_modules/buffer-layout/test/LayoutTest.js @@ -0,0 +1,2162 @@ +'use strict'; + +const assert = require('assert'); +const util = require('util'); +const _ = require('lodash'); +const lo = require('../lib/Layout'); + +/* Some versions of Node have an undocumented in-place reverse. + * That's not what we want. */ +function reversedBuffer(b) { + const ba = Array.prototype.slice.call(b); + return Buffer.from(ba.reverse()); +} + +/* Helper to check that a thrown exception is both the expected type + * and carries the expected message. */ +function checkError(exc, expect, regex) { + if (expect && !(exc instanceof expect)) { + console.log('checkError failed: exc ' + typeof exc + ' expect ' + expect); + return false; + } + if (regex && !exc.message.match(regex)) { + console.log('checkError failed: msg "' + exc.message + '" nomatch ' + regex); + return false; + } + return true; +} + +suite('Layout', function() { + test('#reversedBuffer', function() { + const b = Buffer.from('0102030405', 'hex'); + assert.equal(Buffer.from('0504030201', 'hex').compare(reversedBuffer(b)), 0); + }); + suite('Buffer', function() { + test('issue 3992', function() { + const buf = Buffer.alloc(4); + buf.writeIntLE(-0x120000, 0, 4); + assert.deepEqual(buf.toJSON().data, [0x00, 0x00, 0xee, 0xff]); + buf.writeIntBE(-0x120000, 0, 4); + assert.deepEqual(buf.toJSON().data, [0xff, 0xee, 0x00, 0x00]); + }); + }); + suite('Layout', function() { + test('anonymous ctor', function() { + const d = new lo.Layout(8); + assert(d instanceof lo.Layout); + assert.equal(d.span, 8); + assert.equal(d.getSpan(), d.span); + assert.strictEqual(d.property, undefined); + }); + test('named ctor', function() { + const d = new lo.Layout(8, 'tag'); + assert(d instanceof lo.Layout); + assert.equal(d.span, 8); + assert.equal(d.getSpan(), d.span); + assert.equal(d.property, 'tag'); + }); + test('invalid ctor', function() { + assert.throws(() => new lo.Layout(), TypeError); + assert.throws(() => new lo.Layout('3'), TypeError); + assert.throws(() => new lo.Layout('three'), TypeError); + }); + test('abstractness', function() { + const d = new lo.Layout(3); + const b = Buffer.alloc(3); + assert.throws(() => d.decode(b)); + assert.throws(() => d.encode('sth', b)); + }); + test('#getSpan', function() { + assert.equal((new lo.Layout(3)).getSpan(), 3); + assert.throws(() => (new lo.Layout(-1)).getSpan(), RangeError); + }); + }); + suite('UInt', function() { + test('u8', function() { + const d = lo.u8('t'); + const b = Buffer.alloc(1); + assert(d instanceof lo.UInt); + assert(d instanceof lo.Layout); + assert.equal(d.span, 1); + assert.equal(d.getSpan(), d.span); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(23, b), 1); + assert.equal(Buffer.from('17', 'hex').compare(b), 0); + assert.equal(d.decode(b), 23); + }); + test('u16', function() { + const d = lo.u16('t'); + const b = Buffer.alloc(2); + assert(d instanceof lo.UInt); + assert(d instanceof lo.Layout); + assert.equal(d.span, 2); + assert.equal(d.getSpan(), d.span); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x1234, b), 2); + assert.equal(Buffer.from('3412', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x1234); + }); + test('u24', function() { + const d = lo.u24('t'); + const b = Buffer.alloc(3); + assert.equal(d.span, 3); + assert.equal(0x563412, d.decode(Buffer.from('123456', 'hex'))); + assert.throws(() => d.encode(0x1234567, b)); + }); + test('u48', function() { + const d = lo.u48('t'); + const b = Buffer.alloc(6); + assert(d instanceof lo.UInt); + assert(d instanceof lo.Layout); + assert.equal(d.span, 6); + assert.equal(d.getSpan(), d.span); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x123456789abc, b), 6); + assert.equal(Buffer.from('bc9a78563412', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x123456789abc); + }); + test('offset', function() { + const b = Buffer.alloc(4); + b.fill(0xa5); + const d = lo.u16('t'); + d.encode(0x3412, b, 1); + assert.equal(Buffer.from('A51234A5', 'hex').compare(b), 0); + assert.equal(0xA534, d.decode(b, 2)); + }); + test('invalid ctor', function() { + assert.throws(() => new lo.UInt(8), RangeError); + }); + }); + suite('UIntBE', function() { + test('u16be', function() { + const d = lo.u16be('t'); + const b = Buffer.alloc(2); + assert(d instanceof lo.UIntBE); + assert(d instanceof lo.Layout); + assert.equal(d.span, 2); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x1234, b), 2); + assert.equal(Buffer.from('1234', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x1234); + }); + test('u24be', function() { + const d = lo.u24be('t'); + const b = Buffer.alloc(3); + assert.equal(d.span, 3); + assert.equal(0x123456, d.decode(Buffer.from('123456', 'hex'))); + assert.throws(() => d.encode(0x1234567, b)); + assert.throws(() => d.encode(-1, b)); + }); + test('u32be', function() { + const d = lo.u32be('t'); + const b = Buffer.alloc(4); + assert.equal(d.span, 4); + assert.equal(0x12345678, d.decode(Buffer.from('12345678', 'hex'))); + assert.throws(() => d.encode(0x123456789, b)); + assert.throws(() => d.encode(-1, b)); + }); + test('u40be', function() { + const d = lo.u40be('t'); + const b = Buffer.alloc(5); + assert.equal(d.span, 5); + assert.equal(0x123456789a, d.decode(Buffer.from('123456789a', 'hex'))); + assert.throws(() => d.encode(0x123456789ab, b)); + assert.throws(() => d.encode(-1, b)); + }); + test('u48be', function() { + const d = lo.u48be('t'); + const b = Buffer.alloc(6); + assert(d instanceof lo.UIntBE); + assert(d instanceof lo.Layout); + assert.equal(d.span, 6); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x123456789abc, b), 6); + assert.equal(Buffer.from('123456789abc', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x123456789abc); + }); + test('offset', function() { + const b = Buffer.alloc(4); + b.fill(0xa5); + const d = lo.u16be('t'); + d.encode(0x1234, b, 1); + assert.equal(Buffer.from('A51234A5', 'hex').compare(b), 0); + assert.equal(0x34A5, d.decode(b, 2)); + }); + test('invalid ctor', function() { + assert.throws(() => new lo.UIntBE(8), RangeError); + }); + }); + suite('Int', function() { + test('s8', function() { + const d = lo.s8('t'); + const b = Buffer.alloc(1); + assert(d instanceof lo.Int); + assert(d instanceof lo.Layout); + assert.equal(d.span, 1); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(23, b), 1); + assert.equal(Buffer.from('17', 'hex').compare(b), 0); + assert.equal(d.decode(b), 23); + assert.equal(d.encode(-97, b), 1); + assert.equal(Buffer.from('9f', 'hex').compare(b), 0); + assert.equal(d.decode(b), -97); + }); + test('s16', function() { + const d = lo.s16('t'); + const b = Buffer.alloc(2); + assert(d instanceof lo.Int); + assert(d instanceof lo.Layout); + assert.equal(d.span, 2); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x1234, b), 2); + assert.equal(Buffer.from('3412', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x1234); + assert.equal(lo.u16be().decode(b), 0x3412); + assert.equal(d.encode(-12345, b), 2); + assert.equal(Buffer.from('c7cf', 'hex').compare(b), 0); + assert.equal(d.decode(b), -12345); + assert.equal(lo.u16().decode(b), 0xcfc7); + assert.equal(lo.u16be().decode(b), 0xc7cf); + }); + test('s24', function() { + const d = lo.s24('t'); + const b = Buffer.alloc(3); + assert.equal(d.span, 3); + assert.equal(0x563412, d.decode(Buffer.from('123456', 'hex'))); + assert.equal(-1, d.decode(Buffer.from('FFFFFF', 'hex'))); + assert.equal(-0x800000, d.decode(Buffer.from('000080', 'hex'))); + assert.throws(() => d.encode(0x800000, b)); + assert.throws(() => d.encode(-0x800001, b)); + }); + test('s40', function() { + const d = lo.s40('t'); + const b = Buffer.alloc(5); + assert.equal(d.span, 5); + assert.equal(0x123456789a, d.decode(Buffer.from('9a78563412', 'hex'))); + assert.equal(-1, d.decode(Buffer.from('FFFFFFFFFF', 'hex'))); + assert.equal(-0x8000000000, d.decode(Buffer.from('0000000080', 'hex'))); + assert.throws(() => d.encode(0x8000000000, b)); + assert.throws(() => d.encode(-0x8000000001, b)); + }); + test('s48', function() { + const d = lo.s48('t'); + const b = Buffer.alloc(6); + assert(d instanceof lo.Int); + assert(d instanceof lo.Layout); + assert.equal(d.span, 6); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x123456789abc, b), 6); + assert.equal(Buffer.from('bc9a78563412', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x123456789abc); + assert.equal(lo.u48be().decode(b), 0xbc9a78563412); + assert.equal(d.encode(-123456789012345, b), 6); + assert.equal(Buffer.from('8720f279b78f', 'hex').compare(b), 0); + assert.equal(d.decode(b), -123456789012345); + assert.equal(lo.u48().decode(b), 0x8fb779f22087); + assert.equal(lo.u48be().decode(b), 0x8720f279b78f); + }); + test('invalid ctor', function() { + assert.throws(() => new lo.Int(8), RangeError); + }); + }); + suite('IntBE', function() { + test('s16be', function() { + const d = lo.s16be('t'); + const b = Buffer.alloc(2); + assert(d instanceof lo.IntBE); + assert(d instanceof lo.Layout); + assert.equal(d.span, 2); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x1234, b), 2); + assert.equal(Buffer.from('1234', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x1234); + assert.equal(lo.u16().decode(b), 0x3412); + assert.equal(d.encode(-12345, b), 2); + assert.equal(Buffer.from('cfc7', 'hex').compare(b), 0); + assert.equal(d.decode(b), -12345); + assert.equal(lo.u16be().decode(b), 0xcfc7); + assert.equal(lo.u16().decode(b), 0xc7cf); + }); + test('s24be', function() { + const d = lo.s24be('t'); + const b = Buffer.alloc(3); + assert.equal(d.span, 3); + assert.equal(0x123456, d.decode(Buffer.from('123456', 'hex'))); + assert.equal(-1, d.decode(Buffer.from('FFFFFF', 'hex'))); + assert.equal(-0x800000, d.decode(Buffer.from('800000', 'hex'))); + assert.throws(() => d.encode(0x800000, b)); + assert.throws(() => d.encode(-0x800001, b)); + }); + test('s32be', function() { + const d = lo.s32be('t'); + const b = Buffer.alloc(4); + assert.equal(d.span, 4); + assert.equal(0x12345678, d.decode(Buffer.from('12345678', 'hex'))); + assert.equal(-1, d.decode(Buffer.from('FFFFFFFF', 'hex'))); + assert.equal(-0x80000000, d.decode(Buffer.from('80000000', 'hex'))); + assert.throws(() => d.encode(0x80000000, b)); + assert.throws(() => d.encode(-0x80000001, b)); + }); + test('s40be', function() { + const d = lo.s40be('t'); + const b = Buffer.alloc(5); + assert.equal(d.span, 5); + assert.equal(0x123456789a, d.decode(Buffer.from('123456789a', 'hex'))); + assert.equal(-1, d.decode(Buffer.from('FFFFFFFFFF', 'hex'))); + assert.equal(-0x8000000000, d.decode(Buffer.from('8000000000', 'hex'))); + assert.throws(() => d.encode(0x8000000000, b)); + assert.throws(() => d.encode(-0x8000000001, b)); + }); + test('s48be', function() { + const d = lo.s48be('t'); + const b = Buffer.alloc(6); + assert(d instanceof lo.IntBE); + assert(d instanceof lo.Layout); + assert.equal(d.span, 6); + assert.equal(d.property, 't'); + b.fill(0); + assert.equal(d.decode(b), 0); + assert.equal(d.encode(0x123456789abc, b), 6); + assert.equal(Buffer.from('123456789abc', 'hex').compare(b), 0); + assert.equal(d.decode(b), 0x123456789abc); + assert.equal(lo.u48().decode(b), 0xbc9a78563412); + assert.equal(d.encode(-123456789012345, b), 6); + assert.equal(Buffer.from('8fb779f22087', 'hex').compare(b), 0); + assert.equal(d.decode(b), -123456789012345); + assert.equal(lo.u48be().decode(b), 0x8fb779f22087); + assert.equal(lo.u48().decode(b), 0x8720f279b78f); + }); + test('invalid ctor', function() { + assert.throws(() => new lo.IntBE(8, 'u64'), RangeError); + }); + }); + test('RoundedUInt64', function() { + const be = lo.nu64be('be'); + const le = lo.nu64('le'); + assert.equal(be.span, 8); + assert.equal(le.span, 8); + assert.equal(be.property, 'be'); + assert.equal(le.property, 'le'); + + let b = Buffer.from('0000003b2a2a873b', 'hex'); + let rb = reversedBuffer(b); + let v = 254110500667; + let ev = v; + const eb = Buffer.alloc(be.span); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(b.compare(eb), 0); + assert.equal(le.encode(v, eb), 8); + assert.equal(rb.compare(eb), 0); + + b = Buffer.from('001d9515553fdcbb', 'hex'); + rb = reversedBuffer(b); + v = 8326693181709499; + ev = v; + assert.equal(ev, v); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(b.compare(eb), 0); + assert.equal(be.decode(eb), ev); + assert.equal(le.encode(v, eb), 8); + assert.equal(rb.compare(eb), 0); + assert.equal(le.decode(eb), ev); + + /* The logic changes for the remaining cases since the exact + * value cannot be represented in a Number: the encoded buffer + * will not bitwise-match the original buffer. */ + b = Buffer.from('003b2a2aaa7fdcbb', 'hex'); + rb = reversedBuffer(b); + v = 16653386363428027; + ev = v + 1; + assert.equal(ev, v); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(be.decode(eb), ev); + assert.equal(le.encode(v, eb), 8); + assert.equal(le.decode(eb), ev); + + b = Buffer.from('eca8aaa9ffffdcbb', 'hex'); + rb = reversedBuffer(b); + v = 17053067636159536315; + ev = v + 837; + assert.equal(ev, v); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(be.decode(eb), ev); + assert.equal(le.encode(v, eb), 8); + assert.equal(le.decode(eb), ev); + + b = Buffer.alloc(10); + b.fill(0xa5); + le.encode(1, b, 1); + assert.equal(Buffer.from('a50100000000000000a5', 'hex').compare(b), 0); + assert.equal(1, le.decode(b, 1)); + be.encode(1, b, 1); + assert.equal(Buffer.from('a50000000000000001a5', 'hex').compare(b), 0); + assert.equal(1, be.decode(b, 1)); + }); + test('RoundedInt64', function() { + const be = lo.ns64be('be'); + const le = lo.ns64('le'); + assert.equal(be.span, 8); + assert.equal(le.span, 8); + assert.equal(be.property, 'be'); + assert.equal(le.property, 'le'); + + let b = Buffer.from('ffffffff89abcdf0', 'hex'); + let rb = reversedBuffer(b); + let v = -1985229328; + let ev = v; + const eb = Buffer.alloc(be.span); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(b.compare(eb), 0); + assert.equal(le.encode(v, eb), 8); + assert.equal(rb.compare(eb), 0); + + b = Buffer.from('ffffc4d5d555a345', 'hex'); + rb = reversedBuffer(b); + v = -65052290473147; + ev = v; + assert.equal(ev, v); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(b.compare(eb), 0); + assert.equal(be.decode(eb), ev); + assert.equal(le.encode(v, eb), 8); + assert.equal(rb.compare(eb), 0); + assert.equal(le.decode(eb), ev); + + /* The logic changes for the remaining cases since the exact + * value cannot be represented in a Number: the encoded buffer + * will not bitwise-match the original buffer. */ + b = Buffer.from('ff13575556002345', 'hex'); + rb = reversedBuffer(b); + v = -66613545453739195; + ev = v + 3; + assert.equal(ev, v); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(be.decode(eb), ev); + assert.equal(le.encode(v, eb), 8); + assert.equal(le.decode(eb), ev); + + b = Buffer.from('e26aeaaac0002345', 'hex'); + rb = reversedBuffer(b); + v = -2131633454519934139; + ev = v - 69; + assert.equal(ev, v); + assert.equal(be.decode(b), ev); + assert.equal(le.decode(rb), ev); + assert.equal(be.encode(v, eb), 8); + assert.equal(be.decode(eb), ev); + assert.equal(le.encode(v, eb), 8); + assert.equal(le.decode(eb), ev); + + b = Buffer.alloc(10); + b.fill(0xa5); + le.encode(1, b, 1); + assert.equal(Buffer.from('a50100000000000000a5', 'hex').compare(b), 0); + assert.equal(1, le.decode(b, 1)); + be.encode(1, b, 1); + assert.equal(Buffer.from('a50000000000000001a5', 'hex').compare(b), 0); + assert.equal(1, be.decode(b, 1)); + + assert.equal(le.decode(Buffer.from('0000007001000000', 'hex')), 6174015488); + assert.equal(le.decode(Buffer.from('0000008001000000', 'hex')), 6442450944); + }); + test('Float', function() { + const be = lo.f32be('eff'); + const le = lo.f32('ffe'); + const f = 123456.125; + const fe = 3.174030951333261e-29; + let b = Buffer.alloc(4); + assert(be instanceof lo.FloatBE); + assert(be instanceof lo.Layout); + assert.equal(be.span, 4); + assert.equal(be.getSpan(), be.span); + assert.equal(be.property, 'eff'); + assert(le instanceof lo.Float); + assert(le instanceof lo.Layout); + assert.equal(le.span, 4); + assert.equal(le.property, 'ffe'); + b.fill(0); + assert.equal(be.decode(b), 0); + assert.equal(le.decode(b), 0); + assert.equal(le.encode(f, b), 4); + assert.equal(Buffer.from('1020f147', 'hex').compare(b), 0); + assert.equal(le.decode(b), f); + assert.equal(be.decode(b), fe); + assert.equal(be.encode(f, b), 4); + assert.equal(Buffer.from('47f12010', 'hex').compare(b), 0); + assert.equal(be.decode(b), f); + assert.equal(le.decode(b), fe); + + b = Buffer.alloc(6); + b.fill(0xa5); + le.encode(f, b, 1); + assert.equal(Buffer.from('a51020f147a5', 'hex').compare(b), 0); + assert.equal(f, le.decode(b, 1)); + be.encode(f, b, 1); + assert.equal(Buffer.from('a547f12010a5', 'hex').compare(b), 0); + assert.equal(f, be.decode(b, 1)); + }); + test('Double', function() { + const be = lo.f64be('dee'); + const le = lo.f64('eed'); + const f = 123456789.125e+10; + const fe = 3.4283031083405533e-77; + let b = Buffer.alloc(8); + assert(be instanceof lo.DoubleBE); + assert(be instanceof lo.Layout); + assert.equal(be.span, 8); + assert.equal(be.property, 'dee'); + assert(le instanceof lo.Double); + assert(le instanceof lo.Layout); + assert.equal(le.span, 8); + assert.equal(le.property, 'eed'); + b.fill(0); + assert.equal(be.decode(b), 0); + assert.equal(le.decode(b), 0); + assert.equal(le.encode(f, b), 8); + assert.equal(Buffer.from('300fc1f41022b143', 'hex').compare(b), 0); + assert.equal(le.decode(b), f); + assert.equal(be.decode(b), fe); + assert.equal(be.encode(f, b), 8); + assert.equal(Buffer.from('43b12210f4c10f30', 'hex').compare(b), 0); + assert.equal(be.decode(b), f); + assert.equal(le.decode(b), fe); + + b = Buffer.alloc(10); + b.fill(0xa5); + le.encode(f, b, 1); + assert.equal(Buffer.from('a5300fc1f41022b143a5', 'hex').compare(b), 0); + assert.equal(f, le.decode(b, 1)); + be.encode(f, b, 1); + assert.equal(Buffer.from('a543b12210f4c10f30a5', 'hex').compare(b), 0); + assert.equal(f, be.decode(b, 1)); + }); + suite('Sequence', function() { + test('invalid ctor', function() { + assert.throws(() => new lo.Sequence(), TypeError); + assert.throws(() => new lo.Sequence(lo.u8()), TypeError); + assert.throws(() => new lo.Sequence(lo.u8(), '5 is not an integer'), + TypeError); + assert.throws(() => new lo.Sequence(lo.u8(), lo.u8()), + TypeError); + assert.throws(() => new lo.Sequence(lo.u8(), lo.offset(lo.f32())), + TypeError); + }); + test('basics', function() { + const seq = new lo.Sequence(lo.u8(), 4, 'id'); + const b = Buffer.alloc(4); + assert(seq instanceof lo.Sequence); + assert(seq instanceof lo.Layout); + assert(seq.elementLayout instanceof lo.UInt); + assert.equal(seq.count, 4); + assert.equal(seq.span, 4); + assert.equal(seq.getSpan(), seq.span); + assert.equal(seq.property, 'id'); + b.fill(0); + assert.deepEqual(seq.decode(b), [0, 0, 0, 0]); + assert.equal(seq.encode([1, 2, 3, 4], b), 4); + assert.deepEqual(seq.decode(b), [1, 2, 3, 4]); + assert.equal(seq.encode([5, 6], b, 1), 2); + assert.deepEqual(seq.decode(b), [1, 5, 6, 4]); + }); + test('in struct', function() { + const seq = lo.seq(lo.u8(), 4, 'id'); + const str = lo.struct([seq]); + const d = str.decode(Buffer.from('01020304', 'hex')); + assert.deepEqual(d, {id: [1, 2, 3, 4]}); + }); + test('struct elts', function() { + const st = new lo.Structure([lo.u8('u8'), + lo.s32('s32')]); + const seq = new lo.Sequence(st, 3); + const tv = [{u8: 1, s32: 1e4}, {u8: 0, s32: 0}, {u8: 3, s32: -324}]; + const b = Buffer.alloc(15); + assert.equal(st.span, 5); + assert.equal(seq.count, 3); + assert.strictEqual(seq.elementLayout, st); + assert.equal(seq.span, 15); + assert.equal(seq.encode(tv, b), seq.span); + assert.equal(Buffer.from('0110270000000000000003bcfeffff', 'hex').compare(b), + 0); + assert.deepEqual(seq.decode(b), tv); + assert.equal(seq.encode([{u8: 2, s32: 0x12345678}], b, st.span), + 1 * st.span); + assert.equal(Buffer.from('0110270000027856341203bcfeffff', 'hex').compare(b), + 0); + }); + test('const count', function() { + const clo = lo.u8('n'); + const seq = lo.seq(lo.u8(), lo.offset(clo, -1), 'a'); + const st = lo.struct([clo, seq]); + let b = Buffer.from('03010203', 'hex'); + let obj = st.decode(b); + assert.equal(obj.n, 3); + assert.deepEqual(obj.a, [1, 2, 3]); + b = Buffer.alloc(10); + obj = {n: 3, a: [5, 6, 7, 8, 9]}; + assert.equal(st.encode(obj, b), 6); + const span = st.getSpan(b); + assert.equal(span, 6); + assert.equal(Buffer.from('050506070809', 'hex').compare(b.slice(0, span)), 0); + }); + // For variable span alone see CString in seq + test('const count+span', function() { + const clo = lo.u8('n'); + const seq = lo.seq(lo.cstr(), lo.offset(clo, -1), 'a'); + const st = lo.struct([clo, seq]); + let b = Buffer.from('036100620063646500', 'hex'); + let obj = st.decode(b); + assert.equal(obj.n, 3); + assert.deepEqual(obj.a, ['a', 'b', 'cde']); + b = Buffer.alloc(10); + obj = {n: 6, a: ['one', 'two']}; + assert.equal(st.encode(obj, b), clo.span + 8); + const span = st.getSpan(b); + assert.equal(span, 9); + assert.equal(Buffer.from('026f6e650074776f00', 'hex') + .compare(b.slice(0, span)), 0); + }); + test('zero-count', function() { + const seq = lo.seq(lo.u8(), 0); + const b = Buffer.from('', 'hex'); + assert.equal(seq.span, 0); + assert.deepEqual(seq.decode(b), []); + }); + test('greedy', function() { + const seq = lo.seq(lo.u16(), lo.greedy(2), 'a'); + const b = Buffer.from('ABCDE'); + const db = Buffer.alloc(6); + assert.equal(seq.getSpan(b), 4); + assert.deepEqual(seq.decode(b), [0x4241, 0x4443]); + db.fill('-'.charAt(0)); + assert.equal(seq.encode(seq.decode(b), db, 1), 4); + assert.equal(Buffer.from('-ABCD-').compare(db), 0); + assert.equal(seq.getSpan(b, 1), 4); + assert.deepEqual(seq.decode(b, 1), [0x4342, 0x4544]); + }); + }); + suite('Structure', function() { + test('invalid ctor', function() { + assert.throws(() => new lo.Structure(), TypeError); + assert.throws(() => new lo.Structure('stuff'), TypeError); + assert.throws(() => new lo.Structure(['stuff']), TypeError); + // no unnamed variable-length fields + assert.throws(() => new lo.Structure([lo.cstr()]), + err => checkError(err, Error, /cannot contain unnamed variable-length layout/)); + }); + test('basics', function() { + const st = new lo.Structure([lo.u8('u8'), + lo.u16('u16'), + lo.s16be('s16be')]); + const b = Buffer.alloc(5); + assert(st instanceof lo.Structure); + assert(st instanceof lo.Layout); + assert.equal(st.span, 5); + assert.equal(st.getSpan(), st.span); + assert.strictEqual(st.property, undefined); + b.fill(0); + let obj = st.decode(b); + assert.deepEqual(obj, {u8: 0, u16: 0, s16be: 0}); + obj = {u8: 21, u16: 0x1234, s16be: -5432}; + assert.equal(st.encode(obj, b), st.span); + assert.equal(Buffer.from('153412eac8', 'hex').compare(b), 0); + assert.deepEqual(st.decode(b), obj); + }); + test('padding', function() { + const st = new lo.Structure([lo.u16('u16'), + lo.u8(), + lo.s16be('s16be')]); + const b = Buffer.alloc(5); + assert.equal(st.span, 5); + b.fill(0); + let obj = st.decode(b); + assert.deepEqual(obj, {u16: 0, s16be: 0}); + b.fill(0xFF); + obj = {u16: 0x1234, s16be: -5432}; + assert.equal(st.encode(obj, b), st.span); + assert.equal(Buffer.from('3412ffeac8', 'hex').compare(b), 0); + assert.deepEqual(st.decode(b), obj); + }); + test('missing', function() { + const st = new lo.Structure([lo.u16('u16'), + lo.u8('u8'), + lo.s16be('s16be')]); + const b = Buffer.alloc(5); + assert.equal(st.span, 5); + b.fill(0); + let obj = st.decode(b); + assert.deepEqual(obj, {u16: 0, u8: 0, s16be: 0}); + b.fill(0xa5); + obj = {u16: 0x1234, s16be: -5432}; + assert.equal(st.encode(obj, b), st.span); + assert.equal(Buffer.from('3412a5eac8', 'hex').compare(b), 0); + assert.deepEqual(st.decode(b), _.extend(obj, {u8: 0xa5})); + }); + test('update', function() { + const st = new lo.Structure([lo.u8('u8'), + lo.u16('u16'), + lo.s16be('s16be')]); + const b = Buffer.from('153412eac8', 'hex'); + const rc = st.decode(b, 0); + assert.deepEqual(rc, {u8: 21, u16: 0x1234, s16be: -5432}); + }); + test('nested', function() { + const st = new lo.Structure([lo.u8('u8'), + lo.u16('u16'), + lo.s16be('s16be')], 'st'); + const cst = new lo.Structure([lo.u32('u32'), + st, + lo.s24('s24')]); + const obj = {u32: 0x12345678, + st: { + u8: 23, + u16: 65432, + s16be: -12345, + }, + s24: -123456}; + const b = Buffer.alloc(12); + assert.equal(st.span, 5); + assert.equal(st.property, 'st'); + assert.equal(cst.span, 12); + assert.equal(cst.encode(obj, b), cst.span); + assert.equal(Buffer.from('785634121798ffcfc7c01dfe', 'hex').compare(b), 0); + assert.deepEqual(cst.decode(b), obj); + }); + test('empty', function() { + const st = lo.struct([], 'st'); + const b = Buffer.from('', 'hex'); + assert.equal(st.span, 0); + assert.deepEqual(st.decode(b), {}); + }); + test('offset-variant', function() { + const st = lo.struct([lo.cstr('s')], 'st'); + assert(0 > st.span); + const b = Buffer.alloc(5); + b.fill(0xa5); + const obj = {s: 'ab'}; + st.encode(obj, b, 1); + assert.equal(Buffer.from('a5616200a5', 'hex').compare(b), 0); + assert.equal(3, st.getSpan(b, 1)); + assert.deepEqual(st.decode(b, 1), obj); + }); + test('empty encode fixed span', function() { + const slo = lo.struct([lo.u8('a'), lo.u8('b')]); + assert.equal(slo.span, 2); + const b = Buffer.alloc(10); + assert.equal(slo.encode({}, b), slo.span); + assert.equal(slo.encode({}, b, 1), slo.span); + }); + test('empty encode variable span', function() { + const slo = lo.struct([lo.u8('a'), lo.cstr('s')]); + assert.equal(slo.span, -1); + const b = Buffer.alloc(10); + assert.equal(slo.encode({}, b), 1); + assert.equal(slo.encode({}, b, 5), 1); + assert.equal(slo.encode({a: 5}, b), 1); + assert.equal(slo.encode({a: 5, s: 'hi'}, b), 4); + assert.equal(slo.encode({a: 5, s: 'hi'}, b, 5), 4); + }); + suite('prefix decoding', function() { + const fields = [ + lo.u32('u32'), + lo.u16('u16'), + lo.u8('u8'), + ]; + const b = Buffer.from('01020304111221', 'hex'); + test('rejects partial by default', function() { + const slo = lo.struct(fields); + assert.strictEqual(slo.decodePrefixes, false); + assert.deepEqual(slo.decode(b), { + u32: 0x04030201, + u16: 0x1211, + u8: 0x21, + }); + assert.throws(() => slo.decode(b.slice(0, 4)), RangeError); + }); + test('accepts full fields if enabled', function() { + const slo = lo.struct(fields, true); + assert.strictEqual(slo.decodePrefixes, true); + assert.deepEqual(slo.decode(b), { + u32: 0x04030201, + u16: 0x1211, + u8: 0x21, + }); + assert.deepEqual(slo.decode(b.slice(0, 4)), { + u32: 0x04030201, + }); + assert.deepEqual(slo.decode(b.slice(0, 6)), { + u32: 0x04030201, + u16: 0x1211, + }); + assert.throws(() => slo.decode(b.slice(0, 3)), RangeError); + }); + test('preserved by replicate', function() { + const property = 'name'; + const slo = lo.struct(fields, property, true); + assert.strictEqual(slo.property, property); + assert.strictEqual(slo.decodePrefixes, true); + const slo2 = slo.replicate('other'); + assert.strictEqual(slo2.property, 'other'); + assert.strictEqual(slo2.decodePrefixes, true); + }); + }); + }); + suite('replicate', function() { + test('uint', function() { + const src = lo.u32('hi'); + const dst = src.replicate('lo'); + assert(dst instanceof src.constructor); + assert.equal(dst.span, src.span); + assert.equal(dst.property, 'lo'); + }); + test('struct', function() { + const src = new lo.Structure([lo.u8('a'), lo.s32('b')], 'hi'); + const dst = src.replicate('lo'); + assert(dst instanceof src.constructor); + assert.equal(dst.span, src.span); + assert.strictEqual(dst.fields, src.fields); + assert.equal(dst.property, 'lo'); + }); + test('sequence', function() { + const src = new lo.Sequence(lo.u16(), 20, 'hi'); + const dst = src.replicate('lo'); + assert(dst instanceof src.constructor); + assert.equal(dst.span, src.span); + assert.equal(dst.count, src.count); + assert.strictEqual(dst.elementLayout, src.elementLayout); + assert.equal(dst.property, 'lo'); + }); + test('add', function() { + const src = lo.u32(); + const dst = src.replicate('p'); + assert(dst instanceof src.constructor); + assert.strictEqual(src.property, undefined); + assert.equal(dst.property, 'p'); + }); + test('remove', function() { + const src = lo.u32('p'); + const dst = src.replicate(); + assert(dst instanceof src.constructor); + assert.equal(src.property, 'p'); + assert.strictEqual(dst.property, undefined); + }); + test('layoutFor', function() { + const u8 = lo.u8('u8'); + const s32 = lo.s32('s32'); + const cstr = lo.cstr('cstr'); + const u16 = lo.u16('u16'); + const d = lo.struct([u8, s32, cstr, u16], 's'); + assert.throws(() => d.layoutFor(), + err => ('property must be string' === err.message)); + assert.strictEqual(d.layoutFor('u8'), u8); + assert.strictEqual(d.layoutFor('cstr'), cstr); + assert.strictEqual(d.layoutFor('other'), undefined); + }); + test('nameWithProperty', function() { + const s32 = lo.s32('s32'); + const u16 = lo.u16('u16'); + const d = lo.struct([s32, lo.u16(), u16], 's'); + assert.equal(lo.nameWithProperty('struct', d), 'struct[s]'); + assert.equal(lo.nameWithProperty('pfx', d.fields[1]), 'pfx'); + }); + test('offsetOf', function() { + const u8 = lo.u8('u8'); + const s32 = lo.s32('s32'); + const cstr = lo.cstr('cstr'); + const u16 = lo.u16('u16'); + const d = lo.struct([u8, s32, cstr, u16], 's'); + assert.throws(() => d.offsetOf(), + err => ('property must be string' === err.message)); + assert.strictEqual(d.offsetOf('u8'), 0); + assert.strictEqual(d.offsetOf('s32'), 1); + assert.strictEqual(d.offsetOf('cstr'), 5); + assert(0 > d.offsetOf('u16')); + assert.strictEqual(d.offsetOf('other'), undefined); + }); + }); + suite('VariantLayout', function() { + test('invalid ctor', function() { + const un = new lo.Union(lo.u8(), lo.u32()); + assert.throws(() => new lo.VariantLayout(), TypeError); + assert.throws(() => new lo.VariantLayout('other'), TypeError); + assert.throws(() => new lo.VariantLayout(un), TypeError); + assert.throws(() => new lo.VariantLayout(un, 1.2), TypeError); + assert.throws(() => new lo.VariantLayout(un, 'str'), TypeError); + assert.throws(() => new lo.VariantLayout(un, 1, lo.f64()), + Error); + assert.throws(() => new lo.VariantLayout(un, 1, lo.f32()), + TypeError); + assert.throws(() => new lo.VariantLayout(un, 1, 23), + TypeError); + }); + test('ctor', function() { + const un = new lo.Union(lo.u8(), lo.u32()); + const d = new lo.VariantLayout(un, 1, lo.f32(), 'd'); + assert(d instanceof lo.VariantLayout); + assert(d instanceof lo.Layout); + assert.strictEqual(d.union, un); + assert.equal(d.span, 5); + assert.equal(d.variant, 1); + assert.equal(d.property, 'd'); + }); + test('ctor without layout', function() { + const un = new lo.Union(lo.u8(), lo.u32()); + const v0 = new lo.VariantLayout(un, 0); + assert.strictEqual(v0.union, un); + assert.equal(v0.span, 5); + assert.strictEqual(v0.layout, null); + assert.equal(v0.variant, 0); + assert.equal(v0.property, undefined); + const v1 = new lo.VariantLayout(un, 1, 'nul'); + assert.strictEqual(v1.union, un); + assert.equal(v1.span, 5); + assert.strictEqual(v1.layout, null); + assert.equal(v1.variant, 1); + assert.equal(v1.property, 'nul'); + }); + test('span', function() { + const un = new lo.Union(lo.u8(), lo.u32()); + const d = new lo.VariantLayout(un, 1, lo.cstr(), 's'); + const b = Buffer.alloc(12); + assert.equal(d.encode({s: 'hi!'}, b), 5); + assert.equal(un.getSpan(b), 5); + assert.equal(Buffer.from('0168692100', 'hex').compare(b.slice(0, 5)), 0); + // This one overruns the Buffer + assert.throws(() => d.encode({s: 'far too long'}, b), + RangeError); + // This one fits in the buffer but overruns the union + assert.throws(() => d.encode({s: 'too long'}, b), Error); + }); + }); + suite('ExternalLayout', function() { + test('ctor', function() { + const el = new lo.ExternalLayout(-1, 'prop'); + assert(el instanceof lo.ExternalLayout); + assert(el instanceof lo.Layout); + assert.equal(el.property, 'prop'); + assert.throws(() => el.isCount(), Error); + }); + }); + suite('GreedyCount', function() { + test('ctor', function() { + const el = lo.greedy(); + assert(el instanceof lo.GreedyCount); + assert(el instanceof lo.ExternalLayout); + assert.equal(el.elementSpan, 1); + assert.strictEqual(el.property, undefined); + + const nel = lo.greedy(5, 'name'); + assert(nel instanceof lo.GreedyCount); + assert(nel instanceof lo.ExternalLayout); + assert.equal(nel.elementSpan, 5); + assert.equal(nel.property, 'name'); + + assert.throws(() => lo.greedy('hi'), TypeError); + assert.throws(() => lo.greedy(0), TypeError); + }); + test('#decode', function() { + const el = lo.greedy(); + const b = Buffer.alloc(10); + assert.equal(el.decode(b), b.length); + assert.equal(el.decode(b, 3), b.length - 3); + + const nel = lo.greedy(3); + assert.equal(nel.decode(b), 3); + assert.equal(nel.decode(b, 1), 3); + assert.equal(nel.decode(b, 2), 2); + }); + }); + suite('OffsetLayout', function() { + test('ctor', function() { + const u8 = lo.u8(); + const l0 = new lo.OffsetLayout(u8); + assert(l0 instanceof lo.OffsetLayout); + assert(l0 instanceof lo.ExternalLayout); + const nl = new lo.OffsetLayout(u8, -3, 'nl'); + const dl = new lo.OffsetLayout(lo.u8('ol'), 5); + const al = new lo.OffsetLayout(u8, 21); + assert.strictEqual(l0.layout, u8); + assert.equal(l0.offset, 0); + assert.strictEqual(l0.property, undefined); + assert.strictEqual(nl.layout, u8); + assert.equal(nl.offset, -3); + assert.equal(nl.property, 'nl'); + assert.equal(dl.offset, 5); + assert.equal(dl.property, 'ol'); + assert.strictEqual(al.layout, u8); + assert.equal(al.offset, 21); + assert.strictEqual(al.property, undefined); + }); + test('codec', function() { + const u8 = lo.u8(); + const bl = lo.offset(u8, -1, 'bl'); + const al = lo.offset(u8, 1, 'al'); + const b = Buffer.from('0001020304050607', 'hex'); + assert.equal(u8.decode(b), 0); + assert.equal(al.decode(b), 1); + assert.throws(() => bl.decode(b), RangeError); + assert.equal(u8.decode(b, 4), 4); + assert.equal(al.decode(b, 4), 5); + assert.equal(bl.decode(b, 4), 3); + assert.equal(u8.encode(0x80, b), 1); + assert.equal(al.encode(0x91, b), 1); + assert.throws(() => bl.encode(0x70, b), RangeError); + assert.equal(u8.encode(0x84, b, 4), 1); + assert.equal(al.encode(0x94, b, 4), 1); + assert.equal(bl.encode(0x74, b, 4), 1); + assert.equal(Buffer.from('8091027484940607', 'hex').compare(b), 0); + }); + test('invalid ctor', function() { + assert.throws(() => new lo.OffsetLayout('hi'), TypeError); + assert.throws(() => new lo.OffsetLayout(lo.u8(), 'hi'), + TypeError); + }); + }); + suite('UnionDiscriminator', function() { + test('abstract', function() { + const ud = new lo.UnionDiscriminator('p'); + assert.equal(ud.property, 'p'); + assert.throws(() => ud.decode(Buffer.from('00', 'hex')), Error); + assert.throws(() => ud.encode(0, Buffer.alloc(1)), Error); + }); + }); + suite('UnionLayoutDiscriminator', function() { + test('invalid ctor', function() { + assert.throws(() => new lo.UnionLayoutDiscriminator('hi'), + TypeError); + assert.throws(() => lo.unionLayoutDiscriminator('hi'), + TypeError); + assert.throws(() => new lo.UnionLayoutDiscriminator(lo.f32()), + TypeError); + assert.throws(() => { + new lo.UnionLayoutDiscriminator(lo.u8(), 'hi'); + }, TypeError); + }); + }); + suite('Union', function() { + test('invalid ctor', function() { + assert.throws(() => new lo.Union(), TypeError); + assert.throws(() => new lo.Union('other'), TypeError); + assert.throws(() => new lo.Union(lo.f32()), TypeError); + assert.throws(() => new lo.Union(lo.u8(), 'other'), TypeError); + assert.throws(() => new lo.Union(lo.u8(), lo.cstr()), Error); + }); + test('basics', function() { + const dlo = lo.u8(); + const vlo = new lo.Sequence(lo.u8(), 8); + const un = new lo.Union(dlo, vlo); + const clo = un.defaultLayout; + const b = Buffer.alloc(9); + assert(un instanceof lo.Union); + assert(un instanceof lo.Layout); + assert.equal(un.span, 9); + assert.equal(un.getSpan(), un.span); + assert(un.usesPrefixDiscriminator); + assert(un.discriminator instanceof lo.UnionLayoutDiscriminator); + assert.notStrictEqual(clo, vlo); + assert(clo instanceof vlo.constructor); + assert.equal(clo.count, vlo.count); + assert.strictEqual(clo.elementLayout, vlo.elementLayout); + assert.equal(un.discriminator.property, 'variant'); + assert.equal(un.defaultLayout.property, 'content'); + assert.equal(dlo.span + vlo.span, un.span); + assert.strictEqual(un.property, undefined); + b.fill(0); + const o = un.decode(b); + assert.equal(o.variant, 0); + assert.deepEqual(o.content, [0, 0, 0, 0, 0, 0, 0, 0]); + o.variant = 5; + o.content[3] = 3; + o.content[7] = 7; + assert.equal(un.encode(o, b), dlo.span + vlo.span); + assert.equal(Buffer.from('050000000300000007', 'hex').compare(b), 0); + }); + test('variants', function() { + const dlo = lo.u8('v'); + const vlo = new lo.Sequence(lo.u8(), 4, 'c'); + const un = new lo.Union(dlo, vlo); + const b = Buffer.alloc(5); + assert.strictEqual(un.getVariant(1), undefined); + b.fill(0); + assert.deepEqual(un.decode(b), {v: 0, c: [0, 0, 0, 0]}); + const lo1 = lo.u32(); + const v1 = un.addVariant(1, lo1, 'v1'); + assert(v1 instanceof lo.VariantLayout); + assert.equal(v1.variant, 1); + assert.strictEqual(v1.layout, lo1); + b.fill(1); + assert.strictEqual(un.getVariant(b), v1); + assert.deepEqual(v1.decode(b), {v1: 0x01010101}); + assert.deepEqual(un.decode(b), {v1: 0x01010101}); + const lo2 = lo.f32(); + const v2 = un.addVariant(2, lo2, 'v2'); + assert.equal(un.discriminator.encode(v2.variant, b), dlo.span); + assert.strictEqual(un.getVariant(b), v2); + assert.deepEqual(v2.decode(b), {v2: 2.3694278276172396e-38}); + assert.deepEqual(un.decode(b), {v2: 2.3694278276172396e-38}); + const lo3 = new lo.Structure([lo.u8('a'), lo.u8('b'), lo.u16('c')]); + const v3 = un.addVariant(3, lo3, 'v3'); + assert.equal(un.discriminator.encode(v3.variant, b), dlo.span); + assert.strictEqual(un.getVariant(b), v3); + assert.deepEqual(v3.decode(b), {v3: {a: 1, b: 1, c: 257}}); + assert.deepEqual(un.decode(b), {v3: {a: 1, b: 1, c: 257}}); + assert.equal(un.discriminator.encode(v2.variant, b), dlo.span); + assert.equal(Buffer.from('0201010101', 'hex').compare(b), 0); + const obj = {v3: {a: 5, b: 6, c: 1540}}; + assert.equal(lo3.encode(obj.v3, b), lo3.span); + assert.equal(v3.encode(obj, b), un.span); + assert.notEqual(un.span, vlo.span + lo3.span); + assert.deepEqual(un.decode(b), obj); + assert.equal(Buffer.from('0305060406', 'hex').compare(b), 0); + assert.throws(() => v2.encode(obj, b), TypeError); + assert.throws(() => v2.decode(b), Error); + const v0 = un.addVariant(0, 'v0'); + assert.equal(un.discriminator.encode(v0.variant, b), dlo.span); + assert.strictEqual(un.getVariant(b), v0); + assert.deepEqual(un.decode(b), {v0: true}); + }); + test('custom default', function() { + const dlo = lo.u8('number'); + const vlo = new lo.Sequence(lo.u8(), 8, 'payload'); + const un = new lo.Union(dlo, vlo); + assert(un instanceof lo.Union); + assert(un instanceof lo.Layout); + assert(un.usesPrefixDiscriminator); + assert(un.discriminator instanceof lo.UnionLayoutDiscriminator); + assert.equal(un.discriminator.property, dlo.property); + assert.equal(un.discriminator.layout.offset, 0); + assert.strictEqual(un.defaultLayout, vlo); + assert.equal(un.discriminator.property, 'number'); + assert.equal(un.defaultLayout.property, 'payload'); + }); + test('inStruct', function() { + const dlo = lo.u8('uid'); + const vlo = new lo.Sequence(lo.u8(), 3, 'payload'); + const un = new lo.Union(dlo, vlo, 'u'); + const st = new lo.Structure([lo.u16('u16'), + un, + lo.s16('s16')]); + const b = Buffer.from('0001020304050607', 'hex'); + const obj = st.decode(b); + assert.equal(obj.u16, 0x0100); + assert.equal(obj.u.uid, 2); + assert.deepEqual(obj.u.payload, [3, 4, 5]); + assert.equal(obj.s16, 1798); + obj.u16 = 0x5432; + obj.s16 = -3; + obj.u.payload[1] = 23; + const b2 = Buffer.alloc(st.span); + assert.equal(st.encode(obj, b2), st.span); + assert.equal(Buffer.from('325402031705fdff', 'hex').compare(b2), 0); + }); + test('issue#6', function() { + const dlo = lo.u8('number'); + const vlo = new lo.Sequence(lo.u8(), 8, 'payload'); + const un = new lo.Union(dlo, vlo); + const b = Buffer.from('000102030405060708', 'hex'); + const obj = un.decode(b); + assert.equal(obj.number, 0); + assert.deepEqual(obj.payload, [1, 2, 3, 4, 5, 6, 7, 8]); + const b2 = Buffer.alloc(un.span); + assert.equal(un.encode(obj, b2), dlo.span + vlo.span); + assert.equal(b2.toString('hex'), b.toString('hex')); + const obj2 = {variant: obj.number, + content: obj.payload}; + assert.throws(() => un.encode(obj2, b2)); + }); + test('issue#7.internal.anon', function() { + const dlo = lo.u8(); + const plo = new lo.Sequence(lo.u8(), 8, 'payload'); + const vlo = new lo.Structure([plo, dlo]); + const un = new lo.Union(lo.offset(dlo, plo.span), vlo); + const clo = un.defaultLayout; + const b = Buffer.from('000102030405060708', 'hex'); + const obj = un.decode(b); + assert(!un.usesPrefixDiscriminator); + assert(un.discriminator instanceof lo.UnionLayoutDiscriminator); + assert.equal(un.discriminator.property, 'variant'); + assert.equal(un.defaultLayout.property, 'content'); + assert.notStrictEqual(clo, vlo); + assert(clo instanceof vlo.constructor); + assert.strictEqual(clo.fields, vlo.fields); + assert.deepEqual(obj.content, {payload: [0, 1, 2, 3, 4, 5, 6, 7]}); + assert.equal(obj.variant, 8); + }); + test('issue#7.internal.named', function() { + const dlo = lo.u8(); + const plo = new lo.Sequence(lo.u8(), 8, 'payload'); + const vlo = new lo.Structure([plo, dlo]); + const ud = new lo.UnionLayoutDiscriminator(lo.offset(dlo, plo.span), 'tag'); + const un = new lo.Union(ud, vlo); + const clo = un.defaultLayout; + const b = Buffer.from('000102030405060708', 'hex'); + const obj = un.decode(b); + assert(!un.usesPrefixDiscriminator); + assert(un.discriminator instanceof lo.UnionLayoutDiscriminator); + assert.equal(un.discriminator.property, 'tag'); + assert.equal(clo.property, 'content'); + assert.notStrictEqual(clo, vlo); + assert(clo instanceof vlo.constructor); + assert.strictEqual(clo.fields, vlo.fields); + assert.deepEqual(obj.content, {payload: [0, 1, 2, 3, 4, 5, 6, 7]}); + assert.equal(obj.tag, 8); + assert.equal(9, un.getSpan(b)); + }); + test('issue#7.internal.named2', function() { + const dlo = lo.u8('vid'); + const plo = new lo.Sequence(lo.u8(), 8, 'payload'); + const vlo = new lo.Structure([plo, dlo]); + const un = new lo.Union(lo.offset(dlo, plo.span), vlo); + const clo = un.defaultLayout; + const b = Buffer.from('000102030405060708', 'hex'); + const obj = un.decode(b); + assert(!un.usesPrefixDiscriminator); + assert(un.discriminator instanceof lo.UnionLayoutDiscriminator); + assert.equal(un.discriminator.property, 'vid'); + assert.equal(clo.property, 'content'); + assert.notStrictEqual(clo, vlo); + assert(clo instanceof vlo.constructor); + assert.strictEqual(clo.fields, vlo.fields); + assert.deepEqual(obj.content, {payload: [0, 1, 2, 3, 4, 5, 6, 7], vid: 8}); + assert.equal(obj.vid, 8); + }); + test('issue#7.external', function() { + const dlo = lo.u8('vid'); + const ud = new lo.UnionLayoutDiscriminator(lo.offset(dlo, -3), 'uid'); + const un = new lo.Union(ud, lo.u32('u32'), 'u'); + const st = new lo.Structure([dlo, lo.u16('u16'), un, lo.s16('s16')]); + assert.equal(un.span, 4); + assert.equal(st.span, 9); + const b = Buffer.from('000102030405060708', 'hex'); + let obj = st.decode(b); + assert.equal(obj.vid, 0); + assert.equal(obj.u16, 0x201); + assert.equal(obj.s16, 0x807); + assert.equal(obj.u.uid, 0); + assert.equal(obj.u.u32, 0x06050403); + const b2 = Buffer.alloc(st.span); + assert.equal(st.encode(obj, b2), st.span); + assert.equal(b2.compare(b), 0); + + un.addVariant(0, lo.u32(), 'v0'); + obj = st.decode(b); + assert.equal(obj.vid, 0); + assert.equal(obj.u16, 0x201); + assert.equal(obj.s16, 0x807); + assert.equal(obj.u.v0, 0x06050403); + + const flo = lo.f32('f32'); + un.addVariant(1, flo, 'vf'); + const fb = Buffer.from('01234500805a429876', 'hex'); + const fobj = st.decode(fb); + assert.equal(fobj.vid, 1); + assert.equal(fobj.u16, 0x4523); + assert.equal(fobj.s16, 0x7698); + assert.equal(fobj.u.vf, 54.625); + }); + test('from src', function() { + const un = new lo.Union(lo.u8('v'), lo.u32('u32')); + const v0 = un.addVariant(0, 'nul'); + const v1 = un.addVariant(1, lo.f32(), 'f32'); + const v2 = un.addVariant(2, lo.seq(lo.u8(), 4), 'u8.4'); + const v3 = un.addVariant(3, lo.cstr(), 'str'); + const b = Buffer.alloc(un.span); + + assert.equal(un.span, 5); + + // Unregistered variant with default content + let src = {v: 5, u32: 0x12345678}; + let vlo = un.getSourceVariant(src); + assert.strictEqual(vlo, undefined); + assert.equal(un.encode(src, b), un.span); + assert.equal(Buffer.from('0578563412', 'hex').compare(b), 0); + + // Unregistered variant without default content + src = {v: 5}; + assert.throws(() => un.getSourceVariant(src), Error); + + // Registered variant with default content + src = {v: 1, u32: 0x12345678}; + assert.strictEqual(un.getSourceVariant(src), undefined); + + // Registered variant with incompatible content + src = {v: 2, f32: 26.5}; + assert.throws(() => un.getSourceVariant(src), Error); + + // Registered variant with no content + src = {v: 0}; + vlo = un.getSourceVariant(src); + assert.strictEqual(vlo, v0); + b.fill(255); + assert.equal(vlo.encode(src, b), 1); + assert.strictEqual(un.getSpan(b), 5); + assert.equal(Buffer.from('00ffffffff', 'hex').compare(b), 0); + + // Registered variant with compatible content (ignore discriminator) + src = {v: 1, f32: 26.5}; + assert.strictEqual(un.getSourceVariant(src), v1); + + // Inferred variant from content + src = {f32: 26.5}; + vlo = un.getSourceVariant(src); + assert.strictEqual(vlo, v1); + assert.equal(vlo.encode(src, b), un.span); + assert.equal(Buffer.from('010000d441', 'hex').compare(b), 0); + assert.equal(un.encode(src, b), un.span); + assert.equal(Buffer.from('010000d441', 'hex').compare(b), 0); + + src = {'u8.4': [1, 2, 3, 4]}; + vlo = un.getSourceVariant(src); + assert.strictEqual(vlo, v2); + assert.equal(vlo.encode(src, b), un.span); + assert.equal(Buffer.from('0201020304', 'hex').compare(b), 0); + assert.equal(un.encode(src, b), un.span); + assert.equal(Buffer.from('0201020304', 'hex').compare(b), 0); + + assert.throws(() => un.getSourceVariant({other: 3}), Error); + src = {str: 'hi'}; + vlo = un.getSourceVariant(src); + assert.strictEqual(vlo, v3); + b.fill(0xFF); + assert.equal(vlo.encode(src, b), 1 + 2 + 1); + assert.equal(Buffer.from('03686900FF', 'hex').compare(b.slice(0, 5 + 2)), 0); + assert(0 > vlo.layout.span); + assert.equal(vlo.span, un.span); + assert.equal(vlo.layout.getSpan(b, 1), 3); + assert.equal(vlo.getSpan(b), un.span); + + src = {v: 6}; + assert.throws(() => un.getSourceVariant(src), Error); + }); + test('customize src', function() { + const un = lo.union(lo.u8('v'), lo.u32('u32')); + let csrc; + un.configGetSourceVariant(function(src) { + csrc = src; + // eslint-disable-next-line no-invalid-this + return this.defaultGetSourceVariant(src); + }); + const src = {v: 3, u32: 29}; + const vlo = un.getSourceVariant(src); + assert.strictEqual(src, csrc); + assert.strictEqual(vlo, undefined); + }); + test('variable span', function() { + const un = lo.union(lo.u8('v')); + const v0 = un.addVariant(0, 'nul'); + const v1 = un.addVariant(1, lo.u32(), 'u32'); + const v2 = un.addVariant(2, lo.f64(), 'f64'); + const v3 = un.addVariant(3, lo.cstr(), 'str'); + const v255 = un.addVariant(255); // unnamed contentless + const b = Buffer.alloc(16); + assert(0 > un.span); + + b.fill(0xa5); + assert.throws(() => un.decode(b), Error); + + let obj = {v: v255.variant}; + assert.equal(un.encode(obj, b), 1 + 0); + assert.equal(Buffer.from('ffa5a5', 'hex') + .compare(b.slice(0, 1 + 2)), 0); + assert.strictEqual(v255.layout, null); + assert.deepEqual(un.decode(b), obj); + assert.equal(v0.getSpan(b), 1); + assert.equal(un.getSpan(b), 1); + + obj = {nul: true}; + b.fill(0xff); + assert.equal(un.encode(obj, b), 1 + 0); + assert.equal(Buffer.from('00ffff', 'hex') + .compare(b.slice(0, 1 + 2)), 0); + assert.strictEqual(v0.layout, null); + assert.deepEqual(un.decode(b), obj); + assert.equal(v0.getSpan(b), 1); + assert.equal(un.getSpan(b), 1); + + b.fill(0xFF); + obj = {u32: 0x12345678}; + assert.equal(un.encode(obj, b), 1 + 4); + assert.equal(v1.getSpan(b), 5); + assert.equal(un.getSpan(b), 5); + assert.equal(Buffer.from('0178563412ffff', 'hex') + .compare(b.slice(0, 5 + 2)), 0); + assert.deepEqual(un.decode(b), obj); + + b.fill(0xFF); + obj = {f64: 1234.5}; + assert.equal(un.encode(obj, b), 1 + 8); + assert.equal(v2.getSpan(b), 9); + assert.equal(un.getSpan(b), 9); + assert.equal(Buffer.from('0200000000004a9340ffff', 'hex') + .compare(b.slice(0, 9 + 2)), 0); + assert.deepEqual(un.decode(b), obj); + + b.fill(0xFF); + obj = {str: 'hi!'}; + assert.equal(un.encode(obj, b), 1 + 3 + 1); + assert.equal(v3.getSpan(b), 5); + assert.equal(un.getSpan(b), 5); + assert.equal(Buffer.from('0368692100ffff', 'hex') + .compare(b.slice(0, 5 + 2)), 0); + assert.deepEqual(un.decode(b), obj); + + b[0] = 5; + assert.throws(() => un.getSpan(b), Error); + + b.fill(0xa5); + assert.equal(un.encode(obj, b, 1), 1 + 3 + 1); + assert.equal(v3.getSpan(b, 1), 5); + assert.equal(un.getSpan(b, 1), 5); + assert.equal(Buffer.from('a50368692100a5', 'hex') + .compare(b.slice(0, 5 + 2)), 0); + assert.deepEqual(un.decode(b, 1), obj); + }); + test('variable-external', function() { + const dlo = lo.u8('v'); + const ud = lo.unionLayoutDiscriminator(lo.offset(dlo, -1)); + const un = lo.union(ud, null, 'u'); + assert(0 > un.span); + assert(!un.usesPrefixDiscriminator); + const st = lo.struct([dlo, un], 'st'); + const v0 = un.addVariant(0, 'nul'); + const v1 = un.addVariant(1, lo.cstr(), 's'); + const v2 = un.addVariant(2); + let obj = {v: v1.variant, u: {s: 'hi'}}; + const b = Buffer.alloc(6); + b.fill(0xa5); + st.encode(obj, b, 1); + assert.equal(Buffer.from('a501686900a5', 'hex').compare(b), 0); + assert.deepEqual(st.decode(b, 1), obj); + obj = {v: v0.variant}; + b.fill(0x5a); + st.encode(obj, b, 1); + assert.equal(Buffer.from('5a005a5a5a5a', 'hex').compare(b), 0); + assert.deepEqual(st.decode(b, 1), Object.assign({u: {nul: true}}, obj)); + obj = {v: v2.variant}; + b.fill(0x5a); + st.encode(obj, b, 1); + assert.equal(Buffer.from('5a025a5a5a5a', 'hex').compare(b), 0); + assert.deepEqual(st.decode(b, 1), Object.assign({u: {}}, obj)); + }); + }); + test('fromArray', function() { + assert.strictEqual(lo.u8().fromArray([1]), undefined); + const st = new lo.Structure([lo.u8('a'), lo.u8('b'), lo.u16('c')]); + assert.deepEqual(st.fromArray([1, 2, 3]), {a: 1, b: 2, c: 3}); + assert.deepEqual(st.fromArray([1, 2]), {a: 1, b: 2}); + const un = new lo.Union(lo.u8('v'), lo.u32('c')); + assert.strictEqual(un.fromArray([1, 2, 3]), undefined); + un.addVariant(0, 'v0'); + const v1 = un.addVariant(1, st, 'v1'); + un.addVariant(2, lo.f32(), 'v2'); + assert(v1 instanceof lo.VariantLayout); + assert.deepEqual(un.getVariant(0).fromArray([1, 2, 3]), undefined); + assert.deepEqual(un.getVariant(1).fromArray([1, 2, 3]), {a: 1, b: 2, c: 3}); + assert.strictEqual(un.getVariant(2).fromArray([1, 2, 3]), undefined); + }); + suite('BitStructure', function() { + test('invalid ctor', function() { + assert.throws(() => new lo.BitStructure(), TypeError); + assert.throws(() => new lo.BitStructure(lo.f32()), TypeError); + assert.throws(() => new lo.BitStructure(lo.s32()), TypeError); + assert.throws(() => new lo.BitStructure(lo.u40()), Error); + + const bs = new lo.BitStructure(lo.u32()); + assert.throws(() => new lo.BitField(lo.u32(), 8), TypeError); + assert.throws(() => new lo.BitField(bs, 'hi'), TypeError); + assert.throws(() => new lo.BitField(bs, 0), TypeError); + assert.throws(() => new lo.BitField(bs, 40), Error); + }); + suite('ctor argument processing', function() { + it('should infer property when passed string', function() { + const bs = new lo.BitStructure(lo.u8(), 'flags'); + assert.strictEqual(bs.msb, false); + assert.strictEqual(bs.property, 'flags'); + }); + it('should respect msb without property', function() { + const bs = new lo.BitStructure(lo.u8(), true); + assert.strictEqual(bs.msb, true); + assert.strictEqual(bs.property, undefined); + }); + it('should accept msb with property', function() { + const bs = new lo.BitStructure(lo.u8(), 'flags', 'flags'); + assert.strictEqual(bs.msb, true); + assert.strictEqual(bs.property, 'flags'); + }); + }); // ctor argument processing + test('invalid add', function() { + assert.throws(() => { + const bs = lo.bits(lo.u32()); + bs.addField(30); + bs.addField(3); + }, Error); + assert.throws(() => { + const bs = lo.bits(lo.u8()); + bs.addField(2); + bs.addField(7); + }, Error); + assert.throws(() => { + const bs = lo.bits(lo.u8()); + bs.addField(0); + }, Error); + assert.throws(() => { + const bs = lo.bits(lo.u8()); + bs.addField(6); + bs.addField(-2); + }, Error); + }); + test('size', function() { + const bs = new lo.BitStructure(lo.u16()); + const bf10 = bs.addField(10, 'ten'); + const bf6 = bs.addField(6, 'six'); + let b = Buffer.alloc(bs.span); + assert.equal((1 << 10) - 1, 1023); + assert.equal((1 << 6) - 1, 63); + const obj = bs.decode(Buffer.from('ffff', 'hex')); + assert.equal(obj.ten, (1 << 10) - 1); + assert.equal(obj.six, (1 << 6) - 1); + assert.equal(bs.encode(obj, b), 2); + assert.equal(Buffer.from('ffff', 'hex').compare(b), 0); + b.fill(0); + assert.equal(Buffer.from('0000', 'hex').compare(b), 0); + bf10.encode((1 << 10) - 1); + bf6.encode((1 << 6) - 1); + assert.equal(bs._packedGetValue(), 0xFFFF); + assert.throws(() => bf6.encode('hi', b), Error); + assert.throws(() => bf6.encode(1 << 6, b), Error); + + b = Buffer.alloc(2 + bs.span); + b.fill(0xa5); + bs.encode(obj, b, 1); + assert.equal(Buffer.from('a5ffffa5', 'hex').compare(b), 0); + assert.deepEqual(bs.decode(b, 1), obj); + }); + test('basic LSB', function() { + const pbl = lo.u32(); + const bs = new lo.BitStructure(pbl); + assert(bs instanceof lo.Layout); + assert.strictEqual(bs.word, pbl); + assert(!bs.msb); + assert(bs.fields instanceof Array); + assert.equal(bs.fields.length, 0); + + const bf1 = bs.addField(1, 'a'); + const bf2 = bs.addField(2, 'b'); + assert.equal(bs.fields.length, 2); + + assert(bf1 instanceof lo.BitField); + assert(!(bf1 instanceof lo.Layout)); + assert.strictEqual(bf1.container, bs); + assert.equal(bf1.bits, 1); + assert.equal(bf1.start, 0); + assert.equal(bf1.valueMask, 0x01); + assert.equal(bf1.wordMask, 0x01); + + assert(bf2 instanceof lo.BitField); + assert(!(bf2 instanceof lo.Layout)); + assert.strictEqual(bf2.container, bs); + assert.equal(bf2.bits, 2); + assert.equal(bf2.start, 1); + assert.equal(bf2.valueMask, 0x03); + assert.equal(bf2.wordMask, 0x06); + + assert.throws(() => bs.addField(30)); + bs.addField(29, 'x'); + const bf3 = bs.fields[2]; + assert.equal(bf3.bits, 29); + assert.equal(bf3.start, 3); + assert.equal(bf3.wordMask, 0xFFFFFFF8); + }); + test('basic MSB', function() { + const pbl = lo.u32(); + const bs = new lo.BitStructure(pbl, true); + assert(bs instanceof lo.Layout); + assert.strictEqual(bs.word, pbl); + assert(bs.msb); + assert(bs.fields instanceof Array); + assert.equal(bs.fields.length, 0); + + const bf1 = bs.addField(1, 'a'); + const bf2 = bs.addField(2, 'b'); + assert.equal(bs.fields.length, 2); + + assert(bf1 instanceof lo.BitField); + assert(!(bf1 instanceof lo.Layout)); + assert.strictEqual(bf1.container, bs); + assert.equal(bf1.property, 'a'); + assert.equal(bf1.bits, 1); + assert.equal(bf1.start, 31); + assert.equal(bf1.valueMask, 0x01); + assert.equal(bf1.wordMask, 0x80000000); + + assert(bf2 instanceof lo.BitField); + assert(!(bf2 instanceof lo.Layout)); + assert.strictEqual(bf2.container, bs); + assert.equal(bf2.property, 'b'); + assert.equal(bf2.bits, 2); + assert.equal(bf2.start, 29); + assert.equal(bf2.valueMask, 0x3); + assert.equal(bf2.wordMask, 0x60000000); + + assert.throws(() => bs.addField(30)); + bs.addField(29, 'x'); + const bf3 = bs.fields[2]; + assert.equal(bf3.bits, 29); + assert.equal(bf3.start, 0); + assert.equal(bf3.wordMask, 0x1FFFFFFF); + }); + test('lsb 32-bit field', function() { + const bs = new lo.BitStructure(lo.u32()); + const bf = bs.addField(32, 'x'); + assert.equal(bf.bits, 32); + assert.equal(bf.start, 0); + assert.equal(bf.valueMask, 0xFFFFFFFF); + assert.equal(bf.wordMask, 0xFFFFFFFF); + }); + test('msb 32-bit field', function() { + const bs = new lo.BitStructure(lo.u32(), true); + const bf = bs.addField(32, 'x'); + assert.equal(bf.bits, 32); + assert.equal(bf.start, 0); + assert.equal(bf.valueMask, 0xFFFFFFFF); + assert.equal(bf.wordMask, 0xFFFFFFFF); + }); + test('lsb coding', function() { + const bs = new lo.BitStructure(lo.u32()); + const b = Buffer.alloc(bs.span); + bs.addField(1, 'a1'); + bs.addField(4, 'b4'); + bs.addField(11, 'c11'); + bs.addField(16, 'd16'); + b.fill(0); + assert.deepEqual(bs.decode(b), {a1: 0, b4: 0, c11: 0, d16: 0}); + b.fill(0xFF); + assert.deepEqual(bs.decode(b), + {a1: 1, b4: 0x0F, c11: 0x7FF, d16: 0xFFFF}); + assert.equal(bs.encode({a1: 0, b4: 9, c11: 0x4F1, d16: 0x8a51}, b), 4); + assert.deepEqual(bs.decode(b), {a1: 0, b4: 9, c11: 0x4F1, d16: 0x8a51}); + assert.equal(Buffer.from('329e518a', 'hex').compare(b), 0); + }); + test('msb coding', function() { + const bs = new lo.BitStructure(lo.u32(), true); + const b = Buffer.alloc(bs.span); + bs.addField(1, 'a1'); + bs.addField(4, 'b4'); + bs.addField(11, 'c11'); + bs.addField(16, 'd16'); + b.fill(0); + assert.deepEqual(bs.decode(b), {a1: 0, b4: 0, c11: 0, d16: 0}); + b.fill(0xFF); + assert.deepEqual(bs.decode(b), + {a1: 1, b4: 0x0F, c11: 0x7FF, d16: 0xFFFF}); + assert.equal(bs.encode({a1: 0, b4: 9, c11: 0x4F1, d16: 0x8a51}, b), 4); + assert.deepEqual(bs.decode(b), {a1: 0, b4: 9, c11: 0x4F1, d16: 0x8a51}); + assert.equal(Buffer.from('518af14c', 'hex').compare(b), 0); + }); + test('fieldFor', function() { + const d = new lo.BitStructure(lo.u32(), true); + const b = d.addBoolean('b'); + d.addField(4, 'b4'); + const c11 = d.addField(11, 'c11'); + d.addField(16, 'd16'); + assert.throws(() => d.fieldFor(), + err => ('property must be string' === err.message)); + assert.strictEqual(d.fieldFor('b'), b); + assert.strictEqual(d.fieldFor('c11'), c11); + assert.strictEqual(d.fieldFor('other'), undefined); + }); + test('gap coding', function() { + const lsb = new lo.BitStructure(lo.u24()); + const msb = new lo.BitStructure(lo.u24(), true); + const b = Buffer.alloc(lsb.span); + lsb.addField(7, 'a5'); + lsb.addField(8); + lsb.addField(9, 'b6'); + msb.addField(7, 'a5'); + msb.addField(8); + msb.addField(9, 'b6'); + b.fill(0xA5); + const lb = lsb.decode(b); + const mb = msb.decode(b); + assert.deepEqual(lb, {a5: 0x25, b6: 0x14b}); + assert.deepEqual(mb, {a5: 0x52, b6: 0x1a5}); + b.fill(0x69); + assert.equal(lsb.encode(lb, b), 3); + assert.equal(Buffer.from('25e9a5', 'hex').compare(b), 0); + b.fill(0x69); + assert.equal(msb.encode(mb, b), 3); + assert.equal(Buffer.from('a569a5', 'hex').compare(b), 0); + }); + test('boolean', function() { + const bs = lo.bits(lo.u8()); + bs.addField(1, 'v'); + bs.addBoolean('b'); + const b = Buffer.alloc(bs.span); + b[0] = 0x3; + const obj = bs.decode(b); + assert.strictEqual(1, obj.v); + assert.notStrictEqual(1, obj.b); + assert.strictEqual(true, obj.b); + assert.notStrictEqual(true, obj.v); + bs.encode({v: 1, b: 1}, b); + assert.equal(b[0], 3); + bs.encode({v: 1, b: true}, b); + assert.equal(b[0], 3); + bs.encode({v: 0, b: 0}, b); + assert.equal(b[0], 0); + bs.encode({v: 0, b: false}, b); + assert.equal(b[0], 0); + bs.encode({}, b); + assert.equal(b[0], 0); + assert.throws(() => bs.encode({v: false}, b), + err => checkError(err, TypeError, /BitField.encode\[v\] value must be integer/)); + assert.throws(() => bs.encode({v: 1.2}, b), + err => checkError(err, TypeError, /BitField.encode\[v\] value must be integer/)); + assert.throws(() => bs.encode({b: 1.2}, b), + err => checkError(err, TypeError, /BitField.encode\[b\] value must be integer/)); + }); + }); + suite('Blob', function() { + test('invalid ctor', function() { + assert.throws(() => new lo.Blob(), TypeError); + assert.throws(() => new lo.Blob(lo.u8()), TypeError); + assert.throws(() => new lo.Blob(lo.offset(lo.f32())), + TypeError); + }); + test('ctor', function() { + const bl = new lo.Blob(3, 'bl'); + assert(bl instanceof lo.Blob); + assert(bl instanceof lo.Layout); + assert.equal(bl.span, 3); + assert.equal(bl.property, 'bl'); + }); + test('basics', function() { + const bl = new lo.Blob(3, 'bl'); + const b = Buffer.from('0102030405', 'hex'); + let bv = bl.decode(b); + assert(bv instanceof Buffer); + assert.equal(bv.length, bl.span); + assert.equal(Buffer.from('010203', 'hex').compare(bv), 0); + bv = bl.decode(b, 2); + assert.equal(bl.getSpan(b), bl.span); + assert.equal(Buffer.from('030405', 'hex').compare(bv), 0); + assert.equal(bl.encode(Buffer.from('112233', 'hex'), b, 1), 3); + assert.equal(Buffer.from('0111223305', 'hex').compare(b), 0); + assert.throws(() => bl.encode('ABC', b), Error); + assert.throws(() => bl.encode(Buffer.from('0102', 'hex'), b), + Error); + }); + test('const length', function() { + const llo = lo.u8('l'); + const blo = lo.blob(lo.offset(llo, -1), 'b'); + const st = lo.struct([llo, blo]); + const b = Buffer.alloc(10); + assert(0 > st.span); + + assert.strictEqual(blo.length.layout, llo); + assert.equal(st.encode({b: Buffer.from('03040506', 'hex')}, b), llo.span + 4); + const span = st.getSpan(b); + assert.equal(span, 5); + assert.equal(Buffer.from('0403040506', 'hex').compare(b.slice(0, span)), 0); + const obj = st.decode(b); + assert.equal(obj.l, 4); + assert.equal(obj.b.toString('hex'), '03040506'); + assert.throws(() => { + st.encode({b: Buffer.alloc(b.length)}, b, 1); + }, RangeError); + }); + test('greedy', function() { + const blo = lo.blob(lo.greedy(), 'b'); + const b = Buffer.from('ABCDx'); + assert.equal(Buffer.from('ABCDx').compare(blo.decode(b)), 0); + assert.equal(Buffer.from('Dx').compare(blo.decode(b, 3)), 0); + b.fill(0); + assert.equal(blo.encode(Buffer.from('0203', 'hex'), b, 2), 2); + assert.equal(Buffer.from('0000020300', 'hex').compare(b), 0); + }); + }); + suite('issue#8', function() { + test('named', function() { + const ver = lo.u8('ver'); + const hdr = new lo.Structure([lo.u8('id'), + lo.u8('ver')], 'hdr'); + const pld = new lo.Union(lo.offset(ver, -ver.span), + new lo.Blob(8, 'blob'), 'u'); + const pkt = new lo.Structure([hdr, pld], 's'); + const expectedBlob = Buffer.from('1011121314151617', 'hex'); + const b = Buffer.from('01021011121314151617', 'hex'); + assert.deepEqual(hdr.decode(b), {id: 1, ver: 2}); + const du = pld.decode(b, 2); + assert.equal(du.ver, 2); + assert.equal(expectedBlob.compare(du.blob), 0); + let dp = pkt.decode(b); + assert.deepEqual(dp.hdr, {id: 1, ver: 2}); + assert.equal(dp.u.ver, 2); + assert.equal(expectedBlob.compare(dp.u.blob), 0); + + pld.addVariant(2, new lo.Sequence(lo.u32(), 2, 'u32'), 'v3'); + assert.deepEqual(pld.decode(b, 2), {v3: [0x13121110, 0x17161514]}); + + dp = pkt.decode(b); + assert.deepEqual(dp, {hdr: {id: 1, ver: 2}, + u: {v3: [0x13121110, 0x17161514]}}); + }); + test('anon', function() { + const ver = lo.u8('ver'); + const hdr = new lo.Structure([lo.u8('id'), + lo.u8('ver')]); + const pld = new lo.Union(lo.offset(ver, -ver.span), + new lo.Blob(8, 'blob')); + const expectedBlob = Buffer.from('1011121314151617', 'hex'); + const b = Buffer.from('01021011121314151617', 'hex'); + assert.deepEqual(hdr.decode(b), {id: 1, ver: 2}); + const du = pld.decode(b, 2); + assert.equal(du.ver, 2); + assert.equal(expectedBlob.compare(du.blob), 0); + /* This is what I want, but can't get. */ + // const dp = pkt.decode(b); + // assert.equal(dp.id, 1); + // assert.equal(dp.ver, 2); + // assert.equal(expectedBlob.compare(dp.blob), 0); + + pld.addVariant(2, new lo.Sequence(lo.u32(), 2, 'u32'), 'v3'); + assert.deepEqual(pld.decode(b, 2), {v3: [0x13121110, 0x17161514]}); + + /* Ditto on want */ + // assert.deepEqual(dp, {id:1, ver:2, u32: [0x13121110, 0x17161514]}); + }); + }); + suite('factories', function() { + test('anon', function() { + const ver = lo.u8('ver'); + const hdr = lo.struct([lo.u8('id'), + lo.u8('ver')]); + const pld = lo.union(lo.offset(ver, -ver.span), lo.blob(8, 'blob')); + assert(hdr instanceof lo.Structure); + assert(pld instanceof lo.Union); + assert(pld.defaultLayout instanceof lo.Blob); + assert.equal(pld.defaultLayout.property, 'blob'); + }); + }); + suite('CString', function() { + test('ctor', function() { + const cst = lo.cstr(); + assert(0 > cst.span); + }); + test('#getSpan', function() { + const cst = new lo.CString(); + assert.throws(() => cst.getSpan(), TypeError); + assert.equal(cst.getSpan(Buffer.from('00', 'hex')), 1); + assert.equal(cst.getSpan(Buffer.from('4100', 'hex')), 2); + assert.equal(cst.getSpan(Buffer.from('4100', 'hex'), 1), 1); + assert.equal(cst.getSpan(Buffer.from('4142', 'hex')), 3); + }); + test('#decode', function() { + const cst = new lo.CString(); + assert.equal(cst.decode(Buffer.from('00', 'hex')), ''); + assert.equal(cst.decode(Buffer.from('4100', 'hex')), 'A'); + assert.equal(cst.decode(Buffer.from('4100', 'hex'), 1), ''); + assert.equal(cst.decode(Buffer.from('4142', 'hex')), 'AB'); + }); + test('#encode', function() { + const cst = new lo.CString(); + const b = Buffer.alloc(4); + b.fill(0xFF); + assert.equal(Buffer.from('A', 'utf8').length, 1); + assert.equal(cst.encode('', b), 1); + assert.equal(Buffer.from('00ffffff', 'hex').compare(b), 0); + assert.equal(cst.encode('A', b), 1 + 1); + assert.equal(Buffer.from('4100ffff', 'hex').compare(b), 0); + assert.equal(cst.encode('B', b, 1), 1 + 1); + assert.equal(Buffer.from('414200ff', 'hex').compare(b), 0); + assert.equal(cst.encode(5, b), 1 + 1); + assert.equal(Buffer.from('350000ff', 'hex').compare(b), 0); + assert.throws(() => cst.encode('too long', b), RangeError); + }); + test('in struct', function() { + const st = lo.struct([lo.cstr('k'), + lo.cstr('v')]); + const b = Buffer.from('6100323300', 'hex'); + assert.throws(() => st.getSpan(), RangeError); + assert.equal(st.fields[0].getSpan(b), 2); + assert.equal(st.fields[1].getSpan(b, 2), 3); + assert.equal(st.getSpan(b), 5); + assert.deepEqual(st.decode(b), {k: 'a', v: '23'}); + b.fill(0xff); + assert.equal(st.encode({k: 'a', v: 23}, b), (1 + 1) + (2 + 1)); + }); + test('in seq', function() { + const seq = lo.seq(lo.cstr(), 3); + const b = Buffer.from('61006263003500', 'hex'); + assert.deepEqual(seq.decode(b), ['a', 'bc', '5']); + assert.equal(seq.encode(['hi', 'u', 'c'], b), (1 + 1) + (2 + 1) + (1 + 1)); + assert.equal(Buffer.from('68690075006300', 'hex').compare(b), 0); + }); + }); + suite('UTF8', function() { + test('ctor', function() { + const cst = lo.utf8(); + assert(0 > cst.span); + assert.strictEqual(cst.maxSpan, -1); + }); + test('ctor with maxSpan', function() { + const cst = lo.utf8(5); + assert.strictEqual(cst.maxSpan, 5); + }); + test('ctor with invalid maxSpan', function() { + assert.throws(() => new lo.UTF8(23.1), TypeError); + }); + test('#getSpan', function() { + const cst = new lo.UTF8(); + assert.throws(() => cst.getSpan(), TypeError); + assert.equal(cst.getSpan(Buffer.from('00', 'hex')), 1); + assert.equal(cst.getSpan(Buffer.from('4100', 'hex')), 2); + assert.equal(cst.getSpan(Buffer.from('4100', 'hex'), 1), 1); + assert.equal(cst.getSpan(Buffer.from('4142', 'hex')), 2); + }); + test('#decode', function() { + const cst = new lo.UTF8(3); + assert.equal(cst.decode(Buffer.from('00', 'hex')), '\x00'); + assert.equal(cst.decode(Buffer.from('4100', 'hex')), 'A\x00'); + assert.equal(cst.decode(Buffer.from('4100', 'hex'), 1), '\x00'); + assert.equal(cst.decode(Buffer.from('4142', 'hex')), 'AB'); + assert.throws(() => cst.decode(Buffer.from('four', 'utf8')), + RangeError); + }); + test('#encode', function() { + const cst = new lo.UTF8(); + const b = Buffer.alloc(3); + b.fill(0xFF); + assert.equal(cst.encode('', b), 0); + assert.equal(Buffer.from('ffffff', 'hex').compare(b), 0); + assert.equal(cst.encode('A', b), 1); + assert.equal(Buffer.from('41ffff', 'hex').compare(b), 0); + assert.equal(cst.encode('B', b, 1), 1); + assert.equal(Buffer.from('4142ff', 'hex').compare(b), 0); + assert.equal(cst.encode(5, b), 1); + assert.equal(Buffer.from('3542ff', 'hex').compare(b), 0); + assert.equal(cst.encode('abc', b), 3); + assert.equal(Buffer.from('616263', 'hex').compare(b), 0); + assert.throws(() => cst.encode('four', b), RangeError); + }); + test('#encode with maxSpan', function() { + const cst = new lo.UTF8(2); + const b = Buffer.alloc(3); + b.fill(0xFF); + assert.throws(() => cst.encode('abc', b), RangeError); + }); + test('in struct', function() { + const st = lo.struct([lo.utf8('k'), + lo.utf8('v')]); + const b = Buffer.from('6162323334', 'hex'); + assert.throws(() => st.getSpan(), RangeError); + assert.equal(st.fields[0].getSpan(b), b.length); + assert.equal(st.fields[1].getSpan(b, 2), b.length - 2); + assert.equal(st.getSpan(b), b.length); + assert.deepEqual(st.decode(b), {k: 'ab234', v: ''}); + }); + test('in seq', function() { + const seq = lo.seq(lo.utf8(), 3); + const b = Buffer.from('4162633435', 'hex'); + assert.deepEqual(seq.decode(b), ['Abc45', '', '']); + b.fill(0xFF); + assert.equal(seq.encode(['hi', 'u', 'c'], b), 2 + 1 + 1); + assert.equal(Buffer.from('68697563ff', 'hex').compare(b), 0); + }); + }); + suite('Constant', function() { + test('ctor', function() { + const c = new lo.Constant('value', 'p'); + assert.equal(c.value, 'value'); + assert.equal(c.property, 'p'); + assert.equal(c.span, 0); + }); + test('basics', function() { + const b = Buffer.from('', 'hex'); + assert.strictEqual(lo.const(true).decode(b), true); + assert.strictEqual(lo.const(undefined).decode(b), undefined); + const obj = {a: 23}; + assert.strictEqual(lo.const(obj).decode(b), obj); + /* No return value to check, but this shouldn't throw an + * exception (which it would if it tried to mutate the + * zero-length buffer). */ + assert.equal(lo.const(32).encode(b), 0); + assert.equal(b.length, 0); + }); + }); + suite('objectConstructor', function() { + test('invalid ctor', function() { + function Class() {} + assert.throws(() => lo.bindConstructorLayout(4), TypeError); + assert.throws(() => lo.bindConstructorLayout(Class), TypeError); + assert.throws(() => lo.bindConstructorLayout(Class, 4), TypeError); + const clo = lo.struct([lo.u8('u8')]); + lo.bindConstructorLayout(Class, clo); + assert(Class.hasOwnProperty('layout_')); + assert(clo.hasOwnProperty('boundConstructor_')); + assert.throws(() => lo.bindConstructorLayout(Class, clo), Error); + function Class2() {} + assert.throws(() => lo.bindConstructorLayout(Class2, clo), Error); + }); + test('struct', function() { + function Sample(temp_dCel, humidity_ppt) { + this.temp_dCel = temp_dCel; + this.humidity_ppt = humidity_ppt; + } + const slo = lo.struct([lo.s32('temp_dCel'), + lo.u32('humidity_ppt')], + 'sample'); + lo.bindConstructorLayout(Sample, slo); + assert.strictEqual(Sample.layout_, slo); + assert(slo.makeDestinationObject() instanceof Sample); + assert(Sample.prototype.encode); + assert(!Sample.prototype.propertyIsEnumerable('encode')); + assert(Sample.decode); + assert(!Sample.propertyIsEnumerable('decode')); + + /* Verify that synthesized encode/decode may be extended. */ + let called; + const synthesizedEncode = Sample.prototype.encode; + assert('function' === typeof synthesizedEncode); + Sample.prototype.encode = function(src, b, offset) { + called = true; + return synthesizedEncode.bind(this)(src, b, offset); + }; + const synthesizedDecode = Sample.decode; + assert('function' === typeof synthesizedDecode); + Sample.decode = function(b, offset) { + called = true; + return synthesizedDecode(b, offset); + }; + + const p = new Sample(223, 672); + assert(p instanceof Sample); + assert.equal(p.temp_dCel, 223); + assert.equal(p.humidity_ppt, 672); + + let po = Object.create(Sample.prototype); + assert(po instanceof Sample); + + const b = Buffer.alloc(8); + assert(!called); + p.encode(b); + assert(called); + assert.equal(Buffer.from('df000000a0020000', 'hex').compare(b), 0); + + po = Sample.layout_.decode(b); + assert(po instanceof Sample); + assert.deepEqual(po, p); + + called = false; + po = Sample.decode(b); + assert(called); + assert(po instanceof Sample); + assert.deepEqual(po, p); + }); + test('bits', function() { + function Header() {} + Header.prototype.power = function() { + return ['off', 'lo', 'med', 'hi'][this.pwr]; + }; + lo.bindConstructorLayout(Header, lo.bits(lo.u8())); + Header.layout_.addField(2, 'ver'); + Header.layout_.addField(2, 'pwr'); + const b = Buffer.from('07', 'hex'); + const hdr = Header.decode(b); + assert(hdr instanceof Header); + assert.equal(hdr.ver, 3); + assert.equal(hdr.pwr, 1); + assert.equal(hdr.power(), 'lo'); + const nb = Buffer.alloc(1); + nb.fill(0); + assert.equal(1, hdr.encode(nb)); + assert.equal(b.compare(nb), 0); + }); + test('union', function() { + function Union() {} + lo.bindConstructorLayout(Union, lo.union(lo.u8('var'), lo.blob(8, 'unk'))); + function VFloat(v) { + this.f32 = v; + } + util.inherits(VFloat, Union); + lo.bindConstructorLayout(VFloat, + Union.layout_.addVariant(1, lo.f32(), 'f32')); + function VCStr(v) { + this.text = v; + } + util.inherits(VCStr, Union); + lo.bindConstructorLayout(VCStr, + Union.layout_.addVariant(2, lo.cstr(), 'text')); + function Struct(u32, u16, s16) { + this.u32 = u32; + this.u16 = u16; + this.s16 = s16; + } + function VStruct(v) { + this.struct = v; + } + util.inherits(VStruct, Union); + const str = lo.struct([lo.u32('u32'), lo.u16('u16'), lo.s16('s16')]); + lo.bindConstructorLayout(Struct, str); + lo.bindConstructorLayout(VStruct, Union.layout_.addVariant(3, str, 'struct')); + let b = Buffer.alloc(Union.layout_.span); + b.fill(0); + let u = Union.decode(b); + assert(u instanceof Union); + assert.equal(u.var, 0); + b[0] = 1; + u = Union.decode(b); + assert(u instanceof VFloat); + assert(u instanceof Union); + assert.equal(u.f32, 0.0); + b[0] = 2; + b[1] = 65; + b[2] = 66; + u = Union.decode(b); + assert(u instanceof VCStr); + assert(u instanceof Union); + assert.equal(u.text, 'AB'); + b = Buffer.from('030403020122218281', 'hex'); + u = Union.decode(b); + assert(u instanceof VStruct); + assert(u instanceof Union); + assert(u.struct instanceof Struct); + assert.deepEqual(u.struct, {u32: 0x01020304, u16: 0x2122, s16: -32382}); + + u.struct = new Struct(1, 2, -3); + assert.equal(Union.layout_.span, Union.layout_.encode(u, b)); + assert.equal(Buffer.from('03010000000200fdff', 'hex').compare(b), 0); + }); + }); +}); diff --git a/tests/node_modules/buffer-layout/test/examples.c b/tests/node_modules/buffer-layout/test/examples.c new file mode 100644 index 0000000..218ce08 --- /dev/null +++ b/tests/node_modules/buffer-layout/test/examples.c @@ -0,0 +1,112 @@ +#include +#include +#include +#include +#include + +void +hexlify (const char * tag, + const void * sp, + size_t count) +{ + const uint8_t * u8p = (const uint8_t *)sp; + const uint8_t * const u8pe = u8p + count; + printf("%s: ", tag); + while (u8p < u8pe) { + printf("%02x", *u8p); + ++u8p; + } + putchar('\n'); +} + +void +ex_struct (void) +{ + struct ds { + uint8_t v; + uint32_t u32; + } st; + memset(&st, 0xbd, sizeof(st)); + st.v = 1; + st.u32 = 0x12345678; + hexlify("C struct", &st, sizeof(st)); +} + +void +ex_packed_struct (void) +{ + struct ds { + uint8_t v; + uint32_t u32; + } __attribute__((__packed__)) st; + memset(&st, 0xbd, sizeof(st)); + st.v = 1; + st.u32 = 0x12345678; + hexlify("packed C struct", &st, sizeof(st)); +} + +void +ex_cstr (void) +{ + const char str[] = "hi!"; + hexlify("C string", str, 1+strlen(str)); +} + +void +ex_bitfield (void) +{ + struct ds { + unsigned int b00l03: 3; + unsigned int b03l01: 1; + unsigned int b04l18: 24; + unsigned int b1Cl04: 4; + } st; + assert(4 == sizeof(st)); + memset(&st, 0xFF, sizeof(st)); + st.b00l03 = 3; + st.b04l18 = 24; + st.b1Cl04 = 4; + hexlify("bitfield lsb on le", &st, sizeof(st)); +} + +void +ex_arr4s16 (void) +{ + int16_t arr[4] = { 1, -1, 3, -3 }; + hexlify("arr[4] int16_t", arr, sizeof(arr)); +} + +void +ex_union4B (void) +{ + struct { + uint8_t t; + union ds { + uint8_t u8[4]; + int16_t s16[2]; + uint32_t u32; + float f32; + } u; + } __attribute__((__packed__)) un; + un.t = 'w'; + un.u.u32 = 0x12345678; + hexlify("un u32", &un, sizeof(un)); + un.t = 'f'; + un.u.f32 = 23.625; + hexlify("un f32", &un, sizeof(un)); + memset(&un, 0xa5, sizeof(un)); + hexlify("un dflt", &un, sizeof(un)); +} + +int +main (int argc, + char * argv[]) +{ + ex_struct(); + ex_packed_struct(); + ex_cstr(); + ex_bitfield(); + ex_arr4s16(); + ex_union4B(); + return EXIT_SUCCESS; +} diff --git a/tests/node_modules/buffer-layout/test/examples.js b/tests/node_modules/buffer-layout/test/examples.js new file mode 100644 index 0000000..39c9208 --- /dev/null +++ b/tests/node_modules/buffer-layout/test/examples.js @@ -0,0 +1,259 @@ +/* eslint-disable brace-style, max-statements-per-line, no-unused-vars */ +'use strict'; + +const assert = require('assert'); +const util = require('util'); +const lo = require('../lib/Layout'); + +suite('Examples', function() { + test('4-elt array of int16_t le', function() { + /* +int16_t arr[4] = { 1, -1, 3, -3 }; + */ + const ds = lo.seq(lo.s16(), 4); + const b = Buffer.alloc(8); + assert.equal(ds.encode([1, -1, 3, -3], b), 4 * 2); + assert.equal(Buffer.from('0100ffff0300fdff', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), [1, -1, 3, -3]); + }); + test('native C', function() { + /* +struct ds { + uint8_t v; + uint32_t u32; +} st; + */ + const ds = lo.struct([lo.u8('v'), + lo.seq(lo.u8(), 3), // alignment padding + lo.u32('u32')]); + assert.equal(ds.offsetOf('u32'), 4); + const b = Buffer.alloc(8); + b.fill(0xbd); + assert.equal(ds.encode({v: 1, u32: 0x12345678}, b), 1 + 3 + 4); + assert.equal(Buffer.from('01bdbdbd78563412', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), {v: 1, u32: 0x12345678}); + }); + test('packed native C', function() { + /* +struct ds { + uint8_t v; + uint32_t u32; +} __attribute__((__packed__)) st; + */ + const ds = lo.struct([lo.u8('v'), + lo.u32('u32')]); + assert.equal(ds.offsetOf('u32'), 1); + const b = Buffer.alloc(5); + b.fill(0xbd); + assert.equal(ds.encode({v: 1, u32: 0x12345678}, b), 1 + 4); + assert.equal(Buffer.from('0178563412', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), {v: 1, u32: 0x12345678}); + }); + test('tagged union of 4-byte values', function() { + /* +struct { + uint8_t t; + union ds { + uint8_t u8[4]; // default interpretation + int16_t s16[2]; // when t is 'h' + uint32_t u32; // when t is 'w' + float f32; // when t is 'f' + } u; +} __attribute__((__packed__)) un; + */ + const t = lo.u8('t'); + const un = lo.union(t, lo.seq(lo.u8(), 4, 'u8')); + const nul = un.addVariant('n'.charCodeAt(0), 'nul'); + const u32 = un.addVariant('w'.charCodeAt(0), lo.u32(), 'u32'); + const s16 = un.addVariant('h'.charCodeAt(0), lo.seq(lo.s16(), 2), 's16'); + const f32 = un.addVariant('f'.charCodeAt(0), lo.f32(), 'f32'); + const b = Buffer.alloc(un.span); + assert.deepEqual(un.decode(b), {t: 0, u8: [0, 0, 0, 0]}); + assert.deepEqual(un.decode(Buffer.from('6e01020304', 'hex')), + {nul: true}); + assert.deepEqual(un.decode(Buffer.from('7778563412', 'hex')), + {u32: 0x12345678}); + assert.deepEqual(un.decode(Buffer.from('660000bd41', 'hex')), + {f32: 23.625}); + assert.deepEqual(un.decode(Buffer.from('a5a5a5a5a5', 'hex')), + {t: 0xa5, u8: [0xa5, 0xa5, 0xa5, 0xa5]}); + assert.equal(s16.encode({s16: [123, -123]}, b), 1 + 2 * 2); + assert.equal(Buffer.from('687b0085ff', 'hex').compare(b), 0); + }); + test('decode into instances', function() { + function Union() { } + lo.bindConstructorLayout(Union, + lo.union(lo.u8('t'), lo.seq(lo.u8(), 4, 'u8'))); + + function Vn() {} + util.inherits(Vn, Union); + lo.bindConstructorLayout(Vn, + Union.layout_.addVariant('n'.charCodeAt(0), 'nul')); + + function Vu32(v) {this.u32 = v;} + util.inherits(Vu32, Union); + lo.bindConstructorLayout(Vu32, + Union.layout_.addVariant('w'.charCodeAt(0), lo.u32(), 'u32')); + + function Vs16(v) {this.s16 = v;} + util.inherits(Vs16, Union); + lo.bindConstructorLayout(Vs16, + Union.layout_.addVariant('h'.charCodeAt(0), lo.seq(lo.s16(), 2), 's16')); + + function Vf32(v) {this.f32 = v;} + util.inherits(Vf32, Union); + lo.bindConstructorLayout(Vf32, + Union.layout_.addVariant('f'.charCodeAt(0), lo.f32(), 'f32')); + + let v = Union.decode(Buffer.from('7778563412', 'hex')); + assert(v instanceof Vu32); + assert(v instanceof Union); + assert.equal(v.u32, 0x12345678); + + v = Union.decode(Buffer.from('a5a5a5a5a5', 'hex')); + assert(v instanceof Union); + assert.equal(v.t, 0xa5); + assert.deepEqual(v.u8, [0xa5, 0xa5, 0xa5, 0xa5]); + + const b = Buffer.alloc(Union.layout_.span); + v = new Vf32(23.625); + v.encode(b); + assert.equal(Buffer.from('660000bd41', 'hex').compare(b), 0); + + b.fill(0xFF); + v = new Vn(); + v.encode(b); + assert.equal(Buffer.from('6effffffff', 'hex').compare(b), 0); + }); + test('Bit structures (lsb on little-endian)', function() { + /* +struct ds { + unsigned int b00l03: 3; + unsigned int flg03: 1; + unsigned int b04l18: 24; + unsigned int b1Cl04: 4; +} st; + */ + const ds = lo.bits(lo.u32()); + const b = Buffer.alloc(4); + ds.addField(3, 'b00l03'); + ds.addBoolean('flg03'); + ds.addField(24, 'b04l18'); + ds.addField(4, 'b1Cl04'); + b.fill(0xff); + assert.equal(ds.encode({b00l03: 3, b04l18: 24, b1Cl04: 4}, b), 4); + assert.equal(Buffer.from('8b010040', 'hex').compare(b), 0); + assert.deepEqual(ds.decode(b), + {b00l03: 3, flg03: true, b04l18: 24, b1Cl04: 4}); + }); + test('64-bit values', function() { + /* +uint64_t v = 0x0102030405060708ULL; + */ + const ds = lo.nu64be(); + const b = Buffer.from('0102030405060708', 'hex'); + const v = 72623859790382856; + const nv = v - 6; + assert.equal(v, nv); + assert.equal(ds.decode(b), nv); + }); + test('C string', function() { + /* +const char str[] = "hi!"; + */ + const ds = lo.cstr(); + const b = Buffer.alloc(8); + assert.equal(ds.encode('hi!', b), 3 + 1); + const slen = ds.getSpan(b); + assert.equal(slen, 4); + assert.equal(Buffer.from('68692100', 'hex').compare(b.slice(0, slen)), 0); + assert.equal(ds.decode(b), 'hi!'); + }); + test('Fixed-len blob at offset', function() { + const ds = lo.blob(4); + const b = Buffer.from('0102030405060708', 'hex'); + assert.equal(Buffer.from('03040506', 'hex').compare(ds.decode(b, 2)), 0); + }); + test('variable-length array of pairs of C strings', function() { + const pr = lo.seq(lo.cstr(), 2); + const n = lo.u8('n'); + const vla = lo.seq(pr, lo.offset(n, -1), 'a'); + const st = lo.struct([n, vla], 'st'); + const b = Buffer.alloc(32); + const arr = [['k1', 'v1'], ['k2', 'v2'], ['k3', 'etc']]; + b.fill(0); + assert.equal(st.encode({a: arr}, b), + 1 + (2 * ((2 + 1) + (2 + 1)) + (2 + 1) + (3 + 1))); + const span = st.getSpan(b); + assert.equal(span, 20); + assert.equal(Buffer.from('036b31007631006b32007632006b330065746300', 'hex') + .compare(b.slice(0, span)), 0); + assert.deepEqual(st.decode(b), {n: 3, a: arr}); + }); + test('flexible array in packet', function() { + /* +struct ds { + uint8_t prop; + uint16_t data[]; +}; + */ + const st = lo.struct([lo.u8('prop'), + lo.seq(lo.u16(), + lo.greedy(lo.u16().span), + 'data')], + 'ds'); + const b = Buffer.from('21010002030405', 'hex'); + assert.deepEqual(st.decode(b), {prop: 33, data: [0x0001, 0x0302, 0x0504]}); + b.fill(0xFF); + assert.equal(st.encode({prop: 9, data: [5, 6]}, b), 1 + 2 * 2); + assert.equal(Buffer.from('0905000600FFFF', 'hex').compare(b), 0); + }); + test('variable-length union', function() { + const un = lo.union(lo.u8('t')); + const u8 = un.addVariant('B'.charCodeAt(0), lo.u8(), 'u8'); + const s16 = un.addVariant('h'.charCodeAt(0), lo.s16(), 's16'); + const s48 = un.addVariant('Q'.charCodeAt(0), lo.s48(), 's48'); + const cstr = un.addVariant('s'.charCodeAt(0), lo.cstr(), 'str'); + const tr = un.addVariant('T'.charCodeAt(0), lo.const(true), 'b'); + const fa = un.addVariant('F'.charCodeAt(0), lo.const(false), 'b'); + const b = Buffer.alloc(1 + 6); + un.configGetSourceVariant(function(src) { + if (src.hasOwnProperty('b')) { + return src.b ? tr : fa; + } + // eslint-disable-next-line no-invalid-this + return this.defaultGetSourceVariant(src); + }); + + b.fill(0xff); + assert.equal(un.encode({u8: 1}, b), 1 + 1); + assert.equal(un.getSpan(b), 2); + assert.equal(Buffer.from('4201ffffffffff', 'hex').compare(b), 0); + assert.equal(un.decode(b).u8, 1); + + b.fill(0xff); + assert.equal(un.encode({s16: -32000}, b), 1 + 2); + assert.equal(un.getSpan(b), 3); + assert.equal(Buffer.from('680083ffffffff', 'hex').compare(b), 0); + assert.equal(un.decode(b).s16, -32000); + + b.fill(0xff); + const v48 = Math.pow(2, 47) - 1; + assert.equal(un.encode({s48: v48}, b), 1 + 6); + assert.equal(un.getSpan(b), 7); + assert.equal(Buffer.from('51ffffffffff7f', 'hex').compare(b), 0); + assert.equal(un.decode(b).s48, v48); + + b.fill(0xff); + assert.equal(un.encode({b: true}, b), 1); + assert.equal(un.getSpan(b), 1); + assert.equal(Buffer.from('54ffffffffffff', 'hex').compare(b), 0); + assert.strictEqual(un.decode(b).b, true); + + b.fill(0xff); + assert.equal(un.encode({b: false}, b), 1); + assert.equal(un.getSpan(b), 1); + assert.equal(Buffer.from('46ffffffffffff', 'hex').compare(b), 0); + assert.strictEqual(un.decode(b).b, false); + }); +}); diff --git a/tests/node_modules/buffer-layout/test/n64.c b/tests/node_modules/buffer-layout/test/n64.c new file mode 100644 index 0000000..52d8f8c --- /dev/null +++ b/tests/node_modules/buffer-layout/test/n64.c @@ -0,0 +1,71 @@ +/* Show 64-bit integer values with round-trip through + * double-precision. + * + * Compile with: gcc -std=c11 */ +#include +#include +#include +#include + +static const uint32_t usval = 0x76543210; +static const uint32_t offset = 0x2345; + +static void +display_u64 (uint64_t val) +{ + double dval = val; + uint64_t rval = dval; + printf("%016" PRIx64 " : %" PRIu64 "\n" + "\t%a : %.*g : err %" PRId64 "\n" + "\t%016" PRIx64 " : %" PRIu64 "\n", + val, val, + dval, DBL_DECIMAL_DIG, dval, (int64_t)(rval - val), + rval, rval); +} + +static void +display_s64 (int64_t val) +{ + double dval = val; + int64_t rval = dval; + printf("%016" PRIx64 " : %" PRId64 "\n" + "\t%a : %.*g : err %" PRId64 "\n" + "\t%016" PRIx64 " : %" PRId64 "\n", + val, val, + dval, DBL_DECIMAL_DIG, dval, (int64_t)(rval - val), + rval, rval); +} + + +static void +gen_s (void) +{ + printf("Shifted:\n"); + uint64_t val = usval; + unsigned int sc = 0; + while (33 >= sc) { + display_u64(val); + val = (2 * val) + offset; + ++sc; + } +} + +static void +gen_sn (void) +{ + printf("Shifted Negated:\n"); + uint64_t val = usval; + unsigned int sc = 0; + while (33 >= sc) { + display_s64(-val); + val = (2 * val) + offset; + ++sc; + } +} + +int main (void) +{ + gen_s(); + gen_sn(); + return EXIT_SUCCESS; +} diff --git a/tests/node_modules/buffer-layout/x.js b/tests/node_modules/buffer-layout/x.js new file mode 100644 index 0000000..7607dd9 --- /dev/null +++ b/tests/node_modules/buffer-layout/x.js @@ -0,0 +1,36 @@ +'use strict'; + +const lo = require('./lib/Layout'); + +const raw = Buffer.from('41000000000000000000000000000000000000000000000000000000000000000000000000000000' + + '42430000000000000000000000000000000000000000000000000000000000000000000000000000' + + '43444500000000000000000000000000000000000000000000000000000000000000000000000000' + + '44454647000000000000000000000000000000000000000000000000000000000000000000000000', + 'hex'); + +const lo1 = lo.seq(lo.seq(lo.u8(), 40), 4); +const lo2 = lo.seq(lo.cstr(), 4); + +console.dir(lo1.decode(raw)) +console.dir(lo2.decode(raw)) + +class ConstantDiscriminator extends lo.UnionDiscriminator { + constructor(tag, property) { + super(property); + this.tag = tag; + } + + decode (b, offset) { + return this.tag; + } + + encode (b, offset) { + return 0; + } +} +const discr = new ConstantDiscriminator(0); + +const str40 = lo.union(discr, lo.blob(40)); +str40.addVariant(discr.tag, lo.cstr(), 's'); +const lo3 = lo.seq(str40, 4); +console.dir(lo3.decode(raw)) diff --git a/tests/node_modules/buffer/AUTHORS.md b/tests/node_modules/buffer/AUTHORS.md new file mode 100644 index 0000000..6853581 --- /dev/null +++ b/tests/node_modules/buffer/AUTHORS.md @@ -0,0 +1,71 @@ +# Authors + +#### Ordered by first contribution. + +- Romain Beauxis (toots@rastageeks.org) +- Tobias Koppers (tobias.koppers@googlemail.com) +- Janus (ysangkok@gmail.com) +- Rainer Dreyer (rdrey1@gmail.com) +- Tõnis Tiigi (tonistiigi@gmail.com) +- James Halliday (mail@substack.net) +- Michael Williamson (mike@zwobble.org) +- elliottcable (github@elliottcable.name) +- rafael (rvalle@livelens.net) +- Andrew Kelley (superjoe30@gmail.com) +- Andreas Madsen (amwebdk@gmail.com) +- Mike Brevoort (mike.brevoort@pearson.com) +- Brian White (mscdex@mscdex.net) +- Feross Aboukhadijeh (feross@feross.org) +- Ruben Verborgh (ruben@verborgh.org) +- eliang (eliang.cs@gmail.com) +- Jesse Tane (jesse.tane@gmail.com) +- Alfonso Boza (alfonso@cloud.com) +- Mathias Buus (mathiasbuus@gmail.com) +- Devon Govett (devongovett@gmail.com) +- Daniel Cousens (github@dcousens.com) +- Joseph Dykstra (josephdykstra@gmail.com) +- Parsha Pourkhomami (parshap+git@gmail.com) +- Damjan Košir (damjan.kosir@gmail.com) +- daverayment (dave.rayment@gmail.com) +- kawanet (u-suke@kawa.net) +- Linus Unnebäck (linus@folkdatorn.se) +- Nolan Lawson (nolan.lawson@gmail.com) +- Calvin Metcalf (calvin.metcalf@gmail.com) +- Koki Takahashi (hakatasiloving@gmail.com) +- Guy Bedford (guybedford@gmail.com) +- Jan Schär (jscissr@gmail.com) +- RaulTsc (tomescu.raul@gmail.com) +- Matthieu Monsch (monsch@alum.mit.edu) +- Dan Ehrenberg (littledan@chromium.org) +- Kirill Fomichev (fanatid@ya.ru) +- Yusuke Kawasaki (u-suke@kawa.net) +- DC (dcposch@dcpos.ch) +- John-David Dalton (john.david.dalton@gmail.com) +- adventure-yunfei (adventure030@gmail.com) +- Emil Bay (github@tixz.dk) +- Sam Sudar (sudar.sam@gmail.com) +- Volker Mische (volker.mische@gmail.com) +- David Walton (support@geekstocks.com) +- Сковорода Никита Андреевич (chalkerx@gmail.com) +- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) +- ukstv (sergey.ukustov@machinomy.com) +- Renée Kooi (renee@kooi.me) +- ranbochen (ranbochen@qq.com) +- Vladimir Borovik (bobahbdb@gmail.com) +- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) +- kumavis (aaron@kumavis.me) +- Sergey Ukustov (sergey.ukustov@machinomy.com) +- Fei Liu (liu.feiwood@gmail.com) +- Blaine Bublitz (blaine.bublitz@gmail.com) +- clement (clement@seald.io) +- Koushik Dutta (koushd@gmail.com) +- Jordan Harband (ljharb@gmail.com) +- Niklas Mischkulnig (mischnic@users.noreply.github.com) +- Nikolai Vavilov (vvnicholas@gmail.com) +- Fedor Nezhivoi (gyzerok@users.noreply.github.com) +- shuse2 (shus.toda@gmail.com) +- Peter Newman (peternewman@users.noreply.github.com) +- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com) +- jkkang (jkkang@smartauth.kr) + +#### Generated by bin/update-authors.sh. diff --git a/tests/node_modules/buffer/LICENSE b/tests/node_modules/buffer/LICENSE new file mode 100644 index 0000000..d6bf75d --- /dev/null +++ b/tests/node_modules/buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh, and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/node_modules/buffer/README.md b/tests/node_modules/buffer/README.md new file mode 100644 index 0000000..451e235 --- /dev/null +++ b/tests/node_modules/buffer/README.md @@ -0,0 +1,410 @@ +# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg +[travis-url]: https://travis-ci.org/feross/buffer +[npm-image]: https://img.shields.io/npm/v/buffer.svg +[npm-url]: https://npmjs.org/package/buffer +[downloads-image]: https://img.shields.io/npm/dm/buffer.svg +[downloads-url]: https://npmjs.org/package/buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### The buffer module from [node.js](https://nodejs.org/), for the browser. + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg +[saucelabs-url]: https://saucelabs.com/u/buffer + +With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. + +The goal is to provide an API that is 100% identical to +[node's Buffer API](https://nodejs.org/api/buffer.html). Read the +[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, +instance methods, and class methods that are supported. + +## features + +- Manipulate binary data like a boss, in all browsers! +- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) +- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments) +- Excellent browser support (Chrome, Firefox, Edge, Safari 11+, iOS 11+, Android, etc.) +- Preserves Node API exactly, with one minor difference (see below) +- Square-bracket `buf[4]` notation works! +- Does not modify any browser prototypes or put anything on `window` +- Comprehensive test suite (including all buffer tests from node.js core) + +## install + +To use this module directly (without browserify), install it: + +```bash +npm install buffer +``` + +This module was previously called **native-buffer-browserify**, but please use **buffer** +from now on. + +If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer). + +## usage + +The module's API is identical to node's `Buffer` API. Read the +[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, +instance methods, and class methods that are supported. + +As mentioned above, `require('buffer')` or use the `Buffer` global with +[browserify](http://browserify.org) and this module will automatically be included +in your bundle. Almost any npm module will work in the browser, even if it assumes that +the node `Buffer` API will be available. + +To depend on this module explicitly (without browserify), require it like this: + +```js +var Buffer = require('buffer/').Buffer // note: the trailing slash is important! +``` + +To require this module explicitly, use `require('buffer/')` which tells the node.js module +lookup algorithm (also used by browserify) to use the **npm module** named `buffer` +instead of the **node.js core** module named `buffer`! + + +## how does it work? + +The Buffer constructor returns instances of `Uint8Array` that have their prototype +changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, +so the returned instances will have all the node `Buffer` methods and the +`Uint8Array` methods. Square bracket notation works as expected -- it returns a +single octet. + +The `Uint8Array` prototype remains unmodified. + + +## tracking the latest node api + +This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer +API is considered **stable** in the +[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), +so it is unlikely that there will ever be breaking changes. +Nonetheless, when/if the Buffer API changes in node, this module's API will change +accordingly. + +## related packages + +- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer +- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer +- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package + +## conversion packages + +### convert typed array to buffer + +Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast. + +### convert buffer to typed array + +`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`. + +### convert blob to buffer + +Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`. + +### convert buffer to blob + +To convert a `Buffer` to a `Blob`, use the `Blob` constructor: + +```js +var blob = new Blob([ buffer ]) +``` + +Optionally, specify a mimetype: + +```js +var blob = new Blob([ buffer ], { type: 'text/html' }) +``` + +### convert arraybuffer to buffer + +To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast. + +```js +var buffer = Buffer.from(arrayBuffer) +``` + +### convert buffer to arraybuffer + +To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects): + +```js +var arrayBuffer = buffer.buffer.slice( + buffer.byteOffset, buffer.byteOffset + buffer.byteLength +) +``` + +Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module. + +## performance + +See perf tests in `/perf`. + +`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a +sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will +always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, +which is included to compare against. + +NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README. + +### Chrome 38 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | +| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | +| | | | | +| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | +| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | +| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | +| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | +| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | +| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | +| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | +| | | | | +| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | +| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | +| | | | | +| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | +| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | +| | | | | +| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | +| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | +| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | + + +### Firefox 33 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | +| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | +| | | | | +| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | +| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | +| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | +| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | +| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | +| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | +| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | +| | | | | +| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | +| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | +| | | | | +| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | +| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | +| | | | | +| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | +| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | +| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | + +### Safari 8 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | +| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | +| | | | | +| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | +| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | +| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | +| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | +| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | +| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | +| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | +| | | | | +| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | +| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | +| | | | | +| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | +| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | +| | | | | +| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | +| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | +| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | + + +### Node 0.11.14 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | +| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | +| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | +| | | | | +| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | +| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | +| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | +| | | | | +| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | +| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | +| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | +| | | | | +| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | +| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | +| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | +| | | | | +| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | +| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | +| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | +| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | +| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | +| | | | | +| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | +| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | +| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | +| | | | | +| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | +| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | +| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | +| | | | | +| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | +| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | +| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | +| | | | | +| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | +| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | +| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | +| | | | | +| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | +| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | +| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | + +### iojs 1.8.1 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | +| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | +| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | +| | | | | +| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | +| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | +| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | +| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | +| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | +| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | +| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | +| | | | | +| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | +| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | +| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | +| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | +| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | +| | | | | +| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | +| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | +| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | +| | | | | +| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | +| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | +| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | +| | | | | +| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | +| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | +| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | +| | | | | +| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | +| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | +| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | +| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | +| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | +| | | | | + +## Testing the project + +First, install the project: + + npm install + +Then, to run tests in Node.js, run: + + npm run test-node + +To test locally in a browser, you can run: + + npm run test-browser-es5-local # For ES5 browsers that don't support ES6 + npm run test-browser-es6-local # For ES6 compliant browsers + +This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap). + +To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: + + npm test + +This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files. + +## JavaScript Standard Style + +This module uses [JavaScript Standard Style](https://github.com/feross/standard). + +[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +To test that the code conforms to the style, `npm install` and run: + + ./node_modules/.bin/standard + +## credit + +This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). + +## Security Policies and Procedures + +The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues. + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/tests/node_modules/buffer/index.d.ts b/tests/node_modules/buffer/index.d.ts new file mode 100644 index 0000000..5d1a804 --- /dev/null +++ b/tests/node_modules/buffer/index.d.ts @@ -0,0 +1,186 @@ +export class Buffer extends Uint8Array { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer | Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initializing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; +} diff --git a/tests/node_modules/buffer/index.js b/tests/node_modules/buffer/index.js new file mode 100644 index 0000000..7a0e9c2 --- /dev/null +++ b/tests/node_modules/buffer/index.js @@ -0,0 +1,2106 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +const base64 = require('base64-js') +const ieee754 = require('ieee754') +const customInspectSymbol = + (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation + ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation + : null + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +const K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + const arr = new Uint8Array(1) + const proto = { foo: function () { return 42 } } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + const buf = new Uint8Array(length) + Object.setPrototypeOf(buf, Buffer.prototype) + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayView(value) + } + + if (value == null) { + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof SharedArrayBuffer !== 'undefined' && + (isInstance(value, SharedArrayBuffer) || + (value && isInstance(value.buffer, SharedArrayBuffer)))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + const valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + const b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) +Object.setPrototypeOf(Buffer, Uint8Array) + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpreted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + const length = byteLength(string, encoding) | 0 + let buf = createBuffer(length) + + const actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + const length = array.length < 0 ? 0 : checked(array.length) | 0 + const buf = createBuffer(length) + for (let i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayView (arrayView) { + if (isInstance(arrayView, Uint8Array)) { + const copy = new Uint8Array(arrayView) + return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) + } + return fromArrayLike(arrayView) +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + let buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(buf, Buffer.prototype) + + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + const len = checked(obj.length) | 0 + const buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + let x = a.length + let y = b.length + + for (let i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + let i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + const buffer = Buffer.allocUnsafe(length) + let pos = 0 + for (i = 0; i < list.length; ++i) { + let buf = list[i] + if (isInstance(buf, Uint8Array)) { + if (pos + buf.length > buffer.length) { + if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) + buf.copy(buffer, pos) + } else { + Uint8Array.prototype.set.call( + buffer, + buf, + pos + ) + } + } else if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } else { + buf.copy(buffer, pos) + } + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + const len = string.length + const mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + let loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + let loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coercion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + const i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + const len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (let i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + const len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (let i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + const len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (let i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + const length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + let str = '' + const max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} +if (customInspectSymbol) { + Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + let x = thisEnd - thisStart + let y = end - start + const len = Math.min(x, y) + + const thisCopy = this.slice(thisStart, thisEnd) + const targetCopy = target.slice(start, end) + + for (let i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + let indexSize = 1 + let arrLength = arr.length + let valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + let i + if (dir) { + let foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + let found = true + for (let j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + const remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + const strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + let i + for (i = 0; i < length; ++i) { + const parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + const remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + let loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + case 'latin1': + case 'binary': + return asciiWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + const res = [] + + let i = start + while (i < end) { + const firstByte = buf[i] + let codePoint = null + let bytesPerSequence = (firstByte > 0xEF) + ? 4 + : (firstByte > 0xDF) + ? 3 + : (firstByte > 0xBF) + ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +const MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + const len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + let res = '' + let i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + const len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + let out = '' + for (let i = start; i < end; ++i) { + out += hexSliceLookupTable[buf[i]] + } + return out +} + +function utf16leSlice (buf, start, end) { + const bytes = buf.slice(start, end) + let res = '' + // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) + for (let i = 0; i < bytes.length - 1; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + const len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + const newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(newBuf, Buffer.prototype) + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUintLE = +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUintBE = +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + let val = this[offset + --byteLength] + let mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUint8 = +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUint16LE = +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUint16BE = +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUint32LE = +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUint32BE = +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const lo = first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24 + + const hi = this[++offset] + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + last * 2 ** 24 + + return BigInt(lo) + (BigInt(hi) << BigInt(32)) +}) + +Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const hi = first * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + + const lo = this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last + + return (BigInt(hi) << BigInt(32)) + BigInt(lo) +}) + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let i = byteLength + let mul = 1 + let val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const val = this[offset + 4] + + this[offset + 5] * 2 ** 8 + + this[offset + 6] * 2 ** 16 + + (last << 24) // Overflow + + return (BigInt(val) << BigInt(32)) + + BigInt(first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24) +}) + +Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const val = (first << 24) + // Overflow + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + + return (BigInt(val) << BigInt(32)) + + BigInt(this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last) +}) + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUintLE = +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + let mul = 1 + let i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUintBE = +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + let i = byteLength - 1 + let mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUint8 = +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUint16LE = +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUint16BE = +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUint32LE = +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUint32BE = +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function wrtBigUInt64LE (buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + + let lo = Number(value & BigInt(0xffffffff)) + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + return offset +} + +function wrtBigUInt64BE (buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + + let lo = Number(value & BigInt(0xffffffff)) + buf[offset + 7] = lo + lo = lo >> 8 + buf[offset + 6] = lo + lo = lo >> 8 + buf[offset + 5] = lo + lo = lo >> 8 + buf[offset + 4] = lo + let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) + buf[offset + 3] = hi + hi = hi >> 8 + buf[offset + 2] = hi + hi = hi >> 8 + buf[offset + 1] = hi + hi = hi >> 8 + buf[offset] = hi + return offset + 8 +} + +Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) +}) + +Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) +}) + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + let i = 0 + let mul = 1 + let sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + let i = byteLength - 1 + let mul = 1 + let sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) +}) + +Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) +}) + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + const len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + const code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } else if (typeof val === 'boolean') { + val = Number(val) + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + let i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + const bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + const len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// CUSTOM ERRORS +// ============= + +// Simplified versions from Node, changed for Buffer-only usage +const errors = {} +function E (sym, getMessage, Base) { + errors[sym] = class NodeError extends Base { + constructor () { + super() + + Object.defineProperty(this, 'message', { + value: getMessage.apply(this, arguments), + writable: true, + configurable: true + }) + + // Add the error code to the name to include it in the stack trace. + this.name = `${this.name} [${sym}]` + // Access the stack to generate the error message including the error code + // from the name. + this.stack // eslint-disable-line no-unused-expressions + // Reset the name to the actual name. + delete this.name + } + + get code () { + return sym + } + + set code (value) { + Object.defineProperty(this, 'code', { + configurable: true, + enumerable: true, + value, + writable: true + }) + } + + toString () { + return `${this.name} [${sym}]: ${this.message}` + } + } +} + +E('ERR_BUFFER_OUT_OF_BOUNDS', + function (name) { + if (name) { + return `${name} is outside of buffer bounds` + } + + return 'Attempt to access memory outside buffer bounds' + }, RangeError) +E('ERR_INVALID_ARG_TYPE', + function (name, actual) { + return `The "${name}" argument must be of type number. Received type ${typeof actual}` + }, TypeError) +E('ERR_OUT_OF_RANGE', + function (str, range, input) { + let msg = `The value of "${str}" is out of range.` + let received = input + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)) + } else if (typeof input === 'bigint') { + received = String(input) + if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) { + received = addNumericalSeparator(received) + } + received += 'n' + } + msg += ` It must be ${range}. Received ${received}` + return msg + }, RangeError) + +function addNumericalSeparator (val) { + let res = '' + let i = val.length + const start = val[0] === '-' ? 1 : 0 + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}` + } + return `${val.slice(0, i)}${res}` +} + +// CHECK FUNCTIONS +// =============== + +function checkBounds (buf, offset, byteLength) { + validateNumber(offset, 'offset') + if (buf[offset] === undefined || buf[offset + byteLength] === undefined) { + boundsError(offset, buf.length - (byteLength + 1)) + } +} + +function checkIntBI (value, min, max, buf, offset, byteLength) { + if (value > max || value < min) { + const n = typeof min === 'bigint' ? 'n' : '' + let range + if (byteLength > 3) { + if (min === 0 || min === BigInt(0)) { + range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}` + } else { + range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + + `${(byteLength + 1) * 8 - 1}${n}` + } + } else { + range = `>= ${min}${n} and <= ${max}${n}` + } + throw new errors.ERR_OUT_OF_RANGE('value', range, value) + } + checkBounds(buf, offset, byteLength) +} + +function validateNumber (value, name) { + if (typeof value !== 'number') { + throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value) + } +} + +function boundsError (value, length, type) { + if (Math.floor(value) !== value) { + validateNumber(value, type) + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value) + } + + if (length < 0) { + throw new errors.ERR_BUFFER_OUT_OF_BOUNDS() + } + + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', + `>= ${type ? 1 : 0} and <= ${length}`, + value) +} + +// HELPER FUNCTIONS +// ================ + +const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function utf8ToBytes (string, units) { + units = units || Infinity + let codePoint + const length = string.length + let leadSurrogate = null + const bytes = [] + + for (let i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + let c, hi, lo + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + let i + for (i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +// Create lookup table for `toString('hex')` +// See: https://github.com/feross/buffer/issues/219 +const hexSliceLookupTable = (function () { + const alphabet = '0123456789abcdef' + const table = new Array(256) + for (let i = 0; i < 16; ++i) { + const i16 = i * 16 + for (let j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j] + } + } + return table +})() + +// Return not function with Error if BigInt not supported +function defineBigIntMethod (fn) { + return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn +} + +function BufferBigIntNotDefined () { + throw new Error('BigInt not supported') +} diff --git a/tests/node_modules/buffer/package.json b/tests/node_modules/buffer/package.json new file mode 100644 index 0000000..534d53d --- /dev/null +++ b/tests/node_modules/buffer/package.json @@ -0,0 +1,93 @@ +{ + "name": "buffer", + "description": "Node.js Buffer API, for the browser", + "version": "6.0.1", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/buffer/issues" + }, + "contributors": [ + "Romain Beauxis ", + "James Halliday " + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + }, + "devDependencies": { + "airtap": "^3.0.0", + "benchmark": "^2.1.4", + "browserify": "^17.0.0", + "concat-stream": "^2.0.0", + "hyperquest": "^2.1.3", + "is-buffer": "^2.0.5", + "is-nan": "^1.3.0", + "split": "^1.0.1", + "standard": "*", + "tape": "^5.0.1", + "through2": "^4.0.2", + "uglify-js": "^3.11.5" + }, + "homepage": "https://github.com/feross/buffer", + "jspm": { + "map": { + "./index.js": { + "node": "@node/buffer" + } + } + }, + "keywords": [ + "arraybuffer", + "browser", + "browserify", + "buffer", + "compatible", + "dataview", + "uint8array" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/buffer.git" + }, + "scripts": { + "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", + "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", + "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", + "test": "standard && node ./bin/test.js", + "test-browser-old": "airtap -- test/*.js", + "test-browser-old-local": "airtap --local -- test/*.js", + "test-browser-new": "airtap -- test/*.js test/node/*.js", + "test-browser-new-local": "airtap --local -- test/*.js test/node/*.js", + "test-node": "tape test/*.js test/node/*.js", + "update-authors": "./bin/update-authors.sh" + }, + "standard": { + "ignore": [ + "test/node/**/*.js", + "test/common.js", + "test/_polyfill.js", + "perf/**/*.js" + ] + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/tests/node_modules/bufferutil/LICENSE b/tests/node_modules/bufferutil/LICENSE new file mode 100644 index 0000000..33ab25f --- /dev/null +++ b/tests/node_modules/bufferutil/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011 Einar Otto Stangvik (http://2x.io) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/node_modules/bufferutil/README.md b/tests/node_modules/bufferutil/README.md new file mode 100644 index 0000000..ae7836b --- /dev/null +++ b/tests/node_modules/bufferutil/README.md @@ -0,0 +1,78 @@ +# bufferutil + +[![Version npm](https://img.shields.io/npm/v/bufferutil.svg)](https://www.npmjs.com/package/bufferutil) +[![Linux/macOS Build](https://travis-ci.com/websockets/bufferutil.svg?branch=master)](https://travis-ci.com/websockets/bufferutil) +[![Windows Build](https://ci.appveyor.com/api/projects/status/github/websockets/bufferutil?branch=master&svg=true)](https://ci.appveyor.com/project/lpinca/bufferutil) + +`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently +perform some operations such as masking and unmasking the data payload of +WebSocket frames. + +## Installation + +``` +npm install bufferutil --save-optional +``` + +The `--save-optional` flag tells npm to save the package in your package.json +under the [`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies) +key. + +## API + +The module exports two functions. + +### `bufferUtil.mask(source, mask, output, offset, length)` + +Masks a buffer using the given masking-key as specified by the WebSocket +protocol. + +#### Arguments + +- `source` - The buffer to mask. +- `mask` - A buffer representing the masking-key. +- `output` - The buffer where to store the result. +- `offset` - The offset at which to start writing. +- `length` - The number of bytes to mask. + +#### Example + +```js +'use strict'; + +const bufferUtil = require('bufferutil'); +const crypto = require('crypto'); + +const source = crypto.randomBytes(10); +const mask = crypto.randomBytes(4); + +bufferUtil.mask(source, mask, source, 0, source.length); +``` + +### `bufferUtil.unmask(buffer, mask)` + +Unmasks a buffer using the given masking-key as specified by the WebSocket +protocol. + +#### Arguments + +- `buffer` - The buffer to unmask. +- `mask` - A buffer representing the masking-key. + +#### Example + +```js +'use strict'; + +const bufferUtil = require('bufferutil'); +const crypto = require('crypto'); + +const buffer = crypto.randomBytes(10); +const mask = crypto.randomBytes(4); + +bufferUtil.unmask(buffer, mask); +``` + +## License + +[MIT](LICENSE) diff --git a/tests/node_modules/bufferutil/binding.gyp b/tests/node_modules/bufferutil/binding.gyp new file mode 100644 index 0000000..da5fc81 --- /dev/null +++ b/tests/node_modules/bufferutil/binding.gyp @@ -0,0 +1,9 @@ +{ + 'targets': [ + { + 'target_name': 'bufferutil', + 'sources': ['src/bufferutil.c'], + 'cflags': ['-std=c99'] + } + ] +} diff --git a/tests/node_modules/bufferutil/build/Makefile b/tests/node_modules/bufferutil/build/Makefile new file mode 100644 index 0000000..f415dcb --- /dev/null +++ b/tests/node_modules/bufferutil/build/Makefile @@ -0,0 +1,342 @@ +# We borrow heavily from the kernel build setup, though we are simpler since +# we don't have Kconfig tweaking settings on us. + +# The implicit make rules have it looking for RCS files, among other things. +# We instead explicitly write all the rules we care about. +# It's even quicker (saves ~200ms) to pass -r on the command line. +MAKEFLAGS=-r + +# The source directory tree. +srcdir := .. +abs_srcdir := $(abspath $(srcdir)) + +# The name of the builddir. +builddir_name ?= . + +# The V=1 flag on command line makes us verbosely print command lines. +ifdef V + quiet= +else + quiet=quiet_ +endif + +# Specify BUILDTYPE=Release on the command line for a release build. +BUILDTYPE ?= Release + +# Directory all our build output goes into. +# Note that this must be two directories beneath src/ for unit tests to pass, +# as they reach into the src/ directory for data with relative paths. +builddir ?= $(builddir_name)/$(BUILDTYPE) +abs_builddir := $(abspath $(builddir)) +depsdir := $(builddir)/.deps + +# Object output directory. +obj := $(builddir)/obj +abs_obj := $(abspath $(obj)) + +# We build up a list of every single one of the targets so we can slurp in the +# generated dependency rule Makefiles in one pass. +all_deps := + + + +CC.target ?= $(CC) +CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS) +CXX.target ?= $(CXX) +CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS) +LINK.target ?= $(LINK) +LDFLAGS.target ?= $(LDFLAGS) +AR.target ?= $(AR) + +# C++ apps need to be linked with g++. +LINK ?= $(CXX.target) + +# TODO(evan): move all cross-compilation logic to gyp-time so we don't need +# to replicate this environment fallback in make as well. +CC.host ?= gcc +CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host) +CXX.host ?= g++ +CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host) +LINK.host ?= $(CXX.host) +LDFLAGS.host ?= +AR.host ?= ar + +# Define a dir function that can handle spaces. +# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions +# "leading spaces cannot appear in the text of the first argument as written. +# These characters can be put into the argument value by variable substitution." +empty := +space := $(empty) $(empty) + +# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces +replace_spaces = $(subst $(space),?,$1) +unreplace_spaces = $(subst ?,$(space),$1) +dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) + +# Flags to make gcc output dependency info. Note that you need to be +# careful here to use the flags that ccache and distcc can understand. +# We write to a dep file on the side first and then rename at the end +# so we can't end up with a broken dep file. +depfile = $(depsdir)/$(call replace_spaces,$@).d +DEPFLAGS = -MMD -MF $(depfile).raw + +# We have to fixup the deps output in a few ways. +# (1) the file output should mention the proper .o file. +# ccache or distcc lose the path to the target, so we convert a rule of +# the form: +# foobar.o: DEP1 DEP2 +# into +# path/to/foobar.o: DEP1 DEP2 +# (2) we want missing files not to cause us to fail to build. +# We want to rewrite +# foobar.o: DEP1 DEP2 \ +# DEP3 +# to +# DEP1: +# DEP2: +# DEP3: +# so if the files are missing, they're just considered phony rules. +# We have to do some pretty insane escaping to get those backslashes +# and dollar signs past make, the shell, and sed at the same time. +# Doesn't work with spaces, but that's fine: .d files have spaces in +# their names replaced with other characters. +define fixup_dep +# The depfile may not exist if the input file didn't have any #includes. +touch $(depfile).raw +# Fixup path as in (1). +sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) +# Add extra rules as in (2). +# We remove slashes and replace spaces with new lines; +# remove blank lines; +# delete the first line and append a colon to the remaining lines. +sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ + grep -v '^$$' |\ + sed -e 1d -e 's|$$|:|' \ + >> $(depfile) +rm $(depfile).raw +endef + +# Command definitions: +# - cmd_foo is the actual command to run; +# - quiet_cmd_foo is the brief-output summary of the command. + +quiet_cmd_cc = CC($(TOOLSET)) $@ +cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c + +quiet_cmd_cxx = CXX($(TOOLSET)) $@ +cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c + +quiet_cmd_objc = CXX($(TOOLSET)) $@ +cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< + +quiet_cmd_objcxx = CXX($(TOOLSET)) $@ +cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< + +# Commands for precompiled header files. +quiet_cmd_pch_c = CXX($(TOOLSET)) $@ +cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< +quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ +cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< +quiet_cmd_pch_m = CXX($(TOOLSET)) $@ +cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< +quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ +cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< + +# gyp-mac-tool is written next to the root Makefile by gyp. +# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd +# already. +quiet_cmd_mac_tool = MACTOOL $(4) $< +cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" + +quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ +cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) + +quiet_cmd_infoplist = INFOPLIST $@ +cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" + +quiet_cmd_touch = TOUCH $@ +cmd_touch = touch $@ + +quiet_cmd_copy = COPY $@ +# send stderr to /dev/null to ignore messages when linking directories. +cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@") + +quiet_cmd_alink = LIBTOOL-STATIC $@ +cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) + +quiet_cmd_link = LINK($(TOOLSET)) $@ +cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) + +quiet_cmd_solink = SOLINK($(TOOLSET)) $@ +cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) + +quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ +cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) + + +# Define an escape_quotes function to escape single quotes. +# This allows us to handle quotes properly as long as we always use +# use single quotes and escape_quotes. +escape_quotes = $(subst ','\'',$(1)) +# This comment is here just to include a ' to unconfuse syntax highlighting. +# Define an escape_vars function to escape '$' variable syntax. +# This allows us to read/write command lines with shell variables (e.g. +# $LD_LIBRARY_PATH), without triggering make substitution. +escape_vars = $(subst $$,$$$$,$(1)) +# Helper that expands to a shell command to echo a string exactly as it is in +# make. This uses printf instead of echo because printf's behaviour with respect +# to escape sequences is more portable than echo's across different shells +# (e.g., dash, bash). +exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' + +# Helper to compare the command we're about to run against the command +# we logged the last time we ran the command. Produces an empty +# string (false) when the commands match. +# Tricky point: Make has no string-equality test function. +# The kernel uses the following, but it seems like it would have false +# positives, where one string reordered its arguments. +# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ +# $(filter-out $(cmd_$@), $(cmd_$(1)))) +# We instead substitute each for the empty string into the other, and +# say they're equal if both substitutions produce the empty string. +# .d files contain ? instead of spaces, take that into account. +command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ + $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) + +# Helper that is non-empty when a prerequisite changes. +# Normally make does this implicitly, but we force rules to always run +# so we can check their command lines. +# $? -- new prerequisites +# $| -- order-only dependencies +prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) + +# Helper that executes all postbuilds until one fails. +define do_postbuilds + @E=0;\ + for p in $(POSTBUILDS); do\ + eval $$p;\ + E=$$?;\ + if [ $$E -ne 0 ]; then\ + break;\ + fi;\ + done;\ + if [ $$E -ne 0 ]; then\ + rm -rf "$@";\ + exit $$E;\ + fi +endef + +# do_cmd: run a command via the above cmd_foo names, if necessary. +# Should always run for a given target to handle command-line changes. +# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. +# Third argument, if non-zero, makes it do POSTBUILDS processing. +# Note: We intentionally do NOT call dirx for depfile, since it contains ? for +# spaces already and dirx strips the ? characters. +define do_cmd +$(if $(or $(command_changed),$(prereq_changed)), + @$(call exact_echo, $($(quiet)cmd_$(1))) + @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" + $(if $(findstring flock,$(word 2,$(cmd_$1))), + @$(cmd_$(1)) + @echo " $(quiet_cmd_$(1)): Finished", + @$(cmd_$(1)) + ) + @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) + @$(if $(2),$(fixup_dep)) + $(if $(and $(3), $(POSTBUILDS)), + $(call do_postbuilds) + ) +) +endef + +# Declare the "all" target first so it is the default, +# even though we don't have the deps yet. +.PHONY: all +all: + +# make looks for ways to re-generate included makefiles, but in our case, we +# don't have a direct way. Explicitly telling make that it has nothing to do +# for them makes it go faster. +%.d: ; + +# Use FORCE_DO_CMD to force a target to run. Should be coupled with +# do_cmd. +.PHONY: FORCE_DO_CMD +FORCE_DO_CMD: + +TOOLSET := target +# Suffix rules, putting all outputs into $(obj). +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD + @$(call do_cmd,objc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD + @$(call do_cmd,objcxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) + +# Try building from generated source, too. +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD + @$(call do_cmd,objc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD + @$(call do_cmd,objcxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) + +$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD + @$(call do_cmd,objc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD + @$(call do_cmd,objcxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) + + +ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ + $(findstring $(join ^,$(prefix)),\ + $(join ^,bufferutil.target.mk)))),) + include bufferutil.target.mk +endif + +quiet_cmd_regen_makefile = ACTION Regenerating $@ +cmd_regen_makefile = cd $(srcdir); /Users/rohan/.nvm/versions/node/v15.8.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/rohan/Library/Caches/node-gyp/15.8.0" "-Dnode_gyp_dir=/Users/rohan/.nvm/versions/node/v15.8.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/rohan/Library/Caches/node-gyp/15.8.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/rohan/Desktop/solana-bin/projects/monaco/tests/node_modules/bufferutil" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/Users/rohan/Desktop/solana-bin/projects/monaco/tests/node_modules/bufferutil/build/config.gypi -I/Users/rohan/.nvm/versions/node/v15.8.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/common.gypi "--toplevel-dir=." binding.gyp +Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../../../../../.nvm/versions/node/v15.8.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../../../Library/Caches/node-gyp/15.8.0/include/node/common.gypi $(srcdir)/binding.gyp + $(call do_cmd,regen_makefile) + +# "all" is a concatenation of the "all" targets from all the included +# sub-makefiles. This is just here to clarify. +all: + +# Add in dependency-tracking rules. $(all_deps) is the list of every single +# target in our tree. Only consider the ones with .d (dependency) info: +d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) +ifneq ($(d_files),) + include $(d_files) +endif diff --git a/tests/node_modules/bufferutil/build/Release/.deps/Release/bufferutil.node.d b/tests/node_modules/bufferutil/build/Release/.deps/Release/bufferutil.node.d new file mode 100644 index 0000000..e212e7a --- /dev/null +++ b/tests/node_modules/bufferutil/build/Release/.deps/Release/bufferutil.node.d @@ -0,0 +1 @@ +cmd_Release/bufferutil.node := c++ -bundle -undefined dynamic_lookup -Wl,-search_paths_first -mmacosx-version-min=10.13 -arch arm64 -L./Release -stdlib=libc++ -o Release/bufferutil.node Release/obj.target/bufferutil/src/bufferutil.o diff --git a/tests/node_modules/bufferutil/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d b/tests/node_modules/bufferutil/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d new file mode 100644 index 0000000..af5b78b --- /dev/null +++ b/tests/node_modules/bufferutil/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d @@ -0,0 +1,11 @@ +cmd_Release/obj.target/bufferutil/src/bufferutil.o := cc -o Release/obj.target/bufferutil/src/bufferutil.o ../src/bufferutil.c '-DNODE_GYP_MODULE_NAME=bufferutil' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node -I/Users/rohan/Library/Caches/node-gyp/15.8.0/src -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/openssl/config -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/openssl/openssl/include -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/uv/include -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/zlib -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/v8/include -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw -c +Release/obj.target/bufferutil/src/bufferutil.o: ../src/bufferutil.c \ + /Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/node_api.h \ + /Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/js_native_api.h \ + /Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/js_native_api_types.h \ + /Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/node_api_types.h +../src/bufferutil.c: +/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/node_api.h: +/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/js_native_api.h: +/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/js_native_api_types.h: +/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node/node_api_types.h: diff --git a/tests/node_modules/bufferutil/build/Release/bufferutil.node b/tests/node_modules/bufferutil/build/Release/bufferutil.node new file mode 100755 index 0000000000000000000000000000000000000000..c7cf1f5605ab6f2acd6f99e086efa004ce0daaaf GIT binary patch literal 52700 zcmeI5dvH|M9mmhzO~`H%NJ4_a0VOC>9$^=OU^0SU5|l&`NQj+`RxX>}4Oz3a>K?&U9!y2wDk+nU2L7sN)!5sv>O_oT|0eCNS2#d=?$z7}D>#=bY@_Rffzs z?H`@rojH5X_ji83-#zzpfA{gvOwWX$+eKEf1|Zld(s*0o#>m?_kz2>ThYN zH%+NOda7hnBL!29dl*K{zbVE?VoT5GxIx%AWr?0^oAfoi43@A;!-&S>jnPq4dcMR> zVrql*;M$tcA@kwb%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ests/node_modules/bufferutil/build/Release/obj.target/bufferutil/src/bufferutil.o b/tests/node_modules/bufferutil/build/Release/obj.target/bufferutil/src/bufferutil.o new file mode 100644 index 0000000000000000000000000000000000000000..1c1501f63ba77c8751effc96daf68c9df85ce3cd GIT binary patch literal 16496 zcmcIr4Rlo1wLW)l?qrggOfva_QLsdV5S0875)D4a2EjIeYLHmNUni5vkc>=brkM$1 zMM(i)Y0I;rrES{sUb7TmgT7c1PNr>Y0#sgd9f);%9?Jdm-UQt`g2!;GvfVGv3eVGJltd~F)uh$=ocL&2A zQsDJY^r!sXDf>@ilF5a9Cl{}`-52*IBwp{T70oLW{0TX(S}7{bVoV3!Uo9}9DJZYE zE7I-_hJ$hMrk=1L^PlK1$0qb7uukdkF#ORvWTZI6_yTP`9bQbD_rTx1EAIZ3spXcA zHpz8}!e2_6FlFU06!CMlRDTak`yWbtEjPuRSRPZT{Q272x&vEiy(f-u@f@MLj3$S& ztB^x-Gv)Y#;Y|@zO7$0*D@=c375LL@1s+BGN(7nW&lin`0^YE%D-c6}s=uX0!e~s6 z?<>WEPim+17iqhX2Qby&!s~_QeCc5O4N0B^Ii){7zNpWi>aQWi-{Uj%7k?l+<$NR3 z-_>#y|NXK4{E;q~y9@ug#cnC?m z36%<^7F9aG=b@&aix7QmxuRQM8N17R@bZJ{2QR;{=D?1bz_$chrOR>(%OYo2-AUNc^-*}gJjXX7LGnrCb}t2~!i zGw#i(`OC1KHD_SVwFcWelE=ntwVGw;vTMd~G-|$9AKYABtJ&($!M*|g=V4!~v1N-4 z<|04yw2aL^W2{;EI&=9-Gs2!v{%q*O@t)~TN5Ayf2!EqGTecYXd*J_$V5s_?bhfM{ zgSnmpe`m0(`dvHszj_hpgVpb5vtKRv&E0 zZv2y)?YvK8xGMJk>hgo1J~(#Qrw$^I_73UZ*OKFO=C4Xn@u@-Gef zXB@n|a_ao6rToK~DaYP=d}97F%A4895kLA?PRtXYmqiovY$yx)L%E}~BeaH;FGCiQ zFC*z9M{HOdo*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3O8BD5msX0{2t_anE2uzm zsZv~;tOzFgLvgSPJ6OQ3A}N64pCrVW*UBCG6Q7NPNp=S|;jV(aTcYfiB-?>Wwga26 Lg9U~`rx^QRi9s2r literal 0 HcmV?d00001 diff --git a/tests/node_modules/bufferutil/build/binding.Makefile b/tests/node_modules/bufferutil/build/binding.Makefile new file mode 100644 index 0000000..b532496 --- /dev/null +++ b/tests/node_modules/bufferutil/build/binding.Makefile @@ -0,0 +1,6 @@ +# This file is generated by gyp; do not edit. + +export builddir_name ?= ./build/. +.PHONY: all +all: + $(MAKE) bufferutil diff --git a/tests/node_modules/bufferutil/build/bufferutil.target.mk b/tests/node_modules/bufferutil/build/bufferutil.target.mk new file mode 100644 index 0000000..c2954f2 --- /dev/null +++ b/tests/node_modules/bufferutil/build/bufferutil.target.mk @@ -0,0 +1,186 @@ +# This file is generated by gyp; do not edit. + +TOOLSET := target +TARGET := bufferutil +DEFS_Debug := \ + '-DNODE_GYP_MODULE_NAME=bufferutil' \ + '-DUSING_UV_SHARED=1' \ + '-DUSING_V8_SHARED=1' \ + '-DV8_DEPRECATION_WARNINGS=1' \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DV8_IMMINENT_DEPRECATION_WARNINGS' \ + '-D_DARWIN_USE_64_BIT_INODE=1' \ + '-D_LARGEFILE_SOURCE' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DOPENSSL_NO_PINSHARED' \ + '-DOPENSSL_THREADS' \ + '-DBUILDING_NODE_EXTENSION' \ + '-DDEBUG' \ + '-D_DEBUG' \ + '-DV8_ENABLE_CHECKS' + +# Flags passed to all source files. +CFLAGS_Debug := \ + -O0 \ + -gdwarf-2 \ + -mmacosx-version-min=10.13 \ + -arch arm64 \ + -Wall \ + -Wendif-labels \ + -W \ + -Wno-unused-parameter + +# Flags passed to only C files. +CFLAGS_C_Debug := \ + -fno-strict-aliasing + +# Flags passed to only C++ files. +CFLAGS_CC_Debug := \ + -std=gnu++1y \ + -stdlib=libc++ \ + -fno-rtti \ + -fno-exceptions \ + -fno-strict-aliasing + +# Flags passed to only ObjC files. +CFLAGS_OBJC_Debug := + +# Flags passed to only ObjC++ files. +CFLAGS_OBJCC_Debug := + +INCS_Debug := \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/src \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/openssl/config \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/openssl/openssl/include \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/uv/include \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/zlib \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/v8/include + +DEFS_Release := \ + '-DNODE_GYP_MODULE_NAME=bufferutil' \ + '-DUSING_UV_SHARED=1' \ + '-DUSING_V8_SHARED=1' \ + '-DV8_DEPRECATION_WARNINGS=1' \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DV8_IMMINENT_DEPRECATION_WARNINGS' \ + '-D_DARWIN_USE_64_BIT_INODE=1' \ + '-D_LARGEFILE_SOURCE' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DOPENSSL_NO_PINSHARED' \ + '-DOPENSSL_THREADS' \ + '-DBUILDING_NODE_EXTENSION' + +# Flags passed to all source files. +CFLAGS_Release := \ + -O3 \ + -gdwarf-2 \ + -mmacosx-version-min=10.13 \ + -arch arm64 \ + -Wall \ + -Wendif-labels \ + -W \ + -Wno-unused-parameter + +# Flags passed to only C files. +CFLAGS_C_Release := \ + -fno-strict-aliasing + +# Flags passed to only C++ files. +CFLAGS_CC_Release := \ + -std=gnu++1y \ + -stdlib=libc++ \ + -fno-rtti \ + -fno-exceptions \ + -fno-strict-aliasing + +# Flags passed to only ObjC files. +CFLAGS_OBJC_Release := + +# Flags passed to only ObjC++ files. +CFLAGS_OBJCC_Release := + +INCS_Release := \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/include/node \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/src \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/openssl/config \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/openssl/openssl/include \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/uv/include \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/zlib \ + -I/Users/rohan/Library/Caches/node-gyp/15.8.0/deps/v8/include + +OBJS := \ + $(obj).target/$(TARGET)/src/bufferutil.o + +# Add to the list of files we specially track dependencies for. +all_deps += $(OBJS) + +# CFLAGS et al overrides must be target-local. +# See "Target-specific Variable Values" in the GNU Make manual. +$(OBJS): TOOLSET := $(TOOLSET) +$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) +$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) +$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE)) +$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE)) + +# Suffix rules, putting all outputs into $(obj). + +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) + +# Try building from generated source, too. + +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) + +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) + +# End of this set of suffix rules +### Rules for final target. +LDFLAGS_Debug := \ + -undefined dynamic_lookup \ + -Wl,-search_paths_first \ + -mmacosx-version-min=10.13 \ + -arch arm64 \ + -L$(builddir) \ + -stdlib=libc++ + +LIBTOOLFLAGS_Debug := \ + -undefined dynamic_lookup \ + -Wl,-search_paths_first + +LDFLAGS_Release := \ + -undefined dynamic_lookup \ + -Wl,-search_paths_first \ + -mmacosx-version-min=10.13 \ + -arch arm64 \ + -L$(builddir) \ + -stdlib=libc++ + +LIBTOOLFLAGS_Release := \ + -undefined dynamic_lookup \ + -Wl,-search_paths_first + +LIBS := + +$(builddir)/bufferutil.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) +$(builddir)/bufferutil.node: LIBS := $(LIBS) +$(builddir)/bufferutil.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE)) +$(builddir)/bufferutil.node: TOOLSET := $(TOOLSET) +$(builddir)/bufferutil.node: $(OBJS) FORCE_DO_CMD + $(call do_cmd,solink_module) + +all_deps += $(builddir)/bufferutil.node +# Add target alias +.PHONY: bufferutil +bufferutil: $(builddir)/bufferutil.node + +# Short alias for building this executable. +.PHONY: bufferutil.node +bufferutil.node: $(builddir)/bufferutil.node + +# Add executable to "all" target. +.PHONY: all +all: $(builddir)/bufferutil.node + diff --git a/tests/node_modules/bufferutil/build/config.gypi b/tests/node_modules/bufferutil/build/config.gypi new file mode 100644 index 0000000..d6395fa --- /dev/null +++ b/tests/node_modules/bufferutil/build/config.gypi @@ -0,0 +1,92 @@ +# Do not edit. File was generated by node-gyp's "configure" step +{ + "target_defaults": { + "cflags": [], + "default_configuration": "Release", + "defines": [], + "include_dirs": [], + "libraries": [], + "msvs_configuration_platform": "ARM64", + "xcode_configuration_platform": "arm64" + }, + "variables": { + "asan": 0, + "coverage": "false", + "dcheck_always_on": 0, + "debug_nghttp2": "false", + "debug_node": "false", + "enable_lto": "false", + "enable_pgo_generate": "false", + "enable_pgo_use": "false", + "error_on_warn": "false", + "force_dynamic_crt": 0, + "host_arch": "arm64", + "icu_data_in": "../../deps/icu-tmp/icudt68l.dat", + "icu_endianness": "l", + "icu_gyp_path": "tools/icu/icu-generic.gyp", + "icu_path": "deps/icu-small", + "icu_small": "false", + "icu_ver_major": "68", + "is_debug": 0, + "llvm_version": "12.0", + "napi_build_version": "7", + "node_byteorder": "little", + "node_debug_lib": "false", + "node_enable_d8": "false", + "node_install_npm": "true", + "node_module_version": 88, + "node_no_browser_globals": "false", + "node_prefix": "/Users/rohan/.nvm/versions/node/v15.8.0", + "node_release_urlbase": "", + "node_shared": "false", + "node_shared_brotli": "false", + "node_shared_cares": "false", + "node_shared_http_parser": "false", + "node_shared_libuv": "false", + "node_shared_nghttp2": "false", + "node_shared_openssl": "false", + "node_shared_zlib": "false", + "node_tag": "", + "node_target_type": "executable", + "node_use_bundled_v8": "true", + "node_use_dtrace": "true", + "node_use_etw": "false", + "node_use_node_code_cache": "true", + "node_use_node_snapshot": "true", + "node_use_openssl": "true", + "node_use_v8_platform": "true", + "node_with_ltcg": "false", + "node_without_node_options": "false", + "openssl_fips": "", + "openssl_is_fips": "false", + "ossfuzz": "false", + "shlib_suffix": "88.dylib", + "target_arch": "arm64", + "v8_enable_31bit_smis_on_64bit_arch": 0, + "v8_enable_gdbjit": 0, + "v8_enable_i18n_support": 1, + "v8_enable_inspector": 1, + "v8_enable_lite_mode": 0, + "v8_enable_object_print": 1, + "v8_enable_pointer_compression": 0, + "v8_no_strict_aliasing": 1, + "v8_optimized_debug": 1, + "v8_promise_internal_field_count": 1, + "v8_random_seed": 0, + "v8_trace_maps": 0, + "v8_use_siphash": 1, + "want_separate_host_toolset": 0, + "xcode_version": "12.0", + "nodedir": "/Users/rohan/Library/Caches/node-gyp/15.8.0", + "standalone_static_library": 1, + "metrics_registry": "https://registry.npmjs.org/", + "globalconfig": "/Users/rohan/.nvm/versions/node/v15.8.0/etc/npmrc", + "init.module": "/Users/rohan/.npm-init.js", + "init_module": "/Users/rohan/.npm-init.js", + "userconfig": "/Users/rohan/.npmrc", + "node_gyp": "/Users/rohan/.nvm/versions/node/v15.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", + "cache": "/Users/rohan/.npm", + "user_agent": "npm/7.5.2 node/v15.8.0 darwin arm64", + "prefix": "/Users/rohan/.nvm/versions/node/v15.8.0" + } +} diff --git a/tests/node_modules/bufferutil/build/gyp-mac-tool b/tests/node_modules/bufferutil/build/gyp-mac-tool new file mode 100755 index 0000000..d9fc076 --- /dev/null +++ b/tests/node_modules/bufferutil/build/gyp-mac-tool @@ -0,0 +1,777 @@ +#!/usr/bin/env python +# Generated by gyp. Do not edit. +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Utility functions to perform Xcode-style build steps. + +These functions are executed via gyp-mac-tool when using the Makefile generator. +""" + +from __future__ import print_function + +import fcntl +import fnmatch +import glob +import json +import os +import plistlib +import re +import shutil +import struct +import subprocess +import sys +import tempfile + +PY3 = bytes != str + + +def main(args): + executor = MacTool() + exit_code = executor.Dispatch(args) + if exit_code is not None: + sys.exit(exit_code) + + +class MacTool(object): + """This class performs all the Mac tooling steps. The methods can either be + executed directly, or dispatched from an argument list.""" + + def Dispatch(self, args): + """Dispatches a string command to a method.""" + if len(args) < 1: + raise Exception("Not enough arguments") + + method = "Exec%s" % self._CommandifyName(args[0]) + return getattr(self, method)(*args[1:]) + + def _CommandifyName(self, name_string): + """Transforms a tool name like copy-info-plist to CopyInfoPlist""" + return name_string.title().replace("-", "") + + def ExecCopyBundleResource(self, source, dest, convert_to_binary): + """Copies a resource file to the bundle/Resources directory, performing any + necessary compilation on each resource.""" + convert_to_binary = convert_to_binary == "True" + extension = os.path.splitext(source)[1].lower() + if os.path.isdir(source): + # Copy tree. + # TODO(thakis): This copies file attributes like mtime, while the + # single-file branch below doesn't. This should probably be changed to + # be consistent with the single-file branch. + if os.path.exists(dest): + shutil.rmtree(dest) + shutil.copytree(source, dest) + elif extension == ".xib": + return self._CopyXIBFile(source, dest) + elif extension == ".storyboard": + return self._CopyXIBFile(source, dest) + elif extension == ".strings" and not convert_to_binary: + self._CopyStringsFile(source, dest) + else: + if os.path.exists(dest): + os.unlink(dest) + shutil.copy(source, dest) + + if convert_to_binary and extension in (".plist", ".strings"): + self._ConvertToBinary(dest) + + def _CopyXIBFile(self, source, dest): + """Compiles a XIB file with ibtool into a binary plist in the bundle.""" + + # ibtool sometimes crashes with relative paths. See crbug.com/314728. + base = os.path.dirname(os.path.realpath(__file__)) + if os.path.relpath(source): + source = os.path.join(base, source) + if os.path.relpath(dest): + dest = os.path.join(base, dest) + + args = ["xcrun", "ibtool", "--errors", "--warnings", "--notices"] + + if os.environ["XCODE_VERSION_ACTUAL"] > "0700": + args.extend(["--auto-activate-custom-fonts"]) + if "IPHONEOS_DEPLOYMENT_TARGET" in os.environ: + args.extend( + [ + "--target-device", + "iphone", + "--target-device", + "ipad", + "--minimum-deployment-target", + os.environ["IPHONEOS_DEPLOYMENT_TARGET"], + ] + ) + else: + args.extend( + [ + "--target-device", + "mac", + "--minimum-deployment-target", + os.environ["MACOSX_DEPLOYMENT_TARGET"], + ] + ) + + args.extend( + ["--output-format", "human-readable-text", "--compile", dest, source] + ) + + ibtool_section_re = re.compile(r"/\*.*\*/") + ibtool_re = re.compile(r".*note:.*is clipping its content") + try: + stdout = subprocess.check_output(args) + except subprocess.CalledProcessError as e: + print(e.output) + raise + current_section_header = None + for line in stdout.splitlines(): + if ibtool_section_re.match(line): + current_section_header = line + elif not ibtool_re.match(line): + if current_section_header: + print(current_section_header) + current_section_header = None + print(line) + return 0 + + def _ConvertToBinary(self, dest): + subprocess.check_call( + ["xcrun", "plutil", "-convert", "binary1", "-o", dest, dest] + ) + + def _CopyStringsFile(self, source, dest): + """Copies a .strings file using iconv to reconvert the input into UTF-16.""" + input_code = self._DetectInputEncoding(source) or "UTF-8" + + # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call + # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints + # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing + # semicolon in dictionary. + # on invalid files. Do the same kind of validation. + import CoreFoundation + + with open(source, "rb") as in_file: + s = in_file.read() + d = CoreFoundation.CFDataCreate(None, s, len(s)) + _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) + if error: + return + + with open(dest, "wb") as fp: + fp.write(s.decode(input_code).encode("UTF-16")) + + def _DetectInputEncoding(self, file_name): + """Reads the first few bytes from file_name and tries to guess the text + encoding. Returns None as a guess if it can't detect it.""" + with open(file_name, "rb") as fp: + try: + header = fp.read(3) + except Exception: + return None + if header.startswith(b"\xFE\xFF"): + return "UTF-16" + elif header.startswith(b"\xFF\xFE"): + return "UTF-16" + elif header.startswith(b"\xEF\xBB\xBF"): + return "UTF-8" + else: + return None + + def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys): + """Copies the |source| Info.plist to the destination directory |dest|.""" + # Read the source Info.plist into memory. + with open(source, "r") as fd: + lines = fd.read() + + # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). + plist = plistlib.readPlistFromString(lines) + if keys: + plist.update(json.loads(keys[0])) + lines = plistlib.writePlistToString(plist) + + # Go through all the environment variables and replace them as variables in + # the file. + IDENT_RE = re.compile(r"[_/\s]") + for key in os.environ: + if key.startswith("_"): + continue + evar = "${%s}" % key + evalue = os.environ[key] + lines = lines.replace(lines, evar, evalue) + + # Xcode supports various suffices on environment variables, which are + # all undocumented. :rfc1034identifier is used in the standard project + # template these days, and :identifier was used earlier. They are used to + # convert non-url characters into things that look like valid urls -- + # except that the replacement character for :identifier, '_' isn't valid + # in a URL either -- oops, hence :rfc1034identifier was born. + evar = "${%s:identifier}" % key + evalue = IDENT_RE.sub("_", os.environ[key]) + lines = lines.replace(lines, evar, evalue) + + evar = "${%s:rfc1034identifier}" % key + evalue = IDENT_RE.sub("-", os.environ[key]) + lines = lines.replace(lines, evar, evalue) + + # Remove any keys with values that haven't been replaced. + lines = lines.splitlines() + for i in range(len(lines)): + if lines[i].strip().startswith("${"): + lines[i] = None + lines[i - 1] = None + lines = "\n".join(line for line in lines if line is not None) + + # Write out the file with variables replaced. + with open(dest, "w") as fd: + fd.write(lines) + + # Now write out PkgInfo file now that the Info.plist file has been + # "compiled". + self._WritePkgInfo(dest) + + if convert_to_binary == "True": + self._ConvertToBinary(dest) + + def _WritePkgInfo(self, info_plist): + """This writes the PkgInfo file from the data stored in Info.plist.""" + plist = plistlib.readPlist(info_plist) + if not plist: + return + + # Only create PkgInfo for executable types. + package_type = plist["CFBundlePackageType"] + if package_type != "APPL": + return + + # The format of PkgInfo is eight characters, representing the bundle type + # and bundle signature, each four characters. If that is missing, four + # '?' characters are used instead. + signature_code = plist.get("CFBundleSignature", "????") + if len(signature_code) != 4: # Wrong length resets everything, too. + signature_code = "?" * 4 + + dest = os.path.join(os.path.dirname(info_plist), "PkgInfo") + with open(dest, "w") as fp: + fp.write("%s%s" % (package_type, signature_code)) + + def ExecFlock(self, lockfile, *cmd_list): + """Emulates the most basic behavior of Linux's flock(1).""" + # Rely on exception handling to report errors. + fd = os.open(lockfile, os.O_RDONLY | os.O_NOCTTY | os.O_CREAT, 0o666) + fcntl.flock(fd, fcntl.LOCK_EX) + return subprocess.call(cmd_list) + + def ExecFilterLibtool(self, *cmd_list): + """Calls libtool and filters out '/path/to/libtool: file: foo.o has no + symbols'.""" + libtool_re = re.compile( + r"^.*libtool: (?:for architecture: \S* )?" r"file: .* has no symbols$" + ) + libtool_re5 = re.compile( + r"^.*libtool: warning for library: " + + r".* the table of contents is empty " + + r"\(no object file members in the library define global symbols\)$" + ) + env = os.environ.copy() + # Ref: + # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c + # The problem with this flag is that it resets the file mtime on the file to + # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone. + env["ZERO_AR_DATE"] = "1" + libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env) + _, err = libtoolout.communicate() + if PY3: + err = err.decode("utf-8") + for line in err.splitlines(): + if not libtool_re.match(line) and not libtool_re5.match(line): + print(line, file=sys.stderr) + # Unconditionally touch the output .a file on the command line if present + # and the command succeeded. A bit hacky. + if not libtoolout.returncode: + for i in range(len(cmd_list) - 1): + if cmd_list[i] == "-o" and cmd_list[i + 1].endswith(".a"): + os.utime(cmd_list[i + 1], None) + break + return libtoolout.returncode + + def ExecPackageIosFramework(self, framework): + # Find the name of the binary based on the part before the ".framework". + binary = os.path.basename(framework).split(".")[0] + module_path = os.path.join(framework, "Modules") + if not os.path.exists(module_path): + os.mkdir(module_path) + module_template = ( + "framework module %s {\n" + ' umbrella header "%s.h"\n' + "\n" + " export *\n" + " module * { export * }\n" + "}\n" % (binary, binary) + ) + + with open(os.path.join(module_path, "module.modulemap"), "w") as module_file: + module_file.write(module_template) + + def ExecPackageFramework(self, framework, version): + """Takes a path to Something.framework and the Current version of that and + sets up all the symlinks.""" + # Find the name of the binary based on the part before the ".framework". + binary = os.path.basename(framework).split(".")[0] + + CURRENT = "Current" + RESOURCES = "Resources" + VERSIONS = "Versions" + + if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): + # Binary-less frameworks don't seem to contain symlinks (see e.g. + # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). + return + + # Move into the framework directory to set the symlinks correctly. + pwd = os.getcwd() + os.chdir(framework) + + # Set up the Current version. + self._Relink(version, os.path.join(VERSIONS, CURRENT)) + + # Set up the root symlinks. + self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) + self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) + + # Back to where we were before! + os.chdir(pwd) + + def _Relink(self, dest, link): + """Creates a symlink to |dest| named |link|. If |link| already exists, + it is overwritten.""" + if os.path.lexists(link): + os.remove(link) + os.symlink(dest, link) + + def ExecCompileIosFrameworkHeaderMap(self, out, framework, *all_headers): + framework_name = os.path.basename(framework).split(".")[0] + all_headers = [os.path.abspath(header) for header in all_headers] + filelist = {} + for header in all_headers: + filename = os.path.basename(header) + filelist[filename] = header + filelist[os.path.join(framework_name, filename)] = header + WriteHmap(out, filelist) + + def ExecCopyIosFrameworkHeaders(self, framework, *copy_headers): + header_path = os.path.join(framework, "Headers") + if not os.path.exists(header_path): + os.makedirs(header_path) + for header in copy_headers: + shutil.copy(header, os.path.join(header_path, os.path.basename(header))) + + def ExecCompileXcassets(self, keys, *inputs): + """Compiles multiple .xcassets files into a single .car file. + + This invokes 'actool' to compile all the inputs .xcassets files. The + |keys| arguments is a json-encoded dictionary of extra arguments to + pass to 'actool' when the asset catalogs contains an application icon + or a launch image. + + Note that 'actool' does not create the Assets.car file if the asset + catalogs does not contains imageset. + """ + command_line = [ + "xcrun", + "actool", + "--output-format", + "human-readable-text", + "--compress-pngs", + "--notices", + "--warnings", + "--errors", + ] + is_iphone_target = "IPHONEOS_DEPLOYMENT_TARGET" in os.environ + if is_iphone_target: + platform = os.environ["CONFIGURATION"].split("-")[-1] + if platform not in ("iphoneos", "iphonesimulator"): + platform = "iphonesimulator" + command_line.extend( + [ + "--platform", + platform, + "--target-device", + "iphone", + "--target-device", + "ipad", + "--minimum-deployment-target", + os.environ["IPHONEOS_DEPLOYMENT_TARGET"], + "--compile", + os.path.abspath(os.environ["CONTENTS_FOLDER_PATH"]), + ] + ) + else: + command_line.extend( + [ + "--platform", + "macosx", + "--target-device", + "mac", + "--minimum-deployment-target", + os.environ["MACOSX_DEPLOYMENT_TARGET"], + "--compile", + os.path.abspath(os.environ["UNLOCALIZED_RESOURCES_FOLDER_PATH"]), + ] + ) + if keys: + keys = json.loads(keys) + for key, value in keys.items(): + arg_name = "--" + key + if isinstance(value, bool): + if value: + command_line.append(arg_name) + elif isinstance(value, list): + for v in value: + command_line.append(arg_name) + command_line.append(str(v)) + else: + command_line.append(arg_name) + command_line.append(str(value)) + # Note: actool crashes if inputs path are relative, so use os.path.abspath + # to get absolute path name for inputs. + command_line.extend(map(os.path.abspath, inputs)) + subprocess.check_call(command_line) + + def ExecMergeInfoPlist(self, output, *inputs): + """Merge multiple .plist files into a single .plist file.""" + merged_plist = {} + for path in inputs: + plist = self._LoadPlistMaybeBinary(path) + self._MergePlist(merged_plist, plist) + plistlib.writePlist(merged_plist, output) + + def ExecCodeSignBundle(self, key, entitlements, provisioning, path, preserve): + """Code sign a bundle. + + This function tries to code sign an iOS bundle, following the same + algorithm as Xcode: + 1. pick the provisioning profile that best match the bundle identifier, + and copy it into the bundle as embedded.mobileprovision, + 2. copy Entitlements.plist from user or SDK next to the bundle, + 3. code sign the bundle. + """ + substitutions, overrides = self._InstallProvisioningProfile( + provisioning, self._GetCFBundleIdentifier() + ) + entitlements_path = self._InstallEntitlements( + entitlements, substitutions, overrides + ) + + args = ["codesign", "--force", "--sign", key] + if preserve == "True": + args.extend(["--deep", "--preserve-metadata=identifier,entitlements"]) + else: + args.extend(["--entitlements", entitlements_path]) + args.extend(["--timestamp=none", path]) + subprocess.check_call(args) + + def _InstallProvisioningProfile(self, profile, bundle_identifier): + """Installs embedded.mobileprovision into the bundle. + + Args: + profile: string, optional, short name of the .mobileprovision file + to use, if empty or the file is missing, the best file installed + will be used + bundle_identifier: string, value of CFBundleIdentifier from Info.plist + + Returns: + A tuple containing two dictionary: variables substitutions and values + to overrides when generating the entitlements file. + """ + source_path, provisioning_data, team_id = self._FindProvisioningProfile( + profile, bundle_identifier + ) + target_path = os.path.join( + os.environ["BUILT_PRODUCTS_DIR"], + os.environ["CONTENTS_FOLDER_PATH"], + "embedded.mobileprovision", + ) + shutil.copy2(source_path, target_path) + substitutions = self._GetSubstitutions(bundle_identifier, team_id + ".") + return substitutions, provisioning_data["Entitlements"] + + def _FindProvisioningProfile(self, profile, bundle_identifier): + """Finds the .mobileprovision file to use for signing the bundle. + + Checks all the installed provisioning profiles (or if the user specified + the PROVISIONING_PROFILE variable, only consult it) and select the most + specific that correspond to the bundle identifier. + + Args: + profile: string, optional, short name of the .mobileprovision file + to use, if empty or the file is missing, the best file installed + will be used + bundle_identifier: string, value of CFBundleIdentifier from Info.plist + + Returns: + A tuple of the path to the selected provisioning profile, the data of + the embedded plist in the provisioning profile and the team identifier + to use for code signing. + + Raises: + SystemExit: if no .mobileprovision can be used to sign the bundle. + """ + profiles_dir = os.path.join( + os.environ["HOME"], "Library", "MobileDevice", "Provisioning Profiles" + ) + if not os.path.isdir(profiles_dir): + print( + "cannot find mobile provisioning for %s" % (bundle_identifier), + file=sys.stderr, + ) + sys.exit(1) + provisioning_profiles = None + if profile: + profile_path = os.path.join(profiles_dir, profile + ".mobileprovision") + if os.path.exists(profile_path): + provisioning_profiles = [profile_path] + if not provisioning_profiles: + provisioning_profiles = glob.glob( + os.path.join(profiles_dir, "*.mobileprovision") + ) + valid_provisioning_profiles = {} + for profile_path in provisioning_profiles: + profile_data = self._LoadProvisioningProfile(profile_path) + app_id_pattern = profile_data.get("Entitlements", {}).get( + "application-identifier", "" + ) + for team_identifier in profile_data.get("TeamIdentifier", []): + app_id = "%s.%s" % (team_identifier, bundle_identifier) + if fnmatch.fnmatch(app_id, app_id_pattern): + valid_provisioning_profiles[app_id_pattern] = ( + profile_path, + profile_data, + team_identifier, + ) + if not valid_provisioning_profiles: + print( + "cannot find mobile provisioning for %s" % (bundle_identifier), + file=sys.stderr, + ) + sys.exit(1) + # If the user has multiple provisioning profiles installed that can be + # used for ${bundle_identifier}, pick the most specific one (ie. the + # provisioning profile whose pattern is the longest). + selected_key = max(valid_provisioning_profiles, key=lambda v: len(v)) + return valid_provisioning_profiles[selected_key] + + def _LoadProvisioningProfile(self, profile_path): + """Extracts the plist embedded in a provisioning profile. + + Args: + profile_path: string, path to the .mobileprovision file + + Returns: + Content of the plist embedded in the provisioning profile as a dictionary. + """ + with tempfile.NamedTemporaryFile() as temp: + subprocess.check_call( + ["security", "cms", "-D", "-i", profile_path, "-o", temp.name] + ) + return self._LoadPlistMaybeBinary(temp.name) + + def _MergePlist(self, merged_plist, plist): + """Merge |plist| into |merged_plist|.""" + for key, value in plist.items(): + if isinstance(value, dict): + merged_value = merged_plist.get(key, {}) + if isinstance(merged_value, dict): + self._MergePlist(merged_value, value) + merged_plist[key] = merged_value + else: + merged_plist[key] = value + else: + merged_plist[key] = value + + def _LoadPlistMaybeBinary(self, plist_path): + """Loads into a memory a plist possibly encoded in binary format. + + This is a wrapper around plistlib.readPlist that tries to convert the + plist to the XML format if it can't be parsed (assuming that it is in + the binary format). + + Args: + plist_path: string, path to a plist file, in XML or binary format + + Returns: + Content of the plist as a dictionary. + """ + try: + # First, try to read the file using plistlib that only supports XML, + # and if an exception is raised, convert a temporary copy to XML and + # load that copy. + return plistlib.readPlist(plist_path) + except Exception: + pass + with tempfile.NamedTemporaryFile() as temp: + shutil.copy2(plist_path, temp.name) + subprocess.check_call(["plutil", "-convert", "xml1", temp.name]) + return plistlib.readPlist(temp.name) + + def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix): + """Constructs a dictionary of variable substitutions for Entitlements.plist. + + Args: + bundle_identifier: string, value of CFBundleIdentifier from Info.plist + app_identifier_prefix: string, value for AppIdentifierPrefix + + Returns: + Dictionary of substitutions to apply when generating Entitlements.plist. + """ + return { + "CFBundleIdentifier": bundle_identifier, + "AppIdentifierPrefix": app_identifier_prefix, + } + + def _GetCFBundleIdentifier(self): + """Extracts CFBundleIdentifier value from Info.plist in the bundle. + + Returns: + Value of CFBundleIdentifier in the Info.plist located in the bundle. + """ + info_plist_path = os.path.join( + os.environ["TARGET_BUILD_DIR"], os.environ["INFOPLIST_PATH"] + ) + info_plist_data = self._LoadPlistMaybeBinary(info_plist_path) + return info_plist_data["CFBundleIdentifier"] + + def _InstallEntitlements(self, entitlements, substitutions, overrides): + """Generates and install the ${BundleName}.xcent entitlements file. + + Expands variables "$(variable)" pattern in the source entitlements file, + add extra entitlements defined in the .mobileprovision file and the copy + the generated plist to "${BundlePath}.xcent". + + Args: + entitlements: string, optional, path to the Entitlements.plist template + to use, defaults to "${SDKROOT}/Entitlements.plist" + substitutions: dictionary, variable substitutions + overrides: dictionary, values to add to the entitlements + + Returns: + Path to the generated entitlements file. + """ + source_path = entitlements + target_path = os.path.join( + os.environ["BUILT_PRODUCTS_DIR"], os.environ["PRODUCT_NAME"] + ".xcent" + ) + if not source_path: + source_path = os.path.join(os.environ["SDKROOT"], "Entitlements.plist") + shutil.copy2(source_path, target_path) + data = self._LoadPlistMaybeBinary(target_path) + data = self._ExpandVariables(data, substitutions) + if overrides: + for key in overrides: + if key not in data: + data[key] = overrides[key] + plistlib.writePlist(data, target_path) + return target_path + + def _ExpandVariables(self, data, substitutions): + """Expands variables "$(variable)" in data. + + Args: + data: object, can be either string, list or dictionary + substitutions: dictionary, variable substitutions to perform + + Returns: + Copy of data where each references to "$(variable)" has been replaced + by the corresponding value found in substitutions, or left intact if + the key was not found. + """ + if isinstance(data, str): + for key, value in substitutions.items(): + data = data.replace("$(%s)" % key, value) + return data + if isinstance(data, list): + return [self._ExpandVariables(v, substitutions) for v in data] + if isinstance(data, dict): + return {k: self._ExpandVariables(data[k], substitutions) for k in data} + return data + + +def NextGreaterPowerOf2(x): + return 2 ** (x).bit_length() + + +def WriteHmap(output_name, filelist): + """Generates a header map based on |filelist|. + + Per Mark Mentovai: + A header map is structured essentially as a hash table, keyed by names used + in #includes, and providing pathnames to the actual files. + + The implementation below and the comment above comes from inspecting: + http://www.opensource.apple.com/source/distcc/distcc-2503/distcc_dist/include_server/headermap.py?txt + while also looking at the implementation in clang in: + https://llvm.org/svn/llvm-project/cfe/trunk/lib/Lex/HeaderMap.cpp + """ + magic = 1751998832 + version = 1 + _reserved = 0 + count = len(filelist) + capacity = NextGreaterPowerOf2(count) + strings_offset = 24 + (12 * capacity) + max_value_length = max(len(value) for value in filelist.values()) + + out = open(output_name, "wb") + out.write( + struct.pack( + " { + for (var i = 0; i < length; i++) { + output[offset + i] = source[i] ^ mask[i & 3]; + } +}; + +/** + * Unmasks a buffer using the given mask. + * + * @param {Buffer} buffer The buffer to unmask + * @param {Buffer} mask The mask to use + * @public + */ +const unmask = (buffer, mask) => { + // Required until https://github.com/nodejs/node/issues/9006 is resolved. + const length = buffer.length; + for (var i = 0; i < length; i++) { + buffer[i] ^= mask[i & 3]; + } +}; + +module.exports = { mask, unmask }; diff --git a/tests/node_modules/bufferutil/index.js b/tests/node_modules/bufferutil/index.js new file mode 100644 index 0000000..8c30561 --- /dev/null +++ b/tests/node_modules/bufferutil/index.js @@ -0,0 +1,7 @@ +'use strict'; + +try { + module.exports = require('node-gyp-build')(__dirname); +} catch (e) { + module.exports = require('./fallback'); +} diff --git a/tests/node_modules/bufferutil/package.json b/tests/node_modules/bufferutil/package.json new file mode 100644 index 0000000..df6b145 --- /dev/null +++ b/tests/node_modules/bufferutil/package.json @@ -0,0 +1,34 @@ +{ + "name": "bufferutil", + "version": "4.0.3", + "description": "WebSocket buffer utils", + "main": "index.js", + "scripts": { + "install": "node-gyp-build", + "prebuild": "prebuildify --napi --strip", + "prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 --napi --strip", + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/websockets/bufferutil" + }, + "keywords": [ + "bufferutil" + ], + "author": "Einar Otto Stangvik (http://2x.io)", + "license": "MIT", + "bugs": { + "url": "https://github.com/websockets/bufferutil/issues" + }, + "homepage": "https://github.com/websockets/bufferutil", + "dependencies": { + "node-gyp-build": "^4.2.0" + }, + "devDependencies": { + "mocha": "^8.0.1", + "node-gyp": "^7.1.2", + "prebuildify": "^4.0.0", + "prebuildify-cross": "^4.0.0" + } +} diff --git a/tests/node_modules/bufferutil/prebuilds/darwin-x64/node.napi.node b/tests/node_modules/bufferutil/prebuilds/darwin-x64/node.napi.node new file mode 100755 index 0000000000000000000000000000000000000000..de044fee00d8e4d40827c63d7031bde9a6af6e1e GIT binary patch literal 9076 zcmeHNZ){W76~B%{5-7%ju{Ik}!deilZ4zgMQd(Hd@OC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YNkATt&qE~Dhj)7{p(J5|y@yB#c z^Kzp(lm0{^?Lg8%PRt`0Bob~kuVTHIi#x|n2gt&zTO)|83S{I(3cCjb;7t-PlCYcL z0fL{F@I4a#KuE5uAS0&;epJH$5~S{&Ag;GTMqa^?UWs9TeNaAdsh8oaWqK{3{><7Y z2${9t5#w$#J}JgMVtiVR-xcFNjEr?Yh+(>xIQpqPy`H#s;_fBxS>os|)%jE6=vQjz ztHhzRMr##?=55Zb9S802B<1u+nM|gWrcD0@oIe;lz^baMW6`$iR->aM6gBj4S5+H} z=|SCyRc_r{83`T=YuyJ}Aaan58}L2B1ZPOa{4_YFpeYN~vMGv)(RcDjQ0n$KFY$QS z;5V!jzjujaMKw<5n8F`hG{+iNlpv77gtW3*WZl~DFS)q1mD#bR{~qY9kYxL?na(L8&iPxHC)3$vHojBJvml}cF#?~HkLJl{ zo;;8zpU#utlJZ>AVKb^IzZJv7Ca{7O^Fkza=ttRrVseGd% zv+63RK1D_4Xk^9SxxAz{zp&=Dc1g`^a*9c+^UFwT?@&OuEtqJqJ-Vg3x^9zaW8Fq< GJN_49k|nVK literal 0 HcmV?d00001 diff --git a/tests/node_modules/bufferutil/prebuilds/linux-arm/node.napi.armv6.node b/tests/node_modules/bufferutil/prebuilds/linux-arm/node.napi.armv6.node new file mode 100755 index 0000000000000000000000000000000000000000..7100c6d5505f58ae923a3e4bc2dc9a4e21adf6df GIT binary patch literal 5932 zcma)AVQgE~6~51Q5;w^@lLl&%&^<~g1(CQftycvI;4Xo-*kxWZQ`kD$j_ouC$F^(- z(W%lbT0vk93D6%*DvJf()=B&b8q@ltoxHVU2qqRtw_pA7{M;v}z@%tH6M{kZeb4U| zHwzm#`f~0)=ey_Lcka3Oz3U&}8@NxBBw-c1=oM_8Y8Ju^IkHIzn?p2tg)Ew2yHU6e zyTzvrxaw$PqbLl!p__vqn1jO;09+b&8^l5MIS3o!gpHuxVd5gBg>9%4mhHQGA&%yM z750Z)gVzaZ2lhPhkhsDB)&oDijR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+EaFd43Pi@7;OSxV4pq-u+YIchv#Smn-q?cRYUQ%ink2rg8oruuSunn$j~D6@LFu z_or0&Ui7aQ^D*Mj>-Okgoyv}4Md<}Dm34U9qr&grcWHfoH(jORxp(ItkCbRLk<~cg z-}AeDdg!Avpam?i(G7Dy=~0ggza!`N@Yo>xFF!^D$Ah!vwYoU3`KR>2aJw&Y9+!0b zKXBsj=7n9^qXY1OreDm{_}12}t*IBno9Ip?btv?gA0%2Ke5#41Rs4{Xo-0#p7!1hq>#Y|r^h?*qs;+w(rdl=l^=$inNAdHSAD zInMT+*G#=yk^9ejOas7a&tRVS4W`sTD%5{!oBK~PD%)`I*ofzSiYf0?+&v|-!%S|w&(fh{f=p~ZkI{n z`Wq^+FZ@5!8aC9F){3)y2@Lt<_RIADvY5W$R7Slpe&2+Q?h$x>@pYg7r&JiPLi_K- z)^OPKeL;?145Ae37xIrohx*U$pTE`v4)+iLp?wy*w07B^uY3GIvPm6qjvKen3{{(J;HMal& literal 0 HcmV?d00001 diff --git a/tests/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node b/tests/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node new file mode 100644 index 0000000000000000000000000000000000000000..c215b86fead5f59f721897d9e1bcfc38e3c16f96 GIT binary patch literal 108032 zcmeFaeSB2awLg4jGD#+6k{KY8AfQ15M1wXkpos&TAQM6*I3Y4a#01+y97k&@oC9ci z2|XFj$?jCW)&A_gwv|h5X=`t>RSdr1B*7#g<<%+{TT-REm;=ezcqnG9%q zdq2vxmeEsK6P`Ig|FYYSJe`Nkbbn@aBq)&C{Fm)!ZaAk}qY z&wO4G%htflz%U5yrnzd`bh9rR#;6~*8 zw=c@K>h5nKBjHG7ruu=?)PEI{G%xl0f5VcbZY;7{>tV?4S(r!N>97QLq4YuY=9)MTW@yB1cH_8FJBdzww5; z*Cn#&rDT8D%pQ`EwSY2~reqwKk};T)(Lot!rDVJ~CF2c=2E1lAVB$z-hp2v1O6DoH?Y-IwbnXND-n|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Z7mZ@8*eUjkgW{;@D+NlyQn(Z?#Y;&tCQG&$WJ-rD8IU19vLi@l zM9GRI8IdI$3^JiZ77WM$AJHEq@}oq3l8Da|?FNzFA<73txR2-#64_CrI!Q!ltNE%? zZB;wfUUg6%ReeUl2pVA{YQ&ACkv6hM-jH{X7#^ifuJ*}Og&bAM&j`7hATKlIq((lr z$;Cc-sE~sy`4=Jg669TmoYTm+Ho4X(&lGY@CBGu%R)W0BRC86W+N`##-DqlgF=9r-NEsO;XJ|×LlZww8k=C7%>P%To6)e^N-EmOUvdZM1HXX?4SR&UnZ^=`diAJ!GqZ>na9=#CNDDWW<@L^p}%uGu$-regUm z)e2b=D`q9El$Eh^mS#1rw$-)z*3eRHzpdIKJ7UM|gq^Z8cFxx9rrox?cHbV_isN@w zC*(w&n3Hf)PR7YOn$vXJPS@!>Lq}=&8)_reh%{o2L?hM6G;$5C(QLFE-A2DLY$!Q? zS3o`~nqO13kQUKmT0%={87-%2T2pIlU9GPTHAVO9svgoKdQ4B~DLtd-$iJrE*1P9d zCWTc=EreK+Vys4~LWZ?jVkFTVc2 Hj=+BcrxZ-= literal 0 HcmV?d00001 diff --git a/tests/node_modules/bufferutil/src/bufferutil.c b/tests/node_modules/bufferutil/src/bufferutil.c new file mode 100644 index 0000000..b89f8dd --- /dev/null +++ b/tests/node_modules/bufferutil/src/bufferutil.c @@ -0,0 +1,171 @@ +#define NAPI_VERSION 1 +#include +#include + +napi_value Mask(napi_env env, napi_callback_info info) { + napi_status status; + size_t argc = 5; + napi_value argv[5]; + + status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); + assert(status == napi_ok); + + uint8_t *source; + uint8_t *mask; + uint8_t *destination; + uint32_t offset; + uint32_t length; + + status = napi_get_buffer_info(env, argv[0], (void **)&source, NULL); + assert(status == napi_ok); + + status = napi_get_buffer_info(env, argv[1], (void **)&mask, NULL); + assert(status == napi_ok); + + status = napi_get_buffer_info(env, argv[2], (void **)&destination, NULL); + assert(status == napi_ok); + + status = napi_get_value_uint32(env, argv[3], &offset); + assert(status == napi_ok); + + status = napi_get_value_uint32(env, argv[4], &length); + assert(status == napi_ok); + + destination += offset; + uint32_t index = 0; + + // + // Alignment preamble. + // + while (index < length && ((size_t)source % 8)) { + *destination++ = *source++ ^ mask[index % 4]; + index++; + } + + length -= index; + if (!length) + return NULL; + + // + // Realign mask and convert to 64 bit. + // + uint8_t maskAlignedArray[8]; + + for (uint8_t i = 0; i < 8; i++, index++) { + maskAlignedArray[i] = mask[index % 4]; + } + + // + // Apply 64 bit mask in 8 byte chunks. + // + uint32_t loop = length / 8; + uint64_t *pMask8 = (uint64_t *)maskAlignedArray; + + while (loop--) { + uint64_t *pFrom8 = (uint64_t *)source; + uint64_t *pTo8 = (uint64_t *)destination; + *pTo8 = *pFrom8 ^ *pMask8; + source += 8; + destination += 8; + } + + // + // Apply mask to remaining data. + // + uint8_t *pmaskAlignedArray = maskAlignedArray; + + length %= 8; + while (length--) { + *destination++ = *source++ ^ *pmaskAlignedArray++; + } + + return NULL; +} + +napi_value Unmask(napi_env env, napi_callback_info info) { + napi_status status; + size_t argc = 2; + napi_value argv[2]; + + status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); + assert(status == napi_ok); + + uint8_t *source; + size_t length; + uint8_t *mask; + + status = napi_get_buffer_info(env, argv[0], (void **)&source, &length); + assert(status == napi_ok); + + status = napi_get_buffer_info(env, argv[1], (void **)&mask, NULL); + assert(status == napi_ok); + + uint32_t index = 0; + + // + // Alignment preamble. + // + while (index < length && ((size_t)source % 8)) { + *source++ ^= mask[index % 4]; + index++; + } + + length -= index; + if (!length) + return NULL; + + // + // Realign mask and convert to 64 bit. + // + uint8_t maskAlignedArray[8]; + + for (uint8_t i = 0; i < 8; i++, index++) { + maskAlignedArray[i] = mask[index % 4]; + } + + // + // Apply 64 bit mask in 8 byte chunks. + // + uint32_t loop = length / 8; + uint64_t *pMask8 = (uint64_t *)maskAlignedArray; + + while (loop--) { + uint64_t *pSource8 = (uint64_t *)source; + *pSource8 ^= *pMask8; + source += 8; + } + + // + // Apply mask to remaining data. + // + uint8_t *pmaskAlignedArray = maskAlignedArray; + + length %= 8; + while (length--) { + *source++ ^= *pmaskAlignedArray++; + } + + return NULL; +} + +napi_value Init(napi_env env, napi_value exports) { + napi_status status; + napi_value mask; + napi_value unmask; + + status = napi_create_function(env, NULL, 0, Mask, NULL, &mask); + assert(status == napi_ok); + + status = napi_create_function(env, NULL, 0, Unmask, NULL, &unmask); + assert(status == napi_ok); + + status = napi_set_named_property(env, exports, "mask", mask); + assert(status == napi_ok); + + status = napi_set_named_property(env, exports, "unmask", unmask); + assert(status == napi_ok); + + return exports; +} + +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/tests/node_modules/camelcase/index.d.ts b/tests/node_modules/camelcase/index.d.ts new file mode 100644 index 0000000..58f2069 --- /dev/null +++ b/tests/node_modules/camelcase/index.d.ts @@ -0,0 +1,63 @@ +declare namespace camelcase { + interface Options { + /** + Uppercase the first character: `foo-bar` → `FooBar`. + + @default false + */ + readonly pascalCase?: boolean; + } +} + +declare const camelcase: { + /** + Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. + + @param input - String to convert to camel case. + + @example + ``` + import camelCase = require('camelcase'); + + camelCase('foo-bar'); + //=> 'fooBar' + + camelCase('foo_bar'); + //=> 'fooBar' + + camelCase('Foo-Bar'); + //=> 'fooBar' + + camelCase('Foo-Bar', {pascalCase: true}); + //=> 'FooBar' + + camelCase('--foo.bar', {pascalCase: false}); + //=> 'fooBar' + + camelCase('foo bar'); + //=> 'fooBar' + + console.log(process.argv[3]); + //=> '--foo-bar' + camelCase(process.argv[3]); + //=> 'fooBar' + + camelCase(['foo', 'bar']); + //=> 'fooBar' + + camelCase(['__foo__', '--bar'], {pascalCase: true}); + //=> 'FooBar' + ``` + */ + (input: string | ReadonlyArray, options?: camelcase.Options): string; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function camelcase( + // input: string | ReadonlyArray, + // options?: camelcase.Options + // ): string; + // export = camelcase; + default: typeof camelcase; +}; + +export = camelcase; diff --git a/tests/node_modules/camelcase/index.js b/tests/node_modules/camelcase/index.js new file mode 100644 index 0000000..579f99b --- /dev/null +++ b/tests/node_modules/camelcase/index.js @@ -0,0 +1,76 @@ +'use strict'; + +const preserveCamelCase = string => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < string.length; i++) { + const character = string[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + '-' + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + '-' + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + + return string; +}; + +const camelCase = (input, options) => { + if (!(typeof input === 'string' || Array.isArray(input))) { + throw new TypeError('Expected the input to be `string | string[]`'); + } + + options = Object.assign({ + pascalCase: false + }, options); + + const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + + if (Array.isArray(input)) { + input = input.map(x => x.trim()) + .filter(x => x.length) + .join('-'); + } else { + input = input.trim(); + } + + if (input.length === 0) { + return ''; + } + + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + + const hasUpperCase = input !== input.toLowerCase(); + + if (hasUpperCase) { + input = preserveCamelCase(input); + } + + input = input + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) + .replace(/\d+(\w|$)/g, m => m.toUpperCase()); + + return postProcess(input); +}; + +module.exports = camelCase; +// TODO: Remove this for the next major release +module.exports.default = camelCase; diff --git a/tests/node_modules/camelcase/license b/tests/node_modules/camelcase/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/tests/node_modules/camelcase/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/camelcase/package.json b/tests/node_modules/camelcase/package.json new file mode 100644 index 0000000..fbdbaaa --- /dev/null +++ b/tests/node_modules/camelcase/package.json @@ -0,0 +1,43 @@ +{ + "name": "camelcase", + "version": "5.3.1", + "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", + "license": "MIT", + "repository": "sindresorhus/camelcase", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert", + "pascalcase", + "pascal-case" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/tests/node_modules/camelcase/readme.md b/tests/node_modules/camelcase/readme.md new file mode 100644 index 0000000..fde2726 --- /dev/null +++ b/tests/node_modules/camelcase/readme.md @@ -0,0 +1,99 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` + +--- + +

+ + Get professional support for 'camelcase' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- + +## Install + +``` +$ npm install camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('Foo-Bar', {pascalCase: true}); +//=> 'FooBar' + +camelCase('--foo.bar', {pascalCase: false}); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase(['foo', 'bar']); +//=> 'fooBar' + +camelCase(['__foo__', '--bar'], {pascalCase: true}); +//=> 'FooBar' +``` + + +## API + +### camelCase(input, [options]) + +#### input + +Type: `string` `string[]` + +String to convert to camel case. + +#### options + +Type: `Object` + +##### pascalCase + +Type: `boolean`
+Default: `false` + +Uppercase the first character: `foo-bar` → `FooBar` + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase +- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string +- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/tests/node_modules/chalk/index.d.ts b/tests/node_modules/chalk/index.d.ts new file mode 100644 index 0000000..9cd88f3 --- /dev/null +++ b/tests/node_modules/chalk/index.d.ts @@ -0,0 +1,415 @@ +/** +Basic foreground colors. + +[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) +*/ +declare type ForegroundColor = + | 'black' + | 'red' + | 'green' + | 'yellow' + | 'blue' + | 'magenta' + | 'cyan' + | 'white' + | 'gray' + | 'grey' + | 'blackBright' + | 'redBright' + | 'greenBright' + | 'yellowBright' + | 'blueBright' + | 'magentaBright' + | 'cyanBright' + | 'whiteBright'; + +/** +Basic background colors. + +[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) +*/ +declare type BackgroundColor = + | 'bgBlack' + | 'bgRed' + | 'bgGreen' + | 'bgYellow' + | 'bgBlue' + | 'bgMagenta' + | 'bgCyan' + | 'bgWhite' + | 'bgGray' + | 'bgGrey' + | 'bgBlackBright' + | 'bgRedBright' + | 'bgGreenBright' + | 'bgYellowBright' + | 'bgBlueBright' + | 'bgMagentaBright' + | 'bgCyanBright' + | 'bgWhiteBright'; + +/** +Basic colors. + +[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) +*/ +declare type Color = ForegroundColor | BackgroundColor; + +declare type Modifiers = + | 'reset' + | 'bold' + | 'dim' + | 'italic' + | 'underline' + | 'inverse' + | 'hidden' + | 'strikethrough' + | 'visible'; + +declare namespace chalk { + /** + Levels: + - `0` - All colors disabled. + - `1` - Basic 16 colors support. + - `2` - ANSI 256 colors support. + - `3` - Truecolor 16 million colors support. + */ + type Level = 0 | 1 | 2 | 3; + + interface Options { + /** + Specify the color support for Chalk. + + By default, color support is automatically detected based on the environment. + + Levels: + - `0` - All colors disabled. + - `1` - Basic 16 colors support. + - `2` - ANSI 256 colors support. + - `3` - Truecolor 16 million colors support. + */ + level?: Level; + } + + /** + Return a new Chalk instance. + */ + type Instance = new (options?: Options) => Chalk; + + /** + Detect whether the terminal supports color. + */ + interface ColorSupport { + /** + The color level used by Chalk. + */ + level: Level; + + /** + Return whether Chalk supports basic 16 colors. + */ + hasBasic: boolean; + + /** + Return whether Chalk supports ANSI 256 colors. + */ + has256: boolean; + + /** + Return whether Chalk supports Truecolor 16 million colors. + */ + has16m: boolean; + } + + interface ChalkFunction { + /** + Use a template string. + + @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341)) + + @example + ``` + import chalk = require('chalk'); + + log(chalk` + CPU: {red ${cpu.totalPercent}%} + RAM: {green ${ram.used / ram.total * 100}%} + DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} + `); + ``` + + @example + ``` + import chalk = require('chalk'); + + log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`) + ``` + */ + (text: TemplateStringsArray, ...placeholders: unknown[]): string; + + (...text: unknown[]): string; + } + + interface Chalk extends ChalkFunction { + /** + Return a new Chalk instance. + */ + Instance: Instance; + + /** + The color support for Chalk. + + By default, color support is automatically detected based on the environment. + + Levels: + - `0` - All colors disabled. + - `1` - Basic 16 colors support. + - `2` - ANSI 256 colors support. + - `3` - Truecolor 16 million colors support. + */ + level: Level; + + /** + Use HEX value to set text color. + + @param color - Hexadecimal value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.hex('#DEADED'); + ``` + */ + hex(color: string): Chalk; + + /** + Use keyword color value to set text color. + + @param color - Keyword value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.keyword('orange'); + ``` + */ + keyword(color: string): Chalk; + + /** + Use RGB values to set text color. + */ + rgb(red: number, green: number, blue: number): Chalk; + + /** + Use HSL values to set text color. + */ + hsl(hue: number, saturation: number, lightness: number): Chalk; + + /** + Use HSV values to set text color. + */ + hsv(hue: number, saturation: number, value: number): Chalk; + + /** + Use HWB values to set text color. + */ + hwb(hue: number, whiteness: number, blackness: number): Chalk; + + /** + Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color. + + 30 <= code && code < 38 || 90 <= code && code < 98 + For example, 31 for red, 91 for redBright. + */ + ansi(code: number): Chalk; + + /** + Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + */ + ansi256(index: number): Chalk; + + /** + Use HEX value to set background color. + + @param color - Hexadecimal value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.bgHex('#DEADED'); + ``` + */ + bgHex(color: string): Chalk; + + /** + Use keyword color value to set background color. + + @param color - Keyword value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.bgKeyword('orange'); + ``` + */ + bgKeyword(color: string): Chalk; + + /** + Use RGB values to set background color. + */ + bgRgb(red: number, green: number, blue: number): Chalk; + + /** + Use HSL values to set background color. + */ + bgHsl(hue: number, saturation: number, lightness: number): Chalk; + + /** + Use HSV values to set background color. + */ + bgHsv(hue: number, saturation: number, value: number): Chalk; + + /** + Use HWB values to set background color. + */ + bgHwb(hue: number, whiteness: number, blackness: number): Chalk; + + /** + Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color. + + 30 <= code && code < 38 || 90 <= code && code < 98 + For example, 31 for red, 91 for redBright. + Use the foreground code, not the background code (for example, not 41, nor 101). + */ + bgAnsi(code: number): Chalk; + + /** + Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. + */ + bgAnsi256(index: number): Chalk; + + /** + Modifier: Resets the current color chain. + */ + readonly reset: Chalk; + + /** + Modifier: Make text bold. + */ + readonly bold: Chalk; + + /** + Modifier: Emitting only a small amount of light. + */ + readonly dim: Chalk; + + /** + Modifier: Make text italic. (Not widely supported) + */ + readonly italic: Chalk; + + /** + Modifier: Make text underline. (Not widely supported) + */ + readonly underline: Chalk; + + /** + Modifier: Inverse background and foreground colors. + */ + readonly inverse: Chalk; + + /** + Modifier: Prints the text, but makes it invisible. + */ + readonly hidden: Chalk; + + /** + Modifier: Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: Chalk; + + /** + Modifier: Prints the text only when Chalk has a color support level > 0. + Can be useful for things that are purely cosmetic. + */ + readonly visible: Chalk; + + readonly black: Chalk; + readonly red: Chalk; + readonly green: Chalk; + readonly yellow: Chalk; + readonly blue: Chalk; + readonly magenta: Chalk; + readonly cyan: Chalk; + readonly white: Chalk; + + /* + Alias for `blackBright`. + */ + readonly gray: Chalk; + + /* + Alias for `blackBright`. + */ + readonly grey: Chalk; + + readonly blackBright: Chalk; + readonly redBright: Chalk; + readonly greenBright: Chalk; + readonly yellowBright: Chalk; + readonly blueBright: Chalk; + readonly magentaBright: Chalk; + readonly cyanBright: Chalk; + readonly whiteBright: Chalk; + + readonly bgBlack: Chalk; + readonly bgRed: Chalk; + readonly bgGreen: Chalk; + readonly bgYellow: Chalk; + readonly bgBlue: Chalk; + readonly bgMagenta: Chalk; + readonly bgCyan: Chalk; + readonly bgWhite: Chalk; + + /* + Alias for `bgBlackBright`. + */ + readonly bgGray: Chalk; + + /* + Alias for `bgBlackBright`. + */ + readonly bgGrey: Chalk; + + readonly bgBlackBright: Chalk; + readonly bgRedBright: Chalk; + readonly bgGreenBright: Chalk; + readonly bgYellowBright: Chalk; + readonly bgBlueBright: Chalk; + readonly bgMagentaBright: Chalk; + readonly bgCyanBright: Chalk; + readonly bgWhiteBright: Chalk; + } +} + +/** +Main Chalk object that allows to chain styles together. +Call the last one as a method with a string argument. +Order doesn't matter, and later styles take precedent in case of a conflict. +This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. +*/ +declare const chalk: chalk.Chalk & chalk.ChalkFunction & { + supportsColor: chalk.ColorSupport | false; + Level: chalk.Level; + Color: Color; + ForegroundColor: ForegroundColor; + BackgroundColor: BackgroundColor; + Modifiers: Modifiers; + stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false}; +}; + +export = chalk; diff --git a/tests/node_modules/chalk/license b/tests/node_modules/chalk/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/tests/node_modules/chalk/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/chalk/node_modules/supports-color/browser.js b/tests/node_modules/chalk/node_modules/supports-color/browser.js new file mode 100644 index 0000000..62afa3a --- /dev/null +++ b/tests/node_modules/chalk/node_modules/supports-color/browser.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = { + stdout: false, + stderr: false +}; diff --git a/tests/node_modules/chalk/node_modules/supports-color/index.js b/tests/node_modules/chalk/node_modules/supports-color/index.js new file mode 100644 index 0000000..6fada39 --- /dev/null +++ b/tests/node_modules/chalk/node_modules/supports-color/index.js @@ -0,0 +1,135 @@ +'use strict'; +const os = require('os'); +const tty = require('tty'); +const hasFlag = require('has-flag'); + +const {env} = process; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = 1; +} + +if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === 'true') { + forceColor = 1; + } else if (env.FORCE_COLOR === 'false') { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (haveStream && !streamIsTTY && forceColor === undefined) { + return 0; + } + + const min = forceColor || 0; + + if (env.TERM === 'dumb') { + return min; + } + + if (process.platform === 'win32') { + // Windows 10 build 10586 is the first Windows release that supports 256 colors. + // Windows 10 build 14931 is the first release that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) +}; diff --git a/tests/node_modules/chalk/node_modules/supports-color/license b/tests/node_modules/chalk/node_modules/supports-color/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/tests/node_modules/chalk/node_modules/supports-color/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/node_modules/chalk/node_modules/supports-color/package.json b/tests/node_modules/chalk/node_modules/supports-color/package.json new file mode 100644 index 0000000..f7182ed --- /dev/null +++ b/tests/node_modules/chalk/node_modules/supports-color/package.json @@ -0,0 +1,53 @@ +{ + "name": "supports-color", + "version": "7.2.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "browser.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "dependencies": { + "has-flag": "^4.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "xo": "^0.24.0" + }, + "browser": "browser.js" +} diff --git a/tests/node_modules/chalk/node_modules/supports-color/readme.md b/tests/node_modules/chalk/node_modules/supports-color/readme.md new file mode 100644 index 0000000..3654228 --- /dev/null +++ b/tests/node_modules/chalk/node_modules/supports-color/readme.md @@ -0,0 +1,76 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install supports-color +``` + + +## Usage + +```js +const supportsColor = require('supports-color'); + +if (supportsColor.stdout) { + console.log('Terminal stdout supports color'); +} + +if (supportsColor.stdout.has256) { + console.log('Terminal stdout supports 256 colors'); +} + +if (supportsColor.stderr.has16m) { + console.log('Terminal stderr supports 16 million colors (truecolor)'); +} +``` + + +## API + +Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. + +The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: + +- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) +- `.level = 2` and `.has256 = true`: 256 color support +- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) + + +## Info + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. + +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- diff --git a/tests/node_modules/chalk/package.json b/tests/node_modules/chalk/package.json new file mode 100644 index 0000000..47c23f2 --- /dev/null +++ b/tests/node_modules/chalk/package.json @@ -0,0 +1,68 @@ +{ + "name": "chalk", + "version": "4.1.2", + "description": "Terminal string styling done right", + "license": "MIT", + "repository": "chalk/chalk", + "funding": "https://github.com/chalk/chalk?sponsor=1", + "main": "source", + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && nyc ava && tsd", + "bench": "matcha benchmark.js" + }, + "files": [ + "source", + "index.d.ts" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.7", + "execa": "^4.0.0", + "import-fresh": "^3.1.0", + "matcha": "^0.7.0", + "nyc": "^15.0.0", + "resolve-from": "^5.0.0", + "tsd": "^0.7.4", + "xo": "^0.28.2" + }, + "xo": { + "rules": { + "unicorn/prefer-string-slice": "off", + "unicorn/prefer-includes": "off", + "@typescript-eslint/member-ordering": "off", + "no-redeclare": "off", + "unicorn/string-content": "off", + "unicorn/better-regex": "off" + } + } +} diff --git a/tests/node_modules/chalk/readme.md b/tests/node_modules/chalk/readme.md new file mode 100644 index 0000000..a055d21 --- /dev/null +++ b/tests/node_modules/chalk/readme.md @@ -0,0 +1,341 @@ +

+
+
+ Chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) [![run on repl.it](https://repl.it/badge/github/chalk/chalk)](https://repl.it/github/chalk/chalk) + + + +
+ +--- + + + +--- + +
+ +## Highlights + +- Expressive API +- Highly performant +- Ability to nest styles +- [256/Truecolor color support](#256-and-truecolor-color-support) +- Auto-detects color support +- Doesn't extend `String.prototype` +- Clean and focused +- Actively maintained +- [Used by ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020 + +## Install + +```console +$ npm install chalk +``` + +## Usage + +```js +const chalk = require('chalk'); + +console.log(chalk.blue('Hello world!')); +``` + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +const chalk = require('chalk'); +const log = console.log; + +// Combine styled and normal strings +log(chalk.blue('Hello') + ' World' + chalk.red('!')); + +// Compose multiple styles using the chainable API +log(chalk.blue.bgRed.bold('Hello world!')); + +// Pass in multiple arguments +log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); + +// Nest styles +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); + +// Nest styles of the same type even (color, underline, background) +log(chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +)); + +// ES2015 template literal +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + +// ES2015 tagged template literal +log(chalk` +CPU: {red ${cpu.totalPercent}%} +RAM: {green ${ram.used / ram.total * 100}%} +DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} +`); + +// Use RGB colors in terminal emulators that support it. +log(chalk.keyword('orange')('Yay for orange colored text!')); +log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); +log(chalk.hex('#DEADED').bold('Bold gray!')); +``` + +Easily define your own themes: + +```js +const chalk = require('chalk'); + +const error = chalk.bold.red; +const warning = chalk.keyword('orange'); + +console.log(error('Error!')); +console.log(warning('Warning!')); +``` + +Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): + +```js +const name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> 'Hello Sindre' +``` + +## API + +### chalk.`