ggez-banking-sdk 0.1.42 → 0.1.43
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.
@@ -5,7 +5,7 @@ import { DoTransactionInterface, GetTransactionInterface } from "../interfaces/a
|
|
5
5
|
import { CreateAddressInterface, DeleteUserAddressInterface, MakeAddressPrimaryInterface, UpdateAddressInterface, CreateUserEmailInterface, DeleteUserEmailInterface, UpdateUserEmailInterface, ConfirmLimitedEmailInterface, MakePrimaryUserEmailInterface, VerifyLimitedEmailInterface, ConfirmLimitedPhoneInterface, CreateUserPhoneInterface, DeleteUserPhoneInterface, MakeUserPhonePrimaryInterface, UpdateUserPhoneInterface, VerifyLimitedPhoneInterface, CreateBankAccountInterFace, UpdateBankAccountInterFace, DeleteBankAccountInterFace, MakeBankAccountPrimaryInterFace, CreateIdentificationInterface, DeleteIdentificationInterface, UpdateIdentificationInterface, UpdatePersonalInfoInterface, UpdateProfilePictureInterface, ChangeUserSecurityCodeInterface, ResetPasswordInterface, ResetSecurityQuestionsInterface, UpdateUserPreferencesInterface, ValidateSecurityCodeInterface, ActivateGoogleAuthInterface, ValidateLimitedPhoneInterface, IsEmailPresentAndValidInterface, IsPhonePresentAndValidInterface, SendOTPPhoneInterface, SendOTPEmailInterface, CreateDocumentInterface, ForgetPasswordConfirmInterface, ForgetPasswordValidateInterface, DeleteGoogleAuthInterface, CreateTicketInterface } from "../interfaces/bankingSystemInterface";
|
6
6
|
import { IOrderInterface } from "../interfaces/transactionInterface";
|
7
7
|
import { CreateDocumentOrganizationInterface, CreateOrganizationInterface, UpdateOrganizationInterface } from "../interfaces/organizationInterface";
|
8
|
-
import {
|
8
|
+
import { IBlockchainDelegateRequest, IBlockchainMultiSendRequest, IBlockchainSendRequest, IBlockchainUndelegateRequest } from "../interfaces/blockchain";
|
9
9
|
import { BlockchainRequestType } from "../constants";
|
10
10
|
declare const Data: () => {
|
11
11
|
dataSignUpApi: (values: SignUpInterface) => {
|
@@ -3267,6 +3267,6 @@ declare const Data: () => {
|
|
3267
3267
|
time_zone_name: string;
|
3268
3268
|
};
|
3269
3269
|
};
|
3270
|
-
GetBlockchainRequestData: (values:
|
3270
|
+
GetBlockchainRequestData: (values: IBlockchainSendRequest | IBlockchainMultiSendRequest | IBlockchainDelegateRequest | IBlockchainUndelegateRequest, blockchainRequestType: BlockchainRequestType) => IBlockchainSendRequest | IBlockchainMultiSendRequest | IBlockchainDelegateRequest | IBlockchainUndelegateRequest;
|
3271
3271
|
};
|
3272
3272
|
export default Data;
|
@@ -75,7 +75,6 @@ const Data = () => {
|
|
75
75
|
info: info,
|
76
76
|
transaction_data: transaction_data,
|
77
77
|
authentication: authentication,
|
78
|
-
fee: null,
|
79
78
|
};
|
80
79
|
return data;
|
81
80
|
};
|
@@ -85,7 +84,6 @@ const Data = () => {
|
|
85
84
|
info: info,
|
86
85
|
transaction_data: transaction_data,
|
87
86
|
authentication: authentication,
|
88
|
-
fee: null,
|
89
87
|
};
|
90
88
|
return data;
|
91
89
|
};
|
@@ -93,9 +91,10 @@ const Data = () => {
|
|
93
91
|
const { info, transaction_data, authentication } = values;
|
94
92
|
const data = {
|
95
93
|
info: info,
|
96
|
-
transaction_data:
|
94
|
+
transaction_data: {
|
95
|
+
delegate: transaction_data.delegate,
|
96
|
+
},
|
97
97
|
authentication: authentication,
|
98
|
-
fee: null,
|
99
98
|
};
|
100
99
|
return data;
|
101
100
|
};
|
@@ -103,9 +102,10 @@ const Data = () => {
|
|
103
102
|
const { info, transaction_data, authentication } = values;
|
104
103
|
const data = {
|
105
104
|
info: info,
|
106
|
-
transaction_data:
|
105
|
+
transaction_data: {
|
106
|
+
undelegate: transaction_data.undelegate,
|
107
|
+
},
|
107
108
|
authentication: authentication,
|
108
|
-
fee: null,
|
109
109
|
};
|
110
110
|
return data;
|
111
111
|
};
|
@@ -7,24 +7,32 @@ interface IAuthentication {
|
|
7
7
|
type: number;
|
8
8
|
code: string;
|
9
9
|
}
|
10
|
-
interface
|
10
|
+
interface IBaseRequest {
|
11
11
|
info: {
|
12
|
-
user_id?: number;
|
13
12
|
account_id: number;
|
14
|
-
program_id?: number;
|
15
|
-
chain_address?: string;
|
16
|
-
validator_address?: string;
|
17
|
-
memo?: string;
|
18
|
-
type?: number;
|
19
13
|
chain_type: ChainType;
|
20
|
-
client_date?: string;
|
21
|
-
server_date?: string;
|
22
|
-
date_utc?: string;
|
23
|
-
source_time_zone?: string;
|
24
|
-
source_id?: string;
|
25
14
|
};
|
26
15
|
authentication: IAuthentication[];
|
27
16
|
}
|
17
|
+
interface IBaseResponse {
|
18
|
+
info: {
|
19
|
+
user_id: number;
|
20
|
+
account_id: number;
|
21
|
+
program_id: number;
|
22
|
+
chain_address: string;
|
23
|
+
validator_address: string;
|
24
|
+
memo: string;
|
25
|
+
type: number;
|
26
|
+
chain_type: number;
|
27
|
+
client_date: string;
|
28
|
+
server_date: string;
|
29
|
+
date_utc: string;
|
30
|
+
source_time_zone: string;
|
31
|
+
source_id: string;
|
32
|
+
};
|
33
|
+
authentication: IAuthentication[];
|
34
|
+
fee: ICoin | null;
|
35
|
+
}
|
28
36
|
export interface ISend {
|
29
37
|
address: string;
|
30
38
|
coins: ICoin[];
|
@@ -32,12 +40,12 @@ export interface ISend {
|
|
32
40
|
export interface IMultiSend {
|
33
41
|
recipients: ISend[];
|
34
42
|
}
|
35
|
-
export interface ISendData extends
|
43
|
+
export interface ISendData extends IBaseRequest {
|
36
44
|
transaction_data: {
|
37
45
|
send: ISend;
|
38
46
|
};
|
39
47
|
}
|
40
|
-
export interface IMultiSendData extends
|
48
|
+
export interface IMultiSendData extends IBaseRequest {
|
41
49
|
transaction_data: {
|
42
50
|
multi_send: IMultiSend;
|
43
51
|
};
|
@@ -46,23 +54,114 @@ export interface IDelegation {
|
|
46
54
|
validator_address: string;
|
47
55
|
coin: ICoin;
|
48
56
|
}
|
49
|
-
export interface IDelegateData extends
|
57
|
+
export interface IDelegateData extends IBaseRequest {
|
50
58
|
transaction_data: {
|
51
59
|
delegate: IDelegation;
|
52
60
|
};
|
53
61
|
}
|
54
|
-
export interface IUndelegateData extends
|
62
|
+
export interface IUndelegateData extends IBaseRequest {
|
55
63
|
transaction_data: {
|
56
64
|
undelegate: IDelegation;
|
57
65
|
};
|
58
66
|
}
|
59
|
-
export interface
|
67
|
+
export interface ISendTransaction {
|
68
|
+
transaction_data: {
|
69
|
+
send: ISend;
|
70
|
+
multi_send?: undefined;
|
71
|
+
delegate?: undefined;
|
72
|
+
undelegate?: undefined;
|
73
|
+
};
|
74
|
+
}
|
75
|
+
export interface IMultiSendTransaction {
|
60
76
|
transaction_data: {
|
61
|
-
send?:
|
62
|
-
multi_send
|
63
|
-
delegate?:
|
64
|
-
undelegate?:
|
77
|
+
send?: undefined;
|
78
|
+
multi_send: IMultiSend;
|
79
|
+
delegate?: undefined;
|
80
|
+
undelegate?: undefined;
|
65
81
|
};
|
66
|
-
fee: ICoin | null;
|
67
82
|
}
|
83
|
+
export interface IDelegateTransaction {
|
84
|
+
transaction_data: {
|
85
|
+
send?: undefined;
|
86
|
+
multi_send?: undefined;
|
87
|
+
delegate: IDelegation;
|
88
|
+
undelegate?: undefined;
|
89
|
+
};
|
90
|
+
}
|
91
|
+
export interface IUndelegateTransaction {
|
92
|
+
transaction_data: {
|
93
|
+
send?: undefined;
|
94
|
+
multi_send?: undefined;
|
95
|
+
delegate?: undefined;
|
96
|
+
undelegate: IDelegation;
|
97
|
+
};
|
98
|
+
}
|
99
|
+
export interface IBlockchainSendRequest extends IBaseRequest {
|
100
|
+
transaction_data: {
|
101
|
+
send: ISend;
|
102
|
+
multi_send?: undefined;
|
103
|
+
delegate?: undefined;
|
104
|
+
undelegate?: undefined;
|
105
|
+
};
|
106
|
+
}
|
107
|
+
export interface IBlockchainMultiSendRequest extends IBaseRequest {
|
108
|
+
transaction_data: {
|
109
|
+
send?: undefined;
|
110
|
+
multi_send: IMultiSend;
|
111
|
+
delegate?: undefined;
|
112
|
+
undelegate?: undefined;
|
113
|
+
};
|
114
|
+
}
|
115
|
+
export interface IBlockchainDelegateRequest extends IBaseRequest {
|
116
|
+
transaction_data: {
|
117
|
+
send?: undefined;
|
118
|
+
multi_send?: undefined;
|
119
|
+
delegate: IDelegation;
|
120
|
+
undelegate?: undefined;
|
121
|
+
};
|
122
|
+
}
|
123
|
+
export interface IBlockchainUndelegateRequest extends IBaseRequest {
|
124
|
+
transaction_data: {
|
125
|
+
send?: undefined;
|
126
|
+
multi_send?: undefined;
|
127
|
+
delegate?: undefined;
|
128
|
+
undelegate: IDelegation;
|
129
|
+
};
|
130
|
+
}
|
131
|
+
export interface IBlockchainSendResponse extends IBaseResponse {
|
132
|
+
transaction_data: {
|
133
|
+
send: ISend;
|
134
|
+
multi_send: null;
|
135
|
+
delegate: null;
|
136
|
+
undelegate: null;
|
137
|
+
};
|
138
|
+
}
|
139
|
+
export interface IBlockchainMultiSendResponse extends IBaseResponse {
|
140
|
+
transaction_data: {
|
141
|
+
send: null;
|
142
|
+
multi_send: IMultiSend;
|
143
|
+
delegate: null;
|
144
|
+
undelegate: null;
|
145
|
+
};
|
146
|
+
}
|
147
|
+
export interface IBlockchainDelegateResponse extends IBaseResponse {
|
148
|
+
transaction_data: {
|
149
|
+
send: null;
|
150
|
+
multi_send: null;
|
151
|
+
delegate: IDelegation;
|
152
|
+
undelegate: null;
|
153
|
+
};
|
154
|
+
}
|
155
|
+
export interface IBlockchainUndelegateResponse extends IBaseResponse {
|
156
|
+
transaction_data: {
|
157
|
+
send: null;
|
158
|
+
multi_send: null;
|
159
|
+
delegate: null;
|
160
|
+
undelegate: IDelegation;
|
161
|
+
};
|
162
|
+
}
|
163
|
+
export type IBlockchainRequestData = IBlockchainSendRequest | IBlockchainMultiSendRequest | IBlockchainDelegateRequest | IBlockchainUndelegateRequest;
|
164
|
+
export type IBlockchainResponseData = IBaseResponse & {
|
165
|
+
fee: ICoin | null;
|
166
|
+
};
|
68
167
|
export {};
|
@@ -1,25 +1,25 @@
|
|
1
|
-
import {
|
1
|
+
import { IBlockchainSendRequest, IBlockchainMultiSendRequest, IBlockchainDelegateRequest, IBlockchainUndelegateRequest } from "./../interfaces/blockchain";
|
2
2
|
import { UserInfo } from "../interfaces/interface";
|
3
3
|
export declare const useBlockchain: (token: string, userInfo: UserInfo, userId: string, baseUrl: string, lang?: string) => {
|
4
|
-
SendRequest: (values:
|
4
|
+
SendRequest: (values: IBlockchainSendRequest) => Promise<{
|
5
5
|
response: any;
|
6
6
|
newUser: any;
|
7
7
|
message: any;
|
8
8
|
status: string;
|
9
9
|
}>;
|
10
|
-
MultiSendRequest: (values:
|
10
|
+
MultiSendRequest: (values: IBlockchainMultiSendRequest) => Promise<{
|
11
11
|
response: any;
|
12
12
|
newUser: any;
|
13
13
|
message: any;
|
14
14
|
status: string;
|
15
15
|
}>;
|
16
|
-
DelegateRequest: (values:
|
16
|
+
DelegateRequest: (values: IBlockchainDelegateRequest) => Promise<{
|
17
17
|
response: any;
|
18
18
|
newUser: any;
|
19
19
|
message: any;
|
20
20
|
status: string;
|
21
21
|
}>;
|
22
|
-
UndelegateRequest: (values:
|
22
|
+
UndelegateRequest: (values: IBlockchainUndelegateRequest) => Promise<{
|
23
23
|
response: any;
|
24
24
|
newUser: any;
|
25
25
|
message: any;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ggez-banking-sdk",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.43",
|
4
4
|
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|