@alephium/web3 0.18.3 → 0.19.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.
|
@@ -255,6 +255,25 @@ export interface BuildSweepAddressTransactionsResult {
|
|
|
255
255
|
/** @format int32 */
|
|
256
256
|
toGroup: number;
|
|
257
257
|
}
|
|
258
|
+
export interface BuildSweepMultisig {
|
|
259
|
+
/** @format address */
|
|
260
|
+
fromAddress: string;
|
|
261
|
+
fromPublicKeys: string[];
|
|
262
|
+
/** @format address */
|
|
263
|
+
toAddress: string;
|
|
264
|
+
/** @format uint256 */
|
|
265
|
+
maxAttoAlphPerUTXO?: string;
|
|
266
|
+
/** @format int64 */
|
|
267
|
+
lockTime?: number;
|
|
268
|
+
/** @format gas */
|
|
269
|
+
gasAmount?: number;
|
|
270
|
+
/** @format uint256 */
|
|
271
|
+
gasPrice?: string;
|
|
272
|
+
/** @format int32 */
|
|
273
|
+
utxosLimit?: number;
|
|
274
|
+
/** @format block-hash */
|
|
275
|
+
targetBlockHash?: string;
|
|
276
|
+
}
|
|
258
277
|
export interface BuildTransaction {
|
|
259
278
|
/** @format hex-string */
|
|
260
279
|
fromPublicKey: string;
|
|
@@ -944,7 +963,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
944
963
|
}
|
|
945
964
|
/**
|
|
946
965
|
* @title Alephium API
|
|
947
|
-
* @version 2.5.
|
|
966
|
+
* @version 2.5.3
|
|
948
967
|
* @baseUrl ../
|
|
949
968
|
*/
|
|
950
969
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -1613,6 +1632,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1613
1632
|
* @request POST:/multisig/build
|
|
1614
1633
|
*/
|
|
1615
1634
|
postMultisigBuild: (data: BuildMultisig, params?: RequestParams) => Promise<BuildTransactionResult>;
|
|
1635
|
+
/**
|
|
1636
|
+
* No description
|
|
1637
|
+
*
|
|
1638
|
+
* @tags Multi-signature
|
|
1639
|
+
* @name PostMultisigSweep
|
|
1640
|
+
* @summary Sweep all unlocked ALPH and token balances of a multisig address to another address
|
|
1641
|
+
* @request POST:/multisig/sweep
|
|
1642
|
+
*/
|
|
1643
|
+
postMultisigSweep: (data: BuildSweepMultisig, params?: RequestParams) => Promise<BuildSweepAddressTransactionsResult>;
|
|
1616
1644
|
/**
|
|
1617
1645
|
* No description
|
|
1618
1646
|
*
|
|
@@ -151,7 +151,7 @@ class HttpClient {
|
|
|
151
151
|
exports.HttpClient = HttpClient;
|
|
152
152
|
/**
|
|
153
153
|
* @title Alephium API
|
|
154
|
-
* @version 2.5.
|
|
154
|
+
* @version 2.5.3
|
|
155
155
|
* @baseUrl ../
|
|
156
156
|
*/
|
|
157
157
|
class Api extends HttpClient {
|
|
@@ -1124,6 +1124,22 @@ class Api extends HttpClient {
|
|
|
1124
1124
|
format: 'json',
|
|
1125
1125
|
...params
|
|
1126
1126
|
}).then(utils_1.convertHttpResponse),
|
|
1127
|
+
/**
|
|
1128
|
+
* No description
|
|
1129
|
+
*
|
|
1130
|
+
* @tags Multi-signature
|
|
1131
|
+
* @name PostMultisigSweep
|
|
1132
|
+
* @summary Sweep all unlocked ALPH and token balances of a multisig address to another address
|
|
1133
|
+
* @request POST:/multisig/sweep
|
|
1134
|
+
*/
|
|
1135
|
+
postMultisigSweep: (data, params = {}) => this.request({
|
|
1136
|
+
path: `/multisig/sweep`,
|
|
1137
|
+
method: 'POST',
|
|
1138
|
+
body: data,
|
|
1139
|
+
type: ContentType.Json,
|
|
1140
|
+
format: 'json',
|
|
1141
|
+
...params
|
|
1142
|
+
}).then(utils_1.convertHttpResponse),
|
|
1127
1143
|
/**
|
|
1128
1144
|
* No description
|
|
1129
1145
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "A JS/TS library to interact with the Alephium platform",
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"author": "Alephium dev <dev@alephium.org>",
|
|
29
29
|
"config": {
|
|
30
|
-
"alephium_version": "2.5.
|
|
30
|
+
"alephium_version": "2.5.3",
|
|
31
31
|
"explorer_backend_version": "1.15.1"
|
|
32
32
|
},
|
|
33
33
|
"type": "commonjs",
|
package/src/api/api-alephium.ts
CHANGED
|
@@ -293,6 +293,26 @@ export interface BuildSweepAddressTransactionsResult {
|
|
|
293
293
|
toGroup: number
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
+
export interface BuildSweepMultisig {
|
|
297
|
+
/** @format address */
|
|
298
|
+
fromAddress: string
|
|
299
|
+
fromPublicKeys: string[]
|
|
300
|
+
/** @format address */
|
|
301
|
+
toAddress: string
|
|
302
|
+
/** @format uint256 */
|
|
303
|
+
maxAttoAlphPerUTXO?: string
|
|
304
|
+
/** @format int64 */
|
|
305
|
+
lockTime?: number
|
|
306
|
+
/** @format gas */
|
|
307
|
+
gasAmount?: number
|
|
308
|
+
/** @format uint256 */
|
|
309
|
+
gasPrice?: string
|
|
310
|
+
/** @format int32 */
|
|
311
|
+
utxosLimit?: number
|
|
312
|
+
/** @format block-hash */
|
|
313
|
+
targetBlockHash?: string
|
|
314
|
+
}
|
|
315
|
+
|
|
296
316
|
export interface BuildTransaction {
|
|
297
317
|
/** @format hex-string */
|
|
298
318
|
fromPublicKey: string
|
|
@@ -1236,7 +1256,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
1236
1256
|
|
|
1237
1257
|
/**
|
|
1238
1258
|
* @title Alephium API
|
|
1239
|
-
* @version 2.5.
|
|
1259
|
+
* @version 2.5.3
|
|
1240
1260
|
* @baseUrl ../
|
|
1241
1261
|
*/
|
|
1242
1262
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -2510,6 +2530,27 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2510
2530
|
...params
|
|
2511
2531
|
}).then(convertHttpResponse),
|
|
2512
2532
|
|
|
2533
|
+
/**
|
|
2534
|
+
* No description
|
|
2535
|
+
*
|
|
2536
|
+
* @tags Multi-signature
|
|
2537
|
+
* @name PostMultisigSweep
|
|
2538
|
+
* @summary Sweep all unlocked ALPH and token balances of a multisig address to another address
|
|
2539
|
+
* @request POST:/multisig/sweep
|
|
2540
|
+
*/
|
|
2541
|
+
postMultisigSweep: (data: BuildSweepMultisig, params: RequestParams = {}) =>
|
|
2542
|
+
this.request<
|
|
2543
|
+
BuildSweepAddressTransactionsResult,
|
|
2544
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
2545
|
+
>({
|
|
2546
|
+
path: `/multisig/sweep`,
|
|
2547
|
+
method: 'POST',
|
|
2548
|
+
body: data,
|
|
2549
|
+
type: ContentType.Json,
|
|
2550
|
+
format: 'json',
|
|
2551
|
+
...params
|
|
2552
|
+
}).then(convertHttpResponse),
|
|
2553
|
+
|
|
2513
2554
|
/**
|
|
2514
2555
|
* No description
|
|
2515
2556
|
*
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Interface INFTCollectionWithRoyalty extends INFTCollection {
|
|
3
3
|
pub fn royaltyAmount(tokenId: ByteVec, salePrice: U256) -> (U256)
|
|
4
4
|
|
|
5
|
-
@using(
|
|
5
|
+
@using(preapprovedAssets = true)
|
|
6
6
|
pub fn payRoyalty(payer: Address, amount: U256) -> ()
|
|
7
7
|
}
|