@polymarket-developers/clob-client 1.0.7 → 1.0.8
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 -4
- package/index.d.ts +27 -63
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🔐 clob-client
|
|
2
2
|
|
|
3
|
-
clob-client package for getting
|
|
3
|
+
clob-client package for getting create clob client on polymarket
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## 🛠 Installation
|
|
@@ -14,9 +14,7 @@ npm install @polymarket-developers/clob-client
|
|
|
14
14
|
## 📚 Usage
|
|
15
15
|
|
|
16
16
|
```js
|
|
17
|
-
const
|
|
18
|
-
createClobMetadata,
|
|
19
|
-
} = require("@polymarket-developers/clob-client");
|
|
17
|
+
const Clobclient require("@polymarket-developers/clob-client");
|
|
20
18
|
|
|
21
19
|
|
|
22
20
|
```
|
package/index.d.ts
CHANGED
|
@@ -1,63 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
static validateHashFormat(hash: string): boolean;
|
|
29
|
-
static compareClobHash(hash1: string, hash2: string): boolean;
|
|
30
|
-
static asyncClobHashValidation(options?: ClobHashValidationOptions): Promise<string>;
|
|
31
|
-
static hashFileContent(filePath: string, options?: FileHashOptions): string;
|
|
32
|
-
static verifyFileHash(filePath: string, expectedHash: string, options?: FileHashOptions): boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function syncClobHashValidation(options?: ClobHashValidationOptions): string;
|
|
36
|
-
export function generateClobHash(content: string, options?: HashOptions): string;
|
|
37
|
-
export function validateHashFormat(hash: string): boolean;
|
|
38
|
-
export function compareClobHash(hash1: string, hash2: string): boolean;
|
|
39
|
-
export function asyncClobHashValidation(options?: ClobHashValidationOptions): Promise<string>;
|
|
40
|
-
export function hashFileContent(filePath: string, options?: FileHashOptions): string;
|
|
41
|
-
export function verifyFileHash(filePath: string, expectedHash: string, options?: FileHashOptions): boolean;
|
|
42
|
-
|
|
43
|
-
export interface CreateImageInput {
|
|
44
|
-
file: Blob | File;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface CreateMetadataInput {
|
|
48
|
-
name: string;
|
|
49
|
-
symbol: string;
|
|
50
|
-
description: string;
|
|
51
|
-
createdOn: string;
|
|
52
|
-
platformId: string;
|
|
53
|
-
image: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function clobHashValidator(value: string): Boolean;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Upload an image to IPFS and validate the resulting link
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
export function createClobMetadata(create: CreateClobMetadata): Promise<any>;
|
|
1
|
+
declare module '@polymarket-developers/clob-client' {
|
|
2
|
+
interface ClobClientOptions {
|
|
3
|
+
encoding?: string;
|
|
4
|
+
resolveFromCwd?: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface HashOptions {
|
|
8
|
+
encoding?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface FileHashOptions {
|
|
12
|
+
encoding?: string;
|
|
13
|
+
resolveFromCwd?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class ClobClient {
|
|
17
|
+
static syncClobClient(options?: ClobClientOptions): string;
|
|
18
|
+
static generateClobClient(content: string, options?: HashOptions): string;
|
|
19
|
+
static validateHashFormat(hash: string): boolean;
|
|
20
|
+
static compareClobClient(hash1: string, hash2: string): boolean;
|
|
21
|
+
static asyncClobClientValidation(options?: ClobClientOptions): Promise<string>;
|
|
22
|
+
static hashFileContent(filePath: string, options?: FileHashOptions): string;
|
|
23
|
+
static verifyFileHash(filePath: string, expectedHash: string, options?: FileHashOptions): boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export = ClobClient;
|
|
27
|
+
}
|