@ludo.ninja/api 3.0.5 → 3.0.7
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/build/graphql_tools/__generated__/identityHost/schema.d.ts +88 -2
- package/build/graphql_tools/__generated__/identityHost/schema.js +65 -2
- package/build/index.d.ts +11 -0
- package/package.json +1 -1
- package/src/graphql_tools/__generated__/identityHost/schema.ts +123 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -22,6 +22,8 @@ export type Scalars = {
|
|
|
22
22
|
Boolean: boolean;
|
|
23
23
|
Int: number;
|
|
24
24
|
Float: number;
|
|
25
|
+
/** A JSON scalar */
|
|
26
|
+
JSON: any;
|
|
25
27
|
/** A 64-bit signed integer */
|
|
26
28
|
Long: any;
|
|
27
29
|
};
|
|
@@ -52,6 +54,11 @@ export type IDomain = {
|
|
|
52
54
|
lengthBytes?: Maybe<Scalars['Long']>;
|
|
53
55
|
value?: Maybe<Scalars['String']>;
|
|
54
56
|
};
|
|
57
|
+
export type IEthereumSignInData = {
|
|
58
|
+
address: Scalars['String'];
|
|
59
|
+
signature: Scalars['String'];
|
|
60
|
+
restore?: Maybe<Scalars['Boolean']>;
|
|
61
|
+
};
|
|
55
62
|
export type IFollower = {
|
|
56
63
|
userId: Scalars['ID'];
|
|
57
64
|
username?: Maybe<Scalars['String']>;
|
|
@@ -101,6 +108,17 @@ export type IInviteCodeUser = {
|
|
|
101
108
|
inviteeId: Scalars['ID'];
|
|
102
109
|
usedAt: Scalars['Long'];
|
|
103
110
|
};
|
|
111
|
+
/** Please sync with LoginType.java */
|
|
112
|
+
export declare enum ILoginType {
|
|
113
|
+
Google = "GOOGLE",
|
|
114
|
+
X = "X",
|
|
115
|
+
Discord = "DISCORD",
|
|
116
|
+
Facebook = "FACEBOOK",
|
|
117
|
+
Linkedin = "LINKEDIN",
|
|
118
|
+
Reddit = "REDDIT",
|
|
119
|
+
Email = "EMAIL",
|
|
120
|
+
PhoneNumber = "PHONE_NUMBER"
|
|
121
|
+
}
|
|
104
122
|
/** noinspection SpellCheckingInspection */
|
|
105
123
|
export type IMultiversxAudit = {
|
|
106
124
|
delegated?: Maybe<Scalars['Float']>;
|
|
@@ -122,12 +140,15 @@ export type IMutation = {
|
|
|
122
140
|
signInFlow: IIdentity;
|
|
123
141
|
signInTon: IIdentity;
|
|
124
142
|
signInTonV2: IIdentity;
|
|
143
|
+
signInEthereum: IIdentity;
|
|
144
|
+
signInEthereumWeb3Auth: IIdentity;
|
|
125
145
|
addWalletMetamask: Scalars['Boolean'];
|
|
126
146
|
addWalletTezos: Scalars['Boolean'];
|
|
127
147
|
addWalletSolana: Scalars['Boolean'];
|
|
128
148
|
addWalletElrond: Scalars['Boolean'];
|
|
129
149
|
addWalletFlow: Scalars['Boolean'];
|
|
130
150
|
addWalletTon: Scalars['Boolean'];
|
|
151
|
+
addWalletTonV2: Scalars['Boolean'];
|
|
131
152
|
removeWallet: Scalars['Boolean'];
|
|
132
153
|
setMainWallet: Scalars['Boolean'];
|
|
133
154
|
generateNewInviteCodes: Array<IUserInviteCode>;
|
|
@@ -181,6 +202,14 @@ export type IMutationSignInTonV2Args = {
|
|
|
181
202
|
address: Scalars['String'];
|
|
182
203
|
restore?: Maybe<Scalars['Boolean']>;
|
|
183
204
|
};
|
|
205
|
+
export type IMutationSignInEthereumArgs = {
|
|
206
|
+
signInData: IEthereumSignInData;
|
|
207
|
+
};
|
|
208
|
+
export type IMutationSignInEthereumWeb3AuthArgs = {
|
|
209
|
+
signInData: IEthereumSignInData;
|
|
210
|
+
loginType: ILoginType;
|
|
211
|
+
additionalMeta?: Maybe<Scalars['JSON']>;
|
|
212
|
+
};
|
|
184
213
|
export type IMutationAddWalletMetamaskArgs = {
|
|
185
214
|
signature: Scalars['String'];
|
|
186
215
|
address: Scalars['String'];
|
|
@@ -205,6 +234,9 @@ export type IMutationAddWalletFlowArgs = {
|
|
|
205
234
|
export type IMutationAddWalletTonArgs = {
|
|
206
235
|
request: ICheckTonProofRequest;
|
|
207
236
|
};
|
|
237
|
+
export type IMutationAddWalletTonV2Args = {
|
|
238
|
+
address: Scalars['String'];
|
|
239
|
+
};
|
|
208
240
|
export type IMutationRemoveWalletArgs = {
|
|
209
241
|
blockchain: Scalars['String'];
|
|
210
242
|
address: Scalars['String'];
|
|
@@ -412,15 +444,18 @@ export type IResolversTypes = {
|
|
|
412
444
|
AuditNFTBalance: ResolverTypeWrapper<IAuditNftBalance>;
|
|
413
445
|
CheckTonProofRequest: ICheckTonProofRequest;
|
|
414
446
|
Domain: IDomain;
|
|
447
|
+
EthereumSignInData: IEthereumSignInData;
|
|
448
|
+
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
|
415
449
|
Follower: ResolverTypeWrapper<IFollower>;
|
|
416
450
|
ID: ResolverTypeWrapper<Scalars['ID']>;
|
|
417
|
-
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
|
418
451
|
FollowingStatus: ResolverTypeWrapper<IFollowingStatus>;
|
|
419
452
|
Identity: ResolverTypeWrapper<IIdentity>;
|
|
420
453
|
InputProfile: IInputProfile;
|
|
421
454
|
InputSocial: IInputSocial;
|
|
422
455
|
InviteCode: ResolverTypeWrapper<IInviteCode>;
|
|
423
456
|
InviteCodeUser: ResolverTypeWrapper<IInviteCodeUser>;
|
|
457
|
+
JSON: ResolverTypeWrapper<Scalars['JSON']>;
|
|
458
|
+
LoginType: ILoginType;
|
|
424
459
|
Long: ResolverTypeWrapper<Scalars['Long']>;
|
|
425
460
|
MultiversxAudit: ResolverTypeWrapper<IMultiversxAudit>;
|
|
426
461
|
Mutation: ResolverTypeWrapper<{}>;
|
|
@@ -446,15 +481,17 @@ export type IResolversParentTypes = {
|
|
|
446
481
|
AuditNFTBalance: IAuditNftBalance;
|
|
447
482
|
CheckTonProofRequest: ICheckTonProofRequest;
|
|
448
483
|
Domain: IDomain;
|
|
484
|
+
EthereumSignInData: IEthereumSignInData;
|
|
485
|
+
Boolean: Scalars['Boolean'];
|
|
449
486
|
Follower: IFollower;
|
|
450
487
|
ID: Scalars['ID'];
|
|
451
|
-
Boolean: Scalars['Boolean'];
|
|
452
488
|
FollowingStatus: IFollowingStatus;
|
|
453
489
|
Identity: IIdentity;
|
|
454
490
|
InputProfile: IInputProfile;
|
|
455
491
|
InputSocial: IInputSocial;
|
|
456
492
|
InviteCode: IInviteCode;
|
|
457
493
|
InviteCodeUser: IInviteCodeUser;
|
|
494
|
+
JSON: Scalars['JSON'];
|
|
458
495
|
Long: Scalars['Long'];
|
|
459
496
|
MultiversxAudit: IMultiversxAudit;
|
|
460
497
|
Mutation: {};
|
|
@@ -549,6 +586,9 @@ export type IInviteCodeUserResolvers<ContextType = any, ParentType extends IReso
|
|
|
549
586
|
usedAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
|
|
550
587
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
551
588
|
};
|
|
589
|
+
export interface IJsonScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['JSON'], any> {
|
|
590
|
+
name: 'JSON';
|
|
591
|
+
}
|
|
552
592
|
export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
|
|
553
593
|
name: 'Long';
|
|
554
594
|
}
|
|
@@ -573,12 +613,15 @@ export type IMutationResolvers<ContextType = any, ParentType extends IResolversP
|
|
|
573
613
|
signInFlow?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInFlowArgs, 'signature' | 'address'>>;
|
|
574
614
|
signInTon?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInTonArgs, 'request'>>;
|
|
575
615
|
signInTonV2?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInTonV2Args, 'address'>>;
|
|
616
|
+
signInEthereum?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInEthereumArgs, 'signInData'>>;
|
|
617
|
+
signInEthereumWeb3Auth?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInEthereumWeb3AuthArgs, 'signInData' | 'loginType'>>;
|
|
576
618
|
addWalletMetamask?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletMetamaskArgs, 'signature' | 'address' | 'chainId'>>;
|
|
577
619
|
addWalletTezos?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletTezosArgs, 'signature' | 'pubkey'>>;
|
|
578
620
|
addWalletSolana?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletSolanaArgs, 'signature' | 'pubkey'>>;
|
|
579
621
|
addWalletElrond?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletElrondArgs, 'signature' | 'address'>>;
|
|
580
622
|
addWalletFlow?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletFlowArgs, 'signature' | 'address'>>;
|
|
581
623
|
addWalletTon?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletTonArgs, 'request'>>;
|
|
624
|
+
addWalletTonV2?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletTonV2Args, 'address'>>;
|
|
582
625
|
removeWallet?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationRemoveWalletArgs, 'blockchain' | 'address'>>;
|
|
583
626
|
setMainWallet?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationSetMainWalletArgs, 'blockchain' | 'address'>>;
|
|
584
627
|
generateNewInviteCodes?: Resolver<Array<IResolversTypes['UserInviteCode']>, ParentType, ContextType, RequireFields<IMutationGenerateNewInviteCodesArgs, 'codesNum'>>;
|
|
@@ -701,6 +744,7 @@ export type IResolvers<ContextType = any> = {
|
|
|
701
744
|
Identity?: IIdentityResolvers<ContextType>;
|
|
702
745
|
InviteCode?: IInviteCodeResolvers<ContextType>;
|
|
703
746
|
InviteCodeUser?: IInviteCodeUserResolvers<ContextType>;
|
|
747
|
+
JSON?: GraphQLScalarType;
|
|
704
748
|
Long?: GraphQLScalarType;
|
|
705
749
|
MultiversxAudit?: IMultiversxAuditResolvers<ContextType>;
|
|
706
750
|
Mutation?: IMutationResolvers<ContextType>;
|
|
@@ -720,6 +764,19 @@ export type IDirectiveResolvers<ContextType = any> = {
|
|
|
720
764
|
connection?: IConnectionDirectiveResolver<any, any, ContextType>;
|
|
721
765
|
oneOf?: IOneOfDirectiveResolver<any, any, ContextType>;
|
|
722
766
|
};
|
|
767
|
+
export type ISignInEthereumWeb3AuthMutationVariables = Exact<{
|
|
768
|
+
signInData: IEthereumSignInData;
|
|
769
|
+
loginType: ILoginType;
|
|
770
|
+
additionalMeta?: Maybe<Scalars['JSON']>;
|
|
771
|
+
}>;
|
|
772
|
+
export type ISignInEthereumWeb3AuthMutation = {
|
|
773
|
+
signInEthereumWeb3Auth: (Pick<IIdentity, 'userId' | 'wallets' | 'newUser' | 'inviteCode' | 'role' | 'reftypeId' | 'reftypeName' | 'reftypeColor'> & {
|
|
774
|
+
tokens: {
|
|
775
|
+
portalTokenPair: Pick<ITokenPair, 'authToken' | 'refreshToken'>;
|
|
776
|
+
extensionTokenPair: Pick<ITokenPair, 'authToken' | 'refreshToken'>;
|
|
777
|
+
};
|
|
778
|
+
});
|
|
779
|
+
};
|
|
723
780
|
export type IAddWalletElrondMutationVariables = Exact<{
|
|
724
781
|
signature: Scalars['String'];
|
|
725
782
|
address: Scalars['String'];
|
|
@@ -951,6 +1008,35 @@ export type IFetchUserWalletsQueryVariables = Exact<{
|
|
|
951
1008
|
export type IFetchUserWalletsQuery = {
|
|
952
1009
|
fetchUserWallets: Array<Maybe<Pick<IWallet, 'userId' | 'address' | 'walletName' | 'blockchain' | 'chainId' | 'mainWallet'>>>;
|
|
953
1010
|
};
|
|
1011
|
+
export declare const SignInEthereumWeb3AuthDocument: Apollo.DocumentNode;
|
|
1012
|
+
export type ISignInEthereumWeb3AuthMutationFn = Apollo.MutationFunction<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>;
|
|
1013
|
+
/**
|
|
1014
|
+
* __useSignInEthereumWeb3AuthMutation__
|
|
1015
|
+
*
|
|
1016
|
+
* To run a mutation, you first call `useSignInEthereumWeb3AuthMutation` within a React component and pass it any options that fit your needs.
|
|
1017
|
+
* When your component renders, `useSignInEthereumWeb3AuthMutation` returns a tuple that includes:
|
|
1018
|
+
* - A mutate function that you can call at any time to execute the mutation
|
|
1019
|
+
* - An object with fields that represent the current status of the mutation's execution
|
|
1020
|
+
*
|
|
1021
|
+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
1022
|
+
*
|
|
1023
|
+
* @example
|
|
1024
|
+
* const [signInEthereumWeb3AuthMutation, { data, loading, error }] = useSignInEthereumWeb3AuthMutation({
|
|
1025
|
+
* variables: {
|
|
1026
|
+
* signInData: // value for 'signInData'
|
|
1027
|
+
* loginType: // value for 'loginType'
|
|
1028
|
+
* additionalMeta: // value for 'additionalMeta'
|
|
1029
|
+
* },
|
|
1030
|
+
* });
|
|
1031
|
+
*/
|
|
1032
|
+
export declare function useSignInEthereumWeb3AuthMutation(baseOptions?: Apollo.MutationHookOptions<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>): Apollo.MutationTuple<ISignInEthereumWeb3AuthMutation, Exact<{
|
|
1033
|
+
signInData: IEthereumSignInData;
|
|
1034
|
+
loginType: ILoginType;
|
|
1035
|
+
additionalMeta?: any;
|
|
1036
|
+
}>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
|
|
1037
|
+
export type SignInEthereumWeb3AuthMutationHookResult = ReturnType<typeof useSignInEthereumWeb3AuthMutation>;
|
|
1038
|
+
export type SignInEthereumWeb3AuthMutationResult = Apollo.MutationResult<ISignInEthereumWeb3AuthMutation>;
|
|
1039
|
+
export type SignInEthereumWeb3AuthMutationOptions = Apollo.BaseMutationOptions<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>;
|
|
954
1040
|
export declare const AddWalletElrondDocument: Apollo.DocumentNode;
|
|
955
1041
|
export type IAddWalletElrondMutationFn = Apollo.MutationFunction<IAddWalletElrondMutation, IAddWalletElrondMutationVariables>;
|
|
956
1042
|
/**
|
|
@@ -23,10 +23,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.useFetchUserWalletsLazyQuery = exports.useFetchUserWalletsQuery = exports.FetchUserWalletsDocument = exports.useFetchProfileLazyQuery = exports.useFetchProfileQuery = exports.FetchProfileDocument = exports.useFetchMyProfileV2LazyQuery = exports.useFetchMyProfileV2Query = exports.FetchMyProfileV2Document = exports.useFetchMultiversXAuditLazyQuery = exports.useFetchMultiversXAuditQuery = exports.FetchMultiversXAuditDocument = exports.useFetchAggregatedMultiversxAuditLazyQuery = void 0;
|
|
26
|
+
exports.UpdateProfileDocument = exports.useSignInTonV2Mutation = exports.SignInTonV2Document = exports.useSignInTonMutation = exports.SignInTonDocument = exports.useSignInTezosMutation = exports.SignInTezosDocument = exports.useSignInSolanaMutation = exports.SignInSolanaDocument = exports.useSignInMetamaskMutation = exports.SignInMetamaskDocument = exports.useSignInFlowMutation = exports.SignInFlowDocument = exports.useSignInElrondMutation = exports.SignInElrondDocument = exports.useSignInAdminMetamaskMutation = exports.SignInAdminMetamaskDocument = exports.useSetMainWalletMutation = exports.SetMainWalletDocument = exports.useSaveEmailOfJoinerMutation = exports.SaveEmailOfJoinerDocument = exports.useRemoveWalletMutation = exports.RemoveWalletDocument = exports.useUseInviteCodeMutation = exports.UseInviteCodeDocument = exports.useGenerateNewInviteCodesMutation = exports.GenerateNewInviteCodesDocument = exports.useCreateTonNonceMutation = exports.CreateTonNonceDocument = exports.useCreateNonceMutation = exports.CreateNonceDocument = exports.useCreateEvmNonceMutation = exports.CreateEvmNonceDocument = exports.useAddWalletTonMutation = exports.AddWalletTonDocument = exports.useAddWalletTezosMutation = exports.AddWalletTezosDocument = exports.useAddWalletSolanaMutation = exports.AddWalletSolanaDocument = exports.useAddWalletMetamaskMutation = exports.AddWalletMetamaskDocument = exports.useAddWalletFlowMutation = exports.AddWalletFlowDocument = exports.useAddWalletElrondMutation = exports.AddWalletElrondDocument = exports.useSignInEthereumWeb3AuthMutation = exports.SignInEthereumWeb3AuthDocument = exports.IRole = exports.IReftypeColor = exports.ILoginType = void 0;
|
|
27
|
+
exports.useFetchUserWalletsLazyQuery = exports.useFetchUserWalletsQuery = exports.FetchUserWalletsDocument = exports.useFetchProfileLazyQuery = exports.useFetchProfileQuery = exports.FetchProfileDocument = exports.useFetchMyProfileV2LazyQuery = exports.useFetchMyProfileV2Query = exports.FetchMyProfileV2Document = exports.useFetchMultiversXAuditLazyQuery = exports.useFetchMultiversXAuditQuery = exports.FetchMultiversXAuditDocument = exports.useFetchAggregatedMultiversxAuditLazyQuery = exports.useFetchAggregatedMultiversxAuditQuery = exports.FetchAggregatedMultiversxAuditDocument = exports.useUpdateProfileMutation = void 0;
|
|
28
28
|
const client_1 = require("@apollo/client");
|
|
29
29
|
const Apollo = __importStar(require("@apollo/client"));
|
|
30
|
+
/** Please sync with LoginType.java */
|
|
31
|
+
var ILoginType;
|
|
32
|
+
(function (ILoginType) {
|
|
33
|
+
ILoginType["Google"] = "GOOGLE";
|
|
34
|
+
ILoginType["X"] = "X";
|
|
35
|
+
ILoginType["Discord"] = "DISCORD";
|
|
36
|
+
ILoginType["Facebook"] = "FACEBOOK";
|
|
37
|
+
ILoginType["Linkedin"] = "LINKEDIN";
|
|
38
|
+
ILoginType["Reddit"] = "REDDIT";
|
|
39
|
+
ILoginType["Email"] = "EMAIL";
|
|
40
|
+
ILoginType["PhoneNumber"] = "PHONE_NUMBER";
|
|
41
|
+
})(ILoginType || (exports.ILoginType = ILoginType = {}));
|
|
30
42
|
/** Sync with ReftypeColor.java */
|
|
31
43
|
var IReftypeColor;
|
|
32
44
|
(function (IReftypeColor) {
|
|
@@ -46,6 +58,57 @@ var IRole;
|
|
|
46
58
|
IRole["Admin"] = "admin";
|
|
47
59
|
IRole["Plain"] = "plain";
|
|
48
60
|
})(IRole || (exports.IRole = IRole = {}));
|
|
61
|
+
exports.SignInEthereumWeb3AuthDocument = (0, client_1.gql) `
|
|
62
|
+
mutation signInEthereumWeb3Auth($signInData: EthereumSignInData!, $loginType: LoginType!, $additionalMeta: JSON) {
|
|
63
|
+
signInEthereumWeb3Auth(
|
|
64
|
+
signInData: $signInData
|
|
65
|
+
loginType: $loginType
|
|
66
|
+
additionalMeta: $additionalMeta
|
|
67
|
+
) {
|
|
68
|
+
userId
|
|
69
|
+
wallets
|
|
70
|
+
tokens {
|
|
71
|
+
portalTokenPair {
|
|
72
|
+
authToken
|
|
73
|
+
refreshToken
|
|
74
|
+
}
|
|
75
|
+
extensionTokenPair {
|
|
76
|
+
authToken
|
|
77
|
+
refreshToken
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
newUser
|
|
81
|
+
inviteCode
|
|
82
|
+
role
|
|
83
|
+
reftypeId
|
|
84
|
+
reftypeName
|
|
85
|
+
reftypeColor
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
/**
|
|
90
|
+
* __useSignInEthereumWeb3AuthMutation__
|
|
91
|
+
*
|
|
92
|
+
* To run a mutation, you first call `useSignInEthereumWeb3AuthMutation` within a React component and pass it any options that fit your needs.
|
|
93
|
+
* When your component renders, `useSignInEthereumWeb3AuthMutation` returns a tuple that includes:
|
|
94
|
+
* - A mutate function that you can call at any time to execute the mutation
|
|
95
|
+
* - An object with fields that represent the current status of the mutation's execution
|
|
96
|
+
*
|
|
97
|
+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* const [signInEthereumWeb3AuthMutation, { data, loading, error }] = useSignInEthereumWeb3AuthMutation({
|
|
101
|
+
* variables: {
|
|
102
|
+
* signInData: // value for 'signInData'
|
|
103
|
+
* loginType: // value for 'loginType'
|
|
104
|
+
* additionalMeta: // value for 'additionalMeta'
|
|
105
|
+
* },
|
|
106
|
+
* });
|
|
107
|
+
*/
|
|
108
|
+
function useSignInEthereumWeb3AuthMutation(baseOptions) {
|
|
109
|
+
return Apollo.useMutation(exports.SignInEthereumWeb3AuthDocument, baseOptions);
|
|
110
|
+
}
|
|
111
|
+
exports.useSignInEthereumWeb3AuthMutation = useSignInEthereumWeb3AuthMutation;
|
|
49
112
|
exports.AddWalletElrondDocument = (0, client_1.gql) `
|
|
50
113
|
mutation AddWalletElrond($signature: String!, $address: String!) {
|
|
51
114
|
addWalletElrond(signature: $signature, address: $address)
|
package/build/index.d.ts
CHANGED
|
@@ -627,6 +627,15 @@ declare const schema: {
|
|
|
627
627
|
DeleteGalleryBannerDocument: import("graphql").DocumentNode;
|
|
628
628
|
UploadGalleryBannerDocument: import("graphql").DocumentNode;
|
|
629
629
|
FetchUserpicDocument: import("graphql").DocumentNode;
|
|
630
|
+
useSignInEthereumWeb3AuthMutation(baseOptions?: import("@apollo/client").MutationHookOptions<identitySchema.ISignInEthereumWeb3AuthMutation, identitySchema.Exact<{
|
|
631
|
+
signInData: identitySchema.IEthereumSignInData;
|
|
632
|
+
loginType: identitySchema.ILoginType;
|
|
633
|
+
additionalMeta?: any;
|
|
634
|
+
}>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined): import("@apollo/client").MutationTuple<identitySchema.ISignInEthereumWeb3AuthMutation, identitySchema.Exact<{
|
|
635
|
+
signInData: identitySchema.IEthereumSignInData;
|
|
636
|
+
loginType: identitySchema.ILoginType;
|
|
637
|
+
additionalMeta?: any;
|
|
638
|
+
}>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>>;
|
|
630
639
|
useAddWalletElrondMutation(baseOptions?: import("@apollo/client").MutationHookOptions<identitySchema.IAddWalletElrondMutation, identitySchema.Exact<{
|
|
631
640
|
signature: string;
|
|
632
641
|
address: string;
|
|
@@ -856,7 +865,9 @@ declare const schema: {
|
|
|
856
865
|
}>> | undefined): import("@apollo/client").LazyQueryResultTuple<identitySchema.IFetchUserWalletsQuery, identitySchema.Exact<{
|
|
857
866
|
userId: string;
|
|
858
867
|
}>>;
|
|
868
|
+
ILoginType: typeof identitySchema.ILoginType;
|
|
859
869
|
IRole: typeof identitySchema.IRole;
|
|
870
|
+
SignInEthereumWeb3AuthDocument: import("graphql").DocumentNode;
|
|
860
871
|
AddWalletElrondDocument: import("graphql").DocumentNode;
|
|
861
872
|
AddWalletFlowDocument: import("graphql").DocumentNode;
|
|
862
873
|
AddWalletMetamaskDocument: import("graphql").DocumentNode;
|
package/package.json
CHANGED
|
@@ -14,6 +14,8 @@ export type Scalars = {
|
|
|
14
14
|
Boolean: boolean;
|
|
15
15
|
Int: number;
|
|
16
16
|
Float: number;
|
|
17
|
+
/** A JSON scalar */
|
|
18
|
+
JSON: any;
|
|
17
19
|
/** A 64-bit signed integer */
|
|
18
20
|
Long: any;
|
|
19
21
|
};
|
|
@@ -55,6 +57,12 @@ export type IDomain = {
|
|
|
55
57
|
value?: Maybe<Scalars['String']>;
|
|
56
58
|
};
|
|
57
59
|
|
|
60
|
+
export type IEthereumSignInData = {
|
|
61
|
+
address: Scalars['String'];
|
|
62
|
+
signature: Scalars['String'];
|
|
63
|
+
restore?: Maybe<Scalars['Boolean']>;
|
|
64
|
+
};
|
|
65
|
+
|
|
58
66
|
export type IFollower = {
|
|
59
67
|
userId: Scalars['ID'];
|
|
60
68
|
username?: Maybe<Scalars['String']>;
|
|
@@ -112,6 +120,19 @@ export type IInviteCodeUser = {
|
|
|
112
120
|
};
|
|
113
121
|
|
|
114
122
|
|
|
123
|
+
/** Please sync with LoginType.java */
|
|
124
|
+
export enum ILoginType {
|
|
125
|
+
Google = 'GOOGLE',
|
|
126
|
+
X = 'X',
|
|
127
|
+
Discord = 'DISCORD',
|
|
128
|
+
Facebook = 'FACEBOOK',
|
|
129
|
+
Linkedin = 'LINKEDIN',
|
|
130
|
+
Reddit = 'REDDIT',
|
|
131
|
+
Email = 'EMAIL',
|
|
132
|
+
PhoneNumber = 'PHONE_NUMBER'
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
115
136
|
/** noinspection SpellCheckingInspection */
|
|
116
137
|
export type IMultiversxAudit = {
|
|
117
138
|
delegated?: Maybe<Scalars['Float']>;
|
|
@@ -134,12 +155,15 @@ export type IMutation = {
|
|
|
134
155
|
signInFlow: IIdentity;
|
|
135
156
|
signInTon: IIdentity;
|
|
136
157
|
signInTonV2: IIdentity;
|
|
158
|
+
signInEthereum: IIdentity;
|
|
159
|
+
signInEthereumWeb3Auth: IIdentity;
|
|
137
160
|
addWalletMetamask: Scalars['Boolean'];
|
|
138
161
|
addWalletTezos: Scalars['Boolean'];
|
|
139
162
|
addWalletSolana: Scalars['Boolean'];
|
|
140
163
|
addWalletElrond: Scalars['Boolean'];
|
|
141
164
|
addWalletFlow: Scalars['Boolean'];
|
|
142
165
|
addWalletTon: Scalars['Boolean'];
|
|
166
|
+
addWalletTonV2: Scalars['Boolean'];
|
|
143
167
|
removeWallet: Scalars['Boolean'];
|
|
144
168
|
setMainWallet: Scalars['Boolean'];
|
|
145
169
|
generateNewInviteCodes: Array<IUserInviteCode>;
|
|
@@ -213,6 +237,18 @@ export type IMutationSignInTonV2Args = {
|
|
|
213
237
|
};
|
|
214
238
|
|
|
215
239
|
|
|
240
|
+
export type IMutationSignInEthereumArgs = {
|
|
241
|
+
signInData: IEthereumSignInData;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
export type IMutationSignInEthereumWeb3AuthArgs = {
|
|
246
|
+
signInData: IEthereumSignInData;
|
|
247
|
+
loginType: ILoginType;
|
|
248
|
+
additionalMeta?: Maybe<Scalars['JSON']>;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
|
|
216
252
|
export type IMutationAddWalletMetamaskArgs = {
|
|
217
253
|
signature: Scalars['String'];
|
|
218
254
|
address: Scalars['String'];
|
|
@@ -249,6 +285,11 @@ export type IMutationAddWalletTonArgs = {
|
|
|
249
285
|
};
|
|
250
286
|
|
|
251
287
|
|
|
288
|
+
export type IMutationAddWalletTonV2Args = {
|
|
289
|
+
address: Scalars['String'];
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
|
|
252
293
|
export type IMutationRemoveWalletArgs = {
|
|
253
294
|
blockchain: Scalars['String'];
|
|
254
295
|
address: Scalars['String'];
|
|
@@ -537,15 +578,18 @@ export type IResolversTypes = {
|
|
|
537
578
|
AuditNFTBalance: ResolverTypeWrapper<IAuditNftBalance>;
|
|
538
579
|
CheckTonProofRequest: ICheckTonProofRequest;
|
|
539
580
|
Domain: IDomain;
|
|
581
|
+
EthereumSignInData: IEthereumSignInData;
|
|
582
|
+
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
|
540
583
|
Follower: ResolverTypeWrapper<IFollower>;
|
|
541
584
|
ID: ResolverTypeWrapper<Scalars['ID']>;
|
|
542
|
-
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
|
543
585
|
FollowingStatus: ResolverTypeWrapper<IFollowingStatus>;
|
|
544
586
|
Identity: ResolverTypeWrapper<IIdentity>;
|
|
545
587
|
InputProfile: IInputProfile;
|
|
546
588
|
InputSocial: IInputSocial;
|
|
547
589
|
InviteCode: ResolverTypeWrapper<IInviteCode>;
|
|
548
590
|
InviteCodeUser: ResolverTypeWrapper<IInviteCodeUser>;
|
|
591
|
+
JSON: ResolverTypeWrapper<Scalars['JSON']>;
|
|
592
|
+
LoginType: ILoginType;
|
|
549
593
|
Long: ResolverTypeWrapper<Scalars['Long']>;
|
|
550
594
|
MultiversxAudit: ResolverTypeWrapper<IMultiversxAudit>;
|
|
551
595
|
Mutation: ResolverTypeWrapper<{}>;
|
|
@@ -572,15 +616,17 @@ export type IResolversParentTypes = {
|
|
|
572
616
|
AuditNFTBalance: IAuditNftBalance;
|
|
573
617
|
CheckTonProofRequest: ICheckTonProofRequest;
|
|
574
618
|
Domain: IDomain;
|
|
619
|
+
EthereumSignInData: IEthereumSignInData;
|
|
620
|
+
Boolean: Scalars['Boolean'];
|
|
575
621
|
Follower: IFollower;
|
|
576
622
|
ID: Scalars['ID'];
|
|
577
|
-
Boolean: Scalars['Boolean'];
|
|
578
623
|
FollowingStatus: IFollowingStatus;
|
|
579
624
|
Identity: IIdentity;
|
|
580
625
|
InputProfile: IInputProfile;
|
|
581
626
|
InputSocial: IInputSocial;
|
|
582
627
|
InviteCode: IInviteCode;
|
|
583
628
|
InviteCodeUser: IInviteCodeUser;
|
|
629
|
+
JSON: Scalars['JSON'];
|
|
584
630
|
Long: Scalars['Long'];
|
|
585
631
|
MultiversxAudit: IMultiversxAudit;
|
|
586
632
|
Mutation: {};
|
|
@@ -694,6 +740,10 @@ export type IInviteCodeUserResolvers<ContextType = any, ParentType extends IReso
|
|
|
694
740
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
695
741
|
};
|
|
696
742
|
|
|
743
|
+
export interface IJsonScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['JSON'], any> {
|
|
744
|
+
name: 'JSON';
|
|
745
|
+
}
|
|
746
|
+
|
|
697
747
|
export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
|
|
698
748
|
name: 'Long';
|
|
699
749
|
}
|
|
@@ -720,12 +770,15 @@ export type IMutationResolvers<ContextType = any, ParentType extends IResolversP
|
|
|
720
770
|
signInFlow?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInFlowArgs, 'signature' | 'address'>>;
|
|
721
771
|
signInTon?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInTonArgs, 'request'>>;
|
|
722
772
|
signInTonV2?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInTonV2Args, 'address'>>;
|
|
773
|
+
signInEthereum?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInEthereumArgs, 'signInData'>>;
|
|
774
|
+
signInEthereumWeb3Auth?: Resolver<IResolversTypes['Identity'], ParentType, ContextType, RequireFields<IMutationSignInEthereumWeb3AuthArgs, 'signInData' | 'loginType'>>;
|
|
723
775
|
addWalletMetamask?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletMetamaskArgs, 'signature' | 'address' | 'chainId'>>;
|
|
724
776
|
addWalletTezos?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletTezosArgs, 'signature' | 'pubkey'>>;
|
|
725
777
|
addWalletSolana?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletSolanaArgs, 'signature' | 'pubkey'>>;
|
|
726
778
|
addWalletElrond?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletElrondArgs, 'signature' | 'address'>>;
|
|
727
779
|
addWalletFlow?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletFlowArgs, 'signature' | 'address'>>;
|
|
728
780
|
addWalletTon?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletTonArgs, 'request'>>;
|
|
781
|
+
addWalletTonV2?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddWalletTonV2Args, 'address'>>;
|
|
729
782
|
removeWallet?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationRemoveWalletArgs, 'blockchain' | 'address'>>;
|
|
730
783
|
setMainWallet?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationSetMainWalletArgs, 'blockchain' | 'address'>>;
|
|
731
784
|
generateNewInviteCodes?: Resolver<Array<IResolversTypes['UserInviteCode']>, ParentType, ContextType, RequireFields<IMutationGenerateNewInviteCodesArgs, 'codesNum'>>;
|
|
@@ -857,6 +910,7 @@ export type IResolvers<ContextType = any> = {
|
|
|
857
910
|
Identity?: IIdentityResolvers<ContextType>;
|
|
858
911
|
InviteCode?: IInviteCodeResolvers<ContextType>;
|
|
859
912
|
InviteCodeUser?: IInviteCodeUserResolvers<ContextType>;
|
|
913
|
+
JSON?: GraphQLScalarType;
|
|
860
914
|
Long?: GraphQLScalarType;
|
|
861
915
|
MultiversxAudit?: IMultiversxAuditResolvers<ContextType>;
|
|
862
916
|
Mutation?: IMutationResolvers<ContextType>;
|
|
@@ -878,6 +932,18 @@ export type IDirectiveResolvers<ContextType = any> = {
|
|
|
878
932
|
oneOf?: IOneOfDirectiveResolver<any, any, ContextType>;
|
|
879
933
|
};
|
|
880
934
|
|
|
935
|
+
export type ISignInEthereumWeb3AuthMutationVariables = Exact<{
|
|
936
|
+
signInData: IEthereumSignInData;
|
|
937
|
+
loginType: ILoginType;
|
|
938
|
+
additionalMeta?: Maybe<Scalars['JSON']>;
|
|
939
|
+
}>;
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
export type ISignInEthereumWeb3AuthMutation = { signInEthereumWeb3Auth: (
|
|
943
|
+
Pick<IIdentity, 'userId' | 'wallets' | 'newUser' | 'inviteCode' | 'role' | 'reftypeId' | 'reftypeName' | 'reftypeColor'>
|
|
944
|
+
& { tokens: { portalTokenPair: Pick<ITokenPair, 'authToken' | 'refreshToken'>, extensionTokenPair: Pick<ITokenPair, 'authToken' | 'refreshToken'> } }
|
|
945
|
+
) };
|
|
946
|
+
|
|
881
947
|
export type IAddWalletElrondMutationVariables = Exact<{
|
|
882
948
|
signature: Scalars['String'];
|
|
883
949
|
address: Scalars['String'];
|
|
@@ -1146,6 +1212,61 @@ export type IFetchUserWalletsQueryVariables = Exact<{
|
|
|
1146
1212
|
export type IFetchUserWalletsQuery = { fetchUserWallets: Array<Maybe<Pick<IWallet, 'userId' | 'address' | 'walletName' | 'blockchain' | 'chainId' | 'mainWallet'>>> };
|
|
1147
1213
|
|
|
1148
1214
|
|
|
1215
|
+
export const SignInEthereumWeb3AuthDocument = gql`
|
|
1216
|
+
mutation signInEthereumWeb3Auth($signInData: EthereumSignInData!, $loginType: LoginType!, $additionalMeta: JSON) {
|
|
1217
|
+
signInEthereumWeb3Auth(
|
|
1218
|
+
signInData: $signInData
|
|
1219
|
+
loginType: $loginType
|
|
1220
|
+
additionalMeta: $additionalMeta
|
|
1221
|
+
) {
|
|
1222
|
+
userId
|
|
1223
|
+
wallets
|
|
1224
|
+
tokens {
|
|
1225
|
+
portalTokenPair {
|
|
1226
|
+
authToken
|
|
1227
|
+
refreshToken
|
|
1228
|
+
}
|
|
1229
|
+
extensionTokenPair {
|
|
1230
|
+
authToken
|
|
1231
|
+
refreshToken
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
newUser
|
|
1235
|
+
inviteCode
|
|
1236
|
+
role
|
|
1237
|
+
reftypeId
|
|
1238
|
+
reftypeName
|
|
1239
|
+
reftypeColor
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
`;
|
|
1243
|
+
export type ISignInEthereumWeb3AuthMutationFn = Apollo.MutationFunction<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>;
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* __useSignInEthereumWeb3AuthMutation__
|
|
1247
|
+
*
|
|
1248
|
+
* To run a mutation, you first call `useSignInEthereumWeb3AuthMutation` within a React component and pass it any options that fit your needs.
|
|
1249
|
+
* When your component renders, `useSignInEthereumWeb3AuthMutation` returns a tuple that includes:
|
|
1250
|
+
* - A mutate function that you can call at any time to execute the mutation
|
|
1251
|
+
* - An object with fields that represent the current status of the mutation's execution
|
|
1252
|
+
*
|
|
1253
|
+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
1254
|
+
*
|
|
1255
|
+
* @example
|
|
1256
|
+
* const [signInEthereumWeb3AuthMutation, { data, loading, error }] = useSignInEthereumWeb3AuthMutation({
|
|
1257
|
+
* variables: {
|
|
1258
|
+
* signInData: // value for 'signInData'
|
|
1259
|
+
* loginType: // value for 'loginType'
|
|
1260
|
+
* additionalMeta: // value for 'additionalMeta'
|
|
1261
|
+
* },
|
|
1262
|
+
* });
|
|
1263
|
+
*/
|
|
1264
|
+
export function useSignInEthereumWeb3AuthMutation(baseOptions?: Apollo.MutationHookOptions<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>) {
|
|
1265
|
+
return Apollo.useMutation<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>(SignInEthereumWeb3AuthDocument, baseOptions);
|
|
1266
|
+
}
|
|
1267
|
+
export type SignInEthereumWeb3AuthMutationHookResult = ReturnType<typeof useSignInEthereumWeb3AuthMutation>;
|
|
1268
|
+
export type SignInEthereumWeb3AuthMutationResult = Apollo.MutationResult<ISignInEthereumWeb3AuthMutation>;
|
|
1269
|
+
export type SignInEthereumWeb3AuthMutationOptions = Apollo.BaseMutationOptions<ISignInEthereumWeb3AuthMutation, ISignInEthereumWeb3AuthMutationVariables>;
|
|
1149
1270
|
export const AddWalletElrondDocument = gql`
|
|
1150
1271
|
mutation AddWalletElrond($signature: String!, $address: String!) {
|
|
1151
1272
|
addWalletElrond(signature: $signature, address: $address)
|