@uniswap/uniswapx-sdk
Advanced tools
Comparing version 1.4.1 to 2.0.0-alpha.0
@@ -7,3 +7,4 @@ export { ExclusiveDutchOrderReactor__factory } from "./ExclusiveDutchOrderReactor__factory"; | ||
export { SwapRouter02Executor__factory } from "./SwapRouter02Executor__factory"; | ||
export { V2DutchOrderReactor__factory } from "./V2DutchOrderReactor__factory"; | ||
export { DeploylessMulticall2__factory } from "./DeploylessMulticall2__factory"; | ||
export { Multicall2__factory } from "./Multicall2__factory"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Multicall2__factory = exports.DeploylessMulticall2__factory = exports.SwapRouter02Executor__factory = exports.Permit2__factory = exports.OrderQuoter__factory = exports.MockERC20__factory = exports.ExclusiveFillerValidation__factory = exports.ExclusiveDutchOrderReactor__factory = void 0; | ||
exports.Multicall2__factory = exports.DeploylessMulticall2__factory = exports.V2DutchOrderReactor__factory = exports.SwapRouter02Executor__factory = exports.Permit2__factory = exports.OrderQuoter__factory = exports.MockERC20__factory = exports.ExclusiveFillerValidation__factory = exports.ExclusiveDutchOrderReactor__factory = void 0; | ||
/* Autogenerated file. Do not edit manually. */ | ||
@@ -19,2 +19,4 @@ /* tslint:disable */ | ||
Object.defineProperty(exports, "SwapRouter02Executor__factory", { enumerable: true, get: function () { return SwapRouter02Executor__factory_1.SwapRouter02Executor__factory; } }); | ||
var V2DutchOrderReactor__factory_1 = require("./V2DutchOrderReactor__factory"); | ||
Object.defineProperty(exports, "V2DutchOrderReactor__factory", { enumerable: true, get: function () { return V2DutchOrderReactor__factory_1.V2DutchOrderReactor__factory; } }); | ||
var DeploylessMulticall2__factory_1 = require("./DeploylessMulticall2__factory"); | ||
@@ -21,0 +23,0 @@ Object.defineProperty(exports, "DeploylessMulticall2__factory", { enumerable: true, get: function () { return DeploylessMulticall2__factory_1.DeploylessMulticall2__factory; } }); |
@@ -7,2 +7,3 @@ export type { ExclusiveDutchOrderReactor } from "./ExclusiveDutchOrderReactor"; | ||
export type { SwapRouter02Executor } from "./SwapRouter02Executor"; | ||
export type { V2DutchOrderReactor } from "./V2DutchOrderReactor"; | ||
export type { DeploylessMulticall2 } from "./DeploylessMulticall2"; | ||
@@ -19,1 +20,2 @@ export type { Multicall2 } from "./Multicall2"; | ||
export { SwapRouter02Executor__factory } from "./factories/SwapRouter02Executor__factory"; | ||
export { V2DutchOrderReactor__factory } from "./factories/V2DutchOrderReactor__factory"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SwapRouter02Executor__factory = exports.Permit2__factory = exports.OrderQuoter__factory = exports.Multicall2__factory = exports.MockERC20__factory = exports.ExclusiveFillerValidation__factory = exports.ExclusiveDutchOrderReactor__factory = exports.DeploylessMulticall2__factory = exports.factories = void 0; | ||
exports.V2DutchOrderReactor__factory = exports.SwapRouter02Executor__factory = exports.Permit2__factory = exports.OrderQuoter__factory = exports.Multicall2__factory = exports.MockERC20__factory = exports.ExclusiveFillerValidation__factory = exports.ExclusiveDutchOrderReactor__factory = exports.DeploylessMulticall2__factory = exports.factories = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -22,2 +22,4 @@ exports.factories = tslib_1.__importStar(require("./factories")); | ||
Object.defineProperty(exports, "SwapRouter02Executor__factory", { enumerable: true, get: function () { return SwapRouter02Executor__factory_1.SwapRouter02Executor__factory; } }); | ||
var V2DutchOrderReactor__factory_1 = require("./factories/V2DutchOrderReactor__factory"); | ||
Object.defineProperty(exports, "V2DutchOrderReactor__factory", { enumerable: true, get: function () { return V2DutchOrderReactor__factory_1.V2DutchOrderReactor__factory; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -5,23 +5,4 @@ import { SignatureLike } from "@ethersproject/bytes"; | ||
import { ResolvedOrder } from "../utils/OrderQuoter"; | ||
import { Order, OrderInfo, OrderResolutionOptions } from "./types"; | ||
import { DutchInput, DutchInputJSON, DutchOutput, DutchOutputJSON, Order, OrderInfo, OrderResolutionOptions } from "./types"; | ||
export declare function id(text: string): string; | ||
export declare type DutchOutput = { | ||
readonly token: string; | ||
readonly startAmount: BigNumber; | ||
readonly endAmount: BigNumber; | ||
readonly recipient: string; | ||
}; | ||
export declare type DutchOutputJSON = Omit<DutchOutput, "startAmount" | "endAmount"> & { | ||
startAmount: string; | ||
endAmount: string; | ||
}; | ||
export declare type DutchInput = { | ||
readonly token: string; | ||
readonly startAmount: BigNumber; | ||
readonly endAmount: BigNumber; | ||
}; | ||
export declare type DutchInputJSON = Omit<DutchInput, "startAmount" | "endAmount"> & { | ||
startAmount: string; | ||
endAmount: string; | ||
}; | ||
export declare type DutchOrderInfo = OrderInfo & { | ||
@@ -28,0 +9,0 @@ decayStartTime: number; |
@@ -41,2 +41,25 @@ import { SignatureLike } from "@ethersproject/bytes"; | ||
} | ||
export declare abstract class V2Order extends Order { | ||
/** | ||
* Recovers the signer (user) that signed over the inner order | ||
* * @param signature The signature to recover | ||
* * @returns address The address which created the signature | ||
*/ | ||
abstract getSigner(signature: SignatureLike): string; | ||
/** | ||
* Returns the abi encoded full order, including cosigned data, cosignature, etc | ||
* @return The abi encoded serialized order which can be submitted on-chain | ||
*/ | ||
abstract serialize(): string; | ||
/** | ||
* Recovers the cosigner address that signed over the full order | ||
* @param fullOrderHash The full order hash over (orderHash || cosignerData) | ||
* @returns address The cosigner address | ||
*/ | ||
abstract recoverCosigner(fullOrderHash: string): string; | ||
/** | ||
* @return Returns the full order hash over (orderHash || cosignerData) | ||
*/ | ||
abstract hashFullOrder(): string; | ||
} | ||
export declare type TokenAmount = { | ||
@@ -58,1 +81,20 @@ readonly token: string; | ||
}; | ||
export declare type DutchOutput = { | ||
readonly token: string; | ||
readonly startAmount: BigNumber; | ||
readonly endAmount: BigNumber; | ||
readonly recipient: string; | ||
}; | ||
export declare type DutchOutputJSON = Omit<DutchOutput, "startAmount" | "endAmount"> & { | ||
startAmount: string; | ||
endAmount: string; | ||
}; | ||
export declare type DutchInput = { | ||
readonly token: string; | ||
readonly startAmount: BigNumber; | ||
readonly endAmount: BigNumber; | ||
}; | ||
export declare type DutchInputJSON = Omit<DutchInput, "startAmount" | "endAmount"> & { | ||
startAmount: string; | ||
endAmount: string; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Order = void 0; | ||
exports.V2Order = exports.Order = void 0; | ||
const validation_1 = require("./validation"); | ||
@@ -15,2 +15,5 @@ class Order { | ||
exports.Order = Order; | ||
class V2Order extends Order { | ||
} | ||
exports.V2Order = V2Order; | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@uniswap/uniswapx-sdk", | ||
"author": "Uniswap", | ||
"version": "1.4.1", | ||
"version": "2.0.0-alpha.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "dist/src/index.js", |
@@ -49,7 +49,9 @@ # uniswapx-sdk | ||
```ts | ||
import { parseOrder, Order, OrderValidation } from '@uniswap/uniswapx-sdk'; | ||
import { DutchOrder, Order } from '@uniswap/uniswapx-sdk'; | ||
const serializedOrder = '0x1111222233334444555500000000234300234...'; | ||
const order: Order = parseOrder(serializedOrder); | ||
const chainId = 1; | ||
const order: Order = DutchOrder.parse(serializedOrder, chainId); | ||
const orderData = order.info; | ||
@@ -56,0 +58,0 @@ const orderHash = order.hash(); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1086589
174
14675
107
12
3
1