@fuel-ts/account 0.94.6 → 0.94.8
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/connectors/fuel-connector.d.ts +1 -0
- package/dist/connectors/fuel-connector.d.ts.map +1 -1
- package/dist/index.global.js +450 -381
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +28 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -80
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +1 -0
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/assets/assets.d.ts.map +1 -1
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -1
- package/dist/providers/utils/receipts.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils.global.js +798 -3601
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +28 -87
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +28 -87
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +24 -25
package/dist/test-utils.js
CHANGED
@@ -64,7 +64,6 @@ var import_utils2 = require("@fuel-ts/utils");
|
|
64
64
|
var import_fs = require("fs");
|
65
65
|
var import_os = __toESM(require("os"));
|
66
66
|
var import_path = __toESM(require("path"));
|
67
|
-
var import_portfinder = require("portfinder");
|
68
67
|
|
69
68
|
// src/signer/signer.ts
|
70
69
|
var import_address = require("@fuel-ts/address");
|
@@ -257,12 +256,7 @@ var launchNode = async ({
|
|
257
256
|
const graphQLStartSubstring = "Binding GraphQL provider to";
|
258
257
|
const command = fuelCorePath || "fuel-core";
|
259
258
|
const ipToUse = ip || "0.0.0.0";
|
260
|
-
const portToUse = port ||
|
261
|
-
port: 4e3,
|
262
|
-
// tries 4000 first, then 4001, then 4002, etc.
|
263
|
-
stopPort: 5e3
|
264
|
-
// don't try ports above 5000
|
265
|
-
})).toString();
|
259
|
+
const portToUse = port || "0";
|
266
260
|
let snapshotDirToUse;
|
267
261
|
const prefix = basePath || import_os.default.tmpdir();
|
268
262
|
const suffix = basePath ? "" : (0, import_crypto2.randomUUID)();
|
@@ -1828,6 +1822,7 @@ function assembleReceiptByType(receipt) {
|
|
1828
1822
|
len: (0, import_math5.bn)(receipt.len),
|
1829
1823
|
digest: hexOrZero(receipt.digest),
|
1830
1824
|
pc: (0, import_math5.bn)(receipt.pc),
|
1825
|
+
data: hexOrZero(receipt.data),
|
1831
1826
|
is: (0, import_math5.bn)(receipt.is)
|
1832
1827
|
};
|
1833
1828
|
return returnDataReceipt;
|
@@ -1876,6 +1871,7 @@ function assembleReceiptByType(receipt) {
|
|
1876
1871
|
len: (0, import_math5.bn)(receipt.len),
|
1877
1872
|
digest: hexOrZero(receipt.digest),
|
1878
1873
|
pc: (0, import_math5.bn)(receipt.pc),
|
1874
|
+
data: hexOrZero(receipt.data),
|
1879
1875
|
is: (0, import_math5.bn)(receipt.is)
|
1880
1876
|
};
|
1881
1877
|
return logDataReceipt;
|
@@ -1919,6 +1915,7 @@ function assembleReceiptByType(receipt) {
|
|
1919
1915
|
const amount = (0, import_math5.bn)(receipt.amount);
|
1920
1916
|
const data = receipt.data ? (0, import_utils7.arrayify)(receipt.data) : Uint8Array.from([]);
|
1921
1917
|
const digest = hexOrZero(receipt.digest);
|
1918
|
+
const len = (0, import_math5.bn)(receipt.len).toNumber();
|
1922
1919
|
const messageId = import_transactions3.InputMessageCoder.getMessageId({
|
1923
1920
|
sender,
|
1924
1921
|
recipient,
|
@@ -1932,6 +1929,7 @@ function assembleReceiptByType(receipt) {
|
|
1932
1929
|
recipient,
|
1933
1930
|
amount,
|
1934
1931
|
nonce,
|
1932
|
+
len,
|
1935
1933
|
data,
|
1936
1934
|
digest,
|
1937
1935
|
messageId
|
@@ -4137,25 +4135,7 @@ function getOperations({
|
|
4137
4135
|
|
4138
4136
|
// src/providers/transaction-summary/receipt.ts
|
4139
4137
|
var import_transactions18 = require("@fuel-ts/transactions");
|
4140
|
-
var processGqlReceipt = (gqlReceipt) =>
|
4141
|
-
const receipt = assembleReceiptByType(gqlReceipt);
|
4142
|
-
switch (receipt.type) {
|
4143
|
-
case import_transactions18.ReceiptType.ReturnData: {
|
4144
|
-
return {
|
4145
|
-
...receipt,
|
4146
|
-
data: gqlReceipt.data || "0x"
|
4147
|
-
};
|
4148
|
-
}
|
4149
|
-
case import_transactions18.ReceiptType.LogData: {
|
4150
|
-
return {
|
4151
|
-
...receipt,
|
4152
|
-
data: gqlReceipt.data || "0x"
|
4153
|
-
};
|
4154
|
-
}
|
4155
|
-
default:
|
4156
|
-
return receipt;
|
4157
|
-
}
|
4158
|
-
};
|
4138
|
+
var processGqlReceipt = (gqlReceipt) => assembleReceiptByType(gqlReceipt);
|
4159
4139
|
var extractMintedAssetsFromReceipts = (receipts) => {
|
4160
4140
|
const mintedAssets = [];
|
4161
4141
|
receipts.forEach((receipt) => {
|
@@ -6176,7 +6156,7 @@ var rawAssets = [
|
|
6176
6156
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6177
6157
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6178
6158
|
assetId: "0xa38a5a8beeb08d95744bc7f58528073f4052b254def59eba20c99c202b5acaa3",
|
6179
|
-
decimals:
|
6159
|
+
decimals: 9
|
6180
6160
|
}
|
6181
6161
|
]
|
6182
6162
|
},
|
@@ -6196,7 +6176,7 @@ var rawAssets = [
|
|
6196
6176
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6197
6177
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6198
6178
|
assetId: "0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab",
|
6199
|
-
decimals:
|
6179
|
+
decimals: 9
|
6200
6180
|
}
|
6201
6181
|
]
|
6202
6182
|
},
|
@@ -6216,7 +6196,7 @@ var rawAssets = [
|
|
6216
6196
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6217
6197
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6218
6198
|
assetId: "0xbae80f7fb8aa6b90d9b01ef726ec847cc4f59419c4d5f2ea88fec785d1b0e849",
|
6219
|
-
decimals:
|
6199
|
+
decimals: 9
|
6220
6200
|
}
|
6221
6201
|
]
|
6222
6202
|
},
|
@@ -6236,7 +6216,7 @@ var rawAssets = [
|
|
6236
6216
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6237
6217
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6238
6218
|
assetId: "0xf3f9a0ed0ce8eac5f89d6b83e41b3848212d5b5f56108c54a205bb228ca30c16",
|
6239
|
-
decimals:
|
6219
|
+
decimals: 9
|
6240
6220
|
}
|
6241
6221
|
]
|
6242
6222
|
},
|
@@ -6256,7 +6236,7 @@ var rawAssets = [
|
|
6256
6236
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6257
6237
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6258
6238
|
assetId: "0x7843c74bef935e837f2bcf67b5d64ecb46dd53ff86375530b0caf3699e8ffafe",
|
6259
|
-
decimals:
|
6239
|
+
decimals: 9
|
6260
6240
|
}
|
6261
6241
|
]
|
6262
6242
|
},
|
@@ -6276,7 +6256,7 @@ var rawAssets = [
|
|
6276
6256
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6277
6257
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6278
6258
|
assetId: "0x962792286fbc9b1d5860b4551362a12249362c21594c77abf4b3fe2bbe8d977a",
|
6279
|
-
decimals:
|
6259
|
+
decimals: 9
|
6280
6260
|
}
|
6281
6261
|
]
|
6282
6262
|
},
|
@@ -6296,7 +6276,7 @@ var rawAssets = [
|
|
6296
6276
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6297
6277
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6298
6278
|
assetId: "0x05fc623e57bd7bc1258efa8e4f62b05af5471d73df6f2c2dc11ecc81134c4f36",
|
6299
|
-
decimals:
|
6279
|
+
decimals: 9
|
6300
6280
|
}
|
6301
6281
|
]
|
6302
6282
|
},
|
@@ -6316,7 +6296,7 @@ var rawAssets = [
|
|
6316
6296
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6317
6297
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6318
6298
|
assetId: "0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b",
|
6319
|
-
decimals:
|
6299
|
+
decimals: 9
|
6320
6300
|
}
|
6321
6301
|
]
|
6322
6302
|
},
|
@@ -6336,7 +6316,7 @@ var rawAssets = [
|
|
6336
6316
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6337
6317
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6338
6318
|
assetId: "0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4",
|
6339
|
-
decimals:
|
6319
|
+
decimals: 9
|
6340
6320
|
}
|
6341
6321
|
]
|
6342
6322
|
},
|
@@ -6356,7 +6336,7 @@ var rawAssets = [
|
|
6356
6336
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6357
6337
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6358
6338
|
assetId: "0x89cb9401e55d49c3269654dd1cdfb0e80e57823a4a7db98ba8fc5953b120fef4",
|
6359
|
-
decimals:
|
6339
|
+
decimals: 9
|
6360
6340
|
}
|
6361
6341
|
]
|
6362
6342
|
},
|
@@ -6416,7 +6396,7 @@ var rawAssets = [
|
|
6416
6396
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6417
6397
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6418
6398
|
assetId: "0x1186afea9affb88809c210e13e2330b5258c2cef04bb8fff5eff372b7bd3f40f",
|
6419
|
-
decimals:
|
6399
|
+
decimals: 9
|
6420
6400
|
}
|
6421
6401
|
]
|
6422
6402
|
},
|
@@ -6436,7 +6416,7 @@ var rawAssets = [
|
|
6436
6416
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6437
6417
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6438
6418
|
assetId: "0x7a4f087c957d30218223c2baaaa365355c9ca81b6ea49004cfb1590a5399216f",
|
6439
|
-
decimals:
|
6419
|
+
decimals: 9
|
6440
6420
|
}
|
6441
6421
|
]
|
6442
6422
|
},
|
@@ -6456,7 +6436,7 @@ var rawAssets = [
|
|
6456
6436
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6457
6437
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6458
6438
|
assetId: "0x642a5db59ec323c2f846d4d4cf3e58d78aff64accf4f8f6455ba0aa3ef000a3b",
|
6459
|
-
decimals:
|
6439
|
+
decimals: 9
|
6460
6440
|
}
|
6461
6441
|
]
|
6462
6442
|
},
|
@@ -6476,7 +6456,7 @@ var rawAssets = [
|
|
6476
6456
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6477
6457
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6478
6458
|
assetId: "0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958",
|
6479
|
-
decimals:
|
6459
|
+
decimals: 9
|
6480
6460
|
}
|
6481
6461
|
]
|
6482
6462
|
},
|
@@ -6531,25 +6511,12 @@ var rawAssets = [
|
|
6531
6511
|
address: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
|
6532
6512
|
decimals: 18
|
6533
6513
|
},
|
6534
|
-
{
|
6535
|
-
type: "ethereum",
|
6536
|
-
chainId: CHAIN_IDS.eth.sepolia,
|
6537
|
-
address: "0xc6387efad0f184a90b34f397c3d6fd63135ef790",
|
6538
|
-
decimals: 18
|
6539
|
-
},
|
6540
6514
|
{
|
6541
6515
|
type: "fuel",
|
6542
6516
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6543
6517
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6544
6518
|
assetId: "0xb6133b2ef9f6153eb869125d23dcf20d1e735331b5e41b15a6a7a6cec70e8651",
|
6545
|
-
decimals:
|
6546
|
-
},
|
6547
|
-
{
|
6548
|
-
type: "fuel",
|
6549
|
-
chainId: CHAIN_IDS.fuel.testnet,
|
6550
|
-
contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
|
6551
|
-
assetId: "0xf5c6d72d0f2c782fa47d8e228c198a08654e9fc66ca60ad85902b1d09046a7ab",
|
6552
|
-
decimals: 18
|
6519
|
+
decimals: 9
|
6553
6520
|
}
|
6554
6521
|
]
|
6555
6522
|
},
|
@@ -6564,25 +6531,12 @@ var rawAssets = [
|
|
6564
6531
|
address: "0x9d39a5de30e57443bff2a8307a4256c8797a3497",
|
6565
6532
|
decimals: 18
|
6566
6533
|
},
|
6567
|
-
{
|
6568
|
-
type: "ethereum",
|
6569
|
-
chainId: CHAIN_IDS.eth.sepolia,
|
6570
|
-
address: "0xb8f4f4eafc1d2a3c0a4d519bbf1114c311cc9b1b",
|
6571
|
-
decimals: 18
|
6572
|
-
},
|
6573
6534
|
{
|
6574
6535
|
type: "fuel",
|
6575
6536
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6576
6537
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6577
6538
|
assetId: "0xd05563025104fc36496c15c7021ad6b31034b0e89a356f4f818045d1f48808bc",
|
6578
|
-
decimals:
|
6579
|
-
},
|
6580
|
-
{
|
6581
|
-
type: "fuel",
|
6582
|
-
chainId: CHAIN_IDS.fuel.testnet,
|
6583
|
-
contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
|
6584
|
-
assetId: "0xa86e37d385c08beddbb02c8260f9ec535d484c8ea908fc19d4e6dc8d5141fb2e",
|
6585
|
-
decimals: 18
|
6539
|
+
decimals: 9
|
6586
6540
|
}
|
6587
6541
|
]
|
6588
6542
|
},
|
@@ -6602,7 +6556,7 @@ var rawAssets = [
|
|
6602
6556
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6603
6557
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6604
6558
|
assetId: "0x78d4522ec607f6e8efb66ea49439d1ee48623cf763f9688a8eada025def033d9",
|
6605
|
-
decimals:
|
6559
|
+
decimals: 9
|
6606
6560
|
}
|
6607
6561
|
]
|
6608
6562
|
},
|
@@ -6617,25 +6571,12 @@ var rawAssets = [
|
|
6617
6571
|
address: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
6618
6572
|
decimals: 18
|
6619
6573
|
},
|
6620
|
-
{
|
6621
|
-
type: "ethereum",
|
6622
|
-
chainId: CHAIN_IDS.eth.sepolia,
|
6623
|
-
address: "0xB82381A3fBD3FaFA77B3a7bE693342618240067b",
|
6624
|
-
decimals: 18
|
6625
|
-
},
|
6626
6574
|
{
|
6627
6575
|
type: "fuel",
|
6628
6576
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6629
6577
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6630
6578
|
assetId: "0x1a7815cc9f75db5c24a5b0814bfb706bb9fe485333e98254015de8f48f84c67b",
|
6631
|
-
decimals:
|
6632
|
-
},
|
6633
|
-
{
|
6634
|
-
type: "fuel",
|
6635
|
-
chainId: CHAIN_IDS.fuel.testnet,
|
6636
|
-
contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
|
6637
|
-
assetId: "0x4c467e3fd4f32179e1aad3b92ebbdaa6ff6aeda5b8da5f8e64e96405eb52a7f5",
|
6638
|
-
decimals: 18
|
6579
|
+
decimals: 9
|
6639
6580
|
}
|
6640
6581
|
]
|
6641
6582
|
},
|
@@ -6655,7 +6596,7 @@ var rawAssets = [
|
|
6655
6596
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6656
6597
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6657
6598
|
assetId: "0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0",
|
6658
|
-
decimals:
|
6599
|
+
decimals: 9
|
6659
6600
|
}
|
6660
6601
|
]
|
6661
6602
|
},
|
@@ -6675,7 +6616,7 @@ var rawAssets = [
|
|
6675
6616
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6676
6617
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6677
6618
|
assetId: "0x1493d4ec82124de8f9b625682de69dcccda79e882b89a55a8c737b12de67bd68",
|
6678
|
-
decimals:
|
6619
|
+
decimals: 9
|
6679
6620
|
}
|
6680
6621
|
]
|
6681
6622
|
},
|
@@ -6695,7 +6636,7 @@ var rawAssets = [
|
|
6695
6636
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6696
6637
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6697
6638
|
assetId: "0xf2fc648c23a5db24610a1cf696acc4f0f6d9a7d6028dd9944964ab23f6e35995",
|
6698
|
-
decimals:
|
6639
|
+
decimals: 9
|
6699
6640
|
}
|
6700
6641
|
]
|
6701
6642
|
},
|
@@ -6715,7 +6656,7 @@ var rawAssets = [
|
|
6715
6656
|
chainId: CHAIN_IDS.fuel.mainnet,
|
6716
6657
|
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
6717
6658
|
assetId: "0x4fc8ac9f101df07e2c2dec4a53c8c42c439bdbe5e36ea2d863a61ff60afafc30",
|
6718
|
-
decimals:
|
6659
|
+
decimals: 9
|
6719
6660
|
}
|
6720
6661
|
]
|
6721
6662
|
}
|