Skip to content

Commit

Permalink
Create wallet.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 27, 2024
1 parent a9fa8fc commit 81e4ab0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pi-nexus-sdk/lib/utils/wallet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Api } from './api';

class Wallet {
constructor(apiUrl, apiKey) {
this.apiUrl = apiUrl;
this.apiKey = apiKey;
this.api = new Api(apiUrl, apiKey);
}

async getWallets() {
return this.api.get('/v1/wallets');
}

async getWallet(walletId) {
return this.api.get(`/v1/wallets/${walletId}`);
}

async createWallet(walletData) {
return this.api.post('/v1/wallets', walletData);
}
}

export default Wallet;

0 comments on commit 81e4ab0

Please sign in to comment.