genlayer-js 0.28.7 → 1.0.0
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-BpBLcwxn.d.ts → index-B-qwdW-z.d.ts} +2 -0
- package/dist/{index-D3H572Cz.d.cts → index-axkCvELR.d.cts} +2 -0
- package/dist/index.cjs +14 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -6
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2708,9 +2708,11 @@ interface ValidatorJoinOptions {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
interface ValidatorDepositOptions {
|
|
2710
2710
|
amount: bigint | string;
|
|
2711
|
+
validator: Address;
|
|
2711
2712
|
}
|
|
2712
2713
|
interface ValidatorExitOptions {
|
|
2713
2714
|
shares: bigint | string;
|
|
2715
|
+
validator: Address;
|
|
2714
2716
|
}
|
|
2715
2717
|
interface ValidatorClaimOptions {
|
|
2716
2718
|
validator?: Address;
|
|
@@ -2708,9 +2708,11 @@ interface ValidatorJoinOptions {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
interface ValidatorDepositOptions {
|
|
2710
2710
|
amount: bigint | string;
|
|
2711
|
+
validator: Address;
|
|
2711
2712
|
}
|
|
2712
2713
|
interface ValidatorExitOptions {
|
|
2713
2714
|
shares: bigint | string;
|
|
2715
|
+
validator: Address;
|
|
2714
2716
|
}
|
|
2715
2717
|
interface ValidatorClaimOptions {
|
|
2716
2718
|
validator?: Address;
|
package/dist/index.cjs
CHANGED
|
@@ -1911,24 +1911,32 @@ var stakingActions = (client, publicClient) => {
|
|
|
1911
1911
|
amountRaw: amount
|
|
1912
1912
|
};
|
|
1913
1913
|
},
|
|
1914
|
-
/**
|
|
1914
|
+
/**
|
|
1915
|
+
* Adds additional self-stake to an active validator position. The
|
|
1916
|
+
* underlying Staking contract requires msg.sender == ValidatorWallet,
|
|
1917
|
+
* so the call is routed through the wallet's own validatorDeposit
|
|
1918
|
+
* forwarder (which re-enters Staking with the correct sender).
|
|
1919
|
+
*/
|
|
1915
1920
|
validatorDeposit: async (options) => {
|
|
1916
1921
|
const amount = parseStakingAmount(options.amount);
|
|
1917
1922
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1918
|
-
abi: _chunkN74TARFYcjs.
|
|
1923
|
+
abi: _chunkN74TARFYcjs.VALIDATOR_WALLET_ABI,
|
|
1919
1924
|
functionName: "validatorDeposit"
|
|
1920
1925
|
});
|
|
1921
|
-
return executeWrite({ to:
|
|
1926
|
+
return executeWrite({ to: options.validator, data, value: amount });
|
|
1922
1927
|
},
|
|
1923
|
-
/**
|
|
1928
|
+
/**
|
|
1929
|
+
* Exits a validator position by burning the specified shares. Same
|
|
1930
|
+
* msg.sender constraint as validatorDeposit — routed via the wallet.
|
|
1931
|
+
*/
|
|
1924
1932
|
validatorExit: async (options) => {
|
|
1925
1933
|
const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
|
|
1926
1934
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1927
|
-
abi: _chunkN74TARFYcjs.
|
|
1935
|
+
abi: _chunkN74TARFYcjs.VALIDATOR_WALLET_ABI,
|
|
1928
1936
|
functionName: "validatorExit",
|
|
1929
1937
|
args: [shares]
|
|
1930
1938
|
});
|
|
1931
|
-
return executeWrite({ to:
|
|
1939
|
+
return executeWrite({ to: options.validator, data });
|
|
1932
1940
|
},
|
|
1933
1941
|
/** Claims pending validator withdrawals. */
|
|
1934
1942
|
validatorClaim: async (options) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
3
|
import { G as GenLayerChain } from './chains-D6DgvIVA.cjs';
|
|
4
|
-
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-
|
|
4
|
+
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-axkCvELR.cjs';
|
|
5
5
|
import * as abitype from 'abitype';
|
|
6
6
|
import * as viem__types_types_authorization from 'viem/_types/types/authorization';
|
|
7
7
|
import * as viem_accounts from 'viem/accounts';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
3
|
import { G as GenLayerChain } from './chains-D6DgvIVA.js';
|
|
4
|
-
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-
|
|
4
|
+
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-B-qwdW-z.js';
|
|
5
5
|
import * as abitype from 'abitype';
|
|
6
6
|
import * as viem__types_types_authorization from 'viem/_types/types/authorization';
|
|
7
7
|
import * as viem_accounts from 'viem/accounts';
|
package/dist/index.js
CHANGED
|
@@ -1911,24 +1911,32 @@ var stakingActions = (client, publicClient) => {
|
|
|
1911
1911
|
amountRaw: amount
|
|
1912
1912
|
};
|
|
1913
1913
|
},
|
|
1914
|
-
/**
|
|
1914
|
+
/**
|
|
1915
|
+
* Adds additional self-stake to an active validator position. The
|
|
1916
|
+
* underlying Staking contract requires msg.sender == ValidatorWallet,
|
|
1917
|
+
* so the call is routed through the wallet's own validatorDeposit
|
|
1918
|
+
* forwarder (which re-enters Staking with the correct sender).
|
|
1919
|
+
*/
|
|
1915
1920
|
validatorDeposit: async (options) => {
|
|
1916
1921
|
const amount = parseStakingAmount(options.amount);
|
|
1917
1922
|
const data = encodeFunctionData2({
|
|
1918
|
-
abi:
|
|
1923
|
+
abi: VALIDATOR_WALLET_ABI,
|
|
1919
1924
|
functionName: "validatorDeposit"
|
|
1920
1925
|
});
|
|
1921
|
-
return executeWrite({ to:
|
|
1926
|
+
return executeWrite({ to: options.validator, data, value: amount });
|
|
1922
1927
|
},
|
|
1923
|
-
/**
|
|
1928
|
+
/**
|
|
1929
|
+
* Exits a validator position by burning the specified shares. Same
|
|
1930
|
+
* msg.sender constraint as validatorDeposit — routed via the wallet.
|
|
1931
|
+
*/
|
|
1924
1932
|
validatorExit: async (options) => {
|
|
1925
1933
|
const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
|
|
1926
1934
|
const data = encodeFunctionData2({
|
|
1927
|
-
abi:
|
|
1935
|
+
abi: VALIDATOR_WALLET_ABI,
|
|
1928
1936
|
functionName: "validatorExit",
|
|
1929
1937
|
args: [shares]
|
|
1930
1938
|
});
|
|
1931
|
-
return executeWrite({ to:
|
|
1939
|
+
return executeWrite({ to: options.validator, data });
|
|
1932
1940
|
},
|
|
1933
1941
|
/** Claims pending validator withdrawals. */
|
|
1934
1942
|
validatorClaim: async (options) => {
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export { O as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-
|
|
2
|
+
export { O as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-axkCvELR.cjs';
|
|
3
3
|
export { G as GenLayerChain } from '../chains-D6DgvIVA.cjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export { O as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-
|
|
2
|
+
export { O as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-B-qwdW-z.js';
|
|
3
3
|
export { G as GenLayerChain } from '../chains-D6DgvIVA.js';
|