@meteora-ag/cp-amm-sdk 1.0.1-rc.3 → 1.0.1-rc.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -200
- package/dist/index.d.mts +3149 -3417
- package/dist/index.d.ts +3149 -3417
- package/dist/index.js +1812 -684
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1856 -728
- package/dist/index.mjs.map +1 -1
- package/node_modules/@babel/runtime/LICENSE +22 -0
- package/node_modules/@babel/runtime/README.md +19 -0
- package/node_modules/@babel/runtime/helpers/AwaitValue.js +4 -0
- package/node_modules/@babel/runtime/helpers/OverloadYield.js +4 -0
- package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +9 -0
- package/node_modules/@babel/runtime/helpers/applyDecs.js +236 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2203.js +184 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +191 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2301.js +222 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2305.js +133 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2311.js +124 -0
- package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
- package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
- package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
- package/node_modules/@babel/runtime/helpers/assertClassBrand.js +5 -0
- package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +5 -0
- package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +24 -0
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +45 -0
- package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +26 -0
- package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +5 -0
- package/node_modules/@babel/runtime/helpers/callSuper.js +7 -0
- package/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
- package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +4 -0
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +10 -0
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +4 -0
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classCallCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +5 -0
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +5 -0
- package/node_modules/@babel/runtime/helpers/classNameTDZError.js +4 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/construct.js +10 -0
- package/node_modules/@babel/runtime/helpers/createClass.js +13 -0
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +50 -0
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +19 -0
- package/node_modules/@babel/runtime/helpers/createSuper.js +16 -0
- package/node_modules/@babel/runtime/helpers/decorate.js +250 -0
- package/node_modules/@babel/runtime/helpers/defaults.js +9 -0
- package/node_modules/@babel/runtime/helpers/defineAccessor.js +8 -0
- package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +12 -0
- package/node_modules/@babel/runtime/helpers/defineProperty.js +10 -0
- package/node_modules/@babel/runtime/helpers/dispose.js +28 -0
- package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +236 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +184 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +191 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +222 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +133 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +124 -0
- package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +24 -0
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +45 -0
- package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +26 -0
- package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/callSuper.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/construct.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/createClass.js +13 -0
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +50 -0
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
- package/node_modules/@babel/runtime/helpers/esm/createSuper.js +16 -0
- package/node_modules/@babel/runtime/helpers/esm/decorate.js +250 -0
- package/node_modules/@babel/runtime/helpers/esm/defaults.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/dispose.js +28 -0
- package/node_modules/@babel/runtime/helpers/esm/extends.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/get.js +11 -0
- package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/identity.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +27 -0
- package/node_modules/@babel/runtime/helpers/esm/inherits.js +14 -0
- package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/instanceof.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +27 -0
- package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +28 -0
- package/node_modules/@babel/runtime/helpers/esm/jsx.js +22 -0
- package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +14 -0
- package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +23 -0
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +13 -0
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
- package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +304 -0
- package/node_modules/@babel/runtime/helpers/esm/set.js +22 -0
- package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/tdz.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +2 -0
- package/node_modules/@babel/runtime/helpers/esm/toArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/toSetter.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/typeof.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/using.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +59 -0
- package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +69 -0
- package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +27 -0
- package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +52 -0
- package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +4 -0
- package/node_modules/@babel/runtime/helpers/extends.js +10 -0
- package/node_modules/@babel/runtime/helpers/get.js +11 -0
- package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/identity.js +4 -0
- package/node_modules/@babel/runtime/helpers/importDeferProxy.js +27 -0
- package/node_modules/@babel/runtime/helpers/inherits.js +14 -0
- package/node_modules/@babel/runtime/helpers/inheritsLoose.js +5 -0
- package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +9 -0
- package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +4 -0
- package/node_modules/@babel/runtime/helpers/instanceof.js +4 -0
- package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +27 -0
- package/node_modules/@babel/runtime/helpers/isNativeFunction.js +8 -0
- package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +9 -0
- package/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
- package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
- package/node_modules/@babel/runtime/helpers/jsx.js +22 -0
- package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +9 -0
- package/node_modules/@babel/runtime/helpers/newArrowCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
- package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
- package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +4 -0
- package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +4 -0
- package/node_modules/@babel/runtime/helpers/objectSpread.js +14 -0
- package/node_modules/@babel/runtime/helpers/objectSpread2.js +23 -0
- package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +13 -0
- package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +10 -0
- package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +8 -0
- package/node_modules/@babel/runtime/helpers/readOnlyError.js +4 -0
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +304 -0
- package/node_modules/@babel/runtime/helpers/set.js +22 -0
- package/node_modules/@babel/runtime/helpers/setFunctionName.js +12 -0
- package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +7 -0
- package/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/superPropBase.js +6 -0
- package/node_modules/@babel/runtime/helpers/superPropGet.js +9 -0
- package/node_modules/@babel/runtime/helpers/superPropSet.js +6 -0
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +8 -0
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +4 -0
- package/node_modules/@babel/runtime/helpers/tdz.js +4 -0
- package/node_modules/@babel/runtime/helpers/temporalRef.js +6 -0
- package/node_modules/@babel/runtime/helpers/temporalUndefined.js +2 -0
- package/node_modules/@babel/runtime/helpers/toArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
- package/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
- package/node_modules/@babel/runtime/helpers/toSetter.js +10 -0
- package/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +6 -0
- package/node_modules/@babel/runtime/helpers/typeof.js +10 -0
- package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +9 -0
- package/node_modules/@babel/runtime/helpers/using.js +12 -0
- package/node_modules/@babel/runtime/helpers/usingCtx.js +59 -0
- package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +69 -0
- package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +27 -0
- package/node_modules/@babel/runtime/helpers/wrapRegExp.js +52 -0
- package/node_modules/@babel/runtime/helpers/writeOnlyError.js +4 -0
- package/node_modules/@babel/runtime/package.json +1065 -0
- package/node_modules/@babel/runtime/regenerator/index.js +15 -0
- package/node_modules/@coral-xyz/anchor/README.md +10 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js +7202 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/accounts.d.ts +27 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/accounts.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/event.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/event.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/idl.d.ts +32 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/idl.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/index.d.ts +33 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/instruction.d.ts +42 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/types.d.ts +16 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/index.d.ts +43 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/accounts.d.ts +12 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/accounts.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/events.d.ts +9 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/events.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/index.d.ts +17 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/instruction.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/types.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/error.d.ts +131 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/error.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/idl.d.ts +215 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/idl.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/index.d.ts +16 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/index.d.ts +7 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/system.d.ts +390 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/system.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/nodewallet.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/nodewallet.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/accounts-resolver.d.ts +63 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/accounts-resolver.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/common.d.ts +20 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/common.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/context.d.ts +63 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/context.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/event.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/event.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/index.d.ts +272 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/account.d.ts +146 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/account.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/index.d.ts +35 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/instruction.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/methods.d.ts +206 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/methods.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/rpc.d.ts +49 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/rpc.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/simulate.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/simulate.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/transaction.d.ts +42 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/transaction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/types.d.ts +153 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/views.d.ts +15 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/views.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/token-account-layout.d.ts +2 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/token-account-layout.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/provider.d.ts +104 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/provider.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/base64.d.ts +4 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/base64.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/bs58.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/bs58.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/hex.d.ts +4 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/hex.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/index.d.ts +5 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/utf8.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/utf8.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/common.d.ts +22 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/common.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/features.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/features.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/index.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/pubkey.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/pubkey.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/registry.d.ts +34 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/registry.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/rpc.d.ts +21 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/rpc.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/sha256.d.ts +2 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/sha256.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/token.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/token.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/workspace.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/browser/src/workspace.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.d.ts +27 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.js +103 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.js +78 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.d.ts +32 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js +420 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.d.ts +33 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.js +27 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.d.ts +42 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.js +274 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.d.ts +16 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.js +42 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.d.ts +43 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.js +19 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.d.ts +12 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.js +107 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.d.ts +9 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.js +11 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.d.ts +17 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.js +20 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.js +242 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.js +14 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.d.ts +131 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.js +583 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.d.ts +215 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.js +109 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.d.ts +16 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.js +50 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.d.ts +7 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.js +11 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.d.ts +390 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.js +394 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.js +48 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.d.ts +63 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js +437 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.d.ts +20 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.js +49 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.d.ts +63 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.js +16 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.js +207 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.d.ts +272 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.js +177 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.d.ts +146 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.js +257 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.d.ts +35 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.js +63 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.js +94 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.d.ts +206 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.js +309 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.d.ts +49 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.js +25 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.js +42 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.d.ts +42 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.js +24 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.d.ts +153 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.js +3 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.d.ts +15 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.js +30 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.d.ts +2 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.js +136 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.d.ts +104 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.js +309 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.d.ts +4 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.js +12 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.js +15 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.d.ts +4 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.js +22 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.d.ts +5 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.js +31 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.js +18 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.d.ts +22 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.js +32 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.js +16 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.js +34 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.js +16 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.d.ts +34 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.js +88 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.d.ts +21 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.js +167 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.d.ts +2 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.js +8 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.js +11 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.js +98 -0
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.d.ts +27 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.js +96 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.js +51 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.d.ts +32 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js +393 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.d.ts +33 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.js +20 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.d.ts +42 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.js +244 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.d.ts +16 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.js +38 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.d.ts +43 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.js +3 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.d.ts +12 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.js +80 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.d.ts +9 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.js +7 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.d.ts +17 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.js +16 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.js +212 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.js +10 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/error.d.ts +131 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/error.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/error.js +552 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/error.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.d.ts +215 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.js +74 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/index.d.ts +16 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/index.js +14 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.d.ts +7 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.js +7 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.d.ts +390 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.js +389 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.js +45 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.d.ts +63 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js +429 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.d.ts +20 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.js +43 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.d.ts +63 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.js +13 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.js +202 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.d.ts +272 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.js +156 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.d.ts +146 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.js +226 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.d.ts +35 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.js +54 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.js +68 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.d.ts +206 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.js +302 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.d.ts +49 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.js +22 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.d.ts +57 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.js +39 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.d.ts +42 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.js +21 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.d.ts +153 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.js +2 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.d.ts +15 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.js +27 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.d.ts +2 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.js +107 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.d.ts +104 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.js +303 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.d.ts +4 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.js +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.js +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.d.ts +4 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.js +18 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.d.ts +5 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.js +5 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.js +14 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.d.ts +22 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.js +27 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.js +12 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.js +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.d.ts +3 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.js +13 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.d.ts +34 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.js +57 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.d.ts +21 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.js +161 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.d.ts +2 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.js +5 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.d.ts +8 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.js +7 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.d.ts +14 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.js +70 -0
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.js.map +1 -0
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/index.d.ts +103 -0
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/index.js +113 -0
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/license +9 -0
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/package.json +44 -0
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/readme.md +144 -0
- package/node_modules/@coral-xyz/anchor/package.json +84 -0
- package/node_modules/@coral-xyz/anchor/types/buffer-layout/index.d.ts +88 -0
- package/node_modules/@coral-xyz/anchor-errors/dist/index.d.ts +157 -0
- package/node_modules/@coral-xyz/anchor-errors/dist/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/anchor-errors/dist/index.js +167 -0
- package/node_modules/@coral-xyz/anchor-errors/dist/index.js.map +1 -0
- package/node_modules/@coral-xyz/anchor-errors/package.json +32 -0
- package/node_modules/@coral-xyz/borsh/dist/index.d.ts +31 -0
- package/node_modules/@coral-xyz/borsh/dist/index.d.ts.map +1 -0
- package/node_modules/@coral-xyz/borsh/dist/index.js +222 -0
- package/node_modules/@coral-xyz/borsh/dist/index.js.map +1 -0
- package/node_modules/@coral-xyz/borsh/package.json +35 -0
- package/node_modules/@noble/hashes/LICENSE +21 -0
- package/node_modules/@noble/hashes/README.md +572 -0
- package/node_modules/@noble/hashes/_assert.d.ts +23 -0
- package/node_modules/@noble/hashes/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_assert.js +50 -0
- package/node_modules/@noble/hashes/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/_blake.d.ts +34 -0
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_blake.js +137 -0
- package/node_modules/@noble/hashes/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/_md.d.ts +34 -0
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_md.js +137 -0
- package/node_modules/@noble/hashes/_md.js.map +1 -0
- package/node_modules/@noble/hashes/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_u64.js +89 -0
- package/node_modules/@noble/hashes/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/argon2.js +396 -0
- package/node_modules/@noble/hashes/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/blake1.d.ts +126 -0
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake1.js +471 -0
- package/node_modules/@noble/hashes/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/blake2b.d.ts +53 -0
- package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2b.js +197 -0
- package/node_modules/@noble/hashes/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/blake2s.d.ts +61 -0
- package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2s.js +132 -0
- package/node_modules/@noble/hashes/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake3.js +255 -0
- package/node_modules/@noble/hashes/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/crypto.js +5 -0
- package/node_modules/@noble/hashes/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.js +18 -0
- package/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/eskdf.js +168 -0
- package/node_modules/@noble/hashes/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts +23 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.js +44 -0
- package/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts +34 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.js +133 -0
- package/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts +34 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.js +130 -0
- package/node_modules/@noble/hashes/esm/_md.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.js +66 -0
- package/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.js +387 -0
- package/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts +126 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.js +464 -0
- package/node_modules/@noble/hashes/esm/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +53 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.js +193 -0
- package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +61 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.js +125 -0
- package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.js +262 -0
- package/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.js +2 -0
- package/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js +15 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.js +162 -0
- package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.js +83 -0
- package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts +30 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.js +84 -0
- package/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/esm/index.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/index.js +35 -0
- package/node_modules/@noble/hashes/esm/index.js.map +1 -0
- package/node_modules/@noble/hashes/esm/package.json +10 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js +97 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +24 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js +103 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.js +233 -0
- package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts +22 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.js +84 -0
- package/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts +7 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.js +8 -0
- package/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts +32 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.js +130 -0
- package/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +130 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js +387 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts +52 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.js +227 -0
- package/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts +116 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.js +242 -0
- package/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts +120 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.js +212 -0
- package/node_modules/@noble/hashes/esm/utils.js.map +1 -0
- package/node_modules/@noble/hashes/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hkdf.js +89 -0
- package/node_modules/@noble/hashes/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/hmac.d.ts +30 -0
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hmac.js +89 -0
- package/node_modules/@noble/hashes/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/index.d.ts +1 -0
- package/node_modules/@noble/hashes/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/index.js +35 -0
- package/node_modules/@noble/hashes/index.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +168 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/pbkdf2.js +101 -0
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts +24 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.js +107 -0
- package/node_modules/@noble/hashes/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/scrypt.js +237 -0
- package/node_modules/@noble/hashes/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/sha1.d.ts +22 -0
- package/node_modules/@noble/hashes/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha1.js +88 -0
- package/node_modules/@noble/hashes/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/sha2.d.ts +7 -0
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha2.js +17 -0
- package/node_modules/@noble/hashes/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/sha256.d.ts +32 -0
- package/node_modules/@noble/hashes/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha256.js +134 -0
- package/node_modules/@noble/hashes/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts +130 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.js +396 -0
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/sha3.d.ts +52 -0
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3.js +232 -0
- package/node_modules/@noble/hashes/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/sha512.d.ts +116 -0
- package/node_modules/@noble/hashes/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha512.js +249 -0
- package/node_modules/@noble/hashes/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/src/_assert.ts +54 -0
- package/node_modules/@noble/hashes/src/_blake.ts +147 -0
- package/node_modules/@noble/hashes/src/_md.ts +141 -0
- package/node_modules/@noble/hashes/src/_u64.ts +95 -0
- package/node_modules/@noble/hashes/src/argon2.ts +486 -0
- package/node_modules/@noble/hashes/src/blake1.ts +548 -0
- package/node_modules/@noble/hashes/src/blake2b.ts +209 -0
- package/node_modules/@noble/hashes/src/blake2s.ts +154 -0
- package/node_modules/@noble/hashes/src/blake3.ts +281 -0
- package/node_modules/@noble/hashes/src/crypto.ts +9 -0
- package/node_modules/@noble/hashes/src/cryptoNode.ts +15 -0
- package/node_modules/@noble/hashes/src/eskdf.ts +189 -0
- package/node_modules/@noble/hashes/src/hkdf.ts +89 -0
- package/node_modules/@noble/hashes/src/hmac.ts +92 -0
- package/node_modules/@noble/hashes/src/index.ts +33 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +120 -0
- package/node_modules/@noble/hashes/src/ripemd160.ts +109 -0
- package/node_modules/@noble/hashes/src/scrypt.ts +252 -0
- package/node_modules/@noble/hashes/src/sha1.ts +83 -0
- package/node_modules/@noble/hashes/src/sha2.ts +7 -0
- package/node_modules/@noble/hashes/src/sha256.ts +136 -0
- package/node_modules/@noble/hashes/src/sha3-addons.ts +488 -0
- package/node_modules/@noble/hashes/src/sha3.ts +244 -0
- package/node_modules/@noble/hashes/src/sha512.ts +257 -0
- package/node_modules/@noble/hashes/src/utils.ts +305 -0
- package/node_modules/@noble/hashes/utils.d.ts +120 -0
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/utils.js +236 -0
- package/node_modules/@noble/hashes/utils.js.map +1 -0
- package/node_modules/@solana/buffer-layout/LICENSE +21 -0
- package/node_modules/@solana/buffer-layout/README.md +403 -0
- package/node_modules/@solana/buffer-layout/lib/Layout.d.ts +1191 -0
- package/node_modules/@solana/buffer-layout/lib/Layout.js +2390 -0
- package/node_modules/@solana/buffer-layout/lib/Layout.js.map +1 -0
- package/node_modules/@solana/buffer-layout/package.json +55 -0
- package/node_modules/@solana/web3.js/LICENSE +20 -0
- package/node_modules/@solana/web3.js/README.md +145 -0
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js +10572 -0
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js.map +1 -0
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js +10471 -0
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js.map +1 -0
- package/node_modules/@solana/web3.js/lib/index.cjs.js +11321 -0
- package/node_modules/@solana/web3.js/lib/index.cjs.js.map +1 -0
- package/node_modules/@solana/web3.js/lib/index.d.ts +4021 -0
- package/node_modules/@solana/web3.js/lib/index.esm.js +11216 -0
- package/node_modules/@solana/web3.js/lib/index.esm.js.map +1 -0
- package/node_modules/@solana/web3.js/lib/index.iife.js +25958 -0
- package/node_modules/@solana/web3.js/lib/index.iife.js.map +1 -0
- package/node_modules/@solana/web3.js/lib/index.iife.min.js +20 -0
- package/node_modules/@solana/web3.js/lib/index.iife.min.js.map +1 -0
- package/node_modules/@solana/web3.js/lib/index.native.js +10572 -0
- package/node_modules/@solana/web3.js/lib/index.native.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/LICENSE +21 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/README.md +1113 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.d.ts +16 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.js +25 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.d.ts +129 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.js +356 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.d.ts +101 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.js +380 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.d.ts +92 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.js +452 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.d.ts +78 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.js +186 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.d.ts +152 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.js +481 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.d.ts +26 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js +160 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts +39 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js +121 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.d.ts +119 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.js +501 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.d.ts +116 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.js +364 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.d.ts +225 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.js +1190 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.d.ts +14 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.js +717 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.d.ts +15 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.js +228 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.d.ts +101 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.js +473 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.d.ts +82 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.js +428 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.d.ts +16 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.js +21 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.d.ts +129 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.js +353 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.d.ts +101 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js +374 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.d.ts +92 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js +449 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts +78 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.js +179 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.d.ts +152 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js +457 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.d.ts +26 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js +157 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +39 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js +116 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.d.ts +119 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.js +497 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.d.ts +116 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js +335 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts +225 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js +1182 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.d.ts +14 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.js +714 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.d.ts +15 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.js +224 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.d.ts +101 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js +467 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.d.ts +82 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.js +423 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.d.ts +2 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.js +19 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts +5 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js +61 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts +11 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js +49 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts +11 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js +53 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts +12 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js +61 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/package.json +4 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts +8 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js +34 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.d.ts +71 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js +284 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.d.ts +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.js +19 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts +5 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js +66 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts +11 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js +52 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts +11 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js +56 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts +12 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js +64 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/package.json +171 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts +8 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js +37 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.d.ts +71 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.js +287 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.js.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/_shortw_utils.ts +30 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/bls.ts +570 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/curve.ts +457 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/edwards.ts +562 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/hash-to-curve.ts +255 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/modular.ts +532 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/montgomery.ts +196 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/poseidon.ts +136 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/tower.ts +651 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/utils.ts +369 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/weierstrass.ts +1375 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/bls12-381.ts +770 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/bn254.ts +252 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/ed25519.ts +537 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/ed448.ts +507 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/index.ts +17 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/jubjub.ts +63 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p256.ts +54 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p384.ts +58 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p521.ts +75 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/package.json +3 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/pasta.ts +39 -0
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/secp256k1.ts +328 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/License.md +9 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/Readme.md +230 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/error.d.ts +33 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/error.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.cjs +1084 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.cjs.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.d.ts +7 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.mjs +1026 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.mjs.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/struct.d.ts +119 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/struct.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/coercions.d.ts +29 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/coercions.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/refinements.d.ts +38 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/refinements.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/types.d.ts +142 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/types.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/utilities.d.ts +66 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/utilities.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/utils.d.ts +144 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/utils.d.ts.map +1 -0
- package/node_modules/@solana/web3.js/node_modules/superstruct/package.json +85 -0
- package/node_modules/@solana/web3.js/package.json +75 -0
- package/node_modules/@solana/web3.js/src/__forks__/browser/fetch-impl.ts +4 -0
- package/node_modules/@solana/web3.js/src/__forks__/react-native/fetch-impl.ts +4 -0
- package/node_modules/@solana/web3.js/src/account-data.ts +39 -0
- package/node_modules/@solana/web3.js/src/account.ts +55 -0
- package/node_modules/@solana/web3.js/src/blockhash.ts +4 -0
- package/node_modules/@solana/web3.js/src/bpf-loader-deprecated.ts +5 -0
- package/node_modules/@solana/web3.js/src/bpf-loader.ts +50 -0
- package/node_modules/@solana/web3.js/src/connection.ts +6955 -0
- package/node_modules/@solana/web3.js/src/epoch-schedule.ts +102 -0
- package/node_modules/@solana/web3.js/src/errors.ts +133 -0
- package/node_modules/@solana/web3.js/src/fee-calculator.ts +18 -0
- package/node_modules/@solana/web3.js/src/fetch-impl.ts +16 -0
- package/node_modules/@solana/web3.js/src/index.ts +24 -0
- package/node_modules/@solana/web3.js/src/instruction.ts +58 -0
- package/node_modules/@solana/web3.js/src/keypair.ts +102 -0
- package/node_modules/@solana/web3.js/src/layout.ts +188 -0
- package/node_modules/@solana/web3.js/src/loader.ts +267 -0
- package/node_modules/@solana/web3.js/src/message/account-keys.ts +79 -0
- package/node_modules/@solana/web3.js/src/message/compiled-keys.ts +165 -0
- package/node_modules/@solana/web3.js/src/message/index.ts +47 -0
- package/node_modules/@solana/web3.js/src/message/legacy.ts +323 -0
- package/node_modules/@solana/web3.js/src/message/v0.ts +513 -0
- package/node_modules/@solana/web3.js/src/message/versioned.ts +36 -0
- package/node_modules/@solana/web3.js/src/nonce-account.ts +82 -0
- package/node_modules/@solana/web3.js/src/programs/address-lookup-table/index.ts +435 -0
- package/node_modules/@solana/web3.js/src/programs/address-lookup-table/state.ts +84 -0
- package/node_modules/@solana/web3.js/src/programs/compute-budget.ts +281 -0
- package/node_modules/@solana/web3.js/src/programs/ed25519.ts +157 -0
- package/node_modules/@solana/web3.js/src/programs/index.ts +7 -0
- package/node_modules/@solana/web3.js/src/programs/secp256k1.ts +228 -0
- package/node_modules/@solana/web3.js/src/programs/stake.ts +952 -0
- package/node_modules/@solana/web3.js/src/programs/system.ts +1048 -0
- package/node_modules/@solana/web3.js/src/programs/vote.ts +586 -0
- package/node_modules/@solana/web3.js/src/publickey.ts +259 -0
- package/node_modules/@solana/web3.js/src/rpc-websocket.ts +75 -0
- package/node_modules/@solana/web3.js/src/sysvar.ts +37 -0
- package/node_modules/@solana/web3.js/src/timing.ts +23 -0
- package/node_modules/@solana/web3.js/src/transaction/constants.ts +12 -0
- package/node_modules/@solana/web3.js/src/transaction/expiry-custom-errors.ts +48 -0
- package/node_modules/@solana/web3.js/src/transaction/index.ts +5 -0
- package/node_modules/@solana/web3.js/src/transaction/legacy.ts +970 -0
- package/node_modules/@solana/web3.js/src/transaction/message.ts +140 -0
- package/node_modules/@solana/web3.js/src/transaction/versioned.ts +127 -0
- package/node_modules/@solana/web3.js/src/utils/assert.ts +8 -0
- package/node_modules/@solana/web3.js/src/utils/bigint.ts +43 -0
- package/node_modules/@solana/web3.js/src/utils/borsh-schema.ts +38 -0
- package/node_modules/@solana/web3.js/src/utils/cluster.ts +35 -0
- package/node_modules/@solana/web3.js/src/utils/ed25519.ts +43 -0
- package/node_modules/@solana/web3.js/src/utils/guarded-array-utils.ts +34 -0
- package/node_modules/@solana/web3.js/src/utils/index.ts +5 -0
- package/node_modules/@solana/web3.js/src/utils/makeWebsocketUrl.ts +26 -0
- package/node_modules/@solana/web3.js/src/utils/promise-timeout.ts +14 -0
- package/node_modules/@solana/web3.js/src/utils/secp256k1.ts +11 -0
- package/node_modules/@solana/web3.js/src/utils/send-and-confirm-raw-transaction.ts +110 -0
- package/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts +106 -0
- package/node_modules/@solana/web3.js/src/utils/shortvec-encoding.ts +28 -0
- package/node_modules/@solana/web3.js/src/utils/sleep.ts +4 -0
- package/node_modules/@solana/web3.js/src/utils/to-buffer.ts +11 -0
- package/node_modules/@solana/web3.js/src/validator-info.ts +108 -0
- package/node_modules/@solana/web3.js/src/vote-account.ts +236 -0
- package/node_modules/@swc/helpers/LICENSE +201 -0
- package/node_modules/@swc/helpers/_/_apply_decorated_descriptor/package.json +4 -0
- package/node_modules/@swc/helpers/_/_apply_decs_2203_r/package.json +4 -0
- package/node_modules/@swc/helpers/_/_array_like_to_array/package.json +4 -0
- package/node_modules/@swc/helpers/_/_array_with_holes/package.json +4 -0
- package/node_modules/@swc/helpers/_/_array_without_holes/package.json +4 -0
- package/node_modules/@swc/helpers/_/_assert_this_initialized/package.json +4 -0
- package/node_modules/@swc/helpers/_/_async_generator/package.json +4 -0
- package/node_modules/@swc/helpers/_/_async_generator_delegate/package.json +4 -0
- package/node_modules/@swc/helpers/_/_async_iterator/package.json +4 -0
- package/node_modules/@swc/helpers/_/_async_to_generator/package.json +4 -0
- package/node_modules/@swc/helpers/_/_await_async_generator/package.json +4 -0
- package/node_modules/@swc/helpers/_/_await_value/package.json +4 -0
- package/node_modules/@swc/helpers/_/_call_super/package.json +4 -0
- package/node_modules/@swc/helpers/_/_check_private_redeclaration/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_destructure/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_get/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_set/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_update/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_call_check/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_check_private_static_access/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_check_private_static_field_descriptor/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_extract_field_descriptor/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_name_tdz_error/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_destructure/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_get/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_init/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_set/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_field_update/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_method_get/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_method_init/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_private_method_set/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_static_private_field_destructure/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_static_private_field_spec_get/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_static_private_field_spec_set/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_static_private_field_update/package.json +4 -0
- package/node_modules/@swc/helpers/_/_class_static_private_method_get/package.json +4 -0
- package/node_modules/@swc/helpers/_/_construct/package.json +4 -0
- package/node_modules/@swc/helpers/_/_create_class/package.json +4 -0
- package/node_modules/@swc/helpers/_/_create_for_of_iterator_helper_loose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_create_super/package.json +4 -0
- package/node_modules/@swc/helpers/_/_decorate/package.json +4 -0
- package/node_modules/@swc/helpers/_/_defaults/package.json +4 -0
- package/node_modules/@swc/helpers/_/_define_enumerable_properties/package.json +4 -0
- package/node_modules/@swc/helpers/_/_define_property/package.json +4 -0
- package/node_modules/@swc/helpers/_/_dispose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_export_star/package.json +4 -0
- package/node_modules/@swc/helpers/_/_extends/package.json +4 -0
- package/node_modules/@swc/helpers/_/_get/package.json +4 -0
- package/node_modules/@swc/helpers/_/_get_prototype_of/package.json +4 -0
- package/node_modules/@swc/helpers/_/_identity/package.json +4 -0
- package/node_modules/@swc/helpers/_/_inherits/package.json +4 -0
- package/node_modules/@swc/helpers/_/_inherits_loose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_initializer_define_property/package.json +4 -0
- package/node_modules/@swc/helpers/_/_initializer_warning_helper/package.json +4 -0
- package/node_modules/@swc/helpers/_/_instanceof/package.json +4 -0
- package/node_modules/@swc/helpers/_/_interop_require_default/package.json +4 -0
- package/node_modules/@swc/helpers/_/_interop_require_wildcard/package.json +4 -0
- package/node_modules/@swc/helpers/_/_is_native_function/package.json +4 -0
- package/node_modules/@swc/helpers/_/_is_native_reflect_construct/package.json +4 -0
- package/node_modules/@swc/helpers/_/_iterable_to_array/package.json +4 -0
- package/node_modules/@swc/helpers/_/_iterable_to_array_limit/package.json +4 -0
- package/node_modules/@swc/helpers/_/_iterable_to_array_limit_loose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_jsx/package.json +4 -0
- package/node_modules/@swc/helpers/_/_new_arrow_check/package.json +4 -0
- package/node_modules/@swc/helpers/_/_non_iterable_rest/package.json +4 -0
- package/node_modules/@swc/helpers/_/_non_iterable_spread/package.json +4 -0
- package/node_modules/@swc/helpers/_/_object_destructuring_empty/package.json +4 -0
- package/node_modules/@swc/helpers/_/_object_spread/package.json +4 -0
- package/node_modules/@swc/helpers/_/_object_spread_props/package.json +4 -0
- package/node_modules/@swc/helpers/_/_object_without_properties/package.json +4 -0
- package/node_modules/@swc/helpers/_/_object_without_properties_loose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_possible_constructor_return/package.json +4 -0
- package/node_modules/@swc/helpers/_/_read_only_error/package.json +4 -0
- package/node_modules/@swc/helpers/_/_set/package.json +4 -0
- package/node_modules/@swc/helpers/_/_set_prototype_of/package.json +4 -0
- package/node_modules/@swc/helpers/_/_skip_first_generator_next/package.json +4 -0
- package/node_modules/@swc/helpers/_/_sliced_to_array/package.json +4 -0
- package/node_modules/@swc/helpers/_/_sliced_to_array_loose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_super_prop_base/package.json +4 -0
- package/node_modules/@swc/helpers/_/_tagged_template_literal/package.json +4 -0
- package/node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json +4 -0
- package/node_modules/@swc/helpers/_/_throw/package.json +4 -0
- package/node_modules/@swc/helpers/_/_to_array/package.json +4 -0
- package/node_modules/@swc/helpers/_/_to_consumable_array/package.json +4 -0
- package/node_modules/@swc/helpers/_/_to_primitive/package.json +4 -0
- package/node_modules/@swc/helpers/_/_to_property_key/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_add_disposable_resource/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_decorate/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_dispose_resources/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_generator/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_metadata/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_param/package.json +4 -0
- package/node_modules/@swc/helpers/_/_ts_values/package.json +4 -0
- package/node_modules/@swc/helpers/_/_type_of/package.json +4 -0
- package/node_modules/@swc/helpers/_/_unsupported_iterable_to_array/package.json +4 -0
- package/node_modules/@swc/helpers/_/_update/package.json +4 -0
- package/node_modules/@swc/helpers/_/_using/package.json +4 -0
- package/node_modules/@swc/helpers/_/_using_ctx/package.json +4 -0
- package/node_modules/@swc/helpers/_/_wrap_async_generator/package.json +4 -0
- package/node_modules/@swc/helpers/_/_wrap_native_super/package.json +4 -0
- package/node_modules/@swc/helpers/_/_write_only_error/package.json +4 -0
- package/node_modules/@swc/helpers/_/index/package.json +4 -0
- package/node_modules/@swc/helpers/cjs/_apply_decorated_descriptor.cjs +35 -0
- package/node_modules/@swc/helpers/cjs/_apply_decs_2203_r.cjs +550 -0
- package/node_modules/@swc/helpers/cjs/_array_like_to_array.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_array_with_holes.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_array_without_holes.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_assert_this_initialized.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_async_generator.cjs +78 -0
- package/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs +49 -0
- package/node_modules/@swc/helpers/cjs/_async_iterator.cjs +46 -0
- package/node_modules/@swc/helpers/cjs/_async_to_generator.cjs +33 -0
- package/node_modules/@swc/helpers/cjs/_await_async_generator.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_await_value.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_call_super.cjs +19 -0
- package/node_modules/@swc/helpers/cjs/_check_private_redeclaration.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_destructure.cjs +25 -0
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_get.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_set.cjs +15 -0
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_update.cjs +30 -0
- package/node_modules/@swc/helpers/cjs/_class_call_check.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_class_check_private_static_access.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_class_check_private_static_field_descriptor.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_class_extract_field_descriptor.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_class_name_tdz_error.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_destructure.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_get.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_init.cjs +9 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_set.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_class_private_field_update.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_class_private_method_get.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_class_private_method_init.cjs +9 -0
- package/node_modules/@swc/helpers/cjs/_class_private_method_set.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_destructure.cjs +13 -0
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_get.cjs +13 -0
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_set.cjs +14 -0
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_update.cjs +13 -0
- package/node_modules/@swc/helpers/cjs/_class_static_private_method_get.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_construct.cjs +22 -0
- package/node_modules/@swc/helpers/cjs/_create_class.cjs +20 -0
- package/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs +24 -0
- package/node_modules/@swc/helpers/cjs/_create_super.cjs +23 -0
- package/node_modules/@swc/helpers/cjs/_decorate.cjs +270 -0
- package/node_modules/@swc/helpers/cjs/_defaults.cjs +15 -0
- package/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs +26 -0
- package/node_modules/@swc/helpers/cjs/_define_property.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_dispose.cjs +43 -0
- package/node_modules/@swc/helpers/cjs/_export_star.cjs +17 -0
- package/node_modules/@swc/helpers/cjs/_extends.cjs +15 -0
- package/node_modules/@swc/helpers/cjs/_get.cjs +23 -0
- package/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_identity.cjs +7 -0
- package/node_modules/@swc/helpers/cjs/_inherits.cjs +14 -0
- package/node_modules/@swc/helpers/cjs/_inherits_loose.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs +13 -0
- package/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_instanceof.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
- package/node_modules/@swc/helpers/cjs/_is_native_function.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs +18 -0
- package/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs +31 -0
- package/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs +17 -0
- package/node_modules/@swc/helpers/cjs/_jsx.cjs +28 -0
- package/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_object_spread.cjs +25 -0
- package/node_modules/@swc/helpers/cjs/_object_spread_props.cjs +30 -0
- package/node_modules/@swc/helpers/cjs/_object_without_properties.cjs +23 -0
- package/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs +18 -0
- package/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_read_only_error.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_set.cjs +44 -0
- package/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs +12 -0
- package/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_super_prop_base.cjs +13 -0
- package/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_throw.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/_to_array.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_to_primitive.cjs +18 -0
- package/node_modules/@swc/helpers/cjs/_to_property_key.cjs +11 -0
- package/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_ts_decorate.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_ts_generator.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_ts_metadata.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_ts_param.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_ts_values.cjs +3 -0
- package/node_modules/@swc/helpers/cjs/_type_of.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs +15 -0
- package/node_modules/@swc/helpers/cjs/_update.cjs +16 -0
- package/node_modules/@swc/helpers/cjs/_using.cjs +24 -0
- package/node_modules/@swc/helpers/cjs/_using_ctx.cjs +75 -0
- package/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs +10 -0
- package/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs +28 -0
- package/node_modules/@swc/helpers/cjs/_write_only_error.cjs +6 -0
- package/node_modules/@swc/helpers/cjs/index.cjs +423 -0
- package/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js +33 -0
- package/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js +548 -0
- package/node_modules/@swc/helpers/esm/_array_like_to_array.js +8 -0
- package/node_modules/@swc/helpers/esm/_array_with_holes.js +4 -0
- package/node_modules/@swc/helpers/esm/_array_without_holes.js +6 -0
- package/node_modules/@swc/helpers/esm/_assert_this_initialized.js +6 -0
- package/node_modules/@swc/helpers/esm/_async_generator.js +76 -0
- package/node_modules/@swc/helpers/esm/_async_generator_delegate.js +47 -0
- package/node_modules/@swc/helpers/esm/_async_iterator.js +44 -0
- package/node_modules/@swc/helpers/esm/_async_to_generator.js +31 -0
- package/node_modules/@swc/helpers/esm/_await_async_generator.js +6 -0
- package/node_modules/@swc/helpers/esm/_await_value.js +4 -0
- package/node_modules/@swc/helpers/esm/_call_super.js +17 -0
- package/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +6 -0
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js +23 -0
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js +6 -0
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js +13 -0
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js +28 -0
- package/node_modules/@swc/helpers/esm/_class_call_check.js +4 -0
- package/node_modules/@swc/helpers/esm/_class_check_private_static_access.js +4 -0
- package/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js +6 -0
- package/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js +6 -0
- package/node_modules/@swc/helpers/esm/_class_name_tdz_error.js +4 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_destructure.js +8 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_get.js +8 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js +8 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js +6 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_set.js +9 -0
- package/node_modules/@swc/helpers/esm/_class_private_field_update.js +8 -0
- package/node_modules/@swc/helpers/esm/_class_private_method_get.js +6 -0
- package/node_modules/@swc/helpers/esm/_class_private_method_init.js +7 -0
- package/node_modules/@swc/helpers/esm/_class_private_method_set.js +4 -0
- package/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js +11 -0
- package/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js +11 -0
- package/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js +12 -0
- package/node_modules/@swc/helpers/esm/_class_static_private_field_update.js +11 -0
- package/node_modules/@swc/helpers/esm/_class_static_private_method_get.js +8 -0
- package/node_modules/@swc/helpers/esm/_construct.js +20 -0
- package/node_modules/@swc/helpers/esm/_create_class.js +18 -0
- package/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js +22 -0
- package/node_modules/@swc/helpers/esm/_create_super.js +21 -0
- package/node_modules/@swc/helpers/esm/_decorate.js +268 -0
- package/node_modules/@swc/helpers/esm/_defaults.js +13 -0
- package/node_modules/@swc/helpers/esm/_define_enumerable_properties.js +24 -0
- package/node_modules/@swc/helpers/esm/_define_property.js +8 -0
- package/node_modules/@swc/helpers/esm/_dispose.js +41 -0
- package/node_modules/@swc/helpers/esm/_export_star.js +15 -0
- package/node_modules/@swc/helpers/esm/_extends.js +13 -0
- package/node_modules/@swc/helpers/esm/_get.js +21 -0
- package/node_modules/@swc/helpers/esm/_get_prototype_of.js +8 -0
- package/node_modules/@swc/helpers/esm/_identity.js +5 -0
- package/node_modules/@swc/helpers/esm/_inherits.js +12 -0
- package/node_modules/@swc/helpers/esm/_inherits_loose.js +6 -0
- package/node_modules/@swc/helpers/esm/_initializer_define_property.js +11 -0
- package/node_modules/@swc/helpers/esm/_initializer_warning_helper.js +9 -0
- package/node_modules/@swc/helpers/esm/_instanceof.js +6 -0
- package/node_modules/@swc/helpers/esm/_interop_require_default.js +4 -0
- package/node_modules/@swc/helpers/esm/_interop_require_wildcard.js +36 -0
- package/node_modules/@swc/helpers/esm/_is_native_function.js +4 -0
- package/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js +16 -0
- package/node_modules/@swc/helpers/esm/_iterable_to_array.js +6 -0
- package/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js +29 -0
- package/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js +15 -0
- package/node_modules/@swc/helpers/esm/_jsx.js +26 -0
- package/node_modules/@swc/helpers/esm/_new_arrow_check.js +4 -0
- package/node_modules/@swc/helpers/esm/_non_iterable_rest.js +4 -0
- package/node_modules/@swc/helpers/esm/_non_iterable_spread.js +4 -0
- package/node_modules/@swc/helpers/esm/_object_destructuring_empty.js +6 -0
- package/node_modules/@swc/helpers/esm/_object_spread.js +23 -0
- package/node_modules/@swc/helpers/esm/_object_spread_props.js +28 -0
- package/node_modules/@swc/helpers/esm/_object_without_properties.js +21 -0
- package/node_modules/@swc/helpers/esm/_object_without_properties_loose.js +16 -0
- package/node_modules/@swc/helpers/esm/_possible_constructor_return.js +9 -0
- package/node_modules/@swc/helpers/esm/_read_only_error.js +4 -0
- package/node_modules/@swc/helpers/esm/_set.js +42 -0
- package/node_modules/@swc/helpers/esm/_set_prototype_of.js +10 -0
- package/node_modules/@swc/helpers/esm/_skip_first_generator_next.js +9 -0
- package/node_modules/@swc/helpers/esm/_sliced_to_array.js +9 -0
- package/node_modules/@swc/helpers/esm/_sliced_to_array_loose.js +9 -0
- package/node_modules/@swc/helpers/esm/_super_prop_base.js +11 -0
- package/node_modules/@swc/helpers/esm/_tagged_template_literal.js +6 -0
- package/node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js +8 -0
- package/node_modules/@swc/helpers/esm/_throw.js +4 -0
- package/node_modules/@swc/helpers/esm/_to_array.js +9 -0
- package/node_modules/@swc/helpers/esm/_to_consumable_array.js +9 -0
- package/node_modules/@swc/helpers/esm/_to_primitive.js +16 -0
- package/node_modules/@swc/helpers/esm/_to_property_key.js +9 -0
- package/node_modules/@swc/helpers/esm/_ts_add_disposable_resource.js +1 -0
- package/node_modules/@swc/helpers/esm/_ts_decorate.js +1 -0
- package/node_modules/@swc/helpers/esm/_ts_dispose_resources.js +1 -0
- package/node_modules/@swc/helpers/esm/_ts_generator.js +1 -0
- package/node_modules/@swc/helpers/esm/_ts_metadata.js +1 -0
- package/node_modules/@swc/helpers/esm/_ts_param.js +1 -0
- package/node_modules/@swc/helpers/esm/_ts_values.js +1 -0
- package/node_modules/@swc/helpers/esm/_type_of.js +6 -0
- package/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js +13 -0
- package/node_modules/@swc/helpers/esm/_update.js +14 -0
- package/node_modules/@swc/helpers/esm/_using.js +22 -0
- package/node_modules/@swc/helpers/esm/_using_ctx.js +73 -0
- package/node_modules/@swc/helpers/esm/_wrap_async_generator.js +8 -0
- package/node_modules/@swc/helpers/esm/_wrap_native_super.js +26 -0
- package/node_modules/@swc/helpers/esm/_write_only_error.js +4 -0
- package/node_modules/@swc/helpers/esm/index.js +106 -0
- package/node_modules/@swc/helpers/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/@swc/helpers/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/@swc/helpers/node_modules/tslib/README.md +164 -0
- package/node_modules/@swc/helpers/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/@swc/helpers/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/@swc/helpers/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/@swc/helpers/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/@swc/helpers/node_modules/tslib/package.json +47 -0
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.js +402 -0
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.mjs +401 -0
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.html +1 -0
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.js +484 -0
- package/node_modules/@swc/helpers/package.json +471 -0
- package/node_modules/@swc/helpers/scripts/ast_grep.js +229 -0
- package/node_modules/@swc/helpers/scripts/build.js +121 -0
- package/node_modules/@swc/helpers/scripts/errors.js +1 -0
- package/node_modules/@swc/helpers/scripts/utils.js +3 -0
- package/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs +1 -0
- package/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs +1 -0
- package/node_modules/@swc/helpers/src/_array_like_to_array.mjs +1 -0
- package/node_modules/@swc/helpers/src/_array_with_holes.mjs +1 -0
- package/node_modules/@swc/helpers/src/_array_without_holes.mjs +1 -0
- package/node_modules/@swc/helpers/src/_assert_this_initialized.mjs +1 -0
- package/node_modules/@swc/helpers/src/_async_generator.mjs +1 -0
- package/node_modules/@swc/helpers/src/_async_generator_delegate.mjs +1 -0
- package/node_modules/@swc/helpers/src/_async_iterator.mjs +1 -0
- package/node_modules/@swc/helpers/src/_async_to_generator.mjs +1 -0
- package/node_modules/@swc/helpers/src/_await_async_generator.mjs +1 -0
- package/node_modules/@swc/helpers/src/_await_value.mjs +1 -0
- package/node_modules/@swc/helpers/src/_call_super.mjs +1 -0
- package/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_call_check.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_get.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_init.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_set.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_field_update.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_method_get.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_method_init.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_private_method_set.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs +1 -0
- package/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs +1 -0
- package/node_modules/@swc/helpers/src/_construct.mjs +1 -0
- package/node_modules/@swc/helpers/src/_create_class.mjs +1 -0
- package/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_create_super.mjs +1 -0
- package/node_modules/@swc/helpers/src/_decorate.mjs +1 -0
- package/node_modules/@swc/helpers/src/_defaults.mjs +1 -0
- package/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs +1 -0
- package/node_modules/@swc/helpers/src/_define_property.mjs +1 -0
- package/node_modules/@swc/helpers/src/_dispose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_export_star.mjs +1 -0
- package/node_modules/@swc/helpers/src/_extends.mjs +1 -0
- package/node_modules/@swc/helpers/src/_get.mjs +1 -0
- package/node_modules/@swc/helpers/src/_get_prototype_of.mjs +1 -0
- package/node_modules/@swc/helpers/src/_identity.mjs +1 -0
- package/node_modules/@swc/helpers/src/_inherits.mjs +1 -0
- package/node_modules/@swc/helpers/src/_inherits_loose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_initializer_define_property.mjs +1 -0
- package/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs +1 -0
- package/node_modules/@swc/helpers/src/_instanceof.mjs +1 -0
- package/node_modules/@swc/helpers/src/_interop_require_default.mjs +1 -0
- package/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs +1 -0
- package/node_modules/@swc/helpers/src/_is_native_function.mjs +1 -0
- package/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs +1 -0
- package/node_modules/@swc/helpers/src/_iterable_to_array.mjs +1 -0
- package/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs +1 -0
- package/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_jsx.mjs +1 -0
- package/node_modules/@swc/helpers/src/_new_arrow_check.mjs +1 -0
- package/node_modules/@swc/helpers/src/_non_iterable_rest.mjs +1 -0
- package/node_modules/@swc/helpers/src/_non_iterable_spread.mjs +1 -0
- package/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs +1 -0
- package/node_modules/@swc/helpers/src/_object_spread.mjs +1 -0
- package/node_modules/@swc/helpers/src/_object_spread_props.mjs +1 -0
- package/node_modules/@swc/helpers/src/_object_without_properties.mjs +1 -0
- package/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_possible_constructor_return.mjs +1 -0
- package/node_modules/@swc/helpers/src/_read_only_error.mjs +1 -0
- package/node_modules/@swc/helpers/src/_set.mjs +1 -0
- package/node_modules/@swc/helpers/src/_set_prototype_of.mjs +1 -0
- package/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs +1 -0
- package/node_modules/@swc/helpers/src/_sliced_to_array.mjs +1 -0
- package/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_super_prop_base.mjs +1 -0
- package/node_modules/@swc/helpers/src/_tagged_template_literal.mjs +1 -0
- package/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs +1 -0
- package/node_modules/@swc/helpers/src/_throw.mjs +1 -0
- package/node_modules/@swc/helpers/src/_to_array.mjs +1 -0
- package/node_modules/@swc/helpers/src/_to_consumable_array.mjs +1 -0
- package/node_modules/@swc/helpers/src/_to_primitive.mjs +1 -0
- package/node_modules/@swc/helpers/src/_to_property_key.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_decorate.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_generator.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_metadata.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_param.mjs +1 -0
- package/node_modules/@swc/helpers/src/_ts_values.mjs +1 -0
- package/node_modules/@swc/helpers/src/_type_of.mjs +1 -0
- package/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs +1 -0
- package/node_modules/@swc/helpers/src/_update.mjs +1 -0
- package/node_modules/@swc/helpers/src/_using.mjs +1 -0
- package/node_modules/@swc/helpers/src/_using_ctx.mjs +1 -0
- package/node_modules/@swc/helpers/src/_wrap_async_generator.mjs +1 -0
- package/node_modules/@swc/helpers/src/_wrap_native_super.mjs +1 -0
- package/node_modules/@swc/helpers/src/_write_only_error.mjs +1 -0
- package/node_modules/@swc/helpers/src/index.mjs +1 -0
- package/node_modules/@types/connect/LICENSE +21 -0
- package/node_modules/@types/connect/README.md +15 -0
- package/node_modules/@types/connect/index.d.ts +91 -0
- package/node_modules/@types/connect/package.json +32 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +1095 -0
- package/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +460 -0
- package/node_modules/@types/node/buffer.d.ts +1926 -0
- package/node_modules/@types/node/child_process.d.ts +1549 -0
- package/node_modules/@types/node/cluster.d.ts +579 -0
- package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +452 -0
- package/node_modules/@types/node/constants.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +4510 -0
- package/node_modules/@types/node/dgram.d.ts +599 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/node_modules/@types/node/dns/promises.d.ts +476 -0
- package/node_modules/@types/node/dns.d.ts +865 -0
- package/node_modules/@types/node/dom-events.d.ts +124 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +931 -0
- package/node_modules/@types/node/fs/promises.d.ts +1275 -0
- package/node_modules/@types/node/fs.d.ts +4353 -0
- package/node_modules/@types/node/globals.d.ts +511 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +21 -0
- package/node_modules/@types/node/http.d.ts +1959 -0
- package/node_modules/@types/node/http2.d.ts +2558 -0
- package/node_modules/@types/node/https.d.ts +545 -0
- package/node_modules/@types/node/index.d.ts +92 -0
- package/node_modules/@types/node/inspector.d.ts +3966 -0
- package/node_modules/@types/node/module.d.ts +747 -0
- package/node_modules/@types/node/net.d.ts +1029 -0
- package/node_modules/@types/node/os.d.ts +495 -0
- package/node_modules/@types/node/package.json +220 -0
- package/node_modules/@types/node/path.d.ts +200 -0
- package/node_modules/@types/node/perf_hooks.d.ts +970 -0
- package/node_modules/@types/node/process.d.ts +2041 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +153 -0
- package/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/node_modules/@types/node/readline.d.ts +589 -0
- package/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@types/node/sea.d.ts +153 -0
- package/node_modules/@types/node/sqlite.d.ts +485 -0
- package/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/node_modules/@types/node/stream/web.d.ts +614 -0
- package/node_modules/@types/node/stream.d.ts +1662 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +2232 -0
- package/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/node_modules/@types/node/timers.d.ts +287 -0
- package/node_modules/@types/node/tls.d.ts +1226 -0
- package/node_modules/@types/node/trace_events.d.ts +197 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +457 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +92 -0
- package/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@types/node/url.d.ts +972 -0
- package/node_modules/@types/node/util.d.ts +2446 -0
- package/node_modules/@types/node/v8.d.ts +808 -0
- package/node_modules/@types/node/vm.d.ts +976 -0
- package/node_modules/@types/node/wasi.d.ts +181 -0
- package/node_modules/@types/node/worker_threads.d.ts +746 -0
- package/node_modules/@types/node/zlib.d.ts +539 -0
- package/node_modules/@types/uuid/LICENSE +21 -0
- package/node_modules/@types/uuid/README.md +16 -0
- package/node_modules/@types/uuid/index.d.mts +10 -0
- package/node_modules/@types/uuid/index.d.ts +80 -0
- package/node_modules/@types/uuid/package.json +54 -0
- package/node_modules/@types/ws/LICENSE +21 -0
- package/node_modules/@types/ws/README.md +16 -0
- package/node_modules/@types/ws/index.d.ts +353 -0
- package/node_modules/@types/ws/package.json +57 -0
- package/node_modules/JSONStream/.travis.yml +8 -0
- package/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- package/node_modules/JSONStream/LICENSE.MIT +24 -0
- package/node_modules/JSONStream/bin.js +12 -0
- package/node_modules/JSONStream/examples/all_docs.js +13 -0
- package/node_modules/JSONStream/index.js +247 -0
- package/node_modules/JSONStream/package.json +40 -0
- package/node_modules/JSONStream/readme.markdown +207 -0
- package/node_modules/JSONStream/test/bool.js +41 -0
- package/node_modules/JSONStream/test/browser.js +18 -0
- package/node_modules/JSONStream/test/destroy_missing.js +27 -0
- package/node_modules/JSONStream/test/doubledot1.js +29 -0
- package/node_modules/JSONStream/test/doubledot2.js +30 -0
- package/node_modules/JSONStream/test/empty.js +44 -0
- package/node_modules/JSONStream/test/error_contents.js +45 -0
- package/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- package/node_modules/JSONStream/test/fixtures/couch_sample.json +18 -0
- package/node_modules/JSONStream/test/fixtures/depth.json +15 -0
- package/node_modules/JSONStream/test/fixtures/error.json +1 -0
- package/node_modules/JSONStream/test/fixtures/header_footer.json +19 -0
- package/node_modules/JSONStream/test/fn.js +39 -0
- package/node_modules/JSONStream/test/gen.js +135 -0
- package/node_modules/JSONStream/test/header_footer.js +55 -0
- package/node_modules/JSONStream/test/issues.js +34 -0
- package/node_modules/JSONStream/test/keys.js +105 -0
- package/node_modules/JSONStream/test/map.js +40 -0
- package/node_modules/JSONStream/test/multiple_objects.js +36 -0
- package/node_modules/JSONStream/test/multiple_objects_error.js +29 -0
- package/node_modules/JSONStream/test/null.js +28 -0
- package/node_modules/JSONStream/test/parsejson.js +29 -0
- package/node_modules/JSONStream/test/run.js +13 -0
- package/node_modules/JSONStream/test/stringify.js +41 -0
- package/node_modules/JSONStream/test/stringify_object.js +47 -0
- package/node_modules/JSONStream/test/test.js +35 -0
- package/node_modules/JSONStream/test/test2.js +29 -0
- package/node_modules/JSONStream/test/two-ways.js +41 -0
- package/node_modules/agentkeepalive/LICENSE +23 -0
- package/node_modules/agentkeepalive/README.md +256 -0
- package/node_modules/agentkeepalive/browser.js +5 -0
- package/node_modules/agentkeepalive/index.d.ts +69 -0
- package/node_modules/agentkeepalive/index.js +7 -0
- package/node_modules/agentkeepalive/lib/agent.js +402 -0
- package/node_modules/agentkeepalive/lib/constants.js +14 -0
- package/node_modules/agentkeepalive/lib/https_agent.js +51 -0
- package/node_modules/agentkeepalive/package.json +56 -0
- package/node_modules/base-x/LICENSE.md +22 -0
- package/node_modules/base-x/README.md +67 -0
- package/node_modules/base-x/package.json +49 -0
- package/node_modules/base-x/src/index.d.ts +10 -0
- package/node_modules/base-x/src/index.js +123 -0
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/bigint-buffer/.travis.yml +51 -0
- package/node_modules/bigint-buffer/LICENSE +202 -0
- package/node_modules/bigint-buffer/README.md +121 -0
- package/node_modules/bigint-buffer/binding.gyp +8 -0
- package/node_modules/bigint-buffer/build/Makefile +347 -0
- package/node_modules/bigint-buffer/build/Release/.deps/Release/bigint_buffer.node.d +1 -0
- package/node_modules/bigint-buffer/build/Release/.deps/Release/obj.target/bigint_buffer/src/bigint-buffer.o.d +12 -0
- package/node_modules/bigint-buffer/build/Release/bigint_buffer.node +0 -0
- package/node_modules/bigint-buffer/build/Release/obj.target/bigint_buffer/src/bigint-buffer.o +0 -0
- package/node_modules/bigint-buffer/build/bigint_buffer.target.mk +180 -0
- package/node_modules/bigint-buffer/build/binding.Makefile +6 -0
- package/node_modules/bigint-buffer/build/config.gypi +450 -0
- package/node_modules/bigint-buffer/build/gyp-mac-tool +772 -0
- package/node_modules/bigint-buffer/dist/browser.js +69 -0
- package/node_modules/bigint-buffer/dist/index.bench.d.ts +1 -0
- package/node_modules/bigint-buffer/dist/index.d.ts +27 -0
- package/node_modules/bigint-buffer/dist/index.spec.d.ts +1 -0
- package/node_modules/bigint-buffer/dist/node.js +77 -0
- package/node_modules/bigint-buffer/helper/bigint.d.ts +3 -0
- package/node_modules/bigint-buffer/karma.conf.js +62 -0
- package/node_modules/bigint-buffer/package.json +89 -0
- package/node_modules/bigint-buffer/rollup.config.js +13 -0
- package/node_modules/bigint-buffer/src/bigint-buffer.c +203 -0
- package/node_modules/bigint-buffer/src/index.bench.ts +207 -0
- package/node_modules/bigint-buffer/src/index.spec.ts +288 -0
- package/node_modules/bigint-buffer/src/index.ts +84 -0
- package/node_modules/bigint-buffer/tsconfig.json +19 -0
- package/node_modules/bindings/LICENSE.md +22 -0
- package/node_modules/bindings/README.md +98 -0
- package/node_modules/bindings/bindings.js +221 -0
- package/node_modules/bindings/package.json +28 -0
- package/node_modules/bn.js/LICENSE +19 -0
- package/node_modules/bn.js/README.md +214 -0
- package/node_modules/bn.js/lib/bn.js +3547 -0
- package/node_modules/bn.js/package.json +39 -0
- package/node_modules/borsh/LICENSE-APACHE +201 -0
- package/node_modules/borsh/LICENSE-MIT.txt +23 -0
- package/node_modules/borsh/README.md +83 -0
- package/node_modules/borsh/lib/index.d.ts +52 -0
- package/node_modules/borsh/lib/index.js +440 -0
- package/node_modules/borsh/package.json +61 -0
- package/node_modules/bs58/README.md +71 -0
- package/node_modules/bs58/index.js +4 -0
- package/node_modules/bs58/package.json +37 -0
- package/node_modules/buffer/AUTHORS.md +73 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +194 -0
- package/node_modules/buffer/index.js +2106 -0
- package/node_modules/buffer/package.json +93 -0
- package/node_modules/buffer-layout/.eslintrc.js +45 -0
- package/node_modules/buffer-layout/.travis.yml +9 -0
- package/node_modules/buffer-layout/CHANGELOG.md +222 -0
- package/node_modules/buffer-layout/LICENSE +21 -0
- package/node_modules/buffer-layout/README.md +397 -0
- package/node_modules/buffer-layout/jsdoc/conf.json +10 -0
- package/node_modules/buffer-layout/jsdoc/custom/local.js +75 -0
- package/node_modules/buffer-layout/lib/Layout.js +2712 -0
- package/node_modules/buffer-layout/package.json +40 -0
- package/node_modules/buffer-layout/test/LayoutTest.js +2162 -0
- package/node_modules/buffer-layout/test/examples.c +112 -0
- package/node_modules/buffer-layout/test/examples.js +259 -0
- package/node_modules/buffer-layout/test/n64.c +71 -0
- package/node_modules/buffer-layout/x.js +36 -0
- package/node_modules/bufferutil/LICENSE +20 -0
- package/node_modules/bufferutil/README.md +79 -0
- package/node_modules/bufferutil/binding.gyp +32 -0
- package/node_modules/bufferutil/fallback.js +34 -0
- package/node_modules/bufferutil/index.js +7 -0
- package/node_modules/bufferutil/package.json +36 -0
- package/node_modules/bufferutil/prebuilds/darwin-x64+arm64/bufferutil.node +0 -0
- package/node_modules/bufferutil/prebuilds/linux-x64/bufferutil.node +0 -0
- package/node_modules/bufferutil/prebuilds/win32-ia32/bufferutil.node +0 -0
- package/node_modules/bufferutil/prebuilds/win32-x64/bufferutil.node +0 -0
- package/node_modules/bufferutil/src/bufferutil.c +171 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +428 -0
- package/node_modules/commander/index.js +1224 -0
- package/node_modules/commander/package.json +38 -0
- package/node_modules/commander/typings/index.d.ts +310 -0
- package/node_modules/cross-fetch/LICENSE +21 -0
- package/node_modules/cross-fetch/README.md +169 -0
- package/node_modules/cross-fetch/dist/browser-polyfill.js +658 -0
- package/node_modules/cross-fetch/dist/browser-ponyfill.js +686 -0
- package/node_modules/cross-fetch/dist/cross-fetch.js +2 -0
- package/node_modules/cross-fetch/dist/cross-fetch.js.map +1 -0
- package/node_modules/cross-fetch/dist/node-polyfill.js +11 -0
- package/node_modules/cross-fetch/dist/node-ponyfill.js +22 -0
- package/node_modules/cross-fetch/dist/react-native-polyfill.js +12 -0
- package/node_modules/cross-fetch/dist/react-native-ponyfill.js +6 -0
- package/node_modules/cross-fetch/index.d.ts +14 -0
- package/node_modules/cross-fetch/package.json +127 -0
- package/node_modules/cross-fetch/polyfill/package.json +8 -0
- package/node_modules/delay/index.d.ts +107 -0
- package/node_modules/delay/index.js +72 -0
- package/node_modules/delay/license +9 -0
- package/node_modules/delay/package.json +54 -0
- package/node_modules/delay/readme.md +173 -0
- package/node_modules/es6-promise/LICENSE +19 -0
- package/node_modules/es6-promise/README.md +97 -0
- package/node_modules/es6-promise/auto.js +4 -0
- package/node_modules/es6-promise/dist/es6-promise.auto.js +1176 -0
- package/node_modules/es6-promise/dist/es6-promise.auto.map +1 -0
- package/node_modules/es6-promise/dist/es6-promise.auto.min.js +1 -0
- package/node_modules/es6-promise/dist/es6-promise.auto.min.map +1 -0
- package/node_modules/es6-promise/dist/es6-promise.js +1174 -0
- package/node_modules/es6-promise/dist/es6-promise.map +1 -0
- package/node_modules/es6-promise/dist/es6-promise.min.js +1 -0
- package/node_modules/es6-promise/dist/es6-promise.min.map +1 -0
- package/node_modules/es6-promise/es6-promise.d.ts +85 -0
- package/node_modules/es6-promise/lib/es6-promise/-internal.js +243 -0
- package/node_modules/es6-promise/lib/es6-promise/asap.js +119 -0
- package/node_modules/es6-promise/lib/es6-promise/enumerator.js +124 -0
- package/node_modules/es6-promise/lib/es6-promise/polyfill.js +35 -0
- package/node_modules/es6-promise/lib/es6-promise/promise/all.js +52 -0
- package/node_modules/es6-promise/lib/es6-promise/promise/race.js +84 -0
- package/node_modules/es6-promise/lib/es6-promise/promise/reject.js +46 -0
- package/node_modules/es6-promise/lib/es6-promise/promise/resolve.js +48 -0
- package/node_modules/es6-promise/lib/es6-promise/promise.js +431 -0
- package/node_modules/es6-promise/lib/es6-promise/then.js +32 -0
- package/node_modules/es6-promise/lib/es6-promise/utils.js +21 -0
- package/node_modules/es6-promise/lib/es6-promise.auto.js +3 -0
- package/node_modules/es6-promise/lib/es6-promise.js +7 -0
- package/node_modules/es6-promise/package.json +78 -0
- package/node_modules/es6-promisify/README.md +89 -0
- package/node_modules/es6-promisify/dist/promise.js +73 -0
- package/node_modules/es6-promisify/dist/promisify.js +85 -0
- package/node_modules/es6-promisify/package.json +41 -0
- package/node_modules/eventemitter3/LICENSE +21 -0
- package/node_modules/eventemitter3/README.md +94 -0
- package/node_modules/eventemitter3/index.d.ts +134 -0
- package/node_modules/eventemitter3/index.js +336 -0
- package/node_modules/eventemitter3/package.json +56 -0
- package/node_modules/eventemitter3/umd/eventemitter3.js +340 -0
- package/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
- package/node_modules/eventemitter3/umd/eventemitter3.min.js.map +1 -0
- package/node_modules/eyes/LICENSE +20 -0
- package/node_modules/eyes/Makefile +4 -0
- package/node_modules/eyes/README.md +73 -0
- package/node_modules/eyes/lib/eyes.js +236 -0
- package/node_modules/eyes/package.json +14 -0
- package/node_modules/eyes/test/eyes-test.js +56 -0
- package/node_modules/fast-stable-stringify/.npmignore +4 -0
- package/node_modules/fast-stable-stringify/.travis.yml +10 -0
- package/node_modules/fast-stable-stringify/LICENSE +21 -0
- package/node_modules/fast-stable-stringify/README.md +81 -0
- package/node_modules/fast-stable-stringify/cli/files-to-comparison-results.js +67 -0
- package/node_modules/fast-stable-stringify/cli/format-table.js +70 -0
- package/node_modules/fast-stable-stringify/cli/index.js +19 -0
- package/node_modules/fast-stable-stringify/fixtures/index.js +5 -0
- package/node_modules/fast-stable-stringify/fixtures/input-data-types.js +191 -0
- package/node_modules/fast-stable-stringify/fixtures/log-result.json +22 -0
- package/node_modules/fast-stable-stringify/fixtures/log.txt +24 -0
- package/node_modules/fast-stable-stringify/index.js +73 -0
- package/node_modules/fast-stable-stringify/karma.conf.js +124 -0
- package/node_modules/fast-stable-stringify/karma.conf.travis.js +95 -0
- package/node_modules/fast-stable-stringify/package.json +47 -0
- package/node_modules/fast-stable-stringify/results/escape-long/Chrome 60.0.3112 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/Edge 14.14393.0 (Windows 10 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/Firefox 54.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/IE 10.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/IE 11.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/IE 9.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/Mobile Safari 10.0.0 (iOS 10.3.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-long/Safari 10.0.1 (Mac OS X 10.12.1).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/Chrome 60.0.3112 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/Edge 14.14393.0 (Windows 10 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/Firefox 54.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/IE 10.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/IE 11.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/IE 9.0.0 (Windows 7 0.0.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/Mobile Safari 10.0.0 (iOS 10.3.0).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape-short/Safari 10.0.1 (Mac OS X 10.12.1).json +57 -0
- package/node_modules/fast-stable-stringify/results/escape.md +20 -0
- package/node_modules/fast-stable-stringify/results/itar-long/Chrome 60.0.3112 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/Edge 14.14393.0 (Windows 10 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/Firefox 54.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/IE 10.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/IE 11.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/IE 9.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/Mobile Safari 10.0.0 (iOS 10.3.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-long/Safari 10.0.1 (Mac OS X 10.12.1).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/Chrome 60.0.3112 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/Edge 14.14393.0 (Windows 10 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/Firefox 54.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/IE 10.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/IE 11.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/IE 9.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/Mobile Safari 10.0.0 (iOS 10.3.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar-short/Safari 10.0.1 (Mac OS X 10.12.1).json +35 -0
- package/node_modules/fast-stable-stringify/results/itar.md +20 -0
- package/node_modules/fast-stable-stringify/results/iter/Chrome 60.0.3112 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 39.0.0 (Android 5.1.1).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 55.0.2883 (Android 6.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Edge 14.14393.0 (Windows 10 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Firefox 54.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/IE 10.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/IE 11.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/IE 9.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Mobile Safari 10.0.0 (iOS 10.3.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Mobile Safari 9.0.0 (iOS 9.2.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Safari 10.0.1 (Mac OS X 10.12.1).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter/Safari 9.1.2 (Mac OS X 10.11.6).json +35 -0
- package/node_modules/fast-stable-stringify/results/iter.md +14 -0
- package/node_modules/fast-stable-stringify/results/libs/Chrome 60.0.3112 (Windows 7 0.0.0).json +46 -0
- package/node_modules/fast-stable-stringify/results/libs/Chrome Mobile 55.0.2883 (Android 6.0.0).json +46 -0
- package/node_modules/fast-stable-stringify/results/libs/Edge 14.14393.0 (Windows 10 0.0.0).json +46 -0
- package/node_modules/fast-stable-stringify/results/libs/Firefox 54.0.0 (Windows 7 0.0.0).json +46 -0
- package/node_modules/fast-stable-stringify/results/libs/IE 10.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/libs/IE 11.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/libs/IE 9.0.0 (Windows 7 0.0.0).json +35 -0
- package/node_modules/fast-stable-stringify/results/libs/Mobile Safari 10.0.0 (iOS 10.3.0).json +46 -0
- package/node_modules/fast-stable-stringify/results/libs/Safari 10.0.1 (Mac OS X 10.12.1).json +46 -0
- package/node_modules/fast-stable-stringify/results/libs.md +15 -0
- package/node_modules/fast-stable-stringify/test/escape-long.js +147 -0
- package/node_modules/fast-stable-stringify/test/escape-short.js +147 -0
- package/node_modules/fast-stable-stringify/test/index.js +6 -0
- package/node_modules/fast-stable-stringify/test/itar-long.js +52 -0
- package/node_modules/fast-stable-stringify/test/itar-short.js +52 -0
- package/node_modules/fast-stable-stringify/test/iter.js +84 -0
- package/node_modules/fast-stable-stringify/test/libs.js +57 -0
- package/node_modules/fast-stable-stringify/test/travis.js +43 -0
- package/node_modules/fast-stable-stringify/test/validate.js +24 -0
- package/node_modules/fast-stable-stringify/util/eachRecursive.js +9 -0
- package/node_modules/fast-stable-stringify/util/get-git-hash-sync.js +21 -0
- package/node_modules/fast-stable-stringify/util/get-lib-info.js +22 -0
- package/node_modules/fast-stable-stringify/util/object-path.js +47 -0
- package/node_modules/fast-stable-stringify/v8-profile/bench.js +8 -0
- package/node_modules/fast-stable-stringify/v8-profile/run.sh +2 -0
- package/node_modules/fast-stable-stringify/zuul-local.sh +2 -0
- package/node_modules/file-uri-to-path/.npmignore +1 -0
- package/node_modules/file-uri-to-path/.travis.yml +30 -0
- package/node_modules/file-uri-to-path/History.md +21 -0
- package/node_modules/file-uri-to-path/LICENSE +20 -0
- package/node_modules/file-uri-to-path/README.md +74 -0
- package/node_modules/file-uri-to-path/index.d.ts +2 -0
- package/node_modules/file-uri-to-path/index.js +66 -0
- package/node_modules/file-uri-to-path/package.json +32 -0
- package/node_modules/file-uri-to-path/test/test.js +24 -0
- package/node_modules/file-uri-to-path/test/tests.json +13 -0
- package/node_modules/humanize-ms/LICENSE +17 -0
- package/node_modules/humanize-ms/README.md +40 -0
- package/node_modules/humanize-ms/index.js +24 -0
- package/node_modules/humanize-ms/package.json +37 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/isomorphic-ws/LICENSE +21 -0
- package/node_modules/isomorphic-ws/README.md +58 -0
- package/node_modules/isomorphic-ws/browser.js +17 -0
- package/node_modules/isomorphic-ws/index.d.ts +8 -0
- package/node_modules/isomorphic-ws/node.js +3 -0
- package/node_modules/isomorphic-ws/package.json +34 -0
- package/node_modules/jayson/.gitignore +8 -0
- package/node_modules/jayson/LICENSE +22 -0
- package/node_modules/jayson/README.md +1387 -0
- package/node_modules/jayson/bin/jayson.js +111 -0
- package/node_modules/jayson/index.d.ts +370 -0
- package/node_modules/jayson/index.js +1 -0
- package/node_modules/jayson/lib/client/browser/index.d.ts +14 -0
- package/node_modules/jayson/lib/client/browser/index.js +163 -0
- package/node_modules/jayson/lib/client/http.js +116 -0
- package/node_modules/jayson/lib/client/https.js +34 -0
- package/node_modules/jayson/lib/client/index.js +220 -0
- package/node_modules/jayson/lib/client/tcp.js +90 -0
- package/node_modules/jayson/lib/client/tls.js +89 -0
- package/node_modules/jayson/lib/client/websocket.js +135 -0
- package/node_modules/jayson/lib/generateRequest.js +63 -0
- package/node_modules/jayson/lib/index.js +31 -0
- package/node_modules/jayson/lib/method.js +120 -0
- package/node_modules/jayson/lib/server/http.js +26 -0
- package/node_modules/jayson/lib/server/https.js +26 -0
- package/node_modules/jayson/lib/server/index.js +475 -0
- package/node_modules/jayson/lib/server/middleware.js +75 -0
- package/node_modules/jayson/lib/server/tcp.js +72 -0
- package/node_modules/jayson/lib/server/tls.js +72 -0
- package/node_modules/jayson/lib/server/websocket.js +62 -0
- package/node_modules/jayson/lib/utils.js +511 -0
- package/node_modules/jayson/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/jayson/node_modules/@types/node/README.md +16 -0
- package/node_modules/jayson/node_modules/@types/node/assert.d.ts +117 -0
- package/node_modules/jayson/node_modules/@types/node/async_hooks.d.ts +246 -0
- package/node_modules/jayson/node_modules/@types/node/buffer.d.ts +22 -0
- package/node_modules/jayson/node_modules/@types/node/child_process.d.ts +507 -0
- package/node_modules/jayson/node_modules/@types/node/cluster.d.ts +260 -0
- package/node_modules/jayson/node_modules/@types/node/console.d.ts +3 -0
- package/node_modules/jayson/node_modules/@types/node/constants.d.ts +448 -0
- package/node_modules/jayson/node_modules/@types/node/crypto.d.ts +1183 -0
- package/node_modules/jayson/node_modules/@types/node/dgram.d.ts +118 -0
- package/node_modules/jayson/node_modules/@types/node/dns.d.ts +372 -0
- package/node_modules/jayson/node_modules/@types/node/domain.d.ts +16 -0
- package/node_modules/jayson/node_modules/@types/node/events.d.ts +47 -0
- package/node_modules/jayson/node_modules/@types/node/fs.d.ts +2567 -0
- package/node_modules/jayson/node_modules/@types/node/globals.d.ts +1351 -0
- package/node_modules/jayson/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/jayson/node_modules/@types/node/http.d.ts +456 -0
- package/node_modules/jayson/node_modules/@types/node/http2.d.ts +952 -0
- package/node_modules/jayson/node_modules/@types/node/https.d.ts +156 -0
- package/node_modules/jayson/node_modules/@types/node/index.d.ts +91 -0
- package/node_modules/jayson/node_modules/@types/node/inspector.d.ts +3040 -0
- package/node_modules/jayson/node_modules/@types/node/module.d.ts +3 -0
- package/node_modules/jayson/node_modules/@types/node/net.d.ts +290 -0
- package/node_modules/jayson/node_modules/@types/node/os.d.ts +263 -0
- package/node_modules/jayson/node_modules/@types/node/package.json +195 -0
- package/node_modules/jayson/node_modules/@types/node/path.d.ts +159 -0
- package/node_modules/jayson/node_modules/@types/node/perf_hooks.d.ts +259 -0
- package/node_modules/jayson/node_modules/@types/node/process.d.ts +15 -0
- package/node_modules/jayson/node_modules/@types/node/punycode.d.ts +75 -0
- package/node_modules/jayson/node_modules/@types/node/querystring.d.ts +29 -0
- package/node_modules/jayson/node_modules/@types/node/readline.d.ts +158 -0
- package/node_modules/jayson/node_modules/@types/node/repl.d.ts +390 -0
- package/node_modules/jayson/node_modules/@types/node/stream.d.ts +334 -0
- package/node_modules/jayson/node_modules/@types/node/string_decoder.d.ts +7 -0
- package/node_modules/jayson/node_modules/@types/node/timers.d.ts +16 -0
- package/node_modules/jayson/node_modules/@types/node/tls.d.ts +713 -0
- package/node_modules/jayson/node_modules/@types/node/trace_events.d.ts +61 -0
- package/node_modules/jayson/node_modules/@types/node/tty.d.ts +66 -0
- package/node_modules/jayson/node_modules/@types/node/url.d.ts +147 -0
- package/node_modules/jayson/node_modules/@types/node/util.d.ts +200 -0
- package/node_modules/jayson/node_modules/@types/node/v8.d.ts +197 -0
- package/node_modules/jayson/node_modules/@types/node/vm.d.ts +112 -0
- package/node_modules/jayson/node_modules/@types/node/wasi.d.ts +55 -0
- package/node_modules/jayson/node_modules/@types/node/worker_threads.d.ts +207 -0
- package/node_modules/jayson/node_modules/@types/node/zlib.d.ts +356 -0
- package/node_modules/jayson/package.json +86 -0
- package/node_modules/jayson/promise/index.d.ts +367 -0
- package/node_modules/jayson/promise/index.js +3 -0
- package/node_modules/jayson/promise/lib/client/browser/index.d.ts +12 -0
- package/node_modules/jayson/promise/lib/client/browser/index.js +28 -0
- package/node_modules/jayson/promise/lib/client/http.js +23 -0
- package/node_modules/jayson/promise/lib/client/https.js +24 -0
- package/node_modules/jayson/promise/lib/client/index.js +53 -0
- package/node_modules/jayson/promise/lib/client/tcp.js +23 -0
- package/node_modules/jayson/promise/lib/client/tls.js +23 -0
- package/node_modules/jayson/promise/lib/client/websocket.js +23 -0
- package/node_modules/jayson/promise/lib/index.js +33 -0
- package/node_modules/jayson/promise/lib/method.js +54 -0
- package/node_modules/jayson/promise/lib/server.js +23 -0
- package/node_modules/jayson/promise/lib/utils.js +23 -0
- package/node_modules/json-stringify-safe/.npmignore +1 -0
- package/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- package/node_modules/json-stringify-safe/LICENSE +15 -0
- package/node_modules/json-stringify-safe/Makefile +35 -0
- package/node_modules/json-stringify-safe/README.md +52 -0
- package/node_modules/json-stringify-safe/package.json +31 -0
- package/node_modules/json-stringify-safe/stringify.js +27 -0
- package/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- package/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- package/node_modules/jsonparse/.npmignore +1 -0
- package/node_modules/jsonparse/LICENSE +24 -0
- package/node_modules/jsonparse/README.markdown +11 -0
- package/node_modules/jsonparse/bench.js +26 -0
- package/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- package/node_modules/jsonparse/jsonparse.js +413 -0
- package/node_modules/jsonparse/package.json +22 -0
- package/node_modules/jsonparse/samplejson/basic.json +167 -0
- package/node_modules/jsonparse/samplejson/basic2.json +180 -0
- package/node_modules/jsonparse/test/big-token.js +24 -0
- package/node_modules/jsonparse/test/boundary.js +110 -0
- package/node_modules/jsonparse/test/offset.js +67 -0
- package/node_modules/jsonparse/test/primitives.js +57 -0
- package/node_modules/jsonparse/test/surrogate.js +26 -0
- package/node_modules/jsonparse/test/unvalid.js +15 -0
- package/node_modules/jsonparse/test/utf8.js +38 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/node-fetch/LICENSE.md +22 -0
- package/node_modules/node-fetch/README.md +634 -0
- package/node_modules/node-fetch/browser.js +25 -0
- package/node_modules/node-fetch/lib/index.es.js +1777 -0
- package/node_modules/node-fetch/lib/index.js +1787 -0
- package/node_modules/node-fetch/lib/index.mjs +1775 -0
- package/node_modules/node-fetch/package.json +89 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +177 -0
- package/node_modules/pako/dist/pako.es5.js +6688 -0
- package/node_modules/pako/dist/pako.es5.min.js +2 -0
- package/node_modules/pako/dist/pako.esm.mjs +6877 -0
- package/node_modules/pako/dist/pako.js +6896 -0
- package/node_modules/pako/dist/pako.min.js +2 -0
- package/node_modules/pako/dist/pako_deflate.es5.js +3924 -0
- package/node_modules/pako/dist/pako_deflate.es5.min.js +2 -0
- package/node_modules/pako/dist/pako_deflate.js +4126 -0
- package/node_modules/pako/dist/pako_deflate.min.js +2 -0
- package/node_modules/pako/dist/pako_inflate.es5.js +3229 -0
- package/node_modules/pako/dist/pako_inflate.es5.min.js +2 -0
- package/node_modules/pako/dist/pako_inflate.js +3239 -0
- package/node_modules/pako/dist/pako_inflate.min.js +2 -0
- package/node_modules/pako/index.js +18 -0
- package/node_modules/pako/lib/deflate.js +380 -0
- package/node_modules/pako/lib/inflate.js +419 -0
- package/node_modules/pako/lib/utils/common.js +48 -0
- package/node_modules/pako/lib/utils/strings.js +174 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +2048 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +344 -0
- package/node_modules/pako/lib/zlib/inflate.js +1572 -0
- package/node_modules/pako/lib/zlib/inftrees.js +340 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1179 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +64 -0
- package/node_modules/regenerator-runtime/LICENSE +21 -0
- package/node_modules/regenerator-runtime/README.md +31 -0
- package/node_modules/regenerator-runtime/package.json +19 -0
- package/node_modules/regenerator-runtime/path.js +11 -0
- package/node_modules/regenerator-runtime/runtime.js +761 -0
- package/node_modules/rpc-websockets/LICENSE +10 -0
- package/node_modules/rpc-websockets/README.md +156 -0
- package/node_modules/rpc-websockets/dist/index.browser-bundle.js +14 -0
- package/node_modules/rpc-websockets/dist/index.browser.cjs +389 -0
- package/node_modules/rpc-websockets/dist/index.browser.cjs.map +1 -0
- package/node_modules/rpc-websockets/dist/index.browser.d.mts +225 -0
- package/node_modules/rpc-websockets/dist/index.browser.d.ts +225 -0
- package/node_modules/rpc-websockets/dist/index.browser.mjs +384 -0
- package/node_modules/rpc-websockets/dist/index.browser.mjs.map +1 -0
- package/node_modules/rpc-websockets/dist/index.cjs +898 -0
- package/node_modules/rpc-websockets/dist/index.cjs.map +1 -0
- package/node_modules/rpc-websockets/dist/index.d.mts +415 -0
- package/node_modules/rpc-websockets/dist/index.d.ts +415 -0
- package/node_modules/rpc-websockets/dist/index.mjs +886 -0
- package/node_modules/rpc-websockets/dist/index.mjs.map +1 -0
- package/node_modules/rpc-websockets/node_modules/@types/ws/LICENSE +21 -0
- package/node_modules/rpc-websockets/node_modules/@types/ws/README.md +15 -0
- package/node_modules/rpc-websockets/node_modules/@types/ws/index.d.mts +451 -0
- package/node_modules/rpc-websockets/node_modules/@types/ws/index.d.ts +445 -0
- package/node_modules/rpc-websockets/node_modules/@types/ws/package.json +72 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/LICENSE +21 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/README.md +94 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.esm.js +347 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.umd.js +355 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/index.d.ts +135 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/index.js +336 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/index.mjs +4 -0
- package/node_modules/rpc-websockets/node_modules/eventemitter3/package.json +67 -0
- package/node_modules/rpc-websockets/node_modules/ws/LICENSE +20 -0
- package/node_modules/rpc-websockets/node_modules/ws/README.md +548 -0
- package/node_modules/rpc-websockets/node_modules/ws/browser.js +8 -0
- package/node_modules/rpc-websockets/node_modules/ws/index.js +13 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/constants.js +18 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/permessage-deflate.js +514 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/websocket-server.js +540 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/websocket.js +1388 -0
- package/node_modules/rpc-websockets/node_modules/ws/package.json +69 -0
- package/node_modules/rpc-websockets/node_modules/ws/wrapper.mjs +8 -0
- package/node_modules/rpc-websockets/package.json +90 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/superstruct/License.md +9 -0
- package/node_modules/superstruct/Readme.md +228 -0
- package/node_modules/superstruct/lib/coercions.d.ts +19 -0
- package/node_modules/superstruct/lib/coercions.d.ts.map +1 -0
- package/node_modules/superstruct/lib/error.d.ts +32 -0
- package/node_modules/superstruct/lib/error.d.ts.map +1 -0
- package/node_modules/superstruct/lib/index.cjs +1257 -0
- package/node_modules/superstruct/lib/index.cjs.d.ts +579 -0
- package/node_modules/superstruct/lib/index.cjs.map +1 -0
- package/node_modules/superstruct/lib/index.d.cts +579 -0
- package/node_modules/superstruct/lib/index.d.ts +7 -0
- package/node_modules/superstruct/lib/index.d.ts.map +1 -0
- package/node_modules/superstruct/lib/index.es.d.ts +579 -0
- package/node_modules/superstruct/lib/index.es.js +1203 -0
- package/node_modules/superstruct/lib/index.es.js.map +1 -0
- package/node_modules/superstruct/lib/refinements.d.ts +19 -0
- package/node_modules/superstruct/lib/refinements.d.ts.map +1 -0
- package/node_modules/superstruct/lib/struct.d.ts +110 -0
- package/node_modules/superstruct/lib/struct.d.ts.map +1 -0
- package/node_modules/superstruct/lib/structs/coercions.d.ts +29 -0
- package/node_modules/superstruct/lib/structs/coercions.d.ts.map +1 -0
- package/node_modules/superstruct/lib/structs/refinements.d.ts +38 -0
- package/node_modules/superstruct/lib/structs/refinements.d.ts.map +1 -0
- package/node_modules/superstruct/lib/structs/types.d.ts +142 -0
- package/node_modules/superstruct/lib/structs/types.d.ts.map +1 -0
- package/node_modules/superstruct/lib/structs/utilities.d.ts +66 -0
- package/node_modules/superstruct/lib/structs/utilities.d.ts.map +1 -0
- package/node_modules/superstruct/lib/types.d.ts +200 -0
- package/node_modules/superstruct/lib/types.d.ts.map +1 -0
- package/node_modules/superstruct/lib/typings.d.ts +36 -0
- package/node_modules/superstruct/lib/typings.d.ts.map +1 -0
- package/node_modules/superstruct/lib/utilities.d.ts +56 -0
- package/node_modules/superstruct/lib/utilities.d.ts.map +1 -0
- package/node_modules/superstruct/lib/utils.d.ts +139 -0
- package/node_modules/superstruct/lib/utils.d.ts.map +1 -0
- package/node_modules/superstruct/lib/xtras.d.ts +56 -0
- package/node_modules/superstruct/lib/xtras.d.ts.map +1 -0
- package/node_modules/superstruct/package.json +110 -0
- package/node_modules/superstruct/umd/coercions.d.ts +18 -0
- package/node_modules/superstruct/umd/index.d.ts +4 -0
- package/node_modules/superstruct/umd/refinements.d.ts +14 -0
- package/node_modules/superstruct/umd/struct.d.ts +80 -0
- package/node_modules/superstruct/umd/superstruct.d.ts +579 -0
- package/node_modules/superstruct/umd/superstruct.js +1262 -0
- package/node_modules/superstruct/umd/superstruct.min.d.ts +579 -0
- package/node_modules/superstruct/umd/superstruct.min.js +1 -0
- package/node_modules/superstruct/umd/types.d.ts +127 -0
- package/node_modules/superstruct/umd/utils.d.ts +9 -0
- package/node_modules/text-encoding-utf-8/LICENSE.md +29 -0
- package/node_modules/text-encoding-utf-8/README.md +63 -0
- package/node_modules/text-encoding-utf-8/lib/encoding.js +655 -0
- package/node_modules/text-encoding-utf-8/lib/encoding.lib.js +642 -0
- package/node_modules/text-encoding-utf-8/lib/encoding.lib.mjs +665 -0
- package/node_modules/text-encoding-utf-8/package.json +26 -0
- package/node_modules/text-encoding-utf-8/src/encoding.js +665 -0
- package/node_modules/text-encoding-utf-8/src/polyfill.js +21 -0
- package/node_modules/through/.travis.yml +5 -0
- package/node_modules/through/LICENSE.APACHE2 +15 -0
- package/node_modules/through/LICENSE.MIT +24 -0
- package/node_modules/through/index.js +108 -0
- package/node_modules/through/package.json +36 -0
- package/node_modules/through/readme.markdown +64 -0
- package/node_modules/through/test/async.js +28 -0
- package/node_modules/through/test/auto-destroy.js +30 -0
- package/node_modules/through/test/buffering.js +71 -0
- package/node_modules/through/test/end.js +45 -0
- package/node_modules/through/test/index.js +133 -0
- package/node_modules/toml/.jshintrc +18 -0
- package/node_modules/toml/.travis.yml +7 -0
- package/node_modules/toml/CHANGELOG.md +116 -0
- package/node_modules/toml/LICENSE +22 -0
- package/node_modules/toml/README.md +93 -0
- package/node_modules/toml/benchmark.js +12 -0
- package/node_modules/toml/index.d.ts +3 -0
- package/node_modules/toml/index.js +9 -0
- package/node_modules/toml/lib/compiler.js +195 -0
- package/node_modules/toml/lib/parser.js +3841 -0
- package/node_modules/toml/package.json +24 -0
- package/node_modules/toml/src/toml.pegjs +231 -0
- package/node_modules/toml/test/bad.toml +5 -0
- package/node_modules/toml/test/example.toml +32 -0
- package/node_modules/toml/test/hard_example.toml +33 -0
- package/node_modules/toml/test/inline_tables.toml +10 -0
- package/node_modules/toml/test/literal_strings.toml +5 -0
- package/node_modules/toml/test/multiline_eat_whitespace.toml +15 -0
- package/node_modules/toml/test/multiline_literal_strings.toml +7 -0
- package/node_modules/toml/test/multiline_strings.toml +6 -0
- package/node_modules/toml/test/smoke.js +22 -0
- package/node_modules/toml/test/table_arrays_easy.toml +10 -0
- package/node_modules/toml/test/table_arrays_hard.toml +31 -0
- package/node_modules/toml/test/test_toml.js +596 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +108 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/node_modules/undici-types/errors.d.ts +149 -0
- package/node_modules/undici-types/eventsource.d.ts +61 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +71 -0
- package/node_modules/undici-types/interceptors.d.ts +17 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +33 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/node_modules/undici-types/readable.d.ts +65 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/webidl.d.ts +228 -0
- package/node_modules/undici-types/websocket.d.ts +150 -0
- package/node_modules/utf-8-validate/LICENSE +30 -0
- package/node_modules/utf-8-validate/README.md +50 -0
- package/node_modules/utf-8-validate/binding.gyp +18 -0
- package/node_modules/utf-8-validate/fallback.js +62 -0
- package/node_modules/utf-8-validate/index.js +7 -0
- package/node_modules/utf-8-validate/package.json +36 -0
- package/node_modules/utf-8-validate/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/node_modules/utf-8-validate/prebuilds/linux-x64/node.napi.node +0 -0
- package/node_modules/utf-8-validate/prebuilds/win32-ia32/node.napi.node +0 -0
- package/node_modules/utf-8-validate/prebuilds/win32-x64/node.napi.node +0 -0
- package/node_modules/utf-8-validate/src/validation.c +109 -0
- package/node_modules/uuid/CHANGELOG.md +229 -0
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +505 -0
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/uuid/dist/rng-browser.js +26 -0
- package/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/uuid/dist/stringify.js +39 -0
- package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/uuid/dist/v35.js +78 -0
- package/node_modules/uuid/dist/v4.js +37 -0
- package/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/uuid/package.json +135 -0
- package/node_modules/uuid/wrapper.mjs +10 -0
- package/node_modules/webidl-conversions/LICENSE.md +12 -0
- package/node_modules/webidl-conversions/README.md +53 -0
- package/node_modules/webidl-conversions/lib/index.js +189 -0
- package/node_modules/webidl-conversions/package.json +23 -0
- package/node_modules/whatwg-url/LICENSE.txt +21 -0
- package/node_modules/whatwg-url/README.md +67 -0
- package/node_modules/whatwg-url/lib/URL-impl.js +200 -0
- package/node_modules/whatwg-url/lib/URL.js +196 -0
- package/node_modules/whatwg-url/lib/public-api.js +11 -0
- package/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
- package/node_modules/whatwg-url/lib/utils.js +20 -0
- package/node_modules/whatwg-url/node_modules/tr46/.npmignore +4 -0
- package/node_modules/whatwg-url/node_modules/tr46/index.js +193 -0
- package/node_modules/whatwg-url/node_modules/tr46/lib/.gitkeep +0 -0
- package/node_modules/whatwg-url/node_modules/tr46/lib/mappingTable.json +1 -0
- package/node_modules/whatwg-url/node_modules/tr46/package.json +31 -0
- package/node_modules/whatwg-url/package.json +32 -0
- package/node_modules/ws/LICENSE +21 -0
- package/node_modules/ws/README.md +495 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +10 -0
- package/node_modules/ws/lib/buffer-util.js +129 -0
- package/node_modules/ws/lib/constants.js +10 -0
- package/node_modules/ws/lib/event-target.js +184 -0
- package/node_modules/ws/lib/extension.js +223 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +518 -0
- package/node_modules/ws/lib/receiver.js +607 -0
- package/node_modules/ws/lib/sender.js +409 -0
- package/node_modules/ws/lib/stream.js +180 -0
- package/node_modules/ws/lib/validation.js +104 -0
- package/node_modules/ws/lib/websocket-server.js +449 -0
- package/node_modules/ws/lib/websocket.js +1197 -0
- package/node_modules/ws/package.json +56 -0
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var __pow = Math.pow;
|
|
1
2
|
var __async = (__this, __arguments, generator) => {
|
|
2
3
|
return new Promise((resolve, reject) => {
|
|
3
4
|
var fulfilled = (value) => {
|
|
@@ -20,14 +21,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
// src/CpAmm.ts
|
|
23
|
-
import { Program } from "@coral-xyz/anchor";
|
|
24
|
-
import {
|
|
25
|
-
getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2,
|
|
26
|
-
NATIVE_MINT as NATIVE_MINT2,
|
|
27
|
-
TOKEN_2022_PROGRAM_ID as TOKEN_2022_PROGRAM_ID2
|
|
28
|
-
} from "@solana/spl-token";
|
|
24
|
+
import { Program, BN as BN9 } from "@coral-xyz/anchor";
|
|
25
|
+
import { NATIVE_MINT as NATIVE_MINT2, TOKEN_2022_PROGRAM_ID as TOKEN_2022_PROGRAM_ID2 } from "@solana/spl-token";
|
|
29
26
|
import invariant from "invariant";
|
|
30
|
-
import Decimal3 from "decimal.js";
|
|
31
27
|
|
|
32
28
|
// src/idl/cp_amm.json
|
|
33
29
|
var cp_amm_default = {
|
|
@@ -1074,6 +1070,123 @@ var cp_amm_default = {
|
|
|
1074
1070
|
],
|
|
1075
1071
|
args: []
|
|
1076
1072
|
},
|
|
1073
|
+
{
|
|
1074
|
+
name: "close_position",
|
|
1075
|
+
discriminator: [
|
|
1076
|
+
123,
|
|
1077
|
+
134,
|
|
1078
|
+
81,
|
|
1079
|
+
0,
|
|
1080
|
+
49,
|
|
1081
|
+
68,
|
|
1082
|
+
98,
|
|
1083
|
+
98
|
|
1084
|
+
],
|
|
1085
|
+
accounts: [
|
|
1086
|
+
{
|
|
1087
|
+
name: "position_nft_mint",
|
|
1088
|
+
docs: [
|
|
1089
|
+
"position_nft_mint"
|
|
1090
|
+
],
|
|
1091
|
+
writable: true
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
name: "position_nft_account",
|
|
1095
|
+
docs: [
|
|
1096
|
+
"The token account for nft"
|
|
1097
|
+
],
|
|
1098
|
+
writable: true
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
name: "pool",
|
|
1102
|
+
writable: true,
|
|
1103
|
+
relations: [
|
|
1104
|
+
"position"
|
|
1105
|
+
]
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: "position",
|
|
1109
|
+
writable: true
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
name: "pool_authority",
|
|
1113
|
+
pda: {
|
|
1114
|
+
seeds: [
|
|
1115
|
+
{
|
|
1116
|
+
kind: "const",
|
|
1117
|
+
value: [
|
|
1118
|
+
112,
|
|
1119
|
+
111,
|
|
1120
|
+
111,
|
|
1121
|
+
108,
|
|
1122
|
+
95,
|
|
1123
|
+
97,
|
|
1124
|
+
117,
|
|
1125
|
+
116,
|
|
1126
|
+
104,
|
|
1127
|
+
111,
|
|
1128
|
+
114,
|
|
1129
|
+
105,
|
|
1130
|
+
116,
|
|
1131
|
+
121
|
|
1132
|
+
]
|
|
1133
|
+
}
|
|
1134
|
+
]
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
name: "rent_receiver",
|
|
1139
|
+
writable: true
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
name: "owner",
|
|
1143
|
+
docs: [
|
|
1144
|
+
"Owner of position"
|
|
1145
|
+
],
|
|
1146
|
+
signer: true
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
name: "token_program",
|
|
1150
|
+
docs: [
|
|
1151
|
+
"Program to create NFT mint/token account and transfer for token22 account"
|
|
1152
|
+
],
|
|
1153
|
+
address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
name: "event_authority",
|
|
1157
|
+
pda: {
|
|
1158
|
+
seeds: [
|
|
1159
|
+
{
|
|
1160
|
+
kind: "const",
|
|
1161
|
+
value: [
|
|
1162
|
+
95,
|
|
1163
|
+
95,
|
|
1164
|
+
101,
|
|
1165
|
+
118,
|
|
1166
|
+
101,
|
|
1167
|
+
110,
|
|
1168
|
+
116,
|
|
1169
|
+
95,
|
|
1170
|
+
97,
|
|
1171
|
+
117,
|
|
1172
|
+
116,
|
|
1173
|
+
104,
|
|
1174
|
+
111,
|
|
1175
|
+
114,
|
|
1176
|
+
105,
|
|
1177
|
+
116,
|
|
1178
|
+
121
|
|
1179
|
+
]
|
|
1180
|
+
}
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
name: "program"
|
|
1186
|
+
}
|
|
1187
|
+
],
|
|
1188
|
+
args: []
|
|
1189
|
+
},
|
|
1077
1190
|
{
|
|
1078
1191
|
name: "create_claim_fee_operator",
|
|
1079
1192
|
discriminator: [
|
|
@@ -1165,7 +1278,7 @@ var cp_amm_default = {
|
|
|
1165
1278
|
{
|
|
1166
1279
|
name: "create_config",
|
|
1167
1280
|
docs: [
|
|
1168
|
-
"ADMIN FUNCTIONS
|
|
1281
|
+
"ADMIN FUNCTIONS /////"
|
|
1169
1282
|
],
|
|
1170
1283
|
discriminator: [
|
|
1171
1284
|
201,
|
|
@@ -3508,6 +3621,19 @@ var cp_amm_default = {
|
|
|
3508
3621
|
5
|
|
3509
3622
|
]
|
|
3510
3623
|
},
|
|
3624
|
+
{
|
|
3625
|
+
name: "EvtClosePosition",
|
|
3626
|
+
discriminator: [
|
|
3627
|
+
20,
|
|
3628
|
+
145,
|
|
3629
|
+
144,
|
|
3630
|
+
68,
|
|
3631
|
+
143,
|
|
3632
|
+
142,
|
|
3633
|
+
214,
|
|
3634
|
+
178
|
|
3635
|
+
]
|
|
3636
|
+
},
|
|
3511
3637
|
{
|
|
3512
3638
|
name: "EvtCreateClaimFeeOperator",
|
|
3513
3639
|
discriminator: [
|
|
@@ -3899,6 +4025,11 @@ var cp_amm_default = {
|
|
|
3899
4025
|
code: 6038,
|
|
3900
4026
|
name: "FeeInverseIsIncorrect",
|
|
3901
4027
|
msg: "Fee inverse is incorrect"
|
|
4028
|
+
},
|
|
4029
|
+
{
|
|
4030
|
+
code: 6039,
|
|
4031
|
+
name: "PositionIsNotEmpty",
|
|
4032
|
+
msg: "Position is not empty"
|
|
3902
4033
|
}
|
|
3903
4034
|
],
|
|
3904
4035
|
types: [
|
|
@@ -4412,6 +4543,14 @@ var cp_amm_default = {
|
|
|
4412
4543
|
}
|
|
4413
4544
|
}
|
|
4414
4545
|
},
|
|
4546
|
+
{
|
|
4547
|
+
name: "token_a_amount",
|
|
4548
|
+
type: "u64"
|
|
4549
|
+
},
|
|
4550
|
+
{
|
|
4551
|
+
name: "token_b_amount",
|
|
4552
|
+
type: "u64"
|
|
4553
|
+
},
|
|
4415
4554
|
{
|
|
4416
4555
|
name: "total_amount_a",
|
|
4417
4556
|
type: "u64"
|
|
@@ -4567,6 +4706,30 @@ var cp_amm_default = {
|
|
|
4567
4706
|
]
|
|
4568
4707
|
}
|
|
4569
4708
|
},
|
|
4709
|
+
{
|
|
4710
|
+
name: "EvtClosePosition",
|
|
4711
|
+
type: {
|
|
4712
|
+
kind: "struct",
|
|
4713
|
+
fields: [
|
|
4714
|
+
{
|
|
4715
|
+
name: "pool",
|
|
4716
|
+
type: "pubkey"
|
|
4717
|
+
},
|
|
4718
|
+
{
|
|
4719
|
+
name: "owner",
|
|
4720
|
+
type: "pubkey"
|
|
4721
|
+
},
|
|
4722
|
+
{
|
|
4723
|
+
name: "position",
|
|
4724
|
+
type: "pubkey"
|
|
4725
|
+
},
|
|
4726
|
+
{
|
|
4727
|
+
name: "position_nft_mint",
|
|
4728
|
+
type: "pubkey"
|
|
4729
|
+
}
|
|
4730
|
+
]
|
|
4731
|
+
}
|
|
4732
|
+
},
|
|
4570
4733
|
{
|
|
4571
4734
|
name: "EvtCreateClaimFeeOperator",
|
|
4572
4735
|
docs: [
|
|
@@ -4709,6 +4872,10 @@ var cp_amm_default = {
|
|
|
4709
4872
|
type: {
|
|
4710
4873
|
kind: "struct",
|
|
4711
4874
|
fields: [
|
|
4875
|
+
{
|
|
4876
|
+
name: "pool",
|
|
4877
|
+
type: "pubkey"
|
|
4878
|
+
},
|
|
4712
4879
|
{
|
|
4713
4880
|
name: "token_a_mint",
|
|
4714
4881
|
type: "pubkey"
|
|
@@ -4773,6 +4940,14 @@ var cp_amm_default = {
|
|
|
4773
4940
|
name: "token_b_flag",
|
|
4774
4941
|
type: "u8"
|
|
4775
4942
|
},
|
|
4943
|
+
{
|
|
4944
|
+
name: "token_a_amount",
|
|
4945
|
+
type: "u64"
|
|
4946
|
+
},
|
|
4947
|
+
{
|
|
4948
|
+
name: "token_b_amount",
|
|
4949
|
+
type: "u64"
|
|
4950
|
+
},
|
|
4776
4951
|
{
|
|
4777
4952
|
name: "total_amount_a",
|
|
4778
4953
|
type: "u64"
|
|
@@ -4874,11 +5049,11 @@ var cp_amm_default = {
|
|
|
4874
5049
|
type: "pubkey"
|
|
4875
5050
|
},
|
|
4876
5051
|
{
|
|
4877
|
-
name: "
|
|
5052
|
+
name: "lock_liquidity_amount",
|
|
4878
5053
|
type: "u128"
|
|
4879
5054
|
},
|
|
4880
5055
|
{
|
|
4881
|
-
name: "
|
|
5056
|
+
name: "total_permanent_locked_liquidity",
|
|
4882
5057
|
type: "u128"
|
|
4883
5058
|
}
|
|
4884
5059
|
]
|
|
@@ -4910,11 +5085,11 @@ var cp_amm_default = {
|
|
|
4910
5085
|
}
|
|
4911
5086
|
},
|
|
4912
5087
|
{
|
|
4913
|
-
name: "
|
|
5088
|
+
name: "token_a_amount",
|
|
4914
5089
|
type: "u64"
|
|
4915
5090
|
},
|
|
4916
5091
|
{
|
|
4917
|
-
name: "
|
|
5092
|
+
name: "token_b_amount",
|
|
4918
5093
|
type: "u64"
|
|
4919
5094
|
}
|
|
4920
5095
|
]
|
|
@@ -4950,7 +5125,7 @@ var cp_amm_default = {
|
|
|
4950
5125
|
type: "u8"
|
|
4951
5126
|
},
|
|
4952
5127
|
{
|
|
4953
|
-
name: "
|
|
5128
|
+
name: "has_referral",
|
|
4954
5129
|
type: "bool"
|
|
4955
5130
|
},
|
|
4956
5131
|
{
|
|
@@ -4970,7 +5145,7 @@ var cp_amm_default = {
|
|
|
4970
5145
|
}
|
|
4971
5146
|
},
|
|
4972
5147
|
{
|
|
4973
|
-
name: "
|
|
5148
|
+
name: "actual_amount_in",
|
|
4974
5149
|
type: "u64"
|
|
4975
5150
|
},
|
|
4976
5151
|
{
|
|
@@ -6176,26 +6351,63 @@ var cp_amm_default = {
|
|
|
6176
6351
|
|
|
6177
6352
|
// src/CpAmm.ts
|
|
6178
6353
|
import {
|
|
6354
|
+
Transaction,
|
|
6179
6355
|
SystemProgram as SystemProgram2
|
|
6180
6356
|
} from "@solana/web3.js";
|
|
6181
6357
|
|
|
6358
|
+
// src/types.ts
|
|
6359
|
+
var Rounding = /* @__PURE__ */ ((Rounding2) => {
|
|
6360
|
+
Rounding2[Rounding2["Up"] = 0] = "Up";
|
|
6361
|
+
Rounding2[Rounding2["Down"] = 1] = "Down";
|
|
6362
|
+
return Rounding2;
|
|
6363
|
+
})(Rounding || {});
|
|
6364
|
+
var ActivationPoint = /* @__PURE__ */ ((ActivationPoint2) => {
|
|
6365
|
+
ActivationPoint2[ActivationPoint2["Timestamp"] = 0] = "Timestamp";
|
|
6366
|
+
ActivationPoint2[ActivationPoint2["Slot"] = 1] = "Slot";
|
|
6367
|
+
return ActivationPoint2;
|
|
6368
|
+
})(ActivationPoint || {});
|
|
6369
|
+
var FeeSchedulerMode = /* @__PURE__ */ ((FeeSchedulerMode2) => {
|
|
6370
|
+
FeeSchedulerMode2[FeeSchedulerMode2["Linear"] = 0] = "Linear";
|
|
6371
|
+
FeeSchedulerMode2[FeeSchedulerMode2["Exponential"] = 1] = "Exponential";
|
|
6372
|
+
return FeeSchedulerMode2;
|
|
6373
|
+
})(FeeSchedulerMode || {});
|
|
6374
|
+
var CollectFeeMode = /* @__PURE__ */ ((CollectFeeMode3) => {
|
|
6375
|
+
CollectFeeMode3[CollectFeeMode3["BothToken"] = 0] = "BothToken";
|
|
6376
|
+
CollectFeeMode3[CollectFeeMode3["OnlyB"] = 1] = "OnlyB";
|
|
6377
|
+
return CollectFeeMode3;
|
|
6378
|
+
})(CollectFeeMode || {});
|
|
6379
|
+
var TradeDirection = /* @__PURE__ */ ((TradeDirection2) => {
|
|
6380
|
+
TradeDirection2[TradeDirection2["AtoB"] = 0] = "AtoB";
|
|
6381
|
+
TradeDirection2[TradeDirection2["BtoA"] = 1] = "BtoA";
|
|
6382
|
+
return TradeDirection2;
|
|
6383
|
+
})(TradeDirection || {});
|
|
6384
|
+
var ActivationType = /* @__PURE__ */ ((ActivationType2) => {
|
|
6385
|
+
ActivationType2[ActivationType2["Slot"] = 0] = "Slot";
|
|
6386
|
+
ActivationType2[ActivationType2["Timestamp"] = 1] = "Timestamp";
|
|
6387
|
+
return ActivationType2;
|
|
6388
|
+
})(ActivationType || {});
|
|
6389
|
+
|
|
6390
|
+
// src/pda.ts
|
|
6391
|
+
import { PublicKey as PublicKey2 } from "@solana/web3.js";
|
|
6392
|
+
|
|
6182
6393
|
// src/constants.ts
|
|
6183
6394
|
import { BN } from "@coral-xyz/anchor";
|
|
6184
6395
|
import { PublicKey } from "@solana/web3.js";
|
|
6185
6396
|
var CP_AMM_PROGRAM_ID = new PublicKey(
|
|
6186
6397
|
"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"
|
|
6187
6398
|
);
|
|
6399
|
+
var LIQUIDITY_SCALE = 128;
|
|
6188
6400
|
var SCALE_OFFSET = 64;
|
|
6189
6401
|
var BASIS_POINT_MAX = 1e4;
|
|
6190
6402
|
var MAX_FEE_NUMERATOR = 5e8;
|
|
6191
6403
|
var FEE_DENOMINATOR = 1e9;
|
|
6404
|
+
var PRECISION = 1e6;
|
|
6192
6405
|
var MIN_SQRT_PRICE = new BN("4295048016");
|
|
6193
6406
|
var MAX_SQRT_PRICE = new BN("79226673521066979257578248091");
|
|
6194
6407
|
var MIN_CU_BUFFER = 5e4;
|
|
6195
6408
|
var MAX_CU_BUFFER = 2e5;
|
|
6196
6409
|
|
|
6197
6410
|
// src/pda.ts
|
|
6198
|
-
import { PublicKey as PublicKey2 } from "@solana/web3.js";
|
|
6199
6411
|
function getFirstKey(key1, key2) {
|
|
6200
6412
|
const buf1 = key1.toBuffer();
|
|
6201
6413
|
const buf2 = key2.toBuffer();
|
|
@@ -6212,19 +6424,19 @@ function getSecondKey(key1, key2) {
|
|
|
6212
6424
|
}
|
|
6213
6425
|
return buf1;
|
|
6214
6426
|
}
|
|
6215
|
-
function derivePoolAuthority(
|
|
6427
|
+
function derivePoolAuthority() {
|
|
6216
6428
|
return PublicKey2.findProgramAddressSync(
|
|
6217
6429
|
[Buffer.from("pool_authority")],
|
|
6218
|
-
|
|
6430
|
+
CP_AMM_PROGRAM_ID
|
|
6219
6431
|
)[0];
|
|
6220
6432
|
}
|
|
6221
|
-
function deriveConfigAddress(index
|
|
6433
|
+
function deriveConfigAddress(index) {
|
|
6222
6434
|
return PublicKey2.findProgramAddressSync(
|
|
6223
6435
|
[Buffer.from("config"), index.toArrayLike(Buffer, "le", 8)],
|
|
6224
|
-
|
|
6436
|
+
CP_AMM_PROGRAM_ID
|
|
6225
6437
|
)[0];
|
|
6226
6438
|
}
|
|
6227
|
-
function derivePoolAddress(config, tokenAMint, tokenBMint
|
|
6439
|
+
function derivePoolAddress(config, tokenAMint, tokenBMint) {
|
|
6228
6440
|
return PublicKey2.findProgramAddressSync(
|
|
6229
6441
|
[
|
|
6230
6442
|
Buffer.from("pool"),
|
|
@@ -6232,124 +6444,66 @@ function derivePoolAddress(config, tokenAMint, tokenBMint, programId) {
|
|
|
6232
6444
|
getFirstKey(tokenAMint, tokenBMint),
|
|
6233
6445
|
getSecondKey(tokenAMint, tokenBMint)
|
|
6234
6446
|
],
|
|
6235
|
-
|
|
6447
|
+
CP_AMM_PROGRAM_ID
|
|
6236
6448
|
)[0];
|
|
6237
6449
|
}
|
|
6238
|
-
function derivePositionAddress(positionNft
|
|
6450
|
+
function derivePositionAddress(positionNft) {
|
|
6239
6451
|
return PublicKey2.findProgramAddressSync(
|
|
6240
6452
|
[Buffer.from("position"), positionNft.toBuffer()],
|
|
6241
|
-
|
|
6453
|
+
CP_AMM_PROGRAM_ID
|
|
6242
6454
|
)[0];
|
|
6243
6455
|
}
|
|
6244
|
-
function deriveTokenVaultAddress(tokenMint, pool
|
|
6456
|
+
function deriveTokenVaultAddress(tokenMint, pool) {
|
|
6245
6457
|
return PublicKey2.findProgramAddressSync(
|
|
6246
6458
|
[Buffer.from("token_vault"), tokenMint.toBuffer(), pool.toBuffer()],
|
|
6247
|
-
|
|
6459
|
+
CP_AMM_PROGRAM_ID
|
|
6248
6460
|
)[0];
|
|
6249
6461
|
}
|
|
6250
|
-
function deriveRewardVaultAddress(pool, rewardIndex
|
|
6462
|
+
function deriveRewardVaultAddress(pool, rewardIndex) {
|
|
6251
6463
|
return PublicKey2.findProgramAddressSync(
|
|
6252
6464
|
[Buffer.from("reward_vault"), pool.toBuffer(), Buffer.from([rewardIndex])],
|
|
6253
|
-
|
|
6465
|
+
CP_AMM_PROGRAM_ID
|
|
6254
6466
|
)[0];
|
|
6255
6467
|
}
|
|
6256
|
-
function deriveCustomizablePoolAddress(tokenAMint, tokenBMint
|
|
6468
|
+
function deriveCustomizablePoolAddress(tokenAMint, tokenBMint) {
|
|
6257
6469
|
return PublicKey2.findProgramAddressSync(
|
|
6258
6470
|
[
|
|
6259
6471
|
Buffer.from("cpool"),
|
|
6260
6472
|
getFirstKey(tokenAMint, tokenBMint),
|
|
6261
6473
|
getSecondKey(tokenAMint, tokenBMint)
|
|
6262
6474
|
],
|
|
6263
|
-
|
|
6475
|
+
CP_AMM_PROGRAM_ID
|
|
6264
6476
|
)[0];
|
|
6265
6477
|
}
|
|
6266
|
-
function deriveTokenBadgeAddress(tokenMint
|
|
6478
|
+
function deriveTokenBadgeAddress(tokenMint) {
|
|
6267
6479
|
return PublicKey2.findProgramAddressSync(
|
|
6268
6480
|
[Buffer.from("token_badge"), tokenMint.toBuffer()],
|
|
6269
|
-
|
|
6481
|
+
CP_AMM_PROGRAM_ID
|
|
6270
6482
|
)[0];
|
|
6271
6483
|
}
|
|
6272
|
-
function deriveClaimFeeOperatorAddress(operator
|
|
6484
|
+
function deriveClaimFeeOperatorAddress(operator) {
|
|
6273
6485
|
return PublicKey2.findProgramAddressSync(
|
|
6274
6486
|
[Buffer.from("cf_operator"), operator.toBuffer()],
|
|
6275
|
-
|
|
6487
|
+
CP_AMM_PROGRAM_ID
|
|
6276
6488
|
)[0];
|
|
6277
6489
|
}
|
|
6278
|
-
function derivePositionNftAccount(positionNftMint
|
|
6490
|
+
function derivePositionNftAccount(positionNftMint) {
|
|
6279
6491
|
return PublicKey2.findProgramAddressSync(
|
|
6280
6492
|
[Buffer.from("position_nft_account"), positionNftMint.toBuffer()],
|
|
6281
|
-
|
|
6493
|
+
CP_AMM_PROGRAM_ID
|
|
6282
6494
|
)[0];
|
|
6283
6495
|
}
|
|
6284
|
-
function
|
|
6496
|
+
function deriveTokenBadge(tokenMint) {
|
|
6285
6497
|
return PublicKey2.findProgramAddressSync(
|
|
6286
|
-
[Buffer.from("
|
|
6287
|
-
|
|
6288
|
-
);
|
|
6289
|
-
}
|
|
6290
|
-
|
|
6291
|
-
// src/math/index.ts
|
|
6292
|
-
import { BN as BN2 } from "@coral-xyz/anchor";
|
|
6293
|
-
import Decimal from "decimal.js";
|
|
6294
|
-
|
|
6295
|
-
// src/types.ts
|
|
6296
|
-
var Rounding = /* @__PURE__ */ ((Rounding2) => {
|
|
6297
|
-
Rounding2[Rounding2["Up"] = 0] = "Up";
|
|
6298
|
-
Rounding2[Rounding2["Down"] = 1] = "Down";
|
|
6299
|
-
return Rounding2;
|
|
6300
|
-
})(Rounding || {});
|
|
6301
|
-
var ActivationPoint = /* @__PURE__ */ ((ActivationPoint2) => {
|
|
6302
|
-
ActivationPoint2[ActivationPoint2["Timestamp"] = 0] = "Timestamp";
|
|
6303
|
-
ActivationPoint2[ActivationPoint2["Slot"] = 1] = "Slot";
|
|
6304
|
-
return ActivationPoint2;
|
|
6305
|
-
})(ActivationPoint || {});
|
|
6306
|
-
var FeeSchedulerMode = /* @__PURE__ */ ((FeeSchedulerMode2) => {
|
|
6307
|
-
FeeSchedulerMode2[FeeSchedulerMode2["Linear"] = 0] = "Linear";
|
|
6308
|
-
FeeSchedulerMode2[FeeSchedulerMode2["Exponential"] = 1] = "Exponential";
|
|
6309
|
-
return FeeSchedulerMode2;
|
|
6310
|
-
})(FeeSchedulerMode || {});
|
|
6311
|
-
var CollectFeeMode = /* @__PURE__ */ ((CollectFeeMode2) => {
|
|
6312
|
-
CollectFeeMode2[CollectFeeMode2["BothToken"] = 0] = "BothToken";
|
|
6313
|
-
CollectFeeMode2[CollectFeeMode2["OnlyB"] = 1] = "OnlyB";
|
|
6314
|
-
return CollectFeeMode2;
|
|
6315
|
-
})(CollectFeeMode || {});
|
|
6316
|
-
var TradeDirection = /* @__PURE__ */ ((TradeDirection2) => {
|
|
6317
|
-
TradeDirection2[TradeDirection2["AtoB"] = 0] = "AtoB";
|
|
6318
|
-
TradeDirection2[TradeDirection2["BtoA"] = 1] = "BtoA";
|
|
6319
|
-
return TradeDirection2;
|
|
6320
|
-
})(TradeDirection || {});
|
|
6321
|
-
var ActivationType = /* @__PURE__ */ ((ActivationType2) => {
|
|
6322
|
-
ActivationType2[ActivationType2["Slot"] = 0] = "Slot";
|
|
6323
|
-
ActivationType2[ActivationType2["Timestamp"] = 1] = "Timestamp";
|
|
6324
|
-
return ActivationType2;
|
|
6325
|
-
})(ActivationType || {});
|
|
6326
|
-
|
|
6327
|
-
// src/math/index.ts
|
|
6328
|
-
function mulDiv(x, y, denominator, rounding) {
|
|
6329
|
-
const { div, mod } = x.mul(y).divmod(denominator);
|
|
6330
|
-
if (rounding == 0 /* Up */ && !mod.isZero()) {
|
|
6331
|
-
return div.add(new BN2(1));
|
|
6332
|
-
}
|
|
6333
|
-
return div;
|
|
6334
|
-
}
|
|
6335
|
-
function divCeil(a, b) {
|
|
6336
|
-
if (a.isZero()) {
|
|
6337
|
-
return new BN2(0);
|
|
6338
|
-
}
|
|
6339
|
-
return a.add(b.sub(new BN2(1))).div(b);
|
|
6340
|
-
}
|
|
6341
|
-
function decimalToQ64(num) {
|
|
6342
|
-
return new BN2(num.mul(Decimal.pow(2, 64)).floor().toFixed());
|
|
6343
|
-
}
|
|
6344
|
-
function priceToSqrtPrice(initPrice, tokenADecimal, tokenBDecimal) {
|
|
6345
|
-
const sqrtPriceQ64 = decimalToQ64(
|
|
6346
|
-
initPrice.mul(Decimal.pow(10, tokenBDecimal - tokenADecimal)).sqrt()
|
|
6347
|
-
);
|
|
6348
|
-
return sqrtPriceQ64;
|
|
6498
|
+
[Buffer.from("token_badge"), tokenMint.toBuffer()],
|
|
6499
|
+
CP_AMM_PROGRAM_ID
|
|
6500
|
+
)[0];
|
|
6349
6501
|
}
|
|
6350
6502
|
|
|
6351
|
-
// src/
|
|
6503
|
+
// src/helpers/token.ts
|
|
6504
|
+
import { bs58 } from "@coral-xyz/anchor/dist/cjs/utils/bytes";
|
|
6352
6505
|
import {
|
|
6506
|
+
AccountLayout,
|
|
6353
6507
|
createAssociatedTokenAccountIdempotentInstruction,
|
|
6354
6508
|
createCloseAccountInstruction,
|
|
6355
6509
|
getAccount,
|
|
@@ -6362,6 +6516,7 @@ import {
|
|
|
6362
6516
|
TokenInvalidAccountOwnerError
|
|
6363
6517
|
} from "@solana/spl-token";
|
|
6364
6518
|
import {
|
|
6519
|
+
PublicKey as PublicKey3,
|
|
6365
6520
|
SystemProgram,
|
|
6366
6521
|
TransactionInstruction
|
|
6367
6522
|
} from "@solana/web3.js";
|
|
@@ -6435,15 +6590,59 @@ var unwrapSOLInstruction = (owner, allowOwnerOffCurve = true) => __async(void 0,
|
|
|
6435
6590
|
}
|
|
6436
6591
|
return null;
|
|
6437
6592
|
});
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6593
|
+
function getNftOwner(connection, nftMint) {
|
|
6594
|
+
return __async(this, null, function* () {
|
|
6595
|
+
const largesTokenAccount = yield connection.getTokenLargestAccounts(nftMint);
|
|
6596
|
+
const accountInfo = yield connection.getParsedAccountInfo(
|
|
6597
|
+
largesTokenAccount.value[0].address
|
|
6598
|
+
);
|
|
6599
|
+
const owner = new PublicKey3(accountInfo.value.data.parsed.info.owner);
|
|
6600
|
+
return new PublicKey3(owner);
|
|
6601
|
+
});
|
|
6602
|
+
}
|
|
6603
|
+
function getAllUserPositionNftAccount(connection, user) {
|
|
6604
|
+
return __async(this, null, function* () {
|
|
6605
|
+
const filters = [
|
|
6606
|
+
{
|
|
6607
|
+
memcmp: {
|
|
6608
|
+
offset: 32,
|
|
6609
|
+
bytes: user.toBase58()
|
|
6610
|
+
}
|
|
6611
|
+
},
|
|
6612
|
+
{
|
|
6613
|
+
memcmp: {
|
|
6614
|
+
offset: 64,
|
|
6615
|
+
bytes: bs58.encode(Buffer.from([1, 0, 0, 0, 0, 0, 0, 0]))
|
|
6616
|
+
// 1
|
|
6617
|
+
}
|
|
6618
|
+
}
|
|
6619
|
+
];
|
|
6620
|
+
const tokenAccountsRaw = yield connection.getProgramAccounts(
|
|
6621
|
+
TOKEN_2022_PROGRAM_ID,
|
|
6622
|
+
{
|
|
6623
|
+
filters
|
|
6624
|
+
}
|
|
6625
|
+
);
|
|
6626
|
+
const userPositionNftAccount = [];
|
|
6627
|
+
for (const { account, pubkey } of tokenAccountsRaw) {
|
|
6628
|
+
const tokenAccountData = AccountLayout.decode(account.data);
|
|
6629
|
+
userPositionNftAccount.push({
|
|
6630
|
+
positionNft: tokenAccountData.mint,
|
|
6631
|
+
positionNftAccount: pubkey
|
|
6632
|
+
});
|
|
6633
|
+
}
|
|
6634
|
+
return userPositionNftAccount;
|
|
6635
|
+
});
|
|
6636
|
+
}
|
|
6637
|
+
|
|
6638
|
+
// src/helpers/fee.ts
|
|
6639
|
+
import { BN as BN5 } from "@coral-xyz/anchor";
|
|
6441
6640
|
|
|
6442
6641
|
// src/math/feeMath.ts
|
|
6443
|
-
import { BN as
|
|
6444
|
-
var MAX_EXPONENTIAL = new
|
|
6445
|
-
var ONE = new
|
|
6446
|
-
var MAX = new
|
|
6642
|
+
import { BN as BN2 } from "@coral-xyz/anchor";
|
|
6643
|
+
var MAX_EXPONENTIAL = new BN2(524288);
|
|
6644
|
+
var ONE = new BN2(1).shln(SCALE_OFFSET);
|
|
6645
|
+
var MAX = new BN2(2).pow(new BN2(128)).sub(new BN2(1));
|
|
6447
6646
|
function pow(base, exp) {
|
|
6448
6647
|
let invert = exp.isNeg();
|
|
6449
6648
|
if (exp.isZero()) {
|
|
@@ -6451,7 +6650,7 @@ function pow(base, exp) {
|
|
|
6451
6650
|
}
|
|
6452
6651
|
exp = invert ? exp.abs() : exp;
|
|
6453
6652
|
if (exp.gt(MAX_EXPONENTIAL)) {
|
|
6454
|
-
return new
|
|
6653
|
+
return new BN2(0);
|
|
6455
6654
|
}
|
|
6456
6655
|
let squaredBase = base;
|
|
6457
6656
|
let result = ONE;
|
|
@@ -6459,83 +6658,83 @@ function pow(base, exp) {
|
|
|
6459
6658
|
squaredBase = MAX.div(squaredBase);
|
|
6460
6659
|
invert = !invert;
|
|
6461
6660
|
}
|
|
6462
|
-
if (!exp.and(new
|
|
6661
|
+
if (!exp.and(new BN2(1)).isZero()) {
|
|
6463
6662
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6464
6663
|
}
|
|
6465
6664
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6466
|
-
if (!exp.and(new
|
|
6665
|
+
if (!exp.and(new BN2(2)).isZero()) {
|
|
6467
6666
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6468
6667
|
}
|
|
6469
6668
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6470
|
-
if (!exp.and(new
|
|
6669
|
+
if (!exp.and(new BN2(4)).isZero()) {
|
|
6471
6670
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6472
6671
|
}
|
|
6473
6672
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6474
|
-
if (!exp.and(new
|
|
6673
|
+
if (!exp.and(new BN2(8)).isZero()) {
|
|
6475
6674
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6476
6675
|
}
|
|
6477
6676
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6478
|
-
if (!exp.and(new
|
|
6677
|
+
if (!exp.and(new BN2(16)).isZero()) {
|
|
6479
6678
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6480
6679
|
}
|
|
6481
6680
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6482
|
-
if (!exp.and(new
|
|
6681
|
+
if (!exp.and(new BN2(32)).isZero()) {
|
|
6483
6682
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6484
6683
|
}
|
|
6485
6684
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6486
|
-
if (!exp.and(new
|
|
6685
|
+
if (!exp.and(new BN2(64)).isZero()) {
|
|
6487
6686
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6488
6687
|
}
|
|
6489
6688
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6490
|
-
if (!exp.and(new
|
|
6689
|
+
if (!exp.and(new BN2(128)).isZero()) {
|
|
6491
6690
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6492
6691
|
}
|
|
6493
6692
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6494
|
-
if (!exp.and(new
|
|
6693
|
+
if (!exp.and(new BN2(256)).isZero()) {
|
|
6495
6694
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6496
6695
|
}
|
|
6497
6696
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6498
|
-
if (!exp.and(new
|
|
6697
|
+
if (!exp.and(new BN2(512)).isZero()) {
|
|
6499
6698
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6500
6699
|
}
|
|
6501
6700
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6502
|
-
if (!exp.and(new
|
|
6701
|
+
if (!exp.and(new BN2(1024)).isZero()) {
|
|
6503
6702
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6504
6703
|
}
|
|
6505
6704
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6506
|
-
if (!exp.and(new
|
|
6705
|
+
if (!exp.and(new BN2(2048)).isZero()) {
|
|
6507
6706
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6508
6707
|
}
|
|
6509
6708
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6510
|
-
if (!exp.and(new
|
|
6709
|
+
if (!exp.and(new BN2(4096)).isZero()) {
|
|
6511
6710
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6512
6711
|
}
|
|
6513
6712
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6514
|
-
if (!exp.and(new
|
|
6713
|
+
if (!exp.and(new BN2(8192)).isZero()) {
|
|
6515
6714
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6516
6715
|
}
|
|
6517
6716
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6518
|
-
if (!exp.and(new
|
|
6717
|
+
if (!exp.and(new BN2(16384)).isZero()) {
|
|
6519
6718
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6520
6719
|
}
|
|
6521
6720
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6522
|
-
if (!exp.and(new
|
|
6721
|
+
if (!exp.and(new BN2(32768)).isZero()) {
|
|
6523
6722
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6524
6723
|
}
|
|
6525
6724
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6526
|
-
if (!exp.and(new
|
|
6725
|
+
if (!exp.and(new BN2(65536)).isZero()) {
|
|
6527
6726
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6528
6727
|
}
|
|
6529
6728
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6530
|
-
if (!exp.and(new
|
|
6729
|
+
if (!exp.and(new BN2(131072)).isZero()) {
|
|
6531
6730
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6532
6731
|
}
|
|
6533
6732
|
squaredBase = squaredBase.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6534
|
-
if (!exp.and(new
|
|
6733
|
+
if (!exp.and(new BN2(262144)).isZero()) {
|
|
6535
6734
|
result = result.mul(squaredBase).shrn(SCALE_OFFSET);
|
|
6536
6735
|
}
|
|
6537
6736
|
if (result.isZero()) {
|
|
6538
|
-
return new
|
|
6737
|
+
return new BN2(0);
|
|
6539
6738
|
}
|
|
6540
6739
|
if (invert) {
|
|
6541
6740
|
result = MAX.div(result);
|
|
@@ -6543,52 +6742,40 @@ function pow(base, exp) {
|
|
|
6543
6742
|
return result;
|
|
6544
6743
|
}
|
|
6545
6744
|
|
|
6546
|
-
// src/
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
const bps = reductionFactor.shln(SCALE_OFFSET).div(new BN4(BASIS_POINT_MAX));
|
|
6553
|
-
const base = ONE.sub(bps);
|
|
6554
|
-
const result = pow(base, period);
|
|
6555
|
-
feeNumerator = cliffFeeNumerator.mul(result).shrn(SCALE_OFFSET);
|
|
6556
|
-
}
|
|
6557
|
-
return feeNumerator;
|
|
6745
|
+
// src/math/mathUtils.ts
|
|
6746
|
+
import { BN as BN3 } from "@coral-xyz/anchor";
|
|
6747
|
+
import Decimal from "decimal.js";
|
|
6748
|
+
function mulShr(x, y, offset, rounding) {
|
|
6749
|
+
const denominator = new BN3(1).shln(offset);
|
|
6750
|
+
return mulDiv(x, y, denominator, rounding);
|
|
6558
6751
|
}
|
|
6559
|
-
function
|
|
6560
|
-
const
|
|
6561
|
-
|
|
6562
|
-
return vFee.addn(99999999999).divn(1e11);
|
|
6752
|
+
function shlDiv(x, y, offset, rounding) {
|
|
6753
|
+
const scale = new BN3(1).shln(offset);
|
|
6754
|
+
return mulDiv(x, scale, y, rounding);
|
|
6563
6755
|
}
|
|
6564
|
-
function
|
|
6565
|
-
|
|
6566
|
-
|
|
6756
|
+
function mulDiv(x, y, denominator, rounding) {
|
|
6757
|
+
const { div, mod } = x.mul(y).divmod(denominator);
|
|
6758
|
+
if (rounding == 0 /* Up */ && !mod.isZero()) {
|
|
6759
|
+
return div.add(new BN3(1));
|
|
6567
6760
|
}
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
)
|
|
6572
|
-
|
|
6573
|
-
feeSchedulerMode,
|
|
6574
|
-
cliffFeeNumerator,
|
|
6575
|
-
period,
|
|
6576
|
-
reductionFactor
|
|
6577
|
-
);
|
|
6578
|
-
if (dynamicFeeParams) {
|
|
6579
|
-
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFeeParams;
|
|
6580
|
-
const dynamicFeeNumberator = getDynamicFeeNumerator(
|
|
6581
|
-
volatilityAccumulator,
|
|
6582
|
-
binStep,
|
|
6583
|
-
variableFeeControl
|
|
6584
|
-
);
|
|
6585
|
-
feeNumerator.add(dynamicFeeNumberator);
|
|
6761
|
+
return div;
|
|
6762
|
+
}
|
|
6763
|
+
function divCeil(a, b) {
|
|
6764
|
+
if (a.isZero()) {
|
|
6765
|
+
return new BN3(0);
|
|
6586
6766
|
}
|
|
6587
|
-
return
|
|
6767
|
+
return a.add(b.sub(new BN3(1))).div(b);
|
|
6768
|
+
}
|
|
6769
|
+
function q64ToDecimal(num, decimalPlaces) {
|
|
6770
|
+
return new Decimal(num.toString()).div(Decimal.pow(2, 64)).toDecimalPlaces(decimalPlaces);
|
|
6771
|
+
}
|
|
6772
|
+
function decimalToQ64(num) {
|
|
6773
|
+
return new BN3(num.mul(Decimal.pow(2, 64)).floor().toFixed());
|
|
6588
6774
|
}
|
|
6589
6775
|
|
|
6590
|
-
// src/
|
|
6591
|
-
import { BN as
|
|
6776
|
+
// src/helpers/curve.ts
|
|
6777
|
+
import { BN as BN4 } from "@coral-xyz/anchor";
|
|
6778
|
+
import Decimal2 from "decimal.js";
|
|
6592
6779
|
function getNextSqrtPrice(amount, sqrtPrice, liquidity, aToB) {
|
|
6593
6780
|
let result;
|
|
6594
6781
|
if (aToB) {
|
|
@@ -6603,119 +6790,150 @@ function getNextSqrtPrice(amount, sqrtPrice, liquidity, aToB) {
|
|
|
6603
6790
|
}
|
|
6604
6791
|
function getDeltaAmountA(lowerSqrtPrice, upperSqrtPrice, liquidity, rounding) {
|
|
6605
6792
|
const deltaSqrtPrice = upperSqrtPrice.sub(lowerSqrtPrice);
|
|
6793
|
+
const prod = liquidity.mul(deltaSqrtPrice);
|
|
6606
6794
|
const denominator = lowerSqrtPrice.mul(upperSqrtPrice);
|
|
6607
|
-
|
|
6795
|
+
const result = shlDiv(prod, denominator, SCALE_OFFSET, rounding);
|
|
6796
|
+
return result.shrn(SCALE_OFFSET);
|
|
6608
6797
|
}
|
|
6609
6798
|
function getDeltaAmountB(lowerSqrtPrice, upperSqrtPrice, liquidity, rounding) {
|
|
6610
6799
|
const deltaSqrtPrice = upperSqrtPrice.sub(lowerSqrtPrice);
|
|
6611
6800
|
const prod = liquidity.mul(deltaSqrtPrice);
|
|
6612
6801
|
let result;
|
|
6613
6802
|
if (rounding == 0 /* Up */) {
|
|
6614
|
-
const denominator = new
|
|
6803
|
+
const denominator = new BN4(1).shln(SCALE_OFFSET * 2);
|
|
6615
6804
|
result = divCeil(prod, denominator);
|
|
6616
6805
|
} else {
|
|
6617
6806
|
result = prod.shrn(SCALE_OFFSET * 2);
|
|
6618
6807
|
}
|
|
6619
6808
|
return result;
|
|
6620
6809
|
}
|
|
6621
|
-
function
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6810
|
+
function getLiquidityDeltaFromAmountA(maxAmountA, lowerSqrtPrice, upperSqrtPrice) {
|
|
6811
|
+
const prod = new Decimal2(
|
|
6812
|
+
maxAmountA.mul(upperSqrtPrice.mul(lowerSqrtPrice)).toString()
|
|
6813
|
+
);
|
|
6814
|
+
const delta = new Decimal2(upperSqrtPrice.sub(lowerSqrtPrice).toString());
|
|
6815
|
+
return new BN4(prod.div(delta).floor().toFixed());
|
|
6816
|
+
}
|
|
6817
|
+
function getLiquidityDeltaFromAmountB(maxAmountB, lowerSqrtPrice, upperSqrtPrice) {
|
|
6818
|
+
const denominator = new Decimal2(
|
|
6819
|
+
upperSqrtPrice.sub(lowerSqrtPrice).toString()
|
|
6820
|
+
);
|
|
6821
|
+
const prod = new Decimal2(maxAmountB.toString()).mul(
|
|
6822
|
+
Decimal2.pow(2, SCALE_OFFSET * 2)
|
|
6823
|
+
);
|
|
6824
|
+
return new BN4(prod.div(denominator).floor().toFixed());
|
|
6825
|
+
}
|
|
6826
|
+
function getAmountAFromLiquidityDelta(liquidity, currentSqrtPrice, maxSqrtPrice, rounding) {
|
|
6827
|
+
const prod = new Decimal2(liquidity.toString()).mul(
|
|
6828
|
+
new Decimal2(maxSqrtPrice.sub(currentSqrtPrice).toString())
|
|
6829
|
+
);
|
|
6830
|
+
const denominator = currentSqrtPrice.mul(maxSqrtPrice);
|
|
6831
|
+
const result = prod.mul(Decimal2.pow(2, 64)).div(new Decimal2(denominator.toString()));
|
|
6832
|
+
if (rounding == 0 /* Up */) {
|
|
6833
|
+
return result.div(Decimal2.pow(2, 64)).ceil().toFixed();
|
|
6834
|
+
}
|
|
6835
|
+
return result.div(Decimal2.pow(2, 64)).floor().toFixed();
|
|
6836
|
+
}
|
|
6837
|
+
function getAmountBFromLiquidityDelta(liquidity, currentSqrtPrice, minSqrtPrice, rounding) {
|
|
6838
|
+
const delta = currentSqrtPrice.sub(minSqrtPrice);
|
|
6839
|
+
const prod = new Decimal2(liquidity.toString()).mul(
|
|
6840
|
+
new Decimal2(delta.toString())
|
|
6841
|
+
);
|
|
6842
|
+
if (rounding == 0 /* Up */) {
|
|
6843
|
+
return prod.div(Decimal2.pow(2, 128)).ceil().toFixed();
|
|
6844
|
+
}
|
|
6845
|
+
return prod.div(Decimal2.pow(2, 128)).floor().toFixed();
|
|
6846
|
+
}
|
|
6847
|
+
|
|
6848
|
+
// src/helpers/fee.ts
|
|
6849
|
+
import Decimal3 from "decimal.js";
|
|
6850
|
+
function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reductionFactor) {
|
|
6851
|
+
let feeNumerator;
|
|
6852
|
+
if (feeSchedulerMode == 0 /* Linear */) {
|
|
6853
|
+
feeNumerator = cliffFeeNumerator.sub(period.mul(reductionFactor));
|
|
6664
6854
|
} else {
|
|
6665
|
-
const
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6855
|
+
const bps = reductionFactor.shln(SCALE_OFFSET).div(new BN5(BASIS_POINT_MAX));
|
|
6856
|
+
const base = ONE.sub(bps);
|
|
6857
|
+
const result = pow(base, period);
|
|
6858
|
+
feeNumerator = cliffFeeNumerator.mul(result).shrn(SCALE_OFFSET);
|
|
6859
|
+
}
|
|
6860
|
+
return feeNumerator;
|
|
6861
|
+
}
|
|
6862
|
+
function getDynamicFeeNumerator(volatilityAccumulator, binStep, variableFeeControl) {
|
|
6863
|
+
const volatilityAccumulatorDecimal = new Decimal3(
|
|
6864
|
+
volatilityAccumulator.toString()
|
|
6865
|
+
).div(Decimal3.pow(2, 64));
|
|
6866
|
+
const squareVfaBin = volatilityAccumulatorDecimal.mul(new Decimal3(binStep.toString())).pow(2);
|
|
6867
|
+
const vFee = squareVfaBin.mul(new Decimal3(variableFeeControl.toString()));
|
|
6868
|
+
return new BN5(
|
|
6869
|
+
vFee.add(99999999999).div(1e11).floor().toFixed()
|
|
6870
|
+
);
|
|
6871
|
+
}
|
|
6872
|
+
function getFeeNumerator(currentPoint, activationPoint, numberOfPeriod, periodFrequency, feeSchedulerMode, cliffFeeNumerator, reductionFactor, dynamicFeeParams) {
|
|
6873
|
+
if (Number(periodFrequency) == 0) {
|
|
6874
|
+
return cliffFeeNumerator;
|
|
6875
|
+
}
|
|
6876
|
+
const period = new BN5(currentPoint).lt(activationPoint) ? new BN5(numberOfPeriod) : BN5.min(
|
|
6877
|
+
new BN5(numberOfPeriod),
|
|
6878
|
+
new BN5(currentPoint).sub(activationPoint).div(periodFrequency)
|
|
6879
|
+
);
|
|
6880
|
+
let feeNumerator = getBaseFeeNumerator(
|
|
6881
|
+
feeSchedulerMode,
|
|
6882
|
+
cliffFeeNumerator,
|
|
6883
|
+
period,
|
|
6884
|
+
reductionFactor
|
|
6885
|
+
);
|
|
6886
|
+
if (dynamicFeeParams) {
|
|
6887
|
+
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFeeParams;
|
|
6888
|
+
const dynamicFeeNumberator = getDynamicFeeNumerator(
|
|
6889
|
+
volatilityAccumulator,
|
|
6890
|
+
binStep,
|
|
6891
|
+
variableFeeControl
|
|
6682
6892
|
);
|
|
6683
|
-
|
|
6684
|
-
} else {
|
|
6685
|
-
lpFee = mulDiv(
|
|
6686
|
-
inAmount,
|
|
6687
|
-
tradeFeeNumerator,
|
|
6688
|
-
new BN5(FEE_DENOMINATOR),
|
|
6689
|
-
1 /* Down */
|
|
6690
|
-
);
|
|
6691
|
-
const nextSqrtPrice2 = getNextSqrtPrice(
|
|
6692
|
-
inAmount.sub(lpFee),
|
|
6693
|
-
sqrtPrice,
|
|
6694
|
-
liquidity,
|
|
6695
|
-
false
|
|
6696
|
-
);
|
|
6697
|
-
outAmount = getDeltaAmountA(
|
|
6698
|
-
sqrtPrice,
|
|
6699
|
-
nextSqrtPrice2,
|
|
6700
|
-
liquidity,
|
|
6701
|
-
1 /* Down */
|
|
6702
|
-
);
|
|
6703
|
-
}
|
|
6893
|
+
feeNumerator.add(dynamicFeeNumberator);
|
|
6704
6894
|
}
|
|
6705
|
-
return
|
|
6895
|
+
return feeNumerator.gt(new BN5(MAX_FEE_NUMERATOR)) ? new BN5(MAX_FEE_NUMERATOR) : feeNumerator;
|
|
6706
6896
|
}
|
|
6707
|
-
function
|
|
6708
|
-
const
|
|
6709
|
-
const
|
|
6710
|
-
return
|
|
6897
|
+
function getFeeMode(collectFeeMode, btoA) {
|
|
6898
|
+
const feeOnInput = btoA && collectFeeMode === 1 /* OnlyB */;
|
|
6899
|
+
const feesOnTokenA = btoA && collectFeeMode === 0 /* BothToken */;
|
|
6900
|
+
return {
|
|
6901
|
+
feeOnInput,
|
|
6902
|
+
feesOnTokenA
|
|
6903
|
+
};
|
|
6711
6904
|
}
|
|
6712
|
-
function
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6905
|
+
function getTotalFeeOnAmount(amount, tradeFeeNumerator) {
|
|
6906
|
+
return mulDiv(
|
|
6907
|
+
amount,
|
|
6908
|
+
tradeFeeNumerator,
|
|
6909
|
+
new BN5(FEE_DENOMINATOR),
|
|
6910
|
+
0 /* Up */
|
|
6911
|
+
);
|
|
6912
|
+
}
|
|
6913
|
+
function getSwapAmount(inAmount, sqrtPrice, liquidity, tradeFeeNumerator, aToB, collectFeeMode) {
|
|
6914
|
+
let feeMode = getFeeMode(collectFeeMode, !aToB);
|
|
6915
|
+
let actualInAmount = inAmount;
|
|
6916
|
+
let totalFee = new BN5(0);
|
|
6917
|
+
if (feeMode.feeOnInput) {
|
|
6918
|
+
totalFee = getTotalFeeOnAmount(inAmount, tradeFeeNumerator);
|
|
6919
|
+
actualInAmount = inAmount.sub(totalFee);
|
|
6920
|
+
}
|
|
6921
|
+
const outAmount = aToB ? getDeltaAmountB(
|
|
6922
|
+
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, true),
|
|
6923
|
+
sqrtPrice,
|
|
6924
|
+
liquidity,
|
|
6925
|
+
1 /* Down */
|
|
6926
|
+
) : getDeltaAmountA(
|
|
6927
|
+
sqrtPrice,
|
|
6928
|
+
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, false),
|
|
6929
|
+
liquidity,
|
|
6930
|
+
1 /* Down */
|
|
6931
|
+
);
|
|
6932
|
+
const amountOut = feeMode.feeOnInput ? outAmount : (totalFee = getTotalFeeOnAmount(outAmount, tradeFeeNumerator), outAmount.sub(totalFee));
|
|
6933
|
+
return { amountOut, totalFee };
|
|
6716
6934
|
}
|
|
6717
6935
|
|
|
6718
|
-
// src/
|
|
6936
|
+
// src/helpers/computeUnits.ts
|
|
6719
6937
|
import {
|
|
6720
6938
|
ComputeBudgetProgram,
|
|
6721
6939
|
PublicKey as PublicKey4,
|
|
@@ -6790,99 +7008,580 @@ var getEstimatedComputeUnitIxWithBuffer = (connection, instructions, feePayer, b
|
|
|
6790
7008
|
return ComputeBudgetProgram.setComputeUnitLimit({ units });
|
|
6791
7009
|
});
|
|
6792
7010
|
|
|
6793
|
-
// src/
|
|
7011
|
+
// src/helpers/utils.ts
|
|
6794
7012
|
import { BN as BN6 } from "@coral-xyz/anchor";
|
|
6795
|
-
import
|
|
6796
|
-
var
|
|
6797
|
-
const slippage = (100
|
|
7013
|
+
import Decimal4 from "decimal.js";
|
|
7014
|
+
var getMaxAmountWithSlippage = (amount, rate) => {
|
|
7015
|
+
const slippage = (100 + rate) / 100 * BASIS_POINT_MAX;
|
|
6798
7016
|
return amount.mul(new BN6(slippage)).div(new BN6(BASIS_POINT_MAX));
|
|
6799
7017
|
};
|
|
6800
|
-
var
|
|
6801
|
-
const
|
|
6802
|
-
return new
|
|
7018
|
+
var getMinAmountWithSlippage = (amount, rate) => {
|
|
7019
|
+
const slippage = (100 - rate) / 100 * BASIS_POINT_MAX;
|
|
7020
|
+
return amount.mul(new BN6(slippage)).div(new BN6(BASIS_POINT_MAX));
|
|
7021
|
+
};
|
|
7022
|
+
var getPriceImpact = (actualAmount, idealAmount) => {
|
|
7023
|
+
const diff = idealAmount.sub(actualAmount);
|
|
7024
|
+
return new Decimal4(diff.toString()).div(new Decimal4(idealAmount.toString())).mul(100).toNumber();
|
|
7025
|
+
};
|
|
7026
|
+
var getPriceFromSqrtPrice = (sqrtPrice, tokenADecimal, tokenBDecimal) => {
|
|
7027
|
+
const decimalSqrtPrice = new Decimal4(sqrtPrice.toString());
|
|
7028
|
+
const price = decimalSqrtPrice.mul(decimalSqrtPrice).mul(new Decimal4(__pow(10, tokenADecimal - tokenBDecimal))).div(Decimal4.pow(2, 128)).toString();
|
|
7029
|
+
return price;
|
|
7030
|
+
};
|
|
7031
|
+
var getSqrtPriceFromPrice = (price, tokenADecimal, tokenBDecimal) => {
|
|
7032
|
+
const decimalPrice = new Decimal4(price);
|
|
7033
|
+
const adjustedByDecimals = decimalPrice.div(
|
|
7034
|
+
new Decimal4(__pow(10, tokenADecimal - tokenBDecimal))
|
|
7035
|
+
);
|
|
7036
|
+
const sqrtValue = Decimal4.sqrt(adjustedByDecimals);
|
|
7037
|
+
const sqrtValueQ64 = sqrtValue.mul(Decimal4.pow(2, 64));
|
|
7038
|
+
return new BN6(sqrtValueQ64.floor().toFixed());
|
|
7039
|
+
};
|
|
7040
|
+
var getUnClaimReward = (poolState, positionState) => {
|
|
7041
|
+
const totalPositionLiquidity = positionState.unlockedLiquidity.add(positionState.vestedLiquidity).add(positionState.permanentLockedLiquidity);
|
|
7042
|
+
const feeAPerTokenStored = new BN6(
|
|
7043
|
+
Buffer.from(poolState.feeAPerLiquidity).reverse()
|
|
7044
|
+
).sub(new BN6(Buffer.from(positionState.feeAPerTokenCheckpoint).reverse()));
|
|
7045
|
+
const feeBPerTokenStored = new BN6(
|
|
7046
|
+
Buffer.from(poolState.feeBPerLiquidity).reverse()
|
|
7047
|
+
).sub(new BN6(Buffer.from(positionState.feeBPerTokenCheckpoint).reverse()));
|
|
7048
|
+
const feeA = totalPositionLiquidity.mul(feeAPerTokenStored).shrn(LIQUIDITY_SCALE);
|
|
7049
|
+
const feeB = totalPositionLiquidity.mul(feeBPerTokenStored).shrn(LIQUIDITY_SCALE);
|
|
7050
|
+
return {
|
|
7051
|
+
feeTokenA: positionState.feeAPending.add(feeA),
|
|
7052
|
+
feeTokenB: positionState.feeBPending.add(feeB),
|
|
7053
|
+
rewards: positionState.rewardInfos.length > 0 ? positionState.rewardInfos.map((item) => item.rewardPendings) : []
|
|
7054
|
+
};
|
|
7055
|
+
};
|
|
7056
|
+
|
|
7057
|
+
// src/helpers/accountFilters.ts
|
|
7058
|
+
var positionByPoolFilter = (pool) => {
|
|
7059
|
+
return {
|
|
7060
|
+
memcmp: {
|
|
7061
|
+
bytes: pool.toBase58(),
|
|
7062
|
+
offset: 8
|
|
7063
|
+
}
|
|
7064
|
+
};
|
|
7065
|
+
};
|
|
7066
|
+
var vestingByPositionFilter = (position) => {
|
|
7067
|
+
return {
|
|
7068
|
+
memcmp: {
|
|
7069
|
+
bytes: position.toBase58(),
|
|
7070
|
+
offset: 8
|
|
7071
|
+
}
|
|
7072
|
+
};
|
|
6803
7073
|
};
|
|
6804
7074
|
|
|
7075
|
+
// src/helpers/priceMath.ts
|
|
7076
|
+
import { BN as BN7 } from "@coral-xyz/anchor";
|
|
7077
|
+
import Decimal5 from "decimal.js";
|
|
7078
|
+
function calculateInitSqrtPrice(tokenAAmount, tokenBAmount, minSqrtPrice, maxSqrtPrice) {
|
|
7079
|
+
if (tokenAAmount.isZero() || tokenBAmount.isZero()) {
|
|
7080
|
+
throw new Error("Amount cannot be zero");
|
|
7081
|
+
}
|
|
7082
|
+
const amountADecimal = new Decimal5(tokenAAmount.toString());
|
|
7083
|
+
const amountBDecimal = new Decimal5(tokenBAmount.toString());
|
|
7084
|
+
const minSqrtPriceDecimal = new Decimal5(minSqrtPrice.toString()).div(
|
|
7085
|
+
Decimal5.pow(2, 64)
|
|
7086
|
+
);
|
|
7087
|
+
const maxSqrtPriceDecimal = new Decimal5(maxSqrtPrice.toString()).div(
|
|
7088
|
+
Decimal5.pow(2, 64)
|
|
7089
|
+
);
|
|
7090
|
+
const x = new Decimal5(1).div(maxSqrtPriceDecimal);
|
|
7091
|
+
const y = amountBDecimal.div(amountADecimal);
|
|
7092
|
+
const xy = x.mul(y);
|
|
7093
|
+
const paMinusXY = minSqrtPriceDecimal.sub(xy);
|
|
7094
|
+
const xyMinusPa = xy.sub(minSqrtPriceDecimal);
|
|
7095
|
+
const fourY = new Decimal5(4).mul(y);
|
|
7096
|
+
const discriminant = xyMinusPa.mul(xyMinusPa).add(fourY);
|
|
7097
|
+
const sqrtDiscriminant = discriminant.sqrt();
|
|
7098
|
+
const result = paMinusXY.add(sqrtDiscriminant).div(new Decimal5(2)).mul(Decimal5.pow(2, 64));
|
|
7099
|
+
return new BN7(result.floor().toFixed());
|
|
7100
|
+
}
|
|
7101
|
+
|
|
7102
|
+
// src/helpers/token2022.ts
|
|
7103
|
+
import { BN as BN8 } from "@coral-xyz/anchor";
|
|
7104
|
+
import {
|
|
7105
|
+
calculateFee,
|
|
7106
|
+
getEpochFee,
|
|
7107
|
+
getTransferFeeConfig,
|
|
7108
|
+
MAX_FEE_BASIS_POINTS
|
|
7109
|
+
} from "@solana/spl-token";
|
|
7110
|
+
function calculatePreFeeAmount(transferFee, postFeeAmount) {
|
|
7111
|
+
if (postFeeAmount.isZero()) {
|
|
7112
|
+
return new BN8(0);
|
|
7113
|
+
}
|
|
7114
|
+
if (transferFee.transferFeeBasisPoints === 0) {
|
|
7115
|
+
return postFeeAmount;
|
|
7116
|
+
}
|
|
7117
|
+
const maximumFee = new BN8(transferFee.maximumFee.toString());
|
|
7118
|
+
if (transferFee.transferFeeBasisPoints === MAX_FEE_BASIS_POINTS) {
|
|
7119
|
+
return postFeeAmount.add(maximumFee);
|
|
7120
|
+
}
|
|
7121
|
+
const ONE_IN_BASIS_POINTS = new BN8(MAX_FEE_BASIS_POINTS);
|
|
7122
|
+
const numerator = postFeeAmount.mul(ONE_IN_BASIS_POINTS);
|
|
7123
|
+
const denominator = ONE_IN_BASIS_POINTS.sub(
|
|
7124
|
+
new BN8(transferFee.transferFeeBasisPoints)
|
|
7125
|
+
);
|
|
7126
|
+
const rawPreFeeAmount = numerator.add(denominator).sub(new BN8(1)).div(denominator);
|
|
7127
|
+
if (rawPreFeeAmount.sub(postFeeAmount).gte(maximumFee)) {
|
|
7128
|
+
return postFeeAmount.add(maximumFee);
|
|
7129
|
+
}
|
|
7130
|
+
return rawPreFeeAmount;
|
|
7131
|
+
}
|
|
7132
|
+
function calculateInverseFee(transferFee, postFeeAmount) {
|
|
7133
|
+
const preFeeAmount = calculatePreFeeAmount(transferFee, postFeeAmount);
|
|
7134
|
+
return new BN8(
|
|
7135
|
+
calculateFee(transferFee, BigInt(preFeeAmount.toString())).toString()
|
|
7136
|
+
);
|
|
7137
|
+
}
|
|
7138
|
+
function calculateTransferFeeIncludedAmount(transferFeeExcludedAmount, mint, currentEpoch) {
|
|
7139
|
+
if (transferFeeExcludedAmount.isZero()) {
|
|
7140
|
+
return {
|
|
7141
|
+
amount: new BN8(0),
|
|
7142
|
+
transferFee: new BN8(0)
|
|
7143
|
+
};
|
|
7144
|
+
}
|
|
7145
|
+
const transferFeeConfig = getTransferFeeConfig(mint);
|
|
7146
|
+
if (transferFeeConfig === null) {
|
|
7147
|
+
return {
|
|
7148
|
+
amount: transferFeeExcludedAmount,
|
|
7149
|
+
transferFee: new BN8(0)
|
|
7150
|
+
};
|
|
7151
|
+
}
|
|
7152
|
+
const epochFee = getEpochFee(transferFeeConfig, BigInt(currentEpoch));
|
|
7153
|
+
const transferFee = epochFee.transferFeeBasisPoints == MAX_FEE_BASIS_POINTS ? new BN8(epochFee.maximumFee.toString()) : calculateInverseFee(epochFee, transferFeeExcludedAmount);
|
|
7154
|
+
const transferFeeIncludedAmount = transferFeeExcludedAmount.add(transferFee);
|
|
7155
|
+
return {
|
|
7156
|
+
amount: transferFeeIncludedAmount,
|
|
7157
|
+
transferFee
|
|
7158
|
+
};
|
|
7159
|
+
}
|
|
7160
|
+
function calculateTransferFeeExcludedAmount(transferFeeIncludedAmount, mint, currentEpoch) {
|
|
7161
|
+
const transferFeeConfig = getTransferFeeConfig(mint);
|
|
7162
|
+
if (transferFeeConfig === null) {
|
|
7163
|
+
return {
|
|
7164
|
+
amount: transferFeeIncludedAmount,
|
|
7165
|
+
transferFee: new BN8(0)
|
|
7166
|
+
};
|
|
7167
|
+
}
|
|
7168
|
+
const transferFeeIncludedAmountN = BigInt(
|
|
7169
|
+
transferFeeIncludedAmount.toString()
|
|
7170
|
+
);
|
|
7171
|
+
const transferFee = calculateFee(
|
|
7172
|
+
getEpochFee(transferFeeConfig, BigInt(currentEpoch)),
|
|
7173
|
+
transferFeeIncludedAmountN
|
|
7174
|
+
);
|
|
7175
|
+
const transferFeeExcludedAmount = new BN8(
|
|
7176
|
+
(transferFeeIncludedAmountN - transferFee).toString()
|
|
7177
|
+
);
|
|
7178
|
+
return {
|
|
7179
|
+
amount: transferFeeExcludedAmount,
|
|
7180
|
+
transferFee: new BN8(transferFee.toString())
|
|
7181
|
+
};
|
|
7182
|
+
}
|
|
7183
|
+
|
|
6805
7184
|
// src/CpAmm.ts
|
|
7185
|
+
import { min } from "bn.js";
|
|
6806
7186
|
var CpAmm = class {
|
|
6807
7187
|
constructor(connection) {
|
|
6808
7188
|
this._program = new Program(cp_amm_default, {
|
|
6809
7189
|
connection
|
|
6810
7190
|
});
|
|
7191
|
+
this.poolAuthority = derivePoolAuthority();
|
|
6811
7192
|
}
|
|
7193
|
+
/**
|
|
7194
|
+
* Returns the Anchor program instance.
|
|
7195
|
+
* @returns The AmmProgram instance.
|
|
7196
|
+
*/
|
|
6812
7197
|
getProgram() {
|
|
6813
7198
|
return this._program;
|
|
6814
7199
|
}
|
|
6815
7200
|
/**
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
const { tokenAAmount, tokenBAmount, tokenADecimal, tokenBDecimal } = params;
|
|
6828
|
-
const initPrice = tokenBAmount.div(tokenAAmount);
|
|
6829
|
-
const sqrtPriceQ64 = priceToSqrtPrice(
|
|
6830
|
-
new Decimal3(initPrice.toString()),
|
|
6831
|
-
tokenADecimal,
|
|
6832
|
-
tokenBDecimal
|
|
6833
|
-
);
|
|
6834
|
-
if (sqrtPriceQ64.lt(MIN_SQRT_PRICE) || sqrtPriceQ64.gt(MAX_SQRT_PRICE)) {
|
|
6835
|
-
throw new Error(`Invalid sqrt price: ${sqrtPriceQ64.toString()}`);
|
|
6836
|
-
}
|
|
6837
|
-
const liquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA(
|
|
6838
|
-
tokenAAmount,
|
|
6839
|
-
sqrtPriceQ64,
|
|
6840
|
-
MAX_SQRT_PRICE
|
|
6841
|
-
);
|
|
6842
|
-
const liquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB(
|
|
6843
|
-
tokenBAmount,
|
|
6844
|
-
MIN_SQRT_PRICE,
|
|
6845
|
-
sqrtPriceQ64
|
|
6846
|
-
);
|
|
6847
|
-
const liquidityQ64 = liquidityDeltaFromAmountA.gte(
|
|
6848
|
-
liquidityDeltaFromAmountB
|
|
6849
|
-
) ? liquidityDeltaFromAmountB : liquidityDeltaFromAmountA;
|
|
6850
|
-
return {
|
|
6851
|
-
sqrtPriceQ64,
|
|
6852
|
-
liquidityQ64
|
|
6853
|
-
};
|
|
6854
|
-
});
|
|
6855
|
-
}
|
|
6856
|
-
// fetcher
|
|
6857
|
-
fetchConfigState(config) {
|
|
7201
|
+
* Prepares token accounts for a transaction by retrieving or creating associated token accounts.
|
|
7202
|
+
* @private
|
|
7203
|
+
* @param {PublicKey} owner - The owner of the token accounts
|
|
7204
|
+
* @param {PublicKey} tokenAMint - Mint address of token A
|
|
7205
|
+
* @param {PublicKey} tokenBMint - Mint address of token B
|
|
7206
|
+
* @param {PublicKey} tokenAProgram - Program ID for token A (Token or Token2022)
|
|
7207
|
+
* @param {PublicKey} tokenBProgram - Program ID for token B (Token or Token2022)
|
|
7208
|
+
* @returns {Promise<{tokenAAta: PublicKey, tokenBAta: PublicKey, instructions: TransactionInstruction[]}>}
|
|
7209
|
+
* The token account addresses and any instructions needed to create them
|
|
7210
|
+
*/
|
|
7211
|
+
prepareTokenAccounts(owner, tokenAMint, tokenBMint, tokenAProgram, tokenBProgram) {
|
|
6858
7212
|
return __async(this, null, function* () {
|
|
6859
|
-
const
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
7213
|
+
const instructions = [];
|
|
7214
|
+
const [
|
|
7215
|
+
{ ataPubkey: tokenAAta, ix: createInputTokenAccountIx },
|
|
7216
|
+
{ ataPubkey: tokenBAta, ix: createOutputTokenAccountIx }
|
|
7217
|
+
] = yield Promise.all([
|
|
7218
|
+
getOrCreateATAInstruction(
|
|
7219
|
+
this._program.provider.connection,
|
|
7220
|
+
tokenAMint,
|
|
7221
|
+
owner,
|
|
7222
|
+
owner,
|
|
7223
|
+
true,
|
|
7224
|
+
tokenAProgram
|
|
7225
|
+
),
|
|
7226
|
+
getOrCreateATAInstruction(
|
|
7227
|
+
this._program.provider.connection,
|
|
7228
|
+
tokenBMint,
|
|
7229
|
+
owner,
|
|
7230
|
+
owner,
|
|
7231
|
+
true,
|
|
7232
|
+
tokenBProgram
|
|
7233
|
+
)
|
|
7234
|
+
]);
|
|
7235
|
+
createInputTokenAccountIx && instructions.push(createInputTokenAccountIx);
|
|
7236
|
+
createOutputTokenAccountIx && instructions.push(createOutputTokenAccountIx);
|
|
7237
|
+
return { tokenAAta, tokenBAta, instructions };
|
|
6864
7238
|
});
|
|
6865
7239
|
}
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
7240
|
+
/**
|
|
7241
|
+
* Derives token badge account metadata
|
|
7242
|
+
* @param tokenAMint - Public key of token A mint
|
|
7243
|
+
* @param tokenBMint - Public key of token B mint
|
|
7244
|
+
* @returns Array of account metadata for token badges
|
|
7245
|
+
*/
|
|
7246
|
+
getTokenBadgeAccounts(tokenAMint, tokenBMint) {
|
|
7247
|
+
return [
|
|
7248
|
+
{
|
|
7249
|
+
pubkey: deriveTokenBadge(tokenAMint),
|
|
7250
|
+
isWritable: false,
|
|
7251
|
+
isSigner: false
|
|
7252
|
+
},
|
|
7253
|
+
{
|
|
7254
|
+
pubkey: deriveTokenBadge(tokenBMint),
|
|
7255
|
+
isWritable: false,
|
|
7256
|
+
isSigner: false
|
|
7257
|
+
}
|
|
7258
|
+
];
|
|
6872
7259
|
}
|
|
6873
|
-
|
|
7260
|
+
/**
|
|
7261
|
+
* Builds an instruction to add liquidity to a position.
|
|
7262
|
+
* @private
|
|
7263
|
+
* @param {BuildAddLiquidityParams} params - Parameters for adding liquidity
|
|
7264
|
+
* @returns {Promise<TransactionInstruction>} Instruction to add liquidity
|
|
7265
|
+
*/
|
|
7266
|
+
buildAddLiquidityInstruction(params) {
|
|
6874
7267
|
return __async(this, null, function* () {
|
|
6875
|
-
const
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
7268
|
+
const {
|
|
7269
|
+
pool,
|
|
7270
|
+
position,
|
|
7271
|
+
positionNftAccount,
|
|
7272
|
+
owner,
|
|
7273
|
+
tokenAAccount,
|
|
7274
|
+
tokenBAccount,
|
|
7275
|
+
tokenAMint,
|
|
7276
|
+
tokenBMint,
|
|
7277
|
+
tokenAVault,
|
|
7278
|
+
tokenBVault,
|
|
7279
|
+
tokenAProgram,
|
|
7280
|
+
tokenBProgram,
|
|
7281
|
+
liquidityDelta,
|
|
7282
|
+
tokenAAmountThreshold,
|
|
7283
|
+
tokenBAmountThreshold
|
|
7284
|
+
} = params;
|
|
7285
|
+
return yield this._program.methods.addLiquidity({
|
|
7286
|
+
liquidityDelta,
|
|
7287
|
+
tokenAAmountThreshold,
|
|
7288
|
+
tokenBAmountThreshold
|
|
7289
|
+
}).accountsPartial({
|
|
7290
|
+
pool,
|
|
7291
|
+
position,
|
|
7292
|
+
positionNftAccount,
|
|
7293
|
+
owner,
|
|
7294
|
+
tokenAAccount,
|
|
7295
|
+
tokenBAccount,
|
|
7296
|
+
tokenAMint,
|
|
7297
|
+
tokenBMint,
|
|
7298
|
+
tokenAVault,
|
|
7299
|
+
tokenBVault,
|
|
7300
|
+
tokenAProgram,
|
|
7301
|
+
tokenBProgram
|
|
7302
|
+
}).instruction();
|
|
7303
|
+
});
|
|
7304
|
+
}
|
|
7305
|
+
/**
|
|
7306
|
+
* Builds an instruction to remove all liquidity from a position.
|
|
7307
|
+
* @private
|
|
7308
|
+
* @param {BuildRemoveAllLiquidityInstructionParams} params - Parameters for removing all liquidity
|
|
7309
|
+
* @returns {Promise<TransactionInstruction>} Instruction to remove all liquidity
|
|
7310
|
+
*/
|
|
7311
|
+
buildRemoveAllLiquidityInstruction(params) {
|
|
7312
|
+
return __async(this, null, function* () {
|
|
7313
|
+
const {
|
|
7314
|
+
poolAuthority,
|
|
7315
|
+
owner,
|
|
7316
|
+
pool,
|
|
7317
|
+
position,
|
|
7318
|
+
positionNftAccount,
|
|
7319
|
+
tokenAAccount,
|
|
7320
|
+
tokenBAccount,
|
|
7321
|
+
tokenAAmountThreshold,
|
|
7322
|
+
tokenBAmountThreshold,
|
|
7323
|
+
tokenAMint,
|
|
7324
|
+
tokenBMint,
|
|
7325
|
+
tokenAVault,
|
|
7326
|
+
tokenBVault,
|
|
7327
|
+
tokenAProgram,
|
|
7328
|
+
tokenBProgram
|
|
7329
|
+
} = params;
|
|
7330
|
+
return yield this._program.methods.removeAllLiquidity(tokenAAmountThreshold, tokenBAmountThreshold).accountsPartial({
|
|
7331
|
+
poolAuthority,
|
|
7332
|
+
pool,
|
|
7333
|
+
position,
|
|
7334
|
+
positionNftAccount,
|
|
7335
|
+
owner,
|
|
7336
|
+
tokenAAccount,
|
|
7337
|
+
tokenBAccount,
|
|
7338
|
+
tokenAMint,
|
|
7339
|
+
tokenBMint,
|
|
7340
|
+
tokenAVault,
|
|
7341
|
+
tokenBVault,
|
|
7342
|
+
tokenAProgram,
|
|
7343
|
+
tokenBProgram
|
|
7344
|
+
}).instruction();
|
|
7345
|
+
});
|
|
7346
|
+
}
|
|
7347
|
+
/**
|
|
7348
|
+
* Builds an instruction to claim fees accumulated by a position.
|
|
7349
|
+
* @private
|
|
7350
|
+
* @param {ClaimPositionFeeInstructionParams} params - Parameters for claiming position fees
|
|
7351
|
+
* @returns {Promise<TransactionInstruction>} Instruction to claim position fees
|
|
7352
|
+
*/
|
|
7353
|
+
buildClaimPositionFeeInstruction(params) {
|
|
7354
|
+
return __async(this, null, function* () {
|
|
7355
|
+
const {
|
|
7356
|
+
owner,
|
|
7357
|
+
poolAuthority,
|
|
7358
|
+
pool,
|
|
7359
|
+
position,
|
|
7360
|
+
positionNftAccount,
|
|
7361
|
+
tokenAAccount,
|
|
7362
|
+
tokenBAccount,
|
|
7363
|
+
tokenAVault,
|
|
7364
|
+
tokenBVault,
|
|
7365
|
+
tokenAMint,
|
|
7366
|
+
tokenBMint,
|
|
7367
|
+
tokenAProgram,
|
|
7368
|
+
tokenBProgram
|
|
7369
|
+
} = params;
|
|
7370
|
+
return yield this._program.methods.claimPositionFee().accountsPartial({
|
|
7371
|
+
poolAuthority,
|
|
7372
|
+
owner,
|
|
7373
|
+
pool,
|
|
7374
|
+
position,
|
|
7375
|
+
positionNftAccount,
|
|
7376
|
+
tokenAAccount,
|
|
7377
|
+
tokenBAccount,
|
|
7378
|
+
tokenAVault,
|
|
7379
|
+
tokenBVault,
|
|
7380
|
+
tokenAMint,
|
|
7381
|
+
tokenBMint,
|
|
7382
|
+
tokenAProgram,
|
|
7383
|
+
tokenBProgram
|
|
7384
|
+
}).instruction();
|
|
7385
|
+
});
|
|
7386
|
+
}
|
|
7387
|
+
/**
|
|
7388
|
+
* Builds an instruction to close a position.
|
|
7389
|
+
* @private
|
|
7390
|
+
* @param {ClosePositionInstructionParams} params - Parameters for closing a position
|
|
7391
|
+
* @returns {Promise<TransactionInstruction>} Instruction to close the position
|
|
7392
|
+
*/
|
|
7393
|
+
buildClosePositionInstruction(params) {
|
|
7394
|
+
return __async(this, null, function* () {
|
|
7395
|
+
const {
|
|
7396
|
+
owner,
|
|
7397
|
+
poolAuthority,
|
|
7398
|
+
pool,
|
|
7399
|
+
position,
|
|
7400
|
+
positionNftAccount,
|
|
7401
|
+
positionNftMint
|
|
7402
|
+
} = params;
|
|
7403
|
+
return yield this._program.methods.closePosition().accountsPartial({
|
|
7404
|
+
positionNftMint,
|
|
7405
|
+
positionNftAccount,
|
|
7406
|
+
pool,
|
|
7407
|
+
position,
|
|
7408
|
+
poolAuthority,
|
|
7409
|
+
rentReceiver: owner,
|
|
7410
|
+
owner,
|
|
7411
|
+
tokenProgram: TOKEN_2022_PROGRAM_ID2
|
|
7412
|
+
}).instruction();
|
|
7413
|
+
});
|
|
7414
|
+
}
|
|
7415
|
+
/**
|
|
7416
|
+
* Fetches the Config state of the program.
|
|
7417
|
+
* @param config - Public key of the config account.
|
|
7418
|
+
* @returns Parsed ConfigState.
|
|
7419
|
+
*/
|
|
7420
|
+
fetchConfigState(config) {
|
|
7421
|
+
return __async(this, null, function* () {
|
|
7422
|
+
const configState = yield this._program.account.config.fetchNullable(
|
|
7423
|
+
config
|
|
7424
|
+
);
|
|
7425
|
+
invariant(configState, `Config account: ${config} not found`);
|
|
7426
|
+
return configState;
|
|
7427
|
+
});
|
|
7428
|
+
}
|
|
7429
|
+
/**
|
|
7430
|
+
* Fetches the Pool state.
|
|
7431
|
+
* @param pool - Public key of the pool.
|
|
7432
|
+
* @returns Parsed PoolState.
|
|
7433
|
+
*/
|
|
7434
|
+
fetchPoolState(pool) {
|
|
7435
|
+
return __async(this, null, function* () {
|
|
7436
|
+
const poolState = yield this._program.account.pool.fetchNullable(pool);
|
|
7437
|
+
invariant(poolState, `Pool account: ${pool} not found`);
|
|
7438
|
+
return poolState;
|
|
7439
|
+
});
|
|
7440
|
+
}
|
|
7441
|
+
/**
|
|
7442
|
+
* Fetches the Position state.
|
|
7443
|
+
* @param position - Public key of the position.
|
|
7444
|
+
* @returns Parsed PositionState.
|
|
7445
|
+
*/
|
|
7446
|
+
fetchPositionState(position) {
|
|
7447
|
+
return __async(this, null, function* () {
|
|
7448
|
+
const positionState = yield this._program.account.position.fetchNullable(
|
|
7449
|
+
position
|
|
7450
|
+
);
|
|
7451
|
+
invariant(positionState, `Position account: ${position} not found`);
|
|
7452
|
+
return positionState;
|
|
7453
|
+
});
|
|
7454
|
+
}
|
|
7455
|
+
/**
|
|
7456
|
+
* Retrieves all config accounts.
|
|
7457
|
+
* @returns Array of config public keys and their states.
|
|
7458
|
+
*/
|
|
7459
|
+
getAllConfigs() {
|
|
7460
|
+
return __async(this, null, function* () {
|
|
7461
|
+
const configAccounts = yield this._program.account.config.all();
|
|
7462
|
+
return configAccounts;
|
|
7463
|
+
});
|
|
7464
|
+
}
|
|
7465
|
+
/**
|
|
7466
|
+
* Retrieves all pool accounts.
|
|
7467
|
+
* @returns Array of pool public keys and their states.
|
|
7468
|
+
*/
|
|
7469
|
+
getAllPools() {
|
|
7470
|
+
return __async(this, null, function* () {
|
|
7471
|
+
const poolAccounts = yield this._program.account.pool.all();
|
|
7472
|
+
return poolAccounts;
|
|
7473
|
+
});
|
|
7474
|
+
}
|
|
7475
|
+
/**
|
|
7476
|
+
* Retrieves all position accounts.
|
|
7477
|
+
* @returns Array of position public keys and their states.
|
|
7478
|
+
*/
|
|
7479
|
+
getAllPositions() {
|
|
7480
|
+
return __async(this, null, function* () {
|
|
7481
|
+
const poolAccounts = yield this._program.account.position.all();
|
|
7482
|
+
return poolAccounts;
|
|
7483
|
+
});
|
|
7484
|
+
}
|
|
7485
|
+
/**
|
|
7486
|
+
* Gets all positions a specific pool.
|
|
7487
|
+
* @param pool - Public key of the pool.
|
|
7488
|
+
* @returns List of user positions for the pool.
|
|
7489
|
+
*/
|
|
7490
|
+
getAllPositionsByPool(pool) {
|
|
7491
|
+
return __async(this, null, function* () {
|
|
7492
|
+
return yield this._program.account.position.all([
|
|
7493
|
+
positionByPoolFilter(pool)
|
|
7494
|
+
]);
|
|
7495
|
+
});
|
|
7496
|
+
}
|
|
7497
|
+
/**
|
|
7498
|
+
* Gets all positions of a user for a specific pool.
|
|
7499
|
+
* @param pool - Public key of the pool.
|
|
7500
|
+
* @param user - Public key of the user.
|
|
7501
|
+
* @returns List of user positions for the pool.
|
|
7502
|
+
*/
|
|
7503
|
+
getUserPositionByPool(pool, user) {
|
|
7504
|
+
return __async(this, null, function* () {
|
|
7505
|
+
const allUserPositions = yield this.getPositionsByUser(user);
|
|
7506
|
+
return allUserPositions.filter(
|
|
7507
|
+
(position) => position.positionState.pool.equals(pool)
|
|
7508
|
+
);
|
|
7509
|
+
});
|
|
7510
|
+
}
|
|
7511
|
+
/**
|
|
7512
|
+
* Gets all positions of a user across all pools.
|
|
7513
|
+
* @param user - Public key of the user.
|
|
7514
|
+
* @returns Array of user positions already sorted by liquidity
|
|
7515
|
+
*/
|
|
7516
|
+
getPositionsByUser(user) {
|
|
7517
|
+
return __async(this, null, function* () {
|
|
7518
|
+
const userPositionAccounts = yield getAllUserPositionNftAccount(
|
|
7519
|
+
this._program.provider.connection,
|
|
7520
|
+
user
|
|
7521
|
+
);
|
|
7522
|
+
if (userPositionAccounts.length === 0) {
|
|
7523
|
+
return [];
|
|
7524
|
+
}
|
|
7525
|
+
const positionAddresses = userPositionAccounts.map(
|
|
7526
|
+
(account) => derivePositionAddress(account.positionNft)
|
|
7527
|
+
);
|
|
7528
|
+
const positionStates = yield this._program.account.position.fetchMultiple(
|
|
7529
|
+
positionAddresses
|
|
7530
|
+
);
|
|
7531
|
+
const positionResult = userPositionAccounts.map((account, index) => {
|
|
7532
|
+
const positionState = positionStates[index];
|
|
7533
|
+
if (!positionState) return null;
|
|
7534
|
+
return {
|
|
7535
|
+
positionNftAccount: account.positionNftAccount,
|
|
7536
|
+
position: positionAddresses[index],
|
|
7537
|
+
positionState
|
|
7538
|
+
};
|
|
7539
|
+
}).filter(Boolean);
|
|
7540
|
+
positionResult.sort((a, b) => {
|
|
7541
|
+
const totalLiquidityA = a.positionState.vestedLiquidity.add(a.positionState.permanentLockedLiquidity).add(a.positionState.unlockedLiquidity);
|
|
7542
|
+
const totalLiquidityB = b.positionState.vestedLiquidity.add(b.positionState.permanentLockedLiquidity).add(b.positionState.unlockedLiquidity);
|
|
7543
|
+
return totalLiquidityB.cmp(totalLiquidityA);
|
|
7544
|
+
});
|
|
7545
|
+
return positionResult;
|
|
7546
|
+
});
|
|
7547
|
+
}
|
|
7548
|
+
getAllVestingsByPosition(position) {
|
|
7549
|
+
return __async(this, null, function* () {
|
|
7550
|
+
const vestings = yield this._program.account.vesting.all([
|
|
7551
|
+
vestingByPositionFilter(position)
|
|
7552
|
+
]);
|
|
7553
|
+
return vestings;
|
|
7554
|
+
});
|
|
7555
|
+
}
|
|
7556
|
+
isLockedPosition(position) {
|
|
7557
|
+
const totalLockedLiquidity = position.vestedLiquidity.add(
|
|
7558
|
+
position.permanentLockedLiquidity
|
|
7559
|
+
);
|
|
7560
|
+
return totalLockedLiquidity.gtn(0);
|
|
7561
|
+
}
|
|
7562
|
+
isPoolExist(pool) {
|
|
7563
|
+
return __async(this, null, function* () {
|
|
7564
|
+
const poolState = yield this._program.account.pool.fetchNullable(pool);
|
|
7565
|
+
return poolState !== null;
|
|
7566
|
+
});
|
|
7567
|
+
}
|
|
7568
|
+
/**
|
|
7569
|
+
* Calculates swap quote based on input amount and pool state.
|
|
7570
|
+
* @param params - Swap parameters including input amount, pool state, slippage, etc.
|
|
7571
|
+
* @returns Swap quote including expected output amount, fee, and price impact.
|
|
7572
|
+
*/
|
|
6882
7573
|
getQuote(params) {
|
|
6883
7574
|
return __async(this, null, function* () {
|
|
6884
|
-
|
|
6885
|
-
|
|
7575
|
+
const {
|
|
7576
|
+
inAmount,
|
|
7577
|
+
inputTokenMint,
|
|
7578
|
+
slippage,
|
|
7579
|
+
poolState,
|
|
7580
|
+
currentTime,
|
|
7581
|
+
currentSlot,
|
|
7582
|
+
inputTokenInfo,
|
|
7583
|
+
outputTokenInfo
|
|
7584
|
+
} = params;
|
|
6886
7585
|
const {
|
|
6887
7586
|
sqrtPrice: sqrtPriceQ64,
|
|
6888
7587
|
liquidity: liquidityQ64,
|
|
@@ -6899,13 +7598,16 @@ var CpAmm = class {
|
|
|
6899
7598
|
periodFrequency
|
|
6900
7599
|
} = poolFees.baseFee;
|
|
6901
7600
|
const dynamicFee = poolFees.dynamicFee;
|
|
7601
|
+
let actualAmountIn = inAmount;
|
|
7602
|
+
if (inputTokenInfo) {
|
|
7603
|
+
actualAmountIn = calculateTransferFeeExcludedAmount(
|
|
7604
|
+
inAmount,
|
|
7605
|
+
inputTokenInfo.mint,
|
|
7606
|
+
inputTokenInfo.currentEpoch
|
|
7607
|
+
).amount;
|
|
7608
|
+
}
|
|
6902
7609
|
const aToB = poolState.tokenAMint.equals(inputTokenMint);
|
|
6903
|
-
const
|
|
6904
|
-
const blockInfo = yield this._program.provider.connection.getBlock(slot, {
|
|
6905
|
-
maxSupportedTransactionVersion: 0
|
|
6906
|
-
});
|
|
6907
|
-
const currentTime = (_a = blockInfo == null ? void 0 : blockInfo.blockTime) != null ? _a : Math.floor(Date.now() / 1e3);
|
|
6908
|
-
const currentPoint = activationType ? currentTime : slot;
|
|
7610
|
+
const currentPoint = activationType ? currentTime : currentSlot;
|
|
6909
7611
|
let dynamicFeeParams;
|
|
6910
7612
|
if (dynamicFee.initialized) {
|
|
6911
7613
|
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFee;
|
|
@@ -6921,64 +7623,245 @@ var CpAmm = class {
|
|
|
6921
7623
|
reductionFactor,
|
|
6922
7624
|
dynamicFeeParams
|
|
6923
7625
|
);
|
|
6924
|
-
const {
|
|
6925
|
-
|
|
7626
|
+
const { amountOut, totalFee } = getSwapAmount(
|
|
7627
|
+
actualAmountIn,
|
|
6926
7628
|
sqrtPriceQ64,
|
|
6927
7629
|
liquidityQ64,
|
|
6928
7630
|
tradeFeeNumerator,
|
|
6929
7631
|
aToB,
|
|
6930
7632
|
collectFeeMode
|
|
6931
7633
|
);
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
7634
|
+
let actualAmoutOut = amountOut;
|
|
7635
|
+
if (outputTokenInfo) {
|
|
7636
|
+
actualAmoutOut = calculateTransferFeeExcludedAmount(
|
|
7637
|
+
amountOut,
|
|
7638
|
+
outputTokenInfo.mint,
|
|
7639
|
+
outputTokenInfo.currentEpoch
|
|
7640
|
+
).amount;
|
|
7641
|
+
}
|
|
7642
|
+
const minSwapOutAmount = getMinAmountWithSlippage(actualAmoutOut, slippage);
|
|
6936
7643
|
return {
|
|
6937
7644
|
swapInAmount: inAmount,
|
|
6938
|
-
|
|
7645
|
+
consumedInAmount: actualAmountIn,
|
|
7646
|
+
swapOutAmount: actualAmoutOut,
|
|
6939
7647
|
minSwapOutAmount,
|
|
6940
|
-
totalFee
|
|
6941
|
-
priceImpact: getPriceImpact(minSwapOutAmount,
|
|
7648
|
+
totalFee,
|
|
7649
|
+
priceImpact: getPriceImpact(minSwapOutAmount, actualAmoutOut)
|
|
6942
7650
|
};
|
|
6943
7651
|
});
|
|
6944
7652
|
}
|
|
6945
7653
|
/**
|
|
6946
|
-
*
|
|
7654
|
+
* Calculates the deposit quote for liquidity pool.
|
|
6947
7655
|
*
|
|
6948
|
-
* @param {
|
|
6949
|
-
* - tokenX: The mint address of token X.
|
|
6950
|
-
* - tokenY: The mint address of token Y.
|
|
6951
|
-
* - maxAmountX: The maximum amount of token X available.
|
|
6952
|
-
* - maxAmountY: The maximum amount of token Y available.
|
|
6953
|
-
* - pool: The address of the liquidity pool.
|
|
7656
|
+
* @param {GetDepositQuoteParams} params - The parameters for calculating the deposit quote.
|
|
6954
7657
|
*
|
|
6955
|
-
* @returns {Promise<
|
|
7658
|
+
* @returns {Promise<Object>} Deposit quote results
|
|
7659
|
+
* @returns {BN} returns.actualInputAmount - The actual amount used as input (after deducting transfer fees).
|
|
7660
|
+
* @returns {BN} returns.outputAmount - The calculated corresponding amount of the other token.
|
|
7661
|
+
* @returns {BN} returns.liquidityDelta - The amount of liquidity that will be added to the pool.
|
|
6956
7662
|
*/
|
|
6957
|
-
|
|
7663
|
+
getDepositQuote(params) {
|
|
6958
7664
|
return __async(this, null, function* () {
|
|
6959
7665
|
const {
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
7666
|
+
inAmount,
|
|
7667
|
+
isTokenA,
|
|
7668
|
+
inputTokenInfo,
|
|
7669
|
+
outputTokenInfo,
|
|
7670
|
+
minSqrtPrice,
|
|
7671
|
+
maxSqrtPrice,
|
|
6964
7672
|
sqrtPrice
|
|
6965
7673
|
} = params;
|
|
6966
|
-
const
|
|
6967
|
-
|
|
7674
|
+
const actualAmountIn = inputTokenInfo ? inAmount.sub(
|
|
7675
|
+
calculateTransferFeeIncludedAmount(
|
|
7676
|
+
inAmount,
|
|
7677
|
+
inputTokenInfo.mint,
|
|
7678
|
+
inputTokenInfo.currentEpoch
|
|
7679
|
+
).transferFee
|
|
7680
|
+
) : inAmount;
|
|
7681
|
+
const { liquidityDelta, rawAmount } = isTokenA ? {
|
|
7682
|
+
liquidityDelta: getLiquidityDeltaFromAmountA(
|
|
7683
|
+
actualAmountIn,
|
|
7684
|
+
sqrtPrice,
|
|
7685
|
+
maxSqrtPrice
|
|
7686
|
+
),
|
|
7687
|
+
rawAmount: (delta) => getAmountBFromLiquidityDelta(
|
|
7688
|
+
delta,
|
|
7689
|
+
sqrtPrice,
|
|
7690
|
+
minSqrtPrice,
|
|
7691
|
+
0 /* Up */
|
|
7692
|
+
)
|
|
7693
|
+
} : {
|
|
7694
|
+
liquidityDelta: getLiquidityDeltaFromAmountB(
|
|
7695
|
+
actualAmountIn,
|
|
7696
|
+
minSqrtPrice,
|
|
7697
|
+
sqrtPrice
|
|
7698
|
+
),
|
|
7699
|
+
rawAmount: (delta) => getAmountAFromLiquidityDelta(
|
|
7700
|
+
delta,
|
|
7701
|
+
sqrtPrice,
|
|
7702
|
+
maxSqrtPrice,
|
|
7703
|
+
0 /* Up */
|
|
7704
|
+
)
|
|
7705
|
+
};
|
|
7706
|
+
const rawOutputAmount = new BN9(rawAmount(liquidityDelta));
|
|
7707
|
+
const outputAmount = outputTokenInfo ? calculateTransferFeeIncludedAmount(
|
|
7708
|
+
rawOutputAmount,
|
|
7709
|
+
outputTokenInfo.mint,
|
|
7710
|
+
outputTokenInfo.currentEpoch
|
|
7711
|
+
).amount : rawOutputAmount;
|
|
7712
|
+
return {
|
|
7713
|
+
actualInputAmount: actualAmountIn,
|
|
7714
|
+
consumedInputAmount: inAmount,
|
|
7715
|
+
liquidityDelta,
|
|
7716
|
+
outputAmount
|
|
7717
|
+
};
|
|
7718
|
+
});
|
|
7719
|
+
}
|
|
7720
|
+
/**
|
|
7721
|
+
* Calculates the withdrawal quote for removing liquidity from a concentrated liquidity pool.
|
|
7722
|
+
*
|
|
7723
|
+
* @param {GetWithdrawQuoteParams} params - The parameters for calculating the withdraw quote
|
|
7724
|
+
*
|
|
7725
|
+
* @param {Object|null} params.tokenATokenInfo - must provide if token a is token2022
|
|
7726
|
+
* @param {Object|null} params.tokenBTokenInfo - must provide if token b is token2022
|
|
7727
|
+
*
|
|
7728
|
+
* @returns {Promise<Object>} Withdrawal quote results
|
|
7729
|
+
* @returns {BN} returns.liquidityDelta - The amount of liquidity that will be removed from the pool
|
|
7730
|
+
* @returns {BN} returns.outAmountA - The calculated amount of token A to be received (after deducting transfer fees)
|
|
7731
|
+
* @returns {BN} returns.outAmountB - The calculated amount of token B to be received (after deducting transfer fees)
|
|
7732
|
+
*/
|
|
7733
|
+
getWithdrawQuote(params) {
|
|
7734
|
+
return __async(this, null, function* () {
|
|
7735
|
+
const {
|
|
7736
|
+
liquidityDelta,
|
|
7737
|
+
sqrtPrice,
|
|
7738
|
+
maxSqrtPrice,
|
|
7739
|
+
minSqrtPrice,
|
|
7740
|
+
tokenATokenInfo,
|
|
7741
|
+
tokenBTokenInfo
|
|
7742
|
+
} = params;
|
|
7743
|
+
const amountA = getAmountAFromLiquidityDelta(
|
|
7744
|
+
liquidityDelta,
|
|
6968
7745
|
sqrtPrice,
|
|
6969
|
-
|
|
7746
|
+
maxSqrtPrice,
|
|
7747
|
+
1 /* Down */
|
|
6970
7748
|
);
|
|
6971
|
-
const
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
7749
|
+
const amountB = getAmountBFromLiquidityDelta(
|
|
7750
|
+
liquidityDelta,
|
|
7751
|
+
sqrtPrice,
|
|
7752
|
+
minSqrtPrice,
|
|
7753
|
+
1 /* Down */
|
|
6975
7754
|
);
|
|
6976
|
-
return
|
|
7755
|
+
return {
|
|
7756
|
+
liquidityDelta,
|
|
7757
|
+
outAmountA: tokenATokenInfo ? calculateTransferFeeExcludedAmount(
|
|
7758
|
+
new BN9(amountA),
|
|
7759
|
+
tokenATokenInfo.mint,
|
|
7760
|
+
tokenATokenInfo.currentEpoch
|
|
7761
|
+
).amount : new BN9(amountA),
|
|
7762
|
+
outAmountB: tokenBTokenInfo ? calculateTransferFeeExcludedAmount(
|
|
7763
|
+
new BN9(amountB),
|
|
7764
|
+
tokenBTokenInfo.mint,
|
|
7765
|
+
tokenBTokenInfo.currentEpoch
|
|
7766
|
+
).amount : new BN9(amountB)
|
|
7767
|
+
};
|
|
6977
7768
|
});
|
|
6978
7769
|
}
|
|
7770
|
+
/**
|
|
7771
|
+
* Calculates liquidity and corresponding token amounts for token A single-sided pool creation
|
|
7772
|
+
* Only supports initialization where initial price equals min sqrt price
|
|
7773
|
+
* @param params Parameters for single-sided pool creation
|
|
7774
|
+
* @returns Calculated liquidity delta
|
|
7775
|
+
*/
|
|
7776
|
+
preparePoolCreationSingleSide(params) {
|
|
7777
|
+
const {
|
|
7778
|
+
tokenAAmount,
|
|
7779
|
+
initSqrtPrice,
|
|
7780
|
+
minSqrtPrice,
|
|
7781
|
+
maxSqrtPrice,
|
|
7782
|
+
tokenAInfo
|
|
7783
|
+
} = params;
|
|
7784
|
+
if (!initSqrtPrice.eq(minSqrtPrice)) {
|
|
7785
|
+
throw new Error("Only support single side for base token.");
|
|
7786
|
+
}
|
|
7787
|
+
const actualAmountIn = tokenAInfo ? tokenAAmount.sub(
|
|
7788
|
+
calculateTransferFeeIncludedAmount(
|
|
7789
|
+
tokenAAmount,
|
|
7790
|
+
tokenAInfo.mint,
|
|
7791
|
+
tokenAInfo.currentEpoch
|
|
7792
|
+
).transferFee
|
|
7793
|
+
) : tokenAAmount;
|
|
7794
|
+
const liquidityDelta = getLiquidityDeltaFromAmountA(
|
|
7795
|
+
actualAmountIn,
|
|
7796
|
+
initSqrtPrice,
|
|
7797
|
+
maxSqrtPrice
|
|
7798
|
+
);
|
|
7799
|
+
return liquidityDelta;
|
|
7800
|
+
}
|
|
7801
|
+
/**
|
|
7802
|
+
* Prepares parameters required for pool creation, including initial sqrt price and liquidity.
|
|
7803
|
+
* @private
|
|
7804
|
+
* @param {PreparePoolCreationParams} params - Initial token amounts for pool creation.
|
|
7805
|
+
* @returns init sqrt price and liquidity in Q64 format.
|
|
7806
|
+
*/
|
|
7807
|
+
preparePoolCreationParams(params) {
|
|
7808
|
+
const {
|
|
7809
|
+
tokenAAmount,
|
|
7810
|
+
tokenBAmount,
|
|
7811
|
+
minSqrtPrice,
|
|
7812
|
+
maxSqrtPrice,
|
|
7813
|
+
tokenAInfo,
|
|
7814
|
+
tokenBInfo
|
|
7815
|
+
} = params;
|
|
7816
|
+
if (tokenAAmount.eq(new BN9(0)) && tokenBAmount.eq(new BN9(0))) {
|
|
7817
|
+
throw new Error("Invalid input amount");
|
|
7818
|
+
}
|
|
7819
|
+
const actualAmountAIn = tokenAInfo ? tokenAAmount.sub(
|
|
7820
|
+
calculateTransferFeeIncludedAmount(
|
|
7821
|
+
tokenAAmount,
|
|
7822
|
+
tokenAInfo.mint,
|
|
7823
|
+
tokenAInfo.currentEpoch
|
|
7824
|
+
).transferFee
|
|
7825
|
+
) : tokenAAmount;
|
|
7826
|
+
const actualAmountBIn = tokenBInfo ? tokenAAmount.sub(
|
|
7827
|
+
calculateTransferFeeIncludedAmount(
|
|
7828
|
+
tokenBAmount,
|
|
7829
|
+
tokenBInfo.mint,
|
|
7830
|
+
tokenBInfo.currentEpoch
|
|
7831
|
+
).transferFee
|
|
7832
|
+
) : tokenAAmount;
|
|
7833
|
+
const initSqrtPrice = calculateInitSqrtPrice(
|
|
7834
|
+
tokenAAmount,
|
|
7835
|
+
tokenBAmount,
|
|
7836
|
+
minSqrtPrice,
|
|
7837
|
+
maxSqrtPrice
|
|
7838
|
+
);
|
|
7839
|
+
const liquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA(
|
|
7840
|
+
actualAmountAIn,
|
|
7841
|
+
initSqrtPrice,
|
|
7842
|
+
maxSqrtPrice
|
|
7843
|
+
);
|
|
7844
|
+
const liquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB(
|
|
7845
|
+
actualAmountBIn,
|
|
7846
|
+
minSqrtPrice,
|
|
7847
|
+
initSqrtPrice
|
|
7848
|
+
);
|
|
7849
|
+
const liquidityDelta = min(
|
|
7850
|
+
liquidityDeltaFromAmountA,
|
|
7851
|
+
liquidityDeltaFromAmountB
|
|
7852
|
+
);
|
|
7853
|
+
return {
|
|
7854
|
+
initSqrtPrice,
|
|
7855
|
+
liquidityDelta
|
|
7856
|
+
};
|
|
7857
|
+
}
|
|
7858
|
+
/**
|
|
7859
|
+
* Builds a transaction to create a permissionless pool.
|
|
7860
|
+
* @param params - Parameters for pool creation.
|
|
7861
|
+
* @returns Transaction builder.
|
|
7862
|
+
*/
|
|
6979
7863
|
createPool(params) {
|
|
6980
7864
|
return __async(this, null, function* () {
|
|
6981
|
-
var _a, _b, _c, _d;
|
|
6982
7865
|
const {
|
|
6983
7866
|
payer,
|
|
6984
7867
|
creator,
|
|
@@ -6986,70 +7869,61 @@ var CpAmm = class {
|
|
|
6986
7869
|
positionNft,
|
|
6987
7870
|
tokenAMint,
|
|
6988
7871
|
tokenBMint,
|
|
7872
|
+
initSqrtPrice,
|
|
7873
|
+
liquidityDelta,
|
|
6989
7874
|
activationPoint,
|
|
6990
7875
|
tokenAAmount,
|
|
6991
7876
|
tokenBAmount,
|
|
6992
|
-
|
|
6993
|
-
|
|
7877
|
+
tokenAProgram,
|
|
7878
|
+
tokenBProgram
|
|
6994
7879
|
} = params;
|
|
6995
|
-
const
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
config,
|
|
7006
|
-
tokenAMint,
|
|
7007
|
-
tokenBMint,
|
|
7008
|
-
this._program.programId
|
|
7009
|
-
);
|
|
7010
|
-
const position = derivePositionAddress(
|
|
7011
|
-
positionNft,
|
|
7012
|
-
this._program.programId
|
|
7013
|
-
);
|
|
7014
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7015
|
-
positionNft,
|
|
7016
|
-
this._program.programId
|
|
7017
|
-
);
|
|
7018
|
-
const tokenAProgram = (_b = (_a = yield this._program.provider.connection.getParsedAccountInfo(tokenAMint)) == null ? void 0 : _a.value) == null ? void 0 : _b.owner;
|
|
7019
|
-
const tokenBProgram = (_d = (_c = yield this._program.provider.connection.getParsedAccountInfo(tokenBMint)) == null ? void 0 : _c.value) == null ? void 0 : _d.owner;
|
|
7020
|
-
const payerTokenA = getAssociatedTokenAddressSync2(
|
|
7021
|
-
tokenAMint,
|
|
7880
|
+
const pool = derivePoolAddress(config, tokenAMint, tokenBMint);
|
|
7881
|
+
const position = derivePositionAddress(positionNft);
|
|
7882
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
7883
|
+
const tokenAVault = deriveTokenVaultAddress(tokenAMint, pool);
|
|
7884
|
+
const tokenBVault = deriveTokenVaultAddress(tokenBMint, pool);
|
|
7885
|
+
const {
|
|
7886
|
+
tokenAAta: payerTokenA,
|
|
7887
|
+
tokenBAta: payerTokenB,
|
|
7888
|
+
instructions: preInstructions
|
|
7889
|
+
} = yield this.prepareTokenAccounts(
|
|
7022
7890
|
payer,
|
|
7023
|
-
|
|
7024
|
-
tokenAProgram
|
|
7025
|
-
);
|
|
7026
|
-
const payerTokenB = getAssociatedTokenAddressSync2(
|
|
7891
|
+
tokenAMint,
|
|
7027
7892
|
tokenBMint,
|
|
7028
|
-
|
|
7029
|
-
true,
|
|
7893
|
+
tokenAProgram,
|
|
7030
7894
|
tokenBProgram
|
|
7031
7895
|
);
|
|
7032
|
-
|
|
7896
|
+
if (tokenAMint.equals(NATIVE_MINT2)) {
|
|
7897
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
7898
|
+
payer,
|
|
7899
|
+
payerTokenA,
|
|
7900
|
+
BigInt(tokenAAmount.toString())
|
|
7901
|
+
);
|
|
7902
|
+
preInstructions.push(...wrapSOLIx);
|
|
7903
|
+
}
|
|
7904
|
+
if (tokenBMint.equals(NATIVE_MINT2)) {
|
|
7905
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
7906
|
+
payer,
|
|
7907
|
+
payerTokenB,
|
|
7908
|
+
BigInt(tokenBAmount.toString())
|
|
7909
|
+
);
|
|
7910
|
+
preInstructions.push(...wrapSOLIx);
|
|
7911
|
+
}
|
|
7912
|
+
const tokenBadgeAccounts = this.getTokenBadgeAccounts(
|
|
7033
7913
|
tokenAMint,
|
|
7034
|
-
|
|
7035
|
-
this._program.programId
|
|
7036
|
-
);
|
|
7037
|
-
const tokenBVault = deriveTokenVaultAddress(
|
|
7038
|
-
tokenBMint,
|
|
7039
|
-
pool,
|
|
7040
|
-
this._program.programId
|
|
7914
|
+
tokenBMint
|
|
7041
7915
|
);
|
|
7042
7916
|
const tx = yield this._program.methods.initializePool({
|
|
7043
|
-
liquidity:
|
|
7044
|
-
sqrtPrice:
|
|
7917
|
+
liquidity: liquidityDelta,
|
|
7918
|
+
sqrtPrice: initSqrtPrice,
|
|
7045
7919
|
activationPoint
|
|
7046
|
-
}).
|
|
7920
|
+
}).accountsPartial({
|
|
7047
7921
|
creator,
|
|
7048
7922
|
positionNftAccount,
|
|
7049
7923
|
positionNftMint: positionNft,
|
|
7050
7924
|
payer,
|
|
7051
7925
|
config,
|
|
7052
|
-
poolAuthority,
|
|
7926
|
+
poolAuthority: this.poolAuthority,
|
|
7053
7927
|
pool,
|
|
7054
7928
|
position,
|
|
7055
7929
|
tokenAMint,
|
|
@@ -7061,13 +7935,16 @@ var CpAmm = class {
|
|
|
7061
7935
|
token2022Program: TOKEN_2022_PROGRAM_ID2,
|
|
7062
7936
|
tokenAProgram,
|
|
7063
7937
|
tokenBProgram,
|
|
7064
|
-
systemProgram: SystemProgram2.programId
|
|
7065
|
-
|
|
7066
|
-
program: this._program.programId
|
|
7067
|
-
}).transaction();
|
|
7938
|
+
systemProgram: SystemProgram2.programId
|
|
7939
|
+
}).preInstructions(preInstructions).remainingAccounts(tokenBadgeAccounts).transaction();
|
|
7068
7940
|
return tx;
|
|
7069
7941
|
});
|
|
7070
7942
|
}
|
|
7943
|
+
/**
|
|
7944
|
+
* Builds a transaction to create a customizable pool.
|
|
7945
|
+
* @param params - Parameters for customizable pool creation.
|
|
7946
|
+
* @returns Transaction and related addresses.
|
|
7947
|
+
*/
|
|
7071
7948
|
createCustomPool(params) {
|
|
7072
7949
|
return __async(this, null, function* () {
|
|
7073
7950
|
const {
|
|
@@ -7075,8 +7952,10 @@ var CpAmm = class {
|
|
|
7075
7952
|
tokenBMint,
|
|
7076
7953
|
tokenAAmount,
|
|
7077
7954
|
tokenBAmount,
|
|
7078
|
-
|
|
7079
|
-
|
|
7955
|
+
sqrtMinPrice,
|
|
7956
|
+
sqrtMaxPrice,
|
|
7957
|
+
liquidityDelta,
|
|
7958
|
+
initSqrtPrice,
|
|
7080
7959
|
payer,
|
|
7081
7960
|
creator,
|
|
7082
7961
|
positionNft,
|
|
@@ -7088,62 +7967,22 @@ var CpAmm = class {
|
|
|
7088
7967
|
tokenAProgram,
|
|
7089
7968
|
tokenBProgram
|
|
7090
7969
|
} = params;
|
|
7091
|
-
const
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
tokenBMint,
|
|
7103
|
-
this._program.programId
|
|
7104
|
-
);
|
|
7105
|
-
const position = derivePositionAddress(
|
|
7106
|
-
positionNft,
|
|
7107
|
-
this._program.programId
|
|
7108
|
-
);
|
|
7109
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7110
|
-
positionNft,
|
|
7111
|
-
this._program.programId
|
|
7112
|
-
);
|
|
7113
|
-
const tokenAVault = deriveTokenVaultAddress(
|
|
7970
|
+
const pool = deriveCustomizablePoolAddress(tokenAMint, tokenBMint);
|
|
7971
|
+
const position = derivePositionAddress(positionNft);
|
|
7972
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
7973
|
+
const tokenAVault = deriveTokenVaultAddress(tokenAMint, pool);
|
|
7974
|
+
const tokenBVault = deriveTokenVaultAddress(tokenBMint, pool);
|
|
7975
|
+
const {
|
|
7976
|
+
tokenAAta: payerTokenA,
|
|
7977
|
+
tokenBAta: payerTokenB,
|
|
7978
|
+
instructions: preInstructions
|
|
7979
|
+
} = yield this.prepareTokenAccounts(
|
|
7980
|
+
payer,
|
|
7114
7981
|
tokenAMint,
|
|
7115
|
-
pool,
|
|
7116
|
-
this._program.programId
|
|
7117
|
-
);
|
|
7118
|
-
const tokenBVault = deriveTokenVaultAddress(
|
|
7119
7982
|
tokenBMint,
|
|
7120
|
-
|
|
7121
|
-
|
|
7983
|
+
tokenAProgram,
|
|
7984
|
+
tokenBProgram
|
|
7122
7985
|
);
|
|
7123
|
-
const preInstructions = [];
|
|
7124
|
-
const [
|
|
7125
|
-
{ ataPubkey: payerTokenA, ix: createTokenATokenAccountIx },
|
|
7126
|
-
{ ataPubkey: payerTokenB, ix: createTokenBTokenAccountIx }
|
|
7127
|
-
] = yield Promise.all([
|
|
7128
|
-
getOrCreateATAInstruction(
|
|
7129
|
-
this._program.provider.connection,
|
|
7130
|
-
tokenAMint,
|
|
7131
|
-
payer,
|
|
7132
|
-
payer,
|
|
7133
|
-
true,
|
|
7134
|
-
tokenAProgram
|
|
7135
|
-
),
|
|
7136
|
-
getOrCreateATAInstruction(
|
|
7137
|
-
this._program.provider.connection,
|
|
7138
|
-
tokenBMint,
|
|
7139
|
-
payer,
|
|
7140
|
-
payer,
|
|
7141
|
-
true,
|
|
7142
|
-
tokenBProgram
|
|
7143
|
-
)
|
|
7144
|
-
]);
|
|
7145
|
-
createTokenATokenAccountIx && preInstructions.push(createTokenATokenAccountIx);
|
|
7146
|
-
createTokenBTokenAccountIx && preInstructions.push(createTokenBTokenAccountIx);
|
|
7147
7986
|
if (tokenAMint.equals(NATIVE_MINT2)) {
|
|
7148
7987
|
const wrapSOLIx = wrapSOLInstruction(
|
|
7149
7988
|
payer,
|
|
@@ -7160,22 +7999,26 @@ var CpAmm = class {
|
|
|
7160
7999
|
);
|
|
7161
8000
|
preInstructions.push(...wrapSOLIx);
|
|
7162
8001
|
}
|
|
8002
|
+
const tokenBadgeAccounts = this.getTokenBadgeAccounts(
|
|
8003
|
+
tokenAMint,
|
|
8004
|
+
tokenBMint
|
|
8005
|
+
);
|
|
7163
8006
|
const transaction = yield this._program.methods.initializeCustomizablePool({
|
|
7164
8007
|
poolFees,
|
|
7165
|
-
sqrtMinPrice
|
|
7166
|
-
sqrtMaxPrice
|
|
8008
|
+
sqrtMinPrice,
|
|
8009
|
+
sqrtMaxPrice,
|
|
7167
8010
|
hasAlphaVault,
|
|
7168
|
-
liquidity:
|
|
7169
|
-
sqrtPrice:
|
|
8011
|
+
liquidity: liquidityDelta,
|
|
8012
|
+
sqrtPrice: initSqrtPrice,
|
|
7170
8013
|
activationType,
|
|
7171
8014
|
collectFeeMode,
|
|
7172
8015
|
activationPoint
|
|
7173
|
-
}).
|
|
8016
|
+
}).accountsPartial({
|
|
7174
8017
|
creator,
|
|
7175
8018
|
positionNftAccount,
|
|
7176
8019
|
positionNftMint: positionNft,
|
|
7177
8020
|
payer,
|
|
7178
|
-
poolAuthority,
|
|
8021
|
+
poolAuthority: this.poolAuthority,
|
|
7179
8022
|
pool,
|
|
7180
8023
|
position,
|
|
7181
8024
|
tokenAMint,
|
|
@@ -7185,50 +8028,49 @@ var CpAmm = class {
|
|
|
7185
8028
|
payerTokenA,
|
|
7186
8029
|
payerTokenB,
|
|
7187
8030
|
token2022Program: TOKEN_2022_PROGRAM_ID2,
|
|
7188
|
-
tokenAProgram
|
|
7189
|
-
tokenBProgram
|
|
7190
|
-
systemProgram: SystemProgram2.programId
|
|
7191
|
-
|
|
7192
|
-
program: this._program.programId
|
|
7193
|
-
}).preInstructions(preInstructions).transaction();
|
|
8031
|
+
tokenAProgram,
|
|
8032
|
+
tokenBProgram,
|
|
8033
|
+
systemProgram: SystemProgram2.programId
|
|
8034
|
+
}).preInstructions(preInstructions).remainingAccounts(tokenBadgeAccounts).transaction();
|
|
7194
8035
|
return { tx: transaction, pool, position };
|
|
7195
8036
|
});
|
|
7196
8037
|
}
|
|
8038
|
+
/**
|
|
8039
|
+
* Builds a transaction to create a position.
|
|
8040
|
+
* @param {CreatePositionParams} params - Parameters for position creation.
|
|
8041
|
+
* @returns Transaction builder.
|
|
8042
|
+
*/
|
|
7197
8043
|
createPosition(params) {
|
|
7198
8044
|
return __async(this, null, function* () {
|
|
7199
8045
|
const { owner, payer, pool, positionNft } = params;
|
|
7200
|
-
const
|
|
7201
|
-
const
|
|
7202
|
-
|
|
7203
|
-
this._program.programId
|
|
7204
|
-
);
|
|
7205
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7206
|
-
positionNft,
|
|
7207
|
-
this._program.programId
|
|
7208
|
-
);
|
|
7209
|
-
return yield this._program.methods.createPosition().accountsStrict({
|
|
8046
|
+
const position = derivePositionAddress(positionNft);
|
|
8047
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
8048
|
+
return yield this._program.methods.createPosition().accountsPartial({
|
|
7210
8049
|
owner,
|
|
7211
8050
|
positionNftMint: positionNft,
|
|
7212
|
-
poolAuthority,
|
|
8051
|
+
poolAuthority: this.poolAuthority,
|
|
7213
8052
|
positionNftAccount,
|
|
7214
8053
|
payer,
|
|
7215
8054
|
pool,
|
|
7216
8055
|
position,
|
|
7217
8056
|
tokenProgram: TOKEN_2022_PROGRAM_ID2,
|
|
7218
|
-
systemProgram: SystemProgram2.programId
|
|
7219
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7220
|
-
program: this._program.programId
|
|
8057
|
+
systemProgram: SystemProgram2.programId
|
|
7221
8058
|
}).transaction();
|
|
7222
8059
|
});
|
|
7223
8060
|
}
|
|
8061
|
+
/**
|
|
8062
|
+
* Builds a transaction to add liquidity to an existing position.
|
|
8063
|
+
* @param {AddLiquidityParams} params - Parameters for adding liquidity.
|
|
8064
|
+
* @returns Transaction builder.
|
|
8065
|
+
*/
|
|
7224
8066
|
addLiquidity(params) {
|
|
7225
8067
|
return __async(this, null, function* () {
|
|
7226
8068
|
const {
|
|
7227
8069
|
owner,
|
|
7228
8070
|
pool,
|
|
7229
8071
|
position,
|
|
7230
|
-
|
|
7231
|
-
|
|
8072
|
+
positionNftAccount,
|
|
8073
|
+
liquidityDelta,
|
|
7232
8074
|
maxAmountTokenA,
|
|
7233
8075
|
maxAmountTokenB,
|
|
7234
8076
|
tokenAAmountThreshold,
|
|
@@ -7240,34 +8082,17 @@ var CpAmm = class {
|
|
|
7240
8082
|
tokenAProgram,
|
|
7241
8083
|
tokenBProgram
|
|
7242
8084
|
} = params;
|
|
7243
|
-
const
|
|
7244
|
-
|
|
7245
|
-
|
|
8085
|
+
const {
|
|
8086
|
+
tokenAAta: tokenAAccount,
|
|
8087
|
+
tokenBAta: tokenBAccount,
|
|
8088
|
+
instructions: preInstructions
|
|
8089
|
+
} = yield this.prepareTokenAccounts(
|
|
8090
|
+
owner,
|
|
8091
|
+
tokenAMint,
|
|
8092
|
+
tokenBMint,
|
|
8093
|
+
tokenAProgram,
|
|
8094
|
+
tokenBProgram
|
|
7246
8095
|
);
|
|
7247
|
-
const preInstructions = [];
|
|
7248
|
-
const [
|
|
7249
|
-
{ ataPubkey: tokenAAccount, ix: createTokenATokenAccountIx },
|
|
7250
|
-
{ ataPubkey: tokenBAccount, ix: createTokenBTokenAccountIx }
|
|
7251
|
-
] = yield Promise.all([
|
|
7252
|
-
getOrCreateATAInstruction(
|
|
7253
|
-
this._program.provider.connection,
|
|
7254
|
-
tokenAMint,
|
|
7255
|
-
owner,
|
|
7256
|
-
owner,
|
|
7257
|
-
true,
|
|
7258
|
-
tokenAProgram
|
|
7259
|
-
),
|
|
7260
|
-
getOrCreateATAInstruction(
|
|
7261
|
-
this._program.provider.connection,
|
|
7262
|
-
tokenBMint,
|
|
7263
|
-
owner,
|
|
7264
|
-
owner,
|
|
7265
|
-
true,
|
|
7266
|
-
tokenBProgram
|
|
7267
|
-
)
|
|
7268
|
-
]);
|
|
7269
|
-
createTokenATokenAccountIx && preInstructions.push(createTokenATokenAccountIx);
|
|
7270
|
-
createTokenBTokenAccountIx && preInstructions.push(createTokenBTokenAccountIx);
|
|
7271
8096
|
if (tokenAMint.equals(NATIVE_MINT2)) {
|
|
7272
8097
|
const wrapSOLIx = wrapSOLInstruction(
|
|
7273
8098
|
owner,
|
|
@@ -7291,11 +8116,7 @@ var CpAmm = class {
|
|
|
7291
8116
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
7292
8117
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7293
8118
|
}
|
|
7294
|
-
|
|
7295
|
-
liquidityDelta: liquidityDeltaQ64,
|
|
7296
|
-
tokenAAmountThreshold,
|
|
7297
|
-
tokenBAmountThreshold
|
|
7298
|
-
}).accountsStrict({
|
|
8119
|
+
const addLiquidityInstruction = yield this.buildAddLiquidityInstruction({
|
|
7299
8120
|
pool,
|
|
7300
8121
|
position,
|
|
7301
8122
|
positionNftAccount,
|
|
@@ -7308,19 +8129,32 @@ var CpAmm = class {
|
|
|
7308
8129
|
tokenBVault,
|
|
7309
8130
|
tokenAProgram,
|
|
7310
8131
|
tokenBProgram,
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
8132
|
+
liquidityDelta,
|
|
8133
|
+
tokenAAmountThreshold,
|
|
8134
|
+
tokenBAmountThreshold
|
|
8135
|
+
});
|
|
8136
|
+
const transaction = new Transaction();
|
|
8137
|
+
transaction.add(
|
|
8138
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
8139
|
+
addLiquidityInstruction,
|
|
8140
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
8141
|
+
);
|
|
8142
|
+
return transaction;
|
|
7314
8143
|
});
|
|
7315
8144
|
}
|
|
8145
|
+
/**
|
|
8146
|
+
* Builds a transaction to remove liquidity from a position.
|
|
8147
|
+
* @param {RemoveLiquidityParams} params - Parameters for removing liquidity.
|
|
8148
|
+
* @returns Transaction builder.
|
|
8149
|
+
*/
|
|
7316
8150
|
removeLiquidity(params) {
|
|
7317
8151
|
return __async(this, null, function* () {
|
|
7318
8152
|
const {
|
|
7319
8153
|
owner,
|
|
7320
8154
|
pool,
|
|
7321
8155
|
position,
|
|
7322
|
-
|
|
7323
|
-
|
|
8156
|
+
positionNftAccount,
|
|
8157
|
+
liquidityDelta,
|
|
7324
8158
|
tokenAAmountThreshold,
|
|
7325
8159
|
tokenBAmountThreshold,
|
|
7326
8160
|
tokenAMint,
|
|
@@ -7330,35 +8164,17 @@ var CpAmm = class {
|
|
|
7330
8164
|
tokenAProgram,
|
|
7331
8165
|
tokenBProgram
|
|
7332
8166
|
} = params;
|
|
7333
|
-
const
|
|
7334
|
-
|
|
7335
|
-
|
|
8167
|
+
const {
|
|
8168
|
+
tokenAAta: tokenAAccount,
|
|
8169
|
+
tokenBAta: tokenBAccount,
|
|
8170
|
+
instructions: preInstructions
|
|
8171
|
+
} = yield this.prepareTokenAccounts(
|
|
8172
|
+
owner,
|
|
8173
|
+
tokenAMint,
|
|
8174
|
+
tokenBMint,
|
|
8175
|
+
tokenAProgram,
|
|
8176
|
+
tokenBProgram
|
|
7336
8177
|
);
|
|
7337
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7338
|
-
const preInstructions = [];
|
|
7339
|
-
const [
|
|
7340
|
-
{ ataPubkey: tokenAAccount, ix: createTokenAAccountIx },
|
|
7341
|
-
{ ataPubkey: tokenBAccount, ix: createTokenBAccountIx }
|
|
7342
|
-
] = yield Promise.all([
|
|
7343
|
-
getOrCreateATAInstruction(
|
|
7344
|
-
this._program.provider.connection,
|
|
7345
|
-
tokenAMint,
|
|
7346
|
-
owner,
|
|
7347
|
-
owner,
|
|
7348
|
-
true,
|
|
7349
|
-
tokenAProgram
|
|
7350
|
-
),
|
|
7351
|
-
getOrCreateATAInstruction(
|
|
7352
|
-
this._program.provider.connection,
|
|
7353
|
-
tokenBMint,
|
|
7354
|
-
owner,
|
|
7355
|
-
owner,
|
|
7356
|
-
true,
|
|
7357
|
-
tokenBProgram
|
|
7358
|
-
)
|
|
7359
|
-
]);
|
|
7360
|
-
createTokenAAccountIx && preInstructions.push(createTokenAAccountIx);
|
|
7361
|
-
createTokenBAccountIx && preInstructions.push(createTokenBAccountIx);
|
|
7362
8178
|
const postInstructions = [];
|
|
7363
8179
|
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
7364
8180
|
NATIVE_MINT2.toBase58()
|
|
@@ -7367,11 +8183,11 @@ var CpAmm = class {
|
|
|
7367
8183
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7368
8184
|
}
|
|
7369
8185
|
return yield this._program.methods.removeLiquidity({
|
|
7370
|
-
liquidityDelta
|
|
8186
|
+
liquidityDelta,
|
|
7371
8187
|
tokenAAmountThreshold,
|
|
7372
8188
|
tokenBAmountThreshold
|
|
7373
|
-
}).
|
|
7374
|
-
poolAuthority,
|
|
8189
|
+
}).accountsPartial({
|
|
8190
|
+
poolAuthority: this.poolAuthority,
|
|
7375
8191
|
pool,
|
|
7376
8192
|
position,
|
|
7377
8193
|
positionNftAccount,
|
|
@@ -7383,12 +8199,80 @@ var CpAmm = class {
|
|
|
7383
8199
|
tokenAVault,
|
|
7384
8200
|
tokenBVault,
|
|
7385
8201
|
tokenAProgram,
|
|
7386
|
-
tokenBProgram
|
|
7387
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7388
|
-
program: this._program.programId
|
|
8202
|
+
tokenBProgram
|
|
7389
8203
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7390
8204
|
});
|
|
7391
8205
|
}
|
|
8206
|
+
/**
|
|
8207
|
+
* Builds a transaction to remove liquidity from a position.
|
|
8208
|
+
* @param {RemoveLiquidityParams} params - Parameters for removing liquidity.
|
|
8209
|
+
* @returns Transaction builder.
|
|
8210
|
+
*/
|
|
8211
|
+
removeAllLiquidity(params) {
|
|
8212
|
+
return __async(this, null, function* () {
|
|
8213
|
+
const {
|
|
8214
|
+
owner,
|
|
8215
|
+
pool,
|
|
8216
|
+
position,
|
|
8217
|
+
positionNftAccount,
|
|
8218
|
+
tokenAAmountThreshold,
|
|
8219
|
+
tokenBAmountThreshold,
|
|
8220
|
+
tokenAMint,
|
|
8221
|
+
tokenBMint,
|
|
8222
|
+
tokenAVault,
|
|
8223
|
+
tokenBVault,
|
|
8224
|
+
tokenAProgram,
|
|
8225
|
+
tokenBProgram
|
|
8226
|
+
} = params;
|
|
8227
|
+
const {
|
|
8228
|
+
tokenAAta: tokenAAccount,
|
|
8229
|
+
tokenBAta: tokenBAccount,
|
|
8230
|
+
instructions: preInstructions
|
|
8231
|
+
} = yield this.prepareTokenAccounts(
|
|
8232
|
+
owner,
|
|
8233
|
+
tokenAMint,
|
|
8234
|
+
tokenBMint,
|
|
8235
|
+
tokenAProgram,
|
|
8236
|
+
tokenBProgram
|
|
8237
|
+
);
|
|
8238
|
+
const postInstructions = [];
|
|
8239
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
8240
|
+
NATIVE_MINT2.toBase58()
|
|
8241
|
+
)) {
|
|
8242
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
8243
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
8244
|
+
}
|
|
8245
|
+
const removeAllLiquidityInstruction = yield this.buildRemoveAllLiquidityInstruction({
|
|
8246
|
+
poolAuthority: this.poolAuthority,
|
|
8247
|
+
owner,
|
|
8248
|
+
pool,
|
|
8249
|
+
position,
|
|
8250
|
+
positionNftAccount,
|
|
8251
|
+
tokenAAccount,
|
|
8252
|
+
tokenBAccount,
|
|
8253
|
+
tokenAAmountThreshold,
|
|
8254
|
+
tokenBAmountThreshold,
|
|
8255
|
+
tokenAMint,
|
|
8256
|
+
tokenBMint,
|
|
8257
|
+
tokenAVault,
|
|
8258
|
+
tokenBVault,
|
|
8259
|
+
tokenAProgram,
|
|
8260
|
+
tokenBProgram
|
|
8261
|
+
});
|
|
8262
|
+
const transaction = new Transaction();
|
|
8263
|
+
transaction.add(
|
|
8264
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
8265
|
+
removeAllLiquidityInstruction,
|
|
8266
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
8267
|
+
);
|
|
8268
|
+
return transaction;
|
|
8269
|
+
});
|
|
8270
|
+
}
|
|
8271
|
+
/**
|
|
8272
|
+
* Builds a transaction to perform a swap in the pool.
|
|
8273
|
+
* @param {SwapParams} params - Parameters for swapping tokens.
|
|
8274
|
+
* @returns Transaction builder.
|
|
8275
|
+
*/
|
|
7392
8276
|
swap(params) {
|
|
7393
8277
|
return __async(this, null, function* () {
|
|
7394
8278
|
const {
|
|
@@ -7406,31 +8290,20 @@ var CpAmm = class {
|
|
|
7406
8290
|
tokenBProgram,
|
|
7407
8291
|
referralTokenAccount
|
|
7408
8292
|
} = params;
|
|
7409
|
-
const
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
getOrCreateATAInstruction(
|
|
7424
|
-
this._program.provider.connection,
|
|
7425
|
-
outputTokenMint,
|
|
7426
|
-
payer,
|
|
7427
|
-
payer,
|
|
7428
|
-
true,
|
|
7429
|
-
tokenBProgram
|
|
7430
|
-
)
|
|
7431
|
-
]);
|
|
7432
|
-
createInputTokenAccountIx && preInstructions.push(createInputTokenAccountIx);
|
|
7433
|
-
createOutputTokenAccountIx && preInstructions.push(createOutputTokenAccountIx);
|
|
8293
|
+
const [inputTokenProgram, outputTokenProgram] = inputTokenMint.equals(
|
|
8294
|
+
tokenAMint
|
|
8295
|
+
) ? [tokenAProgram, tokenBProgram] : [tokenBProgram, tokenAProgram];
|
|
8296
|
+
const {
|
|
8297
|
+
tokenAAta: inputTokenAccount,
|
|
8298
|
+
tokenBAta: outputTokenAccount,
|
|
8299
|
+
instructions: preInstructions
|
|
8300
|
+
} = yield this.prepareTokenAccounts(
|
|
8301
|
+
payer,
|
|
8302
|
+
inputTokenMint,
|
|
8303
|
+
outputTokenMint,
|
|
8304
|
+
inputTokenProgram,
|
|
8305
|
+
outputTokenProgram
|
|
8306
|
+
);
|
|
7434
8307
|
if (inputTokenMint.equals(NATIVE_MINT2)) {
|
|
7435
8308
|
const wrapSOLIx = wrapSOLInstruction(
|
|
7436
8309
|
payer,
|
|
@@ -7449,8 +8322,8 @@ var CpAmm = class {
|
|
|
7449
8322
|
return yield this._program.methods.swap({
|
|
7450
8323
|
amountIn,
|
|
7451
8324
|
minimumAmountOut
|
|
7452
|
-
}).
|
|
7453
|
-
poolAuthority,
|
|
8325
|
+
}).accountsPartial({
|
|
8326
|
+
poolAuthority: this.poolAuthority,
|
|
7454
8327
|
pool,
|
|
7455
8328
|
payer,
|
|
7456
8329
|
inputTokenAccount,
|
|
@@ -7461,12 +8334,15 @@ var CpAmm = class {
|
|
|
7461
8334
|
tokenBMint,
|
|
7462
8335
|
tokenAProgram,
|
|
7463
8336
|
tokenBProgram,
|
|
7464
|
-
referralTokenAccount
|
|
7465
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7466
|
-
program: this._program.programId
|
|
8337
|
+
referralTokenAccount
|
|
7467
8338
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7468
8339
|
});
|
|
7469
8340
|
}
|
|
8341
|
+
/**
|
|
8342
|
+
* Builds a transaction to lock a position with vesting schedule.
|
|
8343
|
+
* @param {LockPositionParams} params - Locking parameters.
|
|
8344
|
+
* @returns Transaction builder.
|
|
8345
|
+
*/
|
|
7470
8346
|
lockPosition(params) {
|
|
7471
8347
|
return __async(this, null, function* () {
|
|
7472
8348
|
const {
|
|
@@ -7475,64 +8351,56 @@ var CpAmm = class {
|
|
|
7475
8351
|
payer,
|
|
7476
8352
|
vestingAccount,
|
|
7477
8353
|
position,
|
|
7478
|
-
|
|
8354
|
+
positionNftAccount,
|
|
7479
8355
|
cliffPoint,
|
|
7480
8356
|
periodFrequency,
|
|
7481
8357
|
cliffUnlockLiquidity,
|
|
7482
8358
|
liquidityPerPeriod,
|
|
7483
|
-
numberOfPeriod
|
|
7484
|
-
vestings
|
|
8359
|
+
numberOfPeriod
|
|
7485
8360
|
} = params;
|
|
7486
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7487
|
-
positionNftMint,
|
|
7488
|
-
this._program.programId
|
|
7489
|
-
);
|
|
7490
8361
|
const lockPositionParams = {
|
|
7491
8362
|
cliffPoint,
|
|
7492
8363
|
periodFrequency,
|
|
7493
8364
|
cliffUnlockLiquidity,
|
|
7494
8365
|
liquidityPerPeriod,
|
|
7495
|
-
numberOfPeriod
|
|
7496
|
-
index: vestings.length
|
|
8366
|
+
numberOfPeriod
|
|
7497
8367
|
};
|
|
7498
|
-
return yield this._program.methods.lockPosition(lockPositionParams).
|
|
8368
|
+
return yield this._program.methods.lockPosition(lockPositionParams).accountsPartial({
|
|
7499
8369
|
position,
|
|
7500
8370
|
positionNftAccount,
|
|
7501
8371
|
vesting: vestingAccount,
|
|
7502
8372
|
pool,
|
|
7503
8373
|
owner,
|
|
7504
8374
|
payer,
|
|
7505
|
-
systemProgram: SystemProgram2.programId
|
|
7506
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7507
|
-
program: this._program.programId
|
|
8375
|
+
systemProgram: SystemProgram2.programId
|
|
7508
8376
|
}).transaction();
|
|
7509
8377
|
});
|
|
7510
8378
|
}
|
|
8379
|
+
/**
|
|
8380
|
+
* Builds a transaction to permanently lock a position.
|
|
8381
|
+
* @param {PermanentLockParams} params - Parameters for permanent locking.
|
|
8382
|
+
* @returns Transaction builder.
|
|
8383
|
+
*/
|
|
7511
8384
|
permanentLockPosition(params) {
|
|
7512
8385
|
return __async(this, null, function* () {
|
|
7513
|
-
const { owner, position,
|
|
7514
|
-
|
|
7515
|
-
positionNftMint,
|
|
7516
|
-
this._program.programId
|
|
7517
|
-
);
|
|
7518
|
-
return yield this._program.methods.permanentLockPosition(unlockedLiquidity).accountsStrict({
|
|
8386
|
+
const { owner, position, positionNftAccount, pool, unlockedLiquidity } = params;
|
|
8387
|
+
return yield this._program.methods.permanentLockPosition(unlockedLiquidity).accountsPartial({
|
|
7519
8388
|
position,
|
|
7520
8389
|
positionNftAccount,
|
|
7521
8390
|
pool,
|
|
7522
|
-
owner
|
|
7523
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7524
|
-
program: this._program.programId
|
|
8391
|
+
owner
|
|
7525
8392
|
}).transaction();
|
|
7526
8393
|
});
|
|
7527
8394
|
}
|
|
8395
|
+
/**
|
|
8396
|
+
* Builds a transaction to refresh vesting status of a position.
|
|
8397
|
+
* @param {RefreshVestingParams} params - Refresh vesting parameters.
|
|
8398
|
+
* @returns Transaction builder.
|
|
8399
|
+
*/
|
|
7528
8400
|
refreshVesting(params) {
|
|
7529
8401
|
return __async(this, null, function* () {
|
|
7530
|
-
const { owner, position,
|
|
7531
|
-
|
|
7532
|
-
positionNftMint,
|
|
7533
|
-
this._program.programId
|
|
7534
|
-
);
|
|
7535
|
-
return yield this._program.methods.refreshVesting().accountsStrict({
|
|
8402
|
+
const { owner, position, positionNftAccount, pool, vestings } = params;
|
|
8403
|
+
return yield this._program.methods.refreshVesting().accountsPartial({
|
|
7536
8404
|
position,
|
|
7537
8405
|
positionNftAccount,
|
|
7538
8406
|
pool,
|
|
@@ -7548,13 +8416,18 @@ var CpAmm = class {
|
|
|
7548
8416
|
).transaction();
|
|
7549
8417
|
});
|
|
7550
8418
|
}
|
|
8419
|
+
/**
|
|
8420
|
+
* Builds a transaction to claim position fee rewards.
|
|
8421
|
+
* @param {ClaimPositionFeeParams} params - Parameters for claiming position fee.
|
|
8422
|
+
* @returns Transaction builder.
|
|
8423
|
+
*/
|
|
7551
8424
|
claimPositionFee(params) {
|
|
7552
8425
|
return __async(this, null, function* () {
|
|
7553
8426
|
const {
|
|
7554
8427
|
owner,
|
|
7555
8428
|
pool,
|
|
7556
8429
|
position,
|
|
7557
|
-
|
|
8430
|
+
positionNftAccount,
|
|
7558
8431
|
tokenAVault,
|
|
7559
8432
|
tokenBVault,
|
|
7560
8433
|
tokenAMint,
|
|
@@ -7562,35 +8435,17 @@ var CpAmm = class {
|
|
|
7562
8435
|
tokenAProgram,
|
|
7563
8436
|
tokenBProgram
|
|
7564
8437
|
} = params;
|
|
7565
|
-
const
|
|
7566
|
-
|
|
7567
|
-
|
|
8438
|
+
const {
|
|
8439
|
+
tokenAAta: tokenAAccount,
|
|
8440
|
+
tokenBAta: tokenBAccount,
|
|
8441
|
+
instructions: preInstructions
|
|
8442
|
+
} = yield this.prepareTokenAccounts(
|
|
8443
|
+
owner,
|
|
8444
|
+
tokenAMint,
|
|
8445
|
+
tokenBMint,
|
|
8446
|
+
tokenAProgram,
|
|
8447
|
+
tokenBProgram
|
|
7568
8448
|
);
|
|
7569
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7570
|
-
const preInstructions = [];
|
|
7571
|
-
const [
|
|
7572
|
-
{ ataPubkey: tokenAAccount, ix: createTokenAAccountIx },
|
|
7573
|
-
{ ataPubkey: tokenBAccount, ix: createTokenBAccountIx }
|
|
7574
|
-
] = yield Promise.all([
|
|
7575
|
-
getOrCreateATAInstruction(
|
|
7576
|
-
this._program.provider.connection,
|
|
7577
|
-
tokenAMint,
|
|
7578
|
-
owner,
|
|
7579
|
-
owner,
|
|
7580
|
-
true,
|
|
7581
|
-
tokenAProgram
|
|
7582
|
-
),
|
|
7583
|
-
getOrCreateATAInstruction(
|
|
7584
|
-
this._program.provider.connection,
|
|
7585
|
-
tokenBMint,
|
|
7586
|
-
owner,
|
|
7587
|
-
owner,
|
|
7588
|
-
true,
|
|
7589
|
-
tokenBProgram
|
|
7590
|
-
)
|
|
7591
|
-
]);
|
|
7592
|
-
createTokenAAccountIx && preInstructions.push(createTokenAAccountIx);
|
|
7593
|
-
createTokenBAccountIx && preInstructions.push(createTokenBAccountIx);
|
|
7594
8449
|
const postInstructions = [];
|
|
7595
8450
|
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
7596
8451
|
NATIVE_MINT2.toBase58()
|
|
@@ -7598,47 +8453,303 @@ var CpAmm = class {
|
|
|
7598
8453
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
7599
8454
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7600
8455
|
}
|
|
7601
|
-
|
|
7602
|
-
|
|
8456
|
+
const claimPositionFeeInstruction = yield this.buildClaimPositionFeeInstruction({
|
|
8457
|
+
owner,
|
|
8458
|
+
poolAuthority: this.poolAuthority,
|
|
8459
|
+
pool,
|
|
8460
|
+
position,
|
|
8461
|
+
positionNftAccount,
|
|
8462
|
+
tokenAAccount,
|
|
8463
|
+
tokenBAccount,
|
|
8464
|
+
tokenAVault,
|
|
8465
|
+
tokenBVault,
|
|
8466
|
+
tokenAMint,
|
|
8467
|
+
tokenBMint,
|
|
8468
|
+
tokenAProgram,
|
|
8469
|
+
tokenBProgram
|
|
8470
|
+
});
|
|
8471
|
+
const transaction = new Transaction();
|
|
8472
|
+
transaction.add(
|
|
8473
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
8474
|
+
claimPositionFeeInstruction,
|
|
8475
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
8476
|
+
);
|
|
8477
|
+
return transaction;
|
|
8478
|
+
});
|
|
8479
|
+
}
|
|
8480
|
+
closePosition(params) {
|
|
8481
|
+
return __async(this, null, function* () {
|
|
8482
|
+
const { owner, pool, position, positionNftMint, positionNftAccount } = params;
|
|
8483
|
+
const instruction = yield this.buildClosePositionInstruction({
|
|
8484
|
+
owner,
|
|
8485
|
+
poolAuthority: this.poolAuthority,
|
|
8486
|
+
pool,
|
|
8487
|
+
position,
|
|
8488
|
+
positionNftMint,
|
|
8489
|
+
positionNftAccount
|
|
8490
|
+
});
|
|
8491
|
+
return new Transaction().add(instruction);
|
|
8492
|
+
});
|
|
8493
|
+
}
|
|
8494
|
+
/**
|
|
8495
|
+
* Builds a transaction to remove all liquidity from a position and close it.
|
|
8496
|
+
* This combines several operations in a single transaction:
|
|
8497
|
+
* 1. Claims any accumulated fees
|
|
8498
|
+
* 2. Removes all liquidity
|
|
8499
|
+
* 3. Closes the position
|
|
8500
|
+
*
|
|
8501
|
+
* @param {RemoveAllLiquidityAndClosePositionParams} params - Combined parameters
|
|
8502
|
+
* @returns {TxBuilder} Transaction builder with all required instructions
|
|
8503
|
+
* @throws {Error} If the position is locked or cannot be closed
|
|
8504
|
+
*/
|
|
8505
|
+
removeAllLiquidityAndClosePosition(params) {
|
|
8506
|
+
return __async(this, null, function* () {
|
|
8507
|
+
const {
|
|
8508
|
+
owner,
|
|
8509
|
+
position,
|
|
8510
|
+
positionNftAccount,
|
|
8511
|
+
positionState,
|
|
8512
|
+
poolState,
|
|
8513
|
+
tokenAAmountThreshold,
|
|
8514
|
+
tokenBAmountThreshold
|
|
8515
|
+
} = params;
|
|
8516
|
+
const { nftMint: positionNftMint, pool } = positionState;
|
|
8517
|
+
const { tokenAMint, tokenBMint, tokenAVault, tokenBVault } = poolState;
|
|
8518
|
+
const isLockedPosition = this.isLockedPosition(positionState);
|
|
8519
|
+
if (isLockedPosition) {
|
|
8520
|
+
throw Error("position must be unlocked");
|
|
8521
|
+
}
|
|
8522
|
+
const tokenAProgram = getTokenProgram(poolState.tokenAFlag);
|
|
8523
|
+
const tokenBProgram = getTokenProgram(poolState.tokenBFlag);
|
|
8524
|
+
const {
|
|
8525
|
+
tokenAAta: tokenAAccount,
|
|
8526
|
+
tokenBAta: tokenBAccount,
|
|
8527
|
+
instructions: preInstructions
|
|
8528
|
+
} = yield this.prepareTokenAccounts(
|
|
8529
|
+
owner,
|
|
8530
|
+
tokenAMint,
|
|
8531
|
+
tokenBMint,
|
|
8532
|
+
tokenAProgram,
|
|
8533
|
+
tokenBProgram
|
|
8534
|
+
);
|
|
8535
|
+
const postInstructions = [];
|
|
8536
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
8537
|
+
NATIVE_MINT2.toBase58()
|
|
8538
|
+
)) {
|
|
8539
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
8540
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
8541
|
+
}
|
|
8542
|
+
const transaction = new Transaction();
|
|
8543
|
+
if (preInstructions.length > 0) {
|
|
8544
|
+
transaction.add(...preInstructions);
|
|
8545
|
+
}
|
|
8546
|
+
const claimPositionFeeInstruction = yield this.buildClaimPositionFeeInstruction({
|
|
8547
|
+
owner,
|
|
8548
|
+
poolAuthority: this.poolAuthority,
|
|
8549
|
+
pool,
|
|
8550
|
+
position,
|
|
8551
|
+
positionNftAccount,
|
|
8552
|
+
tokenAAccount,
|
|
8553
|
+
tokenBAccount,
|
|
8554
|
+
tokenAVault,
|
|
8555
|
+
tokenBVault,
|
|
8556
|
+
tokenAMint,
|
|
8557
|
+
tokenBMint,
|
|
8558
|
+
tokenAProgram,
|
|
8559
|
+
tokenBProgram
|
|
8560
|
+
});
|
|
8561
|
+
transaction.add(claimPositionFeeInstruction);
|
|
8562
|
+
const removeAllLiquidityInstruction = yield this.buildRemoveAllLiquidityInstruction({
|
|
8563
|
+
poolAuthority: this.poolAuthority,
|
|
7603
8564
|
owner,
|
|
7604
8565
|
pool,
|
|
7605
8566
|
position,
|
|
7606
8567
|
positionNftAccount,
|
|
7607
8568
|
tokenAAccount,
|
|
7608
8569
|
tokenBAccount,
|
|
8570
|
+
tokenAAmountThreshold,
|
|
8571
|
+
tokenBAmountThreshold,
|
|
8572
|
+
tokenAMint,
|
|
8573
|
+
tokenBMint,
|
|
8574
|
+
tokenAVault,
|
|
8575
|
+
tokenBVault,
|
|
8576
|
+
tokenAProgram,
|
|
8577
|
+
tokenBProgram
|
|
8578
|
+
});
|
|
8579
|
+
transaction.add(removeAllLiquidityInstruction);
|
|
8580
|
+
const closePositionInstruction = yield this.buildClosePositionInstruction({
|
|
8581
|
+
owner,
|
|
8582
|
+
poolAuthority: this.poolAuthority,
|
|
8583
|
+
pool,
|
|
8584
|
+
position,
|
|
8585
|
+
positionNftMint,
|
|
8586
|
+
positionNftAccount
|
|
8587
|
+
});
|
|
8588
|
+
transaction.add(closePositionInstruction);
|
|
8589
|
+
if (postInstructions.length > 0) {
|
|
8590
|
+
transaction.add(...postInstructions);
|
|
8591
|
+
}
|
|
8592
|
+
return transaction;
|
|
8593
|
+
});
|
|
8594
|
+
}
|
|
8595
|
+
/**
|
|
8596
|
+
* Builds a transaction to merge liquidity from one position into another.
|
|
8597
|
+
* This process:
|
|
8598
|
+
* 1. Claims fees from the source position
|
|
8599
|
+
* 2. Removes all liquidity from the source position
|
|
8600
|
+
* 3. Adds that liquidity to the target position
|
|
8601
|
+
* 4. Closes the source position
|
|
8602
|
+
*
|
|
8603
|
+
* @param {MergePositionParams} params - Parameters for merging positions
|
|
8604
|
+
* @returns {TxBuilder} Transaction builder with all required instructions
|
|
8605
|
+
* @throws {Error} If either position is locked or incompatible
|
|
8606
|
+
*/
|
|
8607
|
+
mergePosition(params) {
|
|
8608
|
+
return __async(this, null, function* () {
|
|
8609
|
+
const {
|
|
8610
|
+
owner,
|
|
8611
|
+
positionA,
|
|
8612
|
+
positionB,
|
|
8613
|
+
positionBState,
|
|
8614
|
+
poolState,
|
|
8615
|
+
positionBNftAccount,
|
|
8616
|
+
positionANftAccount,
|
|
8617
|
+
tokenAAmountAddLiquidityThreshold,
|
|
8618
|
+
tokenBAmountAddLiquidityThreshold,
|
|
8619
|
+
tokenAAmountRemoveLiquidityThreshold,
|
|
8620
|
+
tokenBAmountRemoveLiquidityThreshold
|
|
8621
|
+
} = params;
|
|
8622
|
+
const isLockedPosition = this.isLockedPosition(positionBState);
|
|
8623
|
+
if (isLockedPosition) {
|
|
8624
|
+
throw Error("position must be unlocked");
|
|
8625
|
+
}
|
|
8626
|
+
const postionBLiquidityDelta = positionBState.unlockedLiquidity;
|
|
8627
|
+
const pool = positionBState.pool;
|
|
8628
|
+
const { tokenAMint, tokenBMint, tokenAVault, tokenBVault } = poolState;
|
|
8629
|
+
const tokenAProgram = getTokenProgram(poolState.tokenAFlag);
|
|
8630
|
+
const tokenBProgram = getTokenProgram(poolState.tokenBFlag);
|
|
8631
|
+
const {
|
|
8632
|
+
tokenAAta: tokenAAccount,
|
|
8633
|
+
tokenBAta: tokenBAccount,
|
|
8634
|
+
instructions: preInstructions
|
|
8635
|
+
} = yield this.prepareTokenAccounts(
|
|
8636
|
+
owner,
|
|
8637
|
+
tokenAMint,
|
|
8638
|
+
tokenBMint,
|
|
8639
|
+
tokenAProgram,
|
|
8640
|
+
tokenBProgram
|
|
8641
|
+
);
|
|
8642
|
+
const postInstructions = [];
|
|
8643
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
8644
|
+
NATIVE_MINT2.toBase58()
|
|
8645
|
+
)) {
|
|
8646
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
8647
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
8648
|
+
}
|
|
8649
|
+
const transaction = new Transaction();
|
|
8650
|
+
if (preInstructions.length > 0) {
|
|
8651
|
+
transaction.add(...preInstructions);
|
|
8652
|
+
}
|
|
8653
|
+
const claimPositionFeeInstruction = yield this.buildClaimPositionFeeInstruction({
|
|
8654
|
+
owner,
|
|
8655
|
+
poolAuthority: this.poolAuthority,
|
|
8656
|
+
pool,
|
|
8657
|
+
position: positionB,
|
|
8658
|
+
positionNftAccount: positionBNftAccount,
|
|
8659
|
+
tokenAAccount,
|
|
8660
|
+
tokenBAccount,
|
|
8661
|
+
tokenAVault,
|
|
8662
|
+
tokenBVault,
|
|
8663
|
+
tokenAMint,
|
|
8664
|
+
tokenBMint,
|
|
8665
|
+
tokenAProgram,
|
|
8666
|
+
tokenBProgram
|
|
8667
|
+
});
|
|
8668
|
+
transaction.add(claimPositionFeeInstruction);
|
|
8669
|
+
const removeAllLiquidityInstruction = yield this.buildRemoveAllLiquidityInstruction({
|
|
8670
|
+
poolAuthority: this.poolAuthority,
|
|
8671
|
+
owner,
|
|
8672
|
+
pool,
|
|
8673
|
+
position: positionB,
|
|
8674
|
+
positionNftAccount: positionBNftAccount,
|
|
8675
|
+
tokenAAccount,
|
|
8676
|
+
tokenBAccount,
|
|
8677
|
+
tokenAAmountThreshold: tokenAAmountRemoveLiquidityThreshold,
|
|
8678
|
+
tokenBAmountThreshold: tokenBAmountRemoveLiquidityThreshold,
|
|
8679
|
+
tokenAMint,
|
|
8680
|
+
tokenBMint,
|
|
7609
8681
|
tokenAVault,
|
|
7610
8682
|
tokenBVault,
|
|
8683
|
+
tokenAProgram,
|
|
8684
|
+
tokenBProgram
|
|
8685
|
+
});
|
|
8686
|
+
transaction.add(removeAllLiquidityInstruction);
|
|
8687
|
+
const addLiquidityInstruction = yield this.buildAddLiquidityInstruction({
|
|
8688
|
+
pool,
|
|
8689
|
+
position: positionA,
|
|
8690
|
+
positionNftAccount: positionANftAccount,
|
|
8691
|
+
owner,
|
|
8692
|
+
tokenAAccount,
|
|
8693
|
+
tokenBAccount,
|
|
7611
8694
|
tokenAMint,
|
|
7612
8695
|
tokenBMint,
|
|
8696
|
+
tokenAVault,
|
|
8697
|
+
tokenBVault,
|
|
7613
8698
|
tokenAProgram,
|
|
7614
8699
|
tokenBProgram,
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
8700
|
+
liquidityDelta: postionBLiquidityDelta,
|
|
8701
|
+
tokenAAmountThreshold: tokenAAmountAddLiquidityThreshold,
|
|
8702
|
+
tokenBAmountThreshold: tokenBAmountAddLiquidityThreshold
|
|
8703
|
+
});
|
|
8704
|
+
transaction.add(addLiquidityInstruction);
|
|
8705
|
+
const closePositionInstruction = yield this.buildClosePositionInstruction({
|
|
8706
|
+
owner,
|
|
8707
|
+
poolAuthority: this.poolAuthority,
|
|
8708
|
+
pool: positionBState.pool,
|
|
8709
|
+
position: positionB,
|
|
8710
|
+
positionNftMint: positionBState.nftMint,
|
|
8711
|
+
positionNftAccount: positionBNftAccount
|
|
8712
|
+
});
|
|
8713
|
+
transaction.add(closePositionInstruction);
|
|
8714
|
+
if (postInstructions.length > 0) {
|
|
8715
|
+
transaction.add(...postInstructions);
|
|
8716
|
+
}
|
|
8717
|
+
return transaction;
|
|
7618
8718
|
});
|
|
7619
8719
|
}
|
|
8720
|
+
/**
|
|
8721
|
+
* Builds a transaction to update reward duration.
|
|
8722
|
+
* @param {UpdateRewardDurationParams} params - Parameters including pool and new duration.
|
|
8723
|
+
* @returns Transaction builder.
|
|
8724
|
+
*/
|
|
7620
8725
|
updateRewardDuration(params) {
|
|
7621
8726
|
return __async(this, null, function* () {
|
|
7622
8727
|
const { pool, admin, rewardIndex, newDuration } = params;
|
|
7623
|
-
return yield this._program.methods.updateRewardDuration(rewardIndex, newDuration).
|
|
8728
|
+
return yield this._program.methods.updateRewardDuration(rewardIndex, newDuration).accountsPartial({
|
|
7624
8729
|
pool,
|
|
7625
|
-
admin
|
|
7626
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7627
|
-
program: this._program.programId
|
|
8730
|
+
admin
|
|
7628
8731
|
}).transaction();
|
|
7629
8732
|
});
|
|
7630
8733
|
}
|
|
8734
|
+
/**
|
|
8735
|
+
* Builds a transaction to update reward funder address.
|
|
8736
|
+
* @param {UpdateRewardFunderParams} params - Parameters including pool and new funder address.
|
|
8737
|
+
* @returns Transaction builder.
|
|
8738
|
+
*/
|
|
7631
8739
|
updateRewardFunder(params) {
|
|
7632
8740
|
return __async(this, null, function* () {
|
|
7633
8741
|
const { pool, admin, rewardIndex, newFunder } = params;
|
|
7634
|
-
return yield this._program.methods.updateRewardFunder(rewardIndex, newFunder).
|
|
8742
|
+
return yield this._program.methods.updateRewardFunder(rewardIndex, newFunder).accountsPartial({
|
|
7635
8743
|
pool,
|
|
7636
|
-
admin
|
|
7637
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7638
|
-
program: this._program.programId
|
|
8744
|
+
admin
|
|
7639
8745
|
}).transaction();
|
|
7640
8746
|
});
|
|
7641
8747
|
}
|
|
8748
|
+
/**
|
|
8749
|
+
* Builds a transaction to fund rewards in a pool.
|
|
8750
|
+
* @param {FundRewardParams} params - Funding parameters.
|
|
8751
|
+
* @returns Transaction builder.
|
|
8752
|
+
*/
|
|
7642
8753
|
fundReward(params) {
|
|
7643
8754
|
return __async(this, null, function* () {
|
|
7644
8755
|
const { rewardIndex, carryForward, pool, funder, amount } = params;
|
|
@@ -7664,22 +8775,24 @@ var CpAmm = class {
|
|
|
7664
8775
|
);
|
|
7665
8776
|
preInstructions.push(...wrapSOLIx);
|
|
7666
8777
|
}
|
|
7667
|
-
return yield this._program.methods.fundReward(rewardIndex, amount, carryForward).
|
|
8778
|
+
return yield this._program.methods.fundReward(rewardIndex, amount, carryForward).accountsPartial({
|
|
7668
8779
|
pool,
|
|
7669
8780
|
rewardVault: vault,
|
|
7670
8781
|
rewardMint: mint,
|
|
7671
8782
|
funderTokenAccount,
|
|
7672
8783
|
funder,
|
|
7673
|
-
tokenProgram
|
|
7674
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7675
|
-
program: this._program.programId
|
|
8784
|
+
tokenProgram
|
|
7676
8785
|
}).transaction();
|
|
7677
8786
|
});
|
|
7678
8787
|
}
|
|
8788
|
+
/**
|
|
8789
|
+
* Builds a transaction to withdraw ineligible rewards from a pool.
|
|
8790
|
+
* @param {WithdrawIneligibleRewardParams} params - Parameters for withdrawal.
|
|
8791
|
+
* @returns Transaction builder.
|
|
8792
|
+
*/
|
|
7679
8793
|
withdrawIneligibleReward(params) {
|
|
7680
8794
|
return __async(this, null, function* () {
|
|
7681
8795
|
const { rewardIndex, pool, funder } = params;
|
|
7682
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7683
8796
|
const poolState = yield this.fetchPoolState(pool);
|
|
7684
8797
|
const rewardInfo = poolState.rewardInfos[rewardIndex];
|
|
7685
8798
|
const { mint, vault, rewardTokenFlag } = rewardInfo;
|
|
@@ -7699,19 +8812,22 @@ var CpAmm = class {
|
|
|
7699
8812
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(funder);
|
|
7700
8813
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7701
8814
|
}
|
|
7702
|
-
return yield this._program.methods.withdrawIneligibleReward(rewardIndex).
|
|
8815
|
+
return yield this._program.methods.withdrawIneligibleReward(rewardIndex).accountsPartial({
|
|
7703
8816
|
pool,
|
|
7704
8817
|
rewardVault: vault,
|
|
7705
8818
|
rewardMint: mint,
|
|
7706
|
-
poolAuthority,
|
|
8819
|
+
poolAuthority: this.poolAuthority,
|
|
7707
8820
|
funderTokenAccount,
|
|
7708
8821
|
funder,
|
|
7709
|
-
tokenProgram
|
|
7710
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7711
|
-
program: this._program.programId
|
|
8822
|
+
tokenProgram
|
|
7712
8823
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7713
8824
|
});
|
|
7714
8825
|
}
|
|
8826
|
+
/**
|
|
8827
|
+
* Builds a transaction to claim partner fee rewards.
|
|
8828
|
+
* @param {ClaimPartnerFeeParams} params - Claim parameters including amounts and partner address.
|
|
8829
|
+
* @returns Transaction builder.
|
|
8830
|
+
*/
|
|
7715
8831
|
claimPartnerFee(params) {
|
|
7716
8832
|
return __async(this, null, function* () {
|
|
7717
8833
|
const { partner, pool, maxAmountA, maxAmountB } = params;
|
|
@@ -7724,33 +8840,19 @@ var CpAmm = class {
|
|
|
7724
8840
|
tokenAFlag,
|
|
7725
8841
|
tokenBFlag
|
|
7726
8842
|
} = poolState;
|
|
7727
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7728
8843
|
const tokenAProgram = getTokenProgram(tokenAFlag);
|
|
7729
8844
|
const tokenBProgram = getTokenProgram(tokenBFlag);
|
|
7730
|
-
const
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
tokenAProgram
|
|
7742
|
-
),
|
|
7743
|
-
getOrCreateATAInstruction(
|
|
7744
|
-
this._program.provider.connection,
|
|
7745
|
-
poolState.tokenBMint,
|
|
7746
|
-
partner,
|
|
7747
|
-
partner,
|
|
7748
|
-
true,
|
|
7749
|
-
tokenBProgram
|
|
7750
|
-
)
|
|
7751
|
-
]);
|
|
7752
|
-
createTokenAAccountIx && preInstructions.push(createTokenAAccountIx);
|
|
7753
|
-
createTokenBAccountIx && preInstructions.push(createTokenBAccountIx);
|
|
8845
|
+
const {
|
|
8846
|
+
tokenAAta: tokenAAccount,
|
|
8847
|
+
tokenBAta: tokenBAccount,
|
|
8848
|
+
instructions: preInstructions
|
|
8849
|
+
} = yield this.prepareTokenAccounts(
|
|
8850
|
+
partner,
|
|
8851
|
+
tokenAMint,
|
|
8852
|
+
tokenBMint,
|
|
8853
|
+
tokenAProgram,
|
|
8854
|
+
tokenBProgram
|
|
8855
|
+
);
|
|
7754
8856
|
const postInstructions = [];
|
|
7755
8857
|
if ([
|
|
7756
8858
|
poolState.tokenAMint.toBase58(),
|
|
@@ -7759,8 +8861,8 @@ var CpAmm = class {
|
|
|
7759
8861
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(partner);
|
|
7760
8862
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7761
8863
|
}
|
|
7762
|
-
return yield this._program.methods.claimPartnerFee(maxAmountA, maxAmountB).
|
|
7763
|
-
poolAuthority,
|
|
8864
|
+
return yield this._program.methods.claimPartnerFee(maxAmountA, maxAmountB).accountsPartial({
|
|
8865
|
+
poolAuthority: this.poolAuthority,
|
|
7764
8866
|
pool,
|
|
7765
8867
|
tokenAAccount,
|
|
7766
8868
|
tokenBAccount,
|
|
@@ -7770,22 +8872,25 @@ var CpAmm = class {
|
|
|
7770
8872
|
tokenBMint,
|
|
7771
8873
|
partner,
|
|
7772
8874
|
tokenAProgram,
|
|
7773
|
-
tokenBProgram
|
|
7774
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7775
|
-
program: this._program.programId
|
|
8875
|
+
tokenBProgram
|
|
7776
8876
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7777
8877
|
});
|
|
7778
8878
|
}
|
|
8879
|
+
/**
|
|
8880
|
+
* Builds a transaction to claim reward from a position.
|
|
8881
|
+
* @param {ClaimRewardParams} params - Parameters for claiming reward.
|
|
8882
|
+
* @returns Transaction builder.
|
|
8883
|
+
*/
|
|
7779
8884
|
claimReward(params) {
|
|
7780
8885
|
return __async(this, null, function* () {
|
|
7781
|
-
const {
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
8886
|
+
const {
|
|
8887
|
+
user,
|
|
8888
|
+
position,
|
|
8889
|
+
positionNftAccount,
|
|
8890
|
+
rewardIndex,
|
|
8891
|
+
poolState,
|
|
8892
|
+
positionState
|
|
8893
|
+
} = params;
|
|
7789
8894
|
const rewardInfo = poolState.rewardInfos[rewardIndex];
|
|
7790
8895
|
const tokenProgram = getTokenProgram(rewardInfo.rewardTokenFlag);
|
|
7791
8896
|
const preInstructions = [];
|
|
@@ -7803,18 +8908,16 @@ var CpAmm = class {
|
|
|
7803
8908
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(user);
|
|
7804
8909
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7805
8910
|
}
|
|
7806
|
-
return yield this._program.methods.claimReward(rewardIndex).
|
|
8911
|
+
return yield this._program.methods.claimReward(rewardIndex).accountsPartial({
|
|
7807
8912
|
pool: positionState.pool,
|
|
7808
8913
|
positionNftAccount,
|
|
7809
8914
|
rewardVault: rewardInfo.vault,
|
|
7810
8915
|
rewardMint: rewardInfo.mint,
|
|
7811
|
-
poolAuthority,
|
|
8916
|
+
poolAuthority: this.poolAuthority,
|
|
7812
8917
|
position,
|
|
7813
8918
|
userTokenAccount,
|
|
7814
8919
|
owner: user,
|
|
7815
|
-
tokenProgram
|
|
7816
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7817
|
-
program: this._program.programId
|
|
8920
|
+
tokenProgram
|
|
7818
8921
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7819
8922
|
});
|
|
7820
8923
|
}
|
|
@@ -7831,27 +8934,37 @@ export {
|
|
|
7831
8934
|
CpAmm,
|
|
7832
8935
|
FEE_DENOMINATOR,
|
|
7833
8936
|
FeeSchedulerMode,
|
|
8937
|
+
LIQUIDITY_SCALE,
|
|
7834
8938
|
MAX_CU_BUFFER,
|
|
7835
8939
|
MAX_FEE_NUMERATOR,
|
|
7836
8940
|
MAX_SQRT_PRICE,
|
|
7837
8941
|
MIN_CU_BUFFER,
|
|
7838
8942
|
MIN_SQRT_PRICE,
|
|
8943
|
+
ONE,
|
|
8944
|
+
PRECISION,
|
|
7839
8945
|
Rounding,
|
|
7840
8946
|
SCALE_OFFSET,
|
|
7841
8947
|
TradeDirection,
|
|
7842
|
-
|
|
8948
|
+
calculateInitSqrtPrice,
|
|
8949
|
+
calculateTransferFeeExcludedAmount,
|
|
8950
|
+
calculateTransferFeeIncludedAmount,
|
|
8951
|
+
decimalToQ64,
|
|
7843
8952
|
index_default as default,
|
|
7844
8953
|
deriveClaimFeeOperatorAddress,
|
|
7845
8954
|
deriveConfigAddress,
|
|
7846
8955
|
deriveCustomizablePoolAddress,
|
|
7847
|
-
deriveEventAuthority,
|
|
7848
8956
|
derivePoolAddress,
|
|
7849
8957
|
derivePoolAuthority,
|
|
7850
8958
|
derivePositionAddress,
|
|
7851
8959
|
derivePositionNftAccount,
|
|
7852
8960
|
deriveRewardVaultAddress,
|
|
8961
|
+
deriveTokenBadge,
|
|
7853
8962
|
deriveTokenBadgeAddress,
|
|
7854
8963
|
deriveTokenVaultAddress,
|
|
8964
|
+
divCeil,
|
|
8965
|
+
getAllUserPositionNftAccount,
|
|
8966
|
+
getAmountAFromLiquidityDelta,
|
|
8967
|
+
getAmountBFromLiquidityDelta,
|
|
7855
8968
|
getBaseFeeNumerator,
|
|
7856
8969
|
getDeltaAmountA,
|
|
7857
8970
|
getDeltaAmountB,
|
|
@@ -7862,13 +8975,28 @@ export {
|
|
|
7862
8975
|
getFirstKey,
|
|
7863
8976
|
getLiquidityDeltaFromAmountA,
|
|
7864
8977
|
getLiquidityDeltaFromAmountB,
|
|
8978
|
+
getMaxAmountWithSlippage,
|
|
8979
|
+
getMinAmountWithSlippage,
|
|
7865
8980
|
getNextSqrtPrice,
|
|
8981
|
+
getNftOwner,
|
|
7866
8982
|
getOrCreateATAInstruction,
|
|
8983
|
+
getPriceFromSqrtPrice,
|
|
8984
|
+
getPriceImpact,
|
|
7867
8985
|
getSecondKey,
|
|
7868
8986
|
getSimulationComputeUnits,
|
|
8987
|
+
getSqrtPriceFromPrice,
|
|
8988
|
+
getSwapAmount,
|
|
7869
8989
|
getTokenDecimals,
|
|
7870
8990
|
getTokenProgram,
|
|
8991
|
+
getUnClaimReward,
|
|
8992
|
+
mulDiv,
|
|
8993
|
+
mulShr,
|
|
8994
|
+
positionByPoolFilter,
|
|
8995
|
+
pow,
|
|
8996
|
+
q64ToDecimal,
|
|
8997
|
+
shlDiv,
|
|
7871
8998
|
unwrapSOLInstruction,
|
|
8999
|
+
vestingByPositionFilter,
|
|
7872
9000
|
wrapSOLInstruction
|
|
7873
9001
|
};
|
|
7874
9002
|
//# sourceMappingURL=index.mjs.map
|