Skip to content

Commit 302889b

Browse files
committed
style(addresses): [refactor] Few minor fixes
1 parent c75d57d commit 302889b

File tree

3 files changed

+87
-87
lines changed

3 files changed

+87
-87
lines changed

docs/api.md

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Retrieves information about the specified address: network(s) and blockchain(s)
146146
##### Examples
147147

148148
```javascript
149-
const info = await web3data.address.getInfo('0x06012c8cf97bead5deae237070f9587f8e7a266d')
149+
const info = await web3data.address.getInformation('0x06012c8cf97bead5deae237070f9587f8e7a266d')
150150
```
151151

152152

@@ -1051,6 +1051,89 @@ const code = await web3data.contract.getCode('0x06012c8cf97bead5deae237070f9587f
10511051

10521052

10531053

1054+
### src/signature.js
1055+
1056+
1057+
1058+
#### Class: Signature
1059+
1060+
1061+
Contains methods pertaining to the `/signatures` endpoint of Amberdata's API.
1062+
1063+
1064+
1065+
1066+
1067+
1068+
1069+
1070+
1071+
#### constructor(web3data)
1072+
1073+
1074+
Creates an instance of Signature.
1075+
1076+
1077+
1078+
1079+
##### Parameters
1080+
1081+
| Name | Type | Description | |
1082+
| ---- | ---- | ----------- | -------- |
1083+
| web3data | | The web3data instance. |   |
1084+
1085+
1086+
1087+
1088+
##### Examples
1089+
1090+
```javascript
1091+
1092+
```
1093+
1094+
1095+
##### Returns
1096+
1097+
1098+
- `Void`
1099+
1100+
1101+
1102+
1103+
1104+
#### getSignature(hash)
1105+
1106+
1107+
Retrieves detailed information about the specified signature hash.
1108+
1109+
1110+
1111+
1112+
##### Parameters
1113+
1114+
| Name | Type | Description | |
1115+
| ---- | ---- | ----------- | -------- |
1116+
| hash | | The (keccak 256) of the signature. |   |
1117+
1118+
1119+
1120+
1121+
##### Examples
1122+
1123+
```javascript
1124+
const signatureDetails = await web3data.signature.getSignature('0xe2f0a05a')
1125+
```
1126+
1127+
1128+
##### Returns
1129+
1130+
1131+
- Information pertaining to the specified signature hash.
1132+
1133+
1134+
1135+
1136+
10541137
### src/market.js
10551138

10561139

@@ -1500,89 +1583,6 @@ const batTokenAddress = web3data.market.getAssetAddresses('bat') const assetAddr
15001583

15011584

15021585

1503-
### src/signature.js
1504-
1505-
1506-
1507-
#### Class: Signature
1508-
1509-
1510-
Contains methods pertaining to the `/signatures` endpoint of Amberdata's API.
1511-
1512-
1513-
1514-
1515-
1516-
1517-
1518-
1519-
1520-
#### constructor(web3data)
1521-
1522-
1523-
Creates an instance of Signature.
1524-
1525-
1526-
1527-
1528-
##### Parameters
1529-
1530-
| Name | Type | Description | |
1531-
| ---- | ---- | ----------- | -------- |
1532-
| web3data | | The web3data instance. |   |
1533-
1534-
1535-
1536-
1537-
##### Examples
1538-
1539-
```javascript
1540-
1541-
```
1542-
1543-
1544-
##### Returns
1545-
1546-
1547-
- `Void`
1548-
1549-
1550-
1551-
1552-
1553-
#### getSignature(hash)
1554-
1555-
1556-
Retrieves detailed information about the specified signature hash.
1557-
1558-
1559-
1560-
1561-
##### Parameters
1562-
1563-
| Name | Type | Description | |
1564-
| ---- | ---- | ----------- | -------- |
1565-
| hash | | The (keccak 256) of the signature. |   |
1566-
1567-
1568-
1569-
1570-
##### Examples
1571-
1572-
```javascript
1573-
const signatureDetails = await web3data.signature.getSignature('0xe2f0a05a')
1574-
```
1575-
1576-
1577-
##### Returns
1578-
1579-
1580-
- Information pertaining to the specified signature hash.
1581-
1582-
1583-
1584-
1585-
15861586
### src/token.js
15871587

15881588

src/address.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Address {
6868
* @param {object} [filterOptions] - The filter options associated with the request. See [docs](https://docs.amberdata.io/reference#get-account-information) for more details.
6969
* @returns {Promise<object>} The information about the specified address.
7070
* @example
71-
* const info = await web3data.address.getInfo('0x06012c8cf97bead5deae237070f9587f8e7a266d')
71+
* const info = await web3data.address.getInformation('0x06012c8cf97bead5deae237070f9587f8e7a266d')
7272
*/
7373
getInformation(hash, filterOptions = {}) {
7474
throwIf(is.notHash(hash), NO_ADDRESS)

test/contract.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ test('throws exception when calling getFunctions without hash', async t => {
4444

4545
/*********** Test getSecurityAudit() ***********/
4646
test('Successfully calls getSecurityAudit', async t => {
47-
const audit = await t.context.web3data.contract.getAudit(TOKEN_ADDRESS);
47+
const audit = await t.context.web3data.contract.getSecurityAudit(TOKEN_ADDRESS);
4848
t.true(audit.hasProp('issues'))
4949
});
5050
test('throws exception when calling getAudit without hash', async t => {
5151
await t.throwsAsync(async () => {
52-
await t.context.web3data.contract.getAudit()
52+
await t.context.web3data.contract.getSecurityAudit()
5353
}, { instanceOf: Error, message: 'No contract address supplied' });
5454
});
5555

0 commit comments

Comments
 (0)