@alephium/web3 1.11.5 → 1.11.7

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.
@@ -1,3 +1,11 @@
1
+ /** AddressAssetState */
2
+ export interface AddressAssetState {
3
+ /** @format address */
4
+ address: string;
5
+ /** @format uint256 */
6
+ attoAlphAmount: string;
7
+ tokens?: Token[];
8
+ }
1
9
  /** AddressBalance */
2
10
  export interface AddressBalance {
3
11
  /** @format address */
@@ -266,7 +274,7 @@ export interface BuildExecuteScriptTxResult {
266
274
  gasPrice: string;
267
275
  /** @format 32-byte-hash */
268
276
  txId: string;
269
- simulatedOutputs: Output[];
277
+ simulationResult: SimulationResult;
270
278
  }
271
279
  /** BuildInfo */
272
280
  export interface BuildInfo {
@@ -634,7 +642,7 @@ export interface Destination {
634
642
  /** @format address */
635
643
  address: string;
636
644
  /** @format uint256 */
637
- attoAlphAmount: string;
645
+ attoAlphAmount?: string;
638
646
  tokens?: Token[];
639
647
  /** @format int64 */
640
648
  lockTime?: number;
@@ -692,6 +700,10 @@ export interface FunctionSig {
692
700
  paramIsMutable: boolean[];
693
701
  returnTypes: string[];
694
702
  }
703
+ /** GatewayTimeout */
704
+ export interface GatewayTimeout {
705
+ detail: string;
706
+ }
695
707
  /** GhostUncleBlockEntry */
696
708
  export interface GhostUncleBlockEntry {
697
709
  /** @format block-hash */
@@ -967,6 +979,11 @@ export interface SignResult {
967
979
  /** @format signature */
968
980
  signature: string;
969
981
  }
982
+ /** SimulationResult */
983
+ export interface SimulationResult {
984
+ contractInputs: AddressAssetState[];
985
+ generatedOutputs: AddressAssetState[];
986
+ }
970
987
  /** Source */
971
988
  export interface Source {
972
989
  /** @format hex-string */
@@ -1054,7 +1071,7 @@ export interface TestContract {
1054
1071
  /** @format address */
1055
1072
  address?: string;
1056
1073
  /** @format address */
1057
- callerAddress?: string;
1074
+ callerContractAddress?: string;
1058
1075
  /** @format contract */
1059
1076
  bytecode: string;
1060
1077
  initialImmFields?: Val[];
@@ -1325,7 +1342,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
1325
1342
  }
1326
1343
  /**
1327
1344
  * @title Alephium API
1328
- * @version 3.10.0
1345
+ * @version 3.12.2
1329
1346
  * @baseUrl ../
1330
1347
  */
1331
1348
  export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
@@ -151,7 +151,7 @@ class HttpClient {
151
151
  exports.HttpClient = HttpClient;
152
152
  /**
153
153
  * @title Alephium API
154
- * @version 3.10.0
154
+ * @version 3.12.2
155
155
  * @baseUrl ../
156
156
  */
157
157
  class Api extends HttpClient {
@@ -310,7 +310,7 @@ class Contract extends Artifact {
310
310
  blockTimeStamp: params.blockTimeStamp,
311
311
  txId: params.txId,
312
312
  address: params.address,
313
- callerAddress: params.callerAddress,
313
+ callerContractAddress: params.callerAddress,
314
314
  bytecode: this.isInlineFunc(methodIndex) ? this.getByteCodeForTesting() : this.bytecodeDebug,
315
315
  initialImmFields: immFields,
316
316
  initialMutFields: mutFields,
@@ -240,6 +240,6 @@ function toApiDestinations(data) {
240
240
  }
241
241
  exports.toApiDestinations = toApiDestinations;
242
242
  function fromApiDestination(data) {
243
- return { ...data, attoAlphAmount: (0, api_1.fromApiNumber256)(data.attoAlphAmount), tokens: (0, api_1.fromApiTokens)(data.tokens) };
243
+ return { ...data, attoAlphAmount: (0, api_1.fromApiNumber256)(data.attoAlphAmount ?? '0'), tokens: (0, api_1.fromApiTokens)(data.tokens) };
244
244
  }
245
245
  exports.fromApiDestination = fromApiDestination;
@@ -1,5 +1,6 @@
1
1
  import { Number256, Token } from '../api';
2
2
  import { node } from '../api';
3
+ import { SimulationResult } from '../api/api-alephium';
3
4
  import { NetworkId } from '../utils';
4
5
  export type Address = string;
5
6
  export type OutputRef = node.OutputRef;
@@ -76,7 +77,7 @@ export interface SignExecuteScriptTxResult {
76
77
  signature: string;
77
78
  gasAmount: number;
78
79
  gasPrice: Number256;
79
- simulatedOutputs: node.Output[];
80
+ simulationResult: SimulationResult;
80
81
  }
81
82
  export interface SignUnsignedTxParams {
82
83
  signerAddress: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "1.11.5",
3
+ "version": "1.11.7",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "author": "Alephium dev <dev@alephium.org>",
35
35
  "config": {
36
- "alephium_version": "3.10.0",
36
+ "alephium_version": "3.12.2",
37
37
  "explorer_backend_version": "2.3.2"
38
38
  },
39
39
  "type": "commonjs",
@@ -45,7 +45,7 @@
45
45
  "bn.js": "5.2.1",
46
46
  "cross-fetch": "^3.1.5",
47
47
  "crypto-browserify": "^3.12.0",
48
- "elliptic": "6.6.0",
48
+ "elliptic": "6.6.1",
49
49
  "eventemitter3": "^4.0.7",
50
50
  "path-browserify": "^1.0.1",
51
51
  "stream-browserify": "^3.0.0"