@alephium/web3 0.29.0 → 0.29.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 +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +29 -1
- package/dist/src/api/api-alephium.js +17 -1
- package/dist/src/contract/contract.d.ts +1 -0
- package/dist/src/signer/types.d.ts +1 -0
- package/package.json +2 -2
- package/src/api/api-alephium.ts +43 -1
- package/src/contract/contract.ts +1 -0
- package/src/signer/types.ts +1 -0
|
@@ -157,6 +157,8 @@ export interface BuildDeployContractTx {
|
|
|
157
157
|
initialTokenAmounts?: Token[];
|
|
158
158
|
/** @format uint256 */
|
|
159
159
|
issueTokenAmount?: string;
|
|
160
|
+
/** @format address */
|
|
161
|
+
issueTokenTo?: string;
|
|
160
162
|
/** @format gas */
|
|
161
163
|
gasAmount?: number;
|
|
162
164
|
/** @format uint256 */
|
|
@@ -213,6 +215,13 @@ export interface BuildInfo {
|
|
|
213
215
|
releaseVersion: string;
|
|
214
216
|
commit: string;
|
|
215
217
|
}
|
|
218
|
+
export interface BuildMultiAddressesTransaction {
|
|
219
|
+
from: Source[];
|
|
220
|
+
/** @format uint256 */
|
|
221
|
+
gasPrice?: string;
|
|
222
|
+
/** @format block-hash */
|
|
223
|
+
targetBlockHash?: string;
|
|
224
|
+
}
|
|
216
225
|
export interface BuildMultisig {
|
|
217
226
|
/** @format address */
|
|
218
227
|
fromAddress: string;
|
|
@@ -670,6 +679,16 @@ export interface SignResult {
|
|
|
670
679
|
/** @format signature */
|
|
671
680
|
signature: string;
|
|
672
681
|
}
|
|
682
|
+
export interface Source {
|
|
683
|
+
/** @format hex-string */
|
|
684
|
+
fromPublicKey: string;
|
|
685
|
+
destinations: Destination[];
|
|
686
|
+
/** @format hex-string */
|
|
687
|
+
fromPublicKeyType?: string;
|
|
688
|
+
/** @format gas */
|
|
689
|
+
gasAmount?: number;
|
|
690
|
+
utxos?: OutputRef[];
|
|
691
|
+
}
|
|
673
692
|
export interface SubmitMultisig {
|
|
674
693
|
unsignedTx: string;
|
|
675
694
|
signatures: string[];
|
|
@@ -963,7 +982,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
963
982
|
}
|
|
964
983
|
/**
|
|
965
984
|
* @title Alephium API
|
|
966
|
-
* @version 2.
|
|
985
|
+
* @version 2.8.0
|
|
967
986
|
* @baseUrl ../
|
|
968
987
|
*/
|
|
969
988
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -1431,6 +1450,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1431
1450
|
* @request POST:/transactions/build
|
|
1432
1451
|
*/
|
|
1433
1452
|
postTransactionsBuild: (data: BuildTransaction, params?: RequestParams) => Promise<BuildTransactionResult>;
|
|
1453
|
+
/**
|
|
1454
|
+
* No description
|
|
1455
|
+
*
|
|
1456
|
+
* @tags Transactions
|
|
1457
|
+
* @name PostTransactionsBuildMultiAddresses
|
|
1458
|
+
* @summary Build an unsigned transaction with multiple addresses to a number of recipients
|
|
1459
|
+
* @request POST:/transactions/build-multi-addresses
|
|
1460
|
+
*/
|
|
1461
|
+
postTransactionsBuildMultiAddresses: (data: BuildMultiAddressesTransaction, params?: RequestParams) => Promise<BuildTransactionResult>;
|
|
1434
1462
|
/**
|
|
1435
1463
|
* No description
|
|
1436
1464
|
*
|
|
@@ -151,7 +151,7 @@ class HttpClient {
|
|
|
151
151
|
exports.HttpClient = HttpClient;
|
|
152
152
|
/**
|
|
153
153
|
* @title Alephium API
|
|
154
|
-
* @version 2.
|
|
154
|
+
* @version 2.8.0
|
|
155
155
|
* @baseUrl ../
|
|
156
156
|
*/
|
|
157
157
|
class Api extends HttpClient {
|
|
@@ -811,6 +811,22 @@ class Api extends HttpClient {
|
|
|
811
811
|
format: 'json',
|
|
812
812
|
...params
|
|
813
813
|
}).then(utils_1.convertHttpResponse),
|
|
814
|
+
/**
|
|
815
|
+
* No description
|
|
816
|
+
*
|
|
817
|
+
* @tags Transactions
|
|
818
|
+
* @name PostTransactionsBuildMultiAddresses
|
|
819
|
+
* @summary Build an unsigned transaction with multiple addresses to a number of recipients
|
|
820
|
+
* @request POST:/transactions/build-multi-addresses
|
|
821
|
+
*/
|
|
822
|
+
postTransactionsBuildMultiAddresses: (data, params = {}) => this.request({
|
|
823
|
+
path: `/transactions/build-multi-addresses`,
|
|
824
|
+
method: 'POST',
|
|
825
|
+
body: data,
|
|
826
|
+
type: ContentType.Json,
|
|
827
|
+
format: 'json',
|
|
828
|
+
...params
|
|
829
|
+
}).then(utils_1.convertHttpResponse),
|
|
814
830
|
/**
|
|
815
831
|
* No description
|
|
816
832
|
*
|
|
@@ -224,6 +224,7 @@ export interface DeployContractParams<P extends Fields = Fields> {
|
|
|
224
224
|
initialAttoAlphAmount?: Number256;
|
|
225
225
|
initialTokenAmounts?: Token[];
|
|
226
226
|
issueTokenAmount?: Number256;
|
|
227
|
+
issueTokenTo?: string;
|
|
227
228
|
gasAmount?: number;
|
|
228
229
|
gasPrice?: Number256;
|
|
229
230
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.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.
|
|
30
|
+
"alephium_version": "2.8.0",
|
|
31
31
|
"explorer_backend_version": "1.16.1"
|
|
32
32
|
},
|
|
33
33
|
"type": "commonjs",
|
package/src/api/api-alephium.ts
CHANGED
|
@@ -185,6 +185,8 @@ export interface BuildDeployContractTx {
|
|
|
185
185
|
initialTokenAmounts?: Token[]
|
|
186
186
|
/** @format uint256 */
|
|
187
187
|
issueTokenAmount?: string
|
|
188
|
+
/** @format address */
|
|
189
|
+
issueTokenTo?: string
|
|
188
190
|
/** @format gas */
|
|
189
191
|
gasAmount?: number
|
|
190
192
|
/** @format uint256 */
|
|
@@ -246,6 +248,14 @@ export interface BuildInfo {
|
|
|
246
248
|
commit: string
|
|
247
249
|
}
|
|
248
250
|
|
|
251
|
+
export interface BuildMultiAddressesTransaction {
|
|
252
|
+
from: Source[]
|
|
253
|
+
/** @format uint256 */
|
|
254
|
+
gasPrice?: string
|
|
255
|
+
/** @format block-hash */
|
|
256
|
+
targetBlockHash?: string
|
|
257
|
+
}
|
|
258
|
+
|
|
249
259
|
export interface BuildMultisig {
|
|
250
260
|
/** @format address */
|
|
251
261
|
fromAddress: string
|
|
@@ -773,6 +783,17 @@ export interface SignResult {
|
|
|
773
783
|
signature: string
|
|
774
784
|
}
|
|
775
785
|
|
|
786
|
+
export interface Source {
|
|
787
|
+
/** @format hex-string */
|
|
788
|
+
fromPublicKey: string
|
|
789
|
+
destinations: Destination[]
|
|
790
|
+
/** @format hex-string */
|
|
791
|
+
fromPublicKeyType?: string
|
|
792
|
+
/** @format gas */
|
|
793
|
+
gasAmount?: number
|
|
794
|
+
utxos?: OutputRef[]
|
|
795
|
+
}
|
|
796
|
+
|
|
776
797
|
export interface SubmitMultisig {
|
|
777
798
|
unsignedTx: string
|
|
778
799
|
signatures: string[]
|
|
@@ -1256,7 +1277,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
1256
1277
|
|
|
1257
1278
|
/**
|
|
1258
1279
|
* @title Alephium API
|
|
1259
|
-
* @version 2.
|
|
1280
|
+
* @version 2.8.0
|
|
1260
1281
|
* @baseUrl ../
|
|
1261
1282
|
*/
|
|
1262
1283
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -2114,6 +2135,27 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2114
2135
|
...params
|
|
2115
2136
|
}).then(convertHttpResponse),
|
|
2116
2137
|
|
|
2138
|
+
/**
|
|
2139
|
+
* No description
|
|
2140
|
+
*
|
|
2141
|
+
* @tags Transactions
|
|
2142
|
+
* @name PostTransactionsBuildMultiAddresses
|
|
2143
|
+
* @summary Build an unsigned transaction with multiple addresses to a number of recipients
|
|
2144
|
+
* @request POST:/transactions/build-multi-addresses
|
|
2145
|
+
*/
|
|
2146
|
+
postTransactionsBuildMultiAddresses: (data: BuildMultiAddressesTransaction, params: RequestParams = {}) =>
|
|
2147
|
+
this.request<
|
|
2148
|
+
BuildTransactionResult,
|
|
2149
|
+
BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable
|
|
2150
|
+
>({
|
|
2151
|
+
path: `/transactions/build-multi-addresses`,
|
|
2152
|
+
method: 'POST',
|
|
2153
|
+
body: data,
|
|
2154
|
+
type: ContentType.Json,
|
|
2155
|
+
format: 'json',
|
|
2156
|
+
...params
|
|
2157
|
+
}).then(convertHttpResponse),
|
|
2158
|
+
|
|
2117
2159
|
/**
|
|
2118
2160
|
* No description
|
|
2119
2161
|
*
|
package/src/contract/contract.ts
CHANGED
|
@@ -1410,6 +1410,7 @@ export interface DeployContractParams<P extends Fields = Fields> {
|
|
|
1410
1410
|
initialAttoAlphAmount?: Number256
|
|
1411
1411
|
initialTokenAmounts?: Token[]
|
|
1412
1412
|
issueTokenAmount?: Number256
|
|
1413
|
+
issueTokenTo?: string
|
|
1413
1414
|
gasAmount?: number
|
|
1414
1415
|
gasPrice?: Number256
|
|
1415
1416
|
}
|