@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/index.mjs CHANGED
@@ -1498,6 +1498,7 @@ function assembleReceiptByType(receipt) {
1498
1498
  len: bn4(receipt.len),
1499
1499
  digest: hexOrZero(receipt.digest),
1500
1500
  pc: bn4(receipt.pc),
1501
+ data: hexOrZero(receipt.data),
1501
1502
  is: bn4(receipt.is)
1502
1503
  };
1503
1504
  return returnDataReceipt;
@@ -1546,6 +1547,7 @@ function assembleReceiptByType(receipt) {
1546
1547
  len: bn4(receipt.len),
1547
1548
  digest: hexOrZero(receipt.digest),
1548
1549
  pc: bn4(receipt.pc),
1550
+ data: hexOrZero(receipt.data),
1549
1551
  is: bn4(receipt.is)
1550
1552
  };
1551
1553
  return logDataReceipt;
@@ -1589,6 +1591,7 @@ function assembleReceiptByType(receipt) {
1589
1591
  const amount = bn4(receipt.amount);
1590
1592
  const data = receipt.data ? arrayify2(receipt.data) : Uint8Array.from([]);
1591
1593
  const digest = hexOrZero(receipt.digest);
1594
+ const len = bn4(receipt.len).toNumber();
1592
1595
  const messageId = InputMessageCoder.getMessageId({
1593
1596
  sender,
1594
1597
  recipient,
@@ -1602,6 +1605,7 @@ function assembleReceiptByType(receipt) {
1602
1605
  recipient,
1603
1606
  amount,
1604
1607
  nonce,
1608
+ len,
1605
1609
  data,
1606
1610
  digest,
1607
1611
  messageId
@@ -3956,25 +3960,7 @@ function getOperations({
3956
3960
 
3957
3961
  // src/providers/transaction-summary/receipt.ts
3958
3962
  import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
3959
- var processGqlReceipt = (gqlReceipt) => {
3960
- const receipt = assembleReceiptByType(gqlReceipt);
3961
- switch (receipt.type) {
3962
- case ReceiptType5.ReturnData: {
3963
- return {
3964
- ...receipt,
3965
- data: gqlReceipt.data || "0x"
3966
- };
3967
- }
3968
- case ReceiptType5.LogData: {
3969
- return {
3970
- ...receipt,
3971
- data: gqlReceipt.data || "0x"
3972
- };
3973
- }
3974
- default:
3975
- return receipt;
3976
- }
3977
- };
3963
+ var processGqlReceipt = (gqlReceipt) => assembleReceiptByType(gqlReceipt);
3978
3964
  var extractMintedAssetsFromReceipts = (receipts) => {
3979
3965
  const mintedAssets = [];
3980
3966
  receipts.forEach((receipt) => {
@@ -6169,7 +6155,7 @@ var rawAssets = [
6169
6155
  chainId: CHAIN_IDS.fuel.mainnet,
6170
6156
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6171
6157
  assetId: "0xa38a5a8beeb08d95744bc7f58528073f4052b254def59eba20c99c202b5acaa3",
6172
- decimals: 18
6158
+ decimals: 9
6173
6159
  }
6174
6160
  ]
6175
6161
  },
@@ -6189,7 +6175,7 @@ var rawAssets = [
6189
6175
  chainId: CHAIN_IDS.fuel.mainnet,
6190
6176
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6191
6177
  assetId: "0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab",
6192
- decimals: 18
6178
+ decimals: 9
6193
6179
  }
6194
6180
  ]
6195
6181
  },
@@ -6209,7 +6195,7 @@ var rawAssets = [
6209
6195
  chainId: CHAIN_IDS.fuel.mainnet,
6210
6196
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6211
6197
  assetId: "0xbae80f7fb8aa6b90d9b01ef726ec847cc4f59419c4d5f2ea88fec785d1b0e849",
6212
- decimals: 18
6198
+ decimals: 9
6213
6199
  }
6214
6200
  ]
6215
6201
  },
@@ -6229,7 +6215,7 @@ var rawAssets = [
6229
6215
  chainId: CHAIN_IDS.fuel.mainnet,
6230
6216
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6231
6217
  assetId: "0xf3f9a0ed0ce8eac5f89d6b83e41b3848212d5b5f56108c54a205bb228ca30c16",
6232
- decimals: 18
6218
+ decimals: 9
6233
6219
  }
6234
6220
  ]
6235
6221
  },
@@ -6249,7 +6235,7 @@ var rawAssets = [
6249
6235
  chainId: CHAIN_IDS.fuel.mainnet,
6250
6236
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6251
6237
  assetId: "0x7843c74bef935e837f2bcf67b5d64ecb46dd53ff86375530b0caf3699e8ffafe",
6252
- decimals: 18
6238
+ decimals: 9
6253
6239
  }
6254
6240
  ]
