@@ -22,7 +22,11 @@ type GetSignaturesForAddressApiResponse = readonly GetSignaturesForAddressTransa
22
22
type AllowedCommitmentForGetSignaturesForAddress = Exclude < Commitment , 'processed' > ;
23
23
24
24
type GetSignaturesForAddressConfig = Readonly < {
25
- /** start searching backwards from this transaction signature. If not provided the search starts from the top of the highest max confirmed block. */
25
+ /**
26
+ * Start the search from before, but excluding, this signature.
27
+ *
28
+ * @defaultValue When omitted, the search starts from the top of the latest confirmed block.
29
+ */
26
30
before ?: Signature ;
27
31
/**
28
32
* Fetch the signatures as of the highest slot that has reached this level of commitment.
@@ -33,21 +37,49 @@ type GetSignaturesForAddressConfig = Readonly<{
33
37
* default commitment applied by the server is `"finalized"`.
34
38
*/
35
39
commitment ?: AllowedCommitmentForGetSignaturesForAddress ;
36
- /** maximum transaction signatures to return (between 1 and 1,000). Default: 1000 */
40
+ /**
41
+ * Maximum transaction signatures to return (between 1 and 1,000).
42
+ *
43
+ * @defaultValue 1000
44
+ */
37
45
limit ?: number ;
38
46
/**
39
47
* Prevents accessing stale data by enforcing that the RPC node has processed transactions up to
40
48
* this slot
41
49
*/
42
50
minContextSlot ?: Slot ;
43
- /** search until this transaction signature, if found before limit reached */
51
+ /**
52
+ * Search, back in time, until this transaction signature.
53
+ *
54
+ * @defaultValue When omitted, search will proceed until the limit (if supplied) or until 1,000
55
+ * signatures have been found.
56
+ */
44
57
until ?: Signature ;
45
58
} > ;
46
59
47
60
export type GetSignaturesForAddressApi = {
48
61
/**
49
- * Returns signatures for confirmed transactions that include the given address in their accountKeys list.
50
- * Returns signatures backwards in time from the provided signature or most recent confirmed block
62
+ * Returns signatures for confirmed transactions that load the given address.
63
+ *
64
+ * {@label before-signature}
65
+ * @returns Signatures in reverse chronological order starting from before, but excluding, the
66
+ * signature supplied.
67
+ * @see https://solana.com/docs/rpc/http/getsignaturesforaddress
68
+ */
69
+ getSignaturesForAddress (
70
+ address : Address ,
71
+ config ?: GetSignaturesForAddressConfig &
72
+ Readonly < {
73
+ before : Signature ;
74
+ } > ,
75
+ ) : GetSignaturesForAddressApiResponse ;
76
+ /**
77
+ * Returns signatures for confirmed transactions that load the given address.
78
+ *
79
+ * {@label all}
80
+ * @returns Signatures in reverse chronological order starting from the most recent confirmed
81
+ * block.
82
+ * @see https://solana.com/docs/rpc/http/getsignaturesforaddress
51
83
*/
52
84
getSignaturesForAddress (
53
85
address : Address ,
0 commit comments