Skip to content

Commit de81a99

Browse files
committed
Generating docs with updated urls
1 parent d660c58 commit de81a99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+579
-1094
lines changed

packages/account/docs/classes/account.md

+15-109
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,9 @@
3737

3838
### constructor
3939

40-
⊕ **new Account**(data?: _`any`_): [Account](account.md)
40+
⊕ **new Account**(data: _`any`_): [Account](account.md)
4141

42-
_Defined in [index.ts:41](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L41)_
43-
44-
Creates a new account object
45-
46-
```
47-
var data = [
48-
'0x02', //nonce
49-
'0x0384', //balance
50-
'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', //stateRoot
51-
'0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470', //codeHash
52-
]
53-
54-
var data = {
55-
nonce: '',
56-
balance: '0x03e7',
57-
stateRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
58-
codeHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470',
59-
}
60-
61-
const account = new Account(data)
62-
```
42+
_Defined in [index.ts:41](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L41)_
6343

6444
**Parameters:**
6545

@@ -79,9 +59,7 @@ const account = new Account(data)
7959

8060
**● balance**: _`Buffer`_
8161

82-
_Defined in [index.ts:31](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L31)_
83-
84-
The account's balance in wei.
62+
_Defined in [index.ts:31](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L31)_
8563

8664
---
8765

@@ -91,9 +69,7 @@ The account's balance in wei.
9169

9270
**● codeHash**: _`Buffer`_
9371

94-
_Defined in [index.ts:41](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L41)_
95-
96-
The hash of the code of the contract.
72+
_Defined in [index.ts:41](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L41)_
9773

9874
---
9975

@@ -103,9 +79,7 @@ The hash of the code of the contract.
10379

10480
**● nonce**: _`Buffer`_
10581

106-
_Defined in [index.ts:26](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L26)_
107-
108-
The account's nonce.
82+
_Defined in [index.ts:26](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L26)_
10983

11084
---
11185

@@ -115,9 +89,7 @@ The account's nonce.
11589

11690
**● stateRoot**: _`Buffer`_
11791

118-
_Defined in [index.ts:36](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L36)_
119-
120-
The stateRoot for the storage of the contract.
92+
_Defined in [index.ts:36](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L36)_
12193

12294
---
12395

@@ -129,9 +101,7 @@ The stateRoot for the storage of the contract.
129101

130102
▸ **getCode**(trie: _`Trie`_, cb: _`TrieGetCb`_): `void`
131103

132-
_Defined in [index.ts:116](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L116)_
133-
134-
Fetches the code from the trie.
104+
_Defined in [index.ts:116](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L116)_
135105

136106
**Parameters:**
137107

@@ -150,9 +120,7 @@ Fetches the code from the trie.
150120

151121
▸ **getStorage**(trie: _`Trie`_, key: _`Buffer` \| `string`_, cb: _`TrieGetCb`_): `void`
152122

153-
_Defined in [index.ts:179](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L179)_
154-
155-
Fetches `key` from the account's storage.
123+
_Defined in [index.ts:179](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L179)_
156124

157125
**Parameters:**
158126

@@ -172,9 +140,7 @@ Fetches `key` from the account's storage.
172140

173141
▸ **isContract**(): `boolean`
174142

175-
_Defined in [index.ts:107](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L107)_
176-
177-
Returns a `Boolean` deteremining if the account is a contract.
143+
_Defined in [index.ts:107](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L107)_
178144

179145
**Returns:** `boolean`
180146

@@ -186,9 +152,7 @@ Returns a `Boolean` deteremining if the account is a contract.
186152

187153
▸ **isEmpty**(): `boolean`
188154

189-
_Defined in [index.ts:232](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L232)_
190-
191-
Returns a `Boolean` determining if the account is empty.
155+
_Defined in [index.ts:232](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L232)_
192156

193157
**Returns:** `boolean`
194158

@@ -200,9 +164,7 @@ Returns a `Boolean` determining if the account is empty.
200164

201165
▸ **serialize**(): `Buffer`
202166

203-
_Defined in [index.ts:99](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L99)_
204-
205-
Returns the RLP serialization of the account as a `Buffer`.
167+
_Defined in [index.ts:99](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L99)_
206168

207169
**Returns:** `Buffer`
208170

@@ -214,36 +176,7 @@ Returns the RLP serialization of the account as a `Buffer`.
214176

215177
▸ **setCode**(trie: _`Trie`_, code: _`Buffer`_, cb: _`function`_): `void`
216178

217-
_Defined in [index.ts:160](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L160)_
218-
219-
Stores the code in the trie.
220-
221-
```
222-
// Requires manual merkle-patricia-tree install
223-
const SecureTrie = require('merkle-patricia-tree/secure')
224-
const Account = require('./index.js').default
225-
226-
let code = Buffer.from(
227-
'73095e7baea6a6c7c4c2dfeb977efac326af552d873173095e7baea6a6c7c4c2dfeb977efac326af552d873157',
228-
'hex',
229-
)
230-
231-
let raw = {
232-
nonce: '',
233-
balance: '0x03e7',
234-
stateRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
235-
codeHash: '0xb30fb32201fe0486606ad451e1a61e2ae1748343cd3d411ed992ffcc0774edd4',
236-
}
237-
let account = new Account(raw)
238-
let trie = new SecureTrie()
239-
240-
account.setCode(trie, code, function(err, codeHash) {
241-
console.log(`Code with hash 0x${codeHash.toString('hex')} set to trie`)
242-
account.getCode(trie, function(err, code) {
243-
console.log(`Code ${code.toString('hex')} read from trie`)
244-
})
245-
})
246-
```
179+
_Defined in [index.ts:160](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L160)_
247180