6255
6241
  },
@@ -6269,7 +6255,7 @@ var rawAssets = [
6269
6255
  chainId: CHAIN_IDS.fuel.mainnet,
6270
6256
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6271
6257
  assetId: "0x962792286fbc9b1d5860b4551362a12249362c21594c77abf4b3fe2bbe8d977a",
6272
- decimals: 18
6258
+ decimals: 9
6273
6259
  }
6274
6260
  ]
6275
6261
  },
@@ -6289,7 +6275,7 @@ var rawAssets = [
6289
6275
  chainId: CHAIN_IDS.fuel.mainnet,
6290
6276
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6291
6277
  assetId: "0x05fc623e57bd7bc1258efa8e4f62b05af5471d73df6f2c2dc11ecc81134c4f36",
6292
- decimals: 18
6278
+ decimals: 9
6293
6279
  }
6294
6280
  ]
6295
6281
  },
@@ -6309,7 +6295,7 @@ var rawAssets = [
6309
6295
  chainId: CHAIN_IDS.fuel.mainnet,
6310
6296
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6311
6297
  assetId: "0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b",
6312
- decimals: 18
6298
+ decimals: 9
6313
6299
  }
6314
6300
  ]
6315
6301
  },
@@ -6329,7 +6315,7 @@ var rawAssets = [
6329
6315
  chainId: CHAIN_IDS.fuel.mainnet,
6330
6316
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6331
6317
  assetId: "0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4",
6332
- decimals: 18
6318
+ decimals: 9
6333
6319
  }
6334
6320
  ]
6335
6321
  },
@@ -6349,7 +6335,7 @@ var rawAssets = [
6349
6335
  chainId: CHAIN_IDS.fuel.mainnet,
6350
6336
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6351
6337
  assetId: "0x89cb9401e55d49c3269654dd1cdfb0e80e57823a4a7db98ba8fc5953b120fef4",
6352
- decimals: 18
6338
+ decimals: 9
6353
6339
  }
6354
6340
  ]
6355
6341
  },
@@ -6409,7 +6395,7 @@ var rawAssets = [
6409
6395
  chainId: CHAIN_IDS.fuel.mainnet,
6410
6396
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6411
6397
  assetId: "0x1186afea9affb88809c210e13e2330b5258c2cef04bb8fff5eff372b7bd3f40f",
6412
- decimals: 18
6398
+ decimals: 9
6413
6399
  }
6414
6400
  ]
6415
6401
  },
@@ -6429,7 +6415,7 @@ var rawAssets = [
6429
6415
  chainId: CHAIN_IDS.fuel.mainnet,
6430
6416
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6431
6417
  assetId: "0x7a4f087c957d30218223c2baaaa365355c9ca81b6ea49004cfb1590a5399216f",
6432
- decimals: 18
6418
+ decimals: 9
6433
6419
  }
6434
6420
  ]
6435
6421
  },
@@ -6449,7 +6435,7 @@ var rawAssets = [
6449
6435
  chainId: CHAIN_IDS.fuel.mainnet,
6450
6436
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6451
6437
  assetId: "0x642a5db59ec323c2f846d4d4cf3e58d78aff64accf4f8f6455ba0aa3ef000a3b",
6452
- decimals: 18
6438
+ decimals: 9
6453
6439
  }
6454
6440
  ]
6455
6441
  },
@@ -6469,7 +6455,7 @@ var rawAssets = [
6469
6455
  chainId: CHAIN_IDS.fuel.mainnet,
6470
6456
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6471
6457
  assetId: "0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958",
6472
- decimals: 18
6458
+ decimals: 9
6473
6459
  }
6474
6460
  ]
6475
6461
  },
@@ -6524,25 +6510,12 @@ var rawAssets = [
6524
6510
  address: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
6525
6511
  decimals: 18
6526
6512
  },
6527
- {
6528
- type: "ethereum",
6529
- chainId: CHAIN_IDS.eth.sepolia,
6530
- address: "0xc6387efad0f184a90b34f397c3d6fd63135ef790",
6531
- decimals: 18
6532
- },
6533
6513
  {
6534
6514
  type: "fuel",
6535
6515
  chainId: CHAIN_IDS.fuel.mainnet,
6536
6516
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6537
6517
  assetId: "0xb6133b2ef9f6153eb869125d23dcf20d1e735331b5e41b15a6a7a6cec70e8651",
6538
- decimals: 18
6539
- },
6540
- {
6541
- type: "fuel",
6542
- chainId: CHAIN_IDS.fuel.testnet,
6543
- contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
6544
- assetId: "0xf5c6d72d0f2c782fa47d8e228c198a08654e9fc66ca60ad85902b1d09046a7ab",
6545
- decimals: 18
6518
+ decimals: 9
6546
6519
  }
6547
6520
  ]
6548
6521
  },
