You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import ECDSA from '../ECDSA';
  2. import { Transaction } from '../models/transactions';
  3. declare class Wallet {
  4. readonly publicKey: string;
  5. readonly privateKey: string;
  6. readonly classicAddress: string;
  7. readonly seed?: string;
  8. constructor(publicKey: string, privateKey: string, opts?: {
  9. masterAddress?: string;
  10. seed?: string;
  11. });
  12. get address(): string;
  13. static generate(algorithm?: ECDSA): Wallet;
  14. static fromSeed(seed: string, opts?: {
  15. masterAddress?: string;
  16. algorithm?: ECDSA;
  17. }): Wallet;
  18. static fromSecret: typeof Wallet.fromSeed;
  19. static fromEntropy(entropy: Uint8Array | number[], opts?: {
  20. masterAddress?: string;
  21. algorithm?: ECDSA;
  22. }): Wallet;
  23. static fromMnemonic(mnemonic: string, opts?: {
  24. masterAddress?: string;
  25. derivationPath?: string;
  26. mnemonicEncoding?: 'bip39' | 'rfc1751';
  27. algorithm?: ECDSA;
  28. }): Wallet;
  29. private static fromRFC1751Mnemonic;
  30. private static deriveWallet;
  31. sign(this: Wallet, transaction: Transaction, multisign?: boolean | string): {
  32. tx_blob: string;
  33. hash: string;
  34. };
  35. verifyTransaction(signedTransaction: Transaction | string): boolean;
  36. getXAddress(tag?: number | false, isTestnet?: boolean): string;
  37. private checkTxSerialization;
  38. }
  39. export default Wallet;
  40. //# sourceMappingURL=index.d.ts.map