@alephium/web3 0.9.0-rc.0 → 0.9.0-rc.1
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/dist/alephium-web3.min.js +3 -0
- package/dist/alephium-web3.min.js.LICENSE.txt +12 -0
- package/dist/alephium-web3.min.js.map +1 -0
- package/dist/scripts/check-versions.d.ts +1 -0
- package/dist/scripts/check-versions.js +39 -0
- package/dist/scripts/header.d.ts +0 -0
- package/dist/scripts/header.js +18 -0
- package/dist/src/api/api-alephium.d.ts +1717 -0
- package/dist/src/api/api-alephium.js +1284 -0
- package/dist/src/api/api-explorer.d.ts +923 -0
- package/dist/src/api/api-explorer.js +711 -0
- package/dist/src/api/explorer-provider.d.ts +20 -0
- package/dist/src/api/explorer-provider.js +69 -0
- package/dist/src/api/index.d.ts +6 -0
- package/dist/src/api/index.js +52 -0
- package/dist/src/api/node-provider.d.ts +38 -0
- package/dist/src/api/node-provider.js +99 -0
- package/dist/src/api/types.d.ts +38 -0
- package/dist/src/api/types.js +259 -0
- package/dist/src/api/utils.d.ts +12 -0
- package/dist/src/api/utils.js +59 -0
- package/dist/src/constants.d.ts +6 -0
- package/dist/src/constants.js +26 -0
- package/dist/src/contract/contract.d.ts +297 -0
- package/dist/src/contract/contract.js +1097 -0
- package/dist/src/contract/events.d.ts +11 -0
- package/dist/src/contract/events.js +65 -0
- package/dist/src/contract/index.d.ts +3 -0
- package/dist/src/contract/index.js +36 -0
- package/dist/src/contract/ralph.d.ts +13 -0
- package/dist/src/contract/ralph.js +397 -0
- package/dist/src/global.d.ts +7 -0
- package/dist/src/global.js +54 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.js +58 -0
- package/dist/src/signer/index.d.ts +3 -0
- package/dist/src/signer/index.js +36 -0
- package/dist/src/signer/signer.d.ts +60 -0
- package/dist/src/signer/signer.js +236 -0
- package/dist/src/signer/tx-builder.d.ts +12 -0
- package/dist/src/signer/tx-builder.js +96 -0
- package/dist/src/signer/types.d.ts +115 -0
- package/dist/src/signer/types.js +30 -0
- package/dist/src/token/index.d.ts +1 -0
- package/dist/src/token/index.js +34 -0
- package/dist/src/token/nft.d.ts +10 -0
- package/dist/src/token/nft.js +19 -0
- package/dist/src/transaction/index.d.ts +2 -0
- package/dist/src/transaction/index.js +35 -0
- package/dist/src/transaction/sign-verify.d.ts +3 -0
- package/dist/src/transaction/sign-verify.js +52 -0
- package/dist/src/transaction/status.d.ts +11 -0
- package/dist/src/transaction/status.js +49 -0
- package/dist/src/utils/address.d.ts +1 -0
- package/dist/src/utils/address.js +42 -0
- package/dist/src/utils/bs58.d.ts +5 -0
- package/dist/src/utils/bs58.js +40 -0
- package/dist/src/utils/djb2.d.ts +1 -0
- package/dist/src/utils/djb2.js +27 -0
- package/dist/src/utils/index.d.ts +7 -0
- package/dist/src/utils/index.js +40 -0
- package/dist/src/utils/number.d.ts +18 -0
- package/dist/src/utils/number.fixture.d.ts +12 -0
- package/dist/src/utils/number.fixture.js +189 -0
- package/dist/src/utils/number.js +149 -0
- package/dist/src/utils/sign.d.ts +3 -0
- package/dist/src/utils/sign.js +89 -0
- package/dist/src/utils/subscription.d.ts +21 -0
- package/dist/src/utils/subscription.js +51 -0
- package/dist/src/utils/utils.d.ts +40 -0
- package/dist/src/utils/utils.js +244 -0
- package/package.json +1 -1
- package/LICENSE +0 -165
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2018 - 2022 The Alephium Authors
|
|
4
|
+
This file is part of the alephium project.
|
|
5
|
+
|
|
6
|
+
The library is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
The library is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU Lesser General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
along with the library. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*/
|
|
19
|
+
const fetch = require('cross-fetch');
|
|
20
|
+
const process = require('process');
|
|
21
|
+
async function extractNodeVersionFromExplorer(explorerVersion) {
|
|
22
|
+
const url = `https://raw.githubusercontent.com/alephium/explorer-backend/v${explorerVersion}/project/Dependencies.scala`;
|
|
23
|
+
const response = await (await fetch(url)).text();
|
|
24
|
+
const regex = /val common = "[^"]+"/;
|
|
25
|
+
const matched = regex.exec(response)[0];
|
|
26
|
+
return matched.split('"')[1];
|
|
27
|
+
}
|
|
28
|
+
async function main() {
|
|
29
|
+
const nodeVersionConfigured = process.argv[2];
|
|
30
|
+
const explorerVersionConfigured = process.argv[3];
|
|
31
|
+
const nodeVersionExpected = await extractNodeVersionFromExplorer(explorerVersionConfigured);
|
|
32
|
+
if (nodeVersionExpected != nodeVersionConfigured) {
|
|
33
|
+
console.log(`Invalid node version: the configured explorer-backend version (${explorerVersionConfigured}) expects node ${nodeVersionExpected}.`);
|
|
34
|
+
console.log(`Instead, the configured node version is ${nodeVersionConfigured}`);
|
|
35
|
+
console.log('Please, check that the configured node and explorer-backend versions in the package.json are correct.');
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
main();
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2018 - 2022 The Alephium Authors
|
|
4
|
+
This file is part of the alephium project.
|
|
5
|
+
|
|
6
|
+
The library is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
The library is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU Lesser General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
along with the library. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*/
|