@portkey/graphql 0.0.1-alpha.9.0 → 0.0.2-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/commonjs/client.d.ts +3 -0
- package/dist/{client.js → commonjs/client.js} +0 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderManagerChangeRecordInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderManagerChangeRecordInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderManagerInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderManagerInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderNFTBalanceInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderNFTBalanceInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderNFTCollectionBalanceInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderNFTCollectionBalanceInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderSearchTokenNFT.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderSearchTokenNFT.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTokenBalanceInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTokenBalanceInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTransaction.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTransaction.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTransactionAddressInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTransactionAddressInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTransactionInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/caHolderTransactionInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/loginGuardianChangeRecordInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/loginGuardianChangeRecordInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/loginGuardianInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/loginGuardianInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/syncState.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/syncState.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/tokenInfo.d.ts +16 -1
- package/dist/{did → commonjs/did}/__generated__/hooks/tokenInfo.js +16 -1
- package/dist/{did → commonjs/did}/__generated__/types.d.ts +1 -1
- package/dist/{did → commonjs/did}/__generated__/types.js +0 -1
- package/dist/{did → commonjs/did}/index.d.ts +0 -2
- package/dist/{did → commonjs/did}/index.js +0 -1
- package/dist/commonjs/did/utils.d.ts +6 -0
- package/dist/{did → commonjs/did}/utils.js +2 -1
- package/dist/{index.d.ts → commonjs/index.d.ts} +0 -1
- package/dist/{index.js → commonjs/index.js} +0 -1
- package/dist/commonjs/package.json +1 -0
- package/dist/{types → commonjs/types}/did.d.ts +1 -2
- package/dist/{types → commonjs/types}/did.js +0 -1
- package/dist/commonjs/types/index.d.ts +8 -0
- package/dist/{types → commonjs/types}/index.js +0 -1
- package/dist/esm/client.d.ts +3 -0
- package/dist/esm/client.js +11 -0
- package/dist/esm/did/__generated__/hooks/caHolderInfo.d.ts +58 -0
- package/dist/esm/did/__generated__/hooks/caHolderInfo.js +51 -0
- package/dist/esm/did/__generated__/hooks/caHolderManagerChangeRecordInfo.d.ts +42 -0
- package/dist/esm/did/__generated__/hooks/caHolderManagerChangeRecordInfo.js +38 -0
- package/dist/esm/did/__generated__/hooks/caHolderManagerInfo.d.ts +47 -0
- package/dist/esm/did/__generated__/hooks/caHolderManagerInfo.js +42 -0
- package/dist/esm/did/__generated__/hooks/caHolderNFTBalanceInfo.d.ts +60 -0
- package/dist/esm/did/__generated__/hooks/caHolderNFTBalanceInfo.js +54 -0
- package/dist/esm/did/__generated__/hooks/caHolderNFTCollectionBalanceInfo.d.ts +58 -0
- package/dist/esm/did/__generated__/hooks/caHolderNFTCollectionBalanceInfo.js +52 -0
- package/dist/esm/did/__generated__/hooks/caHolderSearchTokenNFT.d.ts +77 -0
- package/dist/esm/did/__generated__/hooks/caHolderSearchTokenNFT.js +70 -0
- package/dist/esm/did/__generated__/hooks/caHolderTokenBalanceInfo.d.ts +62 -0
- package/dist/esm/did/__generated__/hooks/caHolderTokenBalanceInfo.js +56 -0
- package/dist/esm/did/__generated__/hooks/caHolderTransaction.d.ts +98 -0
- package/dist/esm/did/__generated__/hooks/caHolderTransaction.js +89 -0
- package/dist/esm/did/__generated__/hooks/caHolderTransactionAddressInfo.d.ts +46 -0
- package/dist/esm/did/__generated__/hooks/caHolderTransactionAddressInfo.js +41 -0
- package/dist/esm/did/__generated__/hooks/caHolderTransactionInfo.d.ts +98 -0
- package/dist/esm/did/__generated__/hooks/caHolderTransactionInfo.js +89 -0
- package/dist/esm/did/__generated__/hooks/loginGuardianChangeRecordInfo.d.ts +52 -0
- package/dist/esm/did/__generated__/hooks/loginGuardianChangeRecordInfo.js +47 -0
- package/dist/esm/did/__generated__/hooks/loginGuardianInfo.d.ts +50 -0
- package/dist/esm/did/__generated__/hooks/loginGuardianInfo.js +45 -0
- package/dist/esm/did/__generated__/hooks/syncState.d.ts +38 -0
- package/dist/esm/did/__generated__/hooks/syncState.js +34 -0
- package/dist/esm/did/__generated__/hooks/tokenInfo.d.ts +51 -0
- package/dist/esm/did/__generated__/hooks/tokenInfo.js +47 -0
- package/dist/esm/did/__generated__/types.d.ts +416 -0
- package/dist/esm/did/__generated__/types.js +22 -0
- package/dist/esm/did/index.d.ts +13 -0
- package/dist/esm/did/index.js +53 -0
- package/dist/esm/did/utils.d.ts +6 -0
- package/dist/esm/did/utils.js +28 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/types/did.d.ts +10 -0
- package/dist/esm/types/did.js +1 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/index.js +6 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderInfo.d.ts +59 -0
- package/dist/types/did/__generated__/hooks/caHolderInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderManagerChangeRecordInfo.d.ts +43 -0
- package/dist/types/did/__generated__/hooks/caHolderManagerChangeRecordInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderManagerInfo.d.ts +48 -0
- package/dist/types/did/__generated__/hooks/caHolderManagerInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderNFTBalanceInfo.d.ts +61 -0
- package/dist/types/did/__generated__/hooks/caHolderNFTBalanceInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderNFTCollectionBalanceInfo.d.ts +59 -0
- package/dist/types/did/__generated__/hooks/caHolderNFTCollectionBalanceInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderSearchTokenNFT.d.ts +78 -0
- package/dist/types/did/__generated__/hooks/caHolderSearchTokenNFT.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderTokenBalanceInfo.d.ts +63 -0
- package/dist/types/did/__generated__/hooks/caHolderTokenBalanceInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderTransaction.d.ts +99 -0
- package/dist/types/did/__generated__/hooks/caHolderTransaction.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderTransactionAddressInfo.d.ts +47 -0
- package/dist/types/did/__generated__/hooks/caHolderTransactionAddressInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/caHolderTransactionInfo.d.ts +99 -0
- package/dist/types/did/__generated__/hooks/caHolderTransactionInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/loginGuardianChangeRecordInfo.d.ts +53 -0
- package/dist/types/did/__generated__/hooks/loginGuardianChangeRecordInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/loginGuardianInfo.d.ts +51 -0
- package/dist/types/did/__generated__/hooks/loginGuardianInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/syncState.d.ts +39 -0
- package/dist/types/did/__generated__/hooks/syncState.d.ts.map +1 -0
- package/dist/types/did/__generated__/hooks/tokenInfo.d.ts +52 -0
- package/dist/types/did/__generated__/hooks/tokenInfo.d.ts.map +1 -0
- package/dist/types/did/__generated__/types.d.ts +417 -0
- package/dist/types/did/__generated__/types.d.ts.map +1 -0
- package/dist/types/did/index.d.ts +14 -0
- package/dist/types/did/index.d.ts.map +1 -0
- package/dist/types/did/utils.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/did.d.ts +11 -0
- package/dist/types/types/did.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +9 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +19 -8
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderManagerChangeRecordInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderManagerChangeRecordInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderManagerInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderManagerInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderNFTBalanceInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderNFTBalanceInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderNFTCollectionBalanceInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderNFTCollectionBalanceInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderSearchTokenNFT.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderSearchTokenNFT.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTokenBalanceInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTokenBalanceInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTransaction.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTransaction.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTransactionAddressInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTransactionAddressInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTransactionInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/caHolderTransactionInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/loginGuardianChangeRecordInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/loginGuardianChangeRecordInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/loginGuardianInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/loginGuardianInfo.js.map +0 -1
- package/dist/did/__generated__/hooks/syncState.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/syncState.js.map +0 -1
- package/dist/did/__generated__/hooks/tokenInfo.d.ts.map +0 -1
- package/dist/did/__generated__/hooks/tokenInfo.js.map +0 -1
- package/dist/did/__generated__/types.d.ts.map +0 -1
- package/dist/did/__generated__/types.js.map +0 -1
- package/dist/did/index.d.ts.map +0 -1
- package/dist/did/index.js.map +0 -1
- package/dist/did/utils.d.ts.map +0 -1
- package/dist/did/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/did.d.ts.map +0 -1
- package/dist/types/did.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- /package/dist/{client.d.ts → types/client.d.ts} +0 -0
- /package/dist/{did → types/did}/utils.d.ts +0 -0
@@ -0,0 +1,416 @@
|
|
1
|
+
export type Maybe<T> = T | null;
|
2
|
+
export type InputMaybe<T> = Maybe<T>;
|
3
|
+
export type Exact<T extends {
|
4
|
+
[key: string]: unknown;
|
5
|
+
}> = {
|
6
|
+
[K in keyof T]: T[K];
|
7
|
+
};
|
8
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
9
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
10
|
+
};
|
11
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
12
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
13
|
+
};
|
14
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
15
|
+
export type Scalars = {
|
16
|
+
ID: string;
|
17
|
+
String: string;
|
18
|
+
Boolean: boolean;
|
19
|
+
Int: number;
|
20
|
+
Float: number;
|
21
|
+
Long: number;
|
22
|
+
};
|
23
|
+
export declare enum BlockFilterType {
|
24
|
+
Block = "BLOCK",
|
25
|
+
LogEvent = "LOG_EVENT",
|
26
|
+
Transaction = "TRANSACTION"
|
27
|
+
}
|
28
|
+
export type CaHolderInfoDto = {
|
29
|
+
__typename?: 'CAHolderInfoDto';
|
30
|
+
caAddress?: Maybe<Scalars['String']>;
|
31
|
+
caHash?: Maybe<Scalars['String']>;
|
32
|
+
chainId?: Maybe<Scalars['String']>;
|
33
|
+
guardianList?: Maybe<GuardianList>;
|
34
|
+
id?: Maybe<Scalars['String']>;
|
35
|
+
managerInfos?: Maybe<Array<Maybe<ManagerInfo>>>;
|
36
|
+
originChainId?: Maybe<Scalars['String']>;
|
37
|
+
};
|
38
|
+
export type CaHolderManagerChangeRecordDto = {
|
39
|
+
__typename?: 'CAHolderManagerChangeRecordDto';
|
40
|
+
blockHeight: Scalars['Long'];
|
41
|
+
caAddress?: Maybe<Scalars['String']>;
|
42
|
+
caHash?: Maybe<Scalars['String']>;
|
43
|
+
changeType?: Maybe<Scalars['String']>;
|
44
|
+
manager?: Maybe<Scalars['String']>;
|
45
|
+
};
|
46
|
+
export type CaHolderManagerDto = {
|
47
|
+
__typename?: 'CAHolderManagerDto';
|
48
|
+
caAddress?: Maybe<Scalars['String']>;
|
49
|
+
caHash?: Maybe<Scalars['String']>;
|
50
|
+
chainId?: Maybe<Scalars['String']>;
|
51
|
+
id?: Maybe<Scalars['String']>;
|
52
|
+
managerInfos?: Maybe<Array<Maybe<ManagerInfo>>>;
|
53
|
+
originChainId?: Maybe<Scalars['String']>;
|
54
|
+
};
|
55
|
+
export type CaHolderNftBalanceInfoDto = {
|
56
|
+
__typename?: 'CAHolderNFTBalanceInfoDto';
|
57
|
+
balance: Scalars['Long'];
|
58
|
+
caAddress?: Maybe<Scalars['String']>;
|
59
|
+
chainId?: Maybe<Scalars['String']>;
|
60
|
+
id?: Maybe<Scalars['String']>;
|
61
|
+
nftInfo?: Maybe<NftItemInfoDto>;
|
62
|
+
};
|
63
|
+
export type CaHolderNftBalancePageResultDto = {
|
64
|
+
__typename?: 'CAHolderNFTBalancePageResultDto';
|
65
|
+
data?: Maybe<Array<Maybe<CaHolderNftBalanceInfoDto>>>;
|
66
|
+
totalRecordCount: Scalars['Long'];
|
67
|
+
};
|
68
|
+
export type CaHolderNftCollectionBalanceInfoDto = {
|
69
|
+
__typename?: 'CAHolderNFTCollectionBalanceInfoDto';
|
70
|
+
caAddress?: Maybe<Scalars['String']>;
|
71
|
+
chainId?: Maybe<Scalars['String']>;
|
72
|
+
id?: Maybe<Scalars['String']>;
|
73
|
+
nftCollectionInfo?: Maybe<NftCollectionDto>;
|
74
|
+
tokenIds?: Maybe<Array<Scalars['Long']>>;
|
75
|
+
};
|
76
|
+
export type CaHolderNftCollectionBalancePageResultDto = {
|
77
|
+
__typename?: 'CAHolderNFTCollectionBalancePageResultDto';
|
78
|
+
data?: Maybe<Array<Maybe<CaHolderNftCollectionBalanceInfoDto>>>;
|
79
|
+
totalRecordCount: Scalars['Long'];
|
80
|
+
};
|
81
|
+
export type CaHolderSearchTokenNftDto = {
|
82
|
+
__typename?: 'CAHolderSearchTokenNFTDto';
|
83
|
+
balance: Scalars['Long'];
|
84
|
+
caAddress?: Maybe<Scalars['String']>;
|
85
|
+
chainId?: Maybe<Scalars['String']>;
|
86
|
+
nftInfo?: Maybe<NftItemInfoDto>;
|
87
|
+
tokenId: Scalars['Long'];
|
88
|
+
tokenInfo?: Maybe<TokenInfoDto>;
|
89
|
+
};
|
90
|
+
export type CaHolderSearchTokenNftPageResultDto = {
|
91
|
+
__typename?: 'CAHolderSearchTokenNFTPageResultDto';
|
92
|
+
data?: Maybe<Array<Maybe<CaHolderSearchTokenNftDto>>>;
|
93
|
+
totalRecordCount: Scalars['Long'];
|
94
|
+
};
|
95
|
+
export type CaHolderTokenBalanceDto = {
|
96
|
+
__typename?: 'CAHolderTokenBalanceDto';
|
97
|
+
balance: Scalars['Long'];
|
98
|
+
caAddress?: Maybe<Scalars['String']>;
|
99
|
+
chainId?: Maybe<Scalars['String']>;
|
100
|
+
tokenIds?: Maybe<Array<Scalars['Long']>>;
|
101
|
+
tokenInfo?: Maybe<TokenInfoDto>;
|
102
|
+
};
|
103
|
+
export type CaHolderTokenBalancePageResultDto = {
|
104
|
+
__typename?: 'CAHolderTokenBalancePageResultDto';
|
105
|
+
data?: Maybe<Array<Maybe<CaHolderTokenBalanceDto>>>;
|
106
|
+
totalRecordCount: Scalars['Long'];
|
107
|
+
};
|
108
|
+
export type CaHolderTransactionAddressDto = {
|
109
|
+
__typename?: 'CAHolderTransactionAddressDto';
|
110
|
+
address?: Maybe<Scalars['String']>;
|
111
|
+
addressChainId?: Maybe<Scalars['String']>;
|
112
|
+
caAddress?: Maybe<Scalars['String']>;
|
113
|
+
chainId?: Maybe<Scalars['String']>;
|
114
|
+
transactionTime: Scalars['Long'];
|
115
|
+
};
|
116
|
+
export type CaHolderTransactionAddressPageResultDto = {
|
117
|
+
__typename?: 'CAHolderTransactionAddressPageResultDto';
|
118
|
+
data?: Maybe<Array<Maybe<CaHolderTransactionAddressDto>>>;
|
119
|
+
totalRecordCount: Scalars['Long'];
|
120
|
+
};
|
121
|
+
export type CaHolderTransactionDto = {
|
122
|
+
__typename?: 'CAHolderTransactionDto';
|
123
|
+
blockHash?: Maybe<Scalars['String']>;
|
124
|
+
blockHeight: Scalars['Long'];
|
125
|
+
chainId?: Maybe<Scalars['String']>;
|
126
|
+
fromAddress?: Maybe<Scalars['String']>;
|
127
|
+
id?: Maybe<Scalars['String']>;
|
128
|
+
methodName?: Maybe<Scalars['String']>;
|
129
|
+
nftInfo?: Maybe<NftItemInfoDto>;
|
130
|
+
previousBlockHash?: Maybe<Scalars['String']>;
|
131
|
+
status: TransactionStatus;
|
132
|
+
timestamp: Scalars['Long'];
|
133
|
+
tokenInfo?: Maybe<TokenInfoDto>;
|
134
|
+
transactionFees?: Maybe<Array<Maybe<TransactionFee>>>;
|
135
|
+
transactionId?: Maybe<Scalars['String']>;
|
136
|
+
transferInfo?: Maybe<TransferInfo>;
|
137
|
+
};
|
138
|
+
export type CaHolderTransactionPageResultDto = {
|
139
|
+
__typename?: 'CAHolderTransactionPageResultDto';
|
140
|
+
data?: Maybe<Array<Maybe<CaHolderTransactionDto>>>;
|
141
|
+
totalRecordCount: Scalars['Long'];
|
142
|
+
};
|
143
|
+
export type GetCaHolderInfoDto = {
|
144
|
+
caAddress?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
145
|
+
caHash?: InputMaybe<Scalars['String']>;
|
146
|
+
chainId?: InputMaybe<Scalars['String']>;
|
147
|
+
loginGuardianIdentifierHash?: InputMaybe<Scalars['String']>;
|
148
|
+
maxResultCount: Scalars['Int'];
|
149
|
+
skipCount: Scalars['Int'];
|
150
|
+
};
|
151
|
+
export type GetCaHolderManagerChangeRecordDto = {
|
152
|
+
chainId?: InputMaybe<Scalars['String']>;
|
153
|
+
endBlockHeight: Scalars['Long'];
|
154
|
+
startBlockHeight: Scalars['Long'];
|
155
|
+
};
|
156
|
+
export type GetCaHolderManagerInfoDto = {
|
157
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
158
|
+
caHash?: InputMaybe<Scalars['String']>;
|
159
|
+
chainId?: InputMaybe<Scalars['String']>;
|
160
|
+
manager?: InputMaybe<Scalars['String']>;
|
161
|
+
maxResultCount: Scalars['Int'];
|
162
|
+
skipCount: Scalars['Int'];
|
163
|
+
};
|
164
|
+
export type GetCaHolderNftCollectionInfoDto = {
|
165
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
166
|
+
chainId?: InputMaybe<Scalars['String']>;
|
167
|
+
maxResultCount: Scalars['Int'];
|
168
|
+
skipCount: Scalars['Int'];
|
169
|
+
symbol?: InputMaybe<Scalars['String']>;
|
170
|
+
};
|
171
|
+
export type GetCaHolderNftInfoDto = {
|
172
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
173
|
+
chainId?: InputMaybe<Scalars['String']>;
|
174
|
+
collectionSymbol?: InputMaybe<Scalars['String']>;
|
175
|
+
maxResultCount: Scalars['Int'];
|
176
|
+
skipCount: Scalars['Int'];
|
177
|
+
symbol?: InputMaybe<Scalars['String']>;
|
178
|
+
};
|
179
|
+
export type GetCaHolderSearchTokenNftDto = {
|
180
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
181
|
+
chainId?: InputMaybe<Scalars['String']>;
|
182
|
+
maxResultCount: Scalars['Int'];
|
183
|
+
searchWord?: InputMaybe<Scalars['String']>;
|
184
|
+
skipCount: Scalars['Int'];
|
185
|
+
};
|
186
|
+
export type GetCaHolderTokenBalanceDto = {
|
187
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
188
|
+
chainId?: InputMaybe<Scalars['String']>;
|
189
|
+
maxResultCount: Scalars['Int'];
|
190
|
+
skipCount: Scalars['Int'];
|
191
|
+
symbol?: InputMaybe<Scalars['String']>;
|
192
|
+
};
|
193
|
+
export type GetCaHolderTransactionAddressDto = {
|
194
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
195
|
+
chainId?: InputMaybe<Scalars['String']>;
|
196
|
+
maxResultCount: Scalars['Int'];
|
197
|
+
skipCount: Scalars['Int'];
|
198
|
+
};
|
199
|
+
export type GetCaHolderTransactionDto = {
|
200
|
+
blockHash?: InputMaybe<Scalars['String']>;
|
201
|
+
caAddresses?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
202
|
+
chainId?: InputMaybe<Scalars['String']>;
|
203
|
+
endBlockHeight: Scalars['Long'];
|
204
|
+
maxResultCount: Scalars['Int'];
|
205
|
+
methodNames?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
|
206
|
+
skipCount: Scalars['Int'];
|
207
|
+
startBlockHeight: Scalars['Long'];
|
208
|
+
symbol?: InputMaybe<Scalars['String']>;
|
209
|
+
transactionId?: InputMaybe<Scalars['String']>;
|
210
|
+
transferTransactionId?: InputMaybe<Scalars['String']>;
|
211
|
+
};
|
212
|
+
export type GetLoginGuardianChangeRecordDto = {
|
213
|
+
chainId?: InputMaybe<Scalars['String']>;
|
214
|
+
endBlockHeight: Scalars['Long'];
|
215
|
+
startBlockHeight: Scalars['Long'];
|
216
|
+
};
|
217
|
+
export type GetLoginGuardianInfoDto = {
|
218
|
+
caAddress?: InputMaybe<Scalars['String']>;
|
219
|
+
caHash?: InputMaybe<Scalars['String']>;
|
220
|
+
chainId?: InputMaybe<Scalars['String']>;
|
221
|
+
loginGuardian?: InputMaybe<Scalars['String']>;
|
222
|
+
maxResultCount: Scalars['Int'];
|
223
|
+
skipCount: Scalars['Int'];
|
224
|
+
};
|
225
|
+
export type GetSyncStateDto = {
|
226
|
+
chainId?: InputMaybe<Scalars['String']>;
|
227
|
+
filterType: BlockFilterType;
|
228
|
+
};
|
229
|
+
export type GetTokenInfoDto = {
|
230
|
+
chainId?: InputMaybe<Scalars['String']>;
|
231
|
+
maxResultCount: Scalars['Int'];
|
232
|
+
skipCount: Scalars['Int'];
|
233
|
+
symbol?: InputMaybe<Scalars['String']>;
|
234
|
+
};
|
235
|
+
export type Guardian = {
|
236
|
+
__typename?: 'Guardian';
|
237
|
+
identifierHash?: Maybe<Scalars['String']>;
|
238
|
+
isLoginGuardian: Scalars['Boolean'];
|
239
|
+
salt?: Maybe<Scalars['String']>;
|
240
|
+
type: Scalars['Int'];
|
241
|
+
verifierId?: Maybe<Scalars['String']>;
|
242
|
+
};
|
243
|
+
export type GuardianDto = {
|
244
|
+
__typename?: 'GuardianDto';
|
245
|
+
identifierHash?: Maybe<Scalars['String']>;
|
246
|
+
isLoginGuardian: Scalars['Boolean'];
|
247
|
+
salt?: Maybe<Scalars['String']>;
|
248
|
+
type: Scalars['Int'];
|
249
|
+
verifierId?: Maybe<Scalars['String']>;
|
250
|
+
};
|
251
|
+
export type GuardianList = {
|
252
|
+
__typename?: 'GuardianList';
|
253
|
+
guardians?: Maybe<Array<Maybe<Guardian>>>;
|
254
|
+
};
|
255
|
+
export type LoginGuardianChangeRecordDto = {
|
256
|
+
__typename?: 'LoginGuardianChangeRecordDto';
|
257
|
+
blockHeight: Scalars['Long'];
|
258
|
+
caAddress?: Maybe<Scalars['String']>;
|
259
|
+
caHash?: Maybe<Scalars['String']>;
|
260
|
+
chainId?: Maybe<Scalars['String']>;
|
261
|
+
changeType?: Maybe<Scalars['String']>;
|
262
|
+
id?: Maybe<Scalars['String']>;
|
263
|
+
loginGuardian?: Maybe<GuardianDto>;
|
264
|
+
manager?: Maybe<Scalars['String']>;
|
265
|
+
};
|
266
|
+
export type LoginGuardianDto = {
|
267
|
+
__typename?: 'LoginGuardianDto';
|
268
|
+
caAddress?: Maybe<Scalars['String']>;
|
269
|
+
caHash?: Maybe<Scalars['String']>;
|
270
|
+
chainId?: Maybe<Scalars['String']>;
|
271
|
+
id?: Maybe<Scalars['String']>;
|
272
|
+
loginGuardian?: Maybe<GuardianDto>;
|
273
|
+
manager?: Maybe<Scalars['String']>;
|
274
|
+
};
|
275
|
+
export type ManagerInfo = {
|
276
|
+
__typename?: 'ManagerInfo';
|
277
|
+
address?: Maybe<Scalars['String']>;
|
278
|
+
extraData?: Maybe<Scalars['String']>;
|
279
|
+
};
|
280
|
+
export type NftCollectionDto = {
|
281
|
+
__typename?: 'NFTCollectionDto';
|
282
|
+
decimals: Scalars['Int'];
|
283
|
+
imageUrl?: Maybe<Scalars['String']>;
|
284
|
+
isBurnable: Scalars['Boolean'];
|
285
|
+
issueChainId: Scalars['Int'];
|
286
|
+
issuer?: Maybe<Scalars['String']>;
|
287
|
+
supply: Scalars['Long'];
|
288
|
+
symbol?: Maybe<Scalars['String']>;
|
289
|
+
tokenContractAddress?: Maybe<Scalars['String']>;
|
290
|
+
tokenName?: Maybe<Scalars['String']>;
|
291
|
+
totalSupply: Scalars['Long'];
|
292
|
+
};
|
293
|
+
export type NftItemInfoDto = {
|
294
|
+
__typename?: 'NFTItemInfoDto';
|
295
|
+
collectionName?: Maybe<Scalars['String']>;
|
296
|
+
collectionSymbol?: Maybe<Scalars['String']>;
|
297
|
+
decimals: Scalars['Int'];
|
298
|
+
imageUrl?: Maybe<Scalars['String']>;
|
299
|
+
isBurnable: Scalars['Boolean'];
|
300
|
+
issueChainId: Scalars['Int'];
|
301
|
+
issuer?: Maybe<Scalars['String']>;
|
302
|
+
supply: Scalars['Long'];
|
303
|
+
symbol?: Maybe<Scalars['String']>;
|
304
|
+
tokenContractAddress?: Maybe<Scalars['String']>;
|
305
|
+
tokenName?: Maybe<Scalars['String']>;
|
306
|
+
totalSupply: Scalars['Long'];
|
307
|
+
};
|
308
|
+
export type Query = {
|
309
|
+
__typename?: 'Query';
|
310
|
+
caHolderInfo?: Maybe<Array<Maybe<CaHolderInfoDto>>>;
|
311
|
+
caHolderManagerChangeRecordInfo?: Maybe<Array<Maybe<CaHolderManagerChangeRecordDto>>>;
|
312
|
+
caHolderManagerInfo?: Maybe<Array<Maybe<CaHolderManagerDto>>>;
|
313
|
+
caHolderNFTBalanceInfo?: Maybe<CaHolderNftBalancePageResultDto>;
|
314
|
+
caHolderNFTCollectionBalanceInfo?: Maybe<CaHolderNftCollectionBalancePageResultDto>;
|
315
|
+
caHolderSearchTokenNFT?: Maybe<CaHolderSearchTokenNftPageResultDto>;
|
316
|
+
caHolderTokenBalanceInfo?: Maybe<CaHolderTokenBalancePageResultDto>;
|
317
|
+
caHolderTransaction?: Maybe<CaHolderTransactionPageResultDto>;
|
318
|
+
caHolderTransactionAddressInfo?: Maybe<CaHolderTransactionAddressPageResultDto>;
|
319
|
+
caHolderTransactionInfo?: Maybe<CaHolderTransactionPageResultDto>;
|
320
|
+
loginGuardianChangeRecordInfo?: Maybe<Array<Maybe<LoginGuardianChangeRecordDto>>>;
|
321
|
+
loginGuardianInfo?: Maybe<Array<Maybe<LoginGuardianDto>>>;
|
322
|
+
syncState?: Maybe<SyncStateDto>;
|
323
|
+
tokenInfo?: Maybe<Array<Maybe<TokenInfoDto>>>;
|
324
|
+
};
|
325
|
+
export type QueryCaHolderInfoArgs = {
|
326
|
+
dto?: InputMaybe<GetCaHolderInfoDto>;
|
327
|
+
};
|
328
|
+
export type QueryCaHolderManagerChangeRecordInfoArgs = {
|
329
|
+
dto?: InputMaybe<GetCaHolderManagerChangeRecordDto>;
|
330
|
+
};
|
331
|
+
export type QueryCaHolderManagerInfoArgs = {
|
332
|
+
dto?: InputMaybe<GetCaHolderManagerInfoDto>;
|
333
|
+
};
|
334
|
+
export type QueryCaHolderNftBalanceInfoArgs = {
|
335
|
+
dto?: InputMaybe<GetCaHolderNftInfoDto>;
|
336
|
+
};
|
337
|
+
export type QueryCaHolderNftCollectionBalanceInfoArgs = {
|
338
|
+
dto?: InputMaybe<GetCaHolderNftCollectionInfoDto>;
|
339
|
+
};
|
340
|
+
export type QueryCaHolderSearchTokenNftArgs = {
|
341
|
+
dto?: InputMaybe<GetCaHolderSearchTokenNftDto>;
|
342
|
+
};
|
343
|
+
export type QueryCaHolderTokenBalanceInfoArgs = {
|
344
|
+
dto?: InputMaybe<GetCaHolderTokenBalanceDto>;
|
345
|
+
};
|
346
|
+
export type QueryCaHolderTransactionArgs = {
|
347
|
+
dto?: InputMaybe<GetCaHolderTransactionDto>;
|
348
|
+
};
|
349
|
+
export type QueryCaHolderTransactionAddressInfoArgs = {
|
350
|
+
dto?: InputMaybe<GetCaHolderTransactionAddressDto>;
|
351
|
+
};
|
352
|
+
export type QueryCaHolderTransactionInfoArgs = {
|
353
|
+
dto?: InputMaybe<GetCaHolderTransactionDto>;
|
354
|
+
};
|
355
|
+
export type QueryLoginGuardianChangeRecordInfoArgs = {
|
356
|
+
dto?: InputMaybe<GetLoginGuardianChangeRecordDto>;
|
357
|
+
};
|
358
|
+
export type QueryLoginGuardianInfoArgs = {
|
359
|
+
dto?: InputMaybe<GetLoginGuardianInfoDto>;
|
360
|
+
};
|
361
|
+
export type QuerySyncStateArgs = {
|
362
|
+
dto?: InputMaybe<GetSyncStateDto>;
|
363
|
+
};
|
364
|
+
export type QueryTokenInfoArgs = {
|
365
|
+
dto?: InputMaybe<GetTokenInfoDto>;
|
366
|
+
};
|
367
|
+
export type SyncStateDto = {
|
368
|
+
__typename?: 'SyncStateDto';
|
369
|
+
confirmedBlockHeight: Scalars['Long'];
|
370
|
+
};
|
371
|
+
export type TokenInfoDto = {
|
372
|
+
__typename?: 'TokenInfoDto';
|
373
|
+
blockHash?: Maybe<Scalars['String']>;
|
374
|
+
blockHeight: Scalars['Long'];
|
375
|
+
chainId?: Maybe<Scalars['String']>;
|
376
|
+
decimals: Scalars['Int'];
|
377
|
+
id?: Maybe<Scalars['String']>;
|
378
|
+
isBurnable: Scalars['Boolean'];
|
379
|
+
issueChainId: Scalars['Int'];
|
380
|
+
issuer?: Maybe<Scalars['String']>;
|
381
|
+
previousBlockHash?: Maybe<Scalars['String']>;
|
382
|
+
symbol?: Maybe<Scalars['String']>;
|
383
|
+
tokenContractAddress?: Maybe<Scalars['String']>;
|
384
|
+
tokenName?: Maybe<Scalars['String']>;
|
385
|
+
totalSupply: Scalars['Long'];
|
386
|
+
type: TokenType;
|
387
|
+
};
|
388
|
+
export declare enum TokenType {
|
389
|
+
NftCollection = "NFT_COLLECTION",
|
390
|
+
NftItem = "NFT_ITEM",
|
391
|
+
Token = "TOKEN"
|
392
|
+
}
|
393
|
+
export type TransactionFee = {
|
394
|
+
__typename?: 'TransactionFee';
|
395
|
+
amount: Scalars['Long'];
|
396
|
+
symbol?: Maybe<Scalars['String']>;
|
397
|
+
};
|
398
|
+
export declare enum TransactionStatus {
|
399
|
+
Conflict = "CONFLICT",
|
400
|
+
Failed = "FAILED",
|
401
|
+
Mined = "MINED",
|
402
|
+
NodeValidationFailed = "NODE_VALIDATION_FAILED",
|
403
|
+
NotExisted = "NOT_EXISTED",
|
404
|
+
Pending = "PENDING",
|
405
|
+
PendingValidation = "PENDING_VALIDATION"
|
406
|
+
}
|
407
|
+
export type TransferInfo = {
|
408
|
+
__typename?: 'TransferInfo';
|
409
|
+
amount: Scalars['Long'];
|
410
|
+
fromAddress?: Maybe<Scalars['String']>;
|
411
|
+
fromCAAddress?: Maybe<Scalars['String']>;
|
412
|
+
fromChainId?: Maybe<Scalars['String']>;
|
413
|
+
toAddress?: Maybe<Scalars['String']>;
|
414
|
+
toChainId?: Maybe<Scalars['String']>;
|
415
|
+
transferTransactionId?: Maybe<Scalars['String']>;
|
416
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export var BlockFilterType;
|
2
|
+
(function (BlockFilterType) {
|
3
|
+
BlockFilterType["Block"] = "BLOCK";
|
4
|
+
BlockFilterType["LogEvent"] = "LOG_EVENT";
|
5
|
+
BlockFilterType["Transaction"] = "TRANSACTION";
|
6
|
+
})(BlockFilterType || (BlockFilterType = {}));
|
7
|
+
export var TokenType;
|
8
|
+
(function (TokenType) {
|
9
|
+
TokenType["NftCollection"] = "NFT_COLLECTION";
|
10
|
+
TokenType["NftItem"] = "NFT_ITEM";
|
11
|
+
TokenType["Token"] = "TOKEN";
|
12
|
+
})(TokenType || (TokenType = {}));
|
13
|
+
export var TransactionStatus;
|
14
|
+
(function (TransactionStatus) {
|
15
|
+
TransactionStatus["Conflict"] = "CONFLICT";
|
16
|
+
TransactionStatus["Failed"] = "FAILED";
|
17
|
+
TransactionStatus["Mined"] = "MINED";
|
18
|
+
TransactionStatus["NodeValidationFailed"] = "NODE_VALIDATION_FAILED";
|
19
|
+
TransactionStatus["NotExisted"] = "NOT_EXISTED";
|
20
|
+
TransactionStatus["Pending"] = "PENDING";
|
21
|
+
TransactionStatus["PendingValidation"] = "PENDING_VALIDATION";
|
22
|
+
})(TransactionStatus || (TransactionStatus = {}));
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { BaseGraphQL, IGraphQLClient } from '../types/index.js';
|
2
|
+
import { CaHolderWithGuardian, IDIDGraphQL } from '../types/did.js';
|
3
|
+
import { GetCaHolderManagerInfoDto } from './__generated__/types.js';
|
4
|
+
export declare class DIDGraphQL<T extends IGraphQLClient = IGraphQLClient> extends BaseGraphQL<T> implements IDIDGraphQL {
|
5
|
+
protected _config?: any;
|
6
|
+
constructor({ client, config }: {
|
7
|
+
client?: T;
|
8
|
+
config?: any;
|
9
|
+
});
|
10
|
+
getHolderInfoByManager(params: Partial<Omit<GetCaHolderManagerInfoDto, 'manager' | 'chainId'>> & Required<Pick<GetCaHolderManagerInfoDto, 'manager' | 'chainId'>>): Promise<{
|
11
|
+
caHolderManagerInfo: CaHolderWithGuardian[];
|
12
|
+
}>;
|
13
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import { BaseGraphQL } from '../types/index.js';
|
11
|
+
import { getCAHolderManagerInfo, getLoginGuardianAccount } from './utils.js';
|
12
|
+
export class DIDGraphQL extends BaseGraphQL {
|
13
|
+
constructor({ client, config }) {
|
14
|
+
super(client);
|
15
|
+
this._config = config;
|
16
|
+
}
|
17
|
+
getHolderInfoByManager(params) {
|
18
|
+
var _a;
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
20
|
+
const client = ((_a = this._config) === null || _a === void 0 ? void 0 : _a.graphQLClient) || this._client;
|
21
|
+
const caResult = yield getCAHolderManagerInfo(client, {
|
22
|
+
dto: Object.assign({ skipCount: 0, maxResultCount: 1 }, params),
|
23
|
+
});
|
24
|
+
if (caResult.error)
|
25
|
+
throw caResult.error;
|
26
|
+
const result = {
|
27
|
+
caHolderManagerInfo: caResult.data.caHolderManagerInfo
|
28
|
+
? caResult.data.caHolderManagerInfo.map(item => (Object.assign(Object.assign({}, item), { loginGuardianInfo: [] })))
|
29
|
+
: [],
|
30
|
+
};
|
31
|
+
if (result.caHolderManagerInfo.length > 0) {
|
32
|
+
const caHash = result.caHolderManagerInfo[0].caHash;
|
33
|
+
const guardianResult = yield getLoginGuardianAccount(client, {
|
34
|
+
dto: {
|
35
|
+
chainId: params.chainId,
|
36
|
+
caHash,
|
37
|
+
skipCount: 0,
|
38
|
+
maxResultCount: 100,
|
39
|
+
},
|
40
|
+
});
|
41
|
+
if (guardianResult.error)
|
42
|
+
throw guardianResult.error;
|
43
|
+
if (guardianResult.data.loginGuardianInfo) {
|
44
|
+
result.caHolderManagerInfo[0].loginGuardianInfo = guardianResult.data.loginGuardianInfo;
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
result.caHolderManagerInfo[0].loginGuardianInfo = [];
|
48
|
+
}
|
49
|
+
}
|
50
|
+
return result;
|
51
|
+
});
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { CaHolderManagerInfoQuery, CaHolderManagerInfoQueryVariables } from './__generated__/hooks/caHolderManagerInfo.js';
|
2
|
+
import { LoginGuardianInfoQuery, LoginGuardianInfoQueryVariables } from './__generated__/hooks/loginGuardianInfo.js';
|
3
|
+
import { IGraphQLClient } from '../types/index.js';
|
4
|
+
declare const getCAHolderManagerInfo: (apolloClient: IGraphQLClient, params: CaHolderManagerInfoQueryVariables) => Promise<import("@apollo/client").ApolloQueryResult<CaHolderManagerInfoQuery>>;
|
5
|
+
declare const getLoginGuardianAccount: (apolloClient: IGraphQLClient, params: LoginGuardianInfoQueryVariables) => Promise<import("@apollo/client").ApolloQueryResult<LoginGuardianInfoQuery>>;
|
6
|
+
export { getCAHolderManagerInfo, getLoginGuardianAccount };
|
@@ -0,0 +1,28 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import { CaHolderManagerInfoDocument, } from './__generated__/hooks/caHolderManagerInfo.js';
|
11
|
+
import { LoginGuardianInfoDocument, } from './__generated__/hooks/loginGuardianInfo.js';
|
12
|
+
// CAHolderManager
|
13
|
+
const getCAHolderManagerInfo = (apolloClient, params) => __awaiter(void 0, void 0, void 0, function* () {
|
14
|
+
const result = yield apolloClient.query({
|
15
|
+
query: CaHolderManagerInfoDocument,
|
16
|
+
variables: params,
|
17
|
+
});
|
18
|
+
return result;
|
19
|
+
});
|
20
|
+
// LoginGuardianType
|
21
|
+
const getLoginGuardianAccount = (apolloClient, params) => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
+
const result = yield apolloClient.query({
|
23
|
+
query: LoginGuardianInfoDocument,
|
24
|
+
variables: params,
|
25
|
+
});
|
26
|
+
return result;
|
27
|
+
});
|
28
|
+
export { getCAHolderManagerInfo, getLoginGuardianAccount };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"type": "module"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { CaHolderManagerDto, GetCaHolderManagerInfoDto, LoginGuardianDto } from '../did/__generated__/types.js';
|
2
|
+
export type GetCAHolderByManagerParamsType = Partial<Omit<GetCaHolderManagerInfoDto, 'manager' | 'chainId'>> & Required<Pick<GetCaHolderManagerInfoDto, 'manager' | 'chainId'>>;
|
3
|
+
export type CaHolderWithGuardian = CaHolderManagerDto & {
|
4
|
+
loginGuardianInfo: Array<LoginGuardianDto | null>;
|
5
|
+
};
|
6
|
+
export interface IDIDGraphQL {
|
7
|
+
getHolderInfoByManager(params: GetCAHolderByManagerParamsType): Promise<{
|
8
|
+
caHolderManagerInfo: CaHolderWithGuardian[];
|
9
|
+
}>;
|
10
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
|
2
|
+
export interface IGraphQLClient extends ApolloClient<NormalizedCacheObject> {
|
3
|
+
}
|
4
|
+
export declare abstract class BaseGraphQL<T extends IGraphQLClient = IGraphQLClient> {
|
5
|
+
protected readonly _client: T;
|
6
|
+
constructor(client: T);
|
7
|
+
}
|
8
|
+
export * from './did.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,wBAAwB,eAAgB,MAAM,mBAAkB,cAAc,KAAQ,cAc/F,CAAC"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import * as Types from '../types';
|
2
|
+
import * as Apollo from '@apollo/client';
|
3
|
+
export type CaHolderInfoQueryVariables = Types.Exact<{
|
4
|
+
dto?: Types.InputMaybe<Types.GetCaHolderInfoDto>;
|
5
|
+
}>;
|
6
|
+
export type CaHolderInfoQuery = {
|
7
|
+
__typename?: 'Query';
|
8
|
+
caHolderInfo?: Array<{
|
9
|
+
__typename?: 'CAHolderInfoDto';
|
10
|
+
id?: string | null;
|
11
|
+
chainId?: string | null;
|
12
|
+
caHash?: string | null;
|
13
|
+
caAddress?: string | null;
|
14
|
+
originChainId?: string | null;
|
15
|
+
managerInfos?: Array<{
|
16
|
+
__typename?: 'ManagerInfo';
|
17
|
+
address?: string | null;
|
18
|
+
extraData?: string | null;
|
19
|
+
} | null> | null;
|
20
|
+
guardianList?: {
|
21
|
+
__typename?: 'GuardianList';
|
22
|
+
guardians?: Array<{
|
23
|
+
__typename?: 'Guardian';
|
24
|
+
type: number;
|
25
|
+
verifierId?: string | null;
|
26
|
+
identifierHash?: string | null;
|
27
|
+
salt?: string | null;
|
28
|
+
isLoginGuardian: boolean;
|
29
|
+
} | null> | null;
|
30
|
+
} | null;
|
31
|
+
} | null> | null;
|
32
|
+
};
|
33
|
+
export declare const CaHolderInfoDocument: Apollo.DocumentNode;
|
34
|
+
/**
|
35
|
+
* __useCaHolderInfoQuery__
|
36
|
+
*
|
37
|
+
* To run a query within a React component, call `useCaHolderInfoQuery` and pass it any options that fit your needs.
|
38
|
+
* When your component renders, `useCaHolderInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
39
|
+
* you can use to render your UI.
|
40
|
+
*
|
41
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
42
|
+
*
|
43
|
+
* @example
|
44
|
+
* const { data, loading, error } = useCaHolderInfoQuery({
|
45
|
+
* variables: {
|
46
|
+
* dto: // value for 'dto'
|
47
|
+
* },
|
48
|
+
* });
|
49
|
+
*/
|
50
|
+
export declare function useCaHolderInfoQuery(baseOptions?: Apollo.QueryHookOptions<CaHolderInfoQuery, CaHolderInfoQueryVariables>): Apollo.QueryResult<CaHolderInfoQuery, Types.Exact<{
|
51
|
+
dto?: Types.InputMaybe<Types.GetCaHolderInfoDto> | undefined;
|
52
|
+
}>>;
|
53
|
+
export declare function useCaHolderInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<CaHolderInfoQuery, CaHolderInfoQueryVariables>): Apollo.LazyQueryResultTuple<CaHolderInfoQuery, Types.Exact<{
|
54
|
+
dto?: Types.InputMaybe<Types.GetCaHolderInfoDto> | undefined;
|
55
|
+
}>>;
|
56
|
+
export type CaHolderInfoQueryHookResult = ReturnType<typeof useCaHolderInfoQuery>;
|
57
|
+
export type CaHolderInfoLazyQueryHookResult = ReturnType<typeof useCaHolderInfoLazyQuery>;
|
58
|
+
export type CaHolderInfoQueryResult = Apollo.QueryResult<CaHolderInfoQuery, CaHolderInfoQueryVariables>;
|
59
|
+
//# sourceMappingURL=caHolderInfo.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"caHolderInfo.d.ts","sourceRoot":"","sources":["../../../../../src/did/__generated__/hooks/caHolderInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAGlC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC,KAAK,CAAC;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;CAClD,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,KAAK,CAAC;QACnB,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,YAAY,CAAC,EAAE,KAAK,CAAC;YACnB,UAAU,CAAC,EAAE,aAAa,CAAC;YAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;QACjB,YAAY,CAAC,EAAE;YACb,UAAU,CAAC,EAAE,cAAc,CAAC;YAC5B,SAAS,CAAC,EAAE,KAAK,CAAC;gBAChB,UAAU,CAAC,EAAE,UAAU,CAAC;gBACxB,IAAI,EAAE,MAAM,CAAC;gBACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBACrB,eAAe,EAAE,OAAO,CAAC;aAC1B,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;SAClB,GAAG,IAAI,CAAC;KACV,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,oBAAoB,qBAuBhC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,CAAC,EAAE,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;;IAIrF;AACD,wBAAgB,wBAAwB,CACtC,WAAW,CAAC,EAAE,MAAM,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;;IAIzF;AACD,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClF,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1F,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,WAAW,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC"}
|