gondi 0.36.0 → 0.37.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 +2 -0
- package/dist/index.mjs +43 -43
- package/dist/index.mjs.map +4 -4
- package/dist/src/blockchain.d.ts +10 -0
- package/dist/src/gondi.d.ts +11 -4
- package/dist/src/utils/typedData.d.ts +22 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/src/clients/opensea/index.d.ts +0 -41
- package/dist/src/clients/opensea/types.d.ts +0 -115
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gondi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"docs": "typedoc --options ./typedocconfig.cts --out docs/$npm_package_version && rm -rf docs/lts && cp -r docs/$npm_package_version/ docs/lts/",
|
|
18
|
-
"analyze": "METAFILE=true
|
|
18
|
+
"analyze": "METAFILE=true bun run build",
|
|
19
19
|
"build": "node esbuild.js && tsc && tsc-alias",
|
|
20
20
|
"build-unbundle": "tsc --outDir dist && tsc-alias",
|
|
21
|
-
"verify": "bun run lint && bun run
|
|
22
|
-
"lint": "
|
|
23
|
-
"lint-fix": "
|
|
21
|
+
"verify": "bun run lint && bun run test",
|
|
22
|
+
"lint": "bun run fmt-check && eslint src/ --ext .js,.jsx,.ts,.tsx",
|
|
23
|
+
"lint-fix": "bun run fmt && eslint src/ --ext .js,.jsx,.ts,.tsx --fix",
|
|
24
24
|
"fmt-check": "prettier --config .prettierrc --ignore-path .prettierignore --check .",
|
|
25
25
|
"fmt": "prettier --config .prettierrc --ignore-path .prettierignore --write .",
|
|
26
|
-
"test": "bun test",
|
|
26
|
+
"test": "bun test tests/",
|
|
27
27
|
"gql:types": "tsx --env-file=.env codegen.ts",
|
|
28
28
|
"prepare": "husky install",
|
|
29
29
|
"_postinstall": "husky install",
|
|
@@ -84,11 +84,12 @@
|
|
|
84
84
|
"@babel/core": "7.29.7",
|
|
85
85
|
"ajv": "6.14.0",
|
|
86
86
|
"brace-expansion": "5.0.9",
|
|
87
|
+
"browserslist": "4.28.8",
|
|
87
88
|
"esbuild": "0.25.12",
|
|
88
89
|
"flatted": "3.4.2",
|
|
89
90
|
"handlebars": "4.7.9",
|
|
90
91
|
"immutable": "5.1.9",
|
|
91
|
-
"js-yaml": "4.3.
|
|
92
|
+
"js-yaml": "4.3.2",
|
|
92
93
|
"lodash": "4.18.0",
|
|
93
94
|
"minimatch": "10.2.5",
|
|
94
95
|
"node-fetch": "2.7.0",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
type ConstructorArgs = {
|
|
3
|
-
apiUrl?: string;
|
|
4
|
-
apiKey?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare class Opensea {
|
|
7
|
-
apiUrl: string;
|
|
8
|
-
apiKey?: string;
|
|
9
|
-
constructor({ apiUrl, apiKey }: ConstructorArgs);
|
|
10
|
-
private openseaBlockchainByChainId;
|
|
11
|
-
fulfillOrder({ hash, protocolAddress: protocol_address, fulfiller, consideration: considerationInput, chainId, }: {
|
|
12
|
-
hash: string;
|
|
13
|
-
protocolAddress: Address;
|
|
14
|
-
fulfiller: {
|
|
15
|
-
address: Address;
|
|
16
|
-
};
|
|
17
|
-
consideration?: {
|
|
18
|
-
contract: Address;
|
|
19
|
-
token_id: string;
|
|
20
|
-
};
|
|
21
|
-
chainId: number;
|
|
22
|
-
}): Promise<{
|
|
23
|
-
eventName: string;
|
|
24
|
-
functionName: string;
|
|
25
|
-
functionArgs: (string | import("./types").Order[] | import("./types").CriteriaResolver[] | {
|
|
26
|
-
offerComponents: {
|
|
27
|
-
orderIndex: string;
|
|
28
|
-
itemIndex: string;
|
|
29
|
-
}[];
|
|
30
|
-
considerationComponents: {
|
|
31
|
-
orderIndex: string;
|
|
32
|
-
itemIndex: string;
|
|
33
|
-
}[];
|
|
34
|
-
}[])[] | (string | import("./types").Order | import("./types").CriteriaResolver[])[];
|
|
35
|
-
to: string;
|
|
36
|
-
value: string | number;
|
|
37
|
-
fee: bigint;
|
|
38
|
-
}>;
|
|
39
|
-
private postApi;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
export type Order = {
|
|
2
|
-
parameters: {
|
|
3
|
-
offerer: string;
|
|
4
|
-
zone: string;
|
|
5
|
-
offer: {
|
|
6
|
-
itemType: number;
|
|
7
|
-
token: string;
|
|
8
|
-
identifierOrCriteria: string;
|
|
9
|
-
startAmount: string;
|
|
10
|
-
endAmount: string;
|
|
11
|
-
}[];
|
|
12
|
-
consideration: {
|
|
13
|
-
itemType: number;
|
|
14
|
-
token: string;
|
|
15
|
-
identifierOrCriteria: string;
|
|
16
|
-
startAmount: string;
|
|
17
|
-
endAmount: string;
|
|
18
|
-
recipient: string;
|
|
19
|
-
}[];
|
|
20
|
-
orderType: number;
|
|
21
|
-
startTime: string;
|
|
22
|
-
endTime: string;
|
|
23
|
-
zoneHash: string;
|
|
24
|
-
salt: string;
|
|
25
|
-
conduitKey: string;
|
|
26
|
-
totalOriginalConsiderationItems: string;
|
|
27
|
-
};
|
|
28
|
-
numerator: number;
|
|
29
|
-
denominator: number;
|
|
30
|
-
signature: string;
|
|
31
|
-
extraData: string;
|
|
32
|
-
};
|
|
33
|
-
export type CriteriaResolver = {
|
|
34
|
-
orderIndex: string;
|
|
35
|
-
side: number;
|
|
36
|
-
index: string;
|
|
37
|
-
identifier: string;
|
|
38
|
-
criteriaProof: string[];
|
|
39
|
-
};
|
|
40
|
-
export type InputDataMatchAdvancedOrders = {
|
|
41
|
-
orders: Order[];
|
|
42
|
-
criteriaResolvers: CriteriaResolver[];
|
|
43
|
-
fulfillments: {
|
|
44
|
-
offerComponents: {
|
|
45
|
-
orderIndex: string;
|
|
46
|
-
itemIndex: string;
|
|
47
|
-
}[];
|
|
48
|
-
considerationComponents: {
|
|
49
|
-
orderIndex: string;
|
|
50
|
-
itemIndex: string;
|
|
51
|
-
}[];
|
|
52
|
-
}[];
|
|
53
|
-
recipient: string;
|
|
54
|
-
};
|
|
55
|
-
export type InputDataFulfillAdvancedOrder = {
|
|
56
|
-
advancedOrder: Order;
|
|
57
|
-
criteriaResolvers: CriteriaResolver[];
|
|
58
|
-
fulfillerConduitKey: string;
|
|
59
|
-
recipient: string;
|
|
60
|
-
};
|
|
61
|
-
export type MatchAdvancedOrdersTransaction = {
|
|
62
|
-
function: 'matchAdvancedOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes)[],(uint256,uint8,uint256,uint256,bytes32[])[],((uint256,uint256)[],(uint256,uint256)[])[],address)';
|
|
63
|
-
chain: number;
|
|
64
|
-
to: string;
|
|
65
|
-
value: string | number;
|
|
66
|
-
input_data: InputDataMatchAdvancedOrders;
|
|
67
|
-
};
|
|
68
|
-
export type FulfillAdvancedOrderTransaction = {
|
|
69
|
-
function: `fulfillAdvancedOrder(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes),(uint256,uint8,uint256,uint256,bytes32[])[],bytes32,address)`;
|
|
70
|
-
chain: number;
|
|
71
|
-
to: string;
|
|
72
|
-
value: number;
|
|
73
|
-
input_data: InputDataFulfillAdvancedOrder;
|
|
74
|
-
};
|
|
75
|
-
export type FulfillmentDataResponse = {
|
|
76
|
-
protocol: string;
|
|
77
|
-
fulfillment_data: {
|
|
78
|
-
transaction: MatchAdvancedOrdersTransaction | FulfillAdvancedOrderTransaction | {
|
|
79
|
-
function: string;
|
|
80
|
-
};
|
|
81
|
-
orders: {
|
|
82
|
-
parameters: {
|
|
83
|
-
offerer: string;
|
|
84
|
-
offer: {
|
|
85
|
-
itemType: number;
|
|
86
|
-
token: string;
|
|
87
|
-
identifierOrCriteria: string;
|
|
88
|
-
startAmount: string;
|
|
89
|
-
endAmount: string;
|
|
90
|
-
}[];
|
|
91
|
-
consideration: {
|
|
92
|
-
itemType: number;
|
|
93
|
-
token: string;
|
|
94
|
-
identifierOrCriteria: string;
|
|
95
|
-
startAmount: string;
|
|
96
|
-
endAmount: string;
|
|
97
|
-
recipient: string;
|
|
98
|
-
}[];
|
|
99
|
-
startTime: string;
|
|
100
|
-
endTime: string;
|
|
101
|
-
orderType: number;
|
|
102
|
-
zone: string;
|
|
103
|
-
zoneHash: string;
|
|
104
|
-
salt: string;
|
|
105
|
-
conduitKey: string;
|
|
106
|
-
totalOriginalConsiderationItems: number;
|
|
107
|
-
counter: number;
|
|
108
|
-
};
|
|
109
|
-
signature: string;
|
|
110
|
-
}[];
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
export declare const isMatchAdvancedOrders: (transaction: FulfillmentDataResponse["fulfillment_data"]["transaction"]) => transaction is MatchAdvancedOrdersTransaction;
|
|
114
|
-
export declare const isFulfillAdvancedOrderFunctionName: (functionName: string) => boolean;
|
|
115
|
-
export declare const isFulfillAdvancedOrder: (transaction: FulfillmentDataResponse["fulfillment_data"]["transaction"]) => transaction is FulfillAdvancedOrderTransaction;
|