fix: improve send and confirm options ergonomics
This commit is contained in:
committed by
Justin Starry
parent
dae8bc477b
commit
229ff05fe9
6
web3.js/module.d.ts
vendored
6
web3.js/module.d.ts
vendored
@ -42,12 +42,12 @@ declare module '@solana/web3.js' {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type SendOptions = {
|
export type SendOptions = {
|
||||||
skipPreflight: boolean;
|
skipPreflight?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ConfirmOptions = {
|
export type ConfirmOptions = {
|
||||||
confirmations: number;
|
confirmations?: number;
|
||||||
skipPreflight: boolean;
|
skipPreflight?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RpcResponseAndContext<T> = {
|
export type RpcResponseAndContext<T> = {
|
||||||
|
@ -55,12 +55,12 @@ declare module '@solana/web3.js' {
|
|||||||
};
|
};
|
||||||
|
|
||||||
declare export type SendOptions = {
|
declare export type SendOptions = {
|
||||||
skipPreflight: boolean,
|
skipPreflight: ?boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
declare export type ConfirmOptions = {
|
declare export type ConfirmOptions = {
|
||||||
confirmations: number,
|
confirmations: ?number,
|
||||||
skipPreflight: boolean,
|
skipPreflight: ?boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
declare export type RpcResponseAndContext<T> = {
|
declare export type RpcResponseAndContext<T> = {
|
||||||
|
@ -38,22 +38,22 @@ type Context = {
|
|||||||
* Options for sending transactions
|
* Options for sending transactions
|
||||||
*
|
*
|
||||||
* @typedef {Object} SendOptions
|
* @typedef {Object} SendOptions
|
||||||
* @property {boolean} skipPreflight disable transaction verification step
|
* @property {boolean | undefined} skipPreflight disable transaction verification step
|
||||||
*/
|
*/
|
||||||
export type SendOptions = {
|
export type SendOptions = {
|
||||||
skipPreflight: boolean,
|
skipPreflight: ?boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for confirming transactions
|
* Options for confirming transactions
|
||||||
*
|
*
|
||||||
* @typedef {Object} ConfirmOptions
|
* @typedef {Object} ConfirmOptions
|
||||||
* @property {boolean} skipPreflight disable transaction verification step
|
* @property {boolean | undefined} skipPreflight disable transaction verification step
|
||||||
* @property {number} confirmations desired number of cluster confirmations
|
* @property {number | undefined} confirmations desired number of cluster confirmations
|
||||||
*/
|
*/
|
||||||
export type ConfirmOptions = {
|
export type ConfirmOptions = {
|
||||||
confirmations: number,
|
skipPreflight: ?boolean,
|
||||||
skipPreflight: boolean,
|
confirmations: ?number,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user