@alephium/web3 1.9.0 → 1.10.0
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 +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +25 -6
- package/dist/src/api/api-alephium.js +33 -4
- package/dist/src/api/api-explorer.d.ts +810 -819
- package/dist/src/api/api-explorer.js +350 -360
- package/dist/src/codec/unlock-script-codec.d.ts +1 -0
- package/dist/src/codec/unlock-script-codec.js +2 -1
- package/dist/src/contract/contract.d.ts +5 -1
- package/dist/src/contract/contract.js +44 -8
- package/dist/src/contract/events.d.ts +1 -0
- package/dist/src/contract/events.js +14 -3
- package/dist/src/exchange/exchange.d.ts +13 -2
- package/dist/src/exchange/exchange.js +52 -14
- package/dist/src/exchange/index.d.ts +1 -1
- package/dist/src/exchange/index.js +3 -2
- package/dist/src/signer/types.d.ts +1 -0
- package/package.json +3 -3
- package/src/api/api-alephium.ts +49 -9
- package/src/api/api-explorer.ts +990 -1000
- package/src/codec/unlock-script-codec.ts +2 -0
- package/src/contract/contract.ts +46 -7
- package/src/contract/events.ts +15 -3
- package/src/exchange/exchange.ts +69 -17
- package/src/exchange/index.ts +10 -1
- package/src/signer/tx-builder.ts +2 -2
- package/src/signer/types.ts +1 -0
|
@@ -266,6 +266,7 @@ export interface BuildExecuteScriptTxResult {
|
|
|
266
266
|
gasPrice: string;
|
|
267
267
|
/** @format 32-byte-hash */
|
|
268
268
|
txId: string;
|
|
269
|
+
simulatedOutputs: Output[];
|
|
269
270
|
}
|
|
270
271
|
/** BuildInfo */
|
|
271
272
|
export interface BuildInfo {
|
|
@@ -318,6 +319,8 @@ export interface BuildSweepAddressTransactions {
|
|
|
318
319
|
gasPrice?: string;
|
|
319
320
|
/** @format block-hash */
|
|
320
321
|
targetBlockHash?: string;
|
|
322
|
+
/** @format int32 */
|
|
323
|
+
utxosLimit?: number;
|
|
321
324
|
}
|
|
322
325
|
/** BuildSweepAddressTransactionsResult */
|
|
323
326
|
export interface BuildSweepAddressTransactionsResult {
|
|
@@ -1239,10 +1242,6 @@ export interface WalletCreationResult {
|
|
|
1239
1242
|
walletName: string;
|
|
1240
1243
|
mnemonic: string;
|
|
1241
1244
|
}
|
|
1242
|
-
/** WalletDeletion */
|
|
1243
|
-
export interface WalletDeletion {
|
|
1244
|
-
password: string;
|
|
1245
|
-
}
|
|
1246
1245
|
/** WalletRestore */
|
|
1247
1246
|
export interface WalletRestore {
|
|
1248
1247
|
password: string;
|
|
@@ -1326,7 +1325,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1326
1325
|
}
|
|
1327
1326
|
/**
|
|
1328
1327
|
* @title Alephium API
|
|
1329
|
-
* @version 3.
|
|
1328
|
+
* @version 3.10.0
|
|
1330
1329
|
* @baseUrl ../
|
|
1331
1330
|
*/
|
|
1332
1331
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -1375,7 +1374,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1375
1374
|
* @summary Delete your wallet file (can be recovered with your mnemonic)
|
|
1376
1375
|
* @request DELETE:/wallets/{wallet_name}
|
|
1377
1376
|
*/
|
|
1378
|
-
deleteWalletsWalletName: (walletName: string,
|
|
1377
|
+
deleteWalletsWalletName: (walletName: string, query: {
|
|
1378
|
+
password: string;
|
|
1379
|
+
}, params?: RequestParams) => Promise<void>;
|
|
1379
1380
|
/**
|
|
1380
1381
|
* No description
|
|
1381
1382
|
*
|
|
@@ -1841,6 +1842,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1841
1842
|
* @request POST:/transactions/build
|
|
1842
1843
|
*/
|
|
1843
1844
|
postTransactionsBuild: (data: BuildTransferTx, params?: RequestParams) => Promise<BuildTransferTxResult>;
|
|
1845
|
+
/**
|
|
1846
|
+
* No description
|
|
1847
|
+
*
|
|
1848
|
+
* @tags Transactions
|
|
1849
|
+
* @name PostTransactionsBuildTransferFromOneToManyGroups
|
|
1850
|
+
* @summary Build unsigned transfer transactions from an address of one group to addresses of many groups. Each target group requires a dedicated transaction or more in case large number of outputs needed to be split.
|
|
1851
|
+
* @request POST:/transactions/build-transfer-from-one-to-many-groups
|
|
1852
|
+
*/
|
|
1853
|
+
postTransactionsBuildTransferFromOneToManyGroups: (data: BuildTransferTx, params?: RequestParams) => Promise<BuildTransferTxResult[]>;
|
|
1844
1854
|
/**
|
|
1845
1855
|
* No description
|
|
1846
1856
|
*
|
|
@@ -2055,6 +2065,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2055
2065
|
* @request GET:/contracts/{address}/state
|
|
2056
2066
|
*/
|
|
2057
2067
|
getContractsAddressState: (address: string, params?: RequestParams) => Promise<ContractState>;
|
|
2068
|
+
/**
|
|
2069
|
+
* No description
|
|
2070
|
+
*
|
|
2071
|
+
* @tags Contracts
|
|
2072
|
+
* @name GetContractsCodehashCode
|
|
2073
|
+
* @summary Get contract code by code hash
|
|
2074
|
+
* @request GET:/contracts/{codeHash}/code
|
|
2075
|
+
*/
|
|
2076
|
+
getContractsCodehashCode: (codeHash: string, params?: RequestParams) => Promise<string>;
|
|
2058
2077
|
/**
|
|
2059
2078
|
* No description
|
|
2060
2079
|
*
|
|
@@ -151,7 +151,7 @@ class HttpClient {
|
|
|
151
151
|
exports.HttpClient = HttpClient;
|
|
152
152
|
/**
|
|
153
153
|
* @title Alephium API
|
|
154
|
-
* @version 3.
|
|
154
|
+
* @version 3.10.0
|
|
155
155
|
* @baseUrl ../
|
|
156
156
|
*/
|
|
157
157
|
class Api extends HttpClient {
|
|
@@ -226,11 +226,10 @@ class Api extends HttpClient {
|
|
|
226
226
|
* @summary Delete your wallet file (can be recovered with your mnemonic)
|
|
227
227
|
* @request DELETE:/wallets/{wallet_name}
|
|
228
228
|
*/
|
|
229
|
-
deleteWalletsWalletName: (walletName,
|
|
229
|
+
deleteWalletsWalletName: (walletName, query, params = {}) => this.request({
|
|
230
230
|
path: `/wallets/${walletName}`,
|
|
231
231
|
method: 'DELETE',
|
|
232
|
-
|
|
233
|
-
type: ContentType.Json,
|
|
232
|
+
query: query,
|
|
234
233
|
...params
|
|
235
234
|
}).then(utils_1.convertHttpResponse),
|
|
236
235
|
/**
|
|
@@ -868,6 +867,22 @@ class Api extends HttpClient {
|
|
|
868
867
|
format: 'json',
|
|
869
868
|
...params
|
|
870
869
|
}).then(utils_1.convertHttpResponse),
|
|
870
|
+
/**
|
|
871
|
+
* No description
|
|
872
|
+
*
|
|
873
|
+
* @tags Transactions
|
|
874
|
+
* @name PostTransactionsBuildTransferFromOneToManyGroups
|
|
875
|
+
* @summary Build unsigned transfer transactions from an address of one group to addresses of many groups. Each target group requires a dedicated transaction or more in case large number of outputs needed to be split.
|
|
876
|
+
* @request POST:/transactions/build-transfer-from-one-to-many-groups
|
|
877
|
+
*/
|
|
878
|
+
postTransactionsBuildTransferFromOneToManyGroups: (data, params = {}) => this.request({
|
|
879
|
+
path: `/transactions/build-transfer-from-one-to-many-groups`,
|
|
880
|
+
method: 'POST',
|
|
881
|
+
body: data,
|
|
882
|
+
type: ContentType.Json,
|
|
883
|
+
format: 'json',
|
|
884
|
+
...params
|
|
885
|
+
}).then(utils_1.convertHttpResponse),
|
|
871
886
|
/**
|
|
872
887
|
* No description
|
|
873
888
|
*
|
|
@@ -1175,6 +1190,20 @@ class Api extends HttpClient {
|
|
|
1175
1190
|
format: 'json',
|
|
1176
1191
|
...params
|
|
1177
1192
|
}).then(utils_1.convertHttpResponse),
|
|
1193
|
+
/**
|
|
1194
|
+
* No description
|
|
1195
|
+
*
|
|
1196
|
+
* @tags Contracts
|
|
1197
|
+
* @name GetContractsCodehashCode
|
|
1198
|
+
* @summary Get contract code by code hash
|
|
1199
|
+
* @request GET:/contracts/{codeHash}/code
|
|
1200
|
+
*/
|
|
1201
|
+
getContractsCodehashCode: (codeHash, params = {}) => this.request({
|
|
1202
|
+
path: `/contracts/${codeHash}/code`,
|
|
1203
|
+
method: 'GET',
|
|
1204
|
+
format: 'json',
|
|
1205
|
+
...params
|
|
1206
|
+
}).then(utils_1.convertHttpResponse),
|
|
1178
1207
|
/**
|
|
1179
1208
|
* No description
|
|
1180
1209
|
*
|