@pooflabs/core 0.0.1
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 +68 -0
- package/dist/client/config.d.ts +23 -0
- package/dist/client/operations.d.ts +29 -0
- package/dist/client/subscription.d.ts +10 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +7617 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7578 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types.d.ts +44 -0
- package/dist/utils/api.d.ts +8 -0
- package/dist/utils/auth-api.d.ts +5 -0
- package/dist/utils/server-session-manager.d.ts +25 -0
- package/dist/utils/sol/poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZpDevnet-program.d.ts +1381 -0
- package/dist/utils/sol/poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZpMainnet-program.d.ts +1381 -0
- package/dist/utils/sol/sol-utils.d.ts +41 -0
- package/dist/utils/sol/taro6CvKqwrYrDc16ufYgzQ2NZcyyVKStffbtudrhRuDevnet-program.d.ts +1161 -0
- package/dist/utils/utils.d.ts +8 -0
- package/dist/utils/web-session-manager.d.ts +13 -0
- package/package.json +61 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function getMessageStatement(): Promise<string>;
|
|
2
|
+
export declare function createAuthHeader(isServer: boolean): Promise<{
|
|
3
|
+
Authorization: string;
|
|
4
|
+
} | null>;
|
|
5
|
+
export declare function getUserInfo(isServer: boolean): Promise<any>;
|
|
6
|
+
export declare function getIdToken(isServer: boolean): Promise<string | null>;
|
|
7
|
+
export declare function getRefreshToken(isServer: boolean): Promise<string | null>;
|
|
8
|
+
export declare function updateIdTokenAndAccessToken(idToken: string, accessToken: string): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class WebSessionManager {
|
|
2
|
+
private static TAROBASE_SESSION_STORAGE_KEY;
|
|
3
|
+
static storeSession(address: string, accessToken: string, idToken: string, refreshToken: string): Promise<void>;
|
|
4
|
+
static getSession(): Promise<{
|
|
5
|
+
address: string;
|
|
6
|
+
session: any;
|
|
7
|
+
} | null>;
|
|
8
|
+
static clearSession(): void;
|
|
9
|
+
static isAuthenticated(): boolean;
|
|
10
|
+
static getIdToken(): string | null;
|
|
11
|
+
static getRefreshToken(): string | null;
|
|
12
|
+
static updateIdTokenAndAccessToken(idToken: string, accessToken: string): Promise<void>;
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pooflabs/core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Core functionality for Poof SDK",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "rm -rf ./dist && rollup -c && tsc -p tsconfig.build.json --emitDeclarationOnly --declarationDir dist",
|
|
17
|
+
"watch": "rollup -c -w",
|
|
18
|
+
"prepare": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"sdk",
|
|
25
|
+
"api",
|
|
26
|
+
"poof",
|
|
27
|
+
"web3",
|
|
28
|
+
"onchain",
|
|
29
|
+
"blockchain",
|
|
30
|
+
"solana",
|
|
31
|
+
"ai",
|
|
32
|
+
"server",
|
|
33
|
+
"node",
|
|
34
|
+
"typescript",
|
|
35
|
+
"core"
|
|
36
|
+
],
|
|
37
|
+
"author": "Poof.new",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
41
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
42
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
43
|
+
"rollup": "^4.24.3",
|
|
44
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
45
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
46
|
+
"typescript": "^5.5.4"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@coral-xyz/anchor": "^0.31.1",
|
|
50
|
+
"@solana-developers/helpers": "^2.8.1",
|
|
51
|
+
"@solana/spl-token": "^0.4.12",
|
|
52
|
+
"@solana/web3.js": "^1.69.0",
|
|
53
|
+
"@types/lodash": "^4.17.13",
|
|
54
|
+
"axios": "^1.9.0",
|
|
55
|
+
"bn.js": "^5.1.2",
|
|
56
|
+
"lodash": "^4.17.13",
|
|
57
|
+
"reconnecting-websocket": "^4.4.0",
|
|
58
|
+
"tweetnacl": "^1.0.3"
|
|
59
|
+
},
|
|
60
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
61
|
+
}
|