248181
**Parameters:**
249182

@@ -261,36 +194,9 @@ account.setCode(trie, code, function(err, codeHash) {
261194

262195
### setStorage
263196

264-
▸ **setStorage**(trie: _`Trie`_, key: _`Buffer` \| `string`_, val: _`Buffer` \| `string`_, cb: _`function`_): `void`
265-
266-
_Defined in [index.ts:218](https://github.com/ethereumjs/ethereumjs-account/blob/be66a6a/src/index.ts#L218)_
267-
268-
Stores a `val` at the `key` in the contract's storage.
269-
270-
Example for `getStorage` and `setStorage`:
271-
272-
```
273-
// Requires manual merkle-patricia-tree install
274-
const SecureTrie = require('merkle-patricia-tree/secure')
275-
const Account = require('./index.js').default
276-
277-
let raw = {
278-
nonce: '',
279-
balance: '0x03e7',
280-
stateRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
281-
codeHash: '0xb30fb32201fe0486606ad451e1a61e2ae1748343cd3d411ed992ffcc0774edd4',
282-
}
283-
let account = new Account(raw)
284-
let trie = new SecureTrie()
285-
let key = Buffer.from('0000000000000000000000000000000000000000', 'hex')
286-
let value = Buffer.from('01', 'hex')
197+
▸ **setStorage**(trie: _`Trie`_, key: _`Buffer` \| `string`_, val: _`Buffer` \| `string`_, cb: _`TriePutCb`_): `void`
287198

288-
account.setStorage(trie, key, value, function(err, value) {
289-
account.getStorage(trie, key, function(err, value) {
290-
console.log(`Value ${value.toString('hex')} set and retrieved from trie.`)
291-
})
292-
})
293-
```
199+
_Defined in [index.ts:218](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/account/src/index.ts#L218)_
294200

295201
**Parameters:**
296202

@@ -299,7 +205,7 @@ account.setStorage(trie, key, value, function(err, value) {
299205
| trie | `Trie` | \- |
300206
| key | `Buffer` \| `string` | \- |
301207
| val | `Buffer` \| `string` | \- |
302-
| cb | `function` | |
208+
| cb | `TriePutCb` | |
303209

304210
**Returns:** `void`
305211

packages/block/docs/README.md

+6-14
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535

3636
**Ƭ BufferLike**: _`Buffer` \| [TransformableToBuffer](interfaces/transformabletobuffer.md) \| [PrefixedHexString](#prefixedhexstring) \| `number`_
3737

38-
_Defined in [types.ts:42](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/types.ts#L42)_
39-
40-
A Buffer, hex string prefixed with `0x`, Number, or an object with a toBuffer method such as BN.
38+
_Defined in [types.ts:42](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/block/src/types.ts#L42)_
4139

4240
---
4341

@@ -47,9 +45,7 @@ A Buffer, hex string prefixed with `0x`, Number, or an object with a toBuffer me
4745

4846
**Ƭ PrefixedHexString**: _`string`_
4947

50-
_Defined in [types.ts:37](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/types.ts#L37)_
51-
52-
A hex string prefixed with `0x`.
48+
_Defined in [types.ts:37](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/block/src/types.ts#L37)_
5349

5450
---
5551

@@ -59,11 +55,9 @@ A hex string prefixed with `0x`.
5955

6056
### blockFromRpc
6157

62-
▸ **blockFromRpc**(blockParams: _`any`_, uncles?: _`any`[]_, chainOptions?: _[ChainOptions](interfaces/chainoptions.md)_): [Block](classes/block.md)
58+
▸ **blockFromRpc**(blockParams: _`any`_, uncles: _`any`[]_, chainOptions: _[ChainOptions](interfaces/chainoptions.md)_): [Block](classes/block.md)
6359

64-
_Defined in [from-rpc.ts:14](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/from-rpc.ts#L14)_
65-
66-
Creates a new block object from Ethereum JSON RPC.
60+
_Defined in [from-rpc.ts:14](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/block/src/from-rpc.ts#L14)_
6761

6862
**Parameters:**
6963

@@ -81,11 +75,9 @@ Creates a new block object from Ethereum JSON RPC.
8175

8276
### blockHeaderFromRpc
8377

84-
▸ **blockHeaderFromRpc**(blockParams: _`any`_, chainOptions?: _[ChainOptions](interfaces/chainoptions.md)_): [BlockHeader](classes/blockheader.md)
85-
86-
_Defined in [header-from-rpc.ts:11](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/header-from-rpc.ts#L11)_
78+
▸ **blockHeaderFromRpc**(blockParams: _`any`_, chainOptions: _[ChainOptions](interfaces/chainoptions.md)_): [BlockHeader](classes/blockheader.md)
8779

88-
Creates a new block header object from Ethereum JSON RPC.
80+
_Defined in [header-from-rpc.ts:11](https://github.com/ethereumjs/ethereumjs-vm/blob/d660c58/packages/block/src/header-from-rpc.ts#L11)_
8981

9082
**Parameters:**
9183

0 commit comments

Comments
 (0)