Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pendle/core-v2-offchain-math

Package Overview
Dependencies
Maintainers
17
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pendle/core-v2-offchain-math - npm Package Compare versions

Comparing version 1.0.3-beta to 1.0.4-beta

1

dist/cjs/ExchangeRate/specialized.js

@@ -12,3 +12,2 @@ "use strict";

*/
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function generateSpecializedExchangeRateClass(fromTag, toTag) {

@@ -15,0 +14,0 @@ class ForwardConversion extends ExchangeRate_1.BaseExchangeRate {

@@ -9,3 +9,2 @@ import { FixedX18 } from '../FixedX18';

*/
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function generateSpecializedExchangeRateClass(fromTag, toTag) {

@@ -12,0 +11,0 @@ class ForwardConversion extends BaseExchangeRate {

import { FixedX18 } from '../FixedX18';
import { BaseExchangeRate } from './ExchangeRate';
export type SpecializedExchangeRateCtor<FromTag extends string, ToTag extends string> = {
new (rate: FixedX18): BaseExchangeRate<FromTag, ToTag>;
create(rate: bigint | FixedX18 | BaseExchangeRate<FromTag, ToTag>): BaseExchangeRate<FromTag, ToTag>;
};
/**

@@ -9,502 +13,6 @@ * Function to generate specialized class for Exchange Rate.

*/
export declare function generateSpecializedExchangeRateClass<const FromTag extends string, const ToTag extends string>(fromTag: FromTag, toTag: ToTag): readonly [{
new (rate: FixedX18): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<FromTag, ToTag>): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
invClass: {
new (rate: FixedX18): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<ToTag, FromTag>): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
readonly invClass: any;
from<const FromTag_1 extends string, const ToTag_1 extends string>(fromTag: FromTag_1, toTag: ToTag_1, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag_1, ToTag_1>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
};
from<const FromTag_1 extends string, const ToTag_1 extends string>(fromTag: FromTag_1, toTag: ToTag_1, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag_1, ToTag_1>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
}, {
new (rate: FixedX18): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<ToTag, FromTag>): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
readonly invClass: {
new (rate: FixedX18): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<FromTag, ToTag>): {
readonly fromTag: FromTag;
readonly toTag: ToTag;
inv(): {
readonly fromTag: ToTag;
readonly toTag: FromTag;
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag>): BaseExchangeRate<ToTag, Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, FromTag>): BaseExchangeRate<ToTag, Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_2>): BaseExchangeRate<FromTag, Tag_2>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<ToTag, Tag_3>): BaseExchangeRate<FromTag, Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, ToTag>): BaseExchangeRate<FromTag, Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<FromTag, Tag_5>): BaseExchangeRate<ToTag, Tag_5>;
convert(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convert(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
convertUp(params: Record<FromTag, bigint>): Record<ToTag, bigint>;
convertUp(params: Record<ToTag, bigint>): Record<FromTag, bigint>;
};
invClass: any;
from<const FromTag_1 extends string, const ToTag_1 extends string>(fromTag: FromTag_1, toTag: ToTag_1, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag_1, ToTag_1>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
};
from<const FromTag_1 extends string, const ToTag_1 extends string>(fromTag: FromTag_1, toTag: ToTag_1, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag_1, ToTag_1>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
}];
export declare const PyIndex: {
new (rate: FixedX18): {
readonly fromTag: "sy";
readonly toTag: "asset";
inv(): {
readonly fromTag: "asset";
readonly toTag: "sy";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag>): BaseExchangeRate<"asset", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "sy">): BaseExchangeRate<"asset", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_2>): BaseExchangeRate<"sy", Tag_2>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_3>): BaseExchangeRate<"sy", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "asset">): BaseExchangeRate<"sy", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag_5>): BaseExchangeRate<"asset", Tag_5>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<"sy", "asset">): {
readonly fromTag: "sy";
readonly toTag: "asset";
inv(): {
readonly fromTag: "asset";
readonly toTag: "sy";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag>): BaseExchangeRate<"asset", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "sy">): BaseExchangeRate<"asset", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_2>): BaseExchangeRate<"sy", Tag_2>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_3>): BaseExchangeRate<"sy", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "asset">): BaseExchangeRate<"sy", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag_5>): BaseExchangeRate<"asset", Tag_5>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
};
invClass: {
new (rate: FixedX18): {
readonly fromTag: "asset";
readonly toTag: "sy";
inv(): {
readonly fromTag: "sy";
readonly toTag: "asset";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_3>): BaseExchangeRate<"sy", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "asset">): BaseExchangeRate<"sy", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag_5>): BaseExchangeRate<"asset", Tag_5>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag>): BaseExchangeRate<"asset", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "sy">): BaseExchangeRate<"asset", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_2>): BaseExchangeRate<"sy", Tag_2>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<"asset", "sy">): {
readonly fromTag: "asset";
readonly toTag: "sy";
inv(): {
readonly fromTag: "sy";
readonly toTag: "asset";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_3>): BaseExchangeRate<"sy", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "asset">): BaseExchangeRate<"sy", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag_5>): BaseExchangeRate<"asset", Tag_5>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"sy", Tag>): BaseExchangeRate<"asset", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "sy">): BaseExchangeRate<"asset", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_2>): BaseExchangeRate<"sy", Tag_2>;
convert(params: Record<"asset", bigint>): Record<"sy", bigint>;
convert(params: Record<"sy", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"sy", bigint>;
convertUp(params: Record<"sy", bigint>): Record<"asset", bigint>;
};
readonly invClass: any;
from<const FromTag extends string, const ToTag extends string>(fromTag: FromTag, toTag: ToTag, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag, ToTag>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
};
from<const FromTag extends string, const ToTag extends string>(fromTag: FromTag, toTag: ToTag, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag, ToTag>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
};
export declare function generateSpecializedExchangeRateClass<const FromTag extends string, const ToTag extends string>(fromTag: FromTag, toTag: ToTag): [SpecializedExchangeRateCtor<FromTag, ToTag>, SpecializedExchangeRateCtor<ToTag, FromTag>];
export declare const PyIndex: SpecializedExchangeRateCtor<"sy", "asset">;
export type PyIndex = InstanceType<typeof PyIndex>;
export declare const MarketExchangeRate: {
new (rate: FixedX18): {
readonly fromTag: "asset";
readonly toTag: "pt";
inv(): {
readonly fromTag: "pt";
readonly toTag: "asset";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag>): BaseExchangeRate<"pt", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "asset">): BaseExchangeRate<"pt", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_2>): BaseExchangeRate<"asset", Tag_2>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_3>): BaseExchangeRate<"asset", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "pt">): BaseExchangeRate<"asset", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_5>): BaseExchangeRate<"pt", Tag_5>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<"asset", "pt">): {
readonly fromTag: "asset";
readonly toTag: "pt";
inv(): {
readonly fromTag: "pt";
readonly toTag: "asset";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag>): BaseExchangeRate<"pt", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "asset">): BaseExchangeRate<"pt", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_2>): BaseExchangeRate<"asset", Tag_2>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_3>): BaseExchangeRate<"asset", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "pt">): BaseExchangeRate<"asset", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_5>): BaseExchangeRate<"pt", Tag_5>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
};
invClass: {
new (rate: FixedX18): {
readonly fromTag: "pt";
readonly toTag: "asset";
inv(): {
readonly fromTag: "asset";
readonly toTag: "pt";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_3>): BaseExchangeRate<"asset", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "pt">): BaseExchangeRate<"asset", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_5>): BaseExchangeRate<"pt", Tag_5>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag>): BaseExchangeRate<"pt", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "asset">): BaseExchangeRate<"pt", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_2>): BaseExchangeRate<"asset", Tag_2>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
};
create(rate: bigint | FixedX18 | BaseExchangeRate<"pt", "asset">): {
readonly fromTag: "pt";
readonly toTag: "asset";
inv(): {
readonly fromTag: "asset";
readonly toTag: "pt";
inv(): any;
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag_3 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_3>): BaseExchangeRate<"asset", Tag_3>;
sameToTagChain<const Tag_4 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_4, "pt">): BaseExchangeRate<"asset", Tag_4>;
sameFromTagChain<const Tag_5 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag_5>): BaseExchangeRate<"pt", Tag_5>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
};
map(transformFn: (rate: FixedX18) => FixedX18): any;
readonly rate: FixedX18;
readonly rawRate: bigint;
chain<const Tag extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"asset", Tag>): BaseExchangeRate<"pt", Tag>;
sameToTagChain<const Tag_1 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<Tag_1, "asset">): BaseExchangeRate<"pt", Tag_1>;
sameFromTagChain<const Tag_2 extends string>(otherRate: import("./ExchangeRate").ExchangeRate<"pt", Tag_2>): BaseExchangeRate<"asset", Tag_2>;
convert(params: Record<"pt", bigint>): Record<"asset", bigint>;
convert(params: Record<"asset", bigint>): Record<"pt", bigint>;
convertUp(params: Record<"pt", bigint>): Record<"asset", bigint>;
convertUp(params: Record<"asset", bigint>): Record<"pt", bigint>;
};
readonly invClass: any;
from<const FromTag extends string, const ToTag extends string>(fromTag: FromTag, toTag: ToTag, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag, ToTag>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
};
from<const FromTag extends string, const ToTag extends string>(fromTag: FromTag, toTag: ToTag, rawRate: bigint | FixedX18): import("./ExchangeRate").ExchangeRate<FromTag, ToTag>;
isExchangeRate(value: unknown): value is import("./ExchangeRate").ExchangeRate<string, string>;
};
export declare const MarketExchangeRate: SpecializedExchangeRateCtor<"asset", "pt">;
export type MarketExchangeRate = InstanceType<typeof MarketExchangeRate>;

2

package.json
{
"name": "@pendle/core-v2-offchain-math",
"version": "1.0.3-beta",
"version": "1.0.4-beta",
"description": "Typescript library for contract-related calculation",

@@ -5,0 +5,0 @@ "typings": "dist/types/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc