@stacks/codec 2.0.0-pox5.2 → 2.0.0-pox5.4
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/index.d.ts +104 -6
- package/index.js +6 -0
- package/index.mjs +6 -0
- package/native/darwin-arm64.node +0 -0
- package/native/linux-arm64-glibc.node +0 -0
- package/native/linux-arm64-musl.node +0 -0
- package/native/linux-x64-glibc.node +0 -0
- package/native/linux-x64-musl.node +0 -0
- package/native/win32-x64.node +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -728,6 +728,7 @@ export interface Pox4EventRevokeDelegateStx extends Pox4EventBase {
|
|
|
728
728
|
}
|
|
729
729
|
export type Pox4Event = Pox4EventHandleUnlock | Pox4EventStackStx | Pox4EventStackIncrease | Pox4EventStackExtend | Pox4EventDelegateStx | Pox4EventDelegateStackStx | Pox4EventDelegateStackIncrease | Pox4EventDelegateStackExtend | Pox4EventStackAggregationCommit | Pox4EventStackAggregationCommitIndexed | Pox4EventStackAggregationIncrease | Pox4EventRevokeDelegateStx;
|
|
730
730
|
export declare enum Pox5EventName {
|
|
731
|
+
SetBondAdmin = "set-bond-admin",
|
|
731
732
|
SetupBond = "setup-bond",
|
|
732
733
|
AddToAllowlist = "add-to-allowlist",
|
|
733
734
|
RegisterForBond = "register-for-bond",
|
|
@@ -740,7 +741,12 @@ export declare enum Pox5EventName {
|
|
|
740
741
|
Unstake = "unstake",
|
|
741
742
|
CalculateRewards = "calculate-rewards",
|
|
742
743
|
BondDistribution = "bond-distribution",
|
|
743
|
-
ClaimRewards = "claim-rewards"
|
|
744
|
+
ClaimRewards = "claim-rewards",
|
|
745
|
+
ClaimStakerRewardsForSigner = "claim-staker-rewards-for-signer",
|
|
746
|
+
GrantSignerKey = "grant-signer-key",
|
|
747
|
+
RevokeSignerGrant = "revoke-signer-grant",
|
|
748
|
+
DisallowContractCaller = "disallow-contract-caller",
|
|
749
|
+
AllowContractCaller = "allow-contract-caller"
|
|
744
750
|
}
|
|
745
751
|
export interface Pox5EventBase {
|
|
746
752
|
/**
|
|
@@ -750,6 +756,15 @@ export interface Pox5EventBase {
|
|
|
750
756
|
*/
|
|
751
757
|
pox_version: 'pox5';
|
|
752
758
|
}
|
|
759
|
+
export interface Pox5EventSetBondAdmin extends Pox5EventBase {
|
|
760
|
+
name: Pox5EventName.SetBondAdmin;
|
|
761
|
+
data: {
|
|
762
|
+
/** c32 principal of the previous bond admin. */
|
|
763
|
+
old_admin: string;
|
|
764
|
+
/** c32 principal of the new bond admin. */
|
|
765
|
+
new_admin: string;
|
|
766
|
+
};
|
|
767
|
+
}
|
|
753
768
|
export interface Pox5EventSetupBond extends Pox5EventBase {
|
|
754
769
|
name: Pox5EventName.SetupBond;
|
|
755
770
|
data: {
|
|
@@ -762,12 +777,11 @@ export interface Pox5EventSetupBond extends Pox5EventBase {
|
|
|
762
777
|
/** String-quoted unsigned integer */
|
|
763
778
|
min_ustx_ratio: string;
|
|
764
779
|
/**
|
|
765
|
-
* `(buff 683)` hex string.
|
|
766
|
-
* (e.g. `<pubkey>
|
|
780
|
+
* `(buff 683)` hex string. Bitcoin script subscript guarding the
|
|
781
|
+
* early-exit (`OP_ELSE`) branch of the L1 lockup (e.g. `<pubkey>
|
|
782
|
+
* OP_CHECKSIG`, or an M-of-N `CHECKMULTISIG` template).
|
|
767
783
|
*/
|
|
768
784
|
early_unlock_bytes: string;
|
|
769
|
-
/** c32 principal allowed to call `announce-l1-early-exit` for stakers in this bond. */
|
|
770
|
-
early_unlock_admin: string;
|
|
771
785
|
/** String-quoted unsigned integer */
|
|
772
786
|
first_reward_cycle: string;
|
|
773
787
|
/** String-quoted unsigned integer */
|
|
@@ -789,6 +803,23 @@ export interface Pox5EventAddToAllowlist extends Pox5EventBase {
|
|
|
789
803
|
bond_index: string;
|
|
790
804
|
};
|
|
791
805
|
}
|
|
806
|
+
/** One proven L1 output in a `register-for-bond` `btc_lockup`. */
|
|
807
|
+
export interface Pox5BtcLockupTx {
|
|
808
|
+
/** Reversed (big-endian) txid as a `0x`-prefixed hex string. */
|
|
809
|
+
txid: string;
|
|
810
|
+
/** String-quoted unsigned integer */
|
|
811
|
+
output_index: string;
|
|
812
|
+
}
|
|
813
|
+
/** The `btc_lockup` sub-object of a `register-for-bond` event. */
|
|
814
|
+
export interface Pox5BtcLockup {
|
|
815
|
+
/** `'l1'` for a Bitcoin L1 lockup, `'l2'` for an sBTC lockup. */
|
|
816
|
+
type: string;
|
|
817
|
+
/**
|
|
818
|
+
* The proven L1 outputs for an `'l1'` lockup, or `null` for an `'l2'`
|
|
819
|
+
* (sBTC) lockup.
|
|
820
|
+
*/
|
|
821
|
+
txs: Pox5BtcLockupTx[] | null;
|
|
822
|
+
}
|
|
792
823
|
export interface Pox5EventRegisterForBond extends Pox5EventBase {
|
|
793
824
|
name: Pox5EventName.RegisterForBond;
|
|
794
825
|
data: {
|
|
@@ -810,6 +841,8 @@ export interface Pox5EventRegisterForBond extends Pox5EventBase {
|
|
|
810
841
|
unlock_cycle: string;
|
|
811
842
|
/** True if the participant proved an L1 BTC lockup; false if they locked sBTC. */
|
|
812
843
|
is_l1_lock: boolean;
|
|
844
|
+
/** How the BTC was locked (L1 proof outputs vs. sBTC). */
|
|
845
|
+
btc_lockup: Pox5BtcLockup;
|
|
813
846
|
};
|
|
814
847
|
}
|
|
815
848
|
export interface Pox5EventUpdateBondRegistration extends Pox5EventBase {
|
|
@@ -996,6 +1029,10 @@ export interface Pox5BondRewardsInfo extends Pox5ClaimRewardsInfo {
|
|
|
996
1029
|
export interface Pox5EventClaimRewards extends Pox5EventBase {
|
|
997
1030
|
name: Pox5EventName.ClaimRewards;
|
|
998
1031
|
data: {
|
|
1032
|
+
/** c32 principal of the signer manager that claimed. */
|
|
1033
|
+
signer_manager: string;
|
|
1034
|
+
/** String-quoted unsigned integer */
|
|
1035
|
+
reward_cycle: string;
|
|
999
1036
|
stx_rewards: Pox5ClaimRewardsInfo;
|
|
1000
1037
|
bond_rewards: Pox5BondRewardsInfo[];
|
|
1001
1038
|
/** String-quoted unsigned integer */
|
|
@@ -1004,7 +1041,68 @@ export interface Pox5EventClaimRewards extends Pox5EventBase {
|
|
|
1004
1041
|
total_rewards: string;
|
|
1005
1042
|
};
|
|
1006
1043
|
}
|
|
1007
|
-
export
|
|
1044
|
+
export interface Pox5EventClaimStakerRewardsForSigner extends Pox5EventBase {
|
|
1045
|
+
name: Pox5EventName.ClaimStakerRewardsForSigner;
|
|
1046
|
+
data: {
|
|
1047
|
+
/** c32 principal of the signer manager. */
|
|
1048
|
+
signer_manager: string;
|
|
1049
|
+
/** c32 principal of the staker. */
|
|
1050
|
+
staker: string;
|
|
1051
|
+
/** String-quoted unsigned integer */
|
|
1052
|
+
reward_cycle: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* String-quoted unsigned integer for bond rewards, or `null` for
|
|
1055
|
+
* STX-only staking rewards.
|
|
1056
|
+
*/
|
|
1057
|
+
bond_index: string | null;
|
|
1058
|
+
/** String-quoted unsigned integer */
|
|
1059
|
+
rewards_claimed: string;
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
export interface Pox5EventGrantSignerKey extends Pox5EventBase {
|
|
1063
|
+
name: Pox5EventName.GrantSignerKey;
|
|
1064
|
+
data: {
|
|
1065
|
+
/** `(buff 33)` hex string — compressed secp256k1 public key. */
|
|
1066
|
+
signer_key: string;
|
|
1067
|
+
/** c32 principal of the signer manager. */
|
|
1068
|
+
signer_manager: string;
|
|
1069
|
+
/** String-quoted unsigned integer */
|
|
1070
|
+
auth_id: string;
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
export interface Pox5EventRevokeSignerGrant extends Pox5EventBase {
|
|
1074
|
+
name: Pox5EventName.RevokeSignerGrant;
|
|
1075
|
+
data: {
|
|
1076
|
+
/** `(buff 33)` hex string — compressed secp256k1 public key. */
|
|
1077
|
+
signer_key: string;
|
|
1078
|
+
/** c32 principal of the signer manager. */
|
|
1079
|
+
signer_manager: string;
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
export interface Pox5EventDisallowContractCaller extends Pox5EventBase {
|
|
1083
|
+
name: Pox5EventName.DisallowContractCaller;
|
|
1084
|
+
data: {
|
|
1085
|
+
/** c32 principal of the tx-sender that revoked the allowance. */
|
|
1086
|
+
sender: string;
|
|
1087
|
+
/** c32 principal of the contract-caller whose allowance was removed. */
|
|
1088
|
+
contract_caller: string;
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
export interface Pox5EventAllowContractCaller extends Pox5EventBase {
|
|
1092
|
+
name: Pox5EventName.AllowContractCaller;
|
|
1093
|
+
data: {
|
|
1094
|
+
/** c32 principal of the tx-sender that granted the allowance. */
|
|
1095
|
+
sender: string;
|
|
1096
|
+
/** c32 principal of the allowed contract-caller. */
|
|
1097
|
+
contract_caller: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* String-quoted unsigned integer burn height at which the allowance
|
|
1100
|
+
* expires, or `null` if it never expires.
|
|
1101
|
+
*/
|
|
1102
|
+
until_burn_ht: string | null;
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
export type Pox5Event = Pox5EventSetBondAdmin | Pox5EventSetupBond | Pox5EventAddToAllowlist | Pox5EventRegisterForBond | Pox5EventUpdateBondRegistration | Pox5EventRegisterSigner | Pox5EventStake | Pox5EventStakeUpdate | Pox5EventAnnounceL1EarlyExit | Pox5EventUnstakeSbtc | Pox5EventUnstake | Pox5EventCalculateRewards | Pox5EventBondDistribution | Pox5EventClaimRewards | Pox5EventClaimStakerRewardsForSigner | Pox5EventGrantSignerKey | Pox5EventRevokeSignerGrant | Pox5EventDisallowContractCaller | Pox5EventAllowContractCaller;
|
|
1008
1106
|
/**
|
|
1009
1107
|
* Any decoded PoX synthetic event, regardless of the source contract version.
|
|
1010
1108
|
*
|
package/index.js
CHANGED
|
@@ -249,6 +249,7 @@ var Pox4EventName;
|
|
|
249
249
|
// ============================================================================
|
|
250
250
|
var Pox5EventName;
|
|
251
251
|
(function (Pox5EventName) {
|
|
252
|
+
Pox5EventName["SetBondAdmin"] = "set-bond-admin";
|
|
252
253
|
Pox5EventName["SetupBond"] = "setup-bond";
|
|
253
254
|
Pox5EventName["AddToAllowlist"] = "add-to-allowlist";
|
|
254
255
|
Pox5EventName["RegisterForBond"] = "register-for-bond";
|
|
@@ -262,4 +263,9 @@ var Pox5EventName;
|
|
|
262
263
|
Pox5EventName["CalculateRewards"] = "calculate-rewards";
|
|
263
264
|
Pox5EventName["BondDistribution"] = "bond-distribution";
|
|
264
265
|
Pox5EventName["ClaimRewards"] = "claim-rewards";
|
|
266
|
+
Pox5EventName["ClaimStakerRewardsForSigner"] = "claim-staker-rewards-for-signer";
|
|
267
|
+
Pox5EventName["GrantSignerKey"] = "grant-signer-key";
|
|
268
|
+
Pox5EventName["RevokeSignerGrant"] = "revoke-signer-grant";
|
|
269
|
+
Pox5EventName["DisallowContractCaller"] = "disallow-contract-caller";
|
|
270
|
+
Pox5EventName["AllowContractCaller"] = "allow-contract-caller";
|
|
265
271
|
})(Pox5EventName || (exports.Pox5EventName = Pox5EventName = {}));
|
package/index.mjs
CHANGED
|
@@ -158,6 +158,7 @@ var Pox4EventName = /* @__PURE__ */ ((Pox4EventName2) => {
|
|
|
158
158
|
return Pox4EventName2;
|
|
159
159
|
})(Pox4EventName || {});
|
|
160
160
|
var Pox5EventName = /* @__PURE__ */ ((Pox5EventName2) => {
|
|
161
|
+
Pox5EventName2["SetBondAdmin"] = "set-bond-admin";
|
|
161
162
|
Pox5EventName2["SetupBond"] = "setup-bond";
|
|
162
163
|
Pox5EventName2["AddToAllowlist"] = "add-to-allowlist";
|
|
163
164
|
Pox5EventName2["RegisterForBond"] = "register-for-bond";
|
|
@@ -171,6 +172,11 @@ var Pox5EventName = /* @__PURE__ */ ((Pox5EventName2) => {
|
|
|
171
172
|
Pox5EventName2["CalculateRewards"] = "calculate-rewards";
|
|
172
173
|
Pox5EventName2["BondDistribution"] = "bond-distribution";
|
|
173
174
|
Pox5EventName2["ClaimRewards"] = "claim-rewards";
|
|
175
|
+
Pox5EventName2["ClaimStakerRewardsForSigner"] = "claim-staker-rewards-for-signer";
|
|
176
|
+
Pox5EventName2["GrantSignerKey"] = "grant-signer-key";
|
|
177
|
+
Pox5EventName2["RevokeSignerGrant"] = "revoke-signer-grant";
|
|
178
|
+
Pox5EventName2["DisallowContractCaller"] = "disallow-contract-caller";
|
|
179
|
+
Pox5EventName2["AllowContractCaller"] = "allow-contract-caller";
|
|
174
180
|
return Pox5EventName2;
|
|
175
181
|
})(Pox5EventName || {});
|
|
176
182
|
export {
|
package/native/darwin-arm64.node
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/native/win32-x64.node
CHANGED
|
Binary file
|
package/package.json
CHANGED