Skip to content

Commit ae0393a

Browse files
Merge pull request #55 from fileverse/update-interfaces-core
Update Interfaces
2 parents adeeed0 + 851baef commit ae0393a

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

.changeset/yellow-socks-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@fileverse/heartbit-core": minor
3+
---
4+
5+
Updated Interfaces

packages/heartbit-core/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ async function main() {
6161
const totalSupply = await coreSDK.getTotalHeartBitCountByHash({ hash });
6262

6363
// Get Total Mints By User
64-
const address = "0x...ethaddress";
64+
const account = "0x...ethaddress";
6565
const mintsByUser = await coreSDK.getHeartBitByUser({
6666
hash,
67-
address,
67+
account,
6868
});
6969
}
7070
```
@@ -81,15 +81,15 @@ async function main() {
8181
const endTime = 1706898251;
8282
const hash = "ipfs://cid"; // unique identifier for token. eg ipfs://somecid
8383
const apiKey = "hello";
84-
const address = "0x...ethaddress";
84+
const account = "0x...ethaddress";
8585

8686
// Mint HeartBit
8787

8888
await coreSDK.unSignedMintHeartBit({
8989
startTime,
9090
endTime,
9191
hash,
92-
account: address,
92+
account,
9393
apiKey,
9494
});
9595

@@ -100,7 +100,7 @@ async function main() {
100100
// Get Total Mints By User
101101
const mintsByUser = await coreSDK.getHeartBitByUser({
102102
hash,
103-
address,
103+
account,
104104
});
105105
}
106106
```
@@ -121,7 +121,7 @@ interface TotalHeartBitCountArgs {
121121

122122
interface HeartBitCountByUserArgs {
123123
hash: string; // unique identifier for token. eg ipfs://somecid
124-
address: string; // ethereum wallet address
124+
account: string; // ethereum wallet address
125125
}
126126

127127
interface MintHeartBitArgs {

packages/heartbit-core/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ export class HeartBitCore {
8484
}
8585

8686
async getHeartBitByUser(opts: HeartBitCountByUserArgs): Promise<number> {
87-
const { address, hash } = opts;
87+
const { account, hash } = opts;
8888
const tokenId = await this.getHeartbitHashTokenMap(hash);
8989

90-
const balance = await this.#contract.balanceOf?.(address, tokenId);
90+
const balance = await this.#contract.balanceOf?.(account, tokenId);
9191
return parseInt(balance);
9292
}
9393
}

packages/heartbit-core/src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface TotalHeartBitCountArgs {
3333

3434
export interface HeartBitCountByUserArgs {
3535
hash: string;
36-
address: string;
36+
account: string;
3737
}
3838

3939
export interface HeartBitCoreOptions {

0 commit comments

Comments
 (0)