@@ -6557,25 +6530,12 @@ var rawAssets = [
6557
6530
  address: "0x9d39a5de30e57443bff2a8307a4256c8797a3497",
6558
6531
  decimals: 18
6559
6532
  },
6560
- {
6561
- type: "ethereum",
6562
- chainId: CHAIN_IDS.eth.sepolia,
6563
- address: "0xb8f4f4eafc1d2a3c0a4d519bbf1114c311cc9b1b",
6564
- decimals: 18
6565
- },
6566
6533
  {
6567
6534
  type: "fuel",
6568
6535
  chainId: CHAIN_IDS.fuel.mainnet,
6569
6536
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6570
6537
  assetId: "0xd05563025104fc36496c15c7021ad6b31034b0e89a356f4f818045d1f48808bc",
6571
- decimals: 18
6572
- },
6573
- {
6574
- type: "fuel",
6575
- chainId: CHAIN_IDS.fuel.testnet,
6576
- contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
6577
- assetId: "0xa86e37d385c08beddbb02c8260f9ec535d484c8ea908fc19d4e6dc8d5141fb2e",
6578
- decimals: 18
6538
+ decimals: 9
6579
6539
  }
6580
6540
  ]
6581
6541
  },
@@ -6595,7 +6555,7 @@ var rawAssets = [
6595
6555
  chainId: CHAIN_IDS.fuel.mainnet,
6596
6556
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6597
6557
  assetId: "0x78d4522ec607f6e8efb66ea49439d1ee48623cf763f9688a8eada025def033d9",
6598
- decimals: 18
6558
+ decimals: 9
6599
6559
  }
6600
6560
  ]
6601
6561
  },
@@ -6610,25 +6570,12 @@ var rawAssets = [
6610
6570
  address: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
6611
6571
  decimals: 18
6612
6572
  },
6613
- {
6614
- type: "ethereum",
6615
- chainId: CHAIN_IDS.eth.sepolia,
6616
- address: "0xB82381A3fBD3FaFA77B3a7bE693342618240067b",
6617
- decimals: 18
6618
- },
6619
6573
  {
6620
6574
  type: "fuel",
6621
6575
  chainId: CHAIN_IDS.fuel.mainnet,
6622
6576
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6623
6577
  assetId: "0x1a7815cc9f75db5c24a5b0814bfb706bb9fe485333e98254015de8f48f84c67b",
6624
- decimals: 18
6625
- },
6626
- {
6627
- type: "fuel",
6628
- chainId: CHAIN_IDS.fuel.testnet,
6629
- contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
6630
- assetId: "0x4c467e3fd4f32179e1aad3b92ebbdaa6ff6aeda5b8da5f8e64e96405eb52a7f5",
6631
- decimals: 18
6578
+ decimals: 9
6632
6579
  }
6633
6580
  ]
6634
6581
  },
@@ -6648,7 +6595,7 @@ var rawAssets = [
6648
6595
  chainId: CHAIN_IDS.fuel.mainnet,
6649
6596
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6650
6597
  assetId: "0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0",
6651
- decimals: 18
6598
+ decimals: 9
6652
6599
  }
6653
6600
  ]
6654
6601
  },
@@ -6668,7 +6615,7 @@ var rawAssets = [
6668
6615
  chainId: CHAIN_IDS.fuel.mainnet,
6669
6616
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6670
6617
  assetId: "0x1493d4ec82124de8f9b625682de69dcccda79e882b89a55a8c737b12de67bd68",
6671
- decimals: 18
6618
+ decimals: 9
6672
6619
  }
6673
6620
  ]
6674
6621
  },
@@ -6688,7 +6635,7 @@ var rawAssets = [
6688
6635
  chainId: CHAIN_IDS.fuel.mainnet,
6689
6636
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6690
6637
  assetId: "0xf2fc648c23a5db24610a1cf696acc4f0f6d9a7d6028dd9944964ab23f6e35995",
6691
- decimals: 18
6638
+ decimals: 9
6692
6639
  }
6693
6640
  ]
6694
6641
  },
@@ -6708,7 +6655,7 @@ var rawAssets = [
6708
6655
  chainId: CHAIN_IDS.fuel.mainnet,
6709
6656
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6710
6657
  assetId: "0x4fc8ac9f101df07e2c2dec4a53c8c42c439bdbe5e36ea2d863a61ff60afafc30",
6711
- decimals: 18
6658
+ decimals: 9
6712
6659
  }
6713
6660
  ]
6714
6661
  }
@@ -11057,6 +11004,7 @@ var FuelConnector = class extends EventEmitter2 {
11057
11004
  metadata = {};
11058
11005
  connected = false;
11059
11006
  installed = false;
11007
+ external = true;
11060
11008
  events = FuelConnectorEventTypes;
11061
11009
  /**
11062
11010
  * Should return true if the connector is loaded