@weblock-wallet/sdk 0.1.29 → 0.1.31
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/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -422,7 +422,7 @@ declare class WeBlockSDK {
|
|
|
422
422
|
signOut: () => Promise<void>;
|
|
423
423
|
};
|
|
424
424
|
readonly wallet: {
|
|
425
|
-
getInfo: () => Promise<WalletInfo>;
|
|
425
|
+
getInfo: (str: string) => Promise<WalletInfo>;
|
|
426
426
|
onWalletUpdate: (callback: (wallet: WalletInfo) => void) => (() => void);
|
|
427
427
|
onTransactionUpdate: (callback: (tx: Transaction | undefined) => void) => (() => void);
|
|
428
428
|
getBalance: (address: string, chainId: number) => Promise<TokenBalance>;
|
package/dist/index.d.ts
CHANGED
|
@@ -422,7 +422,7 @@ declare class WeBlockSDK {
|
|
|
422
422
|
signOut: () => Promise<void>;
|
|
423
423
|
};
|
|
424
424
|
readonly wallet: {
|
|
425
|
-
getInfo: () => Promise<WalletInfo>;
|
|
425
|
+
getInfo: (str: string) => Promise<WalletInfo>;
|
|
426
426
|
onWalletUpdate: (callback: (wallet: WalletInfo) => void) => (() => void);
|
|
427
427
|
onTransactionUpdate: (callback: (tx: Transaction | undefined) => void) => (() => void);
|
|
428
428
|
getBalance: (address: string, chainId: number) => Promise<TokenBalance>;
|
package/dist/index.js
CHANGED
|
@@ -106083,9 +106083,9 @@ var WalletModule = class {
|
|
|
106083
106083
|
this.options = options;
|
|
106084
106084
|
this.core = core;
|
|
106085
106085
|
}
|
|
106086
|
-
async getInfo() {
|
|
106086
|
+
async getInfo(str) {
|
|
106087
106087
|
try {
|
|
106088
|
-
console.log("1. \uB85C\uADF8\uC778 \uC0C1\uD0DC \uD655\uC778 \uC2DC\uC791");
|
|
106088
|
+
console.log("1. \uB85C\uADF8\uC778 \uC0C1\uD0DC \uD655\uC778 \uC2DC\uC791: ", str);
|
|
106089
106089
|
const isLoggedIn = await this.core.auth.isLoggedIn();
|
|
106090
106090
|
console.log("\uB85C\uADF8\uC778 \uC0C1\uD0DC:", isLoggedIn);
|
|
106091
106091
|
if (!isLoggedIn) {
|
|
@@ -106125,6 +106125,12 @@ var WalletModule = class {
|
|
|
106125
106125
|
network.chainId
|
|
106126
106126
|
);
|
|
106127
106127
|
console.log("\uB124\uC774\uD2F0\uBE0C \uD1A0\uD070 \uC794\uC561:", nativeBalance);
|
|
106128
|
+
const tokenBalance = await this.core.wallet.getTokenBalance(
|
|
106129
|
+
"0x6fa62Eda03956ef4E54f3C8597E8c3f3bE40A45B",
|
|
106130
|
+
"0x57a0799F04246DC7119AEd7c64fD2675b769FEff",
|
|
106131
|
+
network.chainId
|
|
106132
|
+
);
|
|
106133
|
+
console.log(">>>> tokenBalance: ", tokenBalance);
|
|
106128
106134
|
console.log("5. \uCD5C\uADFC \uD2B8\uB79C\uC7AD\uC158 \uC870\uD68C \uC2DC\uC791");
|
|
106129
106135
|
const latestTransaction = await this.core.wallet.getLatestTransaction(
|
|
106130
106136
|
address,
|
|
@@ -106333,8 +106339,8 @@ var WeBlockSDK = class {
|
|
|
106333
106339
|
}
|
|
106334
106340
|
};
|
|
106335
106341
|
this.wallet = {
|
|
106336
|
-
getInfo: async () => {
|
|
106337
|
-
return this.walletModule.getInfo();
|
|
106342
|
+
getInfo: async (str) => {
|
|
106343
|
+
return this.walletModule.getInfo(str);
|
|
106338
106344
|
},
|
|
106339
106345
|
onWalletUpdate: (callback) => {
|
|
106340
106346
|
return this.walletModule.onWalletUpdate(callback);
|