@autonomys/auto-utils 1.5.11 → 1.5.13
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/README.md +6 -6
- package/dist/api.d.ts +9 -9
- package/dist/api.js +9 -9
- package/dist/constants/network.d.ts +0 -2
- package/dist/constants/network.d.ts.map +1 -1
- package/dist/constants/network.js +3 -20
- package/dist/constants/wallet.d.ts +0 -1
- package/dist/constants/wallet.d.ts.map +1 -1
- package/dist/constants/wallet.js +1 -2
- package/dist/network.d.ts +20 -20
- package/dist/network.js +20 -20
- package/dist/string.d.ts +1 -1
- package/dist/string.js +1 -1
- package/dist/wallet.d.ts +1 -1
- package/dist/wallet.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ import { activateWallet } from '@autonomys/auto-utils'
|
|
|
70
70
|
// Activate the wallet
|
|
71
71
|
const { api, accounts } = await activateWallet({
|
|
72
72
|
mnemonic,
|
|
73
|
-
networkId: '
|
|
73
|
+
networkId: 'mainnet', // Optional: specify the network ID
|
|
74
74
|
})
|
|
75
75
|
|
|
76
76
|
const account = accounts[0]
|
|
@@ -121,7 +121,7 @@ Create mock wallets for testing purposes:
|
|
|
121
121
|
```typescript
|
|
122
122
|
import { activate, mockWallets, getMockWallet } from '@autonomys/auto-utils'
|
|
123
123
|
;(async () => {
|
|
124
|
-
const api = await activate({ networkId: '
|
|
124
|
+
const api = await activate({ networkId: 'mainnet' })
|
|
125
125
|
|
|
126
126
|
const wallets = await mockWallets({}, api)
|
|
127
127
|
const aliceWallet = getMockWallet('Alice', wallets)
|
|
@@ -158,7 +158,7 @@ Retrieve details of a specific network:
|
|
|
158
158
|
```typescript
|
|
159
159
|
import { getNetworkDetails } from '@autonomys/auto-utils'
|
|
160
160
|
|
|
161
|
-
const network = getNetworkDetails({ networkId: '
|
|
161
|
+
const network = getNetworkDetails({ networkId: 'mainnet' })
|
|
162
162
|
console.log(`Network Name: ${network.name}`)
|
|
163
163
|
console.log(`RPC URLs: ${network.rpcUrls.join(', ')}`)
|
|
164
164
|
```
|
|
@@ -170,7 +170,7 @@ Retrieve details of a specific domain within a network:
|
|
|
170
170
|
```typescript
|
|
171
171
|
import { getNetworkDomainDetails } from '@autonomys/auto-utils'
|
|
172
172
|
|
|
173
|
-
const domain = getNetworkDomainDetails({ domainId: '
|
|
173
|
+
const domain = getNetworkDomainDetails({ domainId: '0', networkId: 'mainnet' })
|
|
174
174
|
console.log(`Domain Name: ${domain.name}`)
|
|
175
175
|
console.log(`RPC URLs: ${domain.rpcUrls.join(', ')}`)
|
|
176
176
|
```
|
|
@@ -232,7 +232,7 @@ Connect to the Autonomys Network:
|
|
|
232
232
|
```typescript
|
|
233
233
|
import { activate } from '@autonomys/auto-utils'
|
|
234
234
|
;(async () => {
|
|
235
|
-
const api = await activate({ networkId: '
|
|
235
|
+
const api = await activate({ networkId: 'mainnet' })
|
|
236
236
|
|
|
237
237
|
console.log('API connected')
|
|
238
238
|
|
|
@@ -250,7 +250,7 @@ Connect to a specific domain within the network:
|
|
|
250
250
|
```typescript
|
|
251
251
|
import { activateDomain } from '@autonomys/auto-utils'
|
|
252
252
|
;(async () => {
|
|
253
|
-
const api = await activateDomain({ domainId: '
|
|
253
|
+
const api = await activateDomain({ domainId: '0', networkId: 'mainnet' })
|
|
254
254
|
|
|
255
255
|
console.log('Domain API connected')
|
|
256
256
|
|
package/dist/api.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export declare const createConnection: (endpoint: string | string[], options?: A
|
|
|
67
67
|
*
|
|
68
68
|
* // Connect with custom API options
|
|
69
69
|
* const customApi = await activate({
|
|
70
|
-
* networkId: '
|
|
70
|
+
* networkId: 'mainnet',
|
|
71
71
|
* noInitWarn: false,
|
|
72
72
|
* types: { CustomType: 'u64' }
|
|
73
73
|
* })
|
|
@@ -91,19 +91,19 @@ export declare const activate: (params?: ActivateParams<NetworkParams>) => Promi
|
|
|
91
91
|
* @example
|
|
92
92
|
* import { activateDomain } from '@autonomys/auto-utils'
|
|
93
93
|
*
|
|
94
|
-
* // Connect to Auto-EVM domain on
|
|
94
|
+
* // Connect to Auto-EVM domain on Mainnet testnet
|
|
95
95
|
* const evmApi = await activateDomain({
|
|
96
|
-
* networkId: '
|
|
96
|
+
* networkId: 'mainnet',
|
|
97
97
|
* domainId: '0'
|
|
98
98
|
* })
|
|
99
99
|
* console.log('Connected to Auto-EVM domain')
|
|
100
100
|
*
|
|
101
|
-
* // Connect to Auto-
|
|
102
|
-
* const
|
|
103
|
-
* networkId: '
|
|
104
|
-
* domainId: '
|
|
101
|
+
* // Connect to Auto-EVM domain on Mainnet
|
|
102
|
+
* const autoEvmApi = await activateDomain({
|
|
103
|
+
* networkId: 'mainnet',
|
|
104
|
+
* domainId: '0'
|
|
105
105
|
* })
|
|
106
|
-
* console.log('Connected to Auto-
|
|
106
|
+
* console.log('Connected to Auto-EVM domain')
|
|
107
107
|
*
|
|
108
108
|
* // Connect to localhost domain for development
|
|
109
109
|
* const localDomainApi = await activateDomain({
|
|
@@ -113,7 +113,7 @@ export declare const activate: (params?: ActivateParams<NetworkParams>) => Promi
|
|
|
113
113
|
*
|
|
114
114
|
* // Connect with custom API options
|
|
115
115
|
* const customDomainApi = await activateDomain({
|
|
116
|
-
* networkId: '
|
|
116
|
+
* networkId: 'mainnet',
|
|
117
117
|
* domainId: '0',
|
|
118
118
|
* noInitWarn: false
|
|
119
119
|
* })
|
package/dist/api.js
CHANGED
|
@@ -100,7 +100,7 @@ exports.createConnection = createConnection;
|
|
|
100
100
|
*
|
|
101
101
|
* // Connect with custom API options
|
|
102
102
|
* const customApi = await activate({
|
|
103
|
-
* networkId: '
|
|
103
|
+
* networkId: 'mainnet',
|
|
104
104
|
* noInitWarn: false,
|
|
105
105
|
* types: { CustomType: 'u64' }
|
|
106
106
|
* })
|
|
@@ -132,19 +132,19 @@ exports.activate = activate;
|
|
|
132
132
|
* @example
|
|
133
133
|
* import { activateDomain } from '@autonomys/auto-utils'
|
|
134
134
|
*
|
|
135
|
-
* // Connect to Auto-EVM domain on
|
|
135
|
+
* // Connect to Auto-EVM domain on Mainnet testnet
|
|
136
136
|
* const evmApi = await activateDomain({
|
|
137
|
-
* networkId: '
|
|
137
|
+
* networkId: 'mainnet',
|
|
138
138
|
* domainId: '0'
|
|
139
139
|
* })
|
|
140
140
|
* console.log('Connected to Auto-EVM domain')
|
|
141
141
|
*
|
|
142
|
-
* // Connect to Auto-
|
|
143
|
-
* const
|
|
144
|
-
* networkId: '
|
|
145
|
-
* domainId: '
|
|
142
|
+
* // Connect to Auto-EVM domain on Mainnet
|
|
143
|
+
* const autoEvmApi = await activateDomain({
|
|
144
|
+
* networkId: 'mainnet',
|
|
145
|
+
* domainId: '0'
|
|
146
146
|
* })
|
|
147
|
-
* console.log('Connected to Auto-
|
|
147
|
+
* console.log('Connected to Auto-EVM domain')
|
|
148
148
|
*
|
|
149
149
|
* // Connect to localhost domain for development
|
|
150
150
|
* const localDomainApi = await activateDomain({
|
|
@@ -154,7 +154,7 @@ exports.activate = activate;
|
|
|
154
154
|
*
|
|
155
155
|
* // Connect with custom API options
|
|
156
156
|
* const customDomainApi = await activateDomain({
|
|
157
|
-
* networkId: '
|
|
157
|
+
* networkId: 'mainnet',
|
|
158
158
|
* domainId: '0',
|
|
159
159
|
* noInitWarn: false
|
|
160
160
|
* })
|
|
@@ -2,14 +2,12 @@ import type { Network } from '../types/network';
|
|
|
2
2
|
export declare enum NetworkId {
|
|
3
3
|
MAINNET = "mainnet",
|
|
4
4
|
TAURUS = "taurus",
|
|
5
|
-
GEMINI_3H = "gemini-3h",
|
|
6
5
|
DEVNET = "devnet",
|
|
7
6
|
LOCALHOST = "localhost"
|
|
8
7
|
}
|
|
9
8
|
export declare enum NetworkName {
|
|
10
9
|
MAINNET = "Mainnet",
|
|
11
10
|
TAURUS = "Testnet - Taurus",
|
|
12
|
-
GEMINI_3H = "Testnet - Gemini 3H",
|
|
13
11
|
DEVNET = "Devnet",
|
|
14
12
|
LOCALHOST = "Localhost"
|
|
15
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/constants/network.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/constants/network.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,MAAM,qBAAqB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,eAAe,oCAAoC,CAAA;AAChE,eAAO,MAAM,gBAAgB,kCAAkC,CAAA;AAE/D,eAAO,MAAM,QAAQ,EAAE,OAAO,EAkH7B,CAAA;AAED,eAAO,MAAM,cAAc,SAAc,CAAA"}
|
|
@@ -8,7 +8,6 @@ var NetworkId;
|
|
|
8
8
|
(function (NetworkId) {
|
|
9
9
|
NetworkId["MAINNET"] = "mainnet";
|
|
10
10
|
NetworkId["TAURUS"] = "taurus";
|
|
11
|
-
NetworkId["GEMINI_3H"] = "gemini-3h";
|
|
12
11
|
NetworkId["DEVNET"] = "devnet";
|
|
13
12
|
NetworkId["LOCALHOST"] = "localhost";
|
|
14
13
|
})(NetworkId || (exports.NetworkId = NetworkId = {}));
|
|
@@ -16,7 +15,6 @@ var NetworkName;
|
|
|
16
15
|
(function (NetworkName) {
|
|
17
16
|
NetworkName["MAINNET"] = "Mainnet";
|
|
18
17
|
NetworkName["TAURUS"] = "Testnet - Taurus";
|
|
19
|
-
NetworkName["GEMINI_3H"] = "Testnet - Gemini 3H";
|
|
20
18
|
NetworkName["DEVNET"] = "Devnet";
|
|
21
19
|
NetworkName["LOCALHOST"] = "Localhost";
|
|
22
20
|
})(NetworkName || (exports.NetworkName = NetworkName = {}));
|
|
@@ -48,7 +46,9 @@ exports.networks = [
|
|
|
48
46
|
url: exports.SUBSCAN_EXPLORER,
|
|
49
47
|
},
|
|
50
48
|
],
|
|
51
|
-
domains: [
|
|
49
|
+
domains: [
|
|
50
|
+
Object.assign(Object.assign({ domainId: '0' }, domain_1.domains[domain_1.DomainRuntime.AUTO_EVM]), { rpcUrls: ['wss://auto-evm.mainnet.autonomys.xyz/ws'] }),
|
|
51
|
+
],
|
|
52
52
|
token: token_1.DEFAULT_TOKEN,
|
|
53
53
|
},
|
|
54
54
|
{
|
|
@@ -79,23 +79,6 @@ exports.networks = [
|
|
|
79
79
|
token: token_1.TESTNET_TOKEN,
|
|
80
80
|
isTestnet: true,
|
|
81
81
|
},
|
|
82
|
-
{
|
|
83
|
-
id: NetworkId.GEMINI_3H,
|
|
84
|
-
name: NetworkName.GEMINI_3H,
|
|
85
|
-
rpcUrls: ['wss://rpc-0.gemini-3h.subspace.network/ws'],
|
|
86
|
-
explorer: [
|
|
87
|
-
{
|
|
88
|
-
name: NetworkExplorerName.ASTRAL,
|
|
89
|
-
url: exports.ASTRAL_EXPLORER + 'gemini-3h/consensus/',
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
domains: [
|
|
93
|
-
Object.assign(Object.assign({ domainId: '0' }, domain_1.domains[domain_1.DomainRuntime.AUTO_EVM]), { rpcUrls: ['wss://nova-0.gemini-3h.subspace.network/ws'] }),
|
|
94
|
-
Object.assign(Object.assign({ domainId: '1' }, domain_1.domains[domain_1.DomainRuntime.AUTO_ID]), { rpcUrls: ['wss://autoid-0.gemini-3h.subspace.network/ws'] }),
|
|
95
|
-
],
|
|
96
|
-
token: token_1.TESTNET_TOKEN,
|
|
97
|
-
isTestnet: true,
|
|
98
|
-
},
|
|
99
82
|
{
|
|
100
83
|
id: NetworkId.DEVNET,
|
|
101
84
|
name: NetworkName.DEVNET,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/constants/wallet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,UAWpB,CAAA;AAED,eAAO,MAAM,mBAAmB,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/constants/wallet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,UAWpB,CAAA;AAED,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAEvC,eAAO,MAAM,mBAAmB,OAAsB,CAAA"}
|
package/dist/constants/wallet.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// file: src/constants/wallet.ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DEFAULT_SS58_FORMAT = exports.
|
|
4
|
+
exports.DEFAULT_SS58_FORMAT = exports.MAINNET_SS58_FORMAT = exports.mockURIs = void 0;
|
|
5
5
|
exports.mockURIs = [
|
|
6
6
|
'//Alice',
|
|
7
7
|
'//Bob',
|
|
@@ -15,5 +15,4 @@ exports.mockURIs = [
|
|
|
15
15
|
'//Jacob',
|
|
16
16
|
];
|
|
17
17
|
exports.MAINNET_SS58_FORMAT = 6094;
|
|
18
|
-
exports.GEMINI_3H_SS58_FORMAT = 2254;
|
|
19
18
|
exports.DEFAULT_SS58_FORMAT = exports.MAINNET_SS58_FORMAT;
|
package/dist/network.d.ts
CHANGED
|
@@ -18,15 +18,15 @@ import type { DomainParams, NetworkParams } from './types/network';
|
|
|
18
18
|
* console.log(mainnet.token.symbol) // Output: "AI3"
|
|
19
19
|
*
|
|
20
20
|
* // Get specific network details
|
|
21
|
-
* const
|
|
22
|
-
* console.log(
|
|
23
|
-
* console.log(
|
|
24
|
-
* console.log(
|
|
21
|
+
* const mainnet = getNetworkDetails({ networkId: 'mainnet' })
|
|
22
|
+
* console.log(mainnet.name) // Output: "Mainnet"
|
|
23
|
+
* console.log(mainnet.isTestnet) // Output: undefined
|
|
24
|
+
* console.log(mainnet.domains.length) // Output: 1 (Auto-EVM domain)
|
|
25
25
|
*
|
|
26
26
|
* // Access network explorers
|
|
27
|
-
* const
|
|
28
|
-
* console.log(
|
|
29
|
-
* console.log(
|
|
27
|
+
* const mainnet = getNetworkDetails({ networkId: 'mainnet' })
|
|
28
|
+
* console.log(mainnet.explorer[0].name) // Output: "Astral"
|
|
29
|
+
* console.log(mainnet.explorer[0].url) // Output: explorer URL
|
|
30
30
|
*
|
|
31
31
|
* // Check if network is for local development
|
|
32
32
|
* const localhost = getNetworkDetails({ networkId: 'localhost' })
|
|
@@ -60,7 +60,7 @@ export declare const getNetworkDetails: (input?: NetworkParams) => import("./typ
|
|
|
60
60
|
*
|
|
61
61
|
* // Use with API connection
|
|
62
62
|
* import { createConnection } from '@autonomys/auto-utils'
|
|
63
|
-
* const endpoints = getNetworkRpcUrls({ networkId: '
|
|
63
|
+
* const endpoints = getNetworkRpcUrls({ networkId: 'mainnet' })
|
|
64
64
|
* const api = await createConnection(endpoints)
|
|
65
65
|
*
|
|
66
66
|
* // Get localhost URLs for development
|
|
@@ -93,13 +93,13 @@ export declare const getNetworkRpcUrls: (input?: NetworkParams) => string[];
|
|
|
93
93
|
* console.log(evmDomain.runtime) // Output: "auto-evm"
|
|
94
94
|
* console.log(evmDomain.rpcUrls.length) // Output: number of available RPC endpoints
|
|
95
95
|
*
|
|
96
|
-
* // Get Auto-
|
|
97
|
-
* const
|
|
98
|
-
* networkId: '
|
|
99
|
-
* domainId: '
|
|
96
|
+
* // Get Auto-EVM domain details on Mainnet
|
|
97
|
+
* const autoEvmDomain = getNetworkDomainDetails({
|
|
98
|
+
* networkId: 'mainnet',
|
|
99
|
+
* domainId: '0'
|
|
100
100
|
* })
|
|
101
|
-
* console.log(
|
|
102
|
-
* console.log(
|
|
101
|
+
* console.log(autoEvmDomain.name) // Output: "Auto-EVM"
|
|
102
|
+
* console.log(autoEvmDomain.runtime) // Output: "auto-evm"
|
|
103
103
|
*
|
|
104
104
|
* // Use with domain connection
|
|
105
105
|
* import { activateDomain } from '@autonomys/auto-utils'
|
|
@@ -133,13 +133,13 @@ export declare const getNetworkDomainDetails: (params: DomainParams) => import("
|
|
|
133
133
|
* console.log(evmUrls)
|
|
134
134
|
* // Output: ['wss://auto-evm.taurus.autonomys.xyz/ws', 'wss://auto-evm-0.taurus.autonomys.xyz/ws', ...]
|
|
135
135
|
*
|
|
136
|
-
* // Get Auto-
|
|
137
|
-
* const
|
|
138
|
-
* networkId: '
|
|
139
|
-
* domainId: '
|
|
136
|
+
* // Get Auto-EVM domain RPC URLs on Mainnet
|
|
137
|
+
* const autoEvmUrls = getNetworkDomainRpcUrls({
|
|
138
|
+
* networkId: 'mainnet',
|
|
139
|
+
* domainId: '0'
|
|
140
140
|
* })
|
|
141
|
-
* console.log(
|
|
142
|
-
* // Output: ['wss://
|
|
141
|
+
* console.log(autoEvmUrls)
|
|
142
|
+
* // Output: ['wss://auto-evm.taurus.autonomys.xyz/ws']
|
|
143
143
|
*
|
|
144
144
|
* // Use with API connection
|
|
145
145
|
* import { createConnection } from '@autonomys/auto-utils'
|
package/dist/network.js
CHANGED
|
@@ -22,15 +22,15 @@ const network_1 = require("./constants/network");
|
|
|
22
22
|
* console.log(mainnet.token.symbol) // Output: "AI3"
|
|
23
23
|
*
|
|
24
24
|
* // Get specific network details
|
|
25
|
-
* const
|
|
26
|
-
* console.log(
|
|
27
|
-
* console.log(
|
|
28
|
-
* console.log(
|
|
25
|
+
* const mainnet = getNetworkDetails({ networkId: 'mainnet' })
|
|
26
|
+
* console.log(mainnet.name) // Output: "Mainnet"
|
|
27
|
+
* console.log(mainnet.isTestnet) // Output: undefined
|
|
28
|
+
* console.log(mainnet.domains.length) // Output: 1 (Auto-EVM domain)
|
|
29
29
|
*
|
|
30
30
|
* // Access network explorers
|
|
31
|
-
* const
|
|
32
|
-
* console.log(
|
|
33
|
-
* console.log(
|
|
31
|
+
* const mainnet = getNetworkDetails({ networkId: 'mainnet' })
|
|
32
|
+
* console.log(mainnet.explorer[0].name) // Output: "Astral"
|
|
33
|
+
* console.log(mainnet.explorer[0].url) // Output: explorer URL
|
|
34
34
|
*
|
|
35
35
|
* // Check if network is for local development
|
|
36
36
|
* const localhost = getNetworkDetails({ networkId: 'localhost' })
|
|
@@ -75,7 +75,7 @@ exports.getNetworkDetails = getNetworkDetails;
|
|
|
75
75
|
*
|
|
76
76
|
* // Use with API connection
|
|
77
77
|
* import { createConnection } from '@autonomys/auto-utils'
|
|
78
|
-
* const endpoints = getNetworkRpcUrls({ networkId: '
|
|
78
|
+
* const endpoints = getNetworkRpcUrls({ networkId: 'mainnet' })
|
|
79
79
|
* const api = await createConnection(endpoints)
|
|
80
80
|
*
|
|
81
81
|
* // Get localhost URLs for development
|
|
@@ -115,13 +115,13 @@ exports.getNetworkRpcUrls = getNetworkRpcUrls;
|
|
|
115
115
|
* console.log(evmDomain.runtime) // Output: "auto-evm"
|
|
116
116
|
* console.log(evmDomain.rpcUrls.length) // Output: number of available RPC endpoints
|
|
117
117
|
*
|
|
118
|
-
* // Get Auto-
|
|
119
|
-
* const
|
|
120
|
-
* networkId: '
|
|
121
|
-
* domainId: '
|
|
118
|
+
* // Get Auto-EVM domain details on Mainnet
|
|
119
|
+
* const autoEvmDomain = getNetworkDomainDetails({
|
|
120
|
+
* networkId: 'mainnet',
|
|
121
|
+
* domainId: '0'
|
|
122
122
|
* })
|
|
123
|
-
* console.log(
|
|
124
|
-
* console.log(
|
|
123
|
+
* console.log(autoEvmDomain.name) // Output: "Auto-EVM"
|
|
124
|
+
* console.log(autoEvmDomain.runtime) // Output: "auto-evm"
|
|
125
125
|
*
|
|
126
126
|
* // Use with domain connection
|
|
127
127
|
* import { activateDomain } from '@autonomys/auto-utils'
|
|
@@ -167,13 +167,13 @@ exports.getNetworkDomainDetails = getNetworkDomainDetails;
|
|
|
167
167
|
* console.log(evmUrls)
|
|
168
168
|
* // Output: ['wss://auto-evm.taurus.autonomys.xyz/ws', 'wss://auto-evm-0.taurus.autonomys.xyz/ws', ...]
|
|
169
169
|
*
|
|
170
|
-
* // Get Auto-
|
|
171
|
-
* const
|
|
172
|
-
* networkId: '
|
|
173
|
-
* domainId: '
|
|
170
|
+
* // Get Auto-EVM domain RPC URLs on Mainnet
|
|
171
|
+
* const autoEvmUrls = getNetworkDomainRpcUrls({
|
|
172
|
+
* networkId: 'mainnet',
|
|
173
|
+
* domainId: '0'
|
|
174
174
|
* })
|
|
175
|
-
* console.log(
|
|
176
|
-
* // Output: ['wss://
|
|
175
|
+
* console.log(autoEvmUrls)
|
|
176
|
+
* // Output: ['wss://auto-evm.taurus.autonomys.xyz/ws']
|
|
177
177
|
*
|
|
178
178
|
* // Use with API connection
|
|
179
179
|
* import { createConnection } from '@autonomys/auto-utils'
|
package/dist/string.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare const shortString: (value: string, initialLength?: number, endLen
|
|
|
69
69
|
*
|
|
70
70
|
* // Capitalize network names
|
|
71
71
|
* console.log(capitalizeFirstLetter('mainnet')) // Output: "Mainnet"
|
|
72
|
-
* console.log(capitalizeFirstLetter('
|
|
72
|
+
* console.log(capitalizeFirstLetter('taurus')) // Output: "Taurus"
|
|
73
73
|
*
|
|
74
74
|
* // Handle edge cases
|
|
75
75
|
* console.log(capitalizeFirstLetter('')) // Output: ""
|
package/dist/string.js
CHANGED
|
@@ -76,7 +76,7 @@ exports.shortString = shortString;
|
|
|
76
76
|
*
|
|
77
77
|
* // Capitalize network names
|
|
78
78
|
* console.log(capitalizeFirstLetter('mainnet')) // Output: "Mainnet"
|
|
79
|
-
* console.log(capitalizeFirstLetter('
|
|
79
|
+
* console.log(capitalizeFirstLetter('taurus')) // Output: "Taurus"
|
|
80
80
|
*
|
|
81
81
|
* // Handle edge cases
|
|
82
82
|
* console.log(capitalizeFirstLetter('')) // Output: ""
|
package/dist/wallet.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export declare const generateWallet: (type?: KeypairType) => GeneratedWallet;
|
|
|
112
112
|
*
|
|
113
113
|
* // Use with existing API instance
|
|
114
114
|
* import { activate } from '@autonomys/auto-utils'
|
|
115
|
-
* const existingApi = await activate({ networkId: '
|
|
115
|
+
* const existingApi = await activate({ networkId: 'mainnet' })
|
|
116
116
|
* const { accounts } = await activateWallet({
|
|
117
117
|
* uri: '//Bob',
|
|
118
118
|
* api: existingApi
|
package/dist/wallet.js
CHANGED
|
@@ -192,7 +192,7 @@ exports.generateWallet = generateWallet;
|
|
|
192
192
|
*
|
|
193
193
|
* // Use with existing API instance
|
|
194
194
|
* import { activate } from '@autonomys/auto-utils'
|
|
195
|
-
* const existingApi = await activate({ networkId: '
|
|
195
|
+
* const existingApi = await activate({ networkId: 'mainnet' })
|
|
196
196
|
* const { accounts } = await activateWallet({
|
|
197
197
|
* uri: '//Bob',
|
|
198
198
|
* api: existingApi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autonomys/auto-utils",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@polkadot/extension-dapp": "^0.58.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@polkadot/extension-inject": "^0.58.
|
|
32
|
+
"@polkadot/extension-inject": "^0.58.9",
|
|
33
33
|
"@polkadot/types": "^15.8.1",
|
|
34
34
|
"@polkadot/types-codec": "^15.8.1",
|
|
35
35
|
"@types/jest": "^29.5.14",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"ts-jest": "^29.3.1",
|
|
40
40
|
"typescript": "^5.8.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ed410d97d09e708002b35264bf9f80faccc10d3b"
|
|
43
43
|
}
|