chore: remove undocumented validatorExit method
This commit is contained in:
1
web3.js/module.d.ts
vendored
1
web3.js/module.d.ts
vendored
@ -527,7 +527,6 @@ declare module '@solana/web3.js' {
|
|||||||
removeSignatureListener(id: number): Promise<void>;
|
removeSignatureListener(id: number): Promise<void>;
|
||||||
onRootChange(callback: RootChangeCallback): number;
|
onRootChange(callback: RootChangeCallback): number;
|
||||||
removeRootChangeListener(id: number): Promise<void>;
|
removeRootChangeListener(id: number): Promise<void>;
|
||||||
validatorExit(): Promise<boolean>;
|
|
||||||
getMinimumBalanceForRentExemption(
|
getMinimumBalanceForRentExemption(
|
||||||
dataLength: number,
|
dataLength: number,
|
||||||
commitment?: Commitment,
|
commitment?: Commitment,
|
||||||
|
@ -531,7 +531,6 @@ declare module '@solana/web3.js' {
|
|||||||
removeSignatureListener(id: number): Promise<void>;
|
removeSignatureListener(id: number): Promise<void>;
|
||||||
onRootChange(callback: RootChangeCallback): number;
|
onRootChange(callback: RootChangeCallback): number;
|
||||||
removeRootChangeListener(id: number): Promise<void>;
|
removeRootChangeListener(id: number): Promise<void>;
|
||||||
validatorExit(): Promise<boolean>;
|
|
||||||
getMinimumBalanceForRentExemption(
|
getMinimumBalanceForRentExemption(
|
||||||
dataLength: number,
|
dataLength: number,
|
||||||
commitment: ?Commitment,
|
commitment: ?Commitment,
|
||||||
|
@ -2682,18 +2682,6 @@ export class Connection {
|
|||||||
return await this.sendRawTransaction(wireTransaction, options);
|
return await this.sendRawTransaction(wireTransaction, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
async validatorExit(): Promise<boolean> {
|
|
||||||
const unsafeRes = await this._rpcRequest('validatorExit', []);
|
|
||||||
const res = create(unsafeRes, jsonRpcResult(boolean()));
|
|
||||||
if (res.error) {
|
|
||||||
throw new Error('validator exit failed: ' + res.error.message);
|
|
||||||
}
|
|
||||||
return res.result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a transaction that has already been signed and serialized into the
|
* Send a transaction that has already been signed and serialized into the
|
||||||
* wire format
|
* wire format
|
||||||
|
@ -258,19 +258,6 @@ describe('Connection', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!process.env.TEST_LIVE) {
|
|
||||||
it('validatorExit', async () => {
|
|
||||||
await mockRpcResponse({
|
|
||||||
method: 'validatorExit',
|
|
||||||
params: [],
|
|
||||||
value: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const result = await connection.validatorExit();
|
|
||||||
expect(result).to.eq(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
it('get balance', async () => {
|
it('get balance', async () => {
|
||||||
const account = new Account();
|
const account = new Account();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user