@hiero-ledger/sdk 2.78.0-beta.2 → 2.78.0-beta.3

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/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
- const e="hiero-sdk-js",o="2.78.0-beta.2";export{e as SDK_NAME,o as SDK_VERSION};
1
+ const e="hiero-sdk-js",o="2.78.0-beta.3";export{e as SDK_NAME,o as SDK_VERSION};
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiero-ledger/sdk",
3
- "version": "2.78.0-beta.2",
3
+ "version": "2.78.0-beta.3",
4
4
  "description": "Hiero SDK",
5
5
  "types": "./lib/index.d.ts",
6
6
  "main": "./lib/index.cjs",
@@ -66,7 +66,7 @@
66
66
  "@ethersproject/rlp": "5.8.0",
67
67
  "@grpc/grpc-js": "1.12.6",
68
68
  "@hiero-ledger/cryptography": "1.15.0",
69
- "@hiero-ledger/proto": "2.24.0",
69
+ "@hiero-ledger/proto": "2.25.0",
70
70
  "ansi-regex": "6.2.2",
71
71
  "ansi-styles": "6.2.3",
72
72
  "bignumber.js": "9.1.1",
@@ -39,6 +39,8 @@ export default class FeeDataType {
39
39
  return "TOPIC_CREATE_WITH_CUSTOM_FEES";
40
40
  case FeeDataType.SubmitMessageWithCustomFees:
41
41
  return "SUBMIT_MESSAGE_WITH_CUSTOM_FEES";
42
+ case FeeDataType.CryptoTransferWithHooks:
43
+ return "CRYPTO_TRANSFER_WITH_HOOKS";
42
44
  default:
43
45
  return `UNKNOWN (${this._code})`;
44
46
  }
@@ -67,6 +69,8 @@ export default class FeeDataType {
67
69
  return FeeDataType.TopicCreateWithCustomFees;
68
70
  case 7:
69
71
  return FeeDataType.SubmitMessageWithCustomFees;
72
+ case 8:
73
+ return FeeDataType.CryptoTransferWithHooks;
70
74
  }
71
75
 
