// Create an Account instance with a public key string -> Account with AccountKeyPublic
> caver.account.create('0x{address in hex}', '0x034f1...')
_address: '0xc771822ad361898a330df0169f2382ee92f6286d',
_accountKey: AccountKeyPublic { _publicKey: '0x034f1...' }
// Create an Account instance with an array of public keys -> Account with AccountKeyWeightedMultiSig
> caver.account.create('0x{address in hex}', ['0x034f1...', '0xfe4b8...'])
_address: '0xc771822ad361898a330df0169f2382ee92f6286d',
AccountKeyWeightedMultiSig {
WeightedPublicKey { _weight: 1, _publicKey: '0x034f1...' },
WeightedPublicKey { _weight: 1, _publicKey: '0xfe4b8...' }
// Create an Account instance with an array of public keys with WeightedMultiSigOptions -> Account with AccountKeyWeightedMultiSig
> const options = new caver.account.weightedMultiSigOptions(2, [1, 1])
> caver.account.create('0x{address in hex}', ['0x034f1...', '0xfe4b8...'], options)
_address: '0xc771822ad361898a330df0169f2382ee92f6286d',
AccountKeyWeightedMultiSig {
WeightedPublicKey { _weight: 1, _publicKey: '0x034f1...' },
WeightedPublicKey { _weight: 1, _publicKey: '0xfe4b8...' }
// Create an Account instance with an array in which keys to be used for each role are defined as an array -> Account with AccountKeyRoleBased
['0xd8510...', '0xaa105...'],
['0xd8510...', '0xceeee...']
> caver.account.create('0x{address in hex}', publicKeys)
_address: '0xc771822ad361898a330df0169f2382ee92f6286d',
AccountKeyWeightedMultiSig {
WeightedPublicKey { _weight: 1, _publicKey: '0xd8510...' },
WeightedPublicKey { _weight: 1, _publicKey: '0xaa105...' }
AccountKeyPublic { _publicKey: '0xd8510...' },
AccountKeyWeightedMultiSig {
WeightedPublicKey { _weight: 1, _publicKey: '0xd8510...' },
WeightedPublicKey { _weight: 1, _publicKey: '0xceeee...' }
// Create an Account instance with an array in which keys to be used for each role are defined as an array with an array of WeightedMultiSigOptions -> Account with AccountKeyRoleBased
['0xd8510...', '0xaa105...'],
['0xd8510...', '0xceeee...']
new caver.account.weightedMultiSigOptions(2, [1, 1]),
new caver.account.weightedMultiSigOptions(),
new caver.account.weightedMultiSigOptions(3, [1, 2])
> caver.account.create('0x{address in hex}', publicKeys, options)
_address: '0xc771822ad361898a330df0169f2382ee92f6286d',
AccountKeyWeightedMultiSig {
WeightedPublicKey { _weight: 1, _publicKey: '0xd8510...' },
WeightedPublicKey { _weight: 1, _publicKey: '0xaa105...' }
AccountKeyPublic { _publicKey: '0xd8510...' },
AccountKeyWeightedMultiSig {
WeightedPublicKey { _weight: 1, _publicKey: '0xd8510...' },
WeightedPublicKey { _weight: 2, _publicKey: '0xceeee...' }