monei-sdk 1.0.0
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/README.md +351 -0
- package/dist/client/MoneiClient.d.ts +15 -0
- package/dist/client/MoneiClient.js +78 -0
- package/dist/errors/MoneiError.d.ts +17 -0
- package/dist/errors/MoneiError.js +36 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +48 -0
- package/dist/services/AgentService.d.ts +14 -0
- package/dist/services/AgentService.js +42 -0
- package/dist/services/BillService.d.ts +13 -0
- package/dist/services/BillService.js +30 -0
- package/dist/services/EvmService.d.ts +11 -0
- package/dist/services/EvmService.js +28 -0
- package/dist/services/ExchangeService.d.ts +16 -0
- package/dist/services/ExchangeService.js +43 -0
- package/dist/services/SolanaService.d.ts +12 -0
- package/dist/services/SolanaService.js +30 -0
- package/dist/services/TransactionService.d.ts +9 -0
- package/dist/services/TransactionService.js +18 -0
- package/dist/services/UserService.d.ts +8 -0
- package/dist/services/UserService.js +15 -0
- package/dist/services/WalletService.d.ts +15 -0
- package/dist/services/WalletService.js +41 -0
- package/dist/services/index.d.ts +8 -0
- package/dist/services/index.js +19 -0
- package/dist/types/agent.d.ts +42 -0
- package/dist/types/agent.js +2 -0
- package/dist/types/beneficiary.d.ts +0 -0
- package/dist/types/beneficiary.js +1 -0
- package/dist/types/bills.d.ts +118 -0
- package/dist/types/bills.js +2 -0
- package/dist/types/evm.d.ts +51 -0
- package/dist/types/evm.js +2 -0
- package/dist/types/exchange.d.ts +47 -0
- package/dist/types/exchange.js +2 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +24 -0
- package/dist/types/solana.d.ts +52 -0
- package/dist/types/solana.js +2 -0
- package/dist/types/transaction.d.ts +35 -0
- package/dist/types/transaction.js +2 -0
- package/dist/types/user.d.ts +29 -0
- package/dist/types/user.js +2 -0
- package/dist/types/wallet.d.ts +102 -0
- package/dist/types/wallet.js +2 -0
- package/package.json +39 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface TransactionResponseDto {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
deletedDate: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
type: string;
|
|
9
|
+
status: string;
|
|
10
|
+
reference: string;
|
|
11
|
+
currency: string;
|
|
12
|
+
narration: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UserTransactionsResponseDto {
|
|
15
|
+
statusCode: number;
|
|
16
|
+
message: string;
|
|
17
|
+
data: TransactionResponseDto[];
|
|
18
|
+
}
|
|
19
|
+
export interface TransactionDto {
|
|
20
|
+
id: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
deletedDate: string;
|
|
24
|
+
user: any;
|
|
25
|
+
wallet: any;
|
|
26
|
+
subwallet: any;
|
|
27
|
+
amount: number;
|
|
28
|
+
type: string;
|
|
29
|
+
status: string;
|
|
30
|
+
currency: string;
|
|
31
|
+
reference: string;
|
|
32
|
+
fincraReference?: string;
|
|
33
|
+
narration: string;
|
|
34
|
+
metadata?: any;
|
|
35
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface UserDto {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
deletedDate: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
name: string;
|
|
9
|
+
email: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
haveTransactionPin: boolean;
|
|
12
|
+
verified: boolean;
|
|
13
|
+
resetToken?: string;
|
|
14
|
+
resetTokenExpiry?: number;
|
|
15
|
+
dob?: string;
|
|
16
|
+
isAdmin: boolean;
|
|
17
|
+
deviceId?: string;
|
|
18
|
+
deviceIp?: string;
|
|
19
|
+
deviceModel?: string;
|
|
20
|
+
platform?: string;
|
|
21
|
+
lastLoggedIn?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UpdateUserDto extends Partial<UserDto> {
|
|
24
|
+
}
|
|
25
|
+
export interface UserResponseDto {
|
|
26
|
+
statusCode: number;
|
|
27
|
+
message: string;
|
|
28
|
+
data: UserDto;
|
|
29
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export interface BalanceDto {
|
|
2
|
+
balance: string;
|
|
3
|
+
}
|
|
4
|
+
export interface BalanceResponseDto {
|
|
5
|
+
statusCode: number;
|
|
6
|
+
message: string;
|
|
7
|
+
data: BalanceDto;
|
|
8
|
+
}
|
|
9
|
+
export interface FundWalletByNairaDto {
|
|
10
|
+
amount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DepositResponseDto {
|
|
13
|
+
link: string;
|
|
14
|
+
}
|
|
15
|
+
export interface FundWalletByNairaResponseDto {
|
|
16
|
+
statusCode: number;
|
|
17
|
+
message: string;
|
|
18
|
+
data: DepositResponseDto;
|
|
19
|
+
}
|
|
20
|
+
export interface SubWalletDto {
|
|
21
|
+
id: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
deletedDate: string;
|
|
25
|
+
parentWalletId: string;
|
|
26
|
+
type: 'FIAT' | 'CRYPTO';
|
|
27
|
+
currency: string;
|
|
28
|
+
balance: number;
|
|
29
|
+
chain?: string;
|
|
30
|
+
publicAddress?: string;
|
|
31
|
+
evmPortfolio?: any;
|
|
32
|
+
solPortfolio?: any;
|
|
33
|
+
}
|
|
34
|
+
export interface UserWalletDto {
|
|
35
|
+
nairaBalance: number;
|
|
36
|
+
evmPortfolio?: any;
|
|
37
|
+
solPortfolio?: any;
|
|
38
|
+
subwallets: SubWalletDto[];
|
|
39
|
+
}
|
|
40
|
+
export interface BankDto {
|
|
41
|
+
swiftCode?: string;
|
|
42
|
+
bic?: string;
|
|
43
|
+
isMobileVerified?: boolean;
|
|
44
|
+
isCashPickUp: boolean;
|
|
45
|
+
nibssCode: string;
|
|
46
|
+
id: string;
|
|
47
|
+
code: string;
|
|
48
|
+
name: string;
|
|
49
|
+
branches: any[];
|
|
50
|
+
}
|
|
51
|
+
export interface BankListResponseDto {
|
|
52
|
+
statusCode: number;
|
|
53
|
+
message: string;
|
|
54
|
+
data: BankDto[];
|
|
55
|
+
}
|
|
56
|
+
export interface VerifyBankAccountRequestDto {
|
|
57
|
+
accountNumber: string;
|
|
58
|
+
bank: string;
|
|
59
|
+
}
|
|
60
|
+
export interface BankAccountDto {
|
|
61
|
+
accountName: string;
|
|
62
|
+
accountNumber: string;
|
|
63
|
+
bankCode: string;
|
|
64
|
+
bankName: string;
|
|
65
|
+
}
|
|
66
|
+
export interface BankAccountResponseDto {
|
|
67
|
+
statusCode: number;
|
|
68
|
+
message: string;
|
|
69
|
+
data: BankAccountDto;
|
|
70
|
+
}
|
|
71
|
+
export interface WithdrawWalletDto {
|
|
72
|
+
amount: number;
|
|
73
|
+
bank: string;
|
|
74
|
+
accountNumber: string;
|
|
75
|
+
transactionPin: string;
|
|
76
|
+
currency?: string;
|
|
77
|
+
narration?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface PeerTransferDto {
|
|
80
|
+
receiver: string;
|
|
81
|
+
amount: number;
|
|
82
|
+
transactionPin: string;
|
|
83
|
+
currency?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface VerifyBvnDto {
|
|
86
|
+
bvn: string;
|
|
87
|
+
}
|
|
88
|
+
export interface UserKycInfoDto {
|
|
89
|
+
id: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
deletedDate: string;
|
|
93
|
+
verificationStatus: string;
|
|
94
|
+
firstName: string;
|
|
95
|
+
lastName: string;
|
|
96
|
+
gender: string;
|
|
97
|
+
dateOfBirth: string;
|
|
98
|
+
phoneNo: string;
|
|
99
|
+
pixBase64: string;
|
|
100
|
+
kycStatus: string;
|
|
101
|
+
verifiedAt: string;
|
|
102
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "monei-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Node.js SDK for Monei API",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "npm run build",
|
|
10
|
+
"test": "jest",
|
|
11
|
+
"test:watch": "jest --watch"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mrmonei",
|
|
15
|
+
"crypto",
|
|
16
|
+
"wallet",
|
|
17
|
+
"api",
|
|
18
|
+
"sdk"
|
|
19
|
+
],
|
|
20
|
+
"author": "Ayodeji Osayemi",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"axios": "^1.13.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/jest": "^29.0.0",
|
|
27
|
+
"@types/node": "^20.0.0",
|
|
28
|
+
"jest": "^29.0.0",
|
|
29
|
+
"ts-jest": "^29.0.0",
|
|
30
|
+
"typescript": "^5.0.0"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/Mr-Money01/monei-node-sdk.git"
|
|
38
|
+
}
|
|
39
|
+
}
|