72
76
  throw new Error(
@@ -123,3 +127,8 @@ FeeDataType.TopicCreateWithCustomFees = new FeeDataType(6);
123
127
  * for a topic with custom fees.
124
128
  */
125
129
  FeeDataType.SubmitMessageWithCustomFees = new FeeDataType(7);
130
+
131
+ /**
132
+ * The resource cost for the transaction type includes a CryptoTransfer with hook invocations.
133
+ */
134
+ FeeDataType.CryptoTransferWithHooks = new FeeDataType(8);
@@ -213,6 +213,10 @@ export default class RequestType {
213
213
  return "CrsPublication";
214
214
  case RequestType.AtomicBatch:
215
215
  return "AtomicBatch";
216
+ case RequestType.LambdaSStore:
217
+ return "LambdaSStore";
218
+ case RequestType.HookDispatch:
219
+ return "HookDispatch";
216
220
  default:
217
221
  return `UNKNOWN (${this._code})`;
218
222
  }
@@ -415,6 +419,10 @@ export default class RequestType {
415
419
  return RequestType.CrsPublication;
416
420
  case 108:
417
421
  return RequestType.AtomicBatch;
422
+ case 109:
423
+ return RequestType.LambdaSStore;
424
+ case 110:
425
+ return RequestType.HookDispatch;
418
426
  }
419
427
 
420
428
  throw new Error(
@@ -918,3 +926,13 @@ RequestType.HistoryProofVote = new RequestType(106);
918
926
  * Sign a particular atomic batch.
919
927
  */
920
928
  RequestType.AtomicBatch = new RequestType(108);
929
+
930
+ /**
931
+ * lambda s store
932
+ */
933
+ RequestType.LambdaSStore = new RequestType(109);
934
+
935
+ /**
936
+ * hook dispatch
937
+ */
938
+ RequestType.HookDispatch = new RequestType(110);
package/src/Status.js CHANGED
@@ -742,6 +742,64 @@ export default class Status {
742
742
  return "GRPC_WEB_PROXY_NOT_SUPPORTED";
743
743
  case Status.NftTransfersOnlyAllowedForNonFungibleUnique:
744
744
  return "NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE";
745
+ case Status.InvalidSerializedTxMessageHashAlgorithm:
746
+ return "INVALID_SERIALIZED_TX_MESSAGE_HASH_ALGORITHM";
747
+ case Status.WrongHookEntityType:
748
+ return "WRONG_HOOK_ENTITY_TYPE";
749
+ case Status.EvmHookGasThrottled:
750
+ return "EVM_HOOK_GAS_THROTTLED";
751
+ case Status.HookIdInUse:
752
+ return "HOOK_ID_IN_USE";
753
+ case Status.BadHookRequest:
754
+ return "BAD_HOOK_REQUEST";
755
+ case Status.RejectedByAccountAllowanceHook:
756
+ return "REJECTED_BY_ACCOUNT_ALLOWANCE_HOOK";
757
+ case Status.HookNotFound:
758
+ return "HOOK_NOT_FOUND";
759
+ case Status.LambdaStorageUpdateBytesTooLong:
760
+ return "LAMBDA_STORAGE_UPDATE_BYTES_TOO_LONG";
761
+ case Status.LambdaStorageUpdateBytesMustUseMinimalRepresentation:
762
+ return "LAMBDA_STORAGE_UPDATE_BYTES_MUST_USE_MINIMAL_REPRESENTATION";
763
+ case Status.InvalidHookId:
764
+ return "INVALID_HOOK_ID";
765
+ case Status.EmptyLambdaStorageUpdate:
766
+ return "EMPTY_LAMBDA_STORAGE_UPDATE";
767
+ case Status.HookIdRepeatedInCreationDetails:
768
+ return "HOOK_ID_REPEATED_IN_CREATION_DETAILS";
769
+ case Status.HooksNotEnabled:
770
+ return "HOOKS_NOT_ENABLED";
771
+ case Status.HookIsNotALambda:
772
+ return "HOOK_IS_NOT_A_LAMBDA";
773
+ case Status.HookDeleted:
774
+ return "HOOK_DELETED";
775
+ case Status.TooManyLambdaStorageUpdates:
776
+ return "TOO_MANY_LAMBDA_STORAGE_UPDATES";
777
+ case Status.HookCreationBytesMustUseMinimalRepresentation:
778
+ return "HOOK_CREATION_BYTES_MUST_USE_MINIMAL_REPRESENTATION";
779
+ case Status.HookCreationBytesTooLong:
780
+ return "HOOK_CREATION_BYTES_TOO_LONG";
781
+ case Status.InvalidHookCreationSpec:
782
+ return "INVALID_HOOK_CREATION_SPEC";
783
+ case Status.HookExtensionEmpty:
784
+ return "HOOK_EXTENSION_EMPTY";
785
+ case Status.InvalidHookAdminKey:
786
+ return "INVALID_HOOK_ADMIN_KEY";
787
+ case Status.HookDeletionRequiresZeroStorageSlots:
788
+ return "HOOK_DELETION_REQUIRES_ZERO_STORAGE_SLOTS";
789
+ case Status.CannotSetHooksAndApproval:
790
+ return "CANNOT_SET_HOOKS_AND_APPROVAL";
791
+ case Status.TransactionRequiresZeroHooks:
792
+ return "TRANSACTION_REQUIRES_ZERO_HOOKS";
793
+ case Status.InvalidHookCall:
794
+ return "INVALID_HOOK_CALL";
795
+ case Status.HooksAreNotSupportedInAirdrops:
796
+ return "HOOKS_ARE_NOT_SUPPORTED_IN_AIRDROPS";
797
+ case Status.AccountIsLinkedToANode:
798
+ return "ACCOUNT_IS_LINKED_TO_A_NODE";
799
+ case Status.HooksExecutionsRequireTopLevelCryptoTransfer:
800
+ return "HOOKS_EXECUTIONS_REQUIRE_TOP_LEVEL_CRYPTO_TRANSFER";
801
+ case Status.NodeAccountHasZeroBalance:
802
+ return "NODE_ACCOUNT_HAS_ZERO_BALANCE";
745
803
  default:
746
804
  return `UNKNOWN (${this._code})`;
747
805
  }
@@ -1472,6 +1530,64 @@ export default class Status {
1472
1530
  return Status.GrpcWebProxyNotSupported;
1473
1531
  case 400:
1474
1532
  return Status.NftTransfersOnlyAllowedForNonFungibleUnique;
1533
+ case 401:
1534
+ return Status.InvalidSerializedTxMessageHashAlgorithm;
1535
+ case 499:
1536
+ return Status.WrongHookEntityType;
1537
+ case 500:
1538
+ return Status.EvmHookGasThrottled;
1539
+ case 501:
1540
+ return Status.HookIdInUse;
1541
+ case 502:
1542
+ return Status.BadHookRequest;
1543
+ case 503:
1544
+ return Status.RejectedByAccountAllowanceHook;
1545
+ case 504:
1546
+ return Status.HookNotFound;
1547
+ case 505:
1548
+ return Status.LambdaStorageUpdateBytesTooLong;
1549
+ case 506:
1550
+ return Status.LambdaStorageUpdateBytesMustUseMinimalRepresentation;
1551
+ case 507:
1552
+ return Status.InvalidHookId;
1553
+ case 508:
1554
+ return Status.EmptyLambdaStorageUpdate;
1555
+ case 509:
1556
+ return Status.HookIdRepeatedInCreationDetails;
1557
+ case 510:
1558
+ return Status.HooksNotEnabled;
1559
+ case 511:
1560
+ return Status.HookIsNotALambda;
1561
+ case 512:
1562
+ return Status.HookDeleted;
1563
+ case 513:
1564
+ return Status.TooManyLambdaStorageUpdates;
1565
+ case 514:
1566
+ return Status.HookCreationBytesMustUseMinimalRepresentation;
1567
+ case 515:
1568
+ return Status.HookCreationBytesTooLong;
1569
+ case 516:
1570
+ return Status.InvalidHookCreationSpec;
1571
+ case 517:
1572
+ return Status.HookExtensionEmpty;
1573
+ case 518:
1574
+ return Status.InvalidHookAdminKey;
1575
+ case 519:
1576
+ return Status.HookDeletionRequiresZeroStorageSlots;
1577
+ case 520:
1578
+ return Status.CannotSetHooksAndApproval;
1579
+ case 521:
1580
+ return Status.TransactionRequiresZeroHooks;
1581
+ case 522:
1582
+ return Status.InvalidHookCall;
1583
+ case 523:
1584
+ return Status.HooksAreNotSupportedInAirdrops;
1585
+ case 524:
1586
+ return Status.AccountIsLinkedToANode;
1587
+ case 525:
1588
+ return Status.HooksExecutionsRequireTopLevelCryptoTransfer;
1589
+ case 526:
1590
+ return Status.NodeAccountHasZeroBalance;
1475
1591
  default:
1476
1592
  throw new Error(
1477
1593
  `(BUG) Status.fromCode() does not handle code: ${code}`,
@@ -3351,3 +3467,148 @@ Status.GrpcWebProxyNotSupported = new Status(399);
3351
3467
  * An NFT transfers list referenced a token type other than NON_FUNGIBLE_UNIQUE.
3352
3468
  */
3353
3469
  Status.NftTransfersOnlyAllowedForNonFungibleUnique = new Status(400);
3470
+
3471
+ /**
3472
+ * invalid serialized tx message hash algorithm
3473
+ */
3474
+ Status.InvalidSerializedTxMessageHashAlgorithm = new Status(401);
3475
+
3476
+ /**
3477
+ * wrong hook entity type
3478
+ */
3479
+ Status.WrongHookEntityType = new Status(499);
3480
+
3481
+ /**
3482
+ * evm hook gas throttled
3483
+ */
3484
+ Status.EvmHookGasThrottled = new Status(500);
3485
+
3486
+ /**
3487
+ * hook id in use
3488
+ */
3489
+ Status.HookIdInUse = new Status(501);
3490
+
3491
+ /**
3492
+ * bad hook request
3493
+ */
3494
+ Status.BadHookRequest = new Status(502);
3495
+
3496
+ /**
3497
+ * rejected by account allowance hook
3498
+ */
3499
+ Status.RejectedByAccountAllowanceHook = new Status(503);
3500
+
3501
+ /**
3502
+ * hook not found
3503
+ */
3504
+ Status.HookNotFound = new Status(504);
3505
+
3506
+ /**
3507
+ * lambda storage update bytes too long
3508
+ */
3509
+ Status.LambdaStorageUpdateBytesTooLong = new Status(505);
3510
+
3511
+ /**
3512
+ * lambda storage update bytes must use minimal representation
3513
+ */
3514
+ Status.LambdaStorageUpdateBytesMustUseMinimalRepresentation = new Status(506);
3515
+
3516
+ /**
3517
+ * invalid hook id
3518
+ */
3519
+ Status.InvalidHookId = new Status(507);
3520
+
3521
+ /**
3522
+ * empty lambda storage update
3523
+ */
3524
+ Status.EmptyLambdaStorageUpdate = new Status(508);
3525
+
3526
+ /**
3527
+ * hook id repeated in creation details
3528
+ */
3529
+ Status.HookIdRepeatedInCreationDetails = new Status(509);
3530
+
3531
+ /**
3532
+ * hooks not enabled
3533
+ */
3534
+ Status.HooksNotEnabled = new Status(510);
3535
+
3536
+ /**
3537
+ * hook is not a lambda
3538
+ */
3539
+ Status.HookIsNotALambda = new Status(511);
3540
+
3541
+ /**
3542
+ * hook deleted
3543
+ */
3544
+ Status.HookDeleted = new Status(512);
3545
+
3546
+ /**
3547
+ * too many lambda storage updates
3548
+ */
3549
+ Status.TooManyLambdaStorageUpdates = new Status(513);
3550
+
3551
+ /**
3552
+ * hook creation bytes must use minimal representation
3553
+ */
3554
+ Status.HookCreationBytesMustUseMinimalRepresentation = new Status(514);
3555
+
3556
+ /**
3557
+ * hook creation bytes too long
3558
+ */
3559
+ Status.HookCreationBytesTooLong = new Status(515);
3560
+
3561
+ /**
3562
+ * invalid hook creation spec
3563
+ */
3564
+ Status.InvalidHookCreationSpec = new Status(516);
3565
+
3566
+ /**
3567
+ * hook extension empty
3568
+ */
3569
+ Status.HookExtensionEmpty = new Status(517);
3570
+
3571
+ /**
3572
+ * invalid hook admin key
3573
+ */
3574
+ Status.InvalidHookAdminKey = new Status(518);
3575
+
3576
+ /**
3577
+ * hook deletion requires zero storage slots
3578
+ */
3579
+ Status.HookDeletionRequiresZeroStorageSlots = new Status(519);
3580
+
3581
+ /**
3582
+ * cannot set hooks and approval
3583
+ */
3584
+ Status.CannotSetHooksAndApproval = new Status(520);
3585
+
3586
+ /**
3587
+ * transaction requires zero hooks
3588
+ */
3589
+ Status.TransactionRequiresZeroHooks = new Status(521);
3590
+
3591
+ /**
3592
+ * invalid hook call
3593
+ */
3594
+ Status.InvalidHookCall = new Status(522);
3595
+
3596
+ /**
3597
+ * hooks are not supported in airdrops
3598
+ */
3599
+ Status.HooksAreNotSupportedInAirdrops = new Status(523);
3600
+
3601
+ /**
3602
+ * account is linked to a node
3603
+ */
3604
+ Status.AccountIsLinkedToANode = new Status(524);
3605
+
3606
+ /**
3607
+ * hooks executions require top level crypto transfer
3608
+ */
3609
+ Status.HooksExecutionsRequireTopLevelCryptoTransfer = new Status(525);
3610
+
3611
+ /**
3612
+ * node account has zero balance
3613
+ */
3614
+ Status.NodeAccountHasZeroBalance = new Status(526);