@ensdomains/ensjs 3.0.0-alpha.32 → 3.0.0-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ensdomains/ensjs",
3
- "version": "3.0.0-alpha.32",
3
+ "version": "3.0.0-alpha.33",
4
4
  "description": "ENS javascript library for contract interaction",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -52,7 +52,7 @@
52
52
  "author": "TateB <yo@taytems.xyz>",
53
53
  "license": "MIT",
54
54
  "dependencies": {
55
- "@ensdomains/address-encoder": "0.2.16",
55
+ "@ensdomains/address-encoder": "^0.2.18",
56
56
  "@ensdomains/content-hash": "^2.5.7",
57
57
  "@ensdomains/dnsprovejs": "^0.4.1",
58
58
  "@ensdomains/dnssecoraclejs": "^0.2.7",
@@ -66,7 +66,7 @@
66
66
  "devDependencies": {
67
67
  "@ensdomains/buffer": "^0.0.13",
68
68
  "@ensdomains/ens-contracts": "^0.0.15",
69
- "@ensdomains/ens-test-env": "0.3.3",
69
+ "@ensdomains/ens-test-env": "0.3.5",
70
70
  "@ethersproject/abi": "^5.6.0",
71
71
  "@ethersproject/providers": "^5.6.2",
72
72
  "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers",
@@ -52,7 +52,7 @@ describe('getProfile', () => {
52
52
  it('should return a profile object with specified records', async () => {
53
53
  const result = await ensInstance.getProfile(
54
54
  '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
55
- { texts: ['description', 'url'], coinTypes: ['ETC', '0'] },
55
+ { texts: ['description', 'url'], coinTypes: ['ETC_LEGACY', '0'] },
56
56
  )
57
57
  expect(result).toBeDefined()
58
58
  if (result) {
@@ -86,7 +86,7 @@ describe('getProfile', () => {
86
86
  it('should return a profile object with specified records', async () => {
87
87
  const result = await ensInstance.getProfile('with-profile.eth', {
88
88
  texts: ['description', 'url'],
89
- coinTypes: ['ETC', '0'],
89
+ coinTypes: ['ETC_LEGACY', '0'],
90
90
  })
91
91
  expect((result as any).address).toBe(
92
92
  '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
@@ -55,21 +55,21 @@ describe('getSpecificRecord', () => {
55
55
  expect((result as any).addr).toBe(
56
56
  '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
57
57
  )
58
- expect((result as any).coin).toBe('ETC')
58
+ expect((result as any).coin).toBe('ETC_LEGACY')
59
59
  })
60
60
  it('should return the correct address based on a coin ID input as a string', async () => {
61
61
  const result = await ensInstance.getAddr('with-profile.eth', '61')
62
62
  expect((result as any).addr).toBe(
63
63
  '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
64
64
  )
65
- expect((result as any).coin).toBe('ETC')
65
+ expect((result as any).coin).toBe('ETC_LEGACY')
66
66
  })
67
67
  it('should return the correct address based on a coin name', async () => {
68
- const result = await ensInstance.getAddr('with-profile.eth', 'ETC')
68
+ const result = await ensInstance.getAddr('with-profile.eth', 'ETC_LEGACY')
69
69
  expect((result as any).addr).toBe(
70
70
  '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
71
71
  )
72
- expect((result as any).coin).toBe('ETC')
72
+ expect((result as any).coin).toBe('ETC_LEGACY')
73
73
  })
74
74
  it('should return null for a non-existent coin', async () => {
75
75
  const result = await ensInstance.getAddr('with-profile.eth', 'BNB')
@@ -45,7 +45,7 @@ describe('setRecord', () => {
45
45
  const tx = await ensInstance.setRecord('test123.eth', {
46
46
  type: 'addr',
47
47
  record: {
48
- key: 'ETC',
48
+ key: 'ETC_LEGACY',
49
49
  value: '0x42D63ae25990889E35F215bC95884039Ba354115',
50
50
  },
51
51
  addressOrIndex: 1,
@@ -19,7 +19,10 @@ describe('setRecords', () => {
19
19
  const tx = await ensInstance.setRecords('test123.eth', {
20
20
  records: {
21
21
  coinTypes: [
22
- { key: 'ETC', value: '0x42D63ae25990889E35F215bC95884039Ba354115' },
22
+ {
23
+ key: 'ETC_LEGACY',
24
+ value: '0x42D63ae25990889E35F215bC95884039Ba354115',
25
+ },
23
26
  ],
24
27
  texts: [{ key: 'foo', value: 'bar' }],
25
28
  },