@meteora-ag/cp-amm-sdk 1.0.1-rc.9 → 1.0.2-rc.0
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 +4395 -3680
- package/dist/index.d.ts +4395 -3680
- package/dist/index.js +3046 -1035
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3106 -1095
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -4
- package/node_modules/@babel/runtime/LICENSE +0 -22
- package/node_modules/@babel/runtime/README.md +0 -19
- package/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -4
- package/node_modules/@babel/runtime/helpers/OverloadYield.js +0 -4
- package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -9
- package/node_modules/@babel/runtime/helpers/applyDecs.js +0 -236
- package/node_modules/@babel/runtime/helpers/applyDecs2203.js +0 -184
- package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +0 -191
- package/node_modules/@babel/runtime/helpers/applyDecs2301.js +0 -222
- package/node_modules/@babel/runtime/helpers/applyDecs2305.js +0 -133
- package/node_modules/@babel/runtime/helpers/applyDecs2311.js +0 -124
- package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -6
- package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -4
- package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -5
- package/node_modules/@babel/runtime/helpers/assertClassBrand.js +0 -5
- package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -5
- package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -24
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -45
- package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -26
- package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -5
- package/node_modules/@babel/runtime/helpers/callSuper.js +0 -7
- package/node_modules/@babel/runtime/helpers/checkInRHS.js +0 -6
- package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -4
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -10
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -4
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -4
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -5
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -5
- package/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -4
- package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +0 -5
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/construct.js +0 -10
- package/node_modules/@babel/runtime/helpers/createClass.js +0 -13
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -50
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -19
- package/node_modules/@babel/runtime/helpers/createSuper.js +0 -16
- package/node_modules/@babel/runtime/helpers/decorate.js +0 -250
- package/node_modules/@babel/runtime/helpers/defaults.js +0 -9
- package/node_modules/@babel/runtime/helpers/defineAccessor.js +0 -8
- package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -12
- package/node_modules/@babel/runtime/helpers/defineProperty.js +0 -10
- package/node_modules/@babel/runtime/helpers/dispose.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +0 -236
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +0 -184
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +0 -191
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +0 -222
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +0 -133
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +0 -124
- package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -24
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -45
- package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -26
- package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/callSuper.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/construct.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -13
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -50
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
- package/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -16
- package/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -250
- package/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -12
- package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/dispose.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/extends.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/get.js +0 -11
- package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/identity.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +0 -27
- package/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -14
- package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -27
- package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -22
- package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -14
- package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -23
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -13
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
- package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +0 -304
- package/node_modules/@babel/runtime/helpers/esm/set.js +0 -22
- package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +0 -12
- package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -2
- package/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -8
- package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -12
- package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/toSetter.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +0 -6
- package/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
- package/node_modules/@babel/runtime/helpers/esm/using.js +0 -12
- package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +0 -59
- package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -69
- package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -27
- package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -52
- package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -4
- package/node_modules/@babel/runtime/helpers/extends.js +0 -10
- package/node_modules/@babel/runtime/helpers/get.js +0 -11
- package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -6
- package/node_modules/@babel/runtime/helpers/identity.js +0 -4
- package/node_modules/@babel/runtime/helpers/importDeferProxy.js +0 -27
- package/node_modules/@babel/runtime/helpers/inherits.js +0 -14
- package/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -5
- package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -9
- package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -4
- package/node_modules/@babel/runtime/helpers/instanceof.js +0 -4
- package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -6
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -27
- package/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -8
- package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -9
- package/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -4
- package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -28
- package/node_modules/@babel/runtime/helpers/jsx.js +0 -22
- package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -9
- package/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -4
- package/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -4
- package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -4
- package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +0 -4
- package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -4
- package/node_modules/@babel/runtime/helpers/objectSpread.js +0 -14
- package/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -23
- package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -13
- package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -10
- package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -8
- package/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -4
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -304
- package/node_modules/@babel/runtime/helpers/set.js +0 -22
- package/node_modules/@babel/runtime/helpers/setFunctionName.js +0 -12
- package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -6
- package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -7
- package/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -8
- package/node_modules/@babel/runtime/helpers/superPropBase.js +0 -6
- package/node_modules/@babel/runtime/helpers/superPropGet.js +0 -9
- package/node_modules/@babel/runtime/helpers/superPropSet.js +0 -6
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -8
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -4
- package/node_modules/@babel/runtime/helpers/tdz.js +0 -4
- package/node_modules/@babel/runtime/helpers/temporalRef.js +0 -6
- package/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -2
- package/node_modules/@babel/runtime/helpers/toArray.js +0 -8
- package/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -8
- package/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -12
- package/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -7
- package/node_modules/@babel/runtime/helpers/toSetter.js +0 -10
- package/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +0 -6
- package/node_modules/@babel/runtime/helpers/typeof.js +0 -10
- package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -9
- package/node_modules/@babel/runtime/helpers/using.js +0 -12
- package/node_modules/@babel/runtime/helpers/usingCtx.js +0 -59
- package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -69
- package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -27
- package/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -52
- package/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -4
- package/node_modules/@babel/runtime/package.json +0 -1065
- package/node_modules/@babel/runtime/regenerator/index.js +0 -15
- package/node_modules/@coral-xyz/anchor/README.md +0 -10
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js +0 -7202
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/accounts.d.ts +0 -27
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/accounts.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/event.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/event.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/idl.d.ts +0 -32
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/idl.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/index.d.ts +0 -33
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/instruction.d.ts +0 -42
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/types.d.ts +0 -16
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/index.d.ts +0 -43
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/accounts.d.ts +0 -12
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/accounts.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/events.d.ts +0 -9
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/events.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/index.d.ts +0 -17
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/instruction.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/types.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/system/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/error.d.ts +0 -131
- package/node_modules/@coral-xyz/anchor/dist/browser/src/error.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/idl.d.ts +0 -215
- package/node_modules/@coral-xyz/anchor/dist/browser/src/idl.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/index.d.ts +0 -16
- package/node_modules/@coral-xyz/anchor/dist/browser/src/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/index.d.ts +0 -7
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/system.d.ts +0 -390
- package/node_modules/@coral-xyz/anchor/dist/browser/src/native/system.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/nodewallet.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/browser/src/nodewallet.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/accounts-resolver.d.ts +0 -63
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/accounts-resolver.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/common.d.ts +0 -20
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/common.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/context.d.ts +0 -63
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/context.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/event.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/event.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/index.d.ts +0 -272
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/account.d.ts +0 -146
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/account.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/index.d.ts +0 -35
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/instruction.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/methods.d.ts +0 -206
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/methods.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/rpc.d.ts +0 -49
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/rpc.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/simulate.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/simulate.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/transaction.d.ts +0 -42
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/transaction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/types.d.ts +0 -153
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/views.d.ts +0 -15
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/namespace/views.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/token-account-layout.d.ts +0 -2
- package/node_modules/@coral-xyz/anchor/dist/browser/src/program/token-account-layout.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/provider.d.ts +0 -104
- package/node_modules/@coral-xyz/anchor/dist/browser/src/provider.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/base64.d.ts +0 -4
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/base64.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/bs58.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/bs58.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/hex.d.ts +0 -4
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/hex.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/index.d.ts +0 -5
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/utf8.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/bytes/utf8.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/common.d.ts +0 -22
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/common.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/features.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/features.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/index.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/pubkey.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/pubkey.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/registry.d.ts +0 -34
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/registry.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/rpc.d.ts +0 -21
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/rpc.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/sha256.d.ts +0 -2
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/sha256.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/token.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/browser/src/utils/token.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/workspace.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/browser/src/workspace.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.d.ts +0 -27
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.js +0 -103
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/accounts.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.js +0 -78
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/event.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.d.ts +0 -32
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js +0 -420
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.d.ts +0 -33
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.js +0 -27
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.d.ts +0 -42
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.js +0 -274
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/instruction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.d.ts +0 -16
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.js +0 -42
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/types.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.d.ts +0 -43
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.js +0 -19
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.d.ts +0 -12
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.js +0 -107
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/accounts.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.d.ts +0 -9
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.js +0 -11
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/events.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.d.ts +0 -17
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.js +0 -20
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.js +0 -242
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/instruction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.js +0 -14
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/system/types.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.d.ts +0 -131
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.js +0 -583
- package/node_modules/@coral-xyz/anchor/dist/cjs/error.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.d.ts +0 -215
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.js +0 -109
- package/node_modules/@coral-xyz/anchor/dist/cjs/idl.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.d.ts +0 -16
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.js +0 -50
- package/node_modules/@coral-xyz/anchor/dist/cjs/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.d.ts +0 -7
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.js +0 -11
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.d.ts +0 -390
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.js +0 -394
- package/node_modules/@coral-xyz/anchor/dist/cjs/native/system.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.js +0 -48
- package/node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.d.ts +0 -63
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js +0 -437
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.d.ts +0 -20
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.js +0 -49
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/common.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.d.ts +0 -63
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.js +0 -16
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/context.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.js +0 -207
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/event.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.d.ts +0 -272
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.js +0 -177
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.d.ts +0 -146
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.js +0 -257
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.d.ts +0 -35
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.js +0 -63
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.js +0 -94
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/instruction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.d.ts +0 -206
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.js +0 -309
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.d.ts +0 -49
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.js +0 -25
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/rpc.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.js +0 -42
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/simulate.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.d.ts +0 -42
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.js +0 -24
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/transaction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.d.ts +0 -153
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.js +0 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/types.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.d.ts +0 -15
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.js +0 -30
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/views.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.d.ts +0 -2
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.js +0 -136
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/token-account-layout.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.d.ts +0 -104
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.js +0 -309
- package/node_modules/@coral-xyz/anchor/dist/cjs/provider.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.d.ts +0 -4
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.js +0 -12
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/base64.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.js +0 -15
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/bs58.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.d.ts +0 -4
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.js +0 -22
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/hex.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.d.ts +0 -5
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.js +0 -31
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.js +0 -18
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/bytes/utf8.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.d.ts +0 -22
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.js +0 -32
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/common.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.js +0 -16
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/features.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.js +0 -34
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.js +0 -16
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/pubkey.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.d.ts +0 -34
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.js +0 -88
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/registry.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.d.ts +0 -21
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.js +0 -167
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/rpc.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.d.ts +0 -2
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.js +0 -8
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/sha256.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.js +0 -11
- package/node_modules/@coral-xyz/anchor/dist/cjs/utils/token.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.js +0 -98
- package/node_modules/@coral-xyz/anchor/dist/cjs/workspace.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.d.ts +0 -27
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.js +0 -96
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/accounts.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.js +0 -51
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/event.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.d.ts +0 -32
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js +0 -393
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.d.ts +0 -33
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.js +0 -20
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.d.ts +0 -42
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.js +0 -244
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/instruction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.d.ts +0 -16
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.js +0 -38
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/types.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.d.ts +0 -43
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.js +0 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.d.ts +0 -12
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.js +0 -80
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/accounts.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.d.ts +0 -9
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.js +0 -7
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/events.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.d.ts +0 -17
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.js +0 -16
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.js +0 -212
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/instruction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.js +0 -10
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/system/types.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/error.d.ts +0 -131
- package/node_modules/@coral-xyz/anchor/dist/esm/error.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/error.js +0 -552
- package/node_modules/@coral-xyz/anchor/dist/esm/error.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.d.ts +0 -215
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.js +0 -74
- package/node_modules/@coral-xyz/anchor/dist/esm/idl.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/index.d.ts +0 -16
- package/node_modules/@coral-xyz/anchor/dist/esm/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/index.js +0 -14
- package/node_modules/@coral-xyz/anchor/dist/esm/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.d.ts +0 -7
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.js +0 -7
- package/node_modules/@coral-xyz/anchor/dist/esm/native/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.d.ts +0 -390
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.js +0 -389
- package/node_modules/@coral-xyz/anchor/dist/esm/native/system.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.js +0 -45
- package/node_modules/@coral-xyz/anchor/dist/esm/nodewallet.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.d.ts +0 -63
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js +0 -429
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.d.ts +0 -20
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.js +0 -43
- package/node_modules/@coral-xyz/anchor/dist/esm/program/common.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.d.ts +0 -63
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.js +0 -13
- package/node_modules/@coral-xyz/anchor/dist/esm/program/context.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.js +0 -202
- package/node_modules/@coral-xyz/anchor/dist/esm/program/event.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.d.ts +0 -272
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.js +0 -156
- package/node_modules/@coral-xyz/anchor/dist/esm/program/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.d.ts +0 -146
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.js +0 -226
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/account.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.d.ts +0 -35
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.js +0 -54
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.js +0 -68
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/instruction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.d.ts +0 -206
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.js +0 -302
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/methods.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.d.ts +0 -49
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.js +0 -22
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/rpc.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.d.ts +0 -57
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.js +0 -39
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/simulate.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.d.ts +0 -42
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.js +0 -21
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/transaction.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.d.ts +0 -153
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.js +0 -2
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/types.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.d.ts +0 -15
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.js +0 -27
- package/node_modules/@coral-xyz/anchor/dist/esm/program/namespace/views.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.d.ts +0 -2
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.js +0 -107
- package/node_modules/@coral-xyz/anchor/dist/esm/program/token-account-layout.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.d.ts +0 -104
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.js +0 -303
- package/node_modules/@coral-xyz/anchor/dist/esm/provider.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.d.ts +0 -4
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.js +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/base64.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.js +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/bs58.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.d.ts +0 -4
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.js +0 -18
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/hex.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.d.ts +0 -5
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.js +0 -5
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.js +0 -14
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/bytes/utf8.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.d.ts +0 -22
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.js +0 -27
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/common.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.js +0 -12
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/features.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.js +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.d.ts +0 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.js +0 -13
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/pubkey.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.d.ts +0 -34
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.js +0 -57
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/registry.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.d.ts +0 -21
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.js +0 -161
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/rpc.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.d.ts +0 -2
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.js +0 -5
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/sha256.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.d.ts +0 -8
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.js +0 -7
- package/node_modules/@coral-xyz/anchor/dist/esm/utils/token.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.d.ts +0 -14
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.js +0 -70
- package/node_modules/@coral-xyz/anchor/dist/esm/workspace.js.map +0 -1
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.cjs.tsbuildinfo +0 -1
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.tsbuildinfo +0 -1
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/index.d.ts +0 -103
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/index.js +0 -113
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/license +0 -9
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/package.json +0 -44
- package/node_modules/@coral-xyz/anchor/node_modules/camelcase/readme.md +0 -144
- package/node_modules/@coral-xyz/anchor/package.json +0 -84
- package/node_modules/@coral-xyz/anchor/types/buffer-layout/index.d.ts +0 -88
- package/node_modules/@coral-xyz/anchor-errors/dist/index.d.ts +0 -157
- package/node_modules/@coral-xyz/anchor-errors/dist/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/anchor-errors/dist/index.js +0 -167
- package/node_modules/@coral-xyz/anchor-errors/dist/index.js.map +0 -1
- package/node_modules/@coral-xyz/anchor-errors/package.json +0 -32
- package/node_modules/@coral-xyz/borsh/dist/index.d.ts +0 -31
- package/node_modules/@coral-xyz/borsh/dist/index.d.ts.map +0 -1
- package/node_modules/@coral-xyz/borsh/dist/index.js +0 -222
- package/node_modules/@coral-xyz/borsh/dist/index.js.map +0 -1
- package/node_modules/@coral-xyz/borsh/package.json +0 -35
- package/node_modules/@noble/hashes/LICENSE +0 -21
- package/node_modules/@noble/hashes/README.md +0 -572
- package/node_modules/@noble/hashes/_assert.d.ts +0 -23
- package/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_assert.js +0 -50
- package/node_modules/@noble/hashes/_assert.js.map +0 -1
- package/node_modules/@noble/hashes/_blake.d.ts +0 -34
- package/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_blake.js +0 -137
- package/node_modules/@noble/hashes/_blake.js.map +0 -1
- package/node_modules/@noble/hashes/_md.d.ts +0 -34
- package/node_modules/@noble/hashes/_md.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_md.js +0 -137
- package/node_modules/@noble/hashes/_md.js.map +0 -1
- package/node_modules/@noble/hashes/_u64.d.ts +0 -55
- package/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_u64.js +0 -89
- package/node_modules/@noble/hashes/_u64.js.map +0 -1
- package/node_modules/@noble/hashes/argon2.d.ts +0 -32
- package/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/argon2.js +0 -396
- package/node_modules/@noble/hashes/argon2.js.map +0 -1
- package/node_modules/@noble/hashes/blake1.d.ts +0 -126
- package/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake1.js +0 -471
- package/node_modules/@noble/hashes/blake1.js.map +0 -1
- package/node_modules/@noble/hashes/blake2b.d.ts +0 -53
- package/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2b.js +0 -197
- package/node_modules/@noble/hashes/blake2b.js.map +0 -1
- package/node_modules/@noble/hashes/blake2s.d.ts +0 -61
- package/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2s.js +0 -132
- package/node_modules/@noble/hashes/blake2s.js.map +0 -1
- package/node_modules/@noble/hashes/blake3.d.ts +0 -54
- package/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake3.js +0 -255
- package/node_modules/@noble/hashes/blake3.js.map +0 -1
- package/node_modules/@noble/hashes/crypto.d.ts +0 -2
- package/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
- package/node_modules/@noble/hashes/crypto.js +0 -5
- package/node_modules/@noble/hashes/crypto.js.map +0 -1
- package/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
- package/node_modules/@noble/hashes/cryptoNode.js +0 -18
- package/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
- package/node_modules/@noble/hashes/eskdf.d.ts +0 -47
- package/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/eskdf.js +0 -168
- package/node_modules/@noble/hashes/eskdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_assert.d.ts +0 -23
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_assert.js +0 -44
- package/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_blake.d.ts +0 -34
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_blake.js +0 -133
- package/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_md.d.ts +0 -34
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_md.js +0 -130
- package/node_modules/@noble/hashes/esm/_md.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_u64.js +0 -66
- package/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
- package/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/argon2.js +0 -387
- package/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake1.d.ts +0 -126
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake1.js +0 -464
- package/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -53
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2b.js +0 -193
- package/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -61
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2s.js +0 -125
- package/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake3.js +0 -262
- package/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
- package/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/crypto.js +0 -2
- package/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/eskdf.js +0 -162
- package/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/hkdf.js +0 -83
- package/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts +0 -30
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/hmac.js +0 -84
- package/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
- package/node_modules/@noble/hashes/esm/index.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/index.js +0 -35
- package/node_modules/@noble/hashes/esm/index.js.map +0 -1
- package/node_modules/@noble/hashes/esm/package.json +0 -10
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -24
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/ripemd160.js +0 -103
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/scrypt.js +0 -233
- package/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha1.d.ts +0 -22
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha1.js +0 -84
- package/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha2.d.ts +0 -7
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha2.js +0 -8
- package/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha256.d.ts +0 -32
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha256.js +0 -130
- package/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -130
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.js +0 -387
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3.d.ts +0 -52
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3.js +0 -227
- package/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha512.d.ts +0 -116
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha512.js +0 -242
- package/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
- package/node_modules/@noble/hashes/esm/utils.d.ts +0 -120
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/utils.js +0 -212
- package/node_modules/@noble/hashes/esm/utils.js.map +0 -1
- package/node_modules/@noble/hashes/hkdf.d.ts +0 -36
- package/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/hkdf.js +0 -89
- package/node_modules/@noble/hashes/hkdf.js.map +0 -1
- package/node_modules/@noble/hashes/hmac.d.ts +0 -30
- package/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
- package/node_modules/@noble/hashes/hmac.js +0 -89
- package/node_modules/@noble/hashes/hmac.js.map +0 -1
- package/node_modules/@noble/hashes/index.d.ts +0 -1
- package/node_modules/@noble/hashes/index.d.ts.map +0 -1
- package/node_modules/@noble/hashes/index.js +0 -35
- package/node_modules/@noble/hashes/index.js.map +0 -1
- package/node_modules/@noble/hashes/package.json +0 -168
- package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/pbkdf2.js +0 -101
- package/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
- package/node_modules/@noble/hashes/ripemd160.d.ts +0 -24
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
- package/node_modules/@noble/hashes/ripemd160.js +0 -107
- package/node_modules/@noble/hashes/ripemd160.js.map +0 -1
- package/node_modules/@noble/hashes/scrypt.d.ts +0 -34
- package/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
- package/node_modules/@noble/hashes/scrypt.js +0 -237
- package/node_modules/@noble/hashes/scrypt.js.map +0 -1
- package/node_modules/@noble/hashes/sha1.d.ts +0 -22
- package/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha1.js +0 -88
- package/node_modules/@noble/hashes/sha1.js.map +0 -1
- package/node_modules/@noble/hashes/sha2.d.ts +0 -7
- package/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha2.js +0 -17
- package/node_modules/@noble/hashes/sha2.js.map +0 -1
- package/node_modules/@noble/hashes/sha256.d.ts +0 -32
- package/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha256.js +0 -134
- package/node_modules/@noble/hashes/sha256.js.map +0 -1
- package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -130
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha3-addons.js +0 -396
- package/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
- package/node_modules/@noble/hashes/sha3.d.ts +0 -52
- package/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha3.js +0 -232
- package/node_modules/@noble/hashes/sha3.js.map +0 -1
- package/node_modules/@noble/hashes/sha512.d.ts +0 -116
- package/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha512.js +0 -249
- package/node_modules/@noble/hashes/sha512.js.map +0 -1
- package/node_modules/@noble/hashes/src/_assert.ts +0 -54
- package/node_modules/@noble/hashes/src/_blake.ts +0 -147
- package/node_modules/@noble/hashes/src/_md.ts +0 -141
- package/node_modules/@noble/hashes/src/_u64.ts +0 -95
- package/node_modules/@noble/hashes/src/argon2.ts +0 -486
- package/node_modules/@noble/hashes/src/blake1.ts +0 -548
- package/node_modules/@noble/hashes/src/blake2b.ts +0 -209
- package/node_modules/@noble/hashes/src/blake2s.ts +0 -154
- package/node_modules/@noble/hashes/src/blake3.ts +0 -281
- package/node_modules/@noble/hashes/src/crypto.ts +0 -9
- package/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
- package/node_modules/@noble/hashes/src/eskdf.ts +0 -189
- package/node_modules/@noble/hashes/src/hkdf.ts +0 -89
- package/node_modules/@noble/hashes/src/hmac.ts +0 -92
- package/node_modules/@noble/hashes/src/index.ts +0 -33
- package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -120
- package/node_modules/@noble/hashes/src/ripemd160.ts +0 -109
- package/node_modules/@noble/hashes/src/scrypt.ts +0 -252
- package/node_modules/@noble/hashes/src/sha1.ts +0 -83
- package/node_modules/@noble/hashes/src/sha2.ts +0 -7
- package/node_modules/@noble/hashes/src/sha256.ts +0 -136
- package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -488
- package/node_modules/@noble/hashes/src/sha3.ts +0 -244
- package/node_modules/@noble/hashes/src/sha512.ts +0 -257
- package/node_modules/@noble/hashes/src/utils.ts +0 -305
- package/node_modules/@noble/hashes/utils.d.ts +0 -120
- package/node_modules/@noble/hashes/utils.d.ts.map +0 -1
- package/node_modules/@noble/hashes/utils.js +0 -236
- package/node_modules/@noble/hashes/utils.js.map +0 -1
- package/node_modules/@solana/buffer-layout/LICENSE +0 -21
- package/node_modules/@solana/buffer-layout/README.md +0 -403
- package/node_modules/@solana/buffer-layout/lib/Layout.d.ts +0 -1191
- package/node_modules/@solana/buffer-layout/lib/Layout.js +0 -2390
- package/node_modules/@solana/buffer-layout/lib/Layout.js.map +0 -1
- package/node_modules/@solana/buffer-layout/package.json +0 -55
- package/node_modules/@solana/web3.js/LICENSE +0 -20
- package/node_modules/@solana/web3.js/README.md +0 -145
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js +0 -10572
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js.map +0 -1
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js +0 -10471
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js.map +0 -1
- package/node_modules/@solana/web3.js/lib/index.cjs.js +0 -11321
- package/node_modules/@solana/web3.js/lib/index.cjs.js.map +0 -1
- package/node_modules/@solana/web3.js/lib/index.d.ts +0 -4021
- package/node_modules/@solana/web3.js/lib/index.esm.js +0 -11216
- package/node_modules/@solana/web3.js/lib/index.esm.js.map +0 -1
- package/node_modules/@solana/web3.js/lib/index.iife.js +0 -25958
- package/node_modules/@solana/web3.js/lib/index.iife.js.map +0 -1
- package/node_modules/@solana/web3.js/lib/index.iife.min.js +0 -20
- package/node_modules/@solana/web3.js/lib/index.iife.min.js.map +0 -1
- package/node_modules/@solana/web3.js/lib/index.native.js +0 -10572
- package/node_modules/@solana/web3.js/lib/index.native.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/LICENSE +0 -21
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/README.md +0 -1113
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.d.ts +0 -16
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.js +0 -25
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/_shortw_utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.d.ts +0 -129
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.js +0 -356
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.d.ts +0 -101
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.js +0 -380
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.d.ts +0 -92
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.js +0 -452
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.d.ts +0 -78
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.js +0 -186
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.d.ts +0 -152
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.js +0 -481
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.d.ts +0 -26
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js +0 -160
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js +0 -121
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.d.ts +0 -119
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.js +0 -501
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.d.ts +0 -116
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.js +0 -364
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.d.ts +0 -225
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.js +0 -1190
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.d.ts +0 -14
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.js +0 -717
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.d.ts +0 -15
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.js +0 -228
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.d.ts +0 -101
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.js +0 -473
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.d.ts +0 -82
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.js +0 -428
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.d.ts +0 -16
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.js +0 -21
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.d.ts +0 -129
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.js +0 -353
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.d.ts +0 -101
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js +0 -374
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.d.ts +0 -92
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js +0 -449
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts +0 -78
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.js +0 -179
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.d.ts +0 -152
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js +0 -457
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.d.ts +0 -26
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js +0 -157
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js +0 -116
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.d.ts +0 -119
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.js +0 -497
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.d.ts +0 -116
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js +0 -335
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts +0 -225
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js +0 -1182
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.d.ts +0 -14
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.js +0 -714
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.d.ts +0 -15
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.js +0 -224
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.d.ts +0 -101
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js +0 -467
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.d.ts +0 -82
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.js +0 -423
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.d.ts +0 -2
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.js +0 -19
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/index.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts +0 -5
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js +0 -61
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js +0 -49
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js +0 -53
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts +0 -12
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js +0 -61
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/package.json +0 -4
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts +0 -8
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js +0 -34
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.d.ts +0 -71
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js +0 -284
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.d.ts +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.js +0 -19
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/index.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts +0 -5
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js +0 -66
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js +0 -52
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js +0 -56
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts +0 -12
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js +0 -64
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/package.json +0 -171
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts +0 -8
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js +0 -37
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.d.ts +0 -71
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.js +0 -287
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/_shortw_utils.ts +0 -30
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/bls.ts +0 -570
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/curve.ts +0 -457
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/edwards.ts +0 -562
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/hash-to-curve.ts +0 -255
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/modular.ts +0 -532
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/montgomery.ts +0 -196
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/poseidon.ts +0 -136
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/tower.ts +0 -651
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/utils.ts +0 -369
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/weierstrass.ts +0 -1375
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/bls12-381.ts +0 -770
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/bn254.ts +0 -252
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/ed25519.ts +0 -537
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/ed448.ts +0 -507
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/index.ts +0 -17
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/jubjub.ts +0 -63
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p256.ts +0 -54
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p384.ts +0 -58
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p521.ts +0 -75
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/package.json +0 -3
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/pasta.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/secp256k1.ts +0 -328
- package/node_modules/@solana/web3.js/node_modules/superstruct/License.md +0 -9
- package/node_modules/@solana/web3.js/node_modules/superstruct/Readme.md +0 -230
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/error.d.ts +0 -33
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/error.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.cjs +0 -1084
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.cjs.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.d.ts +0 -7
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.mjs +0 -1026
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/index.mjs.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/struct.d.ts +0 -119
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/struct.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/coercions.d.ts +0 -29
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/coercions.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/refinements.d.ts +0 -38
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/refinements.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/types.d.ts +0 -142
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/types.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/utilities.d.ts +0 -66
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/structs/utilities.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/utils.d.ts +0 -144
- package/node_modules/@solana/web3.js/node_modules/superstruct/dist/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/superstruct/package.json +0 -85
- package/node_modules/@solana/web3.js/package.json +0 -75
- package/node_modules/@solana/web3.js/src/__forks__/browser/fetch-impl.ts +0 -4
- package/node_modules/@solana/web3.js/src/__forks__/react-native/fetch-impl.ts +0 -4
- package/node_modules/@solana/web3.js/src/account-data.ts +0 -39
- package/node_modules/@solana/web3.js/src/account.ts +0 -55
- package/node_modules/@solana/web3.js/src/blockhash.ts +0 -4
- package/node_modules/@solana/web3.js/src/bpf-loader-deprecated.ts +0 -5
- package/node_modules/@solana/web3.js/src/bpf-loader.ts +0 -50
- package/node_modules/@solana/web3.js/src/connection.ts +0 -6955
- package/node_modules/@solana/web3.js/src/epoch-schedule.ts +0 -102
- package/node_modules/@solana/web3.js/src/errors.ts +0 -133
- package/node_modules/@solana/web3.js/src/fee-calculator.ts +0 -18
- package/node_modules/@solana/web3.js/src/fetch-impl.ts +0 -16
- package/node_modules/@solana/web3.js/src/index.ts +0 -24
- package/node_modules/@solana/web3.js/src/instruction.ts +0 -58
- package/node_modules/@solana/web3.js/src/keypair.ts +0 -102
- package/node_modules/@solana/web3.js/src/layout.ts +0 -188
- package/node_modules/@solana/web3.js/src/loader.ts +0 -267
- package/node_modules/@solana/web3.js/src/message/account-keys.ts +0 -79
- package/node_modules/@solana/web3.js/src/message/compiled-keys.ts +0 -165
- package/node_modules/@solana/web3.js/src/message/index.ts +0 -47
- package/node_modules/@solana/web3.js/src/message/legacy.ts +0 -323
- package/node_modules/@solana/web3.js/src/message/v0.ts +0 -513
- package/node_modules/@solana/web3.js/src/message/versioned.ts +0 -36
- package/node_modules/@solana/web3.js/src/nonce-account.ts +0 -82
- package/node_modules/@solana/web3.js/src/programs/address-lookup-table/index.ts +0 -435
- package/node_modules/@solana/web3.js/src/programs/address-lookup-table/state.ts +0 -84
- package/node_modules/@solana/web3.js/src/programs/compute-budget.ts +0 -281
- package/node_modules/@solana/web3.js/src/programs/ed25519.ts +0 -157
- package/node_modules/@solana/web3.js/src/programs/index.ts +0 -7
- package/node_modules/@solana/web3.js/src/programs/secp256k1.ts +0 -228
- package/node_modules/@solana/web3.js/src/programs/stake.ts +0 -952
- package/node_modules/@solana/web3.js/src/programs/system.ts +0 -1048
- package/node_modules/@solana/web3.js/src/programs/vote.ts +0 -586
- package/node_modules/@solana/web3.js/src/publickey.ts +0 -259
- package/node_modules/@solana/web3.js/src/rpc-websocket.ts +0 -75
- package/node_modules/@solana/web3.js/src/sysvar.ts +0 -37
- package/node_modules/@solana/web3.js/src/timing.ts +0 -23
- package/node_modules/@solana/web3.js/src/transaction/constants.ts +0 -12
- package/node_modules/@solana/web3.js/src/transaction/expiry-custom-errors.ts +0 -48
- package/node_modules/@solana/web3.js/src/transaction/index.ts +0 -5
- package/node_modules/@solana/web3.js/src/transaction/legacy.ts +0 -970
- package/node_modules/@solana/web3.js/src/transaction/message.ts +0 -140
- package/node_modules/@solana/web3.js/src/transaction/versioned.ts +0 -127
- package/node_modules/@solana/web3.js/src/utils/assert.ts +0 -8
- package/node_modules/@solana/web3.js/src/utils/bigint.ts +0 -43
- package/node_modules/@solana/web3.js/src/utils/borsh-schema.ts +0 -38
- package/node_modules/@solana/web3.js/src/utils/cluster.ts +0 -35
- package/node_modules/@solana/web3.js/src/utils/ed25519.ts +0 -43
- package/node_modules/@solana/web3.js/src/utils/guarded-array-utils.ts +0 -34
- package/node_modules/@solana/web3.js/src/utils/index.ts +0 -5
- package/node_modules/@solana/web3.js/src/utils/makeWebsocketUrl.ts +0 -26
- package/node_modules/@solana/web3.js/src/utils/promise-timeout.ts +0 -14
- package/node_modules/@solana/web3.js/src/utils/secp256k1.ts +0 -11
- package/node_modules/@solana/web3.js/src/utils/send-and-confirm-raw-transaction.ts +0 -110
- package/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts +0 -106
- package/node_modules/@solana/web3.js/src/utils/shortvec-encoding.ts +0 -28
- package/node_modules/@solana/web3.js/src/utils/sleep.ts +0 -4
- package/node_modules/@solana/web3.js/src/utils/to-buffer.ts +0 -11
- package/node_modules/@solana/web3.js/src/validator-info.ts +0 -108
- package/node_modules/@solana/web3.js/src/vote-account.ts +0 -236
- package/node_modules/@swc/helpers/LICENSE +0 -201
- package/node_modules/@swc/helpers/_/_apply_decorated_descriptor/package.json +0 -4
- package/node_modules/@swc/helpers/_/_apply_decs_2203_r/package.json +0 -4
- package/node_modules/@swc/helpers/_/_array_like_to_array/package.json +0 -4
- package/node_modules/@swc/helpers/_/_array_with_holes/package.json +0 -4
- package/node_modules/@swc/helpers/_/_array_without_holes/package.json +0 -4
- package/node_modules/@swc/helpers/_/_assert_this_initialized/package.json +0 -4
- package/node_modules/@swc/helpers/_/_async_generator/package.json +0 -4
- package/node_modules/@swc/helpers/_/_async_generator_delegate/package.json +0 -4
- package/node_modules/@swc/helpers/_/_async_iterator/package.json +0 -4
- package/node_modules/@swc/helpers/_/_async_to_generator/package.json +0 -4
- package/node_modules/@swc/helpers/_/_await_async_generator/package.json +0 -4
- package/node_modules/@swc/helpers/_/_await_value/package.json +0 -4
- package/node_modules/@swc/helpers/_/_call_super/package.json +0 -4
- package/node_modules/@swc/helpers/_/_check_private_redeclaration/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_destructure/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_get/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_set/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_apply_descriptor_update/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_call_check/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_check_private_static_access/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_check_private_static_field_descriptor/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_extract_field_descriptor/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_name_tdz_error/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_destructure/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_get/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_init/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_set/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_field_update/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_method_get/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_method_init/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_private_method_set/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_static_private_field_destructure/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_static_private_field_spec_get/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_static_private_field_spec_set/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_static_private_field_update/package.json +0 -4
- package/node_modules/@swc/helpers/_/_class_static_private_method_get/package.json +0 -4
- package/node_modules/@swc/helpers/_/_construct/package.json +0 -4
- package/node_modules/@swc/helpers/_/_create_class/package.json +0 -4
- package/node_modules/@swc/helpers/_/_create_for_of_iterator_helper_loose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_create_super/package.json +0 -4
- package/node_modules/@swc/helpers/_/_decorate/package.json +0 -4
- package/node_modules/@swc/helpers/_/_defaults/package.json +0 -4
- package/node_modules/@swc/helpers/_/_define_enumerable_properties/package.json +0 -4
- package/node_modules/@swc/helpers/_/_define_property/package.json +0 -4
- package/node_modules/@swc/helpers/_/_dispose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_export_star/package.json +0 -4
- package/node_modules/@swc/helpers/_/_extends/package.json +0 -4
- package/node_modules/@swc/helpers/_/_get/package.json +0 -4
- package/node_modules/@swc/helpers/_/_get_prototype_of/package.json +0 -4
- package/node_modules/@swc/helpers/_/_identity/package.json +0 -4
- package/node_modules/@swc/helpers/_/_inherits/package.json +0 -4
- package/node_modules/@swc/helpers/_/_inherits_loose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_initializer_define_property/package.json +0 -4
- package/node_modules/@swc/helpers/_/_initializer_warning_helper/package.json +0 -4
- package/node_modules/@swc/helpers/_/_instanceof/package.json +0 -4
- package/node_modules/@swc/helpers/_/_interop_require_default/package.json +0 -4
- package/node_modules/@swc/helpers/_/_interop_require_wildcard/package.json +0 -4
- package/node_modules/@swc/helpers/_/_is_native_function/package.json +0 -4
- package/node_modules/@swc/helpers/_/_is_native_reflect_construct/package.json +0 -4
- package/node_modules/@swc/helpers/_/_iterable_to_array/package.json +0 -4
- package/node_modules/@swc/helpers/_/_iterable_to_array_limit/package.json +0 -4
- package/node_modules/@swc/helpers/_/_iterable_to_array_limit_loose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_jsx/package.json +0 -4
- package/node_modules/@swc/helpers/_/_new_arrow_check/package.json +0 -4
- package/node_modules/@swc/helpers/_/_non_iterable_rest/package.json +0 -4
- package/node_modules/@swc/helpers/_/_non_iterable_spread/package.json +0 -4
- package/node_modules/@swc/helpers/_/_object_destructuring_empty/package.json +0 -4
- package/node_modules/@swc/helpers/_/_object_spread/package.json +0 -4
- package/node_modules/@swc/helpers/_/_object_spread_props/package.json +0 -4
- package/node_modules/@swc/helpers/_/_object_without_properties/package.json +0 -4
- package/node_modules/@swc/helpers/_/_object_without_properties_loose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_possible_constructor_return/package.json +0 -4
- package/node_modules/@swc/helpers/_/_read_only_error/package.json +0 -4
- package/node_modules/@swc/helpers/_/_set/package.json +0 -4
- package/node_modules/@swc/helpers/_/_set_prototype_of/package.json +0 -4
- package/node_modules/@swc/helpers/_/_skip_first_generator_next/package.json +0 -4
- package/node_modules/@swc/helpers/_/_sliced_to_array/package.json +0 -4
- package/node_modules/@swc/helpers/_/_sliced_to_array_loose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_super_prop_base/package.json +0 -4
- package/node_modules/@swc/helpers/_/_tagged_template_literal/package.json +0 -4
- package/node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json +0 -4
- package/node_modules/@swc/helpers/_/_throw/package.json +0 -4
- package/node_modules/@swc/helpers/_/_to_array/package.json +0 -4
- package/node_modules/@swc/helpers/_/_to_consumable_array/package.json +0 -4
- package/node_modules/@swc/helpers/_/_to_primitive/package.json +0 -4
- package/node_modules/@swc/helpers/_/_to_property_key/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_add_disposable_resource/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_decorate/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_dispose_resources/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_generator/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_metadata/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_param/package.json +0 -4
- package/node_modules/@swc/helpers/_/_ts_values/package.json +0 -4
- package/node_modules/@swc/helpers/_/_type_of/package.json +0 -4
- package/node_modules/@swc/helpers/_/_unsupported_iterable_to_array/package.json +0 -4
- package/node_modules/@swc/helpers/_/_update/package.json +0 -4
- package/node_modules/@swc/helpers/_/_using/package.json +0 -4
- package/node_modules/@swc/helpers/_/_using_ctx/package.json +0 -4
- package/node_modules/@swc/helpers/_/_wrap_async_generator/package.json +0 -4
- package/node_modules/@swc/helpers/_/_wrap_native_super/package.json +0 -4
- package/node_modules/@swc/helpers/_/_write_only_error/package.json +0 -4
- package/node_modules/@swc/helpers/_/index/package.json +0 -4
- package/node_modules/@swc/helpers/cjs/_apply_decorated_descriptor.cjs +0 -35
- package/node_modules/@swc/helpers/cjs/_apply_decs_2203_r.cjs +0 -550
- package/node_modules/@swc/helpers/cjs/_array_like_to_array.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_array_with_holes.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_array_without_holes.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_assert_this_initialized.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_async_generator.cjs +0 -78
- package/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs +0 -49
- package/node_modules/@swc/helpers/cjs/_async_iterator.cjs +0 -46
- package/node_modules/@swc/helpers/cjs/_async_to_generator.cjs +0 -33
- package/node_modules/@swc/helpers/cjs/_await_async_generator.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_await_value.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_call_super.cjs +0 -19
- package/node_modules/@swc/helpers/cjs/_check_private_redeclaration.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_destructure.cjs +0 -25
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_get.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_set.cjs +0 -15
- package/node_modules/@swc/helpers/cjs/_class_apply_descriptor_update.cjs +0 -30
- package/node_modules/@swc/helpers/cjs/_class_call_check.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_class_check_private_static_access.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_class_check_private_static_field_descriptor.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_class_extract_field_descriptor.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_class_name_tdz_error.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_class_private_field_destructure.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_class_private_field_get.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_class_private_field_init.cjs +0 -9
- package/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_class_private_field_set.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_class_private_field_update.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_class_private_method_get.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_class_private_method_init.cjs +0 -9
- package/node_modules/@swc/helpers/cjs/_class_private_method_set.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_destructure.cjs +0 -13
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_get.cjs +0 -13
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_set.cjs +0 -14
- package/node_modules/@swc/helpers/cjs/_class_static_private_field_update.cjs +0 -13
- package/node_modules/@swc/helpers/cjs/_class_static_private_method_get.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_construct.cjs +0 -22
- package/node_modules/@swc/helpers/cjs/_create_class.cjs +0 -20
- package/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs +0 -24
- package/node_modules/@swc/helpers/cjs/_create_super.cjs +0 -23
- package/node_modules/@swc/helpers/cjs/_decorate.cjs +0 -270
- package/node_modules/@swc/helpers/cjs/_defaults.cjs +0 -15
- package/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs +0 -26
- package/node_modules/@swc/helpers/cjs/_define_property.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_dispose.cjs +0 -43
- package/node_modules/@swc/helpers/cjs/_export_star.cjs +0 -17
- package/node_modules/@swc/helpers/cjs/_extends.cjs +0 -15
- package/node_modules/@swc/helpers/cjs/_get.cjs +0 -23
- package/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_identity.cjs +0 -7
- package/node_modules/@swc/helpers/cjs/_inherits.cjs +0 -14
- package/node_modules/@swc/helpers/cjs/_inherits_loose.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs +0 -13
- package/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_instanceof.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +0 -38
- package/node_modules/@swc/helpers/cjs/_is_native_function.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs +0 -18
- package/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs +0 -31
- package/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs +0 -17
- package/node_modules/@swc/helpers/cjs/_jsx.cjs +0 -28
- package/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_object_spread.cjs +0 -25
- package/node_modules/@swc/helpers/cjs/_object_spread_props.cjs +0 -30
- package/node_modules/@swc/helpers/cjs/_object_without_properties.cjs +0 -23
- package/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs +0 -18
- package/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_read_only_error.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_set.cjs +0 -44
- package/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs +0 -12
- package/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_super_prop_base.cjs +0 -13
- package/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_throw.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/_to_array.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_to_primitive.cjs +0 -18
- package/node_modules/@swc/helpers/cjs/_to_property_key.cjs +0 -11
- package/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_ts_decorate.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_ts_generator.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_ts_metadata.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_ts_param.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_ts_values.cjs +0 -3
- package/node_modules/@swc/helpers/cjs/_type_of.cjs +0 -8
- package/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs +0 -15
- package/node_modules/@swc/helpers/cjs/_update.cjs +0 -16
- package/node_modules/@swc/helpers/cjs/_using.cjs +0 -24
- package/node_modules/@swc/helpers/cjs/_using_ctx.cjs +0 -75
- package/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs +0 -10
- package/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs +0 -28
- package/node_modules/@swc/helpers/cjs/_write_only_error.cjs +0 -6
- package/node_modules/@swc/helpers/cjs/index.cjs +0 -423
- package/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js +0 -33
- package/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js +0 -548
- package/node_modules/@swc/helpers/esm/_array_like_to_array.js +0 -8
- package/node_modules/@swc/helpers/esm/_array_with_holes.js +0 -4
- package/node_modules/@swc/helpers/esm/_array_without_holes.js +0 -6
- package/node_modules/@swc/helpers/esm/_assert_this_initialized.js +0 -6
- package/node_modules/@swc/helpers/esm/_async_generator.js +0 -76
- package/node_modules/@swc/helpers/esm/_async_generator_delegate.js +0 -47
- package/node_modules/@swc/helpers/esm/_async_iterator.js +0 -44
- package/node_modules/@swc/helpers/esm/_async_to_generator.js +0 -31
- package/node_modules/@swc/helpers/esm/_await_async_generator.js +0 -6
- package/node_modules/@swc/helpers/esm/_await_value.js +0 -4
- package/node_modules/@swc/helpers/esm/_call_super.js +0 -17
- package/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +0 -6
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js +0 -23
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js +0 -6
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js +0 -13
- package/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js +0 -28
- package/node_modules/@swc/helpers/esm/_class_call_check.js +0 -4
- package/node_modules/@swc/helpers/esm/_class_check_private_static_access.js +0 -4
- package/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js +0 -6
- package/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js +0 -6
- package/node_modules/@swc/helpers/esm/_class_name_tdz_error.js +0 -4
- package/node_modules/@swc/helpers/esm/_class_private_field_destructure.js +0 -8
- package/node_modules/@swc/helpers/esm/_class_private_field_get.js +0 -8
- package/node_modules/@swc/helpers/esm/_class_private_field_init.js +0 -7
- package/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js +0 -8
- package/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js +0 -6
- package/node_modules/@swc/helpers/esm/_class_private_field_set.js +0 -9
- package/node_modules/@swc/helpers/esm/_class_private_field_update.js +0 -8
- package/node_modules/@swc/helpers/esm/_class_private_method_get.js +0 -6
- package/node_modules/@swc/helpers/esm/_class_private_method_init.js +0 -7
- package/node_modules/@swc/helpers/esm/_class_private_method_set.js +0 -4
- package/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js +0 -11
- package/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js +0 -11
- package/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js +0 -12
- package/node_modules/@swc/helpers/esm/_class_static_private_field_update.js +0 -11
- package/node_modules/@swc/helpers/esm/_class_static_private_method_get.js +0 -8
- package/node_modules/@swc/helpers/esm/_construct.js +0 -20
- package/node_modules/@swc/helpers/esm/_create_class.js +0 -18
- package/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js +0 -22
- package/node_modules/@swc/helpers/esm/_create_super.js +0 -21
- package/node_modules/@swc/helpers/esm/_decorate.js +0 -268
- package/node_modules/@swc/helpers/esm/_defaults.js +0 -13
- package/node_modules/@swc/helpers/esm/_define_enumerable_properties.js +0 -24
- package/node_modules/@swc/helpers/esm/_define_property.js +0 -8
- package/node_modules/@swc/helpers/esm/_dispose.js +0 -41
- package/node_modules/@swc/helpers/esm/_export_star.js +0 -15
- package/node_modules/@swc/helpers/esm/_extends.js +0 -13
- package/node_modules/@swc/helpers/esm/_get.js +0 -21
- package/node_modules/@swc/helpers/esm/_get_prototype_of.js +0 -8
- package/node_modules/@swc/helpers/esm/_identity.js +0 -5
- package/node_modules/@swc/helpers/esm/_inherits.js +0 -12
- package/node_modules/@swc/helpers/esm/_inherits_loose.js +0 -6
- package/node_modules/@swc/helpers/esm/_initializer_define_property.js +0 -11
- package/node_modules/@swc/helpers/esm/_initializer_warning_helper.js +0 -9
- package/node_modules/@swc/helpers/esm/_instanceof.js +0 -6
- package/node_modules/@swc/helpers/esm/_interop_require_default.js +0 -4
- package/node_modules/@swc/helpers/esm/_interop_require_wildcard.js +0 -36
- package/node_modules/@swc/helpers/esm/_is_native_function.js +0 -4
- package/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js +0 -16
- package/node_modules/@swc/helpers/esm/_iterable_to_array.js +0 -6
- package/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js +0 -29
- package/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js +0 -15
- package/node_modules/@swc/helpers/esm/_jsx.js +0 -26
- package/node_modules/@swc/helpers/esm/_new_arrow_check.js +0 -4
- package/node_modules/@swc/helpers/esm/_non_iterable_rest.js +0 -4
- package/node_modules/@swc/helpers/esm/_non_iterable_spread.js +0 -4
- package/node_modules/@swc/helpers/esm/_object_destructuring_empty.js +0 -6
- package/node_modules/@swc/helpers/esm/_object_spread.js +0 -23
- package/node_modules/@swc/helpers/esm/_object_spread_props.js +0 -28
- package/node_modules/@swc/helpers/esm/_object_without_properties.js +0 -21
- package/node_modules/@swc/helpers/esm/_object_without_properties_loose.js +0 -16
- package/node_modules/@swc/helpers/esm/_possible_constructor_return.js +0 -9
- package/node_modules/@swc/helpers/esm/_read_only_error.js +0 -4
- package/node_modules/@swc/helpers/esm/_set.js +0 -42
- package/node_modules/@swc/helpers/esm/_set_prototype_of.js +0 -10
- package/node_modules/@swc/helpers/esm/_skip_first_generator_next.js +0 -9
- package/node_modules/@swc/helpers/esm/_sliced_to_array.js +0 -9
- package/node_modules/@swc/helpers/esm/_sliced_to_array_loose.js +0 -9
- package/node_modules/@swc/helpers/esm/_super_prop_base.js +0 -11
- package/node_modules/@swc/helpers/esm/_tagged_template_literal.js +0 -6
- package/node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js +0 -8
- package/node_modules/@swc/helpers/esm/_throw.js +0 -4
- package/node_modules/@swc/helpers/esm/_to_array.js +0 -9
- package/node_modules/@swc/helpers/esm/_to_consumable_array.js +0 -9
- package/node_modules/@swc/helpers/esm/_to_primitive.js +0 -16
- package/node_modules/@swc/helpers/esm/_to_property_key.js +0 -9
- package/node_modules/@swc/helpers/esm/_ts_add_disposable_resource.js +0 -1
- package/node_modules/@swc/helpers/esm/_ts_decorate.js +0 -1
- package/node_modules/@swc/helpers/esm/_ts_dispose_resources.js +0 -1
- package/node_modules/@swc/helpers/esm/_ts_generator.js +0 -1
- package/node_modules/@swc/helpers/esm/_ts_metadata.js +0 -1
- package/node_modules/@swc/helpers/esm/_ts_param.js +0 -1
- package/node_modules/@swc/helpers/esm/_ts_values.js +0 -1
- package/node_modules/@swc/helpers/esm/_type_of.js +0 -6
- package/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js +0 -13
- package/node_modules/@swc/helpers/esm/_update.js +0 -14
- package/node_modules/@swc/helpers/esm/_using.js +0 -22
- package/node_modules/@swc/helpers/esm/_using_ctx.js +0 -73
- package/node_modules/@swc/helpers/esm/_wrap_async_generator.js +0 -8
- package/node_modules/@swc/helpers/esm/_wrap_native_super.js +0 -26
- package/node_modules/@swc/helpers/esm/_write_only_error.js +0 -4
- package/node_modules/@swc/helpers/esm/index.js +0 -106
- package/node_modules/@swc/helpers/node_modules/tslib/CopyrightNotice.txt +0 -15
- package/node_modules/@swc/helpers/node_modules/tslib/LICENSE.txt +0 -12
- package/node_modules/@swc/helpers/node_modules/tslib/README.md +0 -164
- package/node_modules/@swc/helpers/node_modules/tslib/SECURITY.md +0 -41
- package/node_modules/@swc/helpers/node_modules/tslib/modules/index.d.ts +0 -38
- package/node_modules/@swc/helpers/node_modules/tslib/modules/index.js +0 -70
- package/node_modules/@swc/helpers/node_modules/tslib/modules/package.json +0 -3
- package/node_modules/@swc/helpers/node_modules/tslib/package.json +0 -47
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.d.ts +0 -460
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.html +0 -1
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.js +0 -402
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.mjs +0 -401
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.html +0 -1
- package/node_modules/@swc/helpers/node_modules/tslib/tslib.js +0 -484
- package/node_modules/@swc/helpers/package.json +0 -471
- package/node_modules/@swc/helpers/scripts/ast_grep.js +0 -229
- package/node_modules/@swc/helpers/scripts/build.js +0 -121
- package/node_modules/@swc/helpers/scripts/errors.js +0 -1
- package/node_modules/@swc/helpers/scripts/utils.js +0 -3
- package/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs +0 -1
- package/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs +0 -1
- package/node_modules/@swc/helpers/src/_array_like_to_array.mjs +0 -1
- package/node_modules/@swc/helpers/src/_array_with_holes.mjs +0 -1
- package/node_modules/@swc/helpers/src/_array_without_holes.mjs +0 -1
- package/node_modules/@swc/helpers/src/_assert_this_initialized.mjs +0 -1
- package/node_modules/@swc/helpers/src/_async_generator.mjs +0 -1
- package/node_modules/@swc/helpers/src/_async_generator_delegate.mjs +0 -1
- package/node_modules/@swc/helpers/src/_async_iterator.mjs +0 -1
- package/node_modules/@swc/helpers/src/_async_to_generator.mjs +0 -1
- package/node_modules/@swc/helpers/src/_await_async_generator.mjs +0 -1
- package/node_modules/@swc/helpers/src/_await_value.mjs +0 -1
- package/node_modules/@swc/helpers/src/_call_super.mjs +0 -1
- package/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_call_check.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_get.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_init.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_set.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_field_update.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_method_get.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_method_init.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_private_method_set.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs +0 -1
- package/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs +0 -1
- package/node_modules/@swc/helpers/src/_construct.mjs +0 -1
- package/node_modules/@swc/helpers/src/_create_class.mjs +0 -1
- package/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_create_super.mjs +0 -1
- package/node_modules/@swc/helpers/src/_decorate.mjs +0 -1
- package/node_modules/@swc/helpers/src/_defaults.mjs +0 -1
- package/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs +0 -1
- package/node_modules/@swc/helpers/src/_define_property.mjs +0 -1
- package/node_modules/@swc/helpers/src/_dispose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_export_star.mjs +0 -1
- package/node_modules/@swc/helpers/src/_extends.mjs +0 -1
- package/node_modules/@swc/helpers/src/_get.mjs +0 -1
- package/node_modules/@swc/helpers/src/_get_prototype_of.mjs +0 -1
- package/node_modules/@swc/helpers/src/_identity.mjs +0 -1
- package/node_modules/@swc/helpers/src/_inherits.mjs +0 -1
- package/node_modules/@swc/helpers/src/_inherits_loose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_initializer_define_property.mjs +0 -1
- package/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs +0 -1
- package/node_modules/@swc/helpers/src/_instanceof.mjs +0 -1
- package/node_modules/@swc/helpers/src/_interop_require_default.mjs +0 -1
- package/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs +0 -1
- package/node_modules/@swc/helpers/src/_is_native_function.mjs +0 -1
- package/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs +0 -1
- package/node_modules/@swc/helpers/src/_iterable_to_array.mjs +0 -1
- package/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs +0 -1
- package/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_jsx.mjs +0 -1
- package/node_modules/@swc/helpers/src/_new_arrow_check.mjs +0 -1
- package/node_modules/@swc/helpers/src/_non_iterable_rest.mjs +0 -1
- package/node_modules/@swc/helpers/src/_non_iterable_spread.mjs +0 -1
- package/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs +0 -1
- package/node_modules/@swc/helpers/src/_object_spread.mjs +0 -1
- package/node_modules/@swc/helpers/src/_object_spread_props.mjs +0 -1
- package/node_modules/@swc/helpers/src/_object_without_properties.mjs +0 -1
- package/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_possible_constructor_return.mjs +0 -1
- package/node_modules/@swc/helpers/src/_read_only_error.mjs +0 -1
- package/node_modules/@swc/helpers/src/_set.mjs +0 -1
- package/node_modules/@swc/helpers/src/_set_prototype_of.mjs +0 -1
- package/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs +0 -1
- package/node_modules/@swc/helpers/src/_sliced_to_array.mjs +0 -1
- package/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_super_prop_base.mjs +0 -1
- package/node_modules/@swc/helpers/src/_tagged_template_literal.mjs +0 -1
- package/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs +0 -1
- package/node_modules/@swc/helpers/src/_throw.mjs +0 -1
- package/node_modules/@swc/helpers/src/_to_array.mjs +0 -1
- package/node_modules/@swc/helpers/src/_to_consumable_array.mjs +0 -1
- package/node_modules/@swc/helpers/src/_to_primitive.mjs +0 -1
- package/node_modules/@swc/helpers/src/_to_property_key.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_decorate.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_generator.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_metadata.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_param.mjs +0 -1
- package/node_modules/@swc/helpers/src/_ts_values.mjs +0 -1
- package/node_modules/@swc/helpers/src/_type_of.mjs +0 -1
- package/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs +0 -1
- package/node_modules/@swc/helpers/src/_update.mjs +0 -1
- package/node_modules/@swc/helpers/src/_using.mjs +0 -1
- package/node_modules/@swc/helpers/src/_using_ctx.mjs +0 -1
- package/node_modules/@swc/helpers/src/_wrap_async_generator.mjs +0 -1
- package/node_modules/@swc/helpers/src/_wrap_native_super.mjs +0 -1
- package/node_modules/@swc/helpers/src/_write_only_error.mjs +0 -1
- package/node_modules/@swc/helpers/src/index.mjs +0 -1
- package/node_modules/@types/connect/LICENSE +0 -21
- package/node_modules/@types/connect/README.md +0 -15
- package/node_modules/@types/connect/index.d.ts +0 -91
- package/node_modules/@types/connect/package.json +0 -32
- package/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/node/fs.d.ts +0 -4354
- package/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/node/stream/consumers.d.ts +0 -38
- package/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/uuid/LICENSE +0 -21
- package/node_modules/@types/uuid/README.md +0 -16
- package/node_modules/@types/uuid/index.d.mts +0 -10
- package/node_modules/@types/uuid/index.d.ts +0 -80
- package/node_modules/@types/uuid/package.json +0 -54
- package/node_modules/@types/ws/LICENSE +0 -21
- package/node_modules/@types/ws/README.md +0 -16
- package/node_modules/@types/ws/index.d.ts +0 -353
- package/node_modules/@types/ws/package.json +0 -57
- package/node_modules/JSONStream/.travis.yml +0 -8
- package/node_modules/JSONStream/LICENSE.APACHE2 +0 -15
- package/node_modules/JSONStream/LICENSE.MIT +0 -24
- package/node_modules/JSONStream/bin.js +0 -12
- package/node_modules/JSONStream/examples/all_docs.js +0 -13
- package/node_modules/JSONStream/index.js +0 -247
- package/node_modules/JSONStream/package.json +0 -40
- package/node_modules/JSONStream/readme.markdown +0 -207
- package/node_modules/JSONStream/test/bool.js +0 -41
- package/node_modules/JSONStream/test/browser.js +0 -18
- package/node_modules/JSONStream/test/destroy_missing.js +0 -27
- package/node_modules/JSONStream/test/doubledot1.js +0 -29
- package/node_modules/JSONStream/test/doubledot2.js +0 -30
- package/node_modules/JSONStream/test/empty.js +0 -44
- package/node_modules/JSONStream/test/error_contents.js +0 -45
- package/node_modules/JSONStream/test/fixtures/all_npm.json +0 -4030
- package/node_modules/JSONStream/test/fixtures/couch_sample.json +0 -18
- package/node_modules/JSONStream/test/fixtures/depth.json +0 -15
- package/node_modules/JSONStream/test/fixtures/error.json +0 -1
- package/node_modules/JSONStream/test/fixtures/header_footer.json +0 -19
- package/node_modules/JSONStream/test/fn.js +0 -39
- package/node_modules/JSONStream/test/gen.js +0 -135
- package/node_modules/JSONStream/test/header_footer.js +0 -55
- package/node_modules/JSONStream/test/issues.js +0 -34
- package/node_modules/JSONStream/test/keys.js +0 -105
- package/node_modules/JSONStream/test/map.js +0 -40
- package/node_modules/JSONStream/test/multiple_objects.js +0 -36
- package/node_modules/JSONStream/test/multiple_objects_error.js +0 -29
- package/node_modules/JSONStream/test/null.js +0 -28
- package/node_modules/JSONStream/test/parsejson.js +0 -29
- package/node_modules/JSONStream/test/run.js +0 -13
- package/node_modules/JSONStream/test/stringify.js +0 -41
- package/node_modules/JSONStream/test/stringify_object.js +0 -47
- package/node_modules/JSONStream/test/test.js +0 -35
- package/node_modules/JSONStream/test/test2.js +0 -29
- package/node_modules/JSONStream/test/two-ways.js +0 -41
- package/node_modules/agentkeepalive/LICENSE +0 -23
- package/node_modules/agentkeepalive/README.md +0 -256
- package/node_modules/agentkeepalive/browser.js +0 -5
- package/node_modules/agentkeepalive/index.d.ts +0 -69
- package/node_modules/agentkeepalive/index.js +0 -7
- package/node_modules/agentkeepalive/lib/agent.js +0 -402
- package/node_modules/agentkeepalive/lib/constants.js +0 -14
- package/node_modules/agentkeepalive/lib/https_agent.js +0 -51
- package/node_modules/agentkeepalive/package.json +0 -56
- package/node_modules/base-x/LICENSE.md +0 -22
- package/node_modules/base-x/README.md +0 -67
- package/node_modules/base-x/package.json +0 -49
- package/node_modules/base-x/src/index.d.ts +0 -10
- package/node_modules/base-x/src/index.js +0 -123
- package/node_modules/base64-js/LICENSE +0 -21
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/bigint-buffer/.travis.yml +0 -51
- package/node_modules/bigint-buffer/LICENSE +0 -202
- package/node_modules/bigint-buffer/README.md +0 -121
- package/node_modules/bigint-buffer/binding.gyp +0 -8
- package/node_modules/bigint-buffer/build/Makefile +0 -347
- package/node_modules/bigint-buffer/build/Release/.deps/Release/bigint_buffer.node.d +0 -1
- package/node_modules/bigint-buffer/build/Release/.deps/Release/obj.target/bigint_buffer/src/bigint-buffer.o.d +0 -12
- 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 +0 -180
- package/node_modules/bigint-buffer/build/binding.Makefile +0 -6
- package/node_modules/bigint-buffer/build/config.gypi +0 -450
- package/node_modules/bigint-buffer/build/gyp-mac-tool +0 -772
- package/node_modules/bigint-buffer/dist/browser.js +0 -69
- package/node_modules/bigint-buffer/dist/index.bench.d.ts +0 -1
- package/node_modules/bigint-buffer/dist/index.d.ts +0 -27
- package/node_modules/bigint-buffer/dist/index.spec.d.ts +0 -1
- package/node_modules/bigint-buffer/dist/node.js +0 -77
- package/node_modules/bigint-buffer/helper/bigint.d.ts +0 -3
- package/node_modules/bigint-buffer/karma.conf.js +0 -62
- package/node_modules/bigint-buffer/package.json +0 -89
- package/node_modules/bigint-buffer/rollup.config.js +0 -13
- package/node_modules/bigint-buffer/src/bigint-buffer.c +0 -203
- package/node_modules/bigint-buffer/src/index.bench.ts +0 -207
- package/node_modules/bigint-buffer/src/index.spec.ts +0 -288
- package/node_modules/bigint-buffer/src/index.ts +0 -84
- package/node_modules/bigint-buffer/tsconfig.json +0 -19
- package/node_modules/bindings/LICENSE.md +0 -22
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -28
- package/node_modules/bn.js/LICENSE +0 -19
- package/node_modules/bn.js/README.md +0 -214
- package/node_modules/bn.js/lib/bn.js +0 -3547
- package/node_modules/bn.js/package.json +0 -39
- package/node_modules/borsh/LICENSE-APACHE +0 -201
- package/node_modules/borsh/LICENSE-MIT.txt +0 -23
- package/node_modules/borsh/README.md +0 -83
- package/node_modules/borsh/lib/index.d.ts +0 -52
- package/node_modules/borsh/lib/index.js +0 -440
- package/node_modules/borsh/package.json +0 -61
- package/node_modules/bs58/README.md +0 -71
- package/node_modules/bs58/index.js +0 -4
- package/node_modules/bs58/package.json +0 -37
- package/node_modules/buffer/AUTHORS.md +0 -73
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -194
- package/node_modules/buffer/index.js +0 -2106
- package/node_modules/buffer/package.json +0 -93
- package/node_modules/buffer-layout/.eslintrc.js +0 -45
- package/node_modules/buffer-layout/.travis.yml +0 -9
- package/node_modules/buffer-layout/CHANGELOG.md +0 -222
- package/node_modules/buffer-layout/LICENSE +0 -21
- package/node_modules/buffer-layout/README.md +0 -397
- package/node_modules/buffer-layout/jsdoc/conf.json +0 -10
- package/node_modules/buffer-layout/jsdoc/custom/local.js +0 -75
- package/node_modules/buffer-layout/lib/Layout.js +0 -2712
- package/node_modules/buffer-layout/package.json +0 -40
- package/node_modules/buffer-layout/test/LayoutTest.js +0 -2162
- package/node_modules/buffer-layout/test/examples.c +0 -112
- package/node_modules/buffer-layout/test/examples.js +0 -259
- package/node_modules/buffer-layout/test/n64.c +0 -71
- package/node_modules/buffer-layout/x.js +0 -36
- package/node_modules/bufferutil/LICENSE +0 -20
- package/node_modules/bufferutil/README.md +0 -79
- package/node_modules/bufferutil/binding.gyp +0 -32
- package/node_modules/bufferutil/fallback.js +0 -34
- package/node_modules/bufferutil/index.js +0 -7
- package/node_modules/bufferutil/package.json +0 -36
- 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 +0 -171
- package/node_modules/commander/LICENSE +0 -22
- package/node_modules/commander/Readme.md +0 -428
- package/node_modules/commander/index.js +0 -1224
- package/node_modules/commander/package.json +0 -38
- package/node_modules/commander/typings/index.d.ts +0 -310
- package/node_modules/cross-fetch/LICENSE +0 -21
- package/node_modules/cross-fetch/README.md +0 -169
- package/node_modules/cross-fetch/dist/browser-polyfill.js +0 -658
- package/node_modules/cross-fetch/dist/browser-ponyfill.js +0 -686
- package/node_modules/cross-fetch/dist/cross-fetch.js +0 -2
- package/node_modules/cross-fetch/dist/cross-fetch.js.map +0 -1
- package/node_modules/cross-fetch/dist/node-polyfill.js +0 -11
- package/node_modules/cross-fetch/dist/node-ponyfill.js +0 -22
- package/node_modules/cross-fetch/dist/react-native-polyfill.js +0 -12
- package/node_modules/cross-fetch/dist/react-native-ponyfill.js +0 -6
- package/node_modules/cross-fetch/index.d.ts +0 -14
- package/node_modules/cross-fetch/package.json +0 -127
- package/node_modules/cross-fetch/polyfill/package.json +0 -8
- package/node_modules/delay/index.d.ts +0 -107
- package/node_modules/delay/index.js +0 -72
- package/node_modules/delay/license +0 -9
- package/node_modules/delay/package.json +0 -54
- package/node_modules/delay/readme.md +0 -173
- package/node_modules/es6-promise/LICENSE +0 -19
- package/node_modules/es6-promise/README.md +0 -97
- package/node_modules/es6-promise/auto.js +0 -4
- package/node_modules/es6-promise/dist/es6-promise.auto.js +0 -1176
- package/node_modules/es6-promise/dist/es6-promise.auto.map +0 -1
- package/node_modules/es6-promise/dist/es6-promise.auto.min.js +0 -1
- package/node_modules/es6-promise/dist/es6-promise.auto.min.map +0 -1
- package/node_modules/es6-promise/dist/es6-promise.js +0 -1174
- package/node_modules/es6-promise/dist/es6-promise.map +0 -1
- package/node_modules/es6-promise/dist/es6-promise.min.js +0 -1
- package/node_modules/es6-promise/dist/es6-promise.min.map +0 -1
- package/node_modules/es6-promise/es6-promise.d.ts +0 -85
- package/node_modules/es6-promise/lib/es6-promise/-internal.js +0 -243
- package/node_modules/es6-promise/lib/es6-promise/asap.js +0 -119
- package/node_modules/es6-promise/lib/es6-promise/enumerator.js +0 -124
- package/node_modules/es6-promise/lib/es6-promise/polyfill.js +0 -35
- package/node_modules/es6-promise/lib/es6-promise/promise/all.js +0 -52
- package/node_modules/es6-promise/lib/es6-promise/promise/race.js +0 -84
- package/node_modules/es6-promise/lib/es6-promise/promise/reject.js +0 -46
- package/node_modules/es6-promise/lib/es6-promise/promise/resolve.js +0 -48
- package/node_modules/es6-promise/lib/es6-promise/promise.js +0 -431
- package/node_modules/es6-promise/lib/es6-promise/then.js +0 -32
- package/node_modules/es6-promise/lib/es6-promise/utils.js +0 -21
- package/node_modules/es6-promise/lib/es6-promise.auto.js +0 -3
- package/node_modules/es6-promise/lib/es6-promise.js +0 -7
- package/node_modules/es6-promise/package.json +0 -78
- package/node_modules/es6-promisify/README.md +0 -89
- package/node_modules/es6-promisify/dist/promise.js +0 -73
- package/node_modules/es6-promisify/dist/promisify.js +0 -85
- package/node_modules/es6-promisify/package.json +0 -41
- package/node_modules/eventemitter3/LICENSE +0 -21
- package/node_modules/eventemitter3/README.md +0 -94
- package/node_modules/eventemitter3/index.d.ts +0 -134
- package/node_modules/eventemitter3/index.js +0 -336
- package/node_modules/eventemitter3/package.json +0 -56
- package/node_modules/eventemitter3/umd/eventemitter3.js +0 -340
- package/node_modules/eventemitter3/umd/eventemitter3.min.js +0 -1
- package/node_modules/eventemitter3/umd/eventemitter3.min.js.map +0 -1
- package/node_modules/eyes/LICENSE +0 -20
- package/node_modules/eyes/Makefile +0 -4
- package/node_modules/eyes/README.md +0 -73
- package/node_modules/eyes/lib/eyes.js +0 -236
- package/node_modules/eyes/package.json +0 -14
- package/node_modules/eyes/test/eyes-test.js +0 -56
- package/node_modules/fast-stable-stringify/.npmignore +0 -4
- package/node_modules/fast-stable-stringify/.travis.yml +0 -10
- package/node_modules/fast-stable-stringify/LICENSE +0 -21
- package/node_modules/fast-stable-stringify/README.md +0 -81
- package/node_modules/fast-stable-stringify/cli/files-to-comparison-results.js +0 -67
- package/node_modules/fast-stable-stringify/cli/format-table.js +0 -70
- package/node_modules/fast-stable-stringify/cli/index.js +0 -19
- package/node_modules/fast-stable-stringify/fixtures/index.js +0 -5
- package/node_modules/fast-stable-stringify/fixtures/input-data-types.js +0 -191
- package/node_modules/fast-stable-stringify/fixtures/log-result.json +0 -22
- package/node_modules/fast-stable-stringify/fixtures/log.txt +0 -24
- package/node_modules/fast-stable-stringify/index.js +0 -73
- package/node_modules/fast-stable-stringify/karma.conf.js +0 -124
- package/node_modules/fast-stable-stringify/karma.conf.travis.js +0 -95
- package/node_modules/fast-stable-stringify/package.json +0 -47
- package/node_modules/fast-stable-stringify/results/escape-long/Chrome 60.0.3112 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/Edge 14.14393.0 (Windows 10 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/Firefox 54.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/IE 10.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/IE 11.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/IE 9.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/Mobile Safari 10.0.0 (iOS 10.3.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-long/Safari 10.0.1 (Mac OS X 10.12.1).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/Chrome 60.0.3112 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/Edge 14.14393.0 (Windows 10 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/Firefox 54.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/IE 10.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/IE 11.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/IE 9.0.0 (Windows 7 0.0.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/Mobile Safari 10.0.0 (iOS 10.3.0).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape-short/Safari 10.0.1 (Mac OS X 10.12.1).json +0 -57
- package/node_modules/fast-stable-stringify/results/escape.md +0 -20
- package/node_modules/fast-stable-stringify/results/itar-long/Chrome 60.0.3112 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/Chrome Mobile 55.0.2883 (Android 6.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/Edge 14.14393.0 (Windows 10 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/Firefox 54.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/IE 10.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/IE 11.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/IE 9.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/Mobile Safari 10.0.0 (iOS 10.3.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-long/Safari 10.0.1 (Mac OS X 10.12.1).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/Chrome 60.0.3112 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/Chrome Mobile 55.0.2883 (Android 6.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/Edge 14.14393.0 (Windows 10 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/Firefox 54.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/IE 10.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/IE 11.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/IE 9.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/Mobile Safari 10.0.0 (iOS 10.3.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar-short/Safari 10.0.1 (Mac OS X 10.12.1).json +0 -35
- package/node_modules/fast-stable-stringify/results/itar.md +0 -20
- package/node_modules/fast-stable-stringify/results/iter/Chrome 60.0.3112 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 39.0.0 (Android 5.1.1).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Chrome Mobile 55.0.2883 (Android 6.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Edge 14.14393.0 (Windows 10 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Firefox 54.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/IE 10.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/IE 11.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/IE 9.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Mobile Safari 10.0.0 (iOS 10.3.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Mobile Safari 9.0.0 (iOS 9.2.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Safari 10.0.1 (Mac OS X 10.12.1).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter/Safari 9.1.2 (Mac OS X 10.11.6).json +0 -35
- package/node_modules/fast-stable-stringify/results/iter.md +0 -14
- package/node_modules/fast-stable-stringify/results/libs/Chrome 60.0.3112 (Windows 7 0.0.0).json +0 -46
- package/node_modules/fast-stable-stringify/results/libs/Chrome Mobile 55.0.2883 (Android 6.0.0).json +0 -46
- package/node_modules/fast-stable-stringify/results/libs/Edge 14.14393.0 (Windows 10 0.0.0).json +0 -46
- package/node_modules/fast-stable-stringify/results/libs/Firefox 54.0.0 (Windows 7 0.0.0).json +0 -46
- package/node_modules/fast-stable-stringify/results/libs/IE 10.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/libs/IE 11.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/libs/IE 9.0.0 (Windows 7 0.0.0).json +0 -35
- package/node_modules/fast-stable-stringify/results/libs/Mobile Safari 10.0.0 (iOS 10.3.0).json +0 -46
- package/node_modules/fast-stable-stringify/results/libs/Safari 10.0.1 (Mac OS X 10.12.1).json +0 -46
- package/node_modules/fast-stable-stringify/results/libs.md +0 -15
- package/node_modules/fast-stable-stringify/test/escape-long.js +0 -147
- package/node_modules/fast-stable-stringify/test/escape-short.js +0 -147
- package/node_modules/fast-stable-stringify/test/index.js +0 -6
- package/node_modules/fast-stable-stringify/test/itar-long.js +0 -52
- package/node_modules/fast-stable-stringify/test/itar-short.js +0 -52
- package/node_modules/fast-stable-stringify/test/iter.js +0 -84
- package/node_modules/fast-stable-stringify/test/libs.js +0 -57
- package/node_modules/fast-stable-stringify/test/travis.js +0 -43
- package/node_modules/fast-stable-stringify/test/validate.js +0 -24
- package/node_modules/fast-stable-stringify/util/eachRecursive.js +0 -9
- package/node_modules/fast-stable-stringify/util/get-git-hash-sync.js +0 -21
- package/node_modules/fast-stable-stringify/util/get-lib-info.js +0 -22
- package/node_modules/fast-stable-stringify/util/object-path.js +0 -47
- package/node_modules/fast-stable-stringify/v8-profile/bench.js +0 -8
- package/node_modules/fast-stable-stringify/v8-profile/run.sh +0 -2
- package/node_modules/fast-stable-stringify/zuul-local.sh +0 -2
- package/node_modules/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/LICENSE +0 -20
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -32
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/node_modules/humanize-ms/LICENSE +0 -17
- package/node_modules/humanize-ms/README.md +0 -40
- package/node_modules/humanize-ms/index.js +0 -24
- package/node_modules/humanize-ms/package.json +0 -37
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/isomorphic-ws/LICENSE +0 -21
- package/node_modules/isomorphic-ws/README.md +0 -58
- package/node_modules/isomorphic-ws/browser.js +0 -17
- package/node_modules/isomorphic-ws/index.d.ts +0 -8
- package/node_modules/isomorphic-ws/node.js +0 -3
- package/node_modules/isomorphic-ws/package.json +0 -34
- package/node_modules/jayson/.gitignore +0 -8
- package/node_modules/jayson/LICENSE +0 -22
- package/node_modules/jayson/README.md +0 -1387
- package/node_modules/jayson/bin/jayson.js +0 -111
- package/node_modules/jayson/index.d.ts +0 -370
- package/node_modules/jayson/index.js +0 -1
- package/node_modules/jayson/lib/client/browser/index.d.ts +0 -14
- package/node_modules/jayson/lib/client/browser/index.js +0 -163
- package/node_modules/jayson/lib/client/http.js +0 -116
- package/node_modules/jayson/lib/client/https.js +0 -34
- package/node_modules/jayson/lib/client/index.js +0 -220
- package/node_modules/jayson/lib/client/tcp.js +0 -90
- package/node_modules/jayson/lib/client/tls.js +0 -89
- package/node_modules/jayson/lib/client/websocket.js +0 -135
- package/node_modules/jayson/lib/generateRequest.js +0 -63
- package/node_modules/jayson/lib/index.js +0 -31
- package/node_modules/jayson/lib/method.js +0 -120
- package/node_modules/jayson/lib/server/http.js +0 -26
- package/node_modules/jayson/lib/server/https.js +0 -26
- package/node_modules/jayson/lib/server/index.js +0 -475
- package/node_modules/jayson/lib/server/middleware.js +0 -75
- package/node_modules/jayson/lib/server/tcp.js +0 -72
- package/node_modules/jayson/lib/server/tls.js +0 -72
- package/node_modules/jayson/lib/server/websocket.js +0 -62
- package/node_modules/jayson/lib/utils.js +0 -511
- package/node_modules/jayson/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/jayson/node_modules/@types/node/README.md +0 -16
- package/node_modules/jayson/node_modules/@types/node/assert.d.ts +0 -117
- package/node_modules/jayson/node_modules/@types/node/async_hooks.d.ts +0 -246
- package/node_modules/jayson/node_modules/@types/node/buffer.d.ts +0 -22
- package/node_modules/jayson/node_modules/@types/node/child_process.d.ts +0 -507
- package/node_modules/jayson/node_modules/@types/node/cluster.d.ts +0 -260
- package/node_modules/jayson/node_modules/@types/node/console.d.ts +0 -3
- package/node_modules/jayson/node_modules/@types/node/constants.d.ts +0 -448
- package/node_modules/jayson/node_modules/@types/node/crypto.d.ts +0 -1183
- package/node_modules/jayson/node_modules/@types/node/dgram.d.ts +0 -118
- package/node_modules/jayson/node_modules/@types/node/dns.d.ts +0 -372
- package/node_modules/jayson/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/jayson/node_modules/@types/node/events.d.ts +0 -47
- package/node_modules/jayson/node_modules/@types/node/fs.d.ts +0 -2567
- package/node_modules/jayson/node_modules/@types/node/globals.d.ts +0 -1351
- package/node_modules/jayson/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/jayson/node_modules/@types/node/http.d.ts +0 -456
- package/node_modules/jayson/node_modules/@types/node/http2.d.ts +0 -952
- package/node_modules/jayson/node_modules/@types/node/https.d.ts +0 -156
- package/node_modules/jayson/node_modules/@types/node/index.d.ts +0 -91
- package/node_modules/jayson/node_modules/@types/node/inspector.d.ts +0 -3040
- package/node_modules/jayson/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/jayson/node_modules/@types/node/net.d.ts +0 -290
- package/node_modules/jayson/node_modules/@types/node/os.d.ts +0 -263
- package/node_modules/jayson/node_modules/@types/node/package.json +0 -195
- package/node_modules/jayson/node_modules/@types/node/path.d.ts +0 -159
- package/node_modules/jayson/node_modules/@types/node/perf_hooks.d.ts +0 -259
- package/node_modules/jayson/node_modules/@types/node/process.d.ts +0 -15
- package/node_modules/jayson/node_modules/@types/node/punycode.d.ts +0 -75
- package/node_modules/jayson/node_modules/@types/node/querystring.d.ts +0 -29
- package/node_modules/jayson/node_modules/@types/node/readline.d.ts +0 -158
- package/node_modules/jayson/node_modules/@types/node/repl.d.ts +0 -390
- package/node_modules/jayson/node_modules/@types/node/stream.d.ts +0 -334
- package/node_modules/jayson/node_modules/@types/node/string_decoder.d.ts +0 -7
- package/node_modules/jayson/node_modules/@types/node/timers.d.ts +0 -16
- package/node_modules/jayson/node_modules/@types/node/tls.d.ts +0 -713
- package/node_modules/jayson/node_modules/@types/node/trace_events.d.ts +0 -61
- package/node_modules/jayson/node_modules/@types/node/tty.d.ts +0 -66
- package/node_modules/jayson/node_modules/@types/node/url.d.ts +0 -147
- package/node_modules/jayson/node_modules/@types/node/util.d.ts +0 -200
- package/node_modules/jayson/node_modules/@types/node/v8.d.ts +0 -197
- package/node_modules/jayson/node_modules/@types/node/vm.d.ts +0 -112
- package/node_modules/jayson/node_modules/@types/node/wasi.d.ts +0 -55
- package/node_modules/jayson/node_modules/@types/node/worker_threads.d.ts +0 -207
- package/node_modules/jayson/node_modules/@types/node/zlib.d.ts +0 -356
- package/node_modules/jayson/package.json +0 -86
- package/node_modules/jayson/promise/index.d.ts +0 -367
- package/node_modules/jayson/promise/index.js +0 -3
- package/node_modules/jayson/promise/lib/client/browser/index.d.ts +0 -12
- package/node_modules/jayson/promise/lib/client/browser/index.js +0 -28
- package/node_modules/jayson/promise/lib/client/http.js +0 -23
- package/node_modules/jayson/promise/lib/client/https.js +0 -24
- package/node_modules/jayson/promise/lib/client/index.js +0 -53
- package/node_modules/jayson/promise/lib/client/tcp.js +0 -23
- package/node_modules/jayson/promise/lib/client/tls.js +0 -23
- package/node_modules/jayson/promise/lib/client/websocket.js +0 -23
- package/node_modules/jayson/promise/lib/index.js +0 -33
- package/node_modules/jayson/promise/lib/method.js +0 -54
- package/node_modules/jayson/promise/lib/server.js +0 -23
- package/node_modules/jayson/promise/lib/utils.js +0 -23
- package/node_modules/json-stringify-safe/.npmignore +0 -1
- package/node_modules/json-stringify-safe/CHANGELOG.md +0 -14
- package/node_modules/json-stringify-safe/LICENSE +0 -15
- package/node_modules/json-stringify-safe/Makefile +0 -35
- package/node_modules/json-stringify-safe/README.md +0 -52
- package/node_modules/json-stringify-safe/package.json +0 -31
- package/node_modules/json-stringify-safe/stringify.js +0 -27
- package/node_modules/json-stringify-safe/test/mocha.opts +0 -2
- package/node_modules/json-stringify-safe/test/stringify_test.js +0 -246
- package/node_modules/jsonparse/.npmignore +0 -1
- package/node_modules/jsonparse/LICENSE +0 -24
- package/node_modules/jsonparse/README.markdown +0 -11
- package/node_modules/jsonparse/bench.js +0 -26
- package/node_modules/jsonparse/examples/twitterfeed.js +0 -30
- package/node_modules/jsonparse/jsonparse.js +0 -413
- package/node_modules/jsonparse/package.json +0 -22
- package/node_modules/jsonparse/samplejson/basic.json +0 -167
- package/node_modules/jsonparse/samplejson/basic2.json +0 -180
- package/node_modules/jsonparse/test/big-token.js +0 -24
- package/node_modules/jsonparse/test/boundary.js +0 -110
- package/node_modules/jsonparse/test/offset.js +0 -67
- package/node_modules/jsonparse/test/primitives.js +0 -57
- package/node_modules/jsonparse/test/surrogate.js +0 -26
- package/node_modules/jsonparse/test/unvalid.js +0 -15
- package/node_modules/jsonparse/test/utf8.js +0 -38
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/node-fetch/LICENSE.md +0 -22
- package/node_modules/node-fetch/README.md +0 -634
- package/node_modules/node-fetch/browser.js +0 -25
- package/node_modules/node-fetch/lib/index.es.js +0 -1777
- package/node_modules/node-fetch/lib/index.js +0 -1787
- package/node_modules/node-fetch/lib/index.mjs +0 -1775
- package/node_modules/node-fetch/package.json +0 -89
- package/node_modules/node-gyp-build/LICENSE +0 -21
- package/node_modules/node-gyp-build/README.md +0 -58
- package/node_modules/node-gyp-build/SECURITY.md +0 -5
- package/node_modules/node-gyp-build/bin.js +0 -84
- package/node_modules/node-gyp-build/build-test.js +0 -19
- package/node_modules/node-gyp-build/index.js +0 -6
- package/node_modules/node-gyp-build/node-gyp-build.js +0 -207
- package/node_modules/node-gyp-build/optional.js +0 -7
- package/node_modules/node-gyp-build/package.json +0 -43
- package/node_modules/pako/LICENSE +0 -21
- package/node_modules/pako/README.md +0 -177
- package/node_modules/pako/dist/pako.es5.js +0 -6688
- package/node_modules/pako/dist/pako.es5.min.js +0 -2
- package/node_modules/pako/dist/pako.esm.mjs +0 -6877
- package/node_modules/pako/dist/pako.js +0 -6896
- package/node_modules/pako/dist/pako.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.es5.js +0 -3924
- package/node_modules/pako/dist/pako_deflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.js +0 -4126
- package/node_modules/pako/dist/pako_deflate.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.es5.js +0 -3229
- package/node_modules/pako/dist/pako_inflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.js +0 -3239
- package/node_modules/pako/dist/pako_inflate.min.js +0 -2
- package/node_modules/pako/index.js +0 -18
- package/node_modules/pako/lib/deflate.js +0 -380
- package/node_modules/pako/lib/inflate.js +0 -419
- package/node_modules/pako/lib/utils/common.js +0 -48
- package/node_modules/pako/lib/utils/strings.js +0 -174
- package/node_modules/pako/lib/zlib/README +0 -59
- package/node_modules/pako/lib/zlib/adler32.js +0 -51
- package/node_modules/pako/lib/zlib/constants.js +0 -68
- package/node_modules/pako/lib/zlib/crc32.js +0 -59
- package/node_modules/pako/lib/zlib/deflate.js +0 -2048
- package/node_modules/pako/lib/zlib/gzheader.js +0 -58
- package/node_modules/pako/lib/zlib/inffast.js +0 -344
- package/node_modules/pako/lib/zlib/inflate.js +0 -1572
- package/node_modules/pako/lib/zlib/inftrees.js +0 -340
- package/node_modules/pako/lib/zlib/messages.js +0 -32
- package/node_modules/pako/lib/zlib/trees.js +0 -1179
- package/node_modules/pako/lib/zlib/zstream.js +0 -47
- package/node_modules/pako/package.json +0 -64
- package/node_modules/regenerator-runtime/LICENSE +0 -21
- package/node_modules/regenerator-runtime/README.md +0 -31
- package/node_modules/regenerator-runtime/package.json +0 -19
- package/node_modules/regenerator-runtime/path.js +0 -11
- package/node_modules/regenerator-runtime/runtime.js +0 -761
- package/node_modules/rpc-websockets/LICENSE +0 -10
- package/node_modules/rpc-websockets/README.md +0 -156
- package/node_modules/rpc-websockets/dist/index.browser-bundle.js +0 -14
- package/node_modules/rpc-websockets/dist/index.browser.cjs +0 -389
- package/node_modules/rpc-websockets/dist/index.browser.cjs.map +0 -1
- package/node_modules/rpc-websockets/dist/index.browser.d.mts +0 -225
- package/node_modules/rpc-websockets/dist/index.browser.d.ts +0 -225
- package/node_modules/rpc-websockets/dist/index.browser.mjs +0 -384
- package/node_modules/rpc-websockets/dist/index.browser.mjs.map +0 -1
- package/node_modules/rpc-websockets/dist/index.cjs +0 -898
- package/node_modules/rpc-websockets/dist/index.cjs.map +0 -1
- package/node_modules/rpc-websockets/dist/index.d.mts +0 -415
- package/node_modules/rpc-websockets/dist/index.d.ts +0 -415
- package/node_modules/rpc-websockets/dist/index.mjs +0 -886
- package/node_modules/rpc-websockets/dist/index.mjs.map +0 -1
- package/node_modules/rpc-websockets/node_modules/@types/ws/LICENSE +0 -21
- package/node_modules/rpc-websockets/node_modules/@types/ws/README.md +0 -15
- package/node_modules/rpc-websockets/node_modules/@types/ws/index.d.mts +0 -451
- package/node_modules/rpc-websockets/node_modules/@types/ws/index.d.ts +0 -445
- package/node_modules/rpc-websockets/node_modules/@types/ws/package.json +0 -72
- package/node_modules/rpc-websockets/node_modules/eventemitter3/LICENSE +0 -21
- package/node_modules/rpc-websockets/node_modules/eventemitter3/README.md +0 -94
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -347
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -1
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -1
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -355
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -1
- package/node_modules/rpc-websockets/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -1
- package/node_modules/rpc-websockets/node_modules/eventemitter3/index.d.ts +0 -135
- package/node_modules/rpc-websockets/node_modules/eventemitter3/index.js +0 -336
- package/node_modules/rpc-websockets/node_modules/eventemitter3/index.mjs +0 -4
- package/node_modules/rpc-websockets/node_modules/eventemitter3/package.json +0 -67
- package/node_modules/rpc-websockets/node_modules/ws/LICENSE +0 -20
- package/node_modules/rpc-websockets/node_modules/ws/README.md +0 -548
- package/node_modules/rpc-websockets/node_modules/ws/browser.js +0 -8
- package/node_modules/rpc-websockets/node_modules/ws/index.js +0 -13
- package/node_modules/rpc-websockets/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/rpc-websockets/node_modules/ws/lib/constants.js +0 -18
- package/node_modules/rpc-websockets/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/rpc-websockets/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/rpc-websockets/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/rpc-websockets/node_modules/ws/lib/permessage-deflate.js +0 -514
- package/node_modules/rpc-websockets/node_modules/ws/lib/receiver.js +0 -706
- package/node_modules/rpc-websockets/node_modules/ws/lib/sender.js +0 -602
- package/node_modules/rpc-websockets/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/rpc-websockets/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/rpc-websockets/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/rpc-websockets/node_modules/ws/lib/websocket-server.js +0 -540
- package/node_modules/rpc-websockets/node_modules/ws/lib/websocket.js +0 -1388
- package/node_modules/rpc-websockets/node_modules/ws/package.json +0 -69
- package/node_modules/rpc-websockets/node_modules/ws/wrapper.mjs +0 -8
- package/node_modules/rpc-websockets/package.json +0 -90
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/superstruct/License.md +0 -9
- package/node_modules/superstruct/Readme.md +0 -228
- package/node_modules/superstruct/lib/coercions.d.ts +0 -19
- package/node_modules/superstruct/lib/coercions.d.ts.map +0 -1
- package/node_modules/superstruct/lib/error.d.ts +0 -32
- package/node_modules/superstruct/lib/error.d.ts.map +0 -1
- package/node_modules/superstruct/lib/index.cjs +0 -1257
- package/node_modules/superstruct/lib/index.cjs.d.ts +0 -579
- package/node_modules/superstruct/lib/index.cjs.map +0 -1
- package/node_modules/superstruct/lib/index.d.cts +0 -579
- package/node_modules/superstruct/lib/index.d.ts +0 -7
- package/node_modules/superstruct/lib/index.d.ts.map +0 -1
- package/node_modules/superstruct/lib/index.es.d.ts +0 -579
- package/node_modules/superstruct/lib/index.es.js +0 -1203
- package/node_modules/superstruct/lib/index.es.js.map +0 -1
- package/node_modules/superstruct/lib/refinements.d.ts +0 -19
- package/node_modules/superstruct/lib/refinements.d.ts.map +0 -1
- package/node_modules/superstruct/lib/struct.d.ts +0 -110
- package/node_modules/superstruct/lib/struct.d.ts.map +0 -1
- package/node_modules/superstruct/lib/structs/coercions.d.ts +0 -29
- package/node_modules/superstruct/lib/structs/coercions.d.ts.map +0 -1
- package/node_modules/superstruct/lib/structs/refinements.d.ts +0 -38
- package/node_modules/superstruct/lib/structs/refinements.d.ts.map +0 -1
- package/node_modules/superstruct/lib/structs/types.d.ts +0 -142
- package/node_modules/superstruct/lib/structs/types.d.ts.map +0 -1
- package/node_modules/superstruct/lib/structs/utilities.d.ts +0 -66
- package/node_modules/superstruct/lib/structs/utilities.d.ts.map +0 -1
- package/node_modules/superstruct/lib/types.d.ts +0 -200
- package/node_modules/superstruct/lib/types.d.ts.map +0 -1
- package/node_modules/superstruct/lib/typings.d.ts +0 -36
- package/node_modules/superstruct/lib/typings.d.ts.map +0 -1
- package/node_modules/superstruct/lib/utilities.d.ts +0 -56
- package/node_modules/superstruct/lib/utilities.d.ts.map +0 -1
- package/node_modules/superstruct/lib/utils.d.ts +0 -139
- package/node_modules/superstruct/lib/utils.d.ts.map +0 -1
- package/node_modules/superstruct/lib/xtras.d.ts +0 -56
- package/node_modules/superstruct/lib/xtras.d.ts.map +0 -1
- package/node_modules/superstruct/package.json +0 -110
- package/node_modules/superstruct/umd/coercions.d.ts +0 -18
- package/node_modules/superstruct/umd/index.d.ts +0 -4
- package/node_modules/superstruct/umd/refinements.d.ts +0 -14
- package/node_modules/superstruct/umd/struct.d.ts +0 -80
- package/node_modules/superstruct/umd/superstruct.d.ts +0 -579
- package/node_modules/superstruct/umd/superstruct.js +0 -1262
- package/node_modules/superstruct/umd/superstruct.min.d.ts +0 -579
- package/node_modules/superstruct/umd/superstruct.min.js +0 -1
- package/node_modules/superstruct/umd/types.d.ts +0 -127
- package/node_modules/superstruct/umd/utils.d.ts +0 -9
- package/node_modules/text-encoding-utf-8/LICENSE.md +0 -29
- package/node_modules/text-encoding-utf-8/README.md +0 -63
- package/node_modules/text-encoding-utf-8/lib/encoding.js +0 -655
- package/node_modules/text-encoding-utf-8/lib/encoding.lib.js +0 -642
- package/node_modules/text-encoding-utf-8/lib/encoding.lib.mjs +0 -665
- package/node_modules/text-encoding-utf-8/package.json +0 -26
- package/node_modules/text-encoding-utf-8/src/encoding.js +0 -665
- package/node_modules/text-encoding-utf-8/src/polyfill.js +0 -21
- package/node_modules/through/.travis.yml +0 -5
- package/node_modules/through/LICENSE.APACHE2 +0 -15
- package/node_modules/through/LICENSE.MIT +0 -24
- package/node_modules/through/index.js +0 -108
- package/node_modules/through/package.json +0 -36
- package/node_modules/through/readme.markdown +0 -64
- package/node_modules/through/test/async.js +0 -28
- package/node_modules/through/test/auto-destroy.js +0 -30
- package/node_modules/through/test/buffering.js +0 -71
- package/node_modules/through/test/end.js +0 -45
- package/node_modules/through/test/index.js +0 -133
- package/node_modules/toml/.jshintrc +0 -18
- package/node_modules/toml/.travis.yml +0 -7
- package/node_modules/toml/CHANGELOG.md +0 -116
- package/node_modules/toml/LICENSE +0 -22
- package/node_modules/toml/README.md +0 -93
- package/node_modules/toml/benchmark.js +0 -12
- package/node_modules/toml/index.d.ts +0 -3
- package/node_modules/toml/index.js +0 -9
- package/node_modules/toml/lib/compiler.js +0 -195
- package/node_modules/toml/lib/parser.js +0 -3841
- package/node_modules/toml/package.json +0 -24
- package/node_modules/toml/src/toml.pegjs +0 -231
- package/node_modules/toml/test/bad.toml +0 -5
- package/node_modules/toml/test/example.toml +0 -32
- package/node_modules/toml/test/hard_example.toml +0 -33
- package/node_modules/toml/test/inline_tables.toml +0 -10
- package/node_modules/toml/test/literal_strings.toml +0 -5
- package/node_modules/toml/test/multiline_eat_whitespace.toml +0 -15
- package/node_modules/toml/test/multiline_literal_strings.toml +0 -7
- package/node_modules/toml/test/multiline_strings.toml +0 -6
- package/node_modules/toml/test/smoke.js +0 -22
- package/node_modules/toml/test/table_arrays_easy.toml +0 -10
- package/node_modules/toml/test/table_arrays_hard.toml +0 -31
- package/node_modules/toml/test/test_toml.js +0 -596
- package/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/undici-types/README.md +0 -6
- package/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/undici-types/package.json +0 -55
- package/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/utf-8-validate/LICENSE +0 -30
- package/node_modules/utf-8-validate/README.md +0 -50
- package/node_modules/utf-8-validate/binding.gyp +0 -18
- package/node_modules/utf-8-validate/fallback.js +0 -62
- package/node_modules/utf-8-validate/index.js +0 -7
- package/node_modules/utf-8-validate/package.json +0 -36
- 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 +0 -109
- package/node_modules/uuid/CHANGELOG.md +0 -229
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -505
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/esm-browser/index.js +0 -9
- package/node_modules/uuid/dist/esm-browser/md5.js +0 -215
- package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/node_modules/uuid/dist/esm-browser/parse.js +0 -35
- package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +0 -19
- package/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
- package/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
- package/node_modules/uuid/dist/esm-browser/v1.js +0 -95
- package/node_modules/uuid/dist/esm-browser/v3.js +0 -4
- package/node_modules/uuid/dist/esm-browser/v35.js +0 -64
- package/node_modules/uuid/dist/esm-browser/v4.js +0 -24
- package/node_modules/uuid/dist/esm-browser/v5.js +0 -4
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -7
- package/node_modules/uuid/dist/esm-browser/version.js +0 -11
- package/node_modules/uuid/dist/esm-node/index.js +0 -9
- package/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -29
- package/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -64
- package/node_modules/uuid/dist/esm-node/v4.js +0 -24
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/node_modules/uuid/dist/index.js +0 -79
- package/node_modules/uuid/dist/md5-browser.js +0 -223
- package/node_modules/uuid/dist/md5.js +0 -23
- package/node_modules/uuid/dist/nil.js +0 -8
- package/node_modules/uuid/dist/parse.js +0 -45
- package/node_modules/uuid/dist/regex.js +0 -8
- package/node_modules/uuid/dist/rng-browser.js +0 -26
- package/node_modules/uuid/dist/rng.js +0 -24
- package/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/node_modules/uuid/dist/sha1.js +0 -23
- package/node_modules/uuid/dist/stringify.js +0 -39
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- package/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/node_modules/uuid/dist/v1.js +0 -107
- package/node_modules/uuid/dist/v3.js +0 -16
- package/node_modules/uuid/dist/v35.js +0 -78
- package/node_modules/uuid/dist/v4.js +0 -37
- package/node_modules/uuid/dist/v5.js +0 -16
- package/node_modules/uuid/dist/validate.js +0 -17
- package/node_modules/uuid/dist/version.js +0 -21
- package/node_modules/uuid/package.json +0 -135
- package/node_modules/uuid/wrapper.mjs +0 -10
- package/node_modules/webidl-conversions/LICENSE.md +0 -12
- package/node_modules/webidl-conversions/README.md +0 -53
- package/node_modules/webidl-conversions/lib/index.js +0 -189
- package/node_modules/webidl-conversions/package.json +0 -23
- package/node_modules/whatwg-url/LICENSE.txt +0 -21
- package/node_modules/whatwg-url/README.md +0 -67
- package/node_modules/whatwg-url/lib/URL-impl.js +0 -200
- package/node_modules/whatwg-url/lib/URL.js +0 -196
- package/node_modules/whatwg-url/lib/public-api.js +0 -11
- package/node_modules/whatwg-url/lib/url-state-machine.js +0 -1297
- package/node_modules/whatwg-url/lib/utils.js +0 -20
- package/node_modules/whatwg-url/node_modules/tr46/.npmignore +0 -4
- package/node_modules/whatwg-url/node_modules/tr46/index.js +0 -193
- package/node_modules/whatwg-url/node_modules/tr46/lib/.gitkeep +0 -0
- package/node_modules/whatwg-url/node_modules/tr46/lib/mappingTable.json +0 -1
- package/node_modules/whatwg-url/node_modules/tr46/package.json +0 -31
- package/node_modules/whatwg-url/package.json +0 -32
- package/node_modules/ws/LICENSE +0 -21
- package/node_modules/ws/README.md +0 -495
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -10
- package/node_modules/ws/lib/buffer-util.js +0 -129
- package/node_modules/ws/lib/constants.js +0 -10
- package/node_modules/ws/lib/event-target.js +0 -184
- package/node_modules/ws/lib/extension.js +0 -223
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -518
- package/node_modules/ws/lib/receiver.js +0 -607
- package/node_modules/ws/lib/sender.js +0 -409
- package/node_modules/ws/lib/stream.js +0 -180
- package/node_modules/ws/lib/validation.js +0 -104
- package/node_modules/ws/lib/websocket-server.js +0 -449
- package/node_modules/ws/lib/websocket.js +0 -1197
- package/node_modules/ws/package.json +0 -56
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __pow = Math.pow;
|
|
2
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
3
|
return new Promise((resolve, reject) => {
|
|
3
4
|
var fulfilled = (value) => {
|
|
4
5
|
try {
|
|
@@ -21,20 +22,15 @@
|
|
|
21
22
|
|
|
22
23
|
// src/CpAmm.ts
|
|
23
24
|
var _anchor = require('@coral-xyz/anchor');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
25
|
var _spltoken = require('@solana/spl-token');
|
|
29
26
|
var _invariant = require('invariant'); var _invariant2 = _interopRequireDefault(_invariant);
|
|
30
|
-
var _decimaljs = require('decimal.js'); var _decimaljs2 = _interopRequireDefault(_decimaljs);
|
|
31
27
|
|
|
32
28
|
// src/idl/cp_amm.json
|
|
33
29
|
var cp_amm_default = {
|
|
34
30
|
address: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG",
|
|
35
31
|
metadata: {
|
|
36
32
|
name: "cp_amm",
|
|
37
|
-
version: "0.1.
|
|
33
|
+
version: "0.1.1",
|
|
38
34
|
spec: "0.1.0",
|
|
39
35
|
description: "Created with Anchor"
|
|
40
36
|
},
|
|
@@ -595,38 +591,38 @@ var cp_amm_default = {
|
|
|
595
591
|
{
|
|
596
592
|
kind: "const",
|
|
597
593
|
value: [
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
594
|
+
48,
|
|
595
|
+
9,
|
|
596
|
+
89,
|
|
597
|
+
123,
|
|
598
|
+
106,
|
|
599
|
+
114,
|
|
600
|
+
131,
|
|
601
|
+
251,
|
|
602
|
+
50,
|
|
605
603
|
173,
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
161,
|
|
615
|
-
33,
|
|
604
|
+
254,
|
|
605
|
+
250,
|
|
606
|
+
10,
|
|
607
|
+
80,
|
|
608
|
+
160,
|
|
609
|
+
84,
|
|
610
|
+
143,
|
|
611
|
+
100,
|
|
616
612
|
81,
|
|
617
|
-
|
|
613
|
+
249,
|
|
614
|
+
134,
|
|
615
|
+
112,
|
|
616
|
+
30,
|
|
617
|
+
213,
|
|
618
|
+
50,
|
|
618
619
|
166,
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
68,
|
|
626
|
-
162,
|
|
627
|
-
70,
|
|
628
|
-
126,
|
|
629
|
-
100
|
|
620
|
+
239,
|
|
621
|
+
78,
|
|
622
|
+
53,
|
|
623
|
+
175,
|
|
624
|
+
188,
|
|
625
|
+
85
|
|
630
626
|
]
|
|
631
627
|
},
|
|
632
628
|
{
|
|
@@ -688,38 +684,38 @@ var cp_amm_default = {
|
|
|
688
684
|
{
|
|
689
685
|
kind: "const",
|
|
690
686
|
value: [
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
687
|
+
48,
|
|
688
|
+
9,
|
|
689
|
+
89,
|
|
690
|
+
123,
|
|
691
|
+
106,
|
|
692
|
+
114,
|
|
693
|
+
131,
|
|
694
|
+
251,
|
|
695
|
+
50,
|
|
698
696
|
173,
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
161,
|
|
708
|
-
33,
|
|
697
|
+
254,
|
|
698
|
+
250,
|
|
699
|
+
10,
|
|
700
|
+
80,
|
|
701
|
+
160,
|
|
702
|
+
84,
|
|
703
|
+
143,
|
|
704
|
+
100,
|
|
709
705
|
81,
|
|
710
|
-
|
|
706
|
+
249,
|
|
707
|
+
134,
|
|
708
|
+
112,
|
|
709
|
+
30,
|
|
710
|
+
213,
|
|
711
|
+
50,
|
|
711
712
|
166,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
68,
|
|
719
|
-
162,
|
|
720
|
-
70,
|
|
721
|
-
126,
|
|
722
|
-
100
|
|
713
|
+
239,
|
|
714
|
+
78,
|
|
715
|
+
53,
|
|
716
|
+
175,
|
|
717
|
+
188,
|
|
718
|
+
85
|
|
723
719
|
]
|
|
724
720
|
},
|
|
725
721
|
{
|
|
@@ -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,
|
|
@@ -1196,7 +1309,100 @@ var cp_amm_default = {
|
|
|
1196
1309
|
},
|
|
1197
1310
|
{
|
|
1198
1311
|
kind: "arg",
|
|
1199
|
-
path: "
|
|
1312
|
+
path: "index"
|
|
1313
|
+
}
|
|
1314
|
+
]
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
name: "admin",
|
|
1319
|
+
writable: true,
|
|
1320
|
+
signer: true
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
name: "system_program",
|
|
1324
|
+
address: "11111111111111111111111111111111"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
name: "event_authority",
|
|
1328
|
+
pda: {
|
|
1329
|
+
seeds: [
|
|
1330
|
+
{
|
|
1331
|
+
kind: "const",
|
|
1332
|
+
value: [
|
|
1333
|
+
95,
|
|
1334
|
+
95,
|
|
1335
|
+
101,
|
|
1336
|
+
118,
|
|
1337
|
+
101,
|
|
1338
|
+
110,
|
|
1339
|
+
116,
|
|
1340
|
+
95,
|
|
1341
|
+
97,
|
|
1342
|
+
117,
|
|
1343
|
+
116,
|
|
1344
|
+
104,
|
|
1345
|
+
111,
|
|
1346
|
+
114,
|
|
1347
|
+
105,
|
|
1348
|
+
116,
|
|
1349
|
+
121
|
|
1350
|
+
]
|
|
1351
|
+
}
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
name: "program"
|
|
1357
|
+
}
|
|
1358
|
+
],
|
|
1359
|
+
args: [
|
|
1360
|
+
{
|
|
1361
|
+
name: "index",
|
|
1362
|
+
type: "u64"
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
name: "config_parameters",
|
|
1366
|
+
type: {
|
|
1367
|
+
defined: {
|
|
1368
|
+
name: "StaticConfigParameters"
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
name: "create_dynamic_config",
|
|
1376
|
+
discriminator: [
|
|
1377
|
+
81,
|
|
1378
|
+
251,
|
|
1379
|
+
122,
|
|
1380
|
+
78,
|
|
1381
|
+
66,
|
|
1382
|
+
57,
|
|
1383
|
+
208,
|
|
1384
|
+
82
|
|
1385
|
+
],
|
|
1386
|
+
accounts: [
|
|
1387
|
+
{
|
|
1388
|
+
name: "config",
|
|
1389
|
+
writable: true,
|
|
1390
|
+
pda: {
|
|
1391
|
+
seeds: [
|
|
1392
|
+
{
|
|
1393
|
+
kind: "const",
|
|
1394
|
+
value: [
|
|
1395
|
+
99,
|
|
1396
|
+
111,
|
|
1397
|
+
110,
|
|
1398
|
+
102,
|
|
1399
|
+
105,
|
|
1400
|
+
103
|
|
1401
|
+
]
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
kind: "arg",
|
|
1405
|
+
path: "index"
|
|
1200
1406
|
}
|
|
1201
1407
|
]
|
|
1202
1408
|
}
|
|
@@ -1244,11 +1450,15 @@ var cp_amm_default = {
|
|
|
1244
1450
|
}
|
|
1245
1451
|
],
|
|
1246
1452
|
args: [
|
|
1453
|
+
{
|
|
1454
|
+
name: "index",
|
|
1455
|
+
type: "u64"
|
|
1456
|
+
},
|
|
1247
1457
|
{
|
|
1248
1458
|
name: "config_parameters",
|
|
1249
1459
|
type: {
|
|
1250
1460
|
defined: {
|
|
1251
|
-
name: "
|
|
1461
|
+
name: "DynamicConfigParameters"
|
|
1252
1462
|
}
|
|
1253
1463
|
}
|
|
1254
1464
|
}
|
|
@@ -2194,20 +2404,92 @@ var cp_amm_default = {
|
|
|
2194
2404
|
]
|
|
2195
2405
|
},
|
|
2196
2406
|
{
|
|
2197
|
-
name: "
|
|
2407
|
+
name: "initialize_pool_with_dynamic_config",
|
|
2198
2408
|
discriminator: [
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2409
|
+
149,
|
|
2410
|
+
82,
|
|
2411
|
+
72,
|
|
2412
|
+
197,
|
|
2413
|
+
253,
|
|
2414
|
+
252,
|
|
2415
|
+
68,
|
|
2416
|
+
15
|
|
2207
2417
|
],
|
|
2208
2418
|
accounts: [
|
|
2209
2419
|
{
|
|
2210
|
-
name: "
|
|
2420
|
+
name: "creator"
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
name: "position_nft_mint",
|
|
2424
|
+
docs: [
|
|
2425
|
+
"position_nft_mint"
|
|
2426
|
+
],
|
|
2427
|
+
writable: true,
|
|
2428
|
+
signer: true
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
name: "position_nft_account",
|
|
2432
|
+
docs: [
|
|
2433
|
+
"position nft account"
|
|
2434
|
+
],
|
|
2435
|
+
writable: true,
|
|
2436
|
+
pda: {
|
|
2437
|
+
seeds: [
|
|
2438
|
+
{
|
|
2439
|
+
kind: "const",
|
|
2440
|
+
value: [
|
|
2441
|
+
112,
|
|
2442
|
+
111,
|
|
2443
|
+
115,
|
|
2444
|
+
105,
|
|
2445
|
+
116,
|
|
2446
|
+
105,
|
|
2447
|
+
111,
|
|
2448
|
+
110,
|
|
2449
|
+
95,
|
|
2450
|
+
110,
|
|
2451
|
+
102,
|
|
2452
|
+
116,
|
|
2453
|
+
95,
|
|
2454
|
+
97,
|
|
2455
|
+
99,
|
|
2456
|
+
99,
|
|
2457
|
+
111,
|
|
2458
|
+
117,
|
|
2459
|
+
110,
|
|
2460
|
+
116
|
|
2461
|
+
]
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
kind: "account",
|
|
2465
|
+
path: "position_nft_mint"
|
|
2466
|
+
}
|
|
2467
|
+
]
|
|
2468
|
+
}
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
name: "payer",
|
|
2472
|
+
docs: [
|
|
2473
|
+
"Address paying to create the pool. Can be anyone"
|
|
2474
|
+
],
|
|
2475
|
+
writable: true,
|
|
2476
|
+
signer: true
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
name: "pool_creator_authority",
|
|
2480
|
+
signer: true,
|
|
2481
|
+
relations: [
|
|
2482
|
+
"config"
|
|
2483
|
+
]
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
name: "config",
|
|
2487
|
+
docs: [
|
|
2488
|
+
"Which config the pool belongs to."
|
|
2489
|
+
]
|
|
2490
|
+
},
|
|
2491
|
+
{
|
|
2492
|
+
name: "pool_authority",
|
|
2211
2493
|
pda: {
|
|
2212
2494
|
seeds: [
|
|
2213
2495
|
{
|
|
@@ -2234,22 +2516,64 @@ var cp_amm_default = {
|
|
|
2234
2516
|
},
|
|
2235
2517
|
{
|
|
2236
2518
|
name: "pool",
|
|
2519
|
+
docs: [
|
|
2520
|
+
"Initialize an account to store the pool state"
|
|
2521
|
+
],
|
|
2237
2522
|
writable: true
|
|
2238
2523
|
},
|
|
2239
2524
|
{
|
|
2240
|
-
name: "
|
|
2525
|
+
name: "position",
|
|
2241
2526
|
writable: true,
|
|
2242
2527
|
pda: {
|
|
2243
2528
|
seeds: [
|
|
2244
2529
|
{
|
|
2245
2530
|
kind: "const",
|
|
2246
2531
|
value: [
|
|
2247
|
-
|
|
2532
|
+
112,
|
|
2533
|
+
111,
|
|
2534
|
+
115,
|
|
2535
|
+
105,
|
|
2536
|
+
116,
|
|
2537
|
+
105,
|
|
2538
|
+
111,
|
|
2539
|
+
110
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
kind: "account",
|
|
2544
|
+
path: "position_nft_mint"
|
|
2545
|
+
}
|
|
2546
|
+
]
|
|
2547
|
+
}
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
name: "token_a_mint",
|
|
2551
|
+
docs: [
|
|
2552
|
+
"Token a mint"
|
|
2553
|
+
]
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
name: "token_b_mint",
|
|
2557
|
+
docs: [
|
|
2558
|
+
"Token b mint"
|
|
2559
|
+
]
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
name: "token_a_vault",
|
|
2563
|
+
docs: [
|
|
2564
|
+
"Token a vault for the pool"
|
|
2565
|
+
],
|
|
2566
|
+
writable: true,
|
|
2567
|
+
pda: {
|
|
2568
|
+
seeds: [
|
|
2569
|
+
{
|
|
2570
|
+
kind: "const",
|
|
2571
|
+
value: [
|
|
2572
|
+
116,
|
|
2573
|
+
111,
|
|
2574
|
+
107,
|
|
2248
2575
|
101,
|
|
2249
|
-
|
|
2250
|
-
97,
|
|
2251
|
-
114,
|
|
2252
|
-
100,
|
|
2576
|
+
110,
|
|
2253
2577
|
95,
|
|
2254
2578
|
118,
|
|
2255
2579
|
97,
|
|
@@ -2260,123 +2584,82 @@ var cp_amm_default = {
|
|
|
2260
2584
|
},
|
|
2261
2585
|
{
|
|
2262
2586
|
kind: "account",
|
|
2263
|
-
path: "
|
|
2587
|
+
path: "token_a_mint"
|
|
2264
2588
|
},
|
|
2265
2589
|
{
|
|
2266
|
-
kind: "
|
|
2267
|
-
path: "
|
|
2590
|
+
kind: "account",
|
|
2591
|
+
path: "pool"
|
|
2268
2592
|
}
|
|
2269
2593
|
]
|
|
2270
2594
|
}
|
|
2271
2595
|
},
|
|
2272
2596
|
{
|
|
2273
|
-
name: "
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2597
|
+
name: "token_b_vault",
|
|
2598
|
+
docs: [
|
|
2599
|
+
"Token b vault for the pool"
|
|
2600
|
+
],
|
|
2277
2601
|
writable: true,
|
|
2278
|
-
signer: true
|
|
2279
|
-
},
|
|
2280
|
-
{
|
|
2281
|
-
name: "token_program"
|
|
2282
|
-
},
|
|
2283
|
-
{
|
|
2284
|
-
name: "system_program",
|
|
2285
|
-
address: "11111111111111111111111111111111"
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
name: "event_authority",
|
|
2289
2602
|
pda: {
|
|
2290
2603
|
seeds: [
|
|
2291
2604
|
{
|
|
2292
2605
|
kind: "const",
|
|
2293
2606
|
value: [
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
118,
|
|
2607
|
+
116,
|
|
2608
|
+
111,
|
|
2609
|
+
107,
|
|
2298
2610
|
101,
|
|
2299
2611
|
110,
|
|
2300
|
-
116,
|
|
2301
2612
|
95,
|
|
2613
|
+
118,
|
|
2302
2614
|
97,
|
|
2303
2615
|
117,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
111,
|
|
2307
|
-
114,
|
|
2308
|
-
105,
|
|
2309
|
-
116,
|
|
2310
|
-
121
|
|
2616
|
+
108,
|
|
2617
|
+
116
|
|
2311
2618
|
]
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
kind: "account",
|
|
2622
|
+
path: "token_b_mint"
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
kind: "account",
|
|
2626
|
+
path: "pool"
|
|
2312
2627
|
}
|
|
2313
2628
|
]
|
|
2314
2629
|
}
|
|
2315
2630
|
},
|
|
2316
2631
|
{
|
|
2317
|
-
name: "
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
name: "reward_index",
|
|
2323
|
-
type: "u8"
|
|
2324
|
-
},
|
|
2325
|
-
{
|
|
2326
|
-
name: "reward_duration",
|
|
2327
|
-
type: "u64"
|
|
2328
|
-
},
|
|
2329
|
-
{
|
|
2330
|
-
name: "funder",
|
|
2331
|
-
type: "pubkey"
|
|
2332
|
-
}
|
|
2333
|
-
]
|
|
2334
|
-
},
|
|
2335
|
-
{
|
|
2336
|
-
name: "lock_position",
|
|
2337
|
-
discriminator: [
|
|
2338
|
-
227,
|
|
2339
|
-
62,
|
|
2340
|
-
2,
|
|
2341
|
-
252,
|
|
2342
|
-
247,
|
|
2343
|
-
10,
|
|
2344
|
-
171,
|
|
2345
|
-
185
|
|
2346
|
-
],
|
|
2347
|
-
accounts: [
|
|
2348
|
-
{
|
|
2349
|
-
name: "pool",
|
|
2350
|
-
relations: [
|
|
2351
|
-
"position"
|
|
2352
|
-
]
|
|
2632
|
+
name: "payer_token_a",
|
|
2633
|
+
docs: [
|
|
2634
|
+
"payer token a account"
|
|
2635
|
+
],
|
|
2636
|
+
writable: true
|
|
2353
2637
|
},
|
|
2354
2638
|
{
|
|
2355
|
-
name: "
|
|
2639
|
+
name: "payer_token_b",
|
|
2640
|
+
docs: [
|
|
2641
|
+
"creator token b account"
|
|
2642
|
+
],
|
|
2356
2643
|
writable: true
|
|
2357
2644
|
},
|
|
2358
2645
|
{
|
|
2359
|
-
name: "
|
|
2360
|
-
|
|
2361
|
-
|
|
2646
|
+
name: "token_a_program",
|
|
2647
|
+
docs: [
|
|
2648
|
+
"Program to create mint account and mint tokens"
|
|
2649
|
+
]
|
|
2362
2650
|
},
|
|
2363
2651
|
{
|
|
2364
|
-
name: "
|
|
2652
|
+
name: "token_b_program",
|
|
2365
2653
|
docs: [
|
|
2366
|
-
"
|
|
2654
|
+
"Program to create mint account and mint tokens"
|
|
2367
2655
|
]
|
|
2368
2656
|
},
|
|
2369
2657
|
{
|
|
2370
|
-
name: "
|
|
2658
|
+
name: "token_2022_program",
|
|
2371
2659
|
docs: [
|
|
2372
|
-
"
|
|
2660
|
+
"Program to create NFT mint/token account and transfer for token22 account"
|
|
2373
2661
|
],
|
|
2374
|
-
|
|
2375
|
-
},
|
|
2376
|
-
{
|
|
2377
|
-
name: "payer",
|
|
2378
|
-
writable: true,
|
|
2379
|
-
signer: true
|
|
2662
|
+
address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
2380
2663
|
},
|
|
2381
2664
|
{
|
|
2382
2665
|
name: "system_program",
|
|
@@ -2420,34 +2703,267 @@ var cp_amm_default = {
|
|
|
2420
2703
|
name: "params",
|
|
2421
2704
|
type: {
|
|
2422
2705
|
defined: {
|
|
2423
|
-
name: "
|
|
2706
|
+
name: "InitializeCustomizablePoolParameters"
|
|
2424
2707
|
}
|
|
2425
2708
|
}
|
|
2426
2709
|
}
|
|
2427
2710
|
]
|
|
2428
2711
|
},
|
|
2429
2712
|
{
|
|
2430
|
-
name: "
|
|
2713
|
+
name: "initialize_reward",
|
|
2431
2714
|
discriminator: [
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2715
|
+
95,
|
|
2716
|
+
135,
|
|
2717
|
+
192,
|
|
2718
|
+
196,
|
|
2719
|
+
242,
|
|
2720
|
+
129,
|
|
2721
|
+
230,
|
|
2722
|
+
68
|
|
2440
2723
|
],
|
|
2441
2724
|
accounts: [
|
|
2442
2725
|
{
|
|
2443
|
-
name: "
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2726
|
+
name: "pool_authority",
|
|
2727
|
+
pda: {
|
|
2728
|
+
seeds: [
|
|
2729
|
+
{
|
|
2730
|
+
kind: "const",
|
|
2731
|
+
value: [
|
|
2732
|
+
112,
|
|
2733
|
+
111,
|
|
2734
|
+
111,
|
|
2735
|
+
108,
|
|
2736
|
+
95,
|
|
2737
|
+
97,
|
|
2738
|
+
117,
|
|
2739
|
+
116,
|
|
2740
|
+
104,
|
|
2741
|
+
111,
|
|
2742
|
+
114,
|
|
2743
|
+
105,
|
|
2744
|
+
116,
|
|
2745
|
+
121
|
|
2746
|
+
]
|
|
2747
|
+
}
|
|
2748
|
+
]
|
|
2749
|
+
}
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
name: "pool",
|
|
2753
|
+
writable: true
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
name: "reward_vault",
|
|
2757
|
+
writable: true,
|
|
2758
|
+
pda: {
|
|
2759
|
+
seeds: [
|
|
2760
|
+
{
|
|
2761
|
+
kind: "const",
|
|
2762
|
+
value: [
|
|
2763
|
+
114,
|
|
2764
|
+
101,
|
|
2765
|
+
119,
|
|
2766
|
+
97,
|
|
2767
|
+
114,
|
|
2768
|
+
100,
|
|
2769
|
+
95,
|
|
2770
|
+
118,
|
|
2771
|
+
97,
|
|
2772
|
+
117,
|
|
2773
|
+
108,
|
|
2774
|
+
116
|
|
2775
|
+
]
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
kind: "account",
|
|
2779
|
+
path: "pool"
|
|
2780
|
+
},
|
|
2781
|
+
{
|
|
2782
|
+
kind: "arg",
|
|
2783
|
+
path: "reward_index"
|
|
2784
|
+
}
|
|
2785
|
+
]
|
|
2786
|
+
}
|
|
2787
|
+
},
|
|
2788
|
+
{
|
|
2789
|
+
name: "reward_mint"
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
name: "admin",
|
|
2793
|
+
writable: true,
|
|
2794
|
+
signer: true
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
name: "token_program"
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
name: "system_program",
|
|
2801
|
+
address: "11111111111111111111111111111111"
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
name: "event_authority",
|
|
2805
|
+
pda: {
|
|
2806
|
+
seeds: [
|
|
2807
|
+
{
|
|
2808
|
+
kind: "const",
|
|
2809
|
+
value: [
|
|
2810
|
+
95,
|
|
2811
|
+
95,
|
|
2812
|
+
101,
|
|
2813
|
+
118,
|
|
2814
|
+
101,
|
|
2815
|
+
110,
|
|
2816
|
+
116,
|
|
2817
|
+
95,
|
|
2818
|
+
97,
|
|
2819
|
+
117,
|
|
2820
|
+
116,
|
|
2821
|
+
104,
|
|
2822
|
+
111,
|
|
2823
|
+
114,
|
|
2824
|
+
105,
|
|
2825
|
+
116,
|
|
2826
|
+
121
|
|
2827
|
+
]
|
|
2828
|
+
}
|
|
2829
|
+
]
|
|
2830
|
+
}
|
|
2831
|
+
},
|
|
2832
|
+
{
|
|
2833
|
+
name: "program"
|
|
2834
|
+
}
|
|
2835
|
+
],
|
|
2836
|
+
args: [
|
|
2837
|
+
{
|
|
2838
|
+
name: "reward_index",
|
|
2839
|
+
type: "u8"
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
name: "reward_duration",
|
|
2843
|
+
type: "u64"
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
name: "funder",
|
|
2847
|
+
type: "pubkey"
|
|
2848
|
+
}
|
|
2849
|
+
]
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
name: "lock_position",
|
|
2853
|
+
discriminator: [
|
|
2854
|
+
227,
|
|
2855
|
+
62,
|
|
2856
|
+
2,
|
|
2857
|
+
252,
|
|
2858
|
+
247,
|
|
2859
|
+
10,
|
|
2860
|
+
171,
|
|
2861
|
+
185
|
|
2862
|
+
],
|
|
2863
|
+
accounts: [
|
|
2864
|
+
{
|
|
2865
|
+
name: "pool",
|
|
2866
|
+
relations: [
|
|
2867
|
+
"position"
|
|
2868
|
+
]
|
|
2869
|
+
},
|
|
2870
|
+
{
|
|
2871
|
+
name: "position",
|
|
2872
|
+
writable: true
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
name: "vesting",
|
|
2876
|
+
writable: true,
|
|
2877
|
+
signer: true
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
name: "position_nft_account",
|
|
2881
|
+
docs: [
|
|
2882
|
+
"The token account for nft"
|
|
2883
|
+
]
|
|
2884
|
+
},
|
|
2885
|
+
{
|
|
2886
|
+
name: "owner",
|
|
2887
|
+
docs: [
|
|
2888
|
+
"owner of position"
|
|
2889
|
+
],
|
|
2890
|
+
signer: true
|
|
2891
|
+
},
|
|
2892
|
+
{
|
|
2893
|
+
name: "payer",
|
|
2894
|
+
writable: true,
|
|
2895
|
+
signer: true
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
name: "system_program",
|
|
2899
|
+
address: "11111111111111111111111111111111"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
name: "event_authority",
|
|
2903
|
+
pda: {
|
|
2904
|
+
seeds: [
|
|
2905
|
+
{
|
|
2906
|
+
kind: "const",
|
|
2907
|
+
value: [
|
|
2908
|
+
95,
|
|
2909
|
+
95,
|
|
2910
|
+
101,
|
|
2911
|
+
118,
|
|
2912
|
+
101,
|
|
2913
|
+
110,
|
|
2914
|
+
116,
|
|
2915
|
+
95,
|
|
2916
|
+
97,
|
|
2917
|
+
117,
|
|
2918
|
+
116,
|
|
2919
|
+
104,
|
|
2920
|
+
111,
|
|
2921
|
+
114,
|
|
2922
|
+
105,
|
|
2923
|
+
116,
|
|
2924
|
+
121
|
|
2925
|
+
]
|
|
2926
|
+
}
|
|
2927
|
+
]
|
|
2928
|
+
}
|
|
2929
|
+
},
|
|
2930
|
+
{
|
|
2931
|
+
name: "program"
|
|
2932
|
+
}
|
|
2933
|
+
],
|
|
2934
|
+
args: [
|
|
2935
|
+
{
|
|
2936
|
+
name: "params",
|
|
2937
|
+
type: {
|
|
2938
|
+
defined: {
|
|
2939
|
+
name: "VestingParameters"
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
]
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
name: "permanent_lock_position",
|
|
2947
|
+
discriminator: [
|
|
2948
|
+
165,
|
|
2949
|
+
176,
|
|
2950
|
+
125,
|
|
2951
|
+
6,
|
|
2952
|
+
231,
|
|
2953
|
+
171,
|
|
2954
|
+
186,
|
|
2955
|
+
213
|
|
2956
|
+
],
|
|
2957
|
+
accounts: [
|
|
2958
|
+
{
|
|
2959
|
+
name: "pool",
|
|
2960
|
+
writable: true,
|
|
2961
|
+
relations: [
|
|
2962
|
+
"position"
|
|
2963
|
+
]
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
name: "position",
|
|
2451
2967
|
writable: true
|
|
2452
2968
|
},
|
|
2453
2969
|
{
|
|
@@ -3508,6 +4024,19 @@ var cp_amm_default = {
|
|
|
3508
4024
|
5
|
|
3509
4025
|
]
|
|
3510
4026
|
},
|
|
4027
|
+
{
|
|
4028
|
+
name: "EvtClosePosition",
|
|
4029
|
+
discriminator: [
|
|
4030
|
+
20,
|
|
4031
|
+
145,
|
|
4032
|
+
144,
|
|
4033
|
+
68,
|
|
4034
|
+
143,
|
|
4035
|
+
142,
|
|
4036
|
+
214,
|
|
4037
|
+
178
|
|
4038
|
+
]
|
|
4039
|
+
},
|
|
3511
4040
|
{
|
|
3512
4041
|
name: "EvtCreateClaimFeeOperator",
|
|
3513
4042
|
discriminator: [
|
|
@@ -3535,14 +4064,27 @@ var cp_amm_default = {
|
|
|
3535
4064
|
]
|
|
3536
4065
|
},
|
|
3537
4066
|
{
|
|
3538
|
-
name: "
|
|
4067
|
+
name: "EvtCreateDynamicConfig",
|
|
3539
4068
|
discriminator: [
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
4069
|
+
231,
|
|
4070
|
+
197,
|
|
4071
|
+
13,
|
|
4072
|
+
164,
|
|
4073
|
+
248,
|
|
4074
|
+
213,
|
|
4075
|
+
133,
|
|
4076
|
+
152
|
|
4077
|
+
]
|
|
4078
|
+
},
|
|
4079
|
+
{
|
|
4080
|
+
name: "EvtCreatePosition",
|
|
4081
|
+
discriminator: [
|
|
4082
|
+
156,
|
|
4083
|
+
15,
|
|
4084
|
+
119,
|
|
4085
|
+
198,
|
|
4086
|
+
29,
|
|
4087
|
+
181,
|
|
3546
4088
|
221,
|
|
3547
4089
|
55
|
|
3548
4090
|
]
|
|
@@ -3899,6 +4441,21 @@ var cp_amm_default = {
|
|
|
3899
4441
|
code: 6038,
|
|
3900
4442
|
name: "FeeInverseIsIncorrect",
|
|
3901
4443
|
msg: "Fee inverse is incorrect"
|
|
4444
|
+
},
|
|
4445
|
+
{
|
|
4446
|
+
code: 6039,
|
|
4447
|
+
name: "PositionIsNotEmpty",
|
|
4448
|
+
msg: "Position is not empty"
|
|
4449
|
+
},
|
|
4450
|
+
{
|
|
4451
|
+
code: 6040,
|
|
4452
|
+
name: "InvalidPoolCreatorAuthority",
|
|
4453
|
+
msg: "Invalid pool creator authority"
|
|
4454
|
+
},
|
|
4455
|
+
{
|
|
4456
|
+
code: 6041,
|
|
4457
|
+
name: "InvalidConfigType",
|
|
4458
|
+
msg: "Invalid config type"
|
|
3902
4459
|
}
|
|
3903
4460
|
],
|
|
3904
4461
|
types: [
|
|
@@ -4127,6 +4684,13 @@ var cp_amm_default = {
|
|
|
4127
4684
|
],
|
|
4128
4685
|
type: "u8"
|
|
4129
4686
|
},
|
|
4687
|
+
{
|
|
4688
|
+
name: "config_type",
|
|
4689
|
+
docs: [
|
|
4690
|
+
"Config type mode, 0 for static, 1 for dynamic"
|
|
4691
|
+
],
|
|
4692
|
+
type: "u8"
|
|
4693
|
+
},
|
|
4130
4694
|
{
|
|
4131
4695
|
name: "_padding_0",
|
|
4132
4696
|
docs: [
|
|
@@ -4135,7 +4699,7 @@ var cp_amm_default = {
|
|
|
4135
4699
|
type: {
|
|
4136
4700
|
array: [
|
|
4137
4701
|
"u8",
|
|
4138
|
-
|
|
4702
|
+
5
|
|
4139
4703
|
]
|
|
4140
4704
|
}
|
|
4141
4705
|
},
|
|
@@ -4177,45 +4741,13 @@ var cp_amm_default = {
|
|
|
4177
4741
|
}
|
|
4178
4742
|
},
|
|
4179
4743
|
{
|
|
4180
|
-
name: "
|
|
4744
|
+
name: "DynamicConfigParameters",
|
|
4181
4745
|
type: {
|
|
4182
4746
|
kind: "struct",
|
|
4183
4747
|
fields: [
|
|
4184
|
-
{
|
|
4185
|
-
name: "pool_fees",
|
|
4186
|
-
type: {
|
|
4187
|
-
defined: {
|
|
4188
|
-
name: "PoolFeeParameters"
|
|
4189
|
-
}
|
|
4190
|
-
}
|
|
4191
|
-
},
|
|
4192
|
-
{
|
|
4193
|
-
name: "sqrt_min_price",
|
|
4194
|
-
type: "u128"
|
|
4195
|
-
},
|
|
4196
|
-
{
|
|
4197
|
-
name: "sqrt_max_price",
|
|
4198
|
-
type: "u128"
|
|
4199
|
-
},
|
|
4200
|
-
{
|
|
4201
|
-
name: "vault_config_key",
|
|
4202
|
-
type: "pubkey"
|
|
4203
|
-
},
|
|
4204
4748
|
{
|
|
4205
4749
|
name: "pool_creator_authority",
|
|
4206
4750
|
type: "pubkey"
|
|
4207
|
-
},
|
|
4208
|
-
{
|
|
4209
|
-
name: "activation_type",
|
|
4210
|
-
type: "u8"
|
|
4211
|
-
},
|
|
4212
|
-
{
|
|
4213
|
-
name: "collect_fee_mode",
|
|
4214
|
-
type: "u8"
|
|
4215
|
-
},
|
|
4216
|
-
{
|
|
4217
|
-
name: "index",
|
|
4218
|
-
type: "u64"
|
|
4219
4751
|
}
|
|
4220
4752
|
]
|
|
4221
4753
|
}
|
|
@@ -4412,6 +4944,14 @@ var cp_amm_default = {
|
|
|
4412
4944
|
}
|
|
4413
4945
|
}
|
|
4414
4946
|
},
|
|
4947
|
+
{
|
|
4948
|
+
name: "token_a_amount",
|
|
4949
|
+
type: "u64"
|
|
4950
|
+
},
|
|
4951
|
+
{
|
|
4952
|
+
name: "token_b_amount",
|
|
4953
|
+
type: "u64"
|
|
4954
|
+
},
|
|
4415
4955
|
{
|
|
4416
4956
|
name: "total_amount_a",
|
|
4417
4957
|
type: "u64"
|
|
@@ -4567,6 +5107,30 @@ var cp_amm_default = {
|
|
|
4567
5107
|
]
|
|
4568
5108
|
}
|
|
4569
5109
|
},
|
|
5110
|
+
{
|
|
5111
|
+
name: "EvtClosePosition",
|
|
5112
|
+
type: {
|
|
5113
|
+
kind: "struct",
|
|
5114
|
+
fields: [
|
|
5115
|
+
{
|
|
5116
|
+
name: "pool",
|
|
5117
|
+
type: "pubkey"
|
|
5118
|
+
},
|
|
5119
|
+
{
|
|
5120
|
+
name: "owner",
|
|
5121
|
+
type: "pubkey"
|
|
5122
|
+
},
|
|
5123
|
+
{
|
|
5124
|
+
name: "position",
|
|
5125
|
+
type: "pubkey"
|
|
5126
|
+
},
|
|
5127
|
+
{
|
|
5128
|
+
name: "position_nft_mint",
|
|
5129
|
+
type: "pubkey"
|
|
5130
|
+
}
|
|
5131
|
+
]
|
|
5132
|
+
}
|
|
5133
|
+
},
|
|
4570
5134
|
{
|
|
4571
5135
|
name: "EvtCreateClaimFeeOperator",
|
|
4572
5136
|
docs: [
|
|
@@ -4585,7 +5149,7 @@ var cp_amm_default = {
|
|
|
4585
5149
|
{
|
|
4586
5150
|
name: "EvtCreateConfig",
|
|
4587
5151
|
docs: [
|
|
4588
|
-
"Create config"
|
|
5152
|
+
"Create static config"
|
|
4589
5153
|
],
|
|
4590
5154
|
type: {
|
|
4591
5155
|
kind: "struct",
|
|
@@ -4633,6 +5197,29 @@ var cp_amm_default = {
|
|
|
4633
5197
|
]
|
|
4634
5198
|
}
|
|
4635
5199
|
},
|
|
5200
|
+
{
|
|
5201
|
+
name: "EvtCreateDynamicConfig",
|
|
5202
|
+
docs: [
|
|
5203
|
+
"Create dynamic config"
|
|
5204
|
+
],
|
|
5205
|
+
type: {
|
|
5206
|
+
kind: "struct",
|
|
5207
|
+
fields: [
|
|
5208
|
+
{
|
|
5209
|
+
name: "config",
|
|
5210
|
+
type: "pubkey"
|
|
5211
|
+
},
|
|
5212
|
+
{
|
|
5213
|
+
name: "pool_creator_authority",
|
|
5214
|
+
type: "pubkey"
|
|
5215
|
+
},
|
|
5216
|
+
{
|
|
5217
|
+
name: "index",
|
|
5218
|
+
type: "u64"
|
|
5219
|
+
}
|
|
5220
|
+
]
|
|
5221
|
+
}
|
|
5222
|
+
},
|
|
4636
5223
|
{
|
|
4637
5224
|
name: "EvtCreatePosition",
|
|
4638
5225
|
type: {
|
|
@@ -4709,6 +5296,10 @@ var cp_amm_default = {
|
|
|
4709
5296
|
type: {
|
|
4710
5297
|
kind: "struct",
|
|
4711
5298
|
fields: [
|
|
5299
|
+
{
|
|
5300
|
+
name: "pool",
|
|
5301
|
+
type: "pubkey"
|
|
5302
|
+
},
|
|
4712
5303
|
{
|
|
4713
5304
|
name: "token_a_mint",
|
|
4714
5305
|
type: "pubkey"
|
|
@@ -4773,6 +5364,14 @@ var cp_amm_default = {
|
|
|
4773
5364
|
name: "token_b_flag",
|
|
4774
5365
|
type: "u8"
|
|
4775
5366
|
},
|
|
5367
|
+
{
|
|
5368
|
+
name: "token_a_amount",
|
|
5369
|
+
type: "u64"
|
|
5370
|
+
},
|
|
5371
|
+
{
|
|
5372
|
+
name: "token_b_amount",
|
|
5373
|
+
type: "u64"
|
|
5374
|
+
},
|
|
4776
5375
|
{
|
|
4777
5376
|
name: "total_amount_a",
|
|
4778
5377
|
type: "u64"
|
|
@@ -4874,11 +5473,11 @@ var cp_amm_default = {
|
|
|
4874
5473
|
type: "pubkey"
|
|
4875
5474
|
},
|
|
4876
5475
|
{
|
|
4877
|
-
name: "
|
|
5476
|
+
name: "lock_liquidity_amount",
|
|
4878
5477
|
type: "u128"
|
|
4879
5478
|
},
|
|
4880
5479
|
{
|
|
4881
|
-
name: "
|
|
5480
|
+
name: "total_permanent_locked_liquidity",
|
|
4882
5481
|
type: "u128"
|
|
4883
5482
|
}
|
|
4884
5483
|
]
|
|
@@ -4910,11 +5509,11 @@ var cp_amm_default = {
|
|
|
4910
5509
|
}
|
|
4911
5510
|
},
|
|
4912
5511
|
{
|
|
4913
|
-
name: "
|
|
5512
|
+
name: "token_a_amount",
|
|
4914
5513
|
type: "u64"
|
|
4915
5514
|
},
|
|
4916
5515
|
{
|
|
4917
|
-
name: "
|
|
5516
|
+
name: "token_b_amount",
|
|
4918
5517
|
type: "u64"
|
|
4919
5518
|
}
|
|
4920
5519
|
]
|
|
@@ -4950,7 +5549,7 @@ var cp_amm_default = {
|
|
|
4950
5549
|
type: "u8"
|
|
4951
5550
|
},
|
|
4952
5551
|
{
|
|
4953
|
-
name: "
|
|
5552
|
+
name: "has_referral",
|
|
4954
5553
|
type: "bool"
|
|
4955
5554
|
},
|
|
4956
5555
|
{
|
|
@@ -4970,7 +5569,7 @@ var cp_amm_default = {
|
|
|
4970
5569
|
}
|
|
4971
5570
|
},
|
|
4972
5571
|
{
|
|
4973
|
-
name: "
|
|
5572
|
+
name: "actual_amount_in",
|
|
4974
5573
|
type: "u64"
|
|
4975
5574
|
},
|
|
4976
5575
|
{
|
|
@@ -5226,18 +5825,11 @@ var cp_amm_default = {
|
|
|
5226
5825
|
type: "u128"
|
|
5227
5826
|
},
|
|
5228
5827
|
{
|
|
5229
|
-
name: "
|
|
5230
|
-
docs: [
|
|
5231
|
-
"token a reserve"
|
|
5232
|
-
],
|
|
5233
|
-
type: "u64"
|
|
5234
|
-
},
|
|
5235
|
-
{
|
|
5236
|
-
name: "token_b_reserve",
|
|
5828
|
+
name: "_padding",
|
|
5237
5829
|
docs: [
|
|
5238
|
-
"
|
|
5830
|
+
"padding, previous reserve amount, be careful to use that field"
|
|
5239
5831
|
],
|
|
5240
|
-
type: "
|
|
5832
|
+
type: "u128"
|
|
5241
5833
|
},
|
|
5242
5834
|
{
|
|
5243
5835
|
name: "protocol_a_fee",
|
|
@@ -5960,6 +6552,46 @@ var cp_amm_default = {
|
|
|
5960
6552
|
]
|
|
5961
6553
|
}
|
|
5962
6554
|
},
|
|
6555
|
+
{
|
|
6556
|
+
name: "StaticConfigParameters",
|
|
6557
|
+
type: {
|
|
6558
|
+
kind: "struct",
|
|
6559
|
+
fields: [
|
|
6560
|
+
{
|
|
6561
|
+
name: "pool_fees",
|
|
6562
|
+
type: {
|
|
6563
|
+
defined: {
|
|
6564
|
+
name: "PoolFeeParameters"
|
|
6565
|
+
}
|
|
6566
|
+
}
|
|
6567
|
+
},
|
|
6568
|
+
{
|
|
6569
|
+
name: "sqrt_min_price",
|
|
6570
|
+
type: "u128"
|
|
6571
|
+
},
|
|
6572
|
+
{
|
|
6573
|
+
name: "sqrt_max_price",
|
|
6574
|
+
type: "u128"
|
|
6575
|
+
},
|
|
6576
|
+
{
|
|
6577
|
+
name: "vault_config_key",
|
|
6578
|
+
type: "pubkey"
|
|
6579
|
+
},
|
|
6580
|
+
{
|
|
6581
|
+
name: "pool_creator_authority",
|
|
6582
|
+
type: "pubkey"
|
|
6583
|
+
},
|
|
6584
|
+
{
|
|
6585
|
+
name: "activation_type",
|
|
6586
|
+
type: "u8"
|
|
6587
|
+
},
|
|
6588
|
+
{
|
|
6589
|
+
name: "collect_fee_mode",
|
|
6590
|
+
type: "u8"
|
|
6591
|
+
}
|
|
6592
|
+
]
|
|
6593
|
+
}
|
|
6594
|
+
},
|
|
5963
6595
|
{
|
|
5964
6596
|
name: "SwapParameters",
|
|
5965
6597
|
type: {
|
|
@@ -6180,12 +6812,48 @@ var cp_amm_default = {
|
|
|
6180
6812
|
|
|
6181
6813
|
var _web3js = require('@solana/web3.js');
|
|
6182
6814
|
|
|
6815
|
+
// src/types.ts
|
|
6816
|
+
var Rounding = /* @__PURE__ */ ((Rounding2) => {
|
|
6817
|
+
Rounding2[Rounding2["Up"] = 0] = "Up";
|
|
6818
|
+
Rounding2[Rounding2["Down"] = 1] = "Down";
|
|
6819
|
+
return Rounding2;
|
|
6820
|
+
})(Rounding || {});
|
|
6821
|
+
var ActivationPoint = /* @__PURE__ */ ((ActivationPoint2) => {
|
|
6822
|
+
ActivationPoint2[ActivationPoint2["Timestamp"] = 0] = "Timestamp";
|
|
6823
|
+
ActivationPoint2[ActivationPoint2["Slot"] = 1] = "Slot";
|
|
6824
|
+
return ActivationPoint2;
|
|
6825
|
+
})(ActivationPoint || {});
|
|
6826
|
+
var FeeSchedulerMode = /* @__PURE__ */ ((FeeSchedulerMode2) => {
|
|
6827
|
+
FeeSchedulerMode2[FeeSchedulerMode2["Linear"] = 0] = "Linear";
|
|
6828
|
+
FeeSchedulerMode2[FeeSchedulerMode2["Exponential"] = 1] = "Exponential";
|
|
6829
|
+
return FeeSchedulerMode2;
|
|
6830
|
+
})(FeeSchedulerMode || {});
|
|
6831
|
+
var CollectFeeMode = /* @__PURE__ */ ((CollectFeeMode2) => {
|
|
6832
|
+
CollectFeeMode2[CollectFeeMode2["BothToken"] = 0] = "BothToken";
|
|
6833
|
+
CollectFeeMode2[CollectFeeMode2["OnlyB"] = 1] = "OnlyB";
|
|
6834
|
+
return CollectFeeMode2;
|
|
6835
|
+
})(CollectFeeMode || {});
|
|
6836
|
+
var TradeDirection = /* @__PURE__ */ ((TradeDirection2) => {
|
|
6837
|
+
TradeDirection2[TradeDirection2["AtoB"] = 0] = "AtoB";
|
|
6838
|
+
TradeDirection2[TradeDirection2["BtoA"] = 1] = "BtoA";
|
|
6839
|
+
return TradeDirection2;
|
|
6840
|
+
})(TradeDirection || {});
|
|
6841
|
+
var ActivationType = /* @__PURE__ */ ((ActivationType2) => {
|
|
6842
|
+
ActivationType2[ActivationType2["Slot"] = 0] = "Slot";
|
|
6843
|
+
ActivationType2[ActivationType2["Timestamp"] = 1] = "Timestamp";
|
|
6844
|
+
return ActivationType2;
|
|
6845
|
+
})(ActivationType || {});
|
|
6846
|
+
|
|
6847
|
+
// src/pda.ts
|
|
6848
|
+
|
|
6849
|
+
|
|
6183
6850
|
// src/constants.ts
|
|
6184
6851
|
|
|
6185
6852
|
|
|
6186
6853
|
var CP_AMM_PROGRAM_ID = new (0, _web3js.PublicKey)(
|
|
6187
6854
|
"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"
|
|
6188
6855
|
);
|
|
6856
|
+
var LIQUIDITY_SCALE = 128;
|
|
6189
6857
|
var SCALE_OFFSET = 64;
|
|
6190
6858
|
var BASIS_POINT_MAX = 1e4;
|
|
6191
6859
|
var MAX_FEE_NUMERATOR = 5e8;
|
|
@@ -6194,9 +6862,14 @@ var MIN_SQRT_PRICE = new (0, _anchor.BN)("4295048016");
|
|
|
6194
6862
|
var MAX_SQRT_PRICE = new (0, _anchor.BN)("79226673521066979257578248091");
|
|
6195
6863
|
var MIN_CU_BUFFER = 5e4;
|
|
6196
6864
|
var MAX_CU_BUFFER = 2e5;
|
|
6865
|
+
var DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = 10;
|
|
6866
|
+
var DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = 120;
|
|
6867
|
+
var DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = 5e3;
|
|
6868
|
+
var BIN_STEP_BPS_DEFAULT = 1;
|
|
6869
|
+
var BIN_STEP_BPS_U128_DEFAULT = new (0, _anchor.BN)("1844674407370955");
|
|
6870
|
+
var MAX_PRICE_CHANGE_BPS_DEFAULT = 1500;
|
|
6197
6871
|
|
|
6198
6872
|
// src/pda.ts
|
|
6199
|
-
|
|
6200
6873
|
function getFirstKey(key1, key2) {
|
|
6201
6874
|
const buf1 = key1.toBuffer();
|
|
6202
6875
|
const buf2 = key2.toBuffer();
|
|
@@ -6213,19 +6886,19 @@ function getSecondKey(key1, key2) {
|
|
|
6213
6886
|
}
|
|
6214
6887
|
return buf1;
|
|
6215
6888
|
}
|
|
6216
|
-
function derivePoolAuthority(
|
|
6889
|
+
function derivePoolAuthority() {
|
|
6217
6890
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6218
6891
|
[Buffer.from("pool_authority")],
|
|
6219
|
-
|
|
6892
|
+
CP_AMM_PROGRAM_ID
|
|
6220
6893
|
)[0];
|
|
6221
6894
|
}
|
|
6222
|
-
function deriveConfigAddress(index
|
|
6895
|
+
function deriveConfigAddress(index) {
|
|
6223
6896
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6224
6897
|
[Buffer.from("config"), index.toArrayLike(Buffer, "le", 8)],
|
|
6225
|
-
|
|
6898
|
+
CP_AMM_PROGRAM_ID
|
|
6226
6899
|
)[0];
|
|
6227
6900
|
}
|
|
6228
|
-
function derivePoolAddress(config, tokenAMint, tokenBMint
|
|
6901
|
+
function derivePoolAddress(config, tokenAMint, tokenBMint) {
|
|
6229
6902
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6230
6903
|
[
|
|
6231
6904
|
Buffer.from("pool"),
|
|
@@ -6233,125 +6906,61 @@ function derivePoolAddress(config, tokenAMint, tokenBMint, programId) {
|
|
|
6233
6906
|
getFirstKey(tokenAMint, tokenBMint),
|
|
6234
6907
|
getSecondKey(tokenAMint, tokenBMint)
|
|
6235
6908
|
],
|
|
6236
|
-
|
|
6909
|
+
CP_AMM_PROGRAM_ID
|
|
6237
6910
|
)[0];
|
|
6238
6911
|
}
|
|
6239
|
-
function derivePositionAddress(positionNft
|
|
6912
|
+
function derivePositionAddress(positionNft) {
|
|
6240
6913
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6241
6914
|
[Buffer.from("position"), positionNft.toBuffer()],
|
|
6242
|
-
|
|
6915
|
+
CP_AMM_PROGRAM_ID
|
|
6243
6916
|
)[0];
|
|
6244
6917
|
}
|
|
6245
|
-
function deriveTokenVaultAddress(tokenMint, pool
|
|
6918
|
+
function deriveTokenVaultAddress(tokenMint, pool) {
|
|
6246
6919
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6247
6920
|
[Buffer.from("token_vault"), tokenMint.toBuffer(), pool.toBuffer()],
|
|
6248
|
-
|
|
6921
|
+
CP_AMM_PROGRAM_ID
|
|
6249
6922
|
)[0];
|
|
6250
6923
|
}
|
|
6251
|
-
function deriveRewardVaultAddress(pool, rewardIndex
|
|
6924
|
+
function deriveRewardVaultAddress(pool, rewardIndex) {
|
|
6252
6925
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6253
6926
|
[Buffer.from("reward_vault"), pool.toBuffer(), Buffer.from([rewardIndex])],
|
|
6254
|
-
|
|
6927
|
+
CP_AMM_PROGRAM_ID
|
|
6255
6928
|
)[0];
|
|
6256
6929
|
}
|
|
6257
|
-
function deriveCustomizablePoolAddress(tokenAMint, tokenBMint
|
|
6930
|
+
function deriveCustomizablePoolAddress(tokenAMint, tokenBMint) {
|
|
6258
6931
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6259
6932
|
[
|
|
6260
6933
|
Buffer.from("cpool"),
|
|
6261
6934
|
getFirstKey(tokenAMint, tokenBMint),
|
|
6262
6935
|
getSecondKey(tokenAMint, tokenBMint)
|
|
6263
6936
|
],
|
|
6264
|
-
|
|
6937
|
+
CP_AMM_PROGRAM_ID
|
|
6265
6938
|
)[0];
|
|
6266
6939
|
}
|
|
6267
|
-
function deriveTokenBadgeAddress(tokenMint
|
|
6940
|
+
function deriveTokenBadgeAddress(tokenMint) {
|
|
6268
6941
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6269
6942
|
[Buffer.from("token_badge"), tokenMint.toBuffer()],
|
|
6270
|
-
|
|
6943
|
+
CP_AMM_PROGRAM_ID
|
|
6271
6944
|
)[0];
|
|
6272
6945
|
}
|
|
6273
|
-
function deriveClaimFeeOperatorAddress(operator
|
|
6946
|
+
function deriveClaimFeeOperatorAddress(operator) {
|
|
6274
6947
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6275
6948
|
[Buffer.from("cf_operator"), operator.toBuffer()],
|
|
6276
|
-
|
|
6949
|
+
CP_AMM_PROGRAM_ID
|
|
6277
6950
|
)[0];
|
|
6278
6951
|
}
|
|
6279
|
-
function derivePositionNftAccount(positionNftMint
|
|
6952
|
+
function derivePositionNftAccount(positionNftMint) {
|
|
6280
6953
|
return _web3js.PublicKey.findProgramAddressSync(
|
|
6281
6954
|
[Buffer.from("position_nft_account"), positionNftMint.toBuffer()],
|
|
6282
|
-
|
|
6955
|
+
CP_AMM_PROGRAM_ID
|
|
6283
6956
|
)[0];
|
|
6284
6957
|
}
|
|
6285
|
-
function deriveEventAuthority(programId) {
|
|
6286
|
-
return _web3js.PublicKey.findProgramAddressSync(
|
|
6287
|
-
[Buffer.from("__event_authority")],
|
|
6288
|
-
programId
|
|
6289
|
-
);
|
|
6290
|
-
}
|
|
6291
6958
|
|
|
6292
|
-
// src/
|
|
6959
|
+
// src/helpers/token.ts
|
|
6960
|
+
var _bytes = require('@coral-xyz/anchor/dist/cjs/utils/bytes');
|
|
6293
6961
|
|
|
6294
6962
|
|
|
6295
6963
|
|
|
6296
|
-
// src/types.ts
|
|
6297
|
-
var Rounding = /* @__PURE__ */ ((Rounding2) => {
|
|
6298
|
-
Rounding2[Rounding2["Up"] = 0] = "Up";
|
|
6299
|
-
Rounding2[Rounding2["Down"] = 1] = "Down";
|
|
6300
|
-
return Rounding2;
|
|
6301
|
-
})(Rounding || {});
|
|
6302
|
-
var ActivationPoint = /* @__PURE__ */ ((ActivationPoint2) => {
|
|
6303
|
-
ActivationPoint2[ActivationPoint2["Timestamp"] = 0] = "Timestamp";
|
|
6304
|
-
ActivationPoint2[ActivationPoint2["Slot"] = 1] = "Slot";
|
|
6305
|
-
return ActivationPoint2;
|
|
6306
|
-
})(ActivationPoint || {});
|
|
6307
|
-
var FeeSchedulerMode = /* @__PURE__ */ ((FeeSchedulerMode2) => {
|
|
6308
|
-
FeeSchedulerMode2[FeeSchedulerMode2["Linear"] = 0] = "Linear";
|
|
6309
|
-
FeeSchedulerMode2[FeeSchedulerMode2["Exponential"] = 1] = "Exponential";
|
|
6310
|
-
return FeeSchedulerMode2;
|
|
6311
|
-
})(FeeSchedulerMode || {});
|
|
6312
|
-
var CollectFeeMode = /* @__PURE__ */ ((CollectFeeMode2) => {
|
|
6313
|
-
CollectFeeMode2[CollectFeeMode2["BothToken"] = 0] = "BothToken";
|
|
6314
|
-
CollectFeeMode2[CollectFeeMode2["OnlyB"] = 1] = "OnlyB";
|
|
6315
|
-
return CollectFeeMode2;
|
|
6316
|
-
})(CollectFeeMode || {});
|
|
6317
|
-
var TradeDirection = /* @__PURE__ */ ((TradeDirection2) => {
|
|
6318
|
-
TradeDirection2[TradeDirection2["AtoB"] = 0] = "AtoB";
|
|
6319
|
-
TradeDirection2[TradeDirection2["BtoA"] = 1] = "BtoA";
|
|
6320
|
-
return TradeDirection2;
|
|
6321
|
-
})(TradeDirection || {});
|
|
6322
|
-
var ActivationType = /* @__PURE__ */ ((ActivationType2) => {
|
|
6323
|
-
ActivationType2[ActivationType2["Slot"] = 0] = "Slot";
|
|
6324
|
-
ActivationType2[ActivationType2["Timestamp"] = 1] = "Timestamp";
|
|
6325
|
-
return ActivationType2;
|
|
6326
|
-
})(ActivationType || {});
|
|
6327
|
-
|
|
6328
|
-
// src/math/index.ts
|
|
6329
|
-
function mulDiv(x, y, denominator, rounding) {
|
|
6330
|
-
const { div, mod } = x.mul(y).divmod(denominator);
|
|
6331
|
-
if (rounding == 0 /* Up */ && !mod.isZero()) {
|
|
6332
|
-
return div.add(new (0, _anchor.BN)(1));
|
|
6333
|
-
}
|
|
6334
|
-
return div;
|
|
6335
|
-
}
|
|
6336
|
-
function divCeil(a, b) {
|
|
6337
|
-
if (a.isZero()) {
|
|
6338
|
-
return new (0, _anchor.BN)(0);
|
|
6339
|
-
}
|
|
6340
|
-
return a.add(b.sub(new (0, _anchor.BN)(1))).div(b);
|
|
6341
|
-
}
|
|
6342
|
-
function decimalToQ64(num) {
|
|
6343
|
-
return new (0, _anchor.BN)(num.mul(_decimaljs2.default.pow(2, 64)).floor().toFixed());
|
|
6344
|
-
}
|
|
6345
|
-
function priceToSqrtPrice(initPrice, tokenADecimal, tokenBDecimal) {
|
|
6346
|
-
const sqrtPriceQ64 = decimalToQ64(
|
|
6347
|
-
initPrice.mul(_decimaljs2.default.pow(10, tokenBDecimal - tokenADecimal)).sqrt()
|
|
6348
|
-
);
|
|
6349
|
-
return sqrtPriceQ64;
|
|
6350
|
-
}
|
|
6351
|
-
|
|
6352
|
-
// src/utils/token.ts
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
6964
|
|
|
6356
6965
|
|
|
6357
6966
|
|
|
@@ -6436,8 +7045,60 @@ var unwrapSOLInstruction = (owner, allowOwnerOffCurve = true) => __async(void 0,
|
|
|
6436
7045
|
}
|
|
6437
7046
|
return null;
|
|
6438
7047
|
});
|
|
7048
|
+
function getAllUserPositionNftAccount(connection, user) {
|
|
7049
|
+
return __async(this, null, function* () {
|
|
7050
|
+
const filters = [
|
|
7051
|
+
{
|
|
7052
|
+
memcmp: {
|
|
7053
|
+
offset: 32,
|
|
7054
|
+
bytes: user.toBase58()
|
|
7055
|
+
}
|
|
7056
|
+
},
|
|
7057
|
+
{
|
|
7058
|
+
memcmp: {
|
|
7059
|
+
offset: 64,
|
|
7060
|
+
bytes: _bytes.bs58.encode(Buffer.from([1, 0, 0, 0, 0, 0, 0, 0]))
|
|
7061
|
+
// 1
|
|
7062
|
+
}
|
|
7063
|
+
}
|
|
7064
|
+
];
|
|
7065
|
+
const tokenAccountsRaw = yield connection.getProgramAccounts(
|
|
7066
|
+
_spltoken.TOKEN_2022_PROGRAM_ID,
|
|
7067
|
+
{
|
|
7068
|
+
filters
|
|
7069
|
+
}
|
|
7070
|
+
);
|
|
7071
|
+
const userPositionNftAccount = [];
|
|
7072
|
+
for (const { account, pubkey } of tokenAccountsRaw) {
|
|
7073
|
+
const tokenAccountData = _spltoken.AccountLayout.decode(account.data);
|
|
7074
|
+
userPositionNftAccount.push({
|
|
7075
|
+
positionNft: tokenAccountData.mint,
|
|
7076
|
+
positionNftAccount: pubkey
|
|
7077
|
+
});
|
|
7078
|
+
}
|
|
7079
|
+
return userPositionNftAccount;
|
|
7080
|
+
});
|
|
7081
|
+
}
|
|
7082
|
+
function getAllPositionNftAccountByOwner(connection, user) {
|
|
7083
|
+
return __async(this, null, function* () {
|
|
7084
|
+
const tokenAccounts = yield connection.getTokenAccountsByOwner(user, {
|
|
7085
|
+
programId: _spltoken.TOKEN_2022_PROGRAM_ID
|
|
7086
|
+
});
|
|
7087
|
+
const userPositionNftAccount = [];
|
|
7088
|
+
for (const { account, pubkey } of tokenAccounts.value) {
|
|
7089
|
+
const tokenAccountData = _spltoken.AccountLayout.decode(account.data);
|
|
7090
|
+
if (tokenAccountData.amount.toString() === "1") {
|
|
7091
|
+
userPositionNftAccount.push({
|
|
7092
|
+
positionNft: tokenAccountData.mint,
|
|
7093
|
+
positionNftAccount: pubkey
|
|
7094
|
+
});
|
|
7095
|
+
}
|
|
7096
|
+
}
|
|
7097
|
+
return userPositionNftAccount;
|
|
7098
|
+
});
|
|
7099
|
+
}
|
|
6439
7100
|
|
|
6440
|
-
// src/
|
|
7101
|
+
// src/helpers/fee.ts
|
|
6441
7102
|
|
|
6442
7103
|
|
|
6443
7104
|
// src/math/feeMath.ts
|
|
@@ -6544,7 +7205,68 @@ function pow(base, exp) {
|
|
|
6544
7205
|
return result;
|
|
6545
7206
|
}
|
|
6546
7207
|
|
|
6547
|
-
// src/
|
|
7208
|
+
// src/math/mathUtils.ts
|
|
7209
|
+
|
|
7210
|
+
var _decimaljs = require('decimal.js'); var _decimaljs2 = _interopRequireDefault(_decimaljs);
|
|
7211
|
+
function mulDiv(x, y, denominator, rounding) {
|
|
7212
|
+
const { div, mod } = x.mul(y).divmod(denominator);
|
|
7213
|
+
if (rounding == 0 /* Up */ && !mod.isZero()) {
|
|
7214
|
+
return div.add(new (0, _anchor.BN)(1));
|
|
7215
|
+
}
|
|
7216
|
+
return div;
|
|
7217
|
+
}
|
|
7218
|
+
function q64ToDecimal(num, decimalPlaces) {
|
|
7219
|
+
return new (0, _decimaljs2.default)(num.toString()).div(_decimaljs2.default.pow(2, 64)).toDecimalPlaces(decimalPlaces);
|
|
7220
|
+
}
|
|
7221
|
+
function decimalToQ64(num) {
|
|
7222
|
+
return new (0, _anchor.BN)(num.mul(_decimaljs2.default.pow(2, 64)).floor().toFixed());
|
|
7223
|
+
}
|
|
7224
|
+
|
|
7225
|
+
// src/helpers/curve.ts
|
|
7226
|
+
|
|
7227
|
+
function getNextSqrtPrice(amount, sqrtPrice, liquidity, aToB) {
|
|
7228
|
+
let result;
|
|
7229
|
+
if (aToB) {
|
|
7230
|
+
const product = amount.mul(sqrtPrice);
|
|
7231
|
+
const denominator = liquidity.add(product);
|
|
7232
|
+
const numerator = liquidity.mul(sqrtPrice);
|
|
7233
|
+
result = numerator.add(denominator.sub(new (0, _anchor.BN)(1))).div(denominator);
|
|
7234
|
+
} else {
|
|
7235
|
+
const quotient = amount.shln(SCALE_OFFSET * 2).div(liquidity);
|
|
7236
|
+
result = sqrtPrice.add(quotient);
|
|
7237
|
+
}
|
|
7238
|
+
return result;
|
|
7239
|
+
}
|
|
7240
|
+
function getLiquidityDeltaFromAmountA(amountA, lowerSqrtPrice, upperSqrtPrice) {
|
|
7241
|
+
const product = amountA.mul(lowerSqrtPrice).mul(upperSqrtPrice);
|
|
7242
|
+
const denominator = upperSqrtPrice.sub(lowerSqrtPrice);
|
|
7243
|
+
return product.div(denominator);
|
|
7244
|
+
}
|
|
7245
|
+
function getLiquidityDeltaFromAmountB(amountB, lowerSqrtPrice, upperSqrtPrice) {
|
|
7246
|
+
const denominator = upperSqrtPrice.sub(lowerSqrtPrice);
|
|
7247
|
+
const product = amountB.shln(128);
|
|
7248
|
+
return product.div(denominator);
|
|
7249
|
+
}
|
|
7250
|
+
function getAmountAFromLiquidityDelta(liquidity, currentSqrtPrice, maxSqrtPrice, rounding) {
|
|
7251
|
+
const product = liquidity.mul(maxSqrtPrice.sub(currentSqrtPrice));
|
|
7252
|
+
const denominator = currentSqrtPrice.mul(maxSqrtPrice);
|
|
7253
|
+
if (rounding == 0 /* Up */) {
|
|
7254
|
+
return product.add(denominator.sub(new (0, _anchor.BN)(1))).div(denominator);
|
|
7255
|
+
}
|
|
7256
|
+
return product.div(denominator);
|
|
7257
|
+
}
|
|
7258
|
+
function getAmountBFromLiquidityDelta(liquidity, currentSqrtPrice, minSqrtPrice, rounding) {
|
|
7259
|
+
const one = new (0, _anchor.BN)(1).shln(128);
|
|
7260
|
+
const deltaPrice = currentSqrtPrice.sub(minSqrtPrice);
|
|
7261
|
+
const result = liquidity.mul(deltaPrice);
|
|
7262
|
+
if (rounding == 0 /* Up */) {
|
|
7263
|
+
return result.add(one.sub(new (0, _anchor.BN)(1))).div(one);
|
|
7264
|
+
}
|
|
7265
|
+
return result.shrn(128);
|
|
7266
|
+
}
|
|
7267
|
+
|
|
7268
|
+
// src/helpers/fee.ts
|
|
7269
|
+
|
|
6548
7270
|
function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reductionFactor) {
|
|
6549
7271
|
let feeNumerator;
|
|
6550
7272
|
if (feeSchedulerMode == 0 /* Linear */) {
|
|
@@ -6558,9 +7280,12 @@ function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reduct
|
|
|
6558
7280
|
return feeNumerator;
|
|
6559
7281
|
}
|
|
6560
7282
|
function getDynamicFeeNumerator(volatilityAccumulator, binStep, variableFeeControl) {
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
7283
|
+
if (variableFeeControl.isZero()) {
|
|
7284
|
+
return new (0, _anchor.BN)(0);
|
|
7285
|
+
}
|
|
7286
|
+
const squareVfaBin = volatilityAccumulator.mul(new (0, _anchor.BN)(binStep)).pow(new (0, _anchor.BN)(2));
|
|
7287
|
+
const vFee = variableFeeControl.mul(squareVfaBin);
|
|
7288
|
+
return vFee.add(new (0, _anchor.BN)(99999999999)).div(new (0, _anchor.BN)(1e11));
|
|
6564
7289
|
}
|
|
6565
7290
|
function getFeeNumerator(currentPoint, activationPoint, numberOfPeriod, periodFrequency, feeSchedulerMode, cliffFeeNumerator, reductionFactor, dynamicFeeParams) {
|
|
6566
7291
|
if (Number(periodFrequency) == 0) {
|
|
@@ -6580,143 +7305,139 @@ function getFeeNumerator(currentPoint, activationPoint, numberOfPeriod, periodFr
|
|
|
6580
7305
|
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFeeParams;
|
|
6581
7306
|
const dynamicFeeNumberator = getDynamicFeeNumerator(
|
|
6582
7307
|
volatilityAccumulator,
|
|
6583
|
-
binStep,
|
|
6584
|
-
variableFeeControl
|
|
7308
|
+
new (0, _anchor.BN)(binStep),
|
|
7309
|
+
new (0, _anchor.BN)(variableFeeControl)
|
|
6585
7310
|
);
|
|
6586
|
-
feeNumerator.add(dynamicFeeNumberator);
|
|
7311
|
+
feeNumerator = feeNumerator.add(dynamicFeeNumberator);
|
|
6587
7312
|
}
|
|
6588
7313
|
return feeNumerator.gt(new (0, _anchor.BN)(MAX_FEE_NUMERATOR)) ? new (0, _anchor.BN)(MAX_FEE_NUMERATOR) : feeNumerator;
|
|
6589
7314
|
}
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
const denominator = liquidity.add(product);
|
|
6598
|
-
result = mulDiv(liquidity, sqrtPrice, denominator, 0 /* Up */);
|
|
6599
|
-
} else {
|
|
6600
|
-
const quotient = amount.shln(SCALE_OFFSET * 2).div(liquidity);
|
|
6601
|
-
result = sqrtPrice.add(quotient);
|
|
6602
|
-
}
|
|
6603
|
-
return result;
|
|
7315
|
+
function getFeeMode(collectFeeMode, btoA) {
|
|
7316
|
+
const feeOnInput = btoA && collectFeeMode === 1 /* OnlyB */;
|
|
7317
|
+
const feesOnTokenA = btoA && collectFeeMode === 0 /* BothToken */;
|
|
7318
|
+
return {
|
|
7319
|
+
feeOnInput,
|
|
7320
|
+
feesOnTokenA
|
|
7321
|
+
};
|
|
6604
7322
|
}
|
|
6605
|
-
function
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
7323
|
+
function getTotalFeeOnAmount(amount, tradeFeeNumerator) {
|
|
7324
|
+
return mulDiv(
|
|
7325
|
+
amount,
|
|
7326
|
+
tradeFeeNumerator,
|
|
7327
|
+
new (0, _anchor.BN)(FEE_DENOMINATOR),
|
|
7328
|
+
0 /* Up */
|
|
7329
|
+
);
|
|
6609
7330
|
}
|
|
6610
|
-
function
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
let
|
|
6614
|
-
if (
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
} else {
|
|
6618
|
-
result = prod.shrn(SCALE_OFFSET * 2);
|
|
7331
|
+
function getSwapAmount(inAmount, sqrtPrice, liquidity, tradeFeeNumerator, aToB, collectFeeMode) {
|
|
7332
|
+
let feeMode = getFeeMode(collectFeeMode, !aToB);
|
|
7333
|
+
let actualInAmount = inAmount;
|
|
7334
|
+
let totalFee = new (0, _anchor.BN)(0);
|
|
7335
|
+
if (feeMode.feeOnInput) {
|
|
7336
|
+
totalFee = getTotalFeeOnAmount(inAmount, tradeFeeNumerator);
|
|
7337
|
+
actualInAmount = inAmount.sub(totalFee);
|
|
6619
7338
|
}
|
|
6620
|
-
|
|
7339
|
+
const outAmount = aToB ? getAmountBFromLiquidityDelta(
|
|
7340
|
+
liquidity,
|
|
7341
|
+
sqrtPrice,
|
|
7342
|
+
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, true),
|
|
7343
|
+
1 /* Down */
|
|
7344
|
+
) : getAmountAFromLiquidityDelta(
|
|
7345
|
+
liquidity,
|
|
7346
|
+
sqrtPrice,
|
|
7347
|
+
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, false),
|
|
7348
|
+
1 /* Down */
|
|
7349
|
+
);
|
|
7350
|
+
const amountOut = feeMode.feeOnInput ? outAmount : (totalFee = getTotalFeeOnAmount(outAmount, tradeFeeNumerator), outAmount.sub(totalFee));
|
|
7351
|
+
return { amountOut, totalFee };
|
|
6621
7352
|
}
|
|
6622
|
-
function
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
);
|
|
6633
|
-
outAmount = getDeltaAmountB(
|
|
6634
|
-
nextSqrtPrice,
|
|
6635
|
-
sqrtPrice,
|
|
6636
|
-
liquidity,
|
|
6637
|
-
1 /* Down */
|
|
6638
|
-
);
|
|
6639
|
-
lpFee = mulDiv(
|
|
6640
|
-
outAmount,
|
|
6641
|
-
tradeFeeNumerator,
|
|
6642
|
-
new (0, _anchor.BN)(FEE_DENOMINATOR),
|
|
6643
|
-
1 /* Down */
|
|
6644
|
-
);
|
|
6645
|
-
} else {
|
|
6646
|
-
const nextSqrtPrice = getNextSqrtPrice(
|
|
6647
|
-
inAmount,
|
|
6648
|
-
sqrtPrice,
|
|
6649
|
-
liquidity,
|
|
6650
|
-
false
|
|
6651
|
-
);
|
|
6652
|
-
outAmount = getDeltaAmountA(
|
|
6653
|
-
sqrtPrice,
|
|
6654
|
-
nextSqrtPrice,
|
|
6655
|
-
liquidity,
|
|
6656
|
-
1 /* Down */
|
|
6657
|
-
);
|
|
6658
|
-
lpFee = mulDiv(
|
|
6659
|
-
outAmount,
|
|
6660
|
-
tradeFeeNumerator,
|
|
6661
|
-
new (0, _anchor.BN)(new (0, _anchor.BN)(FEE_DENOMINATOR)),
|
|
6662
|
-
1 /* Down */
|
|
6663
|
-
);
|
|
7353
|
+
function bpsToFeeNumerator(bps) {
|
|
7354
|
+
return new (0, _anchor.BN)(bps * FEE_DENOMINATOR).divn(BASIS_POINT_MAX);
|
|
7355
|
+
}
|
|
7356
|
+
function feeNumeratorToBps(feeNumerator) {
|
|
7357
|
+
return feeNumerator.muln(BASIS_POINT_MAX).div(new (0, _anchor.BN)(FEE_DENOMINATOR)).toNumber();
|
|
7358
|
+
}
|
|
7359
|
+
function getBaseFeeParams(maxBaseFeeBps, minBaseFeeBps, feeSchedulerMode, numberOfPeriod, totalDuration) {
|
|
7360
|
+
if (maxBaseFeeBps == minBaseFeeBps) {
|
|
7361
|
+
if (numberOfPeriod != 0 || totalDuration != 0) {
|
|
7362
|
+
throw new Error("numberOfPeriod and totalDuration must both be zero");
|
|
6664
7363
|
}
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
7364
|
+
return {
|
|
7365
|
+
cliffFeeNumerator: bpsToFeeNumerator(maxBaseFeeBps),
|
|
7366
|
+
numberOfPeriod: 0,
|
|
7367
|
+
periodFrequency: new (0, _anchor.BN)(0),
|
|
7368
|
+
reductionFactor: new (0, _anchor.BN)(0),
|
|
7369
|
+
feeSchedulerMode: 0
|
|
7370
|
+
};
|
|
7371
|
+
}
|
|
7372
|
+
if (numberOfPeriod <= 0) {
|
|
7373
|
+
throw new Error("Total periods must be greater than zero");
|
|
7374
|
+
}
|
|
7375
|
+
if (maxBaseFeeBps > feeNumeratorToBps(new (0, _anchor.BN)(MAX_FEE_NUMERATOR))) {
|
|
7376
|
+
throw new Error(
|
|
7377
|
+
`maxBaseFeeBps (${maxBaseFeeBps} bps) exceeds maximum allowed value of ${feeNumeratorToBps(
|
|
7378
|
+
new (0, _anchor.BN)(MAX_FEE_NUMERATOR)
|
|
7379
|
+
)} bps`
|
|
6671
7380
|
);
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
1 /* Down */
|
|
7381
|
+
}
|
|
7382
|
+
if (minBaseFeeBps > maxBaseFeeBps) {
|
|
7383
|
+
throw new Error(
|
|
7384
|
+
"minBaseFee bps must be less than or equal to maxBaseFee bps"
|
|
6677
7385
|
);
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
1 /* Down */
|
|
7386
|
+
}
|
|
7387
|
+
if (numberOfPeriod == 0 || totalDuration == 0) {
|
|
7388
|
+
throw new Error(
|
|
7389
|
+
"numberOfPeriod and totalDuration must both greater than zero"
|
|
6683
7390
|
);
|
|
6684
|
-
if (aToB) {
|
|
6685
|
-
} else {
|
|
6686
|
-
lpFee = mulDiv(
|
|
6687
|
-
inAmount,
|
|
6688
|
-
tradeFeeNumerator,
|
|
6689
|
-
new (0, _anchor.BN)(FEE_DENOMINATOR),
|
|
6690
|
-
1 /* Down */
|
|
6691
|
-
);
|
|
6692
|
-
const nextSqrtPrice2 = getNextSqrtPrice(
|
|
6693
|
-
inAmount.sub(lpFee),
|
|
6694
|
-
sqrtPrice,
|
|
6695
|
-
liquidity,
|
|
6696
|
-
false
|
|
6697
|
-
);
|
|
6698
|
-
outAmount = getDeltaAmountA(
|
|
6699
|
-
sqrtPrice,
|
|
6700
|
-
nextSqrtPrice2,
|
|
6701
|
-
liquidity,
|
|
6702
|
-
1 /* Down */
|
|
6703
|
-
);
|
|
6704
|
-
}
|
|
6705
7391
|
}
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
7392
|
+
const maxBaseFeeNumerator = bpsToFeeNumerator(maxBaseFeeBps);
|
|
7393
|
+
const minBaseFeeNumerator = bpsToFeeNumerator(minBaseFeeBps);
|
|
7394
|
+
const periodFrequency = new (0, _anchor.BN)(totalDuration / numberOfPeriod);
|
|
7395
|
+
let reductionFactor;
|
|
7396
|
+
if (feeSchedulerMode == 0 /* Linear */) {
|
|
7397
|
+
const totalReduction = maxBaseFeeNumerator.sub(minBaseFeeNumerator);
|
|
7398
|
+
reductionFactor = totalReduction.divn(numberOfPeriod);
|
|
7399
|
+
} else {
|
|
7400
|
+
const ratio = minBaseFeeNumerator.toNumber() / maxBaseFeeNumerator.toNumber();
|
|
7401
|
+
const decayBase = Math.pow(ratio, 1 / numberOfPeriod);
|
|
7402
|
+
reductionFactor = new (0, _anchor.BN)(BASIS_POINT_MAX * (1 - decayBase));
|
|
7403
|
+
}
|
|
7404
|
+
return {
|
|
7405
|
+
cliffFeeNumerator: maxBaseFeeNumerator,
|
|
7406
|
+
numberOfPeriod,
|
|
7407
|
+
periodFrequency,
|
|
7408
|
+
reductionFactor,
|
|
7409
|
+
feeSchedulerMode
|
|
7410
|
+
};
|
|
6712
7411
|
}
|
|
6713
|
-
function
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
7412
|
+
function getDynamicFeeParams(baseFeeBps, maxPriceChangeBps = MAX_PRICE_CHANGE_BPS_DEFAULT) {
|
|
7413
|
+
if (maxPriceChangeBps > MAX_PRICE_CHANGE_BPS_DEFAULT) {
|
|
7414
|
+
throw new Error(
|
|
7415
|
+
`maxPriceChangeBps (${maxPriceChangeBps} bps) must be less than or equal to ${MAX_PRICE_CHANGE_BPS_DEFAULT}`
|
|
7416
|
+
);
|
|
7417
|
+
}
|
|
7418
|
+
const priceRatio = maxPriceChangeBps / BASIS_POINT_MAX + 1;
|
|
7419
|
+
const sqrtPriceRatioQ64 = new (0, _anchor.BN)(
|
|
7420
|
+
_decimaljs2.default.sqrt(priceRatio.toString()).mul(_decimaljs2.default.pow(2, 64)).floor().toFixed()
|
|
7421
|
+
);
|
|
7422
|
+
const deltaBinId = sqrtPriceRatioQ64.sub(ONE).div(BIN_STEP_BPS_U128_DEFAULT).muln(2);
|
|
7423
|
+
const maxVolatilityAccumulator = new (0, _anchor.BN)(deltaBinId.muln(BASIS_POINT_MAX));
|
|
7424
|
+
const squareVfaBin = maxVolatilityAccumulator.mul(new (0, _anchor.BN)(BIN_STEP_BPS_DEFAULT)).pow(new (0, _anchor.BN)(2));
|
|
7425
|
+
const baseFeeNumerator = new (0, _anchor.BN)(bpsToFeeNumerator(baseFeeBps));
|
|
7426
|
+
const maxDynamicFeeNumerator = baseFeeNumerator.muln(20).divn(100);
|
|
7427
|
+
const vFee = maxDynamicFeeNumerator.mul(new (0, _anchor.BN)(1e11)).sub(new (0, _anchor.BN)(99999999999));
|
|
7428
|
+
const variableFeeControl = vFee.div(squareVfaBin);
|
|
7429
|
+
return {
|
|
7430
|
+
binStep: BIN_STEP_BPS_DEFAULT,
|
|
7431
|
+
binStepU128: BIN_STEP_BPS_U128_DEFAULT,
|
|
7432
|
+
filterPeriod: DYNAMIC_FEE_FILTER_PERIOD_DEFAULT,
|
|
7433
|
+
decayPeriod: DYNAMIC_FEE_DECAY_PERIOD_DEFAULT,
|
|
7434
|
+
reductionFactor: DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT,
|
|
7435
|
+
maxVolatilityAccumulator: maxVolatilityAccumulator.toNumber(),
|
|
7436
|
+
variableFeeControl: variableFeeControl.toNumber()
|
|
7437
|
+
};
|
|
6717
7438
|
}
|
|
6718
7439
|
|
|
6719
|
-
// src/
|
|
7440
|
+
// src/helpers/computeUnits.ts
|
|
6720
7441
|
|
|
6721
7442
|
|
|
6722
7443
|
|
|
@@ -6791,19 +7512,53 @@ var getEstimatedComputeUnitIxWithBuffer = (connection, instructions, feePayer, b
|
|
|
6791
7512
|
return _web3js.ComputeBudgetProgram.setComputeUnitLimit({ units });
|
|
6792
7513
|
});
|
|
6793
7514
|
|
|
6794
|
-
// src/
|
|
7515
|
+
// src/helpers/utils.ts
|
|
6795
7516
|
|
|
6796
7517
|
|
|
6797
|
-
var
|
|
6798
|
-
const slippage = (100
|
|
7518
|
+
var getMaxAmountWithSlippage = (amount, rate) => {
|
|
7519
|
+
const slippage = (100 + rate) / 100 * BASIS_POINT_MAX;
|
|
7520
|
+
return amount.mul(new (0, _anchor.BN)(slippage)).div(new (0, _anchor.BN)(BASIS_POINT_MAX));
|
|
7521
|
+
};
|
|
7522
|
+
var getMinAmountWithSlippage = (amount, rate) => {
|
|
7523
|
+
const slippage = (100 - rate) / 100 * BASIS_POINT_MAX;
|
|
6799
7524
|
return amount.mul(new (0, _anchor.BN)(slippage)).div(new (0, _anchor.BN)(BASIS_POINT_MAX));
|
|
6800
7525
|
};
|
|
6801
|
-
var getPriceImpact = (
|
|
6802
|
-
const diff =
|
|
6803
|
-
return new (0, _decimaljs2.default)(diff.toString()).div(new (0, _decimaljs2.default)(
|
|
7526
|
+
var getPriceImpact = (actualAmount, idealAmount) => {
|
|
7527
|
+
const diff = idealAmount.sub(actualAmount);
|
|
7528
|
+
return new (0, _decimaljs2.default)(diff.toString()).div(new (0, _decimaljs2.default)(idealAmount.toString())).mul(100).toNumber();
|
|
7529
|
+
};
|
|
7530
|
+
var getPriceFromSqrtPrice = (sqrtPrice, tokenADecimal, tokenBDecimal) => {
|
|
7531
|
+
const decimalSqrtPrice = new (0, _decimaljs2.default)(sqrtPrice.toString());
|
|
7532
|
+
const price = decimalSqrtPrice.mul(decimalSqrtPrice).mul(new (0, _decimaljs2.default)(__pow(10, tokenADecimal - tokenBDecimal))).div(_decimaljs2.default.pow(2, 128)).toString();
|
|
7533
|
+
return price;
|
|
7534
|
+
};
|
|
7535
|
+
var getSqrtPriceFromPrice = (price, tokenADecimal, tokenBDecimal) => {
|
|
7536
|
+
const decimalPrice = new (0, _decimaljs2.default)(price);
|
|
7537
|
+
const adjustedByDecimals = decimalPrice.div(
|
|
7538
|
+
new (0, _decimaljs2.default)(__pow(10, tokenADecimal - tokenBDecimal))
|
|
7539
|
+
);
|
|
7540
|
+
const sqrtValue = _decimaljs2.default.sqrt(adjustedByDecimals);
|
|
7541
|
+
const sqrtValueQ64 = sqrtValue.mul(_decimaljs2.default.pow(2, 64));
|
|
7542
|
+
return new (0, _anchor.BN)(sqrtValueQ64.floor().toFixed());
|
|
7543
|
+
};
|
|
7544
|
+
var getUnClaimReward = (poolState, positionState) => {
|
|
7545
|
+
const totalPositionLiquidity = positionState.unlockedLiquidity.add(positionState.vestedLiquidity).add(positionState.permanentLockedLiquidity);
|
|
7546
|
+
const feeAPerTokenStored = new (0, _anchor.BN)(
|
|
7547
|
+
Buffer.from(poolState.feeAPerLiquidity).reverse()
|
|
7548
|
+
).sub(new (0, _anchor.BN)(Buffer.from(positionState.feeAPerTokenCheckpoint).reverse()));
|
|
7549
|
+
const feeBPerTokenStored = new (0, _anchor.BN)(
|
|
7550
|
+
Buffer.from(poolState.feeBPerLiquidity).reverse()
|
|
7551
|
+
).sub(new (0, _anchor.BN)(Buffer.from(positionState.feeBPerTokenCheckpoint).reverse()));
|
|
7552
|
+
const feeA = totalPositionLiquidity.mul(feeAPerTokenStored).shrn(LIQUIDITY_SCALE);
|
|
7553
|
+
const feeB = totalPositionLiquidity.mul(feeBPerTokenStored).shrn(LIQUIDITY_SCALE);
|
|
7554
|
+
return {
|
|
7555
|
+
feeTokenA: positionState.feeAPending.add(feeA),
|
|
7556
|
+
feeTokenB: positionState.feeBPending.add(feeB),
|
|
7557
|
+
rewards: positionState.rewardInfos.length > 0 ? positionState.rewardInfos.map((item) => item.rewardPendings) : []
|
|
7558
|
+
};
|
|
6804
7559
|
};
|
|
6805
7560
|
|
|
6806
|
-
// src/
|
|
7561
|
+
// src/helpers/accountFilters.ts
|
|
6807
7562
|
var positionByPoolFilter = (pool) => {
|
|
6808
7563
|
return {
|
|
6809
7564
|
memcmp: {
|
|
@@ -6812,75 +7567,612 @@ var positionByPoolFilter = (pool) => {
|
|
|
6812
7567
|
}
|
|
6813
7568
|
};
|
|
6814
7569
|
};
|
|
7570
|
+
var vestingByPositionFilter = (position) => {
|
|
7571
|
+
return {
|
|
7572
|
+
memcmp: {
|
|
7573
|
+
bytes: position.toBase58(),
|
|
7574
|
+
offset: 8
|
|
7575
|
+
}
|
|
7576
|
+
};
|
|
7577
|
+
};
|
|
7578
|
+
|
|
7579
|
+
// src/helpers/priceMath.ts
|
|
7580
|
+
|
|
7581
|
+
|
|
7582
|
+
function calculateInitSqrtPrice(tokenAAmount, tokenBAmount, minSqrtPrice, maxSqrtPrice) {
|
|
7583
|
+
if (tokenAAmount.isZero() || tokenBAmount.isZero()) {
|
|
7584
|
+
throw new Error("Amount cannot be zero");
|
|
7585
|
+
}
|
|
7586
|
+
const amountADecimal = new (0, _decimaljs2.default)(tokenAAmount.toString());
|
|
7587
|
+
const amountBDecimal = new (0, _decimaljs2.default)(tokenBAmount.toString());
|
|
7588
|
+
const minSqrtPriceDecimal = new (0, _decimaljs2.default)(minSqrtPrice.toString()).div(
|
|
7589
|
+
_decimaljs2.default.pow(2, 64)
|
|
7590
|
+
);
|
|
7591
|
+
const maxSqrtPriceDecimal = new (0, _decimaljs2.default)(maxSqrtPrice.toString()).div(
|
|
7592
|
+
_decimaljs2.default.pow(2, 64)
|
|
7593
|
+
);
|
|
7594
|
+
const x = new (0, _decimaljs2.default)(1).div(maxSqrtPriceDecimal);
|
|
7595
|
+
const y = amountBDecimal.div(amountADecimal);
|
|
7596
|
+
const xy = x.mul(y);
|
|
7597
|
+
const paMinusXY = minSqrtPriceDecimal.sub(xy);
|
|
7598
|
+
const xyMinusPa = xy.sub(minSqrtPriceDecimal);
|
|
7599
|
+
const fourY = new (0, _decimaljs2.default)(4).mul(y);
|
|
7600
|
+
const discriminant = xyMinusPa.mul(xyMinusPa).add(fourY);
|
|
7601
|
+
const sqrtDiscriminant = discriminant.sqrt();
|
|
7602
|
+
const result = paMinusXY.add(sqrtDiscriminant).div(new (0, _decimaljs2.default)(2)).mul(_decimaljs2.default.pow(2, 64));
|
|
7603
|
+
return new (0, _anchor.BN)(result.floor().toFixed());
|
|
7604
|
+
}
|
|
7605
|
+
|
|
7606
|
+
// src/helpers/token2022.ts
|
|
7607
|
+
|
|
7608
|
+
|
|
7609
|
+
|
|
7610
|
+
|
|
7611
|
+
|
|
7612
|
+
|
|
7613
|
+
|
|
7614
|
+
function calculatePreFeeAmount(transferFee, postFeeAmount) {
|
|
7615
|
+
if (postFeeAmount.isZero()) {
|
|
7616
|
+
return new (0, _anchor.BN)(0);
|
|
7617
|
+
}
|
|
7618
|
+
if (transferFee.transferFeeBasisPoints === 0) {
|
|
7619
|
+
return postFeeAmount;
|
|
7620
|
+
}
|
|
7621
|
+
const maximumFee = new (0, _anchor.BN)(transferFee.maximumFee.toString());
|
|
7622
|
+
if (transferFee.transferFeeBasisPoints === _spltoken.MAX_FEE_BASIS_POINTS) {
|
|
7623
|
+
return postFeeAmount.add(maximumFee);
|
|
7624
|
+
}
|
|
7625
|
+
const ONE_IN_BASIS_POINTS = new (0, _anchor.BN)(_spltoken.MAX_FEE_BASIS_POINTS);
|
|
7626
|
+
const numerator = postFeeAmount.mul(ONE_IN_BASIS_POINTS);
|
|
7627
|
+
const denominator = ONE_IN_BASIS_POINTS.sub(
|
|
7628
|
+
new (0, _anchor.BN)(transferFee.transferFeeBasisPoints)
|
|
7629
|
+
);
|
|
7630
|
+
const rawPreFeeAmount = numerator.add(denominator).sub(new (0, _anchor.BN)(1)).div(denominator);
|
|
7631
|
+
if (rawPreFeeAmount.sub(postFeeAmount).gte(maximumFee)) {
|
|
7632
|
+
return postFeeAmount.add(maximumFee);
|
|
7633
|
+
}
|
|
7634
|
+
return rawPreFeeAmount;
|
|
7635
|
+
}
|
|
7636
|
+
function calculateInverseFee(transferFee, postFeeAmount) {
|
|
7637
|
+
const preFeeAmount = calculatePreFeeAmount(transferFee, postFeeAmount);
|
|
7638
|
+
return new (0, _anchor.BN)(
|
|
7639
|
+
_spltoken.calculateFee.call(void 0, transferFee, BigInt(preFeeAmount.toString())).toString()
|
|
7640
|
+
);
|
|
7641
|
+
}
|
|
7642
|
+
function calculateTransferFeeIncludedAmount(transferFeeExcludedAmount, mint, currentEpoch) {
|
|
7643
|
+
if (transferFeeExcludedAmount.isZero()) {
|
|
7644
|
+
return {
|
|
7645
|
+
amount: new (0, _anchor.BN)(0),
|
|
7646
|
+
transferFee: new (0, _anchor.BN)(0)
|
|
7647
|
+
};
|
|
7648
|
+
}
|
|
7649
|
+
const transferFeeConfig = _spltoken.getTransferFeeConfig.call(void 0, mint);
|
|
7650
|
+
if (transferFeeConfig === null) {
|
|
7651
|
+
return {
|
|
7652
|
+
amount: transferFeeExcludedAmount,
|
|
7653
|
+
transferFee: new (0, _anchor.BN)(0)
|
|
7654
|
+
};
|
|
7655
|
+
}
|
|
7656
|
+
const epochFee = _spltoken.getEpochFee.call(void 0, transferFeeConfig, BigInt(currentEpoch));
|
|
7657
|
+
const transferFee = epochFee.transferFeeBasisPoints == _spltoken.MAX_FEE_BASIS_POINTS ? new (0, _anchor.BN)(epochFee.maximumFee.toString()) : calculateInverseFee(epochFee, transferFeeExcludedAmount);
|
|
7658
|
+
const transferFeeIncludedAmount = transferFeeExcludedAmount.add(transferFee);
|
|
7659
|
+
return {
|
|
7660
|
+
amount: transferFeeIncludedAmount,
|
|
7661
|
+
transferFee
|
|
7662
|
+
};
|
|
7663
|
+
}
|
|
7664
|
+
function calculateTransferFeeExcludedAmount(transferFeeIncludedAmount, mint, currentEpoch) {
|
|
7665
|
+
const transferFeeConfig = _spltoken.getTransferFeeConfig.call(void 0, mint);
|
|
7666
|
+
if (transferFeeConfig === null) {
|
|
7667
|
+
return {
|
|
7668
|
+
amount: transferFeeIncludedAmount,
|
|
7669
|
+
transferFee: new (0, _anchor.BN)(0)
|
|
7670
|
+
};
|
|
7671
|
+
}
|
|
7672
|
+
const transferFeeIncludedAmountN = BigInt(
|
|
7673
|
+
transferFeeIncludedAmount.toString()
|
|
7674
|
+
);
|
|
7675
|
+
const transferFee = _spltoken.calculateFee.call(void 0,
|
|
7676
|
+
_spltoken.getEpochFee.call(void 0, transferFeeConfig, BigInt(currentEpoch)),
|
|
7677
|
+
transferFeeIncludedAmountN
|
|
7678
|
+
);
|
|
7679
|
+
const transferFeeExcludedAmount = new (0, _anchor.BN)(
|
|
7680
|
+
(transferFeeIncludedAmountN - transferFee).toString()
|
|
7681
|
+
);
|
|
7682
|
+
return {
|
|
7683
|
+
amount: transferFeeExcludedAmount,
|
|
7684
|
+
transferFee: new (0, _anchor.BN)(transferFee.toString())
|
|
7685
|
+
};
|
|
7686
|
+
}
|
|
7687
|
+
|
|
7688
|
+
// src/helpers/vestings.ts
|
|
7689
|
+
|
|
7690
|
+
var _bnjs = require('bn.js');
|
|
7691
|
+
function isVestingComplete(vestingData, currentPoint) {
|
|
7692
|
+
const cliffPoint = vestingData.cliffPoint;
|
|
7693
|
+
const periodFrequency = vestingData.periodFrequency;
|
|
7694
|
+
const numberOfPeriods = vestingData.numberOfPeriod;
|
|
7695
|
+
const endPoint = cliffPoint.add(periodFrequency.muln(numberOfPeriods));
|
|
7696
|
+
return currentPoint.gte(endPoint);
|
|
7697
|
+
}
|
|
7698
|
+
function getTotalLockedLiquidity(vestingData) {
|
|
7699
|
+
return vestingData.cliffUnlockLiquidity.add(
|
|
7700
|
+
vestingData.liquidityPerPeriod.mul(new (0, _anchor.BN)(vestingData.numberOfPeriod))
|
|
7701
|
+
);
|
|
7702
|
+
}
|
|
7703
|
+
function getAvailableVestingLiquidity(vestingData, currentPoint) {
|
|
7704
|
+
const {
|
|
7705
|
+
cliffPoint,
|
|
7706
|
+
periodFrequency,
|
|
7707
|
+
cliffUnlockLiquidity,
|
|
7708
|
+
liquidityPerPeriod,
|
|
7709
|
+
numberOfPeriod,
|
|
7710
|
+
totalReleasedLiquidity
|
|
7711
|
+
} = vestingData;
|
|
7712
|
+
if (currentPoint.lt(cliffPoint)) {
|
|
7713
|
+
return new (0, _anchor.BN)(0);
|
|
7714
|
+
}
|
|
7715
|
+
if (periodFrequency.isZero()) {
|
|
7716
|
+
return cliffUnlockLiquidity;
|
|
7717
|
+
}
|
|
7718
|
+
let passedPeriod = new (0, _anchor.BN)(currentPoint).sub(cliffPoint).div(periodFrequency);
|
|
7719
|
+
passedPeriod = _bnjs.min.call(void 0, passedPeriod, new (0, _anchor.BN)(numberOfPeriod));
|
|
7720
|
+
const unlockedLiquidity = cliffUnlockLiquidity.add(
|
|
7721
|
+
passedPeriod.mul(liquidityPerPeriod)
|
|
7722
|
+
);
|
|
7723
|
+
const availableReleasingLiquidity = unlockedLiquidity.sub(
|
|
7724
|
+
totalReleasedLiquidity
|
|
7725
|
+
);
|
|
7726
|
+
return availableReleasingLiquidity;
|
|
7727
|
+
}
|
|
6815
7728
|
|
|
6816
7729
|
// src/CpAmm.ts
|
|
7730
|
+
|
|
6817
7731
|
var CpAmm = class {
|
|
6818
7732
|
constructor(connection) {
|
|
6819
7733
|
this._program = new (0, _anchor.Program)(cp_amm_default, {
|
|
6820
7734
|
connection
|
|
6821
7735
|
});
|
|
7736
|
+
this.poolAuthority = derivePoolAuthority();
|
|
6822
7737
|
}
|
|
6823
|
-
|
|
6824
|
-
return this._program;
|
|
6825
|
-
}
|
|
7738
|
+
//// ANCHOR: PRIVATE FUNCTIONS //////
|
|
6826
7739
|
/**
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
7740
|
+
* Prepares token accounts for a transaction by retrieving or creating associated token accounts.
|
|
7741
|
+
* @private
|
|
7742
|
+
* @param {PublicKey} owner - The owner of the token accounts
|
|
7743
|
+
* @param {PublicKey} tokenAMint - Mint address of token A
|
|
7744
|
+
* @param {PublicKey} tokenBMint - Mint address of token B
|
|
7745
|
+
* @param {PublicKey} tokenAProgram - Program ID for token A (Token or Token2022)
|
|
7746
|
+
* @param {PublicKey} tokenBProgram - Program ID for token B (Token or Token2022)
|
|
7747
|
+
* @returns {Promise<{tokenAAta: PublicKey, tokenBAta: PublicKey, instructions: TransactionInstruction[]}>}
|
|
7748
|
+
* The token account addresses and any instructions needed to create them
|
|
7749
|
+
*/
|
|
7750
|
+
prepareTokenAccounts(owner, tokenAMint, tokenBMint, tokenAProgram, tokenBProgram) {
|
|
6837
7751
|
return __async(this, null, function* () {
|
|
6838
|
-
const
|
|
6839
|
-
const
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
liquidityQ64
|
|
6864
|
-
};
|
|
7752
|
+
const instructions = [];
|
|
7753
|
+
const [
|
|
7754
|
+
{ ataPubkey: tokenAAta, ix: createInputTokenAccountIx },
|
|
7755
|
+
{ ataPubkey: tokenBAta, ix: createOutputTokenAccountIx }
|
|
7756
|
+
] = yield Promise.all([
|
|
7757
|
+
getOrCreateATAInstruction(
|
|
7758
|
+
this._program.provider.connection,
|
|
7759
|
+
tokenAMint,
|
|
7760
|
+
owner,
|
|
7761
|
+
owner,
|
|
7762
|
+
true,
|
|
7763
|
+
tokenAProgram
|
|
7764
|
+
),
|
|
7765
|
+
getOrCreateATAInstruction(
|
|
7766
|
+
this._program.provider.connection,
|
|
7767
|
+
tokenBMint,
|
|
7768
|
+
owner,
|
|
7769
|
+
owner,
|
|
7770
|
+
true,
|
|
7771
|
+
tokenBProgram
|
|
7772
|
+
)
|
|
7773
|
+
]);
|
|
7774
|
+
createInputTokenAccountIx && instructions.push(createInputTokenAccountIx);
|
|
7775
|
+
createOutputTokenAccountIx && instructions.push(createOutputTokenAccountIx);
|
|
7776
|
+
return { tokenAAta, tokenBAta, instructions };
|
|
6865
7777
|
});
|
|
6866
7778
|
}
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
7779
|
+
/**
|
|
7780
|
+
* Derives token badge account metadata
|
|
7781
|
+
* @param tokenAMint - Public key of token A mint
|
|
7782
|
+
* @param tokenBMint - Public key of token B mint
|
|
7783
|
+
* @returns Array of account metadata for token badges
|
|
7784
|
+
*/
|
|
7785
|
+
getTokenBadgeAccounts(tokenAMint, tokenBMint) {
|
|
7786
|
+
return [
|
|
7787
|
+
{
|
|
7788
|
+
pubkey: deriveTokenBadgeAddress(tokenAMint),
|
|
7789
|
+
isWritable: false,
|
|
7790
|
+
isSigner: false
|
|
7791
|
+
},
|
|
7792
|
+
{
|
|
7793
|
+
pubkey: deriveTokenBadgeAddress(tokenBMint),
|
|
7794
|
+
isWritable: false,
|
|
7795
|
+
isSigner: false
|
|
7796
|
+
}
|
|
7797
|
+
];
|
|
6876
7798
|
}
|
|
6877
|
-
|
|
7799
|
+
/**
|
|
7800
|
+
* Builds an instruction to add liquidity to a position.
|
|
7801
|
+
* @private
|
|
7802
|
+
* @param {BuildAddLiquidityParams} params - Parameters for adding liquidity
|
|
7803
|
+
* @returns {Promise<TransactionInstruction>} Instruction to add liquidity
|
|
7804
|
+
*/
|
|
7805
|
+
buildAddLiquidityInstruction(params) {
|
|
6878
7806
|
return __async(this, null, function* () {
|
|
6879
|
-
const
|
|
6880
|
-
|
|
6881
|
-
|
|
7807
|
+
const {
|
|
7808
|
+
pool,
|
|
7809
|
+
position,
|
|
7810
|
+
positionNftAccount,
|
|
7811
|
+
owner,
|
|
7812
|
+
tokenAAccount,
|
|
7813
|
+
tokenBAccount,
|
|
7814
|
+
tokenAMint,
|
|
7815
|
+
tokenBMint,
|
|
7816
|
+
tokenAVault,
|
|
7817
|
+
tokenBVault,
|
|
7818
|
+
tokenAProgram,
|
|
7819
|
+
tokenBProgram,
|
|
7820
|
+
liquidityDelta,
|
|
7821
|
+
tokenAAmountThreshold,
|
|
7822
|
+
tokenBAmountThreshold
|
|
7823
|
+
} = params;
|
|
7824
|
+
return yield this._program.methods.addLiquidity({
|
|
7825
|
+
liquidityDelta,
|
|
7826
|
+
tokenAAmountThreshold,
|
|
7827
|
+
tokenBAmountThreshold
|
|
7828
|
+
}).accountsPartial({
|
|
7829
|
+
pool,
|
|
7830
|
+
position,
|
|
7831
|
+
positionNftAccount,
|
|
7832
|
+
owner,
|
|
7833
|
+
tokenAAccount,
|
|
7834
|
+
tokenBAccount,
|
|
7835
|
+
tokenAMint,
|
|
7836
|
+
tokenBMint,
|
|
7837
|
+
tokenAVault,
|
|
7838
|
+
tokenBVault,
|
|
7839
|
+
tokenAProgram,
|
|
7840
|
+
tokenBProgram
|
|
7841
|
+
}).instruction();
|
|
7842
|
+
});
|
|
7843
|
+
}
|
|
7844
|
+
/**
|
|
7845
|
+
* Builds an instruction to remove all liquidity from a position.
|
|
7846
|
+
* @private
|
|
7847
|
+
* @param {BuildRemoveAllLiquidityInstructionParams} params - Parameters for removing all liquidity
|
|
7848
|
+
* @returns {Promise<TransactionInstruction>} Instruction to remove all liquidity
|
|
7849
|
+
*/
|
|
7850
|
+
buildRemoveAllLiquidityInstruction(params) {
|
|
7851
|
+
return __async(this, null, function* () {
|
|
7852
|
+
const {
|
|
7853
|
+
poolAuthority,
|
|
7854
|
+
owner,
|
|
7855
|
+
pool,
|
|
7856
|
+
position,
|
|
7857
|
+
positionNftAccount,
|
|
7858
|
+
tokenAAccount,
|
|
7859
|
+
tokenBAccount,
|
|
7860
|
+
tokenAAmountThreshold,
|
|
7861
|
+
tokenBAmountThreshold,
|
|
7862
|
+
tokenAMint,
|
|
7863
|
+
tokenBMint,
|
|
7864
|
+
tokenAVault,
|
|
7865
|
+
tokenBVault,
|
|
7866
|
+
tokenAProgram,
|
|
7867
|
+
tokenBProgram
|
|
7868
|
+
} = params;
|
|
7869
|
+
return yield this._program.methods.removeAllLiquidity(tokenAAmountThreshold, tokenBAmountThreshold).accountsPartial({
|
|
7870
|
+
poolAuthority,
|
|
7871
|
+
pool,
|
|
7872
|
+
position,
|
|
7873
|
+
positionNftAccount,
|
|
7874
|
+
owner,
|
|
7875
|
+
tokenAAccount,
|
|
7876
|
+
tokenBAccount,
|
|
7877
|
+
tokenAMint,
|
|
7878
|
+
tokenBMint,
|
|
7879
|
+
tokenAVault,
|
|
7880
|
+
tokenBVault,
|
|
7881
|
+
tokenAProgram,
|
|
7882
|
+
tokenBProgram
|
|
7883
|
+
}).instruction();
|
|
7884
|
+
});
|
|
7885
|
+
}
|
|
7886
|
+
/**
|
|
7887
|
+
* Builds an instruction to claim fees accumulated by a position.
|
|
7888
|
+
* @private
|
|
7889
|
+
* @param {ClaimPositionFeeInstructionParams} params - Parameters for claiming position fees
|
|
7890
|
+
* @returns {Promise<TransactionInstruction>} Instruction to claim position fees
|
|
7891
|
+
*/
|
|
7892
|
+
buildClaimPositionFeeInstruction(params) {
|
|
7893
|
+
return __async(this, null, function* () {
|
|
7894
|
+
const {
|
|
7895
|
+
owner,
|
|
7896
|
+
poolAuthority,
|
|
7897
|
+
pool,
|
|
7898
|
+
position,
|
|
7899
|
+
positionNftAccount,
|
|
7900
|
+
tokenAAccount,
|
|
7901
|
+
tokenBAccount,
|
|
7902
|
+
tokenAVault,
|
|
7903
|
+
tokenBVault,
|
|
7904
|
+
tokenAMint,
|
|
7905
|
+
tokenBMint,
|
|
7906
|
+
tokenAProgram,
|
|
7907
|
+
tokenBProgram
|
|
7908
|
+
} = params;
|
|
7909
|
+
return yield this._program.methods.claimPositionFee().accountsPartial({
|
|
7910
|
+
poolAuthority,
|
|
7911
|
+
owner,
|
|
7912
|
+
pool,
|
|
7913
|
+
position,
|
|
7914
|
+
positionNftAccount,
|
|
7915
|
+
tokenAAccount,
|
|
7916
|
+
tokenBAccount,
|
|
7917
|
+
tokenAVault,
|
|
7918
|
+
tokenBVault,
|
|
7919
|
+
tokenAMint,
|
|
7920
|
+
tokenBMint,
|
|
7921
|
+
tokenAProgram,
|
|
7922
|
+
tokenBProgram
|
|
7923
|
+
}).instruction();
|
|
6882
7924
|
});
|
|
6883
7925
|
}
|
|
7926
|
+
/**
|
|
7927
|
+
* Builds an instruction to close a position.
|
|
7928
|
+
* @private
|
|
7929
|
+
* @param {ClosePositionInstructionParams} params - Parameters for closing a position
|
|
7930
|
+
* @returns {Promise<TransactionInstruction>} Instruction to close the position
|
|
7931
|
+
*/
|
|
7932
|
+
buildClosePositionInstruction(params) {
|
|
7933
|
+
return __async(this, null, function* () {
|
|
7934
|
+
const {
|
|
7935
|
+
owner,
|
|
7936
|
+
poolAuthority,
|
|
7937
|
+
pool,
|
|
7938
|
+
position,
|
|
7939
|
+
positionNftAccount,
|
|
7940
|
+
positionNftMint
|
|
7941
|
+
} = params;
|
|
7942
|
+
return yield this._program.methods.closePosition().accountsPartial({
|
|
7943
|
+
positionNftMint,
|
|
7944
|
+
positionNftAccount,
|
|
7945
|
+
pool,
|
|
7946
|
+
position,
|
|
7947
|
+
poolAuthority,
|
|
7948
|
+
rentReceiver: owner,
|
|
7949
|
+
owner,
|
|
7950
|
+
tokenProgram: _spltoken.TOKEN_2022_PROGRAM_ID
|
|
7951
|
+
}).instruction();
|
|
7952
|
+
});
|
|
7953
|
+
}
|
|
7954
|
+
/**
|
|
7955
|
+
* Builds an instruction to refresh vesting for a position
|
|
7956
|
+
* @param params Parameters required for the refresh vesting instruction
|
|
7957
|
+
* @returns Transaction instruction or null if no vestings to refresh
|
|
7958
|
+
*/
|
|
7959
|
+
buildRefreshVestingInstruction(params) {
|
|
7960
|
+
return __async(this, null, function* () {
|
|
7961
|
+
const { owner, position, positionNftAccount, pool, vestingAccounts } = params;
|
|
7962
|
+
if (vestingAccounts.length == 0) {
|
|
7963
|
+
return null;
|
|
7964
|
+
}
|
|
7965
|
+
return yield this._program.methods.refreshVesting().accountsPartial({
|
|
7966
|
+
position,
|
|
7967
|
+
positionNftAccount,
|
|
7968
|
+
pool,
|
|
7969
|
+
owner
|
|
7970
|
+
}).remainingAccounts(
|
|
7971
|
+
vestingAccounts.map((pubkey) => {
|
|
7972
|
+
return {
|
|
7973
|
+
isSigner: false,
|
|
7974
|
+
isWritable: true,
|
|
7975
|
+
pubkey
|
|
7976
|
+
};
|
|
7977
|
+
})
|
|
7978
|
+
).instruction();
|
|
7979
|
+
});
|
|
7980
|
+
}
|
|
7981
|
+
/**
|
|
7982
|
+
* Helper function that builds instructions to claim fees, remove liquidity, and close a position
|
|
7983
|
+
* @param {BuildLiquidatePositionInstructionParams} params - Parameters for liquidating a position
|
|
7984
|
+
* @returns {Promise<TransactionInstruction[]>} Array of instructions
|
|
7985
|
+
* @private
|
|
7986
|
+
*/
|
|
7987
|
+
buildLiquidatePositionInstruction(params) {
|
|
7988
|
+
return __async(this, null, function* () {
|
|
7989
|
+
const {
|
|
7990
|
+
owner,
|
|
7991
|
+
position,
|
|
7992
|
+
positionNftAccount,
|
|
7993
|
+
positionState,
|
|
7994
|
+
poolState,
|
|
7995
|
+
tokenAAccount,
|
|
7996
|
+
tokenBAccount,
|
|
7997
|
+
tokenAAmountThreshold,
|
|
7998
|
+
tokenBAmountThreshold
|
|
7999
|
+
} = params;
|
|
8000
|
+
const { nftMint: positionNftMint, pool } = positionState;
|
|
8001
|
+
const { tokenAMint, tokenBMint, tokenAVault, tokenBVault } = poolState;
|
|
8002
|
+
const tokenAProgram = getTokenProgram(poolState.tokenAFlag);
|
|
8003
|
+
const tokenBProgram = getTokenProgram(poolState.tokenBFlag);
|
|
8004
|
+
const instructions = [];
|
|
8005
|
+
const claimPositionFeeInstruction = yield this.buildClaimPositionFeeInstruction({
|
|
8006
|
+
owner,
|
|
8007
|
+
poolAuthority: this.poolAuthority,
|
|
8008
|
+
pool,
|
|
8009
|
+
position,
|
|
8010
|
+
positionNftAccount,
|
|
8011
|
+
tokenAAccount,
|
|
8012
|
+
tokenBAccount,
|
|
8013
|
+
tokenAVault,
|
|
8014
|
+
tokenBVault,
|
|
8015
|
+
tokenAMint,
|
|
8016
|
+
tokenBMint,
|
|
8017
|
+
tokenAProgram,
|
|
8018
|
+
tokenBProgram
|
|
8019
|
+
});
|
|
8020
|
+
instructions.push(claimPositionFeeInstruction);
|
|
8021
|
+
const removeAllLiquidityInstruction = yield this.buildRemoveAllLiquidityInstruction({
|
|
8022
|
+
poolAuthority: this.poolAuthority,
|
|
8023
|
+
owner,
|
|
8024
|
+
pool,
|
|
8025
|
+
position,
|
|
8026
|
+
positionNftAccount,
|
|
8027
|
+
tokenAAccount,
|
|
8028
|
+
tokenBAccount,
|
|
8029
|
+
tokenAAmountThreshold,
|
|
8030
|
+
tokenBAmountThreshold,
|
|
8031
|
+
tokenAMint,
|
|
8032
|
+
tokenBMint,
|
|
8033
|
+
tokenAVault,
|
|
8034
|
+
tokenBVault,
|
|
8035
|
+
tokenAProgram,
|
|
8036
|
+
tokenBProgram
|
|
8037
|
+
});
|
|
8038
|
+
instructions.push(removeAllLiquidityInstruction);
|
|
8039
|
+
const closePositionInstruction = yield this.buildClosePositionInstruction({
|
|
8040
|
+
owner,
|
|
8041
|
+
poolAuthority: this.poolAuthority,
|
|
8042
|
+
pool,
|
|
8043
|
+
position,
|
|
8044
|
+
positionNftMint,
|
|
8045
|
+
positionNftAccount
|
|
8046
|
+
});
|
|
8047
|
+
instructions.push(closePositionInstruction);
|
|
8048
|
+
return instructions;
|
|
8049
|
+
});
|
|
8050
|
+
}
|
|
8051
|
+
/**
|
|
8052
|
+
* Builds a instruction to create a position.
|
|
8053
|
+
* @param {CreatePositionParams} params - Parameters for position creation.
|
|
8054
|
+
* @returns Transaction instruction.
|
|
8055
|
+
*/
|
|
8056
|
+
buildCreatePositionInstruction(params) {
|
|
8057
|
+
return __async(this, null, function* () {
|
|
8058
|
+
const { owner, payer, pool, positionNft } = params;
|
|
8059
|
+
const position = derivePositionAddress(positionNft);
|
|
8060
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
8061
|
+
const ix = yield this._program.methods.createPosition().accountsPartial({
|
|
8062
|
+
owner,
|
|
8063
|
+
positionNftMint: positionNft,
|
|
8064
|
+
poolAuthority: this.poolAuthority,
|
|
8065
|
+
positionNftAccount,
|
|
8066
|
+
payer,
|
|
8067
|
+
pool,
|
|
8068
|
+
position,
|
|
8069
|
+
tokenProgram: _spltoken.TOKEN_2022_PROGRAM_ID,
|
|
8070
|
+
systemProgram: _web3js.SystemProgram.programId
|
|
8071
|
+
}).instruction();
|
|
8072
|
+
return {
|
|
8073
|
+
ix,
|
|
8074
|
+
position,
|
|
8075
|
+
positionNftAccount
|
|
8076
|
+
};
|
|
8077
|
+
});
|
|
8078
|
+
}
|
|
8079
|
+
/**
|
|
8080
|
+
* Private helper method to prepare common customizable pool creation logic
|
|
8081
|
+
* @param {PrepareCustomizablePoolParams} params - Common parameters for pool creation
|
|
8082
|
+
* @returns Prepared transaction data including instructions and accounts
|
|
8083
|
+
*/
|
|
8084
|
+
prepareCreateCustomizablePoolParams(params) {
|
|
8085
|
+
return __async(this, null, function* () {
|
|
8086
|
+
const {
|
|
8087
|
+
pool,
|
|
8088
|
+
tokenAMint,
|
|
8089
|
+
tokenBMint,
|
|
8090
|
+
tokenAAmount,
|
|
8091
|
+
tokenBAmount,
|
|
8092
|
+
payer,
|
|
8093
|
+
positionNft,
|
|
8094
|
+
tokenAProgram,
|
|
8095
|
+
tokenBProgram
|
|
8096
|
+
} = params;
|
|
8097
|
+
const position = derivePositionAddress(positionNft);
|
|
8098
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
8099
|
+
const tokenAVault = deriveTokenVaultAddress(tokenAMint, pool);
|
|
8100
|
+
const tokenBVault = deriveTokenVaultAddress(tokenBMint, pool);
|
|
8101
|
+
const {
|
|
8102
|
+
tokenAAta: payerTokenA,
|
|
8103
|
+
tokenBAta: payerTokenB,
|
|
8104
|
+
instructions: preInstructions
|
|
8105
|
+
} = yield this.prepareTokenAccounts(
|
|
8106
|
+
payer,
|
|
8107
|
+
tokenAMint,
|
|
8108
|
+
tokenBMint,
|
|
8109
|
+
tokenAProgram,
|
|
8110
|
+
tokenBProgram
|
|
8111
|
+
);
|
|
8112
|
+
if (tokenAMint.equals(_spltoken.NATIVE_MINT)) {
|
|
8113
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
8114
|
+
payer,
|
|
8115
|
+
payerTokenA,
|
|
8116
|
+
BigInt(tokenAAmount.toString())
|
|
8117
|
+
);
|
|
8118
|
+
preInstructions.push(...wrapSOLIx);
|
|
8119
|
+
}
|
|
8120
|
+
if (tokenBMint.equals(_spltoken.NATIVE_MINT)) {
|
|
8121
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
8122
|
+
payer,
|
|
8123
|
+
payerTokenB,
|
|
8124
|
+
BigInt(tokenBAmount.toString())
|
|
8125
|
+
);
|
|
8126
|
+
preInstructions.push(...wrapSOLIx);
|
|
8127
|
+
}
|
|
8128
|
+
const tokenBadgeAccounts = this.getTokenBadgeAccounts(
|
|
8129
|
+
tokenAMint,
|
|
8130
|
+
tokenBMint
|
|
8131
|
+
);
|
|
8132
|
+
return {
|
|
8133
|
+
position,
|
|
8134
|
+
positionNftAccount,
|
|
8135
|
+
tokenAVault,
|
|
8136
|
+
tokenBVault,
|
|
8137
|
+
payerTokenA,
|
|
8138
|
+
payerTokenB,
|
|
8139
|
+
preInstructions,
|
|
8140
|
+
tokenBadgeAccounts
|
|
8141
|
+
};
|
|
8142
|
+
});
|
|
8143
|
+
}
|
|
8144
|
+
//// ANCHOR: GETTER/FETCHER FUNCTIONS //////
|
|
8145
|
+
/**
|
|
8146
|
+
* Fetches the Config state of the program.
|
|
8147
|
+
* @param config - Public key of the config account.
|
|
8148
|
+
* @returns Parsed ConfigState.
|
|
8149
|
+
*/
|
|
8150
|
+
fetchConfigState(config) {
|
|
8151
|
+
return __async(this, null, function* () {
|
|
8152
|
+
const configState = yield this._program.account.config.fetchNullable(
|
|
8153
|
+
config
|
|
8154
|
+
);
|
|
8155
|
+
_invariant2.default.call(void 0, configState, `Config account: ${config} not found`);
|
|
8156
|
+
return configState;
|
|
8157
|
+
});
|
|
8158
|
+
}
|
|
8159
|
+
/**
|
|
8160
|
+
* Fetches the Pool state.
|
|
8161
|
+
* @param pool - Public key of the pool.
|
|
8162
|
+
* @returns Parsed PoolState.
|
|
8163
|
+
*/
|
|
8164
|
+
fetchPoolState(pool) {
|
|
8165
|
+
return __async(this, null, function* () {
|
|
8166
|
+
const poolState = yield this._program.account.pool.fetchNullable(pool);
|
|
8167
|
+
_invariant2.default.call(void 0, poolState, `Pool account: ${pool} not found`);
|
|
8168
|
+
return poolState;
|
|
8169
|
+
});
|
|
8170
|
+
}
|
|
8171
|
+
/**
|
|
8172
|
+
* Fetches the Position state.
|
|
8173
|
+
* @param position - Public key of the position.
|
|
8174
|
+
* @returns Parsed PositionState.
|
|
8175
|
+
*/
|
|
6884
8176
|
fetchPositionState(position) {
|
|
6885
8177
|
return __async(this, null, function* () {
|
|
6886
8178
|
const positionState = yield this._program.account.position.fetchNullable(
|
|
@@ -6890,165 +8182,476 @@ var CpAmm = class {
|
|
|
6890
8182
|
return positionState;
|
|
6891
8183
|
});
|
|
6892
8184
|
}
|
|
8185
|
+
/**
|
|
8186
|
+
* Retrieves all config accounts.
|
|
8187
|
+
* @returns Array of config public keys and their states.
|
|
8188
|
+
*/
|
|
6893
8189
|
getAllConfigs() {
|
|
6894
8190
|
return __async(this, null, function* () {
|
|
6895
8191
|
const configAccounts = yield this._program.account.config.all();
|
|
6896
8192
|
return configAccounts;
|
|
6897
8193
|
});
|
|
6898
8194
|
}
|
|
8195
|
+
/**
|
|
8196
|
+
* Retrieves all pool accounts.
|
|
8197
|
+
* @returns Array of pool public keys and their states.
|
|
8198
|
+
*/
|
|
6899
8199
|
getAllPools() {
|
|
6900
8200
|
return __async(this, null, function* () {
|
|
6901
8201
|
const poolAccounts = yield this._program.account.pool.all();
|
|
6902
8202
|
return poolAccounts;
|
|
6903
8203
|
});
|
|
6904
8204
|
}
|
|
8205
|
+
/**
|
|
8206
|
+
* Retrieves all position accounts.
|
|
8207
|
+
* @returns Array of position public keys and their states.
|
|
8208
|
+
*/
|
|
6905
8209
|
getAllPositions() {
|
|
6906
8210
|
return __async(this, null, function* () {
|
|
6907
8211
|
const poolAccounts = yield this._program.account.position.all();
|
|
6908
8212
|
return poolAccounts;
|
|
6909
8213
|
});
|
|
6910
8214
|
}
|
|
6911
|
-
|
|
8215
|
+
/**
|
|
8216
|
+
* Gets all positions a specific pool.
|
|
8217
|
+
* @param pool - Public key of the pool.
|
|
8218
|
+
* @returns List of user positions for the pool.
|
|
8219
|
+
*/
|
|
8220
|
+
getAllPositionsByPool(pool) {
|
|
6912
8221
|
return __async(this, null, function* () {
|
|
6913
|
-
|
|
8222
|
+
return yield this._program.account.position.all([
|
|
6914
8223
|
positionByPoolFilter(pool)
|
|
6915
8224
|
]);
|
|
6916
|
-
const result = [];
|
|
6917
|
-
for (const position of positions) {
|
|
6918
|
-
const largesTokenAccount = yield this._program.provider.connection.getTokenLargestAccounts(
|
|
6919
|
-
position.account.nftMint
|
|
6920
|
-
);
|
|
6921
|
-
const accountInfo = yield this._program.provider.connection.getParsedAccountInfo(
|
|
6922
|
-
largesTokenAccount.value[0].address
|
|
6923
|
-
);
|
|
6924
|
-
const owner = new (0, _web3js.PublicKey)(accountInfo.value.data.parsed.info.owner);
|
|
6925
|
-
if (owner.equals(user)) {
|
|
6926
|
-
result.push(position);
|
|
6927
|
-
}
|
|
6928
|
-
}
|
|
6929
|
-
return result;
|
|
6930
8225
|
});
|
|
6931
8226
|
}
|
|
8227
|
+
/**
|
|
8228
|
+
* Gets all positions of a user for a specific pool.
|
|
8229
|
+
* @param pool - Public key of the pool.
|
|
8230
|
+
* @param user - Public key of the user.
|
|
8231
|
+
* @returns List of user positions for the pool.
|
|
8232
|
+
*/
|
|
8233
|
+
getUserPositionByPool(pool, user) {
|
|
8234
|
+
return __async(this, null, function* () {
|
|
8235
|
+
const allUserPositions = yield this.getPositionsByUser(user);
|
|
8236
|
+
return allUserPositions.filter(
|
|
8237
|
+
(position) => position.positionState.pool.equals(pool)
|
|
8238
|
+
);
|
|
8239
|
+
});
|
|
8240
|
+
}
|
|
8241
|
+
/**
|
|
8242
|
+
* Gets all positions of a user across all pools.
|
|
8243
|
+
* @param user - Public key of the user.
|
|
8244
|
+
* @returns Array of user positions already sorted by liquidity
|
|
8245
|
+
*/
|
|
6932
8246
|
getPositionsByUser(user) {
|
|
6933
8247
|
return __async(this, null, function* () {
|
|
6934
|
-
const
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
8248
|
+
const userPositionAccounts = yield getAllPositionNftAccountByOwner(
|
|
8249
|
+
this._program.provider.connection,
|
|
8250
|
+
user
|
|
8251
|
+
);
|
|
8252
|
+
if (userPositionAccounts.length === 0) {
|
|
8253
|
+
return [];
|
|
8254
|
+
}
|
|
8255
|
+
const positionAddresses = userPositionAccounts.map(
|
|
8256
|
+
(account) => derivePositionAddress(account.positionNft)
|
|
8257
|
+
);
|
|
8258
|
+
const positionStates = yield this._program.account.position.fetchMultiple(
|
|
8259
|
+
positionAddresses
|
|
8260
|
+
);
|
|
8261
|
+
const positionResult = userPositionAccounts.map((account, index) => {
|
|
8262
|
+
const positionState = positionStates[index];
|
|
8263
|
+
if (!positionState) return null;
|
|
8264
|
+
return {
|
|
8265
|
+
positionNftAccount: account.positionNftAccount,
|
|
8266
|
+
position: positionAddresses[index],
|
|
8267
|
+
positionState
|
|
8268
|
+
};
|
|
8269
|
+
}).filter(Boolean);
|
|
8270
|
+
positionResult.sort((a, b) => {
|
|
8271
|
+
const totalLiquidityA = a.positionState.vestedLiquidity.add(a.positionState.permanentLockedLiquidity).add(a.positionState.unlockedLiquidity);
|
|
8272
|
+
const totalLiquidityB = b.positionState.vestedLiquidity.add(b.positionState.permanentLockedLiquidity).add(b.positionState.unlockedLiquidity);
|
|
8273
|
+
return totalLiquidityB.cmp(totalLiquidityA);
|
|
8274
|
+
});
|
|
8275
|
+
return positionResult;
|
|
8276
|
+
});
|
|
8277
|
+
}
|
|
8278
|
+
getAllVestingsByPosition(position) {
|
|
8279
|
+
return __async(this, null, function* () {
|
|
8280
|
+
const vestings = yield this._program.account.vesting.all([
|
|
8281
|
+
vestingByPositionFilter(position)
|
|
8282
|
+
]);
|
|
8283
|
+
return vestings;
|
|
8284
|
+
});
|
|
8285
|
+
}
|
|
8286
|
+
isLockedPosition(position) {
|
|
8287
|
+
const totalLockedLiquidity = position.vestedLiquidity.add(
|
|
8288
|
+
position.permanentLockedLiquidity
|
|
8289
|
+
);
|
|
8290
|
+
return totalLockedLiquidity.gtn(0);
|
|
8291
|
+
}
|
|
8292
|
+
isPermanentLockedPosition(positionState) {
|
|
8293
|
+
return positionState.permanentLockedLiquidity.gtn(0);
|
|
8294
|
+
}
|
|
8295
|
+
/**
|
|
8296
|
+
* Checks if a position can be unlocked based on its locking state and vesting schedules.
|
|
8297
|
+
*
|
|
8298
|
+
* This method evaluates whether a position is eligible for operations that require
|
|
8299
|
+
* unlocked liquidity, such as removing all liquidity or closing the position. It checks both
|
|
8300
|
+
* permanent locks and time-based vesting schedules.
|
|
8301
|
+
*
|
|
8302
|
+
* @private
|
|
8303
|
+
* @param {PositionState} positionState - The current state of the position
|
|
8304
|
+
* @param {Array<{account: PublicKey; vestingState: VestingState}>} vestings - Array of vesting accounts and their states
|
|
8305
|
+
* @param {BN} currentPoint - Current timestamp or slot number (depending on activation type of pool)
|
|
8306
|
+
*
|
|
8307
|
+
* @returns {Object} Result object containing unlock status and reason
|
|
8308
|
+
* @returns {boolean} result.canUnlock - Whether the position can be unlocked
|
|
8309
|
+
* @returns {string|undefined} result.reason - Reason why position cannot be unlocked (if applicable)
|
|
8310
|
+
*/
|
|
8311
|
+
canUnlockPosition(positionState, vestings, currentPoint) {
|
|
8312
|
+
if (vestings.length > 0) {
|
|
8313
|
+
if (this.isPermanentLockedPosition(positionState)) {
|
|
8314
|
+
return {
|
|
8315
|
+
canUnlock: false,
|
|
8316
|
+
reason: "Position is permanently locked"
|
|
8317
|
+
};
|
|
8318
|
+
}
|
|
8319
|
+
for (const vesting of vestings) {
|
|
8320
|
+
if (!isVestingComplete(vesting.vestingState, currentPoint)) {
|
|
8321
|
+
return {
|
|
8322
|
+
canUnlock: false,
|
|
8323
|
+
reason: "Position has incomplete vesting schedule"
|
|
8324
|
+
};
|
|
6947
8325
|
}
|
|
6948
8326
|
}
|
|
6949
|
-
|
|
6950
|
-
}
|
|
8327
|
+
}
|
|
8328
|
+
return { canUnlock: true };
|
|
6951
8329
|
}
|
|
6952
|
-
|
|
8330
|
+
isPoolExist(pool) {
|
|
6953
8331
|
return __async(this, null, function* () {
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
const {
|
|
6957
|
-
sqrtPrice: sqrtPriceQ64,
|
|
6958
|
-
liquidity: liquidityQ64,
|
|
6959
|
-
activationType,
|
|
6960
|
-
activationPoint,
|
|
6961
|
-
collectFeeMode,
|
|
6962
|
-
poolFees
|
|
6963
|
-
} = poolState;
|
|
6964
|
-
const {
|
|
6965
|
-
feeSchedulerMode,
|
|
6966
|
-
cliffFeeNumerator,
|
|
6967
|
-
numberOfPeriod,
|
|
6968
|
-
reductionFactor,
|
|
6969
|
-
periodFrequency
|
|
6970
|
-
} = poolFees.baseFee;
|
|
6971
|
-
const dynamicFee = poolFees.dynamicFee;
|
|
6972
|
-
const aToB = poolState.tokenAMint.equals(inputTokenMint);
|
|
6973
|
-
const slot = yield this._program.provider.connection.getSlot();
|
|
6974
|
-
const blockInfo = yield this._program.provider.connection.getBlock(slot, {
|
|
6975
|
-
maxSupportedTransactionVersion: 0
|
|
6976
|
-
});
|
|
6977
|
-
const currentTime = (_a = blockInfo == null ? void 0 : blockInfo.blockTime) != null ? _a : Math.floor(Date.now() / 1e3);
|
|
6978
|
-
const currentPoint = activationType ? currentTime : slot;
|
|
6979
|
-
let dynamicFeeParams;
|
|
6980
|
-
if (dynamicFee.initialized) {
|
|
6981
|
-
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFee;
|
|
6982
|
-
dynamicFeeParams = { volatilityAccumulator, binStep, variableFeeControl };
|
|
6983
|
-
}
|
|
6984
|
-
const tradeFeeNumerator = getFeeNumerator(
|
|
6985
|
-
currentPoint,
|
|
6986
|
-
activationPoint,
|
|
6987
|
-
numberOfPeriod,
|
|
6988
|
-
periodFrequency,
|
|
6989
|
-
feeSchedulerMode,
|
|
6990
|
-
cliffFeeNumerator,
|
|
6991
|
-
reductionFactor,
|
|
6992
|
-
dynamicFeeParams
|
|
6993
|
-
);
|
|
6994
|
-
const { amountOutExcludedlpFee, lpFee } = calculateSwap(
|
|
6995
|
-
inAmount,
|
|
6996
|
-
sqrtPriceQ64,
|
|
6997
|
-
liquidityQ64,
|
|
6998
|
-
tradeFeeNumerator,
|
|
6999
|
-
aToB,
|
|
7000
|
-
collectFeeMode
|
|
7001
|
-
);
|
|
7002
|
-
const minSwapOutAmount = getMinAmountWithSlippage(
|
|
7003
|
-
amountOutExcludedlpFee,
|
|
7004
|
-
slippage
|
|
7005
|
-
);
|
|
7006
|
-
return {
|
|
7007
|
-
swapInAmount: inAmount,
|
|
7008
|
-
swapOutAmount: amountOutExcludedlpFee,
|
|
7009
|
-
minSwapOutAmount,
|
|
7010
|
-
totalFee: lpFee,
|
|
7011
|
-
priceImpact: getPriceImpact(minSwapOutAmount, amountOutExcludedlpFee)
|
|
7012
|
-
};
|
|
8332
|
+
const poolState = yield this._program.account.pool.fetchNullable(pool);
|
|
8333
|
+
return poolState !== null;
|
|
7013
8334
|
});
|
|
7014
8335
|
}
|
|
7015
8336
|
/**
|
|
7016
|
-
* Computes the liquidity delta based on the provided token amounts and
|
|
7017
|
-
*
|
|
7018
|
-
* @param {LiquidityDeltaParams} params - The parameters for liquidity calculation, including:
|
|
7019
|
-
* - tokenX: The mint address of token X.
|
|
7020
|
-
* - tokenY: The mint address of token Y.
|
|
7021
|
-
* - maxAmountX: The maximum amount of token X available.
|
|
7022
|
-
* - maxAmountY: The maximum amount of token Y available.
|
|
7023
|
-
* - pool: The address of the liquidity pool.
|
|
8337
|
+
* Computes the liquidity delta based on the provided token amounts and sqrt price
|
|
7024
8338
|
*
|
|
8339
|
+
* @param {LiquidityDeltaParams} params - The parameters for liquidity calculation
|
|
7025
8340
|
* @returns {Promise<BN>} - The computed liquidity delta in Q64 value.
|
|
7026
8341
|
*/
|
|
7027
8342
|
getLiquidityDelta(params) {
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
8343
|
+
const {
|
|
8344
|
+
maxAmountTokenA,
|
|
8345
|
+
maxAmountTokenB,
|
|
8346
|
+
sqrtMaxPrice,
|
|
8347
|
+
sqrtMinPrice,
|
|
8348
|
+
sqrtPrice
|
|
8349
|
+
} = params;
|
|
8350
|
+
const liquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA(
|
|
8351
|
+
maxAmountTokenA,
|
|
8352
|
+
sqrtPrice,
|
|
8353
|
+
sqrtMaxPrice
|
|
8354
|
+
);
|
|
8355
|
+
const liquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB(
|
|
8356
|
+
maxAmountTokenB,
|
|
8357
|
+
sqrtMinPrice,
|
|
8358
|
+
sqrtPrice
|
|
8359
|
+
);
|
|
8360
|
+
return _bnjs.min.call(void 0, liquidityDeltaFromAmountA, liquidityDeltaFromAmountB);
|
|
8361
|
+
}
|
|
8362
|
+
/**
|
|
8363
|
+
* Calculates swap quote based on input amount and pool state.
|
|
8364
|
+
* @param params - Swap parameters including input amount, pool state, slippage, etc.
|
|
8365
|
+
* @returns Swap quote including expected output amount, fee, and price impact.
|
|
8366
|
+
*/
|
|
8367
|
+
getQuote(params) {
|
|
8368
|
+
const {
|
|
8369
|
+
inAmount,
|
|
8370
|
+
inputTokenMint,
|
|
8371
|
+
slippage,
|
|
8372
|
+
poolState,
|
|
8373
|
+
currentTime,
|
|
8374
|
+
currentSlot,
|
|
8375
|
+
inputTokenInfo,
|
|
8376
|
+
outputTokenInfo
|
|
8377
|
+
} = params;
|
|
8378
|
+
const {
|
|
8379
|
+
sqrtPrice: sqrtPriceQ64,
|
|
8380
|
+
liquidity: liquidityQ64,
|
|
8381
|
+
activationType,
|
|
8382
|
+
activationPoint,
|
|
8383
|
+
collectFeeMode,
|
|
8384
|
+
poolFees
|
|
8385
|
+
} = poolState;
|
|
8386
|
+
const {
|
|
8387
|
+
feeSchedulerMode,
|
|
8388
|
+
cliffFeeNumerator,
|
|
8389
|
+
numberOfPeriod,
|
|
8390
|
+
reductionFactor,
|
|
8391
|
+
periodFrequency
|
|
8392
|
+
} = poolFees.baseFee;
|
|
8393
|
+
const dynamicFee = poolFees.dynamicFee;
|
|
8394
|
+
let actualAmountIn = inAmount;
|
|
8395
|
+
if (inputTokenInfo) {
|
|
8396
|
+
actualAmountIn = calculateTransferFeeExcludedAmount(
|
|
8397
|
+
inAmount,
|
|
8398
|
+
inputTokenInfo.mint,
|
|
8399
|
+
inputTokenInfo.currentEpoch
|
|
8400
|
+
).amount;
|
|
8401
|
+
}
|
|
8402
|
+
const aToB = poolState.tokenAMint.equals(inputTokenMint);
|
|
8403
|
+
const currentPoint = activationType ? currentTime : currentSlot;
|
|
8404
|
+
let dynamicFeeParams;
|
|
8405
|
+
if (dynamicFee.initialized) {
|
|
8406
|
+
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFee;
|
|
8407
|
+
dynamicFeeParams = { volatilityAccumulator, binStep, variableFeeControl };
|
|
8408
|
+
}
|
|
8409
|
+
const tradeFeeNumerator = getFeeNumerator(
|
|
8410
|
+
currentPoint,
|
|
8411
|
+
activationPoint,
|
|
8412
|
+
numberOfPeriod,
|
|
8413
|
+
periodFrequency,
|
|
8414
|
+
feeSchedulerMode,
|
|
8415
|
+
cliffFeeNumerator,
|
|
8416
|
+
reductionFactor,
|
|
8417
|
+
dynamicFeeParams
|
|
8418
|
+
);
|
|
8419
|
+
const { amountOut, totalFee } = getSwapAmount(
|
|
8420
|
+
actualAmountIn,
|
|
8421
|
+
sqrtPriceQ64,
|
|
8422
|
+
liquidityQ64,
|
|
8423
|
+
tradeFeeNumerator,
|
|
8424
|
+
aToB,
|
|
8425
|
+
collectFeeMode
|
|
8426
|
+
);
|
|
8427
|
+
let actualAmountOut = amountOut;
|
|
8428
|
+
if (outputTokenInfo) {
|
|
8429
|
+
actualAmountOut = calculateTransferFeeExcludedAmount(
|
|
8430
|
+
amountOut,
|
|
8431
|
+
outputTokenInfo.mint,
|
|
8432
|
+
outputTokenInfo.currentEpoch
|
|
8433
|
+
).amount;
|
|
8434
|
+
}
|
|
8435
|
+
const minSwapOutAmount = getMinAmountWithSlippage(
|
|
8436
|
+
actualAmountOut,
|
|
8437
|
+
slippage
|
|
8438
|
+
);
|
|
8439
|
+
return {
|
|
8440
|
+
swapInAmount: inAmount,
|
|
8441
|
+
consumedInAmount: actualAmountIn,
|
|
8442
|
+
swapOutAmount: actualAmountOut,
|
|
8443
|
+
minSwapOutAmount,
|
|
8444
|
+
totalFee,
|
|
8445
|
+
priceImpact: getPriceImpact(minSwapOutAmount, actualAmountOut)
|
|
8446
|
+
};
|
|
8447
|
+
}
|
|
8448
|
+
/**
|
|
8449
|
+
* Calculates the deposit quote for liquidity pool.
|
|
8450
|
+
*
|
|
8451
|
+
* @param {GetDepositQuoteParams} params - The parameters for calculating the deposit quote.
|
|
8452
|
+
*
|
|
8453
|
+
* @returns {Promise<Object>} Deposit quote results
|
|
8454
|
+
* @returns {BN} returns.actualInputAmount - The actual amount used as input (after deducting transfer fees).
|
|
8455
|
+
* @returns {BN} returns.outputAmount - The calculated corresponding amount of the other token.
|
|
8456
|
+
* @returns {BN} returns.liquidityDelta - The amount of liquidity that will be added to the pool.
|
|
8457
|
+
*/
|
|
8458
|
+
getDepositQuote(params) {
|
|
8459
|
+
const {
|
|
8460
|
+
inAmount,
|
|
8461
|
+
isTokenA,
|
|
8462
|
+
inputTokenInfo,
|
|
8463
|
+
outputTokenInfo,
|
|
8464
|
+
minSqrtPrice,
|
|
8465
|
+
maxSqrtPrice,
|
|
8466
|
+
sqrtPrice
|
|
8467
|
+
} = params;
|
|
8468
|
+
const actualAmountIn = inputTokenInfo ? calculateTransferFeeExcludedAmount(
|
|
8469
|
+
inAmount,
|
|
8470
|
+
inputTokenInfo.mint,
|
|
8471
|
+
inputTokenInfo.currentEpoch
|
|
8472
|
+
).amount : inAmount;
|
|
8473
|
+
const { liquidityDelta, rawAmount } = isTokenA ? {
|
|
8474
|
+
liquidityDelta: getLiquidityDeltaFromAmountA(
|
|
8475
|
+
actualAmountIn,
|
|
7038
8476
|
sqrtPrice,
|
|
7039
|
-
|
|
7040
|
-
)
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
8477
|
+
maxSqrtPrice
|
|
8478
|
+
),
|
|
8479
|
+
rawAmount: (delta) => getAmountBFromLiquidityDelta(
|
|
8480
|
+
delta,
|
|
8481
|
+
sqrtPrice,
|
|
8482
|
+
minSqrtPrice,
|
|
8483
|
+
0 /* Up */
|
|
8484
|
+
)
|
|
8485
|
+
} : {
|
|
8486
|
+
liquidityDelta: getLiquidityDeltaFromAmountB(
|
|
8487
|
+
actualAmountIn,
|
|
8488
|
+
minSqrtPrice,
|
|
7044
8489
|
sqrtPrice
|
|
7045
|
-
)
|
|
7046
|
-
|
|
7047
|
-
|
|
8490
|
+
),
|
|
8491
|
+
rawAmount: (delta) => getAmountAFromLiquidityDelta(
|
|
8492
|
+
delta,
|
|
8493
|
+
sqrtPrice,
|
|
8494
|
+
maxSqrtPrice,
|
|
8495
|
+
0 /* Up */
|
|
8496
|
+
)
|
|
8497
|
+
};
|
|
8498
|
+
const rawOutputAmount = new (0, _anchor.BN)(rawAmount(liquidityDelta));
|
|
8499
|
+
const outputAmount = outputTokenInfo ? calculateTransferFeeIncludedAmount(
|
|
8500
|
+
rawOutputAmount,
|
|
8501
|
+
outputTokenInfo.mint,
|
|
8502
|
+
outputTokenInfo.currentEpoch
|
|
8503
|
+
).amount : rawOutputAmount;
|
|
8504
|
+
return {
|
|
8505
|
+
actualInputAmount: actualAmountIn,
|
|
8506
|
+
consumedInputAmount: inAmount,
|
|
8507
|
+
liquidityDelta,
|
|
8508
|
+
outputAmount
|
|
8509
|
+
};
|
|
8510
|
+
}
|
|
8511
|
+
/**
|
|
8512
|
+
* Calculates the withdrawal quote for removing liquidity from a concentrated liquidity pool.
|
|
8513
|
+
*
|
|
8514
|
+
* @param {GetWithdrawQuoteParams} params - The parameters for calculating the withdraw quote
|
|
8515
|
+
*
|
|
8516
|
+
* @param {Object|null} params.tokenATokenInfo - must provide if token a is token2022
|
|
8517
|
+
* @param {Object|null} params.tokenBTokenInfo - must provide if token b is token2022
|
|
8518
|
+
*
|
|
8519
|
+
* @returns {Promise<Object>} Withdrawal quote results
|
|
8520
|
+
* @returns {BN} returns.liquidityDelta - The amount of liquidity that will be removed from the pool
|
|
8521
|
+
* @returns {BN} returns.outAmountA - The calculated amount of token A to be received (after deducting transfer fees)
|
|
8522
|
+
* @returns {BN} returns.outAmountB - The calculated amount of token B to be received (after deducting transfer fees)
|
|
8523
|
+
*/
|
|
8524
|
+
getWithdrawQuote(params) {
|
|
8525
|
+
const {
|
|
8526
|
+
liquidityDelta,
|
|
8527
|
+
sqrtPrice,
|
|
8528
|
+
maxSqrtPrice,
|
|
8529
|
+
minSqrtPrice,
|
|
8530
|
+
tokenATokenInfo,
|
|
8531
|
+
tokenBTokenInfo
|
|
8532
|
+
} = params;
|
|
8533
|
+
const amountA = getAmountAFromLiquidityDelta(
|
|
8534
|
+
liquidityDelta,
|
|
8535
|
+
sqrtPrice,
|
|
8536
|
+
maxSqrtPrice,
|
|
8537
|
+
1 /* Down */
|
|
8538
|
+
);
|
|
8539
|
+
const amountB = getAmountBFromLiquidityDelta(
|
|
8540
|
+
liquidityDelta,
|
|
8541
|
+
sqrtPrice,
|
|
8542
|
+
minSqrtPrice,
|
|
8543
|
+
1 /* Down */
|
|
8544
|
+
);
|
|
8545
|
+
return {
|
|
8546
|
+
liquidityDelta,
|
|
8547
|
+
outAmountA: tokenATokenInfo ? calculateTransferFeeExcludedAmount(
|
|
8548
|
+
amountA,
|
|
8549
|
+
tokenATokenInfo.mint,
|
|
8550
|
+
tokenATokenInfo.currentEpoch
|
|
8551
|
+
).amount : amountA,
|
|
8552
|
+
outAmountB: tokenBTokenInfo ? calculateTransferFeeExcludedAmount(
|
|
8553
|
+
amountB,
|
|
8554
|
+
tokenBTokenInfo.mint,
|
|
8555
|
+
tokenBTokenInfo.currentEpoch
|
|
8556
|
+
).amount : amountB
|
|
8557
|
+
};
|
|
8558
|
+
}
|
|
8559
|
+
/**
|
|
8560
|
+
* Calculates liquidity and corresponding token amounts for token A single-sided pool creation
|
|
8561
|
+
* Only supports initialization where initial price equals min sqrt price
|
|
8562
|
+
* @param params Parameters for single-sided pool creation
|
|
8563
|
+
* @returns Calculated liquidity delta
|
|
8564
|
+
*/
|
|
8565
|
+
preparePoolCreationSingleSide(params) {
|
|
8566
|
+
const {
|
|
8567
|
+
tokenAAmount,
|
|
8568
|
+
initSqrtPrice,
|
|
8569
|
+
minSqrtPrice,
|
|
8570
|
+
maxSqrtPrice,
|
|
8571
|
+
tokenAInfo
|
|
8572
|
+
} = params;
|
|
8573
|
+
if (!initSqrtPrice.eq(minSqrtPrice)) {
|
|
8574
|
+
throw new Error("Only support single side for base token.");
|
|
8575
|
+
}
|
|
8576
|
+
const actualAmountIn = tokenAInfo ? tokenAAmount.sub(
|
|
8577
|
+
calculateTransferFeeIncludedAmount(
|
|
8578
|
+
tokenAAmount,
|
|
8579
|
+
tokenAInfo.mint,
|
|
8580
|
+
tokenAInfo.currentEpoch
|
|
8581
|
+
).transferFee
|
|
8582
|
+
) : tokenAAmount;
|
|
8583
|
+
const liquidityDelta = getLiquidityDeltaFromAmountA(
|
|
8584
|
+
actualAmountIn,
|
|
8585
|
+
initSqrtPrice,
|
|
8586
|
+
maxSqrtPrice
|
|
8587
|
+
);
|
|
8588
|
+
return liquidityDelta;
|
|
8589
|
+
}
|
|
8590
|
+
/**
|
|
8591
|
+
* Prepares parameters required for pool creation, including initial sqrt price and liquidity.
|
|
8592
|
+
* @private
|
|
8593
|
+
* @param {PreparePoolCreationParams} params - Initial token amounts for pool creation.
|
|
8594
|
+
* @returns init sqrt price and liquidity in Q64 format.
|
|
8595
|
+
*/
|
|
8596
|
+
preparePoolCreationParams(params) {
|
|
8597
|
+
const {
|
|
8598
|
+
tokenAAmount,
|
|
8599
|
+
tokenBAmount,
|
|
8600
|
+
minSqrtPrice,
|
|
8601
|
+
maxSqrtPrice,
|
|
8602
|
+
tokenAInfo,
|
|
8603
|
+
tokenBInfo
|
|
8604
|
+
} = params;
|
|
8605
|
+
if (tokenAAmount.eq(new (0, _anchor.BN)(0)) && tokenBAmount.eq(new (0, _anchor.BN)(0))) {
|
|
8606
|
+
throw new Error("Invalid input amount");
|
|
8607
|
+
}
|
|
8608
|
+
const actualAmountAIn = tokenAInfo ? tokenAAmount.sub(
|
|
8609
|
+
calculateTransferFeeIncludedAmount(
|
|
8610
|
+
tokenAAmount,
|
|
8611
|
+
tokenAInfo.mint,
|
|
8612
|
+
tokenAInfo.currentEpoch
|
|
8613
|
+
).transferFee
|
|
8614
|
+
) : tokenAAmount;
|
|
8615
|
+
const actualAmountBIn = tokenBInfo ? tokenBAmount.sub(
|
|
8616
|
+
calculateTransferFeeIncludedAmount(
|
|
8617
|
+
tokenBAmount,
|
|
8618
|
+
tokenBInfo.mint,
|
|
8619
|
+
tokenBInfo.currentEpoch
|
|
8620
|
+
).transferFee
|
|
8621
|
+
) : tokenBAmount;
|
|
8622
|
+
const initSqrtPrice = calculateInitSqrtPrice(
|
|
8623
|
+
tokenAAmount,
|
|
8624
|
+
tokenBAmount,
|
|
8625
|
+
minSqrtPrice,
|
|
8626
|
+
maxSqrtPrice
|
|
8627
|
+
);
|
|
8628
|
+
const liquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA(
|
|
8629
|
+
actualAmountAIn,
|
|
8630
|
+
initSqrtPrice,
|
|
8631
|
+
maxSqrtPrice
|
|
8632
|
+
);
|
|
8633
|
+
const liquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB(
|
|
8634
|
+
actualAmountBIn,
|
|
8635
|
+
minSqrtPrice,
|
|
8636
|
+
initSqrtPrice
|
|
8637
|
+
);
|
|
8638
|
+
const liquidityDelta = _bnjs.min.call(void 0,
|
|
8639
|
+
liquidityDeltaFromAmountA,
|
|
8640
|
+
liquidityDeltaFromAmountB
|
|
8641
|
+
);
|
|
8642
|
+
return {
|
|
8643
|
+
initSqrtPrice,
|
|
8644
|
+
liquidityDelta
|
|
8645
|
+
};
|
|
7048
8646
|
}
|
|
8647
|
+
//// ANCHOR: MAIN ENDPOINT //////
|
|
8648
|
+
/**
|
|
8649
|
+
* Builds a transaction to create a permissionless pool.
|
|
8650
|
+
* @param params - Parameters for pool creation.
|
|
8651
|
+
* @returns Transaction builder.
|
|
8652
|
+
*/
|
|
7049
8653
|
createPool(params) {
|
|
7050
8654
|
return __async(this, null, function* () {
|
|
7051
|
-
var _a, _b, _c, _d;
|
|
7052
8655
|
const {
|
|
7053
8656
|
payer,
|
|
7054
8657
|
creator,
|
|
@@ -7056,70 +8659,61 @@ var CpAmm = class {
|
|
|
7056
8659
|
positionNft,
|
|
7057
8660
|
tokenAMint,
|
|
7058
8661
|
tokenBMint,
|
|
8662
|
+
initSqrtPrice,
|
|
8663
|
+
liquidityDelta,
|
|
7059
8664
|
activationPoint,
|
|
7060
8665
|
tokenAAmount,
|
|
7061
8666
|
tokenBAmount,
|
|
7062
|
-
|
|
7063
|
-
|
|
8667
|
+
tokenAProgram,
|
|
8668
|
+
tokenBProgram
|
|
7064
8669
|
} = params;
|
|
7065
|
-
const
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
config,
|
|
7076
|
-
tokenAMint,
|
|
7077
|
-
tokenBMint,
|
|
7078
|
-
this._program.programId
|
|
7079
|
-
);
|
|
7080
|
-
const position = derivePositionAddress(
|
|
7081
|
-
positionNft,
|
|
7082
|
-
this._program.programId
|
|
7083
|
-
);
|
|
7084
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7085
|
-
positionNft,
|
|
7086
|
-
this._program.programId
|
|
7087
|
-
);
|
|
7088
|
-
const tokenAProgram = (_b = (_a = yield this._program.provider.connection.getParsedAccountInfo(tokenAMint)) == null ? void 0 : _a.value) == null ? void 0 : _b.owner;
|
|
7089
|
-
const tokenBProgram = (_d = (_c = yield this._program.provider.connection.getParsedAccountInfo(tokenBMint)) == null ? void 0 : _c.value) == null ? void 0 : _d.owner;
|
|
7090
|
-
const payerTokenA = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
7091
|
-
tokenAMint,
|
|
8670
|
+
const pool = derivePoolAddress(config, tokenAMint, tokenBMint);
|
|
8671
|
+
const position = derivePositionAddress(positionNft);
|
|
8672
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
8673
|
+
const tokenAVault = deriveTokenVaultAddress(tokenAMint, pool);
|
|
8674
|
+
const tokenBVault = deriveTokenVaultAddress(tokenBMint, pool);
|
|
8675
|
+
const {
|
|
8676
|
+
tokenAAta: payerTokenA,
|
|
8677
|
+
tokenBAta: payerTokenB,
|
|
8678
|
+
instructions: preInstructions
|
|
8679
|
+
} = yield this.prepareTokenAccounts(
|
|
7092
8680
|
payer,
|
|
7093
|
-
|
|
7094
|
-
tokenAProgram
|
|
7095
|
-
);
|
|
7096
|
-
const payerTokenB = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
8681
|
+
tokenAMint,
|
|
7097
8682
|
tokenBMint,
|
|
7098
|
-
|
|
7099
|
-
true,
|
|
8683
|
+
tokenAProgram,
|
|
7100
8684
|
tokenBProgram
|
|
7101
8685
|
);
|
|
7102
|
-
|
|
8686
|
+
if (tokenAMint.equals(_spltoken.NATIVE_MINT)) {
|
|
8687
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
8688
|
+
payer,
|
|
8689
|
+
payerTokenA,
|
|
8690
|
+
BigInt(tokenAAmount.toString())
|
|
8691
|
+
);
|
|
8692
|
+
preInstructions.push(...wrapSOLIx);
|
|
8693
|
+
}
|
|
8694
|
+
if (tokenBMint.equals(_spltoken.NATIVE_MINT)) {
|
|
8695
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
8696
|
+
payer,
|
|
8697
|
+
payerTokenB,
|
|
8698
|
+
BigInt(tokenBAmount.toString())
|
|
8699
|
+
);
|
|
8700
|
+
preInstructions.push(...wrapSOLIx);
|
|
8701
|
+
}
|
|
8702
|
+
const tokenBadgeAccounts = this.getTokenBadgeAccounts(
|
|
7103
8703
|
tokenAMint,
|
|
7104
|
-
|
|
7105
|
-
this._program.programId
|
|
7106
|
-
);
|
|
7107
|
-
const tokenBVault = deriveTokenVaultAddress(
|
|
7108
|
-
tokenBMint,
|
|
7109
|
-
pool,
|
|
7110
|
-
this._program.programId
|
|
8704
|
+
tokenBMint
|
|
7111
8705
|
);
|
|
7112
8706
|
const tx = yield this._program.methods.initializePool({
|
|
7113
|
-
liquidity:
|
|
7114
|
-
sqrtPrice:
|
|
8707
|
+
liquidity: liquidityDelta,
|
|
8708
|
+
sqrtPrice: initSqrtPrice,
|
|
7115
8709
|
activationPoint
|
|
7116
|
-
}).
|
|
8710
|
+
}).accountsPartial({
|
|
7117
8711
|
creator,
|
|
7118
8712
|
positionNftAccount,
|
|
7119
8713
|
positionNftMint: positionNft,
|
|
7120
8714
|
payer,
|
|
7121
8715
|
config,
|
|
7122
|
-
poolAuthority,
|
|
8716
|
+
poolAuthority: this.poolAuthority,
|
|
7123
8717
|
pool,
|
|
7124
8718
|
position,
|
|
7125
8719
|
tokenAMint,
|
|
@@ -7131,13 +8725,16 @@ var CpAmm = class {
|
|
|
7131
8725
|
token2022Program: _spltoken.TOKEN_2022_PROGRAM_ID,
|
|
7132
8726
|
tokenAProgram,
|
|
7133
8727
|
tokenBProgram,
|
|
7134
|
-
systemProgram: _web3js.SystemProgram.programId
|
|
7135
|
-
|
|
7136
|
-
program: this._program.programId
|
|
7137
|
-
}).transaction();
|
|
8728
|
+
systemProgram: _web3js.SystemProgram.programId
|
|
8729
|
+
}).preInstructions(preInstructions).remainingAccounts(tokenBadgeAccounts).transaction();
|
|
7138
8730
|
return tx;
|
|
7139
8731
|
});
|
|
7140
8732
|
}
|
|
8733
|
+
/**
|
|
8734
|
+
* Builds a transaction to create a customizable pool.
|
|
8735
|
+
* @param params - Parameters for customizable pool creation.
|
|
8736
|
+
* @returns Transaction and related addresses.
|
|
8737
|
+
*/
|
|
7141
8738
|
createCustomPool(params) {
|
|
7142
8739
|
return __async(this, null, function* () {
|
|
7143
8740
|
const {
|
|
@@ -7145,8 +8742,10 @@ var CpAmm = class {
|
|
|
7145
8742
|
tokenBMint,
|
|
7146
8743
|
tokenAAmount,
|
|
7147
8744
|
tokenBAmount,
|
|
7148
|
-
|
|
7149
|
-
|
|
8745
|
+
sqrtMinPrice,
|
|
8746
|
+
sqrtMaxPrice,
|
|
8747
|
+
liquidityDelta,
|
|
8748
|
+
initSqrtPrice,
|
|
7150
8749
|
payer,
|
|
7151
8750
|
creator,
|
|
7152
8751
|
positionNft,
|
|
@@ -7158,96 +8757,124 @@ var CpAmm = class {
|
|
|
7158
8757
|
tokenAProgram,
|
|
7159
8758
|
tokenBProgram
|
|
7160
8759
|
} = params;
|
|
7161
|
-
const
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
8760
|
+
const pool = deriveCustomizablePoolAddress(tokenAMint, tokenBMint);
|
|
8761
|
+
const {
|
|
8762
|
+
position,
|
|
8763
|
+
positionNftAccount,
|
|
8764
|
+
tokenAVault,
|
|
8765
|
+
tokenBVault,
|
|
8766
|
+
payerTokenA,
|
|
8767
|
+
payerTokenB,
|
|
8768
|
+
preInstructions,
|
|
8769
|
+
tokenBadgeAccounts
|
|
8770
|
+
} = yield this.prepareCreateCustomizablePoolParams({
|
|
8771
|
+
pool,
|
|
7171
8772
|
tokenAMint,
|
|
7172
8773
|
tokenBMint,
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
positionNft,
|
|
7177
|
-
this._program.programId
|
|
7178
|
-
);
|
|
7179
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
8774
|
+
tokenAAmount,
|
|
8775
|
+
tokenBAmount: tokenBMint.equals(_spltoken.NATIVE_MINT) ? _bnjs.max.call(void 0, tokenBAmount, new (0, _anchor.BN)(1)) : tokenBAmount,
|
|
8776
|
+
payer,
|
|
7180
8777
|
positionNft,
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
8778
|
+
tokenAProgram,
|
|
8779
|
+
tokenBProgram
|
|
8780
|
+
});
|
|
8781
|
+
const transaction = yield this._program.methods.initializeCustomizablePool({
|
|
8782
|
+
poolFees,
|
|
8783
|
+
sqrtMinPrice,
|
|
8784
|
+
sqrtMaxPrice,
|
|
8785
|
+
hasAlphaVault,
|
|
8786
|
+
liquidity: liquidityDelta,
|
|
8787
|
+
sqrtPrice: initSqrtPrice,
|
|
8788
|
+
activationType,
|
|
8789
|
+
collectFeeMode,
|
|
8790
|
+
activationPoint
|
|
8791
|
+
}).accountsPartial({
|
|
8792
|
+
creator,
|
|
8793
|
+
positionNftAccount,
|
|
8794
|
+
positionNftMint: positionNft,
|
|
8795
|
+
payer,
|
|
8796
|
+
poolAuthority: this.poolAuthority,
|
|
7185
8797
|
pool,
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
const tokenBVault = deriveTokenVaultAddress(
|
|
8798
|
+
position,
|
|
8799
|
+
tokenAMint,
|
|
7189
8800
|
tokenBMint,
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
8801
|
+
tokenAVault,
|
|
8802
|
+
tokenBVault,
|
|
8803
|
+
payerTokenA,
|
|
8804
|
+
payerTokenB,
|
|
8805
|
+
token2022Program: _spltoken.TOKEN_2022_PROGRAM_ID,
|
|
8806
|
+
tokenAProgram,
|
|
8807
|
+
tokenBProgram,
|
|
8808
|
+
systemProgram: _web3js.SystemProgram.programId
|
|
8809
|
+
}).preInstructions(preInstructions).remainingAccounts(tokenBadgeAccounts).transaction();
|
|
8810
|
+
return { tx: transaction, pool, position };
|
|
8811
|
+
});
|
|
8812
|
+
}
|
|
8813
|
+
createCustomPoolWithDynamicConfig(params) {
|
|
8814
|
+
return __async(this, null, function* () {
|
|
8815
|
+
const {
|
|
8816
|
+
tokenAMint,
|
|
8817
|
+
tokenBMint,
|
|
8818
|
+
tokenAAmount,
|
|
8819
|
+
tokenBAmount,
|
|
8820
|
+
sqrtMinPrice,
|
|
8821
|
+
sqrtMaxPrice,
|
|
8822
|
+
liquidityDelta,
|
|
8823
|
+
initSqrtPrice,
|
|
8824
|
+
payer,
|
|
8825
|
+
config,
|
|
8826
|
+
poolCreatorAuthority,
|
|
8827
|
+
creator,
|
|
8828
|
+
positionNft,
|
|
8829
|
+
poolFees,
|
|
8830
|
+
hasAlphaVault,
|
|
8831
|
+
collectFeeMode,
|
|
8832
|
+
activationPoint,
|
|
8833
|
+
activationType,
|
|
8834
|
+
tokenAProgram,
|
|
8835
|
+
tokenBProgram
|
|
8836
|
+
} = params;
|
|
8837
|
+
const pool = derivePoolAddress(config, tokenAMint, tokenBMint);
|
|
8838
|
+
const {
|
|
8839
|
+
position,
|
|
8840
|
+
positionNftAccount,
|
|
8841
|
+
tokenAVault,
|
|
8842
|
+
tokenBVault,
|
|
8843
|
+
payerTokenA,
|
|
8844
|
+
payerTokenB,
|
|
8845
|
+
preInstructions,
|
|
8846
|
+
tokenBadgeAccounts
|
|
8847
|
+
} = yield this.prepareCreateCustomizablePoolParams({
|
|
8848
|
+
pool,
|
|
8849
|
+
tokenAMint,
|
|
8850
|
+
tokenBMint,
|
|
8851
|
+
tokenAAmount,
|
|
8852
|
+
tokenBAmount,
|
|
8853
|
+
payer,
|
|
8854
|
+
positionNft,
|
|
8855
|
+
tokenAProgram,
|
|
8856
|
+
tokenBProgram
|
|
8857
|
+
});
|
|
8858
|
+
const transaction = yield this._program.methods.initializePoolWithDynamicConfig({
|
|
7234
8859
|
poolFees,
|
|
7235
|
-
sqrtMinPrice
|
|
7236
|
-
sqrtMaxPrice
|
|
8860
|
+
sqrtMinPrice,
|
|
8861
|
+
sqrtMaxPrice,
|
|
7237
8862
|
hasAlphaVault,
|
|
7238
|
-
liquidity:
|
|
7239
|
-
sqrtPrice:
|
|
8863
|
+
liquidity: liquidityDelta,
|
|
8864
|
+
sqrtPrice: initSqrtPrice,
|
|
7240
8865
|
activationType,
|
|
7241
8866
|
collectFeeMode,
|
|
7242
8867
|
activationPoint
|
|
7243
|
-
}).
|
|
8868
|
+
}).accountsPartial({
|
|
7244
8869
|
creator,
|
|
7245
8870
|
positionNftAccount,
|
|
7246
8871
|
positionNftMint: positionNft,
|
|
7247
8872
|
payer,
|
|
7248
|
-
poolAuthority,
|
|
8873
|
+
poolAuthority: this.poolAuthority,
|
|
7249
8874
|
pool,
|
|
7250
8875
|
position,
|
|
8876
|
+
poolCreatorAuthority,
|
|
8877
|
+
config,
|
|
7251
8878
|
tokenAMint,
|
|
7252
8879
|
tokenBMint,
|
|
7253
8880
|
tokenAVault,
|
|
@@ -7255,50 +8882,37 @@ var CpAmm = class {
|
|
|
7255
8882
|
payerTokenA,
|
|
7256
8883
|
payerTokenB,
|
|
7257
8884
|
token2022Program: _spltoken.TOKEN_2022_PROGRAM_ID,
|
|
7258
|
-
tokenAProgram
|
|
7259
|
-
tokenBProgram
|
|
7260
|
-
systemProgram: _web3js.SystemProgram.programId
|
|
7261
|
-
|
|
7262
|
-
program: this._program.programId
|
|
7263
|
-
}).preInstructions(preInstructions).transaction();
|
|
8885
|
+
tokenAProgram,
|
|
8886
|
+
tokenBProgram,
|
|
8887
|
+
systemProgram: _web3js.SystemProgram.programId
|
|
8888
|
+
}).preInstructions(preInstructions).remainingAccounts(tokenBadgeAccounts).transaction();
|
|
7264
8889
|
return { tx: transaction, pool, position };
|
|
7265
8890
|
});
|
|
7266
8891
|
}
|
|
8892
|
+
/**
|
|
8893
|
+
* Builds a transaction to create a position.
|
|
8894
|
+
* @param {CreatePositionParams} params - Parameters for position creation.
|
|
8895
|
+
* @returns Transaction builder.
|
|
8896
|
+
*/
|
|
7267
8897
|
createPosition(params) {
|
|
7268
8898
|
return __async(this, null, function* () {
|
|
7269
|
-
const {
|
|
7270
|
-
|
|
7271
|
-
const position = derivePositionAddress(
|
|
7272
|
-
positionNft,
|
|
7273
|
-
this._program.programId
|
|
7274
|
-
);
|
|
7275
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7276
|
-
positionNft,
|
|
7277
|
-
this._program.programId
|
|
7278
|
-
);
|
|
7279
|
-
return yield this._program.methods.createPosition().accountsStrict({
|
|
7280
|
-
owner,
|
|
7281
|
-
positionNftMint: positionNft,
|
|
7282
|
-
poolAuthority,
|
|
7283
|
-
positionNftAccount,
|
|
7284
|
-
payer,
|
|
7285
|
-
pool,
|
|
7286
|
-
position,
|
|
7287
|
-
tokenProgram: _spltoken.TOKEN_2022_PROGRAM_ID,
|
|
7288
|
-
systemProgram: _web3js.SystemProgram.programId,
|
|
7289
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7290
|
-
program: this._program.programId
|
|
7291
|
-
}).transaction();
|
|
8899
|
+
const { ix } = yield this.buildCreatePositionInstruction(params);
|
|
8900
|
+
return new (0, _web3js.Transaction)().add(ix);
|
|
7292
8901
|
});
|
|
7293
8902
|
}
|
|
8903
|
+
/**
|
|
8904
|
+
* Builds a transaction to add liquidity to an existing position.
|
|
8905
|
+
* @param {AddLiquidityParams} params - Parameters for adding liquidity.
|
|
8906
|
+
* @returns Transaction builder.
|
|
8907
|
+
*/
|
|
7294
8908
|
addLiquidity(params) {
|
|
7295
8909
|
return __async(this, null, function* () {
|
|
7296
8910
|
const {
|
|
7297
8911
|
owner,
|
|
7298
8912
|
pool,
|
|
7299
8913
|
position,
|
|
7300
|
-
|
|
7301
|
-
|
|
8914
|
+
positionNftAccount,
|
|
8915
|
+
liquidityDelta,
|
|
7302
8916
|
maxAmountTokenA,
|
|
7303
8917
|
maxAmountTokenB,
|
|
7304
8918
|
tokenAAmountThreshold,
|
|
@@ -7310,34 +8924,17 @@ var CpAmm = class {
|
|
|
7310
8924
|
tokenAProgram,
|
|
7311
8925
|
tokenBProgram
|
|
7312
8926
|
} = params;
|
|
7313
|
-
const
|
|
7314
|
-
|
|
7315
|
-
|
|
8927
|
+
const {
|
|
8928
|
+
tokenAAta: tokenAAccount,
|
|
8929
|
+
tokenBAta: tokenBAccount,
|
|
8930
|
+
instructions: preInstructions
|
|
8931
|
+
} = yield this.prepareTokenAccounts(
|
|
8932
|
+
owner,
|
|
8933
|
+
tokenAMint,
|
|
8934
|
+
tokenBMint,
|
|
8935
|
+
tokenAProgram,
|
|
8936
|
+
tokenBProgram
|
|
7316
8937
|
);
|
|
7317
|
-
const preInstructions = [];
|
|
7318
|
-
const [
|
|
7319
|
-
{ ataPubkey: tokenAAccount, ix: createTokenATokenAccountIx },
|
|
7320
|
-
{ ataPubkey: tokenBAccount, ix: createTokenBTokenAccountIx }
|
|
7321
|
-
] = yield Promise.all([
|
|
7322
|
-
getOrCreateATAInstruction(
|
|
7323
|
-
this._program.provider.connection,
|
|
7324
|
-
tokenAMint,
|
|
7325
|
-
owner,
|
|
7326
|
-
owner,
|
|
7327
|
-
true,
|
|
7328
|
-
tokenAProgram
|
|
7329
|
-
),
|
|
7330
|
-
getOrCreateATAInstruction(
|
|
7331
|
-
this._program.provider.connection,
|
|
7332
|
-
tokenBMint,
|
|
7333
|
-
owner,
|
|
7334
|
-
owner,
|
|
7335
|
-
true,
|
|
7336
|
-
tokenBProgram
|
|
7337
|
-
)
|
|
7338
|
-
]);
|
|
7339
|
-
createTokenATokenAccountIx && preInstructions.push(createTokenATokenAccountIx);
|
|
7340
|
-
createTokenBTokenAccountIx && preInstructions.push(createTokenBTokenAccountIx);
|
|
7341
8938
|
if (tokenAMint.equals(_spltoken.NATIVE_MINT)) {
|
|
7342
8939
|
const wrapSOLIx = wrapSOLInstruction(
|
|
7343
8940
|
owner,
|
|
@@ -7361,11 +8958,104 @@ var CpAmm = class {
|
|
|
7361
8958
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
7362
8959
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7363
8960
|
}
|
|
7364
|
-
|
|
7365
|
-
|
|
8961
|
+
const addLiquidityInstruction = yield this.buildAddLiquidityInstruction({
|
|
8962
|
+
pool,
|
|
8963
|
+
position,
|
|
8964
|
+
positionNftAccount,
|
|
8965
|
+
owner,
|
|
8966
|
+
tokenAAccount,
|
|
8967
|
+
tokenBAccount,
|
|
8968
|
+
tokenAMint,
|
|
8969
|
+
tokenBMint,
|
|
8970
|
+
tokenAVault,
|
|
8971
|
+
tokenBVault,
|
|
8972
|
+
tokenAProgram,
|
|
8973
|
+
tokenBProgram,
|
|
8974
|
+
liquidityDelta,
|
|
7366
8975
|
tokenAAmountThreshold,
|
|
7367
8976
|
tokenBAmountThreshold
|
|
7368
|
-
})
|
|
8977
|
+
});
|
|
8978
|
+
const transaction = new (0, _web3js.Transaction)();
|
|
8979
|
+
transaction.add(
|
|
8980
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
8981
|
+
addLiquidityInstruction,
|
|
8982
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
8983
|
+
);
|
|
8984
|
+
return transaction;
|
|
8985
|
+
});
|
|
8986
|
+
}
|
|
8987
|
+
/**
|
|
8988
|
+
* Creates a new position and add liquidity to position it in a single transaction.
|
|
8989
|
+
* Handles both native SOL and other tokens, automatically wrapping/unwrapping SOL as needed.
|
|
8990
|
+
*
|
|
8991
|
+
* @param {CreatePositionAndAddLiquidity} params - Parameters for creating position and adding liquidity
|
|
8992
|
+
*
|
|
8993
|
+
* @returns {Transaction} A transaction that creates a position and adds liquidity
|
|
8994
|
+
*
|
|
8995
|
+
**/
|
|
8996
|
+
createPositionAndAddLiquidity(params) {
|
|
8997
|
+
return __async(this, null, function* () {
|
|
8998
|
+
const {
|
|
8999
|
+
owner,
|
|
9000
|
+
pool,
|
|
9001
|
+
positionNft,
|
|
9002
|
+
liquidityDelta,
|
|
9003
|
+
maxAmountTokenA,
|
|
9004
|
+
maxAmountTokenB,
|
|
9005
|
+
tokenAAmountThreshold,
|
|
9006
|
+
tokenBAmountThreshold,
|
|
9007
|
+
tokenAMint,
|
|
9008
|
+
tokenBMint,
|
|
9009
|
+
tokenAVault,
|
|
9010
|
+
tokenBVault,
|
|
9011
|
+
tokenAProgram,
|
|
9012
|
+
tokenBProgram
|
|
9013
|
+
} = params;
|
|
9014
|
+
const {
|
|
9015
|
+
tokenAAta: tokenAAccount,
|
|
9016
|
+
tokenBAta: tokenBAccount,
|
|
9017
|
+
instructions: preInstructions
|
|
9018
|
+
} = yield this.prepareTokenAccounts(
|
|
9019
|
+
owner,
|
|
9020
|
+
tokenAMint,
|
|
9021
|
+
tokenBMint,
|
|
9022
|
+
tokenAProgram,
|
|
9023
|
+
tokenBProgram
|
|
9024
|
+
);
|
|
9025
|
+
if (tokenAMint.equals(_spltoken.NATIVE_MINT)) {
|
|
9026
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
9027
|
+
owner,
|
|
9028
|
+
tokenAAccount,
|
|
9029
|
+
BigInt(maxAmountTokenA.toString())
|
|
9030
|
+
);
|
|
9031
|
+
preInstructions.push(...wrapSOLIx);
|
|
9032
|
+
}
|
|
9033
|
+
if (tokenBMint.equals(_spltoken.NATIVE_MINT)) {
|
|
9034
|
+
const wrapSOLIx = wrapSOLInstruction(
|
|
9035
|
+
owner,
|
|
9036
|
+
tokenBAccount,
|
|
9037
|
+
BigInt(maxAmountTokenB.toString())
|
|
9038
|
+
);
|
|
9039
|
+
preInstructions.push(...wrapSOLIx);
|
|
9040
|
+
}
|
|
9041
|
+
const postInstructions = [];
|
|
9042
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
9043
|
+
_spltoken.NATIVE_MINT.toBase58()
|
|
9044
|
+
)) {
|
|
9045
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
9046
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
9047
|
+
}
|
|
9048
|
+
const {
|
|
9049
|
+
ix: createPositionIx,
|
|
9050
|
+
position,
|
|
9051
|
+
positionNftAccount
|
|
9052
|
+
} = yield this.buildCreatePositionInstruction({
|
|
9053
|
+
owner,
|
|
9054
|
+
payer: owner,
|
|
9055
|
+
pool,
|
|
9056
|
+
positionNft
|
|
9057
|
+
});
|
|
9058
|
+
const addLiquidityInstruction = yield this.buildAddLiquidityInstruction({
|
|
7369
9059
|
pool,
|
|
7370
9060
|
position,
|
|
7371
9061
|
positionNftAccount,
|
|
@@ -7378,19 +9068,33 @@ var CpAmm = class {
|
|
|
7378
9068
|
tokenBVault,
|
|
7379
9069
|
tokenAProgram,
|
|
7380
9070
|
tokenBProgram,
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
9071
|
+
liquidityDelta,
|
|
9072
|
+
tokenAAmountThreshold,
|
|
9073
|
+
tokenBAmountThreshold
|
|
9074
|
+
});
|
|
9075
|
+
const transaction = new (0, _web3js.Transaction)();
|
|
9076
|
+
transaction.add(createPositionIx);
|
|
9077
|
+
transaction.add(
|
|
9078
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
9079
|
+
addLiquidityInstruction,
|
|
9080
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
9081
|
+
);
|
|
9082
|
+
return transaction;
|
|
7384
9083
|
});
|
|
7385
9084
|
}
|
|
9085
|
+
/**
|
|
9086
|
+
* Builds a transaction to remove liquidity from a position.
|
|
9087
|
+
* @param {RemoveLiquidityParams} params - Parameters for removing liquidity.
|
|
9088
|
+
* @returns Transaction builder.
|
|
9089
|
+
*/
|
|
7386
9090
|
removeLiquidity(params) {
|
|
7387
9091
|
return __async(this, null, function* () {
|
|
7388
9092
|
const {
|
|
7389
9093
|
owner,
|
|
7390
9094
|
pool,
|
|
7391
9095
|
position,
|
|
7392
|
-
|
|
7393
|
-
|
|
9096
|
+
positionNftAccount,
|
|
9097
|
+
liquidityDelta,
|
|
7394
9098
|
tokenAAmountThreshold,
|
|
7395
9099
|
tokenBAmountThreshold,
|
|
7396
9100
|
tokenAMint,
|
|
@@ -7398,37 +9102,20 @@ var CpAmm = class {
|
|
|
7398
9102
|
tokenAVault,
|
|
7399
9103
|
tokenBVault,
|
|
7400
9104
|
tokenAProgram,
|
|
7401
|
-
tokenBProgram
|
|
9105
|
+
tokenBProgram,
|
|
9106
|
+
vestings
|
|
7402
9107
|
} = params;
|
|
7403
|
-
const
|
|
7404
|
-
|
|
7405
|
-
|
|
9108
|
+
const {
|
|
9109
|
+
tokenAAta: tokenAAccount,
|
|
9110
|
+
tokenBAta: tokenBAccount,
|
|
9111
|
+
instructions: preInstructions
|
|
9112
|
+
} = yield this.prepareTokenAccounts(
|
|
9113
|
+
owner,
|
|
9114
|
+
tokenAMint,
|
|
9115
|
+
tokenBMint,
|
|
9116
|
+
tokenAProgram,
|
|
9117
|
+
tokenBProgram
|
|
7406
9118
|
);
|
|
7407
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7408
|
-
const preInstructions = [];
|
|
7409
|
-
const [
|
|
7410
|
-
{ ataPubkey: tokenAAccount, ix: createTokenAAccountIx },
|
|
7411
|
-
{ ataPubkey: tokenBAccount, ix: createTokenBAccountIx }
|
|
7412
|
-
] = yield Promise.all([
|
|
7413
|
-
getOrCreateATAInstruction(
|
|
7414
|
-
this._program.provider.connection,
|
|
7415
|
-
tokenAMint,
|
|
7416
|
-
owner,
|
|
7417
|
-
owner,
|
|
7418
|
-
true,
|
|
7419
|
-
tokenAProgram
|
|
7420
|
-
),
|
|
7421
|
-
getOrCreateATAInstruction(
|
|
7422
|
-
this._program.provider.connection,
|
|
7423
|
-
tokenBMint,
|
|
7424
|
-
owner,
|
|
7425
|
-
owner,
|
|
7426
|
-
true,
|
|
7427
|
-
tokenBProgram
|
|
7428
|
-
)
|
|
7429
|
-
]);
|
|
7430
|
-
createTokenAAccountIx && preInstructions.push(createTokenAAccountIx);
|
|
7431
|
-
createTokenBAccountIx && preInstructions.push(createTokenBAccountIx);
|
|
7432
9119
|
const postInstructions = [];
|
|
7433
9120
|
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
7434
9121
|
_spltoken.NATIVE_MINT.toBase58()
|
|
@@ -7436,12 +9123,22 @@ var CpAmm = class {
|
|
|
7436
9123
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
7437
9124
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7438
9125
|
}
|
|
9126
|
+
if (vestings.length > 0) {
|
|
9127
|
+
const refreshVestingInstruction = yield this.buildRefreshVestingInstruction({
|
|
9128
|
+
owner,
|
|
9129
|
+
position,
|
|
9130
|
+
positionNftAccount,
|
|
9131
|
+
pool,
|
|
9132
|
+
vestingAccounts: vestings.map((item) => item.account)
|
|
9133
|
+
});
|
|
9134
|
+
refreshVestingInstruction && preInstructions.push(refreshVestingInstruction);
|
|
9135
|
+
}
|
|
7439
9136
|
return yield this._program.methods.removeLiquidity({
|
|
7440
|
-
liquidityDelta
|
|
9137
|
+
liquidityDelta,
|
|
7441
9138
|
tokenAAmountThreshold,
|
|
7442
9139
|
tokenBAmountThreshold
|
|
7443
|
-
}).
|
|
7444
|
-
poolAuthority,
|
|
9140
|
+
}).accountsPartial({
|
|
9141
|
+
poolAuthority: this.poolAuthority,
|
|
7445
9142
|
pool,
|
|
7446
9143
|
position,
|
|
7447
9144
|
positionNftAccount,
|
|
@@ -7453,54 +9150,122 @@ var CpAmm = class {
|
|
|
7453
9150
|
tokenAVault,
|
|
7454
9151
|
tokenBVault,
|
|
7455
9152
|
tokenAProgram,
|
|
7456
|
-
tokenBProgram
|
|
7457
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7458
|
-
program: this._program.programId
|
|
9153
|
+
tokenBProgram
|
|
7459
9154
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7460
9155
|
});
|
|
7461
9156
|
}
|
|
7462
|
-
|
|
9157
|
+
/**
|
|
9158
|
+
* Builds a transaction to remove liquidity from a position.
|
|
9159
|
+
* @param {RemoveLiquidityParams} params - Parameters for removing liquidity.
|
|
9160
|
+
* @returns Transaction builder.
|
|
9161
|
+
*/
|
|
9162
|
+
removeAllLiquidity(params) {
|
|
7463
9163
|
return __async(this, null, function* () {
|
|
7464
9164
|
const {
|
|
7465
|
-
|
|
9165
|
+
owner,
|
|
7466
9166
|
pool,
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
tokenAVault,
|
|
7472
|
-
tokenBVault,
|
|
9167
|
+
position,
|
|
9168
|
+
positionNftAccount,
|
|
9169
|
+
tokenAAmountThreshold,
|
|
9170
|
+
tokenBAmountThreshold,
|
|
7473
9171
|
tokenAMint,
|
|
7474
9172
|
tokenBMint,
|
|
9173
|
+
tokenAVault,
|
|
9174
|
+
tokenBVault,
|
|
7475
9175
|
tokenAProgram,
|
|
7476
9176
|
tokenBProgram,
|
|
7477
|
-
|
|
9177
|
+
vestings
|
|
7478
9178
|
} = params;
|
|
7479
|
-
const
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
)
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
9179
|
+
const {
|
|
9180
|
+
tokenAAta: tokenAAccount,
|
|
9181
|
+
tokenBAta: tokenBAccount,
|
|
9182
|
+
instructions: preInstructions
|
|
9183
|
+
} = yield this.prepareTokenAccounts(
|
|
9184
|
+
owner,
|
|
9185
|
+
tokenAMint,
|
|
9186
|
+
tokenBMint,
|
|
9187
|
+
tokenAProgram,
|
|
9188
|
+
tokenBProgram
|
|
9189
|
+
);
|
|
9190
|
+
const postInstructions = [];
|
|
9191
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
9192
|
+
_spltoken.NATIVE_MINT.toBase58()
|
|
9193
|
+
)) {
|
|
9194
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
9195
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
9196
|
+
}
|
|
9197
|
+
if (vestings.length > 0) {
|
|
9198
|
+
const refreshVestingInstruction = yield this.buildRefreshVestingInstruction({
|
|
9199
|
+
owner,
|
|
9200
|
+
position,
|
|
9201
|
+
positionNftAccount,
|
|
9202
|
+
pool,
|
|
9203
|
+
vestingAccounts: vestings.map((item) => item.account)
|
|
9204
|
+
});
|
|
9205
|
+
refreshVestingInstruction && preInstructions.push(refreshVestingInstruction);
|
|
9206
|
+
}
|
|
9207
|
+
const removeAllLiquidityInstruction = yield this.buildRemoveAllLiquidityInstruction({
|
|
9208
|
+
poolAuthority: this.poolAuthority,
|
|
9209
|
+
owner,
|
|
9210
|
+
pool,
|
|
9211
|
+
position,
|
|
9212
|
+
positionNftAccount,
|
|
9213
|
+
tokenAAccount,
|
|
9214
|
+
tokenBAccount,
|
|
9215
|
+
tokenAAmountThreshold,
|
|
9216
|
+
tokenBAmountThreshold,
|
|
9217
|
+
tokenAMint,
|
|
9218
|
+
tokenBMint,
|
|
9219
|
+
tokenAVault,
|
|
9220
|
+
tokenBVault,
|
|
9221
|
+
tokenAProgram,
|
|
9222
|
+
tokenBProgram
|
|
9223
|
+
});
|
|
9224
|
+
const transaction = new (0, _web3js.Transaction)();
|
|
9225
|
+
transaction.add(
|
|
9226
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
9227
|
+
removeAllLiquidityInstruction,
|
|
9228
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
9229
|
+
);
|
|
9230
|
+
return transaction;
|
|
9231
|
+
});
|
|
9232
|
+
}
|
|
9233
|
+
/**
|
|
9234
|
+
* Builds a transaction to perform a swap in the pool.
|
|
9235
|
+
* @param {SwapParams} params - Parameters for swapping tokens.
|
|
9236
|
+
* @returns Transaction builder.
|
|
9237
|
+
*/
|
|
9238
|
+
swap(params) {
|
|
9239
|
+
return __async(this, null, function* () {
|
|
9240
|
+
const {
|
|
9241
|
+
payer,
|
|
9242
|
+
pool,
|
|
9243
|
+
inputTokenMint,
|
|
9244
|
+
outputTokenMint,
|
|
9245
|
+
amountIn,
|
|
9246
|
+
minimumAmountOut,
|
|
9247
|
+
tokenAVault,
|
|
9248
|
+
tokenBVault,
|
|
9249
|
+
tokenAMint,
|
|
9250
|
+
tokenBMint,
|
|
9251
|
+
tokenAProgram,
|
|
9252
|
+
tokenBProgram,
|
|
9253
|
+
referralTokenAccount
|
|
9254
|
+
} = params;
|
|
9255
|
+
const [inputTokenProgram, outputTokenProgram] = inputTokenMint.equals(
|
|
9256
|
+
tokenAMint
|
|
9257
|
+
) ? [tokenAProgram, tokenBProgram] : [tokenBProgram, tokenAProgram];
|
|
9258
|
+
const {
|
|
9259
|
+
tokenAAta: inputTokenAccount,
|
|
9260
|
+
tokenBAta: outputTokenAccount,
|
|
9261
|
+
instructions: preInstructions
|
|
9262
|
+
} = yield this.prepareTokenAccounts(
|
|
9263
|
+
payer,
|
|
9264
|
+
inputTokenMint,
|
|
9265
|
+
outputTokenMint,
|
|
9266
|
+
inputTokenProgram,
|
|
9267
|
+
outputTokenProgram
|
|
9268
|
+
);
|
|
7504
9269
|
if (inputTokenMint.equals(_spltoken.NATIVE_MINT)) {
|
|
7505
9270
|
const wrapSOLIx = wrapSOLInstruction(
|
|
7506
9271
|
payer,
|
|
@@ -7519,8 +9284,8 @@ var CpAmm = class {
|
|
|
7519
9284
|
return yield this._program.methods.swap({
|
|
7520
9285
|
amountIn,
|
|
7521
9286
|
minimumAmountOut
|
|
7522
|
-
}).
|
|
7523
|
-
poolAuthority,
|
|
9287
|
+
}).accountsPartial({
|
|
9288
|
+
poolAuthority: this.poolAuthority,
|
|
7524
9289
|
pool,
|
|
7525
9290
|
payer,
|
|
7526
9291
|
inputTokenAccount,
|
|
@@ -7531,12 +9296,15 @@ var CpAmm = class {
|
|
|
7531
9296
|
tokenBMint,
|
|
7532
9297
|
tokenAProgram,
|
|
7533
9298
|
tokenBProgram,
|
|
7534
|
-
referralTokenAccount
|
|
7535
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7536
|
-
program: this._program.programId
|
|
9299
|
+
referralTokenAccount
|
|
7537
9300
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7538
9301
|
});
|
|
7539
9302
|
}
|
|
9303
|
+
/**
|
|
9304
|
+
* Builds a transaction to lock a position with vesting schedule.
|
|
9305
|
+
* @param {LockPositionParams} params - Locking parameters.
|
|
9306
|
+
* @returns Transaction builder.
|
|
9307
|
+
*/
|
|
7540
9308
|
lockPosition(params) {
|
|
7541
9309
|
return __async(this, null, function* () {
|
|
7542
9310
|
const {
|
|
@@ -7545,86 +9313,70 @@ var CpAmm = class {
|
|
|
7545
9313
|
payer,
|
|
7546
9314
|
vestingAccount,
|
|
7547
9315
|
position,
|
|
7548
|
-
|
|
9316
|
+
positionNftAccount,
|
|
7549
9317
|
cliffPoint,
|
|
7550
9318
|
periodFrequency,
|
|
7551
9319
|
cliffUnlockLiquidity,
|
|
7552
9320
|
liquidityPerPeriod,
|
|
7553
|
-
numberOfPeriod
|
|
7554
|
-
vestings
|
|
9321
|
+
numberOfPeriod
|
|
7555
9322
|
} = params;
|
|
7556
|
-
const positionNftAccount = derivePositionNftAccount(
|
|
7557
|
-
positionNftMint,
|
|
7558
|
-
this._program.programId
|
|
7559
|
-
);
|
|
7560
9323
|
const lockPositionParams = {
|
|
7561
9324
|
cliffPoint,
|
|
7562
9325
|
periodFrequency,
|
|
7563
9326
|
cliffUnlockLiquidity,
|
|
7564
9327
|
liquidityPerPeriod,
|
|
7565
|
-
numberOfPeriod
|
|
7566
|
-
index: vestings.length
|
|
9328
|
+
numberOfPeriod
|
|
7567
9329
|
};
|
|
7568
|
-
return yield this._program.methods.lockPosition(lockPositionParams).
|
|
9330
|
+
return yield this._program.methods.lockPosition(lockPositionParams).accountsPartial({
|
|
7569
9331
|
position,
|
|
7570
9332
|
positionNftAccount,
|
|
7571
9333
|
vesting: vestingAccount,
|
|
7572
9334
|
pool,
|
|
7573
9335
|
owner,
|
|
7574
9336
|
payer,
|
|
7575
|
-
systemProgram: _web3js.SystemProgram.programId
|
|
7576
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7577
|
-
program: this._program.programId
|
|
9337
|
+
systemProgram: _web3js.SystemProgram.programId
|
|
7578
9338
|
}).transaction();
|
|
7579
9339
|
});
|
|
7580
9340
|
}
|
|
9341
|
+
/**
|
|
9342
|
+
* Builds a transaction to permanently lock a position.
|
|
9343
|
+
* @param {PermanentLockParams} params - Parameters for permanent locking.
|
|
9344
|
+
* @returns Transaction builder.
|
|
9345
|
+
*/
|
|
7581
9346
|
permanentLockPosition(params) {
|
|
7582
9347
|
return __async(this, null, function* () {
|
|
7583
|
-
const { owner, position,
|
|
7584
|
-
|
|
7585
|
-
positionNftMint,
|
|
7586
|
-
this._program.programId
|
|
7587
|
-
);
|
|
7588
|
-
return yield this._program.methods.permanentLockPosition(unlockedLiquidity).accountsStrict({
|
|
9348
|
+
const { owner, position, positionNftAccount, pool, unlockedLiquidity } = params;
|
|
9349
|
+
return yield this._program.methods.permanentLockPosition(unlockedLiquidity).accountsPartial({
|
|
7589
9350
|
position,
|
|
7590
9351
|
positionNftAccount,
|
|
7591
9352
|
pool,
|
|
7592
|
-
owner
|
|
7593
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7594
|
-
program: this._program.programId
|
|
9353
|
+
owner
|
|
7595
9354
|
}).transaction();
|
|
7596
9355
|
});
|
|
7597
9356
|
}
|
|
9357
|
+
/**
|
|
9358
|
+
* Builds a transaction to refresh vesting status of a position.
|
|
9359
|
+
* @param {RefreshVestingParams} params - Refresh vesting parameters.
|
|
9360
|
+
* @returns Transaction builder.
|
|
9361
|
+
*/
|
|
7598
9362
|
refreshVesting(params) {
|
|
7599
9363
|
return __async(this, null, function* () {
|
|
7600
|
-
const
|
|
7601
|
-
|
|
7602
|
-
positionNftMint,
|
|
7603
|
-
this._program.programId
|
|
7604
|
-
);
|
|
7605
|
-
return yield this._program.methods.refreshVesting().accountsStrict({
|
|
7606
|
-
position,
|
|
7607
|
-
positionNftAccount,
|
|
7608
|
-
pool,
|
|
7609
|
-
owner
|
|
7610
|
-
}).remainingAccounts(
|
|
7611
|
-
vestings.map((pubkey) => {
|
|
7612
|
-
return {
|
|
7613
|
-
isSigner: false,
|
|
7614
|
-
isWritable: true,
|
|
7615
|
-
pubkey
|
|
7616
|
-
};
|
|
7617
|
-
})
|
|
7618
|
-
).transaction();
|
|
9364
|
+
const instruction = yield this.buildRefreshVestingInstruction(params);
|
|
9365
|
+
return new (0, _web3js.Transaction)().add(instruction);
|
|
7619
9366
|
});
|
|
7620
9367
|
}
|
|
9368
|
+
/**
|
|
9369
|
+
* Builds a transaction to claim position fee rewards.
|
|
9370
|
+
* @param {ClaimPositionFeeParams} params - Parameters for claiming position fee.
|
|
9371
|
+
* @returns Transaction builder.
|
|
9372
|
+
*/
|
|
7621
9373
|
claimPositionFee(params) {
|
|
7622
9374
|
return __async(this, null, function* () {
|
|
7623
9375
|
const {
|
|
7624
9376
|
owner,
|
|
7625
9377
|
pool,
|
|
7626
9378
|
position,
|
|
7627
|
-
|
|
9379
|
+
positionNftAccount,
|
|
7628
9380
|
tokenAVault,
|
|
7629
9381
|
tokenBVault,
|
|
7630
9382
|
tokenAMint,
|
|
@@ -7632,35 +9384,17 @@ var CpAmm = class {
|
|
|
7632
9384
|
tokenAProgram,
|
|
7633
9385
|
tokenBProgram
|
|
7634
9386
|
} = params;
|
|
7635
|
-
const
|
|
7636
|
-
|
|
7637
|
-
|
|
9387
|
+
const {
|
|
9388
|
+
tokenAAta: tokenAAccount,
|
|
9389
|
+
tokenBAta: tokenBAccount,
|
|
9390
|
+
instructions: preInstructions
|
|
9391
|
+
} = yield this.prepareTokenAccounts(
|
|
9392
|
+
owner,
|
|
9393
|
+
tokenAMint,
|
|
9394
|
+
tokenBMint,
|
|
9395
|
+
tokenAProgram,
|
|
9396
|
+
tokenBProgram
|
|
7638
9397
|
);
|
|
7639
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7640
|
-
const preInstructions = [];
|
|
7641
|
-
const [
|
|
7642
|
-
{ ataPubkey: tokenAAccount, ix: createTokenAAccountIx },
|
|
7643
|
-
{ ataPubkey: tokenBAccount, ix: createTokenBAccountIx }
|
|
7644
|
-
] = yield Promise.all([
|
|
7645
|
-
getOrCreateATAInstruction(
|
|
7646
|
-
this._program.provider.connection,
|
|
7647
|
-
tokenAMint,
|
|
7648
|
-
owner,
|
|
7649
|
-
owner,
|
|
7650
|
-
true,
|
|
7651
|
-
tokenAProgram
|
|
7652
|
-
),
|
|
7653
|
-
getOrCreateATAInstruction(
|
|
7654
|
-
this._program.provider.connection,
|
|
7655
|
-
tokenBMint,
|
|
7656
|
-
owner,
|
|
7657
|
-
owner,
|
|
7658
|
-
true,
|
|
7659
|
-
tokenBProgram
|
|
7660
|
-
)
|
|
7661
|
-
]);
|
|
7662
|
-
createTokenAAccountIx && preInstructions.push(createTokenAAccountIx);
|
|
7663
|
-
createTokenBAccountIx && preInstructions.push(createTokenBAccountIx);
|
|
7664
9398
|
const postInstructions = [];
|
|
7665
9399
|
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
7666
9400
|
_spltoken.NATIVE_MINT.toBase58()
|
|
@@ -7668,9 +9402,9 @@ var CpAmm = class {
|
|
|
7668
9402
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
7669
9403
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7670
9404
|
}
|
|
7671
|
-
|
|
7672
|
-
poolAuthority,
|
|
9405
|
+
const claimPositionFeeInstruction = yield this.buildClaimPositionFeeInstruction({
|
|
7673
9406
|
owner,
|
|
9407
|
+
poolAuthority: this.poolAuthority,
|
|
7674
9408
|
pool,
|
|
7675
9409
|
position,
|
|
7676
9410
|
positionNftAccount,
|
|
@@ -7681,34 +9415,288 @@ var CpAmm = class {
|
|
|
7681
9415
|
tokenAMint,
|
|
7682
9416
|
tokenBMint,
|
|
7683
9417
|
tokenAProgram,
|
|
9418
|
+
tokenBProgram
|
|
9419
|
+
});
|
|
9420
|
+
const transaction = new (0, _web3js.Transaction)();
|
|
9421
|
+
transaction.add(
|
|
9422
|
+
...preInstructions.length > 0 ? preInstructions : [],
|
|
9423
|
+
claimPositionFeeInstruction,
|
|
9424
|
+
...postInstructions.length > 0 ? postInstructions : []
|
|
9425
|
+
);
|
|
9426
|
+
return transaction;
|
|
9427
|
+
});
|
|
9428
|
+
}
|
|
9429
|
+
closePosition(params) {
|
|
9430
|
+
return __async(this, null, function* () {
|
|
9431
|
+
const { owner, pool, position, positionNftMint, positionNftAccount } = params;
|
|
9432
|
+
const instruction = yield this.buildClosePositionInstruction({
|
|
9433
|
+
owner,
|
|
9434
|
+
poolAuthority: this.poolAuthority,
|
|
9435
|
+
pool,
|
|
9436
|
+
position,
|
|
9437
|
+
positionNftMint,
|
|
9438
|
+
positionNftAccount
|
|
9439
|
+
});
|
|
9440
|
+
return new (0, _web3js.Transaction)().add(instruction);
|
|
9441
|
+
});
|
|
9442
|
+
}
|
|
9443
|
+
/**
|
|
9444
|
+
* Builds a transaction to remove all liquidity from a position and close it.
|
|
9445
|
+
* This combines several operations in a single transaction:
|
|
9446
|
+
* 1. Claims any accumulated fees
|
|
9447
|
+
* 2. Removes all liquidity
|
|
9448
|
+
* 3. Closes the position
|
|
9449
|
+
*
|
|
9450
|
+
* @param {RemoveAllLiquidityAndClosePositionParams} params - Combined parameters
|
|
9451
|
+
* @returns {TxBuilder} Transaction builder with all required instructions
|
|
9452
|
+
* @throws {Error} If the position is locked or cannot be closed
|
|
9453
|
+
*/
|
|
9454
|
+
removeAllLiquidityAndClosePosition(params) {
|
|
9455
|
+
return __async(this, null, function* () {
|
|
9456
|
+
const {
|
|
9457
|
+
owner,
|
|
9458
|
+
position,
|
|
9459
|
+
positionNftAccount,
|
|
9460
|
+
positionState,
|
|
9461
|
+
poolState,
|
|
9462
|
+
tokenAAmountThreshold,
|
|
9463
|
+
tokenBAmountThreshold,
|
|
9464
|
+
vestings,
|
|
9465
|
+
currentPoint
|
|
9466
|
+
} = params;
|
|
9467
|
+
const { pool } = positionState;
|
|
9468
|
+
const { tokenAMint, tokenBMint } = poolState;
|
|
9469
|
+
const { canUnlock, reason } = this.canUnlockPosition(
|
|
9470
|
+
positionState,
|
|
9471
|
+
vestings,
|
|
9472
|
+
currentPoint
|
|
9473
|
+
);
|
|
9474
|
+
if (!canUnlock) {
|
|
9475
|
+
throw new Error(`Cannot remove liquidity: ${reason}`);
|
|
9476
|
+
}
|
|
9477
|
+
const tokenAProgram = getTokenProgram(poolState.tokenAFlag);
|
|
9478
|
+
const tokenBProgram = getTokenProgram(poolState.tokenBFlag);
|
|
9479
|
+
const {
|
|
9480
|
+
tokenAAta: tokenAAccount,
|
|
9481
|
+
tokenBAta: tokenBAccount,
|
|
9482
|
+
instructions: preInstructions
|
|
9483
|
+
} = yield this.prepareTokenAccounts(
|
|
9484
|
+
owner,
|
|
9485
|
+
tokenAMint,
|
|
9486
|
+
tokenBMint,
|
|
9487
|
+
tokenAProgram,
|
|
9488
|
+
tokenBProgram
|
|
9489
|
+
);
|
|
9490
|
+
const postInstructions = [];
|
|
9491
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
9492
|
+
_spltoken.NATIVE_MINT.toBase58()
|
|
9493
|
+
)) {
|
|
9494
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
9495
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
9496
|
+
}
|
|
9497
|
+
if (vestings.length > 0) {
|
|
9498
|
+
const refreshVestingInstruction = yield this.buildRefreshVestingInstruction({
|
|
9499
|
+
owner,
|
|
9500
|
+
position,
|
|
9501
|
+
positionNftAccount,
|
|
9502
|
+
pool,
|
|
9503
|
+
vestingAccounts: vestings.map((item) => item.account)
|
|
9504
|
+
});
|
|
9505
|
+
refreshVestingInstruction && preInstructions.push(refreshVestingInstruction);
|
|
9506
|
+
}
|
|
9507
|
+
const transaction = new (0, _web3js.Transaction)();
|
|
9508
|
+
if (preInstructions.length > 0) {
|
|
9509
|
+
transaction.add(...preInstructions);
|
|
9510
|
+
}
|
|
9511
|
+
const liquidatePositionInstructions = yield this.buildLiquidatePositionInstruction({
|
|
9512
|
+
owner,
|
|
9513
|
+
position,
|
|
9514
|
+
positionNftAccount,
|
|
9515
|
+
positionState,
|
|
9516
|
+
poolState,
|
|
9517
|
+
tokenAAccount,
|
|
9518
|
+
tokenBAccount,
|
|
9519
|
+
tokenAAmountThreshold,
|
|
9520
|
+
tokenBAmountThreshold
|
|
9521
|
+
});
|
|
9522
|
+
transaction.add(...liquidatePositionInstructions);
|
|
9523
|
+
if (postInstructions.length > 0) {
|
|
9524
|
+
transaction.add(...postInstructions);
|
|
9525
|
+
}
|
|
9526
|
+
return transaction;
|
|
9527
|
+
});
|
|
9528
|
+
}
|
|
9529
|
+
/**
|
|
9530
|
+
* Builds a transaction to merge liquidity from one position into another.
|
|
9531
|
+
* This process:
|
|
9532
|
+
* 1. Claims fees from the source position
|
|
9533
|
+
* 2. Removes all liquidity from the source position
|
|
9534
|
+
* 3. Adds that liquidity to the target position
|
|
9535
|
+
* 4. Closes the source position
|
|
9536
|
+
*
|
|
9537
|
+
* @param {MergePositionParams} params - Parameters for merging positions
|
|
9538
|
+
* @returns {TxBuilder} Transaction builder with all required instructions
|
|
9539
|
+
* @throws {Error} If either position is locked or incompatible
|
|
9540
|
+
*/
|
|
9541
|
+
mergePosition(params) {
|
|
9542
|
+
return __async(this, null, function* () {
|
|
9543
|
+
const {
|
|
9544
|
+
owner,
|
|
9545
|
+
positionA,
|
|
9546
|
+
positionB,
|
|
9547
|
+
positionBState,
|
|
9548
|
+
poolState,
|
|
9549
|
+
positionBNftAccount,
|
|
9550
|
+
positionANftAccount,
|
|
9551
|
+
tokenAAmountAddLiquidityThreshold,
|
|
9552
|
+
tokenBAmountAddLiquidityThreshold,
|
|
9553
|
+
tokenAAmountRemoveLiquidityThreshold,
|
|
9554
|
+
tokenBAmountRemoveLiquidityThreshold,
|
|
9555
|
+
positionBVestings,
|
|
9556
|
+
currentPoint
|
|
9557
|
+
} = params;
|
|
9558
|
+
const { canUnlock, reason } = this.canUnlockPosition(
|
|
9559
|
+
positionBState,
|
|
9560
|
+
positionBVestings,
|
|
9561
|
+
currentPoint
|
|
9562
|
+
);
|
|
9563
|
+
if (!canUnlock) {
|
|
9564
|
+
throw new Error(`Cannot remove liquidity: ${reason}`);
|
|
9565
|
+
}
|
|
9566
|
+
const pool = positionBState.pool;
|
|
9567
|
+
const { tokenAMint, tokenBMint, tokenAVault, tokenBVault } = poolState;
|
|
9568
|
+
const tokenAProgram = getTokenProgram(poolState.tokenAFlag);
|
|
9569
|
+
const tokenBProgram = getTokenProgram(poolState.tokenBFlag);
|
|
9570
|
+
const {
|
|
9571
|
+
tokenAAta: tokenAAccount,
|
|
9572
|
+
tokenBAta: tokenBAccount,
|
|
9573
|
+
instructions: preInstructions
|
|
9574
|
+
} = yield this.prepareTokenAccounts(
|
|
9575
|
+
owner,
|
|
9576
|
+
tokenAMint,
|
|
9577
|
+
tokenBMint,
|
|
9578
|
+
tokenAProgram,
|
|
9579
|
+
tokenBProgram
|
|
9580
|
+
);
|
|
9581
|
+
let positionBLiquidityDelta = positionBState.unlockedLiquidity;
|
|
9582
|
+
if (positionBVestings.length > 0) {
|
|
9583
|
+
const totalAvailableVestingLiquidity = positionBVestings.reduce(
|
|
9584
|
+
(total, position) => {
|
|
9585
|
+
const available = getAvailableVestingLiquidity(
|
|
9586
|
+
position.vestingState,
|
|
9587
|
+
currentPoint
|
|
9588
|
+
);
|
|
9589
|
+
return total.add(available);
|
|
9590
|
+
},
|
|
9591
|
+
new (0, _anchor.BN)(0)
|
|
9592
|
+
);
|
|
9593
|
+
positionBLiquidityDelta = positionBLiquidityDelta.add(
|
|
9594
|
+
totalAvailableVestingLiquidity
|
|
9595
|
+
);
|
|
9596
|
+
const refreshVestingInstruction = yield this.buildRefreshVestingInstruction({
|
|
9597
|
+
owner,
|
|
9598
|
+
position: positionB,
|
|
9599
|
+
positionNftAccount: positionBNftAccount,
|
|
9600
|
+
pool,
|
|
9601
|
+
vestingAccounts: positionBVestings.map((item) => item.account)
|
|
9602
|
+
});
|
|
9603
|
+
refreshVestingInstruction && preInstructions.push(refreshVestingInstruction);
|
|
9604
|
+
}
|
|
9605
|
+
const tokenAWithdrawAmount = getAmountAFromLiquidityDelta(
|
|
9606
|
+
positionBLiquidityDelta,
|
|
9607
|
+
poolState.sqrtPrice,
|
|
9608
|
+
poolState.sqrtMaxPrice,
|
|
9609
|
+
1 /* Down */
|
|
9610
|
+
);
|
|
9611
|
+
const tokenBWithdrawAmount = getAmountBFromLiquidityDelta(
|
|
9612
|
+
positionBLiquidityDelta,
|
|
9613
|
+
poolState.sqrtPrice,
|
|
9614
|
+
poolState.sqrtMinPrice,
|
|
9615
|
+
1 /* Down */
|
|
9616
|
+
);
|
|
9617
|
+
const newLiquidityDelta = this.getLiquidityDelta({
|
|
9618
|
+
maxAmountTokenA: tokenAWithdrawAmount,
|
|
9619
|
+
maxAmountTokenB: tokenBWithdrawAmount,
|
|
9620
|
+
sqrtMaxPrice: poolState.sqrtMaxPrice,
|
|
9621
|
+
sqrtMinPrice: poolState.sqrtMinPrice,
|
|
9622
|
+
sqrtPrice: poolState.sqrtPrice
|
|
9623
|
+
});
|
|
9624
|
+
const transaction = new (0, _web3js.Transaction)();
|
|
9625
|
+
if (preInstructions.length > 0) {
|
|
9626
|
+
transaction.add(...preInstructions);
|
|
9627
|
+
}
|
|
9628
|
+
const liquidatePositionInstructions = yield this.buildLiquidatePositionInstruction({
|
|
9629
|
+
owner,
|
|
9630
|
+
position: positionB,
|
|
9631
|
+
positionNftAccount: positionBNftAccount,
|
|
9632
|
+
positionState: positionBState,
|
|
9633
|
+
poolState,
|
|
9634
|
+
tokenAAccount,
|
|
9635
|
+
tokenBAccount,
|
|
9636
|
+
tokenAAmountThreshold: tokenAAmountRemoveLiquidityThreshold,
|
|
9637
|
+
tokenBAmountThreshold: tokenBAmountRemoveLiquidityThreshold
|
|
9638
|
+
});
|
|
9639
|
+
transaction.add(...liquidatePositionInstructions);
|
|
9640
|
+
const addLiquidityInstruction = yield this.buildAddLiquidityInstruction({
|
|
9641
|
+
pool,
|
|
9642
|
+
position: positionA,
|
|
9643
|
+
positionNftAccount: positionANftAccount,
|
|
9644
|
+
owner,
|
|
9645
|
+
tokenAAccount,
|
|
9646
|
+
tokenBAccount,
|
|
9647
|
+
tokenAMint,
|
|
9648
|
+
tokenBMint,
|
|
9649
|
+
tokenAVault,
|
|
9650
|
+
tokenBVault,
|
|
9651
|
+
tokenAProgram,
|
|
7684
9652
|
tokenBProgram,
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
9653
|
+
liquidityDelta: newLiquidityDelta,
|
|
9654
|
+
tokenAAmountThreshold: tokenAAmountAddLiquidityThreshold,
|
|
9655
|
+
tokenBAmountThreshold: tokenBAmountAddLiquidityThreshold
|
|
9656
|
+
});
|
|
9657
|
+
transaction.add(addLiquidityInstruction);
|
|
9658
|
+
if ([tokenAMint.toBase58(), tokenBMint.toBase58()].includes(
|
|
9659
|
+
_spltoken.NATIVE_MINT.toBase58()
|
|
9660
|
+
)) {
|
|
9661
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(owner);
|
|
9662
|
+
closeWrappedSOLIx && transaction.add(closeWrappedSOLIx);
|
|
9663
|
+
}
|
|
9664
|
+
return transaction;
|
|
7688
9665
|
});
|
|
7689
9666
|
}
|
|
9667
|
+
/**
|
|
9668
|
+
* Builds a transaction to update reward duration.
|
|
9669
|
+
* @param {UpdateRewardDurationParams} params - Parameters including pool and new duration.
|
|
9670
|
+
* @returns Transaction builder.
|
|
9671
|
+
*/
|
|
7690
9672
|
updateRewardDuration(params) {
|
|
7691
9673
|
return __async(this, null, function* () {
|
|
7692
9674
|
const { pool, admin, rewardIndex, newDuration } = params;
|
|
7693
|
-
return yield this._program.methods.updateRewardDuration(rewardIndex, newDuration).
|
|
9675
|
+
return yield this._program.methods.updateRewardDuration(rewardIndex, newDuration).accountsPartial({
|
|
7694
9676
|
pool,
|
|
7695
|
-
admin
|
|
7696
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7697
|
-
program: this._program.programId
|
|
9677
|
+
admin
|
|
7698
9678
|
}).transaction();
|
|
7699
9679
|
});
|
|
7700
9680
|
}
|
|
9681
|
+
/**
|
|
9682
|
+
* Builds a transaction to update reward funder address.
|
|
9683
|
+
* @param {UpdateRewardFunderParams} params - Parameters including pool and new funder address.
|
|
9684
|
+
* @returns Transaction builder.
|
|
9685
|
+
*/
|
|
7701
9686
|
updateRewardFunder(params) {
|
|
7702
9687
|
return __async(this, null, function* () {
|
|
7703
9688
|
const { pool, admin, rewardIndex, newFunder } = params;
|
|
7704
|
-
return yield this._program.methods.updateRewardFunder(rewardIndex, newFunder).
|
|
9689
|
+
return yield this._program.methods.updateRewardFunder(rewardIndex, newFunder).accountsPartial({
|
|
7705
9690
|
pool,
|
|
7706
|
-
admin
|
|
7707
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7708
|
-
program: this._program.programId
|
|
9691
|
+
admin
|
|
7709
9692
|
}).transaction();
|
|
7710
9693
|
});
|
|
7711
9694
|
}
|
|
9695
|
+
/**
|
|
9696
|
+
* Builds a transaction to fund rewards in a pool.
|
|
9697
|
+
* @param {FundRewardParams} params - Funding parameters.
|
|
9698
|
+
* @returns Transaction builder.
|
|
9699
|
+
*/
|
|
7712
9700
|
fundReward(params) {
|
|
7713
9701
|
return __async(this, null, function* () {
|
|
7714
9702
|
const { rewardIndex, carryForward, pool, funder, amount } = params;
|
|
@@ -7734,22 +9722,24 @@ var CpAmm = class {
|
|
|
7734
9722
|
);
|
|
7735
9723
|
preInstructions.push(...wrapSOLIx);
|
|
7736
9724
|
}
|
|
7737
|
-
return yield this._program.methods.fundReward(rewardIndex, amount, carryForward).
|
|
9725
|
+
return yield this._program.methods.fundReward(rewardIndex, amount, carryForward).accountsPartial({
|
|
7738
9726
|
pool,
|
|
7739
9727
|
rewardVault: vault,
|
|
7740
9728
|
rewardMint: mint,
|
|
7741
9729
|
funderTokenAccount,
|
|
7742
9730
|
funder,
|
|
7743
|
-
tokenProgram
|
|
7744
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7745
|
-
program: this._program.programId
|
|
9731
|
+
tokenProgram
|
|
7746
9732
|
}).transaction();
|
|
7747
9733
|
});
|
|
7748
9734
|
}
|
|
9735
|
+
/**
|
|
9736
|
+
* Builds a transaction to withdraw ineligible rewards from a pool.
|
|
9737
|
+
* @param {WithdrawIneligibleRewardParams} params - Parameters for withdrawal.
|
|
9738
|
+
* @returns Transaction builder.
|
|
9739
|
+
*/
|
|
7749
9740
|
withdrawIneligibleReward(params) {
|
|
7750
9741
|
return __async(this, null, function* () {
|
|
7751
9742
|
const { rewardIndex, pool, funder } = params;
|
|
7752
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7753
9743
|
const poolState = yield this.fetchPoolState(pool);
|
|
7754
9744
|
const rewardInfo = poolState.rewardInfos[rewardIndex];
|
|
7755
9745
|
const { mint, vault, rewardTokenFlag } = rewardInfo;
|
|
@@ -7769,19 +9759,22 @@ var CpAmm = class {
|
|
|
7769
9759
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(funder);
|
|
7770
9760
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7771
9761
|
}
|
|
7772
|
-
return yield this._program.methods.withdrawIneligibleReward(rewardIndex).
|
|
9762
|
+
return yield this._program.methods.withdrawIneligibleReward(rewardIndex).accountsPartial({
|
|
7773
9763
|
pool,
|
|
7774
9764
|
rewardVault: vault,
|
|
7775
9765
|
rewardMint: mint,
|
|
7776
|
-
poolAuthority,
|
|
9766
|
+
poolAuthority: this.poolAuthority,
|
|
7777
9767
|
funderTokenAccount,
|
|
7778
9768
|
funder,
|
|
7779
|
-
tokenProgram
|
|
7780
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7781
|
-
program: this._program.programId
|
|
9769
|
+
tokenProgram
|
|
7782
9770
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7783
9771
|
});
|
|
7784
9772
|
}
|
|
9773
|
+
/**
|
|
9774
|
+
* Builds a transaction to claim partner fee rewards.
|
|
9775
|
+
* @param {ClaimPartnerFeeParams} params - Claim parameters including amounts and partner address.
|
|
9776
|
+
* @returns Transaction builder.
|
|
9777
|
+
*/
|
|
7785
9778
|
claimPartnerFee(params) {
|
|
7786
9779
|
return __async(this, null, function* () {
|
|
7787
9780
|
const { partner, pool, maxAmountA, maxAmountB } = params;
|
|
@@ -7794,33 +9787,19 @@ var CpAmm = class {
|
|
|
7794
9787
|
tokenAFlag,
|
|
7795
9788
|
tokenBFlag
|
|
7796
9789
|
} = poolState;
|
|
7797
|
-
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
7798
9790
|
const tokenAProgram = getTokenProgram(tokenAFlag);
|
|
7799
9791
|
const tokenBProgram = getTokenProgram(tokenBFlag);
|
|
7800
|
-
const
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
tokenAProgram
|
|
7812
|
-
),
|
|
7813
|
-
getOrCreateATAInstruction(
|
|
7814
|
-
this._program.provider.connection,
|
|
7815
|
-
poolState.tokenBMint,
|
|
7816
|
-
partner,
|
|
7817
|
-
partner,
|
|
7818
|
-
true,
|
|
7819
|
-
tokenBProgram
|
|
7820
|
-
)
|
|
7821
|
-
]);
|
|
7822
|
-
createTokenAAccountIx && preInstructions.push(createTokenAAccountIx);
|
|
7823
|
-
createTokenBAccountIx && preInstructions.push(createTokenBAccountIx);
|
|
9792
|
+
const {
|
|
9793
|
+
tokenAAta: tokenAAccount,
|
|
9794
|
+
tokenBAta: tokenBAccount,
|
|
9795
|
+
instructions: preInstructions
|
|
9796
|
+
} = yield this.prepareTokenAccounts(
|
|
9797
|
+
partner,
|
|
9798
|
+
tokenAMint,
|
|
9799
|
+
tokenBMint,
|
|
9800
|
+
tokenAProgram,
|
|
9801
|
+
tokenBProgram
|
|
9802
|
+
);
|
|
7824
9803
|
const postInstructions = [];
|
|
7825
9804
|
if ([
|
|
7826
9805
|
poolState.tokenAMint.toBase58(),
|
|
@@ -7829,8 +9808,8 @@ var CpAmm = class {
|
|
|
7829
9808
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(partner);
|
|
7830
9809
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7831
9810
|
}
|
|
7832
|
-
return yield this._program.methods.claimPartnerFee(maxAmountA, maxAmountB).
|
|
7833
|
-
poolAuthority,
|
|
9811
|
+
return yield this._program.methods.claimPartnerFee(maxAmountA, maxAmountB).accountsPartial({
|
|
9812
|
+
poolAuthority: this.poolAuthority,
|
|
7834
9813
|
pool,
|
|
7835
9814
|
tokenAAccount,
|
|
7836
9815
|
tokenBAccount,
|
|
@@ -7840,22 +9819,25 @@ var CpAmm = class {
|
|
|
7840
9819
|
tokenBMint,
|
|
7841
9820
|
partner,
|
|
7842
9821
|
tokenAProgram,
|
|
7843
|
-
tokenBProgram
|
|
7844
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7845
|
-
program: this._program.programId
|
|
9822
|
+
tokenBProgram
|
|
7846
9823
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7847
9824
|
});
|
|
7848
9825
|
}
|
|
9826
|
+
/**
|
|
9827
|
+
* Builds a transaction to claim reward from a position.
|
|
9828
|
+
* @param {ClaimRewardParams} params - Parameters for claiming reward.
|
|
9829
|
+
* @returns Transaction builder.
|
|
9830
|
+
*/
|
|
7849
9831
|
claimReward(params) {
|
|
7850
9832
|
return __async(this, null, function* () {
|
|
7851
|
-
const {
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
9833
|
+
const {
|
|
9834
|
+
user,
|
|
9835
|
+
position,
|
|
9836
|
+
positionNftAccount,
|
|
9837
|
+
rewardIndex,
|
|
9838
|
+
poolState,
|
|
9839
|
+
positionState
|
|
9840
|
+
} = params;
|
|
7859
9841
|
const rewardInfo = poolState.rewardInfos[rewardIndex];
|
|
7860
9842
|
const tokenProgram = getTokenProgram(rewardInfo.rewardTokenFlag);
|
|
7861
9843
|
const preInstructions = [];
|
|
@@ -7873,18 +9855,16 @@ var CpAmm = class {
|
|
|
7873
9855
|
const closeWrappedSOLIx = yield unwrapSOLInstruction(user);
|
|
7874
9856
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
7875
9857
|
}
|
|
7876
|
-
return yield this._program.methods.claimReward(rewardIndex).
|
|
9858
|
+
return yield this._program.methods.claimReward(rewardIndex).accountsPartial({
|
|
7877
9859
|
pool: positionState.pool,
|
|
7878
9860
|
positionNftAccount,
|
|
7879
9861
|
rewardVault: rewardInfo.vault,
|
|
7880
9862
|
rewardMint: rewardInfo.mint,
|
|
7881
|
-
poolAuthority,
|
|
9863
|
+
poolAuthority: this.poolAuthority,
|
|
7882
9864
|
position,
|
|
7883
9865
|
userTokenAccount,
|
|
7884
9866
|
owner: user,
|
|
7885
|
-
tokenProgram
|
|
7886
|
-
eventAuthority: deriveEventAuthority(this._program.programId)[0],
|
|
7887
|
-
program: this._program.programId
|
|
9867
|
+
tokenProgram
|
|
7888
9868
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
7889
9869
|
});
|
|
7890
9870
|
}
|
|
@@ -7940,5 +9920,36 @@ var index_default = cp_amm_default;
|
|
|
7940
9920
|
|
|
7941
9921
|
|
|
7942
9922
|
|
|
7943
|
-
|
|
9923
|
+
|
|
9924
|
+
|
|
9925
|
+
|
|
9926
|
+
|
|
9927
|
+
|
|
9928
|
+
|
|
9929
|
+
|
|
9930
|
+
|
|
9931
|
+
|
|
9932
|
+
|
|
9933
|
+
|
|
9934
|
+
|
|
9935
|
+
|
|
9936
|
+
|
|
9937
|
+
|
|
9938
|
+
|
|
9939
|
+
|
|
9940
|
+
|
|
9941
|
+
|
|
9942
|
+
|
|
9943
|
+
|
|
9944
|
+
|
|
9945
|
+
|
|
9946
|
+
|
|
9947
|
+
|
|
9948
|
+
|
|
9949
|
+
|
|
9950
|
+
|
|
9951
|
+
|
|
9952
|
+
|
|
9953
|
+
|
|
9954
|
+
exports.ActivationPoint = ActivationPoint; exports.ActivationType = ActivationType; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.CP_AMM_PROGRAM_ID = CP_AMM_PROGRAM_ID; exports.CollectFeeMode = CollectFeeMode; exports.CpAmm = CpAmm; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeSchedulerMode = FeeSchedulerMode; exports.LIQUIDITY_SCALE = LIQUIDITY_SCALE; exports.MAX_CU_BUFFER = MAX_CU_BUFFER; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MIN_CU_BUFFER = MIN_CU_BUFFER; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.ONE = ONE; exports.Rounding = Rounding; exports.SCALE_OFFSET = SCALE_OFFSET; exports.TradeDirection = TradeDirection; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.calculateInitSqrtPrice = calculateInitSqrtPrice; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.decimalToQ64 = decimalToQ64; exports.default = index_default; exports.deriveClaimFeeOperatorAddress = deriveClaimFeeOperatorAddress; exports.deriveConfigAddress = deriveConfigAddress; exports.deriveCustomizablePoolAddress = deriveCustomizablePoolAddress; exports.derivePoolAddress = derivePoolAddress; exports.derivePoolAuthority = derivePoolAuthority; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveRewardVaultAddress = deriveRewardVaultAddress; exports.deriveTokenBadgeAddress = deriveTokenBadgeAddress; exports.deriveTokenVaultAddress = deriveTokenVaultAddress; exports.feeNumeratorToBps = feeNumeratorToBps; exports.getAllPositionNftAccountByOwner = getAllPositionNftAccountByOwner; exports.getAllUserPositionNftAccount = getAllUserPositionNftAccount; exports.getAmountAFromLiquidityDelta = getAmountAFromLiquidityDelta; exports.getAmountBFromLiquidityDelta = getAmountBFromLiquidityDelta; exports.getAvailableVestingLiquidity = getAvailableVestingLiquidity; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getBaseFeeParams = getBaseFeeParams; exports.getDynamicFeeNumerator = getDynamicFeeNumerator; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getFeeNumerator = getFeeNumerator; exports.getFirstKey = getFirstKey; exports.getLiquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA; exports.getLiquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB; exports.getMaxAmountWithSlippage = getMaxAmountWithSlippage; exports.getMinAmountWithSlippage = getMinAmountWithSlippage; exports.getNextSqrtPrice = getNextSqrtPrice; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getPriceImpact = getPriceImpact; exports.getSecondKey = getSecondKey; exports.getSimulationComputeUnits = getSimulationComputeUnits; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmount = getSwapAmount; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTotalLockedLiquidity = getTotalLockedLiquidity; exports.getUnClaimReward = getUnClaimReward; exports.isVestingComplete = isVestingComplete; exports.mulDiv = mulDiv; exports.positionByPoolFilter = positionByPoolFilter; exports.pow = pow; exports.q64ToDecimal = q64ToDecimal; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.vestingByPositionFilter = vestingByPositionFilter; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
7944
9955
|
//# sourceMappingURL=index.js.map
|