@uniswap/universal-router-sdk 1.5.0-beta.0 → 1.5.0-beta.2
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 +2 -3
- package/dist/entities/NFTTrade.d.ts +3 -3
- package/dist/entities/protocols/index.d.ts +1 -1
- package/dist/entities/protocols/looksRareV2.d.ts +56 -0
- package/dist/entities/protocols/nftx.d.ts +1 -1
- package/dist/test/orders/looksRareV2.d.ts +2 -0
- package/dist/test/orders/seaportV1_4.d.ts +1 -2
- package/dist/universal-router-sdk.cjs.development.js +1635 -703
- package/dist/universal-router-sdk.cjs.development.js.map +1 -1
- package/dist/universal-router-sdk.cjs.production.min.js +1 -1
- package/dist/universal-router-sdk.cjs.production.min.js.map +1 -1
- package/dist/universal-router-sdk.esm.js +1636 -704
- package/dist/universal-router-sdk.esm.js.map +1 -1
- package/dist/utils/routerCommands.d.ts +4 -5
- package/package.json +4 -4
- package/dist/entities/protocols/looksRare.d.ts +0 -44
- package/dist/test/orders/looksRare.d.ts +0 -12
package/README.md
CHANGED
|
@@ -98,13 +98,12 @@ Make sure you are running `node v16`
|
|
|
98
98
|
Install dependencies and run typescript unit tests
|
|
99
99
|
```bash
|
|
100
100
|
yarn install
|
|
101
|
-
yarn test
|
|
101
|
+
yarn test:hardhat
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Run forge integration tests
|
|
105
105
|
```bash
|
|
106
106
|
yarn symlink # must install git submodules
|
|
107
107
|
forge install
|
|
108
|
-
forge
|
|
109
|
-
forge test
|
|
108
|
+
yarn test:forge
|
|
110
109
|
```
|
|
@@ -5,12 +5,12 @@ import { NFTXData } from './protocols/nftx';
|
|
|
5
5
|
import { NFT20Data } from './protocols/nft20';
|
|
6
6
|
import { RoutePlanner } from '../utils/routerCommands';
|
|
7
7
|
import { Command, RouterTradeType, TradeConfig } from './Command';
|
|
8
|
-
import { LooksRareData } from './protocols/looksRare';
|
|
9
8
|
import { SudoswapData } from './protocols/sudoswap';
|
|
10
9
|
import { CryptopunkData } from './protocols/cryptopunk';
|
|
11
10
|
import { X2Y2Data } from './protocols/x2y2';
|
|
12
11
|
import { ElementData } from './protocols/element-market';
|
|
13
|
-
|
|
12
|
+
import { LooksRareV2Data } from './protocols/looksRareV2';
|
|
13
|
+
export declare type SupportedProtocolsData = SeaportData | FoundationData | NFTXData | LooksRareV2Data | X2Y2Data | CryptopunkData | NFT20Data | SudoswapData | ElementData;
|
|
14
14
|
export declare abstract class NFTTrade<T> implements Command {
|
|
15
15
|
readonly tradeType: RouterTradeType;
|
|
16
16
|
readonly orders: T[];
|
|
@@ -28,7 +28,7 @@ export declare type BuyItem = {
|
|
|
28
28
|
};
|
|
29
29
|
export declare enum Market {
|
|
30
30
|
Foundation = "foundation",
|
|
31
|
-
|
|
31
|
+
LooksRareV2 = "looksrareV2",
|
|
32
32
|
NFT20 = "nft20",
|
|
33
33
|
NFTX = "nftx",
|
|
34
34
|
Seaport = "seaport",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Interface } from '@ethersproject/abi';
|
|
2
|
+
import { BuyItem, NFTTrade } from '../NFTTrade';
|
|
3
|
+
import { TradeConfig } from '../Command';
|
|
4
|
+
import { RoutePlanner } from '../../utils/routerCommands';
|
|
5
|
+
import { BigNumber } from 'ethers';
|
|
6
|
+
export declare type MakerOrder = {
|
|
7
|
+
quoteType: number;
|
|
8
|
+
globalNonce: string;
|
|
9
|
+
subsetNonce: string;
|
|
10
|
+
orderNonce: string;
|
|
11
|
+
strategyId: number;
|
|
12
|
+
collectionType: number;
|
|
13
|
+
collection: string;
|
|
14
|
+
currency: string;
|
|
15
|
+
signer: string;
|
|
16
|
+
startTime: number;
|
|
17
|
+
endTime: number;
|
|
18
|
+
price: string;
|
|
19
|
+
itemIds: string[];
|
|
20
|
+
amounts: string[];
|
|
21
|
+
additionalParameters: string;
|
|
22
|
+
};
|
|
23
|
+
export declare type TakerOrder = {
|
|
24
|
+
recipient: string;
|
|
25
|
+
additionalParameters: string;
|
|
26
|
+
};
|
|
27
|
+
export declare type MerkleProof = {
|
|
28
|
+
value: string;
|
|
29
|
+
position: number;
|
|
30
|
+
};
|
|
31
|
+
export declare type MerkleTree = {
|
|
32
|
+
root: string;
|
|
33
|
+
proof: MerkleProof[];
|
|
34
|
+
};
|
|
35
|
+
export declare type LRV2APIOrder = MakerOrder & {
|
|
36
|
+
id: string;
|
|
37
|
+
hash: string;
|
|
38
|
+
signature: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
merkleRoot: string;
|
|
41
|
+
merkleProof: MerkleProof[];
|
|
42
|
+
status: string;
|
|
43
|
+
};
|
|
44
|
+
export declare type LooksRareV2Data = {
|
|
45
|
+
apiOrder: LRV2APIOrder;
|
|
46
|
+
taker: string;
|
|
47
|
+
};
|
|
48
|
+
export declare class LooksRareV2Trade extends NFTTrade<LooksRareV2Data> {
|
|
49
|
+
static INTERFACE: Interface;
|
|
50
|
+
private static ERC721_ORDER;
|
|
51
|
+
constructor(orders: LooksRareV2Data[]);
|
|
52
|
+
encode(planner: RoutePlanner, config: TradeConfig): void;
|
|
53
|
+
getBuyItems(): BuyItem[];
|
|
54
|
+
getTotalPrice(): BigNumber;
|
|
55
|
+
private refactorAPIData;
|
|
56
|
+
}
|
|
@@ -5,11 +5,11 @@ import { RoutePlanner } from '../../utils/routerCommands';
|
|
|
5
5
|
import { BigNumber, BigNumberish } from 'ethers';
|
|
6
6
|
export declare type NFTXData = {
|
|
7
7
|
recipient: string;
|
|
8
|
-
vaultAddress: string;
|
|
9
8
|
vaultId: BigNumberish;
|
|
10
9
|
tokenAddress: string;
|
|
11
10
|
tokenIds: BigNumberish[];
|
|
12
11
|
value: BigNumber;
|
|
12
|
+
swapCalldata: string;
|
|
13
13
|
};
|
|
14
14
|
export declare class NFTXTrade extends NFTTrade<NFTXData> {
|
|
15
15
|
static INTERFACE: Interface;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { SeaportData } from '../../src/entities/protocols/seaport';
|
|
2
|
-
import { BigNumber } from 'ethers';
|
|
3
2
|
export declare const seaportV1_4DataETH: SeaportData;
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const seaportV1_4DataETHRecent: SeaportData;
|