File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
- import { Account } from '@solana/web3.js'
1
+ import { Keypair } from '@solana/web3.js'
2
2
import nacl from 'tweetnacl' ;
3
3
import * as bip39 from 'bip39'
4
4
import base58 from 'bs58'
@@ -41,7 +41,7 @@ export async function sign(account, message) {
41
41
}
42
42
43
43
export async function new_account ( { path = "m/44'/60'/0'/0/0" } = { } ) {
44
- let account = new Account ( )
44
+ let account = new Keypair ( )
45
45
console . log ( account )
46
46
return import_account ( {
47
47
'private_key' : base58 . encode ( account . secretKey )
@@ -74,7 +74,7 @@ export async function import_account({
74
74
75
75
let wallet = null
76
76
if ( private_key !== null ) {
77
- wallet = new Account ( base58 . decode ( private_key ) )
77
+ wallet = Keypair . fromSecretKey ( base58 . decode ( private_key ) )
78
78
}
79
79
return await _from_wallet ( wallet , name )
80
80
}
You can’t perform that action at this time.
0 commit comments