@weblock-wallet/sdk 0.1.40 → 0.1.41

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.d.cts CHANGED
@@ -426,6 +426,22 @@ declare class WeBlockSDK {
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>;
429
+ investUsdtForRbt10to1: (opts: {
430
+ usdtAddress: string;
431
+ rbtAddress: string;
432
+ treasuryAddress: string;
433
+ amountUsdt: string;
434
+ chainId: number;
435
+ recipient?: string;
436
+ mode?: "direct" | "backend";
437
+ }) => Promise<{
438
+ usdtApproveTxHash?: string;
439
+ usdtTransferTxHash: string;
440
+ rbtMintTxHash?: string;
441
+ rbtAmountRaw: string;
442
+ rbtAmountHuman: string;
443
+ note: string;
444
+ }>;
429
445
  getTransactionCount: (address: string, chainId: number) => Promise<number>;
430
446
  getBlockNumber: (chainId: number) => Promise<number>;
431
447
  sendRawTransaction: (signedTx: string, chainId: number) => Promise<string>;
package/dist/index.d.ts CHANGED
@@ -426,6 +426,22 @@ declare class WeBlockSDK {
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>;
429
+ investUsdtForRbt10to1: (opts: {
430
+ usdtAddress: string;
431
+ rbtAddress: string;
432
+ treasuryAddress: string;
433
+ amountUsdt: string;
434
+ chainId: number;
435
+ recipient?: string;
436
+ mode?: "direct" | "backend";
437
+ }) => Promise<{
438
+ usdtApproveTxHash?: string;
439
+ usdtTransferTxHash: string;
440
+ rbtMintTxHash?: string;
441
+ rbtAmountRaw: string;
442
+ rbtAmountHuman: string;
443
+ note: string;
444
+ }>;
429
445
  getTransactionCount: (address: string, chainId: number) => Promise<number>;
430
446
  getBlockNumber: (chainId: number) => Promise<number>;
431
447
  sendRawTransaction: (signedTx: string, chainId: number) => Promise<string>;
package/dist/index.js CHANGED
@@ -106582,6 +106582,9 @@ var WeBlockSDK = class {
106582
106582
  getBalance: (address, chainId) => {
106583
106583
  return this.walletModule.getBalance(address, chainId);
106584
106584
  },
106585
+ investUsdtForRbt10to1: async (opts) => {
106586
+ return this.walletModule.investUsdtForRbt10to1(opts);
106587
+ },
106585
106588
  getTransactionCount: (address, chainId) => {
106586
106589
  return this.walletModule.getTransactionCount(address, chainId);
106587
106590
  },