anymal-protocol 1.0.104 → 1.0.106
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8,9 +8,9 @@ declare function useVerifyAccount(): (pid: string, campaignId: string, dbAuthTok
|
|
|
8
8
|
|
|
9
9
|
declare function useVerifyWeb3AuthSession(): (idToken: string, publicKey: string, authServiceBaseUrl: string) => Promise<any>;
|
|
10
10
|
|
|
11
|
-
declare function useCreateWeb3Account(): (idToken: string, publicKey: string, userPid: string, authServiceBaseUrl: string) => Promise<any>;
|
|
11
|
+
declare function useCreateWeb3Account(): (idToken: string, publicKey: string, userPid: string, authServiceBaseUrl: string, baseWalletAddress: string) => Promise<any>;
|
|
12
12
|
|
|
13
|
-
declare function useFetchUserData(): (dbAuthToken: string, endpoint: string,
|
|
13
|
+
declare function useFetchUserData(): (dbAuthToken: string, endpoint: string, pid: string) => Promise<any>;
|
|
14
14
|
|
|
15
15
|
declare function useUpdateUserEmail(): (dbAuthToken: string, docID: string, email: string, endpoint: string) => Promise<void>;
|
|
16
16
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ declare function useVerifyAccount(): (pid: string, campaignId: string, dbAuthTok
|
|
|
8
8
|
|
|
9
9
|
declare function useVerifyWeb3AuthSession(): (idToken: string, publicKey: string, authServiceBaseUrl: string) => Promise<any>;
|
|
10
10
|
|
|
11
|
-
declare function useCreateWeb3Account(): (idToken: string, publicKey: string, userPid: string, authServiceBaseUrl: string) => Promise<any>;
|
|
11
|
+
declare function useCreateWeb3Account(): (idToken: string, publicKey: string, userPid: string, authServiceBaseUrl: string, baseWalletAddress: string) => Promise<any>;
|
|
12
12
|
|
|
13
|
-
declare function useFetchUserData(): (dbAuthToken: string, endpoint: string,
|
|
13
|
+
declare function useFetchUserData(): (dbAuthToken: string, endpoint: string, pid: string) => Promise<any>;
|
|
14
14
|
|
|
15
15
|
declare function useUpdateUserEmail(): (dbAuthToken: string, docID: string, email: string, endpoint: string) => Promise<void>;
|
|
16
16
|
|
package/dist/index.js
CHANGED
|
@@ -122,7 +122,7 @@ function useVerifyWeb3AuthSession() {
|
|
|
122
122
|
var import_react3 = require("react");
|
|
123
123
|
function useCreateWeb3Account() {
|
|
124
124
|
return (0, import_react3.useCallback)(
|
|
125
|
-
async (idToken, publicKey, userPid, authServiceBaseUrl) => {
|
|
125
|
+
async (idToken, publicKey, userPid, authServiceBaseUrl, baseWalletAddress) => {
|
|
126
126
|
try {
|
|
127
127
|
const response = await fetch(`${authServiceBaseUrl}/create-account`, {
|
|
128
128
|
method: "POST",
|
|
@@ -130,7 +130,11 @@ function useCreateWeb3Account() {
|
|
|
130
130
|
"Content-Type": "application/json",
|
|
131
131
|
Authorization: "Bearer " + idToken
|
|
132
132
|
},
|
|
133
|
-
body: JSON.stringify({
|
|
133
|
+
body: JSON.stringify({
|
|
134
|
+
appPubKey: publicKey,
|
|
135
|
+
pid: userPid,
|
|
136
|
+
baseWalletAddress
|
|
137
|
+
})
|
|
134
138
|
});
|
|
135
139
|
return await response.json();
|
|
136
140
|
} catch (error) {
|
|
@@ -146,7 +150,7 @@ function useCreateWeb3Account() {
|
|
|
146
150
|
var import_react4 = require("react");
|
|
147
151
|
function useFetchUserData() {
|
|
148
152
|
return (0, import_react4.useCallback)(
|
|
149
|
-
async (dbAuthToken, endpoint,
|
|
153
|
+
async (dbAuthToken, endpoint, pid) => {
|
|
150
154
|
try {
|
|
151
155
|
const query = `
|
|
152
156
|
query User($filter: UserFilterArg) {
|
|
@@ -164,7 +168,7 @@ function useFetchUserData() {
|
|
|
164
168
|
`;
|
|
165
169
|
const variables = {
|
|
166
170
|
filter: {
|
|
167
|
-
|
|
171
|
+
pid: { _eq: pid }
|
|
168
172
|
}
|
|
169
173
|
};
|
|
170
174
|
const response = await fetch(endpoint, {
|
package/dist/index.mjs
CHANGED
|
@@ -59,7 +59,7 @@ function useVerifyWeb3AuthSession() {
|
|
|
59
59
|
import { useCallback as useCallback3 } from "react";
|
|
60
60
|
function useCreateWeb3Account() {
|
|
61
61
|
return useCallback3(
|
|
62
|
-
async (idToken, publicKey, userPid, authServiceBaseUrl) => {
|
|
62
|
+
async (idToken, publicKey, userPid, authServiceBaseUrl, baseWalletAddress) => {
|
|
63
63
|
try {
|
|
64
64
|
const response = await fetch(`${authServiceBaseUrl}/create-account`, {
|
|
65
65
|
method: "POST",
|
|
@@ -67,7 +67,11 @@ function useCreateWeb3Account() {
|
|
|
67
67
|
"Content-Type": "application/json",
|
|
68
68
|
Authorization: "Bearer " + idToken
|
|
69
69
|
},
|
|
70
|
-
body: JSON.stringify({
|
|
70
|
+
body: JSON.stringify({
|
|
71
|
+
appPubKey: publicKey,
|
|
72
|
+
pid: userPid,
|
|
73
|
+
baseWalletAddress
|
|
74
|
+
})
|
|
71
75
|
});
|
|
72
76
|
return await response.json();
|
|
73
77
|
} catch (error) {
|
|
@@ -83,7 +87,7 @@ function useCreateWeb3Account() {
|
|
|
83
87
|
import { useCallback as useCallback4 } from "react";
|
|
84
88
|
function useFetchUserData() {
|
|
85
89
|
return useCallback4(
|
|
86
|
-
async (dbAuthToken, endpoint,
|
|
90
|
+
async (dbAuthToken, endpoint, pid) => {
|
|
87
91
|
try {
|
|
88
92
|
const query = `
|
|
89
93
|
query User($filter: UserFilterArg) {
|
|
@@ -101,7 +105,7 @@ function useFetchUserData() {
|
|
|
101
105
|
`;
|
|
102
106
|
const variables = {
|
|
103
107
|
filter: {
|
|
104
|
-
|
|
108
|
+
pid: { _eq: pid }
|
|
105
109
|
}
|
|
106
110
|
};
|
|
107
111
|
const response = await fetch(endpoint, {
|
package/package.json
CHANGED