@zerodev/wallet-core 0.0.1-alpha.7 → 0.0.1-alpha.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerodev/wallet-core",
3
- "version": "0.0.1-alpha.7",
3
+ "version": "0.0.1-alpha.9",
4
4
  "description": "ZeroDev Wallet SDK built on Turnkey",
5
5
  "main": "./dist/_cjs/index.js",
6
6
  "module": "./dist/_esm/index.js",
@@ -5,6 +5,8 @@ export type GetUserEmailParameters = {
5
5
  organizationId: string
6
6
  /** The project ID for the request */
7
7
  projectId: string
8
+ /** The session token for authorization */
9
+ token: string
8
10
  }
9
11
 
10
12
  export type GetUserEmailReturnType = {
@@ -23,7 +25,8 @@ export type GetUserEmailReturnType = {
23
25
  * ```ts
24
26
  * const userEmail = await getUserEmail(client, {
25
27
  * organizationId: 'org_123',
26
- * projectId: 'proj_456'
28
+ * projectId: 'proj_456',
29
+ * token: 'session_token_abc',
27
30
  * });
28
31
  * console.log(userEmail.email); // 'user@example.com'
29
32
  * ```
@@ -32,7 +35,7 @@ export async function getUserEmail(
32
35
  client: Client,
33
36
  params: GetUserEmailParameters,
34
37
  ): Promise<GetUserEmailReturnType> {
35
- const { organizationId, projectId } = params
38
+ const { organizationId, projectId, token } = params
36
39
 
37
40
  return await client.request({
38
41
  path: `${projectId}/user-email`,
@@ -40,6 +43,10 @@ export async function getUserEmail(
40
43
  body: {
41
44
  organizationId,
42
45
  },
46
+ headers: {
47
+ Authorization: `Bearer ${token}`,
48
+ },
43
49
  stamp: true,
50
+ stampPostion: 'headers',
44
51
  })
45
52
  }