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.
Files changed (46) hide show
  1. package/README.md +351 -0
  2. package/dist/client/MoneiClient.d.ts +15 -0
  3. package/dist/client/MoneiClient.js +78 -0
  4. package/dist/errors/MoneiError.d.ts +17 -0
  5. package/dist/errors/MoneiError.js +36 -0
  6. package/dist/index.d.ts +20 -0
  7. package/dist/index.js +48 -0
  8. package/dist/services/AgentService.d.ts +14 -0
  9. package/dist/services/AgentService.js +42 -0
  10. package/dist/services/BillService.d.ts +13 -0
  11. package/dist/services/BillService.js +30 -0
  12. package/dist/services/EvmService.d.ts +11 -0
  13. package/dist/services/EvmService.js +28 -0
  14. package/dist/services/ExchangeService.d.ts +16 -0
  15. package/dist/services/ExchangeService.js +43 -0
  16. package/dist/services/SolanaService.d.ts +12 -0
  17. package/dist/services/SolanaService.js +30 -0
  18. package/dist/services/TransactionService.d.ts +9 -0
  19. package/dist/services/TransactionService.js +18 -0
  20. package/dist/services/UserService.d.ts +8 -0
  21. package/dist/services/UserService.js +15 -0
  22. package/dist/services/WalletService.d.ts +15 -0
  23. package/dist/services/WalletService.js +41 -0
  24. package/dist/services/index.d.ts +8 -0
  25. package/dist/services/index.js +19 -0
  26. package/dist/types/agent.d.ts +42 -0
  27. package/dist/types/agent.js +2 -0
  28. package/dist/types/beneficiary.d.ts +0 -0
  29. package/dist/types/beneficiary.js +1 -0
  30. package/dist/types/bills.d.ts +118 -0
  31. package/dist/types/bills.js +2 -0
  32. package/dist/types/evm.d.ts +51 -0
  33. package/dist/types/evm.js +2 -0
  34. package/dist/types/exchange.d.ts +47 -0
  35. package/dist/types/exchange.js +2 -0
  36. package/dist/types/index.d.ts +22 -0
  37. package/dist/types/index.js +24 -0
  38. package/dist/types/solana.d.ts +52 -0
  39. package/dist/types/solana.js +2 -0
  40. package/dist/types/transaction.d.ts +35 -0
  41. package/dist/types/transaction.js +2 -0
  42. package/dist/types/user.d.ts +29 -0
  43. package/dist/types/user.js +2 -0
  44. package/dist/types/wallet.d.ts +102 -0
  45. package/dist/types/wallet.js +2 -0
  46. package/package.json +39 -0
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EvmService = void 0;
4
+ class EvmService {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async getPortfolio(chainId) {
9
+ return this.client.get(`/api/v1/evm/portfolio/${chainId}`);
10
+ }
11
+ async getNativeBalance(chainId) {
12
+ return this.client.get('/api/v1/evm/balance/native', {
13
+ params: { chainId }
14
+ });
15
+ }
16
+ async getTokenBalance(tokenAddress, chainId) {
17
+ return this.client.get('/api/v1/evm/balance/token', {
18
+ params: { tokenAddress, chainId }
19
+ });
20
+ }
21
+ async sendNativeToken(sendData) {
22
+ return this.client.post('/api/v1/evm/send/native', sendData);
23
+ }
24
+ async sendToken(sendData) {
25
+ return this.client.post('/api/v1/evm/send/token', sendData);
26
+ }
27
+ }
28
+ exports.EvmService = EvmService;
@@ -0,0 +1,16 @@
1
+ import { MoneiClient } from '../client/MoneiClient';
2
+ import { SwapNativeToTokenDto, SwapTokenToTokenDto, SwapTokenToNativeDto, QuoteResponseDto, TxHashResponseDto, SwapSolToTokenDto, SwapResponseDto } from '../types';
3
+ export declare class ExchangeService {
4
+ private client;
5
+ constructor(client: MoneiClient);
6
+ getNativeToTokenQuote(quoteData: SwapNativeToTokenDto): Promise<QuoteResponseDto>;
7
+ swapNativeToToken(swapData: SwapNativeToTokenDto): Promise<TxHashResponseDto>;
8
+ getTokenToTokenQuote(quoteData: SwapTokenToTokenDto): Promise<QuoteResponseDto>;
9
+ swapTokenToToken(swapData: SwapTokenToTokenDto): Promise<TxHashResponseDto>;
10
+ getTokenToNativeQuote(quoteData: SwapTokenToNativeDto): Promise<QuoteResponseDto>;
11
+ swapTokenToNative(swapData: SwapTokenToNativeDto): Promise<TxHashResponseDto>;
12
+ getSolanaQuote(inputMint: string, outputMint: string, amount: number): Promise<any>;
13
+ swapSolToToken(swapData: SwapSolToTokenDto): Promise<SwapResponseDto>;
14
+ swapTokenToTokenSolana(swapData: SwapTokenToTokenDto): Promise<SwapResponseDto>;
15
+ swapTokenToSol(swapData: SwapSolToTokenDto): Promise<SwapResponseDto>;
16
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExchangeService = void 0;
4
+ class ExchangeService {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ // EVM Exchange
9
+ async getNativeToTokenQuote(quoteData) {
10
+ return this.client.post('/api/v1/evm-exchange/quote/native-to-token', quoteData);
11
+ }
12
+ async swapNativeToToken(swapData) {
13
+ return this.client.post('/api/v1/evm-exchange/native-to-token', swapData);
14
+ }
15
+ async getTokenToTokenQuote(quoteData) {
16
+ return this.client.post('/api/v1/evm-exchange/quote/token-to-token', quoteData);
17
+ }
18
+ async swapTokenToToken(swapData) {
19
+ return this.client.post('/api/v1/evm-exchange/token-to-token', swapData);
20
+ }
21
+ async getTokenToNativeQuote(quoteData) {
22
+ return this.client.post('/api/v1/evm-exchange/quote/token-to-native', quoteData);
23
+ }
24
+ async swapTokenToNative(swapData) {
25
+ return this.client.post('/api/v1/evm-exchange/token-to-native', swapData);
26
+ }
27
+ // Solana Exchange
28
+ async getSolanaQuote(inputMint, outputMint, amount) {
29
+ return this.client.get('/api/v1/solana-exchange/quote', {
30
+ params: { inputMint, outputMint, amount }
31
+ });
32
+ }
33
+ async swapSolToToken(swapData) {
34
+ return this.client.post('/api/v1/solana-exchange/swap-sol-to-token', swapData);
35
+ }
36
+ async swapTokenToTokenSolana(swapData) {
37
+ return this.client.post('/api/v1/solana-exchange/swap-token-to-token', swapData);
38
+ }
39
+ async swapTokenToSol(swapData) {
40
+ return this.client.post('/api/v1/solana-exchange/swap-token-to-sol', swapData);
41
+ }
42
+ }
43
+ exports.ExchangeService = ExchangeService;
@@ -0,0 +1,12 @@
1
+ import { MoneiClient } from '../client/MoneiClient';
2
+ import { WalletAddressResponseDto, BalanceResponseDto, PortfolioResponseDto, TransferSolDto, TransferTokenDto, SignatureResponseDto, SolanaNetwork } from '../types';
3
+ export declare class SolanaService {
4
+ private client;
5
+ constructor(client: MoneiClient);
6
+ getWalletAddress(): Promise<WalletAddressResponseDto>;
7
+ getNativeBalance(network?: SolanaNetwork): Promise<BalanceResponseDto>;
8
+ getTokenBalance(tokenMintAddress: string, network?: SolanaNetwork): Promise<BalanceResponseDto>;
9
+ getPortfolio(network?: SolanaNetwork): Promise<PortfolioResponseDto>;
10
+ sendNativeToken(transferData: TransferSolDto): Promise<SignatureResponseDto>;
11
+ sendToken(transferData: TransferTokenDto): Promise<SignatureResponseDto>;
12
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SolanaService = void 0;
4
+ class SolanaService {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async getWalletAddress() {
9
+ return this.client.get('/api/v1/solana/address');
10
+ }
11
+ async getNativeBalance(network) {
12
+ const params = network ? { network } : undefined;
13
+ return this.client.get('/api/v1/solana/balance', { params });
14
+ }
15
+ async getTokenBalance(tokenMintAddress, network) {
16
+ const params = network ? { network } : undefined;
17
+ return this.client.get(`/api/v1/solana/token-balance/${tokenMintAddress}`, { params });
18
+ }
19
+ async getPortfolio(network) {
20
+ const params = network ? { network } : undefined;
21
+ return this.client.get('/api/v1/solana/portfolio', { params });
22
+ }
23
+ async sendNativeToken(transferData) {
24
+ return this.client.post('/api/v1/solana/transfer', transferData);
25
+ }
26
+ async sendToken(transferData) {
27
+ return this.client.post('/api/v1/solana/transfer-token', transferData);
28
+ }
29
+ }
30
+ exports.SolanaService = SolanaService;
@@ -0,0 +1,9 @@
1
+ import { MoneiClient } from '../client/MoneiClient';
2
+ import { UserTransactionsResponseDto, TransactionDto } from '../types';
3
+ export declare class TransactionService {
4
+ private client;
5
+ constructor(client: MoneiClient);
6
+ getUserTransactions(): Promise<UserTransactionsResponseDto>;
7
+ getTransactionById(id: string): Promise<TransactionDto>;
8
+ getTransactionByReference(reference: string): Promise<TransactionDto>;
9
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionService = void 0;
4
+ class TransactionService {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async getUserTransactions() {
9
+ return this.client.get('/api/v1/transactions/user');
10
+ }
11
+ async getTransactionById(id) {
12
+ return this.client.get(`/api/v1/transactions/${id}`);
13
+ }
14
+ async getTransactionByReference(reference) {
15
+ return this.client.get(`/api/v1/transactions/reference/${reference}`);
16
+ }
17
+ }
18
+ exports.TransactionService = TransactionService;
@@ -0,0 +1,8 @@
1
+ import { MoneiClient } from '../client/MoneiClient';
2
+ import { UserResponseDto, UpdateUserDto } from '../types';
3
+ export declare class UserService {
4
+ private client;
5
+ constructor(client: MoneiClient);
6
+ getCurrentUser(): Promise<UserResponseDto>;
7
+ updateUser(id: string, updateData: UpdateUserDto): Promise<UserResponseDto>;
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserService = void 0;
4
+ class UserService {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async getCurrentUser() {
9
+ return this.client.get('/api/v1/user/me');
10
+ }
11
+ async updateUser(id, updateData) {
12
+ return this.client.patch(`/api/v1/user/update/${id}`, updateData);
13
+ }
14
+ }
15
+ exports.UserService = UserService;
@@ -0,0 +1,15 @@
1
+ import { MoneiClient } from '../client/MoneiClient';
2
+ import { BalanceResponseDto, FundWalletByNairaDto, FundWalletByNairaResponseDto, UserWalletDto, BankListResponseDto, VerifyBankAccountRequestDto, BankAccountResponseDto, WithdrawWalletDto, PeerTransferDto, VerifyBvnDto, UserKycInfoDto } from '../types';
3
+ export declare class WalletService {
4
+ private client;
5
+ constructor(client: MoneiClient);
6
+ getWalletBalance(chainId?: number): Promise<UserWalletDto>;
7
+ getNativeBalance(chainId: number): Promise<BalanceResponseDto>;
8
+ getTokenBalance(tokenAddress: string, chainId: number): Promise<BalanceResponseDto>;
9
+ fundWalletByNaira(fundData: FundWalletByNairaDto): Promise<FundWalletByNairaResponseDto>;
10
+ getBanks(): Promise<BankListResponseDto>;
11
+ verifyBankAccount(verifyData: VerifyBankAccountRequestDto): Promise<BankAccountResponseDto>;
12
+ withdrawFromWallet(withdrawData: WithdrawWalletDto): Promise<any>;
13
+ peerTransfer(transferData: PeerTransferDto): Promise<any>;
14
+ verifyBvn(bvnData: VerifyBvnDto): Promise<UserKycInfoDto>;
15
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WalletService = void 0;
4
+ class WalletService {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async getWalletBalance(chainId) {
9
+ const params = chainId ? { chainId } : undefined;
10
+ return this.client.get('/api/v1/wallet/me', { params });
11
+ }
12
+ async getNativeBalance(chainId) {
13
+ return this.client.get('/api/v1/evm/balance/native', {
14
+ params: { chainId }
15
+ });
16
+ }
17
+ async getTokenBalance(tokenAddress, chainId) {
18
+ return this.client.get('/api/v1/evm/balance/token', {
19
+ params: { tokenAddress, chainId }
20
+ });
21
+ }
22
+ async fundWalletByNaira(fundData) {
23
+ return this.client.post('/api/v1/wallet/user/fund-wallet', fundData);
24
+ }
25
+ async getBanks() {
26
+ return this.client.get('/api/v1/wallet/get-banks');
27
+ }
28
+ async verifyBankAccount(verifyData) {
29
+ return this.client.post('/api/v1/wallet/verify-bank-account', verifyData);
30
+ }
31
+ async withdrawFromWallet(withdrawData) {
32
+ return this.client.post('/api/v1/wallet/withdrawals', withdrawData);
33
+ }
34
+ async peerTransfer(transferData) {
35
+ return this.client.post('/api/v1/wallet/peer-transfer', transferData);
36
+ }
37
+ async verifyBvn(bvnData) {
38
+ return this.client.post('/api/v1/wallet/kyc/bvn', bvnData);
39
+ }
40
+ }
41
+ exports.WalletService = WalletService;
@@ -0,0 +1,8 @@
1
+ export { UserService } from './UserService';
2
+ export { WalletService } from './WalletService';
3
+ export { EvmService } from './EvmService';
4
+ export { SolanaService } from './SolanaService';
5
+ export { TransactionService } from './TransactionService';
6
+ export { AgentService } from './AgentService';
7
+ export { BillService } from './BillService';
8
+ export { ExchangeService } from './ExchangeService';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExchangeService = exports.BillService = exports.AgentService = exports.TransactionService = exports.SolanaService = exports.EvmService = exports.WalletService = exports.UserService = void 0;
4
+ var UserService_1 = require("./UserService");
5
+ Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return UserService_1.UserService; } });
6
+ var WalletService_1 = require("./WalletService");
7
+ Object.defineProperty(exports, "WalletService", { enumerable: true, get: function () { return WalletService_1.WalletService; } });
8
+ var EvmService_1 = require("./EvmService");
9
+ Object.defineProperty(exports, "EvmService", { enumerable: true, get: function () { return EvmService_1.EvmService; } });
10
+ var SolanaService_1 = require("./SolanaService");
11
+ Object.defineProperty(exports, "SolanaService", { enumerable: true, get: function () { return SolanaService_1.SolanaService; } });
12
+ var TransactionService_1 = require("./TransactionService");
13
+ Object.defineProperty(exports, "TransactionService", { enumerable: true, get: function () { return TransactionService_1.TransactionService; } });
14
+ var AgentService_1 = require("./AgentService");
15
+ Object.defineProperty(exports, "AgentService", { enumerable: true, get: function () { return AgentService_1.AgentService; } });
16
+ var BillService_1 = require("./BillService");
17
+ Object.defineProperty(exports, "BillService", { enumerable: true, get: function () { return BillService_1.BillService; } });
18
+ var ExchangeService_1 = require("./ExchangeService");
19
+ Object.defineProperty(exports, "ExchangeService", { enumerable: true, get: function () { return ExchangeService_1.ExchangeService; } });
@@ -0,0 +1,42 @@
1
+ export interface ConversationListResponseDto {
2
+ id: string;
3
+ title: string;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+ isPinned: boolean;
7
+ messageCount: number;
8
+ }
9
+ export interface ConversationMessagesResponseDto {
10
+ id: string;
11
+ role: 'user' | 'assistant' | 'system';
12
+ content: string;
13
+ createdAt: string;
14
+ }
15
+ export interface CreateConversationDto {
16
+ id: string;
17
+ }
18
+ export interface PinConversationDto {
19
+ pin: boolean;
20
+ }
21
+ export interface AgentChatRequestDto {
22
+ message: string;
23
+ conversationId: string;
24
+ }
25
+ export interface AgentChatResponseDto {
26
+ response: string;
27
+ conversationId: string;
28
+ title: string;
29
+ }
30
+ export interface AgentStreamRequestDto {
31
+ message: string;
32
+ conversationId: string;
33
+ chainId?: number;
34
+ }
35
+ export interface ChatMessageDto {
36
+ role: string;
37
+ content: string;
38
+ }
39
+ export interface GuestAgentRequestDto {
40
+ message: string;
41
+ chatHistory?: ChatMessageDto[];
42
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,118 @@
1
+ export type BillCategory = 'AIRTIME' | 'MOBILEDATA' | 'CABLEBILLS' | 'UTILITYBILLS';
2
+ export interface BillerDto {
3
+ id: number;
4
+ biller_code: string;
5
+ name: string;
6
+ default_commission: number;
7
+ date_added: string;
8
+ country: string;
9
+ is_airtime: boolean;
10
+ biller_name: string;
11
+ item_code: string;
12
+ short_name: string;
13
+ fee: number;
14
+ commission_on_fee: boolean;
15
+ reg_expression: string;
16
+ label_name: string;
17
+ amount: number;
18
+ is_resolvable: boolean;
19
+ group_name: string;
20
+ category_name: string;
21
+ is_data?: boolean;
22
+ default_commission_on_amount: number;
23
+ commission_on_fee_or_amount: number;
24
+ validity_period?: string;
25
+ }
26
+ export interface BillerItemsResponseDto {
27
+ statusCode: number;
28
+ message: string;
29
+ data: BillerDto[];
30
+ }
31
+ export interface ValidateBillDto {
32
+ itemCode: string;
33
+ customer: string;
34
+ }
35
+ export interface CreateBillScheduleDto {
36
+ executionDate: string;
37
+ isRecurring?: boolean;
38
+ recurrencePattern?: string;
39
+ }
40
+ export interface AirtimePurchaseDto {
41
+ isSchedule?: boolean;
42
+ scheduleData?: CreateBillScheduleDto;
43
+ saveBeneficiary?: boolean;
44
+ beneficiaryName?: string;
45
+ phoneNumber: string;
46
+ biller: string;
47
+ amount: number;
48
+ }
49
+ export interface DataPurchaseDto {
50
+ isSchedule?: boolean;
51
+ scheduleData?: CreateBillScheduleDto;
52
+ saveBeneficiary?: boolean;
53
+ beneficiaryName?: string;
54
+ phoneNumber: string;
55
+ biller: string;
56
+ itemCode: string;
57
+ }
58
+ export interface ElectricityPaymentDto {
59
+ isSchedule?: boolean;
60
+ scheduleData?: CreateBillScheduleDto;
61
+ saveBeneficiary?: boolean;
62
+ beneficiaryName?: string;
63
+ meterNumber: string;
64
+ amount: number;
65
+ disco: string;
66
+ }
67
+ export interface CableTvPaymentDto {
68
+ isSchedule?: boolean;
69
+ scheduleData?: CreateBillScheduleDto;
70
+ saveBeneficiary?: boolean;
71
+ beneficiaryName?: string;
72
+ smartcardNumber: string;
73
+ biller: string;
74
+ itemCode: string;
75
+ }
76
+ export interface BillPaymentDto {
77
+ id: string;
78
+ createdAt: string;
79
+ userId: string;
80
+ reference: string;
81
+ billerCode: string;
82
+ itemCode: string;
83
+ customer: string;
84
+ amount: number;
85
+ type: string;
86
+ status: string;
87
+ txRef: string;
88
+ billerName: string;
89
+ metadata?: string;
90
+ token?: string;
91
+ units?: string;
92
+ validityPeriod?: string;
93
+ }
94
+ export interface BillPaymentResponseDto {
95
+ statusCode: number;
96
+ message: string;
97
+ data: BillPaymentDto;
98
+ }
99
+ export interface BillDto {
100
+ id: string;
101
+ createdAt: string;
102
+ updatedAt: string;
103
+ deletedDate: string;
104
+ userId: string;
105
+ reference: string;
106
+ billerCode: string;
107
+ itemCode: string;
108
+ customer: string;
109
+ amount: number;
110
+ type: BillCategory;
111
+ status: 'PENDING' | 'SUCCESS' | 'FAILED';
112
+ txRef: string;
113
+ billerName: string;
114
+ validityPeriod?: string;
115
+ metadata?: string;
116
+ token?: string;
117
+ units?: string;
118
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,51 @@
1
+ export interface UserTokenBalanceDto {
2
+ contractAddress: string;
3
+ name: string;
4
+ symbol: string;
5
+ decimals: number;
6
+ logoUrl?: string;
7
+ type: 'native' | 'token';
8
+ balance: string;
9
+ balanceUSD: string;
10
+ priceUSD: string;
11
+ rawBalance: string;
12
+ network: string;
13
+ }
14
+ export interface UserEvmPortfolioDto {
15
+ userId: string;
16
+ walletAddress: string;
17
+ network: string;
18
+ totalPortfolioValueUSD: string;
19
+ nativeToken: UserTokenBalanceDto;
20
+ tokens: UserTokenBalanceDto[];
21
+ updatedAt: string;
22
+ }
23
+ export interface UserEvmPortfolioResponseDto {
24
+ statusCode: number;
25
+ message: string;
26
+ data: UserEvmPortfolioDto;
27
+ }
28
+ export interface SendNativeTokenDto {
29
+ to: string;
30
+ amount: string;
31
+ chainId: number;
32
+ }
33
+ export interface SendTokenDto {
34
+ to: string;
35
+ tokenAddress: string;
36
+ amount: string;
37
+ chainId: number;
38
+ }
39
+ export interface TransactionResponse {
40
+ txHash: string;
41
+ }
42
+ export interface SendNativeTokenResponseDto {
43
+ statusCode: number;
44
+ message: string;
45
+ data: TransactionResponse;
46
+ }
47
+ export interface SendTokenResponseDto {
48
+ statusCode: number;
49
+ message: string;
50
+ data: TransactionResponse;
51
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,47 @@
1
+ export interface SwapNativeToTokenDto {
2
+ amount: string;
3
+ tokenOut: string;
4
+ chainId: number;
5
+ }
6
+ export interface SwapTokenToTokenDto {
7
+ inputMint: string;
8
+ outputMint: string;
9
+ amount: number;
10
+ slippageBps?: number;
11
+ }
12
+ export interface SwapTokenToNativeDto {
13
+ amount: string;
14
+ tokenIn: string;
15
+ chainId: number;
16
+ }
17
+ export interface ZeroExQuoteDto {
18
+ permit2?: any;
19
+ transaction: any;
20
+ }
21
+ export interface QuoteResponseDto {
22
+ statusCode: number;
23
+ message: string;
24
+ data: ZeroExQuoteDto;
25
+ }
26
+ export interface TxHashDto {
27
+ txHash: string;
28
+ }
29
+ export interface TxHashResponseDto {
30
+ statusCode: number;
31
+ message: string;
32
+ data: TxHashDto;
33
+ }
34
+ export interface SwapSolToTokenDto {
35
+ outputMint: string;
36
+ amount: number;
37
+ slippageBps?: number;
38
+ }
39
+ export interface SwapDto {
40
+ signature: string;
41
+ txUrl: string;
42
+ }
43
+ export interface SwapResponseDto {
44
+ statusCode: number;
45
+ message: string;
46
+ data: SwapDto;
47
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ export interface MoneiConfig {
2
+ apiKey: string;
3
+ baseUrl?: string;
4
+ timeout?: number;
5
+ }
6
+ export interface ApiResponse<T> {
7
+ statusCode: number;
8
+ message: string;
9
+ data: T;
10
+ }
11
+ export interface PaginationParams {
12
+ page?: number;
13
+ limit?: number;
14
+ }
15
+ export * from "./user";
16
+ export * from "./wallet";
17
+ export * from "./agent";
18
+ export * from "./bills";
19
+ export * from "./evm";
20
+ export * from "./exchange";
21
+ export * from "./transaction";
22
+ export * from "./solana";
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./user"), exports);
18
+ __exportStar(require("./wallet"), exports);
19
+ __exportStar(require("./agent"), exports);
20
+ __exportStar(require("./bills"), exports);
21
+ __exportStar(require("./evm"), exports);
22
+ __exportStar(require("./exchange"), exports);
23
+ __exportStar(require("./transaction"), exports);
24
+ __exportStar(require("./solana"), exports);
@@ -0,0 +1,52 @@
1
+ export type SolanaNetwork = 'mainnet-beta' | 'devnet' | 'testnet';
2
+ export interface AddressDto {
3
+ address: string;
4
+ }
5
+ export interface WalletAddressResponseDto {
6
+ statusCode: number;
7
+ message: string;
8
+ data: AddressDto;
9
+ }
10
+ export interface TokenInfoDto {
11
+ mintAddress: string;
12
+ name: string;
13
+ symbol: string;
14
+ balance: string;
15
+ rawBalance: string;
16
+ decimals: number;
17
+ priceUsd: number;
18
+ valueUsd: number;
19
+ }
20
+ export interface PortfolioDto {
21
+ userId: string;
22
+ address: string;
23
+ nativeBalance: string;
24
+ nativeBalanceLamports: string;
25
+ nativeBalanceUsd: number;
26
+ tokens: TokenInfoDto[];
27
+ totalValueUsd: number;
28
+ }
29
+ export interface PortfolioResponseDto {
30
+ statusCode: number;
31
+ message: string;
32
+ data: PortfolioDto;
33
+ }
34
+ export interface TransferSolDto {
35
+ to: string;
36
+ amount: string;
37
+ network?: SolanaNetwork;
38
+ }
39
+ export interface TransferTokenDto {
40
+ to: string;
41
+ tokenMintAddress: string;
42
+ amount: string;
43
+ network?: SolanaNetwork;
44
+ }
45
+ export interface SignatureDto {
46
+ signature: string;
47
+ }
48
+ export interface SignatureResponseDto {
49
+ statusCode: number;
50
+ message: string;
51
+ data: SignatureDto;
52
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });