@phantom/server-sdk 1.0.2 → 1.0.4
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/dist/index.js +5 -3
- package/dist/index.mjs +10 -4
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ var import_bs58 = __toESM(require("bs58"));
|
|
|
58
58
|
// package.json
|
|
59
59
|
var package_default = {
|
|
60
60
|
name: "@phantom/server-sdk",
|
|
61
|
-
version: "1.0.
|
|
61
|
+
version: "1.0.4",
|
|
62
62
|
description: "Server SDK for Phantom Wallet",
|
|
63
63
|
repository: {
|
|
64
64
|
type: "git",
|
|
@@ -105,6 +105,7 @@ var package_default = {
|
|
|
105
105
|
"@phantom/client": "workspace:^",
|
|
106
106
|
"@phantom/constants": "workspace:^",
|
|
107
107
|
"@phantom/parsers": "workspace:^",
|
|
108
|
+
"@phantom/sdk-types": "workspace:^",
|
|
108
109
|
"@phantom/utils": "workspace:^",
|
|
109
110
|
bs58: "^6.0.0"
|
|
110
111
|
},
|
|
@@ -135,8 +136,9 @@ function createServerSdkHeaders(appId) {
|
|
|
135
136
|
return {
|
|
136
137
|
[import_constants.ANALYTICS_HEADERS.SDK_TYPE]: "server",
|
|
137
138
|
[import_constants.ANALYTICS_HEADERS.SDK_VERSION]: getSdkVersion(),
|
|
138
|
-
[import_constants.ANALYTICS_HEADERS.PLATFORM]:
|
|
139
|
+
[import_constants.ANALYTICS_HEADERS.PLATFORM]: "ext-sdk",
|
|
139
140
|
[import_constants.ANALYTICS_HEADERS.PLATFORM_VERSION]: `${getNodeVersion()}`,
|
|
141
|
+
[import_constants.ANALYTICS_HEADERS.CLIENT]: "node",
|
|
140
142
|
[import_constants.ANALYTICS_HEADERS.APP_ID]: appId
|
|
141
143
|
};
|
|
142
144
|
}
|
|
@@ -233,7 +235,7 @@ var ServerSDK = class {
|
|
|
233
235
|
authenticatorName: `auth-${(0, import_utils.getSecureTimestampSync)()}`,
|
|
234
236
|
authenticatorKind: "keypair",
|
|
235
237
|
publicKey: base64urlPublicKey,
|
|
236
|
-
algorithm:
|
|
238
|
+
algorithm: this.client.stamper?.algorithm ?? import_constants.DEFAULT_AUTHENTICATOR_ALGORITHM
|
|
237
239
|
}
|
|
238
240
|
]
|
|
239
241
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,11 @@ import {
|
|
|
3
3
|
PhantomClient
|
|
4
4
|
} from "@phantom/client";
|
|
5
5
|
import { randomUUID, getSecureTimestampSync, isEthereumChain } from "@phantom/utils";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
ANALYTICS_HEADERS,
|
|
8
|
+
DEFAULT_WALLET_API_URL,
|
|
9
|
+
DEFAULT_AUTHENTICATOR_ALGORITHM
|
|
10
|
+
} from "@phantom/constants";
|
|
7
11
|
import { ApiKeyStamper } from "@phantom/api-key-stamper";
|
|
8
12
|
import { base64urlEncode, stringToBase64url } from "@phantom/base64url";
|
|
9
13
|
import bs58 from "bs58";
|
|
@@ -11,7 +15,7 @@ import bs58 from "bs58";
|
|
|
11
15
|
// package.json
|
|
12
16
|
var package_default = {
|
|
13
17
|
name: "@phantom/server-sdk",
|
|
14
|
-
version: "1.0.
|
|
18
|
+
version: "1.0.4",
|
|
15
19
|
description: "Server SDK for Phantom Wallet",
|
|
16
20
|
repository: {
|
|
17
21
|
type: "git",
|
|
@@ -58,6 +62,7 @@ var package_default = {
|
|
|
58
62
|
"@phantom/client": "workspace:^",
|
|
59
63
|
"@phantom/constants": "workspace:^",
|
|
60
64
|
"@phantom/parsers": "workspace:^",
|
|
65
|
+
"@phantom/sdk-types": "workspace:^",
|
|
61
66
|
"@phantom/utils": "workspace:^",
|
|
62
67
|
bs58: "^6.0.0"
|
|
63
68
|
},
|
|
@@ -107,8 +112,9 @@ function createServerSdkHeaders(appId) {
|
|
|
107
112
|
return {
|
|
108
113
|
[ANALYTICS_HEADERS.SDK_TYPE]: "server",
|
|
109
114
|
[ANALYTICS_HEADERS.SDK_VERSION]: getSdkVersion(),
|
|
110
|
-
[ANALYTICS_HEADERS.PLATFORM]:
|
|
115
|
+
[ANALYTICS_HEADERS.PLATFORM]: "ext-sdk",
|
|
111
116
|
[ANALYTICS_HEADERS.PLATFORM_VERSION]: `${getNodeVersion()}`,
|
|
117
|
+
[ANALYTICS_HEADERS.CLIENT]: "node",
|
|
112
118
|
[ANALYTICS_HEADERS.APP_ID]: appId
|
|
113
119
|
};
|
|
114
120
|
}
|
|
@@ -205,7 +211,7 @@ var ServerSDK = class {
|
|
|
205
211
|
authenticatorName: `auth-${getSecureTimestampSync()}`,
|
|
206
212
|
authenticatorKind: "keypair",
|
|
207
213
|
publicKey: base64urlPublicKey,
|
|
208
|
-
algorithm:
|
|
214
|
+
algorithm: this.client.stamper?.algorithm ?? DEFAULT_AUTHENTICATOR_ALGORITHM
|
|
209
215
|
}
|
|
210
216
|
]
|
|
211
217
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phantom/server-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Server SDK for Phantom Wallet",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,12 +42,13 @@
|
|
|
42
42
|
"typescript": "^5.0.4"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@phantom/api-key-stamper": "^1.0.
|
|
46
|
-
"@phantom/base64url": "^1.0.
|
|
47
|
-
"@phantom/client": "^1.0.
|
|
48
|
-
"@phantom/constants": "^1.0.
|
|
49
|
-
"@phantom/parsers": "^1.0.
|
|
50
|
-
"@phantom/
|
|
45
|
+
"@phantom/api-key-stamper": "^1.0.4",
|
|
46
|
+
"@phantom/base64url": "^1.0.4",
|
|
47
|
+
"@phantom/client": "^1.0.4",
|
|
48
|
+
"@phantom/constants": "^1.0.4",
|
|
49
|
+
"@phantom/parsers": "^1.0.4",
|
|
50
|
+
"@phantom/sdk-types": "^1.0.4",
|
|
51
|
+
"@phantom/utils": "^1.0.4",
|
|
51
52
|
"bs58": "^6.0.0"
|
|
52
53
|
},
|
|
53
54
|
"files": [
|