Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions methods/http/getSupply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# getSupply

Returns supply figures calculated from the selected bank.

## Semantics

The optional commitment selects the bank. When excludeNonCirculatingAccountsList is true, the response still calculates nonCirculating but returns an empty nonCirculatingAccounts array. Values are lamports.

## Implementation notes

- [**Agave**](../../implementations/agave.md): reference implementation. See the pinned [processor](https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc.rs#L1126-L1153).
47 changes: 47 additions & 0 deletions methods/http/getSupply.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: getSupply
status: standard
summary: Returns total, circulating, and non-circulating lamport supply.
params:
- name: config
required: false
summary: Commitment and account-list configuration.
schema:
type: object
properties:
commitment: { $ref: '#/components/schemas/Commitment' }
excludeNonCirculatingAccountsList: { type: boolean, default: false }
result:
name: supply
summary: Supply information in an RpcResponse envelope.
schema:
type: object
required: [context, value]
properties:
context: { $ref: '#/components/schemas/RpcResponseContext' }
value:
type: object
required: [total, circulating, nonCirculating, nonCirculatingAccounts]
properties:
total: { $ref: '#/components/schemas/U64' }
circulating: { $ref: '#/components/schemas/U64' }
nonCirculating: { $ref: '#/components/schemas/U64' }
nonCirculatingAccounts:
type: array
items: { $ref: '#/components/schemas/Pubkey' }
errors:
- $ref: '#/components/errors/ScanError'
examples:
- name: without-account-list
summary: Return supply totals without the potentially large account list.
params:
- name: config
value: { commitment: finalized, excludeNonCirculatingAccountsList: true }
result:
name: supply
value:
context: { slot: 123, apiVersion: "3.0.0" }
value: { total: 5000000000, circulating: 4000000000, nonCirculating: 1000000000, nonCirculatingAccounts: [] }
implementations:
agave: { status: full }
cloudbreak: { status: none }
superbank: { status: none }
39 changes: 39 additions & 0 deletions proposals/0037-get-supply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
number: 0037
title: Add getSupply method specification
authors: [rpcpool]
status: draft
created: 2026-09-14
reference-implementations:
- https://github.com/anza-xyz/agave/tree/6dd9d38771e46103b9680357a855804165612602
---

# Add getSupply method specification

## Summary

Add the public supply query.

## Motivation

Clients need a portable contract for this public Agave RPC method.

## Specification

Add the paired HTTP method files. The result is an RpcResponse envelope whose value contains lamport totals and an optional non-circulating account list.

## Return-type impact

Adds the result shape defined by the paired method source.

## Compatibility

This is additive. Agave conforms. Cloudbreak and Superbank do not serve the method.

## Reference implementation

- [Agave handler and processor](https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc.rs#L1126-L1153)

## Security considerations

Requesting the account list exposes public account identities and can require a supply scan. Clients can set the exclusion flag.
2 changes: 1 addition & 1 deletion spec-info.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: Solana JSON-RPC API
version: 0.1.0
version: 0.2.0
license:
name: MIT
url: https://opensource.org/license/mit/
Expand Down
Loading