From ebcc1e1584d0d4937beb8e41a53ede4b31fdb55c Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Thu, 21 Dec 2023 13:27:15 -0600 Subject: [PATCH 1/8] move specfile generation into this repo --- openrpc/openrpc.json | 1202 ++++++++++++++ openrpc/refs-openrpc.json | 1414 +++++++++++++++++ openrpc/scripts/build.mjs | 143 ++ openrpc/scripts/validate.mjs | 27 + .../src/contentDescriptors/EventFilters.json | 10 + .../src/contentDescriptors/LedgerKeys.json | 11 + .../src/contentDescriptors/Pagination.json | 11 + .../contentDescriptors/ResourceConfig.json | 11 + .../src/contentDescriptors/StartLedger.json | 11 + .../src/contentDescriptors/Transaction.json | 20 + .../contentDescriptors/TransactionHash.json | 11 + .../examplePairingObjects/EventsPairs.json | 25 + .../GetTransactionPairs.json | 32 + .../LedgerEntriesPairs.json | 32 + .../examplePairingObjects/NetworkPairs.json | 28 + .../SendTransactionPairs.json | 42 + .../SimulationPairs.json | 24 + openrpc/src/examples/Events.json | 113 ++ openrpc/src/examples/LedgerEntries.json | 71 + openrpc/src/examples/Simulations.json | 59 + openrpc/src/examples/Transactions.json | 111 ++ openrpc/src/methods/getEvents.json | 42 + openrpc/src/methods/getHealth.json | 35 + openrpc/src/methods/getLatestLedger.json | 42 + openrpc/src/methods/getLedgerEntries.json | 38 + openrpc/src/methods/getNetwork.json | 33 + openrpc/src/methods/getTransaction.json | 79 + openrpc/src/methods/sendTransaction.json | 55 + openrpc/src/methods/simulateTransaction.json | 105 ++ openrpc/src/schemas/ContractIds.json | 16 + openrpc/src/schemas/Event.json | 64 + openrpc/src/schemas/EventFilters.json | 52 + openrpc/src/schemas/Hash.json | 19 + openrpc/src/schemas/LedgerCloseTime.json | 17 + openrpc/src/schemas/LedgerEntries.json | 34 + openrpc/src/schemas/LedgerSequence.json | 17 + openrpc/src/schemas/NetworkConfig.json | 12 + openrpc/src/schemas/Pagination.json | 16 + openrpc/src/schemas/ResourceConfig.json | 14 + openrpc/src/schemas/Transaction.json | 7 + package.json | 7 +- static/openrpc.json | 2 +- yarn.lock | 37 +- 43 files changed, 4113 insertions(+), 38 deletions(-) create mode 100644 openrpc/openrpc.json create mode 100644 openrpc/refs-openrpc.json create mode 100644 openrpc/scripts/build.mjs create mode 100644 openrpc/scripts/validate.mjs create mode 100644 openrpc/src/contentDescriptors/EventFilters.json create mode 100644 openrpc/src/contentDescriptors/LedgerKeys.json create mode 100644 openrpc/src/contentDescriptors/Pagination.json create mode 100644 openrpc/src/contentDescriptors/ResourceConfig.json create mode 100644 openrpc/src/contentDescriptors/StartLedger.json create mode 100644 openrpc/src/contentDescriptors/Transaction.json create mode 100644 openrpc/src/contentDescriptors/TransactionHash.json create mode 100644 openrpc/src/examplePairingObjects/EventsPairs.json create mode 100644 openrpc/src/examplePairingObjects/GetTransactionPairs.json create mode 100644 openrpc/src/examplePairingObjects/LedgerEntriesPairs.json create mode 100644 openrpc/src/examplePairingObjects/NetworkPairs.json create mode 100644 openrpc/src/examplePairingObjects/SendTransactionPairs.json create mode 100644 openrpc/src/examplePairingObjects/SimulationPairs.json create mode 100644 openrpc/src/examples/Events.json create mode 100644 openrpc/src/examples/LedgerEntries.json create mode 100644 openrpc/src/examples/Simulations.json create mode 100644 openrpc/src/examples/Transactions.json create mode 100644 openrpc/src/methods/getEvents.json create mode 100644 openrpc/src/methods/getHealth.json create mode 100644 openrpc/src/methods/getLatestLedger.json create mode 100644 openrpc/src/methods/getLedgerEntries.json create mode 100644 openrpc/src/methods/getNetwork.json create mode 100644 openrpc/src/methods/getTransaction.json create mode 100644 openrpc/src/methods/sendTransaction.json create mode 100644 openrpc/src/methods/simulateTransaction.json create mode 100644 openrpc/src/schemas/ContractIds.json create mode 100644 openrpc/src/schemas/Event.json create mode 100644 openrpc/src/schemas/EventFilters.json create mode 100644 openrpc/src/schemas/Hash.json create mode 100644 openrpc/src/schemas/LedgerCloseTime.json create mode 100644 openrpc/src/schemas/LedgerEntries.json create mode 100644 openrpc/src/schemas/LedgerSequence.json create mode 100644 openrpc/src/schemas/NetworkConfig.json create mode 100644 openrpc/src/schemas/Pagination.json create mode 100644 openrpc/src/schemas/ResourceConfig.json create mode 100644 openrpc/src/schemas/Transaction.json diff --git a/openrpc/openrpc.json b/openrpc/openrpc.json new file mode 100644 index 00000000..da4c4972 --- /dev/null +++ b/openrpc/openrpc.json @@ -0,0 +1,1202 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Soroban RPC", + "description": "Soroban-RPC allows you to communicate directly with Soroban via a JSON RPC interface.", + "termsOfService": "https://stellar.org/terms-of-service", + "contact": { + "name": "Stellar Development Foundation", + "url": "https://stellar.org/connect", + "email": "hello@stellar.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "20.1.0" + }, + "servers": [ + { + "name": "Testnet", + "url": "https://soroban-testnet.stellar.org:443", + "summary": "Publicly available RPC server maintained by SDF, operating on the Testnet test network.", + "description": "Testnet is meant to be a stable network that runs a production (or near-production) version of the Stellar network." + }, + { + "name": "Futurenet", + "url": "https://rpc-futurenet.stellar.org:443", + "summary": "Publicly available RPC server maintained by SDF, operating on the Futurenet test network.", + "description": "Futurenet is meant to be a bleeding-edge, experimental network that runs an early, test version of the Stellar network." + } + ], + "methods": [ + { + "name": "getEvents", + "summary": "returns contract events", + "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getEvents" + }, + "paramStructure": "by-name", + "params": [ + { + "name": "startLedger", + "summary": "ledger to begin searching from", + "description": "Ledger sequence number to fetch events after (inclusive). This method will return an error if `startLedger` is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, `startLedger` must be omitted.", + "required": true, + "schema": { + "title": "ledgerSequence", + "description": "Sequence number of the ledger.", + "type": "number" + } + }, + { + "name": "filters", + "summary": "filters to narrow events search", + "description": "List of filters for the returned events. Events matching any of the filters are included. To match a filter, an event must match both a contractId and a topic. Maximum 5 filters are allowed per request.", + "schema": { + "type": "array", + "maxItems": 5, + "items": { + "type": "object", + "required": [], + "properties": { + "type": { + "title": "type", + "type": "string", + "description": "A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included." + }, + "contractIds": { + "title": "contractIds", + "type": "array", + "description": "List of contract IDs to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.", + "maxItems": 5, + "items": { + "title": "contractId", + "description": "A StrKey representation of a contract address (`C...`). ([SEP-23](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0023.md#specification)).", + "type": "string" + } + }, + "topics": { + "title": "topics", + "type": "array", + "description": "List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.", + "maxItems": 5, + "items": { + "type": "array", + "description": "A `TopicFilter` is `SegmentMatcher[]`\n\n- The list can be 1-4 `SegmentMatchers` long.", + "minItems": 1, + "maxItems": 4, + "items": { + "title": "SegmentMatcher", + "type": "string", + "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." + } + } + } + } + } + } + }, + { + "name": "pagination", + "summary": "pagination options", + "description": "Pagination in soroban-rpc is similar to pagination in Horizon. See [Pagination](https://soroban.stellar.org/api/pagination).", + "required": false, + "schema": { + "type": "object", + "required": [], + "properties": { + "cursor": { + "type": "string", + "description": "A string ID that points to a specific location in a collection of responses and is pulled from the `paging_token` value of a record. When a cursor is provided Soroban-RPC will _not_ include the element whose id matches the cursor in the response. Only elements which appear _after_ the cursor are included." + }, + "limit": { + "type": "number", + "description": "The maximum number of records returned. The limit for [getEvents](https://soroban.stellar.org/api/getEvents) can range from 1 to 10000 - an upper limit that is hardcoded in Soroban-RPC for performance reasons. If this argument isn't designated, it defaults to 100." + } + } + } + } + ], + "result": { + "name": "getEventsResult", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "number" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "title": "type", + "description": "The type of event emission.", + "type": "string", + "enum": [ + "contract", + "diagnostic", + "system" + ] + }, + "ledger": { + "title": "ledgerSequence", + "description": "Sequence number of the ledger in which this event was emitted.", + "type": "number" + }, + "ledgerClosedAt": { + "type": "string", + "description": "[ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp of the ledger closing time" + }, + "contractId": { + "title": "contractId", + "description": "StrKey representation of the contract address that emitted this event.", + "type": "string" + }, + "id": { + "description": "Unique identifier for this event.\n\n- The event's unique id field is based on a [`toid` from Horizon](https://github.com/stellar/go/blob/master/toid/main.go) as used in Horizon's /effects endpoint.\n\n- https://github.com/stellar/go/blob/master/services/horizon/internal/db2/history/effect.go#L58\n\n- Specifically, it is a string containing:\n\n- bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation.\n\n- For example: `1234-1`", + "type": "string" + }, + "pagingToken": { + "description": "Duplicate of `id` field, but in the standard place for pagination tokens.", + "type": "string" + }, + "inSuccessfulContractCall": { + "description": "If true the event was emitted during a successful contract call.", + "type": "boolean" + }, + "topic": { + "type": "array", + "description": "List containing the topic this event was emitted with.", + "minItems": 1, + "maxItems": 4, + "items": { + "title": "SegmentMatcher", + "type": "string", + "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." + } + }, + "value": { + "description": "The data the event was broadcasting in the emitted event.", + "type": "object", + "properties": { + "xdr": { + "description": "The emitted body value of the event (serialized in a base64 string).", + "type": "string" + } + } + } + } + } + } + } + } + }, + "examples": [ + { + "name": "Native XLM Transfer Events", + "description": "Example request to the `getEvents` method, filtering for `transfer` events for native Lumens, and limiting the number of returned events to 2.", + "params": [ + { + "name": "startLedger", + "value": 2530000 + }, + { + "name": "filters", + "value": [ + { + "type": "contract", + "contractIds": [ + "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC" + ], + "topics": [ + [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "*", + "*", + "*" + ] + ] + } + ] + }, + { + "name": "pagination", + "value": { + "limit": 2 + } + } + ], + "result": { + "name": "getEventsResult", + "value": { + "events": [ + { + "type": "contract", + "ledger": 2531021, + "ledgerClosedAt": "2023-11-15T08:58:25Z", + "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", + "id": "0010870652420501504-0000000004", + "pagingToken": "0010870652420501504-0000000004", + "topic": [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "AAAAEgAAAAAAAAAAjt5DlR5mhneFx/1Lct0ToW555OFzg/Y28++28cJXU+I=", + "AAAAEgAAAAAAAAAA33Fu/fnobL8/u8tyLCIZzpMXbsRWRBlfAuEv7fBvTwM=", + "AAAADgAAAAZuYXRpdmUAAA==" + ], + "value": { + "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" + }, + "inSuccessfulContractCall": true + }, + { + "type": "contract", + "ledger": 2531273, + "ledgerClosedAt": "2023-11-15T09:20:38Z", + "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", + "id": "0010871734752280576-0000000004", + "pagingToken": "0010871734752280576-0000000004", + "topic": [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "AAAAEgAAAAAAAAAA+YQ+FM83vUUwQ6P3gKCMVTyC3/jO+DERXTWJDKEjagU=", + "AAAAEgAAAAAAAAAAwl0UMLLKYqMEedoowz8VnwbRywjcKEeQegoMmU6C9/0=", + "AAAADgAAAAZuYXRpdmUAAA==" + ], + "value": { + "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" + }, + "inSuccessfulContractCall": true + } + ], + "latestLedger": 2539388 + } + } + }, + { + "name": "All Events", + "description": "Example request to the `getEvents` method, filtering for all events of all types for any and all contracts.", + "params": [ + { + "name": "startLedger", + "value": 2530000 + }, + { + "name": "pagination", + "value": { + "limit": 2 + } + } + ], + "result": { + "name": "getEventsResult", + "value": { + "events": [ + { + "type": "diagnostic", + "ledger": 2530001, + "ledgerClosedAt": "2023-11-15T07:29:05Z", + "contractId": "", + "id": "0010866271553875968-0000000000", + "pagingToken": "0010866271553875968-0000000000", + "topic": [ + "AAAADwAAAAdmbl9jYWxsAA==", + "AAAADQAAACCGE7Aj5EvXxmmTtyojmlFF/Qv3qMTyL7THd6SG4GHZxQ==", + "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" + ], + "value": { + "xdr": "AAAAEAAAAAEAAAACAAAADwAAAAN1c2QAAAAACQAAAAAAAAAAAAAAAAASHQg=" + }, + "inSuccessfulContractCall": true + }, + { + "type": "diagnostic", + "ledger": 2530001, + "ledgerClosedAt": "2023-11-15T07:29:05Z", + "contractId": "CCDBHMBD4RF5PRTJSO3SUI42KFC72C7XVDCPEL5UY532JBXAMHM4KOQ3", + "id": "0010866271553875968-0000000001", + "pagingToken": "0010866271553875968-0000000001", + "topic": [ + "AAAADwAAAAlmbl9yZXR1cm4AAAA=", + "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" + ], + "value": { + "xdr": "AAAAAQ==" + }, + "inSuccessfulContractCall": true + } + ], + "latestLedger": 2539529 + } + } + } + ] + }, + { + "name": "getHealth", + "summary": "returns node health", + "description": "General node health check.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getHealth" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getHealthResult", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "\"healthy\"" + } + } + } + }, + "examples": [ + { + "name": "Current node health", + "description": "Example request to the `getHealth` method", + "params": [], + "result": { + "name": "getHealthResult", + "value": { + "status": "healthy" + } + } + } + ] + }, + { + "name": "getLatestLedger", + "summary": "returns latest known ledger", + "description": "For finding out the current latest known ledger of this node. This is a subset of the ledger info from Horizon.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getLatestLedger" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getLatestLedgerResult", + "schema": { + "type": "object", + "properties": { + "id": { + "title": "id", + "type": "string", + "minLength": 64, + "maxLength": 64, + "pattern": "^[a-f\\d]{64}$", + "description": "Hash identifier of the latest ledger (as a hex-encoded string) known to Soroban RPC at the time it handled the request." + }, + "protocolVersion": { + "title": "protocolVersion", + "description": "Stellar Core protocol version associated with the latest ledger.", + "type": "number" + }, + "sequence": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "number" + } + } + } + }, + "examples": [ + { + "name": "Details of the Current Ledger", + "description": "Example request to the `getLatestLedger` method.", + "params": [], + "result": { + "name": "getLatestLedgerResult", + "value": { + "id": "c73c5eac58a441d4eb733c35253ae85f783e018f7be5ef974258fed067aabb36", + "protocolVersion": 20, + "sequence": 2539605 + } + } + } + ] + }, + { + "name": "getLedgerEntries", + "summary": "returns ledger entries", + "description": "For reading the current value of ledger entries directly.\n\nAllows you to directly inspect the current state of a contract, a contract's code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or `simulateTransaction`.\n\nTo fetch contract wasm byte-code, use the ContractCode ledger entry key.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getLedgerEntries" + }, + "paramStructure": "by-name", + "params": [ + { + "name": "keys", + "summary": "array of ledger keys", + "description": "Array containing the keys of the ledger entries you wish to retrieve. (an array of serialized base64 strings)", + "required": true, + "schema": { + "description": "Array containing ledger keys.", + "type": "array", + "items": { + "type": "string", + "description": "Ledger key, serialized as a base64 string, corresponding to an existing ledger entry you wish to retrieve." + } + } + } + ], + "result": { + "name": "getLedgerEntriesResult", + "schema": { + "type": "object", + "required": [ + "latestLedger" + ], + "properties": { + "latestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "number" + }, + "entries": { + "type": "array", + "description": "Array of objects containing all found ledger entries", + "items": { + "type": "object", + "description": "Object containing information about an existing ledger entry.", + "properties": { + "key": { + "type": "string", + "description": "The key of the ledger entry (serialized in a base64 string)." + }, + "xdr": { + "type": "string", + "description": "The current value of the given ledger entry (serialized in a base64 string)." + }, + "lastModifiedLedgerSeq": { + "title": "ledgerSequence", + "description": "The ledger sequence number of the last time this entry was updated.", + "type": "number" + }, + "liveUntilLedgerSeq": { + "title": "ledgerSequence", + "description": "Sequence number of the ledger.", + "type": "number" + } + } + } + } + } + } + }, + "examples": [ + { + "name": "Retrieve a Contract's Counter Entry for an Address", + "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry.", + "params": [ + { + "name": "keys", + "summary": "ledger key for an address' counter entry", + "description": "A ledger key that will request a ledger entry defined using a tuple variant enum in a contract: `Counter(Address)`", + "value": [ + "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=" + ] + } + ], + "result": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC", + "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", + "lastModifiedLedgerSeq": 2552504 + } + ], + "latestLedger": 2552990 + } + } + }, + { + "name": "Retrieve a Token's Balance Entry for Contract", + "description": "Example request to the `getNetwork` method for a SAC balance ledger entry belonging to a contract.", + "params": [ + { + "name": "keys", + "summary": "ledger key for a contract's native XLM balance", + "description": "A ledger key that will request a ledger entry corresponding to a contract's balance on the native XLM Stellar Asset Contract.", + "value": [ + "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" + ] + } + ], + "result": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", + "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", + "lastModifiedLedgerSeq": 2553612 + } + ], + "latestLedger": 2553713 + } + } + }, + { + "name": "Retrieve Multiple Ledger Entries from Different Contracts.", + "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry and a SAC balance ledger entry.", + "params": [ + { + "name": "keys", + "summary": "ledger keys for multiple ledger entries", + "description": "Two ledger keys: One for a counter entry, and one for a contract's native XLM balance.", + "value": [ + "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", + "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" + ] + } + ], + "result": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", + "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", + "lastModifiedLedgerSeq": 2553612 + }, + { + "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", + "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", + "lastModifiedLedgerSeq": 2552504 + } + ], + "latestLedger": 2553767 + } + } + } + ] + }, + { + "name": "getNetwork", + "summary": "returns network config", + "description": "General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getNetwork" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getNetworkResult", + "schema": { + "type": "object", + "required": [ + "passphrase", + "protocolVersion" + ], + "properties": { + "passphrase": { + "title": "networkPassphrase", + "description": "Network passphrase configured for this Soroban RPC node.", + "type": "string" + }, + "protocolVersion": { + "title": "protocolVersion", + "description": "Stellar Core protocol version associated with the latest ledger.", + "type": "number" + }, + "friendbotUrl": { + "type": "string", + "description": "(optional) The URL of this network's \"friendbot\" faucet" + } + } + } + }, + "examples": [ + { + "name": "Testnet Network Configuration", + "description": "Example request to the `getNetwork` method for a node connected to the Stellar Testnet network.", + "params": [], + "result": { + "name": "getNetworkResult", + "value": { + "friendbotUrl": "https://friendbot-testnet.stellar.org/", + "passphrase": "Test SDF Network ; September 2015", + "protocolVersion": 20 + } + } + }, + { + "name": "Futurenet Network Configuration", + "description": "Example request to the `getNetwork` method for a node connected to the Stellar Futurenet network.", + "params": [], + "result": { + "name": "getNetworkResult", + "value": { + "friendbotUrl": "https://friendbot-futurenet.stellar.org/", + "passphrase": "Test SDF Future Network ; October 2022", + "protocolVersion": 20 + } + } + } + ] + }, + { + "name": "getTransaction", + "summary": "returns transaction details", + "description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The soroban-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 1440 ledgers, approximately equivalent to a 2-hour timeframe. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting. For comprehensive debugging needs that extend beyond the 2-hour timeframe, it is advisable to retrieve transaction information from Horizon, as it provides a lasting and persistent record.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "name": "hash", + "summary": "transaction hash to query", + "description": "Transaction hash to query as a hex-encoded string. This transaction hash should correspond to transaction that has been previously submitted to the network.", + "required": true, + "schema": { + "title": "hash", + "type": "string", + "minLength": 64, + "maxLength": 64, + "pattern": "^[a-f\\d]{64}$", + "description": "Transaction hash (as a hex-encoded string)" + } + } + ], + "result": { + "name": "getTransactionResult", + "schema": { + "type": "object", + "required": [ + "status", + "latestLedger", + "latestLedgerCloseTime", + "oldestLedger", + "oldestLedgerCloseTime" + ], + "properties": { + "status": { + "type": "string", + "description": "The current status of the transaction by hash", + "enum": [ + "SUCCESS", + "NOT_FOUND", + "FAILED" + ] + }, + "latestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "number" + }, + "latestLedgerCloseTime": { + "title": "latestLedgerCloseTime", + "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "string" + }, + "oldestLedger": { + "title": "oldestLedger", + "description": "The sequence number of the oldest ledger ingested by Soroban RPC at the time it handled the request.", + "type": "number" + }, + "oldestLedgerCloseTime": { + "title": "oldestLedgerCloseTime", + "description": "The unix timestamp of the close time of the oldest ledger ingested by Soroban RPC at the time it handled the request.", + "type": "string" + }, + "ledger": { + "title": "ledger", + "description": "(optional) The sequence number of the ledger which included the transaction. This field is only present if `status` is `SUCCESS` or `FAILED`.", + "type": "number" + }, + "createdAt": { + "title": "createdAt", + "description": "(optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`.", + "type": "string" + }, + "applicationOrder": { + "type": "number", + "description": "(optional) The index of the transaction among all transactions included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "feeBump": { + "type": "boolean", + "description": "(optional) Indicates whether the transaction was fee bumped. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "envelopeXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction." + }, + "resultXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "resultMetaXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction." + } + } + } + }, + "examples": [ + { + "name": "Successful Transaction", + "description": "Query for a transaction hash that returns `SUCCESS` from the RPC node.", + "params": [ + { + "name": "hash", + "summary": "a recent transaction hash", + "description": "Transaction hash that hit the network recently enough to still be visible through the RPC node.", + "value": "6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da" + } + ], + "result": { + "name": "getTransactionResult", + "value": { + "status": "SUCCESS", + "latestLedger": 2540076, + "latestLedgerCloseTime": "1700086333", + "oldestLedger": 2538637, + "oldestLedgerCloseTime": "1700078796", + "applicationOrder": 1, + "envelopeXdr": "AAAAAgAAAADGFY14/R1KD0VGtTbi5Yp4d7LuMW0iQbLM/AUiGKj5owCpsoQAJY3OAAAjqgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAARc2V0X2N1cnJlbmN5X3JhdGUAAAAAAAACAAAADwAAAANldXIAAAAACQAAAAAAAAAAAAAAAAARCz4AAAABAAAAAAAAAAAAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAARc2V0X2N1cnJlbmN5X3JhdGUAAAAAAAACAAAADwAAAANldXIAAAAACQAAAAAAAAAAAAAAAAARCz4AAAAAAAAAAQAAAAAAAAABAAAAB4408vVXuLU3mry897TfPpYjjsSN7n42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29yZV9tZXRyaWNzAAAADwAAAAplbWl0X2V2ZW50AAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAPZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAAAhjcHVfaW5zbgAAAAUAAAAAATLTQAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAAAhtZW1fYnl0ZQAAAAUAAAAAACqhewAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABFpbnZva2VfdGltZV9uc2VjcwAAAAAAAAUAAAAAABFfSQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAAA9tYXhfcndfa2V5X2J5dGUAAAAABQAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAACAAAADwAAAAxjb3JlX21ldHJpY3MAAAAPAAAAEG1heF9yd19kYXRhX2J5dGUAAAAFAAAAAAAAB+gAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAQbWF4X3J3X2NvZGVfYnl0ZQAAAAUAAAAAAACBgAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABNtYXhfZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAA==", + "ledger": 2540064, + "createdAt": "1700086268" + } + } + }, + { + "name": "Not Found Transaction", + "description": "Query for a transaction hash that returns `NOT_FOUND` from the RPC node.", + "params": [ + { + "name": "hash", + "summary": "an old transaction hash", + "description": "Transaction has that is old enough for the RPC node to have forgotten about it.", + "value": "85f7aa8bfda425b98c0e53ffe56796ffd8865ec2fcc3ad71abf120801e2a14e5" + } + ], + "result": { + "name": "getTransactionResult", + "value": { + "status": "NOT_FOUND", + "latestLedger": 2540099, + "latestLedgerCloseTime": "1700086455", + "oldestLedger": 2538660, + "oldestLedgerCloseTime": "1700078913" + } + } + }, + { + "name": "Failed Transaction", + "description": "Query for a transaction hash that returns `FAILED` from the RPC node.", + "params": [ + { + "name": "hash", + "summary": "a failed transaction hash", + "description": "Transaction hash that failed to be accepted into a ledger.", + "value": "2e4c699cbcb8ee83fffb857c9579bcc91f73f0df2a0444292f66e37563785929" + } + ], + "result": { + "name": "getTransactionResult", + "value": { + "status": "FAILED", + "latestLedger": 2540124, + "latestLedgerCloseTime": "1700086588", + "oldestLedger": 2538685, + "oldestLedgerCloseTime": "1700079044", + "applicationOrder": 2, + "envelopeXdr": "AAAAAgAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAAG4AFyJfAABKvgAAAAIAAAAAAAAAAQAmwlEAJsK1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAE/fr1kk7lqP0srDPW4JExF1MWmpsG49FsRE3b0vMCmzAAAAAUVVUlMAAAAArPm4/+q9j4dl178h2JjrqjgRXnQ1WiGkyVy+nv3nGkEAAAAAAVjZQAAAAAAAAAABy786aQAAAEDybJBtG7V5NrRFpoboRUN/5ecys5wSUgag3CnTtWLmq3JDOxrEjK9noAnu/F5O0E8iXuVzX9BxZSO9JZ+Tw6kK", + "resultXdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+gAAAAA=", + "resultMetaXdr": "AAAAAwAAAAAAAAACAAAAAwAmwlIAAAAAAAAAAFm/J+WxnkW6a1J1L63T9idZYwvdhZ3NfUEaT9DLvzppAAAAF0g7NXsAFyJfAABKvQAAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAACbCSwAAAABlVULiAAAAAAAAAAEAJsJSAAAAAAAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAABdIOzV7ABciXwAASr4AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAmwlIAAAAAZVVDBwAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "ledger": 2540114, + "createdAt": "1700086535" + } + } + } + ] + }, + { + "name": "sendTransaction", + "summary": "submits a transaction", + "description": "Submit a real transaction to the Stellar network. This is the only way to make changes on-chain.\n\n Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call `getTransaction` to learn about transaction success/failure.\n\nThis supports all transactions, not only smart contract-related transactions.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/sendTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "name": "transaction", + "summary": "transaction to be submitted to the network", + "description": "The signed transaction to broadcast for inclusion in a ledger.", + "required": true, + "schema": { + "title": "transaction", + "description": "A Stellar transaction, serialized as a base64 string", + "type": "string" + } + } + ], + "result": { + "name": "sendTransactionResult", + "summary": "Transaction status and network state.", + "description": "Transaction status and network state. The result will include if the transaction was successfully enqueued, and information about the current ledger.", + "schema": { + "type": "object", + "required": [ + "hash", + "status", + "latestLedger", + "latestLedgerCloseTime" + ], + "properties": { + "hash": { + "title": "hash", + "type": "string", + "minLength": 64, + "maxLength": 64, + "pattern": "^[a-f\\d]{64}$", + "description": "Transaction hash (as a hex-encoded string)" + }, + "status": { + "type": "string", + "description": "The current status of the transaction by hash.", + "enum": [ + "PENDING", + "DUPLICATE", + "TRY_AGAIN_LATER", + "ERROR" + ] + }, + "latestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "number" + }, + "latestLedgerCloseTime": { + "title": "latestLedgerCloseTime", + "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "string" + }, + "errorResultXdr": { + "type": "string", + "description": "(optional) If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.", + "contentEncoding": "base64" + } + } + } + }, + "examples": [ + { + "name": "Pending Transaction", + "description": "Submitting a valid transaction using the `sendTransaction` method, resulting in a `PENDING` status.", + "params": [ + { + "name": "transaction", + "summary": "a valid transaction sent to the network", + "description": "A valid Stellar transaction that was sent to the network successfully.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" + } + ], + "result": { + "name": "sendTransactionResult", + "value": { + "status": "PENDING", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + } + }, + { + "name": "Duplicate Transaction", + "description": "Submitting a valid, yet duplicate transaction using the `sendTransaction` method, resulting in a `DUPLICATE` status.", + "params": [ + { + "name": "transaction", + "summary": "a valid transaction sent to the network", + "description": "A valid Stellar transaction that was sent to the network successfully.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" + } + ], + "result": { + "name": "sendTransactionResult", + "value": { + "status": "DUPLICATE", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + } + }, + { + "name": "Error Transaction", + "description": "Submitting an invalid transaction using the `sendTransaction` method, resulting in an `ERROR` status.", + "params": [ + { + "name": "transaction", + "summary": "an invalid transaction sent to the network", + "description": "An invalid Stellar transaction that was sent to the network, built with an incorrect sequence number.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQMQkfl8sdCYQIOdJB0TyazJ126y2TFRjL8yNHSb4TTsH5Ym6qM6gkTx1ENRZ0PFprVGusMTHISzdPHYJ4njBZAQ=" + } + ], + "result": { + "name": "sendTransactionResult", + "value": { + "errorResultXdr": "AAAAAAAAAGT////7AAAAAA==", + "status": "ERROR", + "hash": "84a5f62bff422581dda019811daed0868a3db41833ad6e90a12f0d7db1be8167", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + } + }, + { + "name": "Try Again Later Transaction", + "description": "Submitting a valid transaction before an account's previously submitted transaction has settled using the `sendTransaction` method, resulting in a `TRY_AGAIN_LATER` status.", + "params": [ + { + "name": "transaction", + "summary": "a valid transaction sent to the network", + "description": "A valid Stellar transaction that was sent to the network successfully.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" + } + ], + "result": { + "name": "sendTransactionResult", + "value": { + "status": "TRY_AGAIN_LATER", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + } + } + ] + }, + { + "name": "simulateTransaction", + "summary": "submits a trial contract invocation transaction", + "description": "Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the network.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/simulateTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "name": "transaction", + "summary": "transaction to be simulated", + "description": "In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type `invokeHostFunction`.", + "required": true, + "schema": { + "title": "transaction", + "description": "A Stellar transaction, serialized as a base64 string", + "type": "string" + } + }, + { + "name": "resourceConfig", + "summary": "configuration for how resources will be calculated", + "description": "Contains configuration for how resources will be calculated when simulating transactions.", + "required": false, + "schema": { + "title": "resourceConfig", + "description": "Configuration for how resources will be calculated.", + "type": "object", + "properties": { + "instructionLeeway": { + "title": "instructionLeeway", + "description": "Allow this many extra instructions when budgeting resources.", + "type": "number" + } + } + } + } + ], + "result": { + "name": "simulateTransactionResult", + "summary": "anticipated affects of the transaction.", + "description": "The response will include the anticipated affects the given transaction will have on the network. Additionally, information needed to build, sign, and actually submit the transaction will be provided.", + "schema": { + "type": "object", + "required": [ + "latestLedger" + ], + "properties": { + "latestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "type": "number" + }, + "minResourceFee": { + "type": "string", + "description": "(optional) Stringified number - Recommended minimum resource fee to add when submitting the transaction. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar). Not present in case of error." + }, + "cost": { + "type": "object", + "description": "(optional) - Information about instructions used, etc. Not present in case of error.", + "required": [ + "cpuInsns", + "memBytes" + ], + "properties": { + "cpuInsns": { + "type": "string", + "description": "Stringified number - Total cpu instructions consumed by this transaction" + }, + "memBytes": { + "type": "string", + "description": "Stringified number - Total memory bytes allocated by this transaction" + } + } + }, + "results": { + "type": "array", + "description": "(optional) - This array will only have one element: the result for the Host Function invocation. Only present on successful simulation (i.e. no error) of `InvokeHostFunction` operations.", + "items": { + "type": "object", + "required": [ + "xdr", + "auth" + ], + "properties": { + "xdr": { + "type": "string", + "description": "Serialized base64 string - return value of the Host Function call." + }, + "auth": { + "type": "array", + "description": "Array of serialized base64 strings - Per-address authorizations recorded when simulating this Host Function call.", + "items": { + "type": "string" + } + } + } + } + }, + "transactionData": { + "type": "string", + "description": "(optional) Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the simulated transaction. This data contains the refundable fee and resource usage information such as the ledger footprint and IO access data (serialized in a base64 string). Not present in case of error." + }, + "events": { + "type": "array", + "description": "(optional) Array of serialized base64 strings - Array of the events emitted during the contract invocation. The events are ordered by their emission time. (an array of serialized base64 strings). Only present when simulating of `InvokeHostFunction` operations, note that it can be present on error, providing extra context about what failed.", + "items": { + "type": "string" + } + }, + "restorePreamble": { + "type": "object", + "description": "(optional) - It can only be present on successful simulation (i.e. no error) of `InvokeHostFunction` operations. If present, it indicates that the simulation detected archived ledger entries which need to be restored before the submission of the `InvokeHostFunction` operation. The `minResourceFee` and `transactionData` fields should be used to submit a transaction containing a `RestoreFootprint` operation.", + "required": [ + "minResourceFee", + "transactionData" + ], + "properties": { + "minResourceFee": { + "type": "string", + "description": "Stringified number - Recommended minimum resource fee to add when submitting the `RestoreFootprint` operation. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar)." + }, + "transactionData": { + "type": "string", + "description": "Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the `RestoreFootprint` operation." + } + } + }, + "error": { + "type": "string", + "description": "(optional) - This field will include details about why the invoke host function call failed. Only present if the transaction simulation failed." + } + } + } + }, + "examples": [ + { + "name": "Successful Transaction Simulation", + "description": "Transaction simulation that succeeds and returns the necessary information to prepare and submit the transaction.", + "params": [ + { + "name": "transaction", + "summary": "a valid transaction", + "description": "A transaction that will correctly invoke a contract function.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAMAAAAAAAAAAAAAAAA=" + }, + { + "name": "resourceConfig", + "summary": "the default resource configuration", + "description": "The default value for the (optional) resource configuration object for transaction simulation.", + "value": { + "instructionLeeway": 3000000 + } + } + ], + "result": { + "name": "simulateTransactionResult", + "value": { + "transactionData": "AAAAAAAAAAIAAAAGAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAFAAAAAEAAAAHy8vNUZ8vyZ2ybPHW0XbSrRtP7gEWsJ6zDzcfY9P8z88AAAABAAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAEAHfKyAAAFiAAAAIgAAAAAAAAAAw==", + "minResourceFee": "90353", + "events": [ + "AAAAAQAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAABAAAAABAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAM=", + "AAAAAQAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAACWZuX3JldHVybgAAAAAAAA8AAAAJaW5jcmVtZW50AAAAAAAAAwAAAAw=" + ], + "results": [ + { + "auth": [], + "xdr": "AAAAAwAAAAw=" + } + ], + "cost": { + "cpuInsns": "1635562", + "memBytes": "1295756" + }, + "latestLedger": 2552139 + } + } + }, + { + "name": "Failed Transaction Simulation", + "description": "Transaction simulation that fails due to the contract invocation being constructed with an improper number of arguments.", + "params": [ + { + "name": "transaction", + "summary": "an invalid transaction", + "description": "A transaction that attempts to invoke a contract function with the wrong number of arguments.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAA" + }, + { + "name": "resourceConfig", + "summary": "the default resource configuration", + "description": "The default value for the (optional) resource configuration object for transaction simulation.", + "value": { + "instructionLeeway": 3000000 + } + } + ], + "result": { + "name": "simulateTransactionResult", + "value": { + "error": "host invocation failed\n\nCaused by:\n HostError: Error(WasmVm, InternalError)\n \n Event log (newest first):\n 0: [Diagnostic Event] contract:cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b, topics:[error, Error(WasmVm, InternalError)], data:[\"VM call failed: Func(MismatchingParameterLen)\", increment]\n 1: [Diagnostic Event] topics:[fn_call, Bytes(cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b), increment], data:3\n \n Backtrace (newest first):\n 0: soroban_env_host::vm::Vm::invoke_function_raw\n 1: soroban_env_host::host::frame::::with_frame\n 2: soroban_env_host::host::frame::::call_n_internal\n 3: soroban_env_host::host::frame::::invoke_function\n 4: preflight::preflight::preflight_invoke_hf_op\n 5: preflight::preflight_invoke_hf_op::{{closure}}\n 6: core::ops::function::FnOnce::call_once{{vtable.shim}}\n 7: preflight::catch_preflight_panic\n 8: _cgo_0b49d6ed4a0b_Cfunc_preflight_invoke_hf_op\n at tmp/go-build/cgo-gcc-prolog:103:11\n 9: runtime.asmcgocall\n at ./runtime/asm_amd64.s:848\n \n ", + "events": [ + "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAAAMAAAAD", + "AAAAAAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAEAAAAHAAAAEAAAAAEAAAACAAAADgAAAC1WTSBjYWxsIGZhaWxlZDogRnVuYyhNaXNtYXRjaGluZ1BhcmFtZXRlckxlbikAAAAAAAAPAAAACWluY3JlbWVudAAAAA==" + ], + "cost": { + "cpuInsns": "0", + "memBytes": "0" + }, + "latestLedger": 2552013 + } + } + } + ] + } + ], + "components": {} +} \ No newline at end of file diff --git a/openrpc/refs-openrpc.json b/openrpc/refs-openrpc.json new file mode 100644 index 00000000..41cde0bc --- /dev/null +++ b/openrpc/refs-openrpc.json @@ -0,0 +1,1414 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Soroban RPC", + "description": "Soroban-RPC allows you to communicate directly with Soroban via a JSON RPC interface.", + "termsOfService": "https://stellar.org/terms-of-service", + "contact": { + "name": "Stellar Development Foundation", + "url": "https://stellar.org/connect", + "email": "hello@stellar.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "20.1.0" + }, + "servers": [ + { + "name": "Testnet", + "url": "https://soroban-testnet.stellar.org:443", + "summary": "Publicly available RPC server maintained by SDF, operating on the Testnet test network.", + "description": "Testnet is meant to be a stable network that runs a production (or near-production) version of the Stellar network." + }, + { + "name": "Futurenet", + "url": "https://rpc-futurenet.stellar.org:443", + "summary": "Publicly available RPC server maintained by SDF, operating on the Futurenet test network.", + "description": "Futurenet is meant to be a bleeding-edge, experimental network that runs an early, test version of the Stellar network." + } + ], + "methods": [ + { + "name": "getEvents", + "summary": "returns contract events", + "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getEvents" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/StartLedger" + }, + { + "$ref": "#/components/contentDescriptors/EventFilters" + }, + { + "$ref": "#/components/contentDescriptors/Pagination" + } + ], + "result": { + "name": "getEventsResult", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Event" + } + } + } + } + }, + "examples": [ + { + "$ref": "#/components/examplePairingObjects/NativeTransferEventsExample" + }, + { + "$ref": "#/components/examplePairingObjects/AnyEventsExample" + } + ] + }, + { + "name": "getHealth", + "summary": "returns node health", + "description": "General node health check.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getHealth" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getHealthResult", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "\"healthy\"" + } + } + } + }, + "examples": [ + { + "name": "Current node health", + "description": "Example request to the `getHealth` method", + "params": [], + "result": { + "name": "getHealthResult", + "value": { + "status": "healthy" + } + } + } + ] + }, + { + "name": "getLatestLedger", + "summary": "returns latest known ledger", + "description": "For finding out the current latest known ledger of this node. This is a subset of the ledger info from Horizon.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getLatestLedger" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getLatestLedgerResult", + "schema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/LedgerHash" + }, + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "sequence": { + "$ref": "#/components/schemas/LatestLedger" + } + } + } + }, + "examples": [ + { + "name": "Details of the Current Ledger", + "description": "Example request to the `getLatestLedger` method.", + "params": [], + "result": { + "name": "getLatestLedgerResult", + "value": { + "id": "c73c5eac58a441d4eb733c35253ae85f783e018f7be5ef974258fed067aabb36", + "protocolVersion": 20, + "sequence": 2539605 + } + } + } + ] + }, + { + "name": "getLedgerEntries", + "summary": "returns ledger entries", + "description": "For reading the current value of ledger entries directly.\n\nAllows you to directly inspect the current state of a contract, a contract's code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or `simulateTransaction`.\n\nTo fetch contract wasm byte-code, use the ContractCode ledger entry key.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getLedgerEntries" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/LedgerKeys" + } + ], + "result": { + "name": "getLedgerEntriesResult", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "entries": { + "type": "array", + "description": "Array of objects containing all found ledger entries", + "items": { + "$ref": "#/components/schemas/LedgerEntry" + } + } + }, + "required": [ + "latestLedger" + ] + } + }, + "examples": [ + { + "$ref": "#/components/examplePairingObjects/CounterLedgerEntryExample" + }, + { + "$ref": "#/components/examplePairingObjects/ContractBalanceLedgerEntryExample" + }, + { + "$ref": "#/components/examplePairingObjects/CombinedLedgerEntryExample" + } + ] + }, + { + "name": "getNetwork", + "summary": "returns network config", + "description": "General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getNetwork" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getNetworkResult", + "schema": { + "type": "object", + "properties": { + "passphrase": { + "$ref": "#/components/schemas/NetworkPassphrase" + }, + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "friendbotUrl": { + "type": "string", + "description": "(optional) The URL of this network's \"friendbot\" faucet" + } + }, + "required": [ + "passphrase", + "protocolVersion" + ] + } + }, + "examples": [ + { + "$ref": "#/components/examplePairingObjects/TestnetNetworkConfig" + }, + { + "$ref": "#/components/examplePairingObjects/FuturenetNetworkConfig" + } + ] + }, + { + "name": "getTransaction", + "summary": "returns transaction details", + "description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The soroban-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 1440 ledgers, approximately equivalent to a 2-hour timeframe. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting. For comprehensive debugging needs that extend beyond the 2-hour timeframe, it is advisable to retrieve transaction information from Horizon, as it provides a lasting and persistent record.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/TransactionHash" + } + ], + "result": { + "name": "getTransactionResult", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "The current status of the transaction by hash", + "enum": [ + "SUCCESS", + "NOT_FOUND", + "FAILED" + ] + }, + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "latestLedgerCloseTime": { + "$ref": "#/components/schemas/LatestLedgerCloseTime" + }, + "oldestLedger": { + "$ref": "#/components/schemas/OldestLedger" + }, + "oldestLedgerCloseTime": { + "$ref": "#/components/schemas/OldestLedgerCloseTime" + }, + "ledger": { + "title": "ledger", + "description": "(optional) The sequence number of the ledger which included the transaction. This field is only present if `status` is `SUCCESS` or `FAILED`.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "createdAt": { + "title": "createdAt", + "description": "(optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`.", + "$ref": "#/components/schemas/LedgerCloseTime" + }, + "applicationOrder": { + "type": "number", + "description": "(optional) The index of the transaction among all transactions included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "feeBump": { + "type": "boolean", + "description": "(optional) Indicates whether the transaction was fee bumped. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "envelopeXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction." + }, + "resultXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "resultMetaXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction." + } + }, + "required": [ + "status", + "latestLedger", + "latestLedgerCloseTime", + "oldestLedger", + "oldestLedgerCloseTime" + ] + } + }, + "examples": [ + { + "$ref": "#/components/examplePairingObjects/SuccessfulTransaction" + }, + { + "$ref": "#/components/examplePairingObjects/NotFoundTransaction" + }, + { + "$ref": "#/components/examplePairingObjects/FailedTransaction" + } + ] + }, + { + "name": "sendTransaction", + "summary": "submits a transaction", + "description": "Submit a real transaction to the Stellar network. This is the only way to make changes on-chain.\n\n Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call `getTransaction` to learn about transaction success/failure.\n\nThis supports all transactions, not only smart contract-related transactions.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/sendTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/SignedTransaction" + } + ], + "result": { + "name": "sendTransactionResult", + "summary": "Transaction status and network state.", + "description": "Transaction status and network state. The result will include if the transaction was successfully enqueued, and information about the current ledger.", + "schema": { + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/TransactionHash" + }, + "status": { + "type": "string", + "description": "The current status of the transaction by hash.", + "enum": [ + "PENDING", + "DUPLICATE", + "TRY_AGAIN_LATER", + "ERROR" + ] + }, + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "latestLedgerCloseTime": { + "$ref": "#/components/schemas/LatestLedgerCloseTime" + }, + "errorResultXdr": { + "type": "string", + "description": "(optional) If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.", + "contentEncoding": "base64" + } + }, + "required": [ + "hash", + "status", + "latestLedger", + "latestLedgerCloseTime" + ] + } + }, + "examples": [ + { + "$ref": "#/components/examplePairingObjects/PendingTransaction" + }, + { + "$ref": "#/components/examplePairingObjects/DuplicateTransaction" + }, + { + "$ref": "#/components/examplePairingObjects/ErrorTransaction" + }, + { + "$ref": "#/components/examplePairingObjects/TryAgainLaterTransaction" + } + ] + }, + { + "name": "simulateTransaction", + "summary": "submits a trial contract invocation transaction", + "description": "Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the network.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/simulateTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/UnsignedTransaction" + }, + { + "$ref": "#/components/contentDescriptors/ResourceConfig" + } + ], + "result": { + "name": "simulateTransactionResult", + "summary": "anticipated affects of the transaction.", + "description": "The response will include the anticipated affects the given transaction will have on the network. Additionally, information needed to build, sign, and actually submit the transaction will be provided.", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "minResourceFee": { + "type": "string", + "description": "(optional) Stringified number - Recommended minimum resource fee to add when submitting the transaction. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar). Not present in case of error." + }, + "cost": { + "type": "object", + "description": "(optional) - Information about instructions used, etc. Not present in case of error.", + "properties": { + "cpuInsns": { + "type": "string", + "description": "Stringified number - Total cpu instructions consumed by this transaction" + }, + "memBytes": { + "type": "string", + "description": "Stringified number - Total memory bytes allocated by this transaction" + } + }, + "required": [ + "cpuInsns", + "memBytes" + ] + }, + "results": { + "type": "array", + "description": "(optional) - This array will only have one element: the result for the Host Function invocation. Only present on successful simulation (i.e. no error) of `InvokeHostFunction` operations.", + "items": { + "type": "object", + "properties": { + "xdr": { + "type": "string", + "description": "Serialized base64 string - return value of the Host Function call." + }, + "auth": { + "type": "array", + "description": "Array of serialized base64 strings - Per-address authorizations recorded when simulating this Host Function call.", + "items": { + "type": "string" + } + } + }, + "required": [ + "xdr", + "auth" + ] + } + }, + "transactionData": { + "type": "string", + "description": "(optional) Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the simulated transaction. This data contains the refundable fee and resource usage information such as the ledger footprint and IO access data (serialized in a base64 string). Not present in case of error." + }, + "events": { + "type": "array", + "description": "(optional) Array of serialized base64 strings - Array of the events emitted during the contract invocation. The events are ordered by their emission time. (an array of serialized base64 strings). Only present when simulating of `InvokeHostFunction` operations, note that it can be present on error, providing extra context about what failed.", + "items": { + "type": "string" + } + }, + "restorePreamble": { + "type": "object", + "description": "(optional) - It can only be present on successful simulation (i.e. no error) of `InvokeHostFunction` operations. If present, it indicates that the simulation detected archived ledger entries which need to be restored before the submission of the `InvokeHostFunction` operation. The `minResourceFee` and `transactionData` fields should be used to submit a transaction containing a `RestoreFootprint` operation.", + "properties": { + "minResourceFee": { + "type": "string", + "description": "Stringified number - Recommended minimum resource fee to add when submitting the `RestoreFootprint` operation. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar)." + }, + "transactionData": { + "type": "string", + "description": "Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the `RestoreFootprint` operation." + } + }, + "required": [ + "minResourceFee", + "transactionData" + ] + }, + "error": { + "type": "string", + "description": "(optional) - This field will include details about why the invoke host function call failed. Only present if the transaction simulation failed." + } + }, + "required": [ + "latestLedger" + ] + } + }, + "examples": [ + { + "$ref": "#/components/examplePairingObjects/SuccessfulTransactionSimulation" + }, + { + "$ref": "#/components/examplePairingObjects/FailedTransactionSimulation" + } + ] + } + ], + "components": { + "contentDescriptors": { + "EventFilters": { + "name": "filters", + "summary": "filters to narrow events search", + "description": "List of filters for the returned events. Events matching any of the filters are included. To match a filter, an event must match both a contractId and a topic. Maximum 5 filters are allowed per request.", + "schema": { + "$ref": "#/components/schemas/EventFilters" + } + }, + "LedgerKeys": { + "name": "keys", + "summary": "array of ledger keys", + "description": "Array containing the keys of the ledger entries you wish to retrieve. (an array of serialized base64 strings)", + "required": true, + "schema": { + "$ref": "#/components/schemas/LedgerKeys" + } + }, + "Pagination": { + "name": "pagination", + "summary": "pagination options", + "description": "Pagination in soroban-rpc is similar to pagination in Horizon. See [Pagination](https://soroban.stellar.org/api/pagination).", + "required": false, + "schema": { + "$ref": "#/components/schemas/Pagination" + } + }, + "ResourceConfig": { + "name": "resourceConfig", + "summary": "configuration for how resources will be calculated", + "description": "Contains configuration for how resources will be calculated when simulating transactions.", + "required": false, + "schema": { + "$ref": "#/components/schemas/ResourceConfig" + } + }, + "StartLedger": { + "name": "startLedger", + "summary": "ledger to begin searching from", + "description": "Ledger sequence number to fetch events after (inclusive). This method will return an error if `startLedger` is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, `startLedger` must be omitted.", + "required": true, + "schema": { + "$ref": "#/components/schemas/LedgerSequence" + } + }, + "SignedTransaction": { + "name": "transaction", + "summary": "transaction to be submitted to the network", + "description": "The signed transaction to broadcast for inclusion in a ledger.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Transaction" + } + }, + "UnsignedTransaction": { + "name": "transaction", + "summary": "transaction to be simulated", + "description": "In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type `invokeHostFunction`.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Transaction" + } + }, + "TransactionHash": { + "name": "hash", + "summary": "transaction hash to query", + "description": "Transaction hash to query as a hex-encoded string. This transaction hash should correspond to transaction that has been previously submitted to the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TransactionHash" + } + } + }, + "schemas": { + "ContractId": { + "title": "contractId", + "description": "A StrKey representation of a contract address (`C...`). ([SEP-23](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0023.md#specification)).", + "type": "string" + }, + "ContractIds": { + "title": "contractIds", + "type": "array", + "description": "List of contract IDs to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.", + "maxItems": 5, + "items": { + "$ref": "#/components/schemas/ContractId" + } + }, + "Event": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/EventType" + }, + "ledger": { + "description": "Sequence number of the ledger in which this event was emitted.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "ledgerClosedAt": { + "type": "string", + "description": "[ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp of the ledger closing time" + }, + "contractId": { + "description": "StrKey representation of the contract address that emitted this event.", + "$ref": "#/components/schemas/ContractId" + }, + "id": { + "$ref": "#/components/schemas/EventId" + }, + "pagingToken": { + "description": "Duplicate of `id` field, but in the standard place for pagination tokens.", + "$ref": "#/components/schemas/EventId" + }, + "inSuccessfulContractCall": { + "description": "If true the event was emitted during a successful contract call.", + "type": "boolean" + }, + "topic": { + "type": "array", + "description": "List containing the topic this event was emitted with.", + "$ref": "#/components/schemas/TopicFilter" + }, + "value": { + "$ref": "#/components/schemas/EventValue" + } + } + }, + "EventType": { + "title": "type", + "description": "The type of event emission.", + "type": "string", + "enum": [ + "contract", + "diagnostic", + "system" + ] + }, + "EventId": { + "description": "Unique identifier for this event.\n\n- The event's unique id field is based on a [`toid` from Horizon](https://github.com/stellar/go/blob/master/toid/main.go) as used in Horizon's /effects endpoint.\n\n- https://github.com/stellar/go/blob/master/services/horizon/internal/db2/history/effect.go#L58\n\n- Specifically, it is a string containing:\n\n- bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation.\n\n- For example: `1234-1`", + "type": "string" + }, + "EventXdr": { + "description": "The emitted body value of the event (serialized in a base64 string).", + "type": "string" + }, + "EventValue": { + "description": "The data the event was broadcasting in the emitted event.", + "type": "object", + "properties": { + "xdr": { + "$ref": "#/components/schemas/EventXdr" + } + } + }, + "EventFilters": { + "type": "array", + "maxItems": 5, + "items": { + "$ref": "#/components/schemas/EventFilter" + } + }, + "EventFilter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/EventFilterType" + }, + "contractIds": { + "$ref": "#/components/schemas/ContractIds" + }, + "topics": { + "$ref": "#/components/schemas/TopicFilters" + } + }, + "required": [] + }, + "EventFilterType": { + "title": "type", + "type": "string", + "description": "A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included." + }, + "TopicFilters": { + "title": "topics", + "type": "array", + "description": "List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.", + "maxItems": 5, + "items": { + "$ref": "#/components/schemas/TopicFilter" + } + }, + "SegmentMatcher": { + "title": "SegmentMatcher", + "type": "string", + "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." + }, + "TopicFilter": { + "type": "array", + "description": "A `TopicFilter` is `SegmentMatcher[]`\n\n- The list can be 1-4 `SegmentMatchers` long.", + "minItems": 1, + "maxItems": 4, + "items": { + "$ref": "#/components/schemas/SegmentMatcher" + } + }, + "Hash": { + "title": "hash", + "type": "string", + "minLength": 64, + "maxLength": 64, + "pattern": "^[a-f\\d]{64}$" + }, + "TransactionHash": { + "title": "hash", + "description": "Transaction hash (as a hex-encoded string)", + "$ref": "#/components/schemas/Hash" + }, + "LedgerHash": { + "title": "id", + "description": "Hash identifier of the latest ledger (as a hex-encoded string) known to Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/Hash" + }, + "LedgerCloseTime": { + "title": "ledgerCloseTime", + "description": "The unix timestamp of the close time of the ledger.", + "type": "string" + }, + "LatestLedgerCloseTime": { + "title": "latestLedgerCloseTime", + "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerCloseTime" + }, + "OldestLedgerCloseTime": { + "title": "oldestLedgerCloseTime", + "description": "The unix timestamp of the close time of the oldest ledger ingested by Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerCloseTime" + }, + "LedgerKey": { + "type": "string", + "description": "Ledger key, serialized as a base64 string, corresponding to an existing ledger entry you wish to retrieve." + }, + "LedgerKeys": { + "description": "Array containing ledger keys.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LedgerKey" + } + }, + "LedgerEntry": { + "type": "object", + "description": "Object containing information about an existing ledger entry.", + "properties": { + "key": { + "type": "string", + "description": "The key of the ledger entry (serialized in a base64 string)." + }, + "xdr": { + "type": "string", + "description": "The current value of the given ledger entry (serialized in a base64 string)." + }, + "lastModifiedLedgerSeq": { + "description": "The ledger sequence number of the last time this entry was updated.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "liveUntilLedgerSeq": { + "$ref": "#/components/schemas/LedgerSequence" + } + } + }, + "LedgerSequence": { + "title": "ledgerSequence", + "description": "Sequence number of the ledger.", + "type": "number" + }, + "LatestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "OldestLedger": { + "title": "oldestLedger", + "description": "The sequence number of the oldest ledger ingested by Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "ProtocolVersion": { + "title": "protocolVersion", + "description": "Stellar Core protocol version associated with the latest ledger.", + "type": "number" + }, + "NetworkPassphrase": { + "title": "networkPassphrase", + "description": "Network passphrase configured for this Soroban RPC node.", + "type": "string" + }, + "Pagination": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "A string ID that points to a specific location in a collection of responses and is pulled from the `paging_token` value of a record. When a cursor is provided Soroban-RPC will _not_ include the element whose id matches the cursor in the response. Only elements which appear _after_ the cursor are included." + }, + "limit": { + "type": "number", + "description": "The maximum number of records returned. The limit for [getEvents](https://soroban.stellar.org/api/getEvents) can range from 1 to 10000 - an upper limit that is hardcoded in Soroban-RPC for performance reasons. If this argument isn't designated, it defaults to 100." + } + }, + "required": [] + }, + "ResourceConfig": { + "title": "resourceConfig", + "description": "Configuration for how resources will be calculated.", + "type": "object", + "properties": { + "instructionLeeway": { + "title": "instructionLeeway", + "description": "Allow this many extra instructions when budgeting resources.", + "type": "number" + } + } + }, + "Transaction": { + "title": "transaction", + "description": "A Stellar transaction, serialized as a base64 string", + "type": "string" + } + }, + "examples": { + "StartLedger": { + "name": "startLedger", + "value": 2530000 + }, + "NativeTransfersFilter": { + "name": "filters", + "value": [ + { + "type": "contract", + "contractIds": [ + "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC" + ], + "topics": [ + [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "*", + "*", + "*" + ] + ] + } + ] + }, + "EmptyFilters": { + "name": "filters", + "value": [] + }, + "PaginationLimitTwo": { + "name": "pagination", + "value": { + "limit": 2 + } + }, + "TwoNativeTransferEvents": { + "name": "getEventsResult", + "value": { + "events": [ + { + "type": "contract", + "ledger": 2531021, + "ledgerClosedAt": "2023-11-15T08:58:25Z", + "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", + "id": "0010870652420501504-0000000004", + "pagingToken": "0010870652420501504-0000000004", + "topic": [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "AAAAEgAAAAAAAAAAjt5DlR5mhneFx/1Lct0ToW555OFzg/Y28++28cJXU+I=", + "AAAAEgAAAAAAAAAA33Fu/fnobL8/u8tyLCIZzpMXbsRWRBlfAuEv7fBvTwM=", + "AAAADgAAAAZuYXRpdmUAAA==" + ], + "value": { + "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" + }, + "inSuccessfulContractCall": true + }, + { + "type": "contract", + "ledger": 2531273, + "ledgerClosedAt": "2023-11-15T09:20:38Z", + "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", + "id": "0010871734752280576-0000000004", + "pagingToken": "0010871734752280576-0000000004", + "topic": [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "AAAAEgAAAAAAAAAA+YQ+FM83vUUwQ6P3gKCMVTyC3/jO+DERXTWJDKEjagU=", + "AAAAEgAAAAAAAAAAwl0UMLLKYqMEedoowz8VnwbRywjcKEeQegoMmU6C9/0=", + "AAAADgAAAAZuYXRpdmUAAA==" + ], + "value": { + "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" + }, + "inSuccessfulContractCall": true + } + ], + "latestLedger": 2539388 + } + }, + "AnyTwoEvents": { + "name": "getEventsResult", + "value": { + "events": [ + { + "type": "diagnostic", + "ledger": 2530001, + "ledgerClosedAt": "2023-11-15T07:29:05Z", + "contractId": "", + "id": "0010866271553875968-0000000000", + "pagingToken": "0010866271553875968-0000000000", + "topic": [ + "AAAADwAAAAdmbl9jYWxsAA==", + "AAAADQAAACCGE7Aj5EvXxmmTtyojmlFF/Qv3qMTyL7THd6SG4GHZxQ==", + "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" + ], + "value": { + "xdr": "AAAAEAAAAAEAAAACAAAADwAAAAN1c2QAAAAACQAAAAAAAAAAAAAAAAASHQg=" + }, + "inSuccessfulContractCall": true + }, + { + "type": "diagnostic", + "ledger": 2530001, + "ledgerClosedAt": "2023-11-15T07:29:05Z", + "contractId": "CCDBHMBD4RF5PRTJSO3SUI42KFC72C7XVDCPEL5UY532JBXAMHM4KOQ3", + "id": "0010866271553875968-0000000001", + "pagingToken": "0010866271553875968-0000000001", + "topic": [ + "AAAADwAAAAlmbl9yZXR1cm4AAAA=", + "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" + ], + "value": { + "xdr": "AAAAAQ==" + }, + "inSuccessfulContractCall": true + } + ], + "latestLedger": 2539529 + } + }, + "LedgerKeyCounterAddress": { + "name": "keys", + "summary": "ledger key for an address' counter entry", + "description": "A ledger key that will request a ledger entry defined using a tuple variant enum in a contract: `Counter(Address)`", + "value": [ + "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=" + ] + }, + "LedgerEntryCounterAddressResult": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC", + "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", + "lastModifiedLedgerSeq": 2552504 + } + ], + "latestLedger": 2552990 + } + }, + "LedgerKeyContractBalance": { + "name": "keys", + "summary": "ledger key for a contract's native XLM balance", + "description": "A ledger key that will request a ledger entry corresponding to a contract's balance on the native XLM Stellar Asset Contract.", + "value": [ + "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" + ] + }, + "LedgerEntryContractBalanceResult": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", + "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", + "lastModifiedLedgerSeq": 2553612 + } + ], + "latestLedger": 2553713 + } + }, + "CombinedLedgerKeys": { + "name": "keys", + "summary": "ledger keys for multiple ledger entries", + "description": "Two ledger keys: One for a counter entry, and one for a contract's native XLM balance.", + "value": [ + "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", + "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" + ] + }, + "CombinedLedgerEntryResult": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", + "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", + "lastModifiedLedgerSeq": 2553612 + }, + { + "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", + "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", + "lastModifiedLedgerSeq": 2552504 + } + ], + "latestLedger": 2553767 + } + }, + "ValidContractTransaction": { + "name": "transaction", + "summary": "a valid transaction", + "description": "A transaction that will correctly invoke a contract function.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAMAAAAAAAAAAAAAAAA=" + }, + "SuccessfulSimulationResult": { + "name": "simulateTransactionResult", + "value": { + "transactionData": "AAAAAAAAAAIAAAAGAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAFAAAAAEAAAAHy8vNUZ8vyZ2ybPHW0XbSrRtP7gEWsJ6zDzcfY9P8z88AAAABAAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAEAHfKyAAAFiAAAAIgAAAAAAAAAAw==", + "minResourceFee": "90353", + "events": [ + "AAAAAQAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAABAAAAABAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAM=", + "AAAAAQAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAACWZuX3JldHVybgAAAAAAAA8AAAAJaW5jcmVtZW50AAAAAAAAAwAAAAw=" + ], + "results": [ + { + "auth": [], + "xdr": "AAAAAwAAAAw=" + } + ], + "cost": { + "cpuInsns": "1635562", + "memBytes": "1295756" + }, + "latestLedger": 2552139 + } + }, + "InvalidContractTransaction": { + "name": "transaction", + "summary": "an invalid transaction", + "description": "A transaction that attempts to invoke a contract function with the wrong number of arguments.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAA" + }, + "FailedSimulationResult": { + "name": "simulateTransactionResult", + "value": { + "error": "host invocation failed\n\nCaused by:\n HostError: Error(WasmVm, InternalError)\n \n Event log (newest first):\n 0: [Diagnostic Event] contract:cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b, topics:[error, Error(WasmVm, InternalError)], data:[\"VM call failed: Func(MismatchingParameterLen)\", increment]\n 1: [Diagnostic Event] topics:[fn_call, Bytes(cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b), increment], data:3\n \n Backtrace (newest first):\n 0: soroban_env_host::vm::Vm::invoke_function_raw\n 1: soroban_env_host::host::frame::::with_frame\n 2: soroban_env_host::host::frame::::call_n_internal\n 3: soroban_env_host::host::frame::::invoke_function\n 4: preflight::preflight::preflight_invoke_hf_op\n 5: preflight::preflight_invoke_hf_op::{{closure}}\n 6: core::ops::function::FnOnce::call_once{{vtable.shim}}\n 7: preflight::catch_preflight_panic\n 8: _cgo_0b49d6ed4a0b_Cfunc_preflight_invoke_hf_op\n at tmp/go-build/cgo-gcc-prolog:103:11\n 9: runtime.asmcgocall\n at ./runtime/asm_amd64.s:848\n \n ", + "events": [ + "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAAAMAAAAD", + "AAAAAAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAEAAAAHAAAAEAAAAAEAAAACAAAADgAAAC1WTSBjYWxsIGZhaWxlZDogRnVuYyhNaXNtYXRjaGluZ1BhcmFtZXRlckxlbikAAAAAAAAPAAAACWluY3JlbWVudAAAAA==" + ], + "cost": { + "cpuInsns": "0", + "memBytes": "0" + }, + "latestLedger": 2552013 + } + }, + "DefaultResourceConfig": { + "name": "resourceConfig", + "summary": "the default resource configuration", + "description": "The default value for the (optional) resource configuration object for transaction simulation.", + "value": { + "instructionLeeway": 3000000 + } + }, + "RecentTransactionHash": { + "name": "hash", + "summary": "a recent transaction hash", + "description": "Transaction hash that hit the network recently enough to still be visible through the RPC node.", + "value": "6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da" + }, + "TooOldTransactionHash": { + "name": "hash", + "summary": "an old transaction hash", + "description": "Transaction has that is old enough for the RPC node to have forgotten about it.", + "value": "85f7aa8bfda425b98c0e53ffe56796ffd8865ec2fcc3ad71abf120801e2a14e5" + }, + "FailedTransactionHash": { + "name": "hash", + "summary": "a failed transaction hash", + "description": "Transaction hash that failed to be accepted into a ledger.", + "value": "2e4c699cbcb8ee83fffb857c9579bcc91f73f0df2a0444292f66e37563785929" + }, + "SuccessTransactionResult": { + "name": "getTransactionResult", + "value": { + "status": "SUCCESS", + "latestLedger": 2540076, + "latestLedgerCloseTime": "1700086333", + "oldestLedger": 2538637, + "oldestLedgerCloseTime": "1700078796", + "applicationOrder": 1, + "envelopeXdr": "AAAAA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Y3MAAAAPAAAAEG1heF9yd19kYXRhX2J5dGUAAAAFAAAAAAAAB+gAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAQbWF4X3J3X2NvZGVfYnl0ZQAAAAUAAAAAAACBgAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABNtYXhfZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAA==", + "ledger": 2540064, + "createdAt": "1700086268" + } + }, + "NotFoundTransactionResult": { + "name": "getTransactionResult", + "value": { + "status": "NOT_FOUND", + "latestLedger": 2540099, + "latestLedgerCloseTime": "1700086455", + "oldestLedger": 2538660, + "oldestLedgerCloseTime": "1700078913" + } + }, + "FailedTransactionResult": { + "name": "getTransactionResult", + "value": { + "status": "FAILED", + "latestLedger": 2540124, + "latestLedgerCloseTime": "1700086588", + "oldestLedger": 2538685, + "oldestLedgerCloseTime": "1700079044", + "applicationOrder": 2, + "envelopeXdr": "AAAAAgAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAAG4AFyJfAABKvgAAAAIAAAAAAAAAAQAmwlEAJsK1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAE/fr1kk7lqP0srDPW4JExF1MWmpsG49FsRE3b0vMCmzAAAAAUVVUlMAAAAArPm4/+q9j4dl178h2JjrqjgRXnQ1WiGkyVy+nv3nGkEAAAAAAVjZQAAAAAAAAAABy786aQAAAEDybJBtG7V5NrRFpoboRUN/5ecys5wSUgag3CnTtWLmq3JDOxrEjK9noAnu/F5O0E8iXuVzX9BxZSO9JZ+Tw6kK", + "resultXdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+gAAAAA=", + "resultMetaXdr": "AAAAAwAAAAAAAAACAAAAAwAmwlIAAAAAAAAAAFm/J+WxnkW6a1J1L63T9idZYwvdhZ3NfUEaT9DLvzppAAAAF0g7NXsAFyJfAABKvQAAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAACbCSwAAAABlVULiAAAAAAAAAAEAJsJSAAAAAAAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAABdIOzV7ABciXwAASr4AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAmwlIAAAAAZVVDBwAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "ledger": 2540114, + "createdAt": "1700086535" + } + }, + "ValidSentTransaction": { + "name": "transaction", + "summary": "a valid transaction sent to the network", + "description": "A valid Stellar transaction that was sent to the network successfully.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" + }, + "InvalidSentTransaction": { + "name": "transaction", + "summary": "an invalid transaction sent to the network", + "description": "An invalid Stellar transaction that was sent to the network, built with an incorrect sequence number.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQMQkfl8sdCYQIOdJB0TyazJ126y2TFRjL8yNHSb4TTsH5Ym6qM6gkTx1ENRZ0PFprVGusMTHISzdPHYJ4njBZAQ=" + }, + "PendingTransactionResult": { + "name": "sendTransactionResult", + "value": { + "status": "PENDING", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + }, + "DuplicateTransactionResult": { + "name": "sendTransactionResult", + "value": { + "status": "DUPLICATE", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + }, + "ErrorTransactionResult": { + "name": "sendTransactionResult", + "value": { + "errorResultXdr": "AAAAAAAAAGT////7AAAAAA==", + "status": "ERROR", + "hash": "84a5f62bff422581dda019811daed0868a3db41833ad6e90a12f0d7db1be8167", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + }, + "TryAgainLaterTransactionResult": { + "name": "sendTransactionResult", + "value": { + "status": "TRY_AGAIN_LATER", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + } + }, + "examplePairingObjects": { + "NativeTransferEventsExample": { + "name": "Native XLM Transfer Events", + "description": "Example request to the `getEvents` method, filtering for `transfer` events for native Lumens, and limiting the number of returned events to 2.", + "params": [ + { + "$ref": "#/components/examples/StartLedger" + }, + { + "$ref": "#/components/examples/NativeTransfersFilter" + }, + { + "$ref": "#/components/examples/PaginationLimitTwo" + } + ], + "result": { + "$ref": "#/components/examples/TwoNativeTransferEvents" + } + }, + "AnyEventsExample": { + "name": "All Events", + "description": "Example request to the `getEvents` method, filtering for all events of all types for any and all contracts.", + "params": [ + { + "$ref": "#/components/examples/StartLedger" + }, + { + "$ref": "#/components/examples/PaginationLimitTwo" + } + ], + "result": { + "$ref": "#/components/examples/AnyTwoEvents" + } + }, + "SuccessfulTransaction": { + "name": "Successful Transaction", + "description": "Query for a transaction hash that returns `SUCCESS` from the RPC node.", + "params": [ + { + "$ref": "#/components/examples/RecentTransactionHash" + } + ], + "result": { + "$ref": "#/components/examples/SuccessTransactionResult" + } + }, + "NotFoundTransaction": { + "name": "Not Found Transaction", + "description": "Query for a transaction hash that returns `NOT_FOUND` from the RPC node.", + "params": [ + { + "$ref": "#/components/examples/TooOldTransactionHash" + } + ], + "result": { + "$ref": "#/components/examples/NotFoundTransactionResult" + } + }, + "FailedTransaction": { + "name": "Failed Transaction", + "description": "Query for a transaction hash that returns `FAILED` from the RPC node.", + "params": [ + { + "$ref": "#/components/examples/FailedTransactionHash" + } + ], + "result": { + "$ref": "#/components/examples/FailedTransactionResult" + } + }, + "CounterLedgerEntryExample": { + "name": "Retrieve a Contract's Counter Entry for an Address", + "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry.", + "params": [ + { + "$ref": "#/components/examples/LedgerKeyCounterAddress" + } + ], + "result": { + "$ref": "#/components/examples/LedgerEntryCounterAddressResult" + } + }, + "ContractBalanceLedgerEntryExample": { + "name": "Retrieve a Token's Balance Entry for Contract", + "description": "Example request to the `getNetwork` method for a SAC balance ledger entry belonging to a contract.", + "params": [ + { + "$ref": "#/components/examples/LedgerKeyContractBalance" + } + ], + "result": { + "$ref": "#/components/examples/LedgerEntryContractBalanceResult" + } + }, + "CombinedLedgerEntryExample": { + "name": "Retrieve Multiple Ledger Entries from Different Contracts.", + "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry and a SAC balance ledger entry.", + "params": [ + { + "$ref": "#/components/examples/CombinedLedgerKeys" + } + ], + "result": { + "$ref": "#/components/examples/CombinedLedgerEntryResult" + } + }, + "TestnetNetworkConfig": { + "name": "Testnet Network Configuration", + "description": "Example request to the `getNetwork` method for a node connected to the Stellar Testnet network.", + "params": [], + "result": { + "name": "getNetworkResult", + "value": { + "friendbotUrl": "https://friendbot-testnet.stellar.org/", + "passphrase": "Test SDF Network ; September 2015", + "protocolVersion": 20 + } + } + }, + "FuturenetNetworkConfig": { + "name": "Futurenet Network Configuration", + "description": "Example request to the `getNetwork` method for a node connected to the Stellar Futurenet network.", + "params": [], + "result": { + "name": "getNetworkResult", + "value": { + "friendbotUrl": "https://friendbot-futurenet.stellar.org/", + "passphrase": "Test SDF Future Network ; October 2022", + "protocolVersion": 20 + } + } + }, + "PendingTransaction": { + "name": "Pending Transaction", + "description": "Submitting a valid transaction using the `sendTransaction` method, resulting in a `PENDING` status.", + "params": [ + { + "$ref": "#/components/examples/ValidSentTransaction" + } + ], + "result": { + "$ref": "#/components/examples/PendingTransactionResult" + } + }, + "DuplicateTransaction": { + "name": "Duplicate Transaction", + "description": "Submitting a valid, yet duplicate transaction using the `sendTransaction` method, resulting in a `DUPLICATE` status.", + "params": [ + { + "$ref": "#/components/examples/ValidSentTransaction" + } + ], + "result": { + "$ref": "#/components/examples/DuplicateTransactionResult" + } + }, + "ErrorTransaction": { + "name": "Error Transaction", + "description": "Submitting an invalid transaction using the `sendTransaction` method, resulting in an `ERROR` status.", + "params": [ + { + "$ref": "#/components/examples/InvalidSentTransaction" + } + ], + "result": { + "$ref": "#/components/examples/ErrorTransactionResult" + } + }, + "TryAgainLaterTransaction": { + "name": "Try Again Later Transaction", + "description": "Submitting a valid transaction before an account's previously submitted transaction has settled using the `sendTransaction` method, resulting in a `TRY_AGAIN_LATER` status.", + "params": [ + { + "$ref": "#/components/examples/ValidSentTransaction" + } + ], + "result": { + "$ref": "#/components/examples/TryAgainLaterTransactionResult" + } + }, + "SuccessfulTransactionSimulation": { + "name": "Successful Transaction Simulation", + "description": "Transaction simulation that succeeds and returns the necessary information to prepare and submit the transaction.", + "params": [ + { + "$ref": "#/components/examples/ValidContractTransaction" + }, + { + "$ref": "#/components/examples/DefaultResourceConfig" + } + ], + "result": { + "$ref": "#/components/examples/SuccessfulSimulationResult" + } + }, + "FailedTransactionSimulation": { + "name": "Failed Transaction Simulation", + "description": "Transaction simulation that fails due to the contract invocation being constructed with an improper number of arguments.", + "params": [ + { + "$ref": "#/components/examples/InvalidContractTransaction" + }, + { + "$ref": "#/components/examples/DefaultResourceConfig" + } + ], + "result": { + "$ref": "#/components/examples/FailedSimulationResult" + } + } + } + } +} \ No newline at end of file diff --git a/openrpc/scripts/build.mjs b/openrpc/scripts/build.mjs new file mode 100644 index 00000000..daffdebc --- /dev/null +++ b/openrpc/scripts/build.mjs @@ -0,0 +1,143 @@ +import fs from "fs"; +import mergeAllOf from "json-schema-merge-allof"; +import { dereferenceDocument } from "@open-rpc/schema-utils-js"; +import defaultResolver from "@json-schema-tools/reference-resolver"; + +function sortByMethodName(methods) { + return methods.slice().sort((a, b) => { + if (a['name'] > b['name']) { + return 1; + } else if (a['name'] < b['name']) { + return -1; + } else { + return 0; + } + }) +} + +console.log("Loading files...\n"); + +let methods = []; +let methodsBase = "openrpc/src/methods/"; +let methodFiles = fs.readdirSync(methodsBase); +methodFiles.forEach(file => { + console.log(file); + let raw = fs.readFileSync(methodsBase + file); + let parsed = JSON.parse(raw); + methods = [ + ...methods, + parsed, + ]; +}); + +let contentDescriptors = {}; +let cdBase = "openrpc/src/contentDescriptors/"; +let cdFiles = fs.readdirSync(cdBase); +cdFiles.forEach(file => { + console.log(file); + let raw = fs.readFileSync(cdBase + file); + let parsed = JSON.parse(raw); + contentDescriptors = { + ...contentDescriptors, + ...parsed, + }; +}); + +let schemas = {}; +let schemasBase = "openrpc/src/schemas/" +let schemaFiles = fs.readdirSync(schemasBase); +schemaFiles.forEach(file => { + console.log(file); + let raw = fs.readFileSync(schemasBase + file); + let parsed = JSON.parse(raw); + schemas = { + ...schemas, + ...parsed, + }; +}); + +let examples = {} +let examplesBase = "openrpc/src/examples/" +let examplesFiles = fs.readdirSync(examplesBase) +examplesFiles.forEach(file => { + console.log(file) + let raw = fs.readFileSync(examplesBase + file) + let parsed = JSON.parse(raw) + examples = { + ...examples, + ...parsed, + } +}) + +let examplePairingObjects = {} +let epoBase = "openrpc/src/examplePairingObjects/" +let epoFiles = fs.readdirSync(epoBase) +epoFiles.forEach(file => { + console.log(file) + let raw = fs.readFileSync(epoBase + file) + let parsed = JSON.parse(raw) + examplePairingObjects = { + ...examplePairingObjects, + ...parsed, + } +}) + +const doc = { + openrpc: "1.2.4", + info: { + title: "Soroban RPC", + description: "Soroban-RPC allows you to communicate directly with Soroban via a JSON RPC interface.", + termsOfService: "https://stellar.org/terms-of-service", + contact: { + name: "Stellar Development Foundation", + url: "https://stellar.org/connect", + email: "hello@stellar.org" + }, + license: { + name: "Apache 2.0", + url: "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + version: "20.1.0" + }, + servers: [ + { + name: "Testnet", + url: "https://soroban-testnet.stellar.org:443", + summary: "Publicly available RPC server maintained by SDF, operating on the Testnet test network.", + description: "Testnet is meant to be a stable network that runs a production (or near-production) version of the Stellar network." + }, + { + name: "Futurenet", + url: "https://rpc-futurenet.stellar.org:443", + summary: "Publicly available RPC server maintained by SDF, operating on the Futurenet test network.", + description: "Futurenet is meant to be a bleeding-edge, experimental network that runs an early, test version of the Stellar network." + } + ], + methods: sortByMethodName(methods), + components: { + contentDescriptors: contentDescriptors, + schemas: schemas, + examples: examples, + examplePairingObjects: examplePairingObjects, + }, +} + +// fs.writeFileSync('openrpc/refs-openrpc.json', JSON.stringify(doc, null, 2)); + +let spec = await dereferenceDocument(doc, defaultResolver.default) + +spec.components = {}; + +// Merge instances of `allOf` in methods. +for (var i=0; i < spec.methods.length; i++) { + for (var j=0; j < spec.methods[i].params.length; j++) { + spec.methods[i].params[j].schema = mergeAllOf(spec.methods[i].params[j].schema); + } + spec.methods[i].result.schema = mergeAllOf(spec.methods[i].result.schema); +} + +let data = JSON.stringify(spec, null, 2); +fs.writeFileSync('static/openrpc.json', data); + +console.log(); +console.log("Build successful."); diff --git a/openrpc/scripts/validate.mjs b/openrpc/scripts/validate.mjs new file mode 100644 index 00000000..d17ec4d8 --- /dev/null +++ b/openrpc/scripts/validate.mjs @@ -0,0 +1,27 @@ +import fs from "fs"; +import { + parseOpenRPCDocument, + validateOpenRPCDocument +} from "@open-rpc/schema-utils-js"; + +let rawdata = fs.readFileSync("openrpc/openrpc.json"); +let openrpc = JSON.parse(rawdata); + +const error = validateOpenRPCDocument(openrpc); +if (error != true) { + console.log(error.name); + console.log(error.message); + process.exit(1); +} + +try { + await Promise.resolve(parseOpenRPCDocument(openrpc)); +} catch(e) { + console.log(e.name); + let end = e.message.indexOf("schema in question"); + let msg = e.message.substring(0, end); + console.log(msg); + process.exit(1); +} + +console.log("OpenRPC spec validated successfully."); diff --git a/openrpc/src/contentDescriptors/EventFilters.json b/openrpc/src/contentDescriptors/EventFilters.json new file mode 100644 index 00000000..cfd59f48 --- /dev/null +++ b/openrpc/src/contentDescriptors/EventFilters.json @@ -0,0 +1,10 @@ +{ + "EventFilters": { + "name": "filters", + "summary": "filters to narrow events search", + "description": "List of filters for the returned events. Events matching any of the filters are included. To match a filter, an event must match both a contractId and a topic. Maximum 5 filters are allowed per request.", + "schema": { + "$ref": "#/components/schemas/EventFilters" + } + } +} diff --git a/openrpc/src/contentDescriptors/LedgerKeys.json b/openrpc/src/contentDescriptors/LedgerKeys.json new file mode 100644 index 00000000..f93faf97 --- /dev/null +++ b/openrpc/src/contentDescriptors/LedgerKeys.json @@ -0,0 +1,11 @@ +{ + "LedgerKeys": { + "name": "keys", + "summary": "array of ledger keys", + "description": "Array containing the keys of the ledger entries you wish to retrieve. (an array of serialized base64 strings)", + "required": true, + "schema": { + "$ref": "#/components/schemas/LedgerKeys" + } + } +} diff --git a/openrpc/src/contentDescriptors/Pagination.json b/openrpc/src/contentDescriptors/Pagination.json new file mode 100644 index 00000000..963267d1 --- /dev/null +++ b/openrpc/src/contentDescriptors/Pagination.json @@ -0,0 +1,11 @@ +{ + "Pagination": { + "name": "pagination", + "summary": "pagination options", + "description": "Pagination in soroban-rpc is similar to pagination in Horizon. See [Pagination](https://soroban.stellar.org/api/pagination).", + "required": false, + "schema": { + "$ref": "#/components/schemas/Pagination" + } + } +} diff --git a/openrpc/src/contentDescriptors/ResourceConfig.json b/openrpc/src/contentDescriptors/ResourceConfig.json new file mode 100644 index 00000000..85ff07dc --- /dev/null +++ b/openrpc/src/contentDescriptors/ResourceConfig.json @@ -0,0 +1,11 @@ +{ + "ResourceConfig": { + "name": "resourceConfig", + "summary": "configuration for how resources will be calculated", + "description": "Contains configuration for how resources will be calculated when simulating transactions.", + "required": false, + "schema": { + "$ref": "#/components/schemas/ResourceConfig" + } + } +} diff --git a/openrpc/src/contentDescriptors/StartLedger.json b/openrpc/src/contentDescriptors/StartLedger.json new file mode 100644 index 00000000..9da7c4b8 --- /dev/null +++ b/openrpc/src/contentDescriptors/StartLedger.json @@ -0,0 +1,11 @@ +{ + "StartLedger": { + "name": "startLedger", + "summary": "ledger to begin searching from", + "description": "Ledger sequence number to fetch events after (inclusive). This method will return an error if `startLedger` is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, `startLedger` must be omitted.", + "required": true, + "schema": { + "$ref": "#/components/schemas/LedgerSequence" + } + } +} diff --git a/openrpc/src/contentDescriptors/Transaction.json b/openrpc/src/contentDescriptors/Transaction.json new file mode 100644 index 00000000..c42baaae --- /dev/null +++ b/openrpc/src/contentDescriptors/Transaction.json @@ -0,0 +1,20 @@ +{ + "SignedTransaction": { + "name": "transaction", + "summary": "transaction to be submitted to the network", + "description": "The signed transaction to broadcast for inclusion in a ledger.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Transaction" + } + }, + "UnsignedTransaction": { + "name": "transaction", + "summary": "transaction to be simulated", + "description": "In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type `invokeHostFunction`.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Transaction" + } + } +} diff --git a/openrpc/src/contentDescriptors/TransactionHash.json b/openrpc/src/contentDescriptors/TransactionHash.json new file mode 100644 index 00000000..90cc538c --- /dev/null +++ b/openrpc/src/contentDescriptors/TransactionHash.json @@ -0,0 +1,11 @@ +{ + "TransactionHash": { + "name": "hash", + "summary": "transaction hash to query", + "description": "Transaction hash to query as a hex-encoded string. This transaction hash should correspond to transaction that has been previously submitted to the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TransactionHash" + } + } +} diff --git a/openrpc/src/examplePairingObjects/EventsPairs.json b/openrpc/src/examplePairingObjects/EventsPairs.json new file mode 100644 index 00000000..56b0dac9 --- /dev/null +++ b/openrpc/src/examplePairingObjects/EventsPairs.json @@ -0,0 +1,25 @@ +{ + "NativeTransferEventsExample": { + "name": "Native XLM Transfer Events", + "description": "Example request to the `getEvents` method, filtering for `transfer` events for native Lumens, and limiting the number of returned events to 2.", + "params": [ + { "$ref": "#/components/examples/StartLedger" }, + { "$ref": "#/components/examples/NativeTransfersFilter" }, + { "$ref": "#/components/examples/PaginationLimitTwo" } + ], + "result": { + "$ref": "#/components/examples/TwoNativeTransferEvents" + } + }, + "AnyEventsExample": { + "name": "All Events", + "description": "Example request to the `getEvents` method, filtering for all events of all types for any and all contracts.", + "params": [ + { "$ref": "#/components/examples/StartLedger" }, + { "$ref": "#/components/examples/PaginationLimitTwo" } + ], + "result": { + "$ref": "#/components/examples/AnyTwoEvents" + } + } +} diff --git a/openrpc/src/examplePairingObjects/GetTransactionPairs.json b/openrpc/src/examplePairingObjects/GetTransactionPairs.json new file mode 100644 index 00000000..8e35a604 --- /dev/null +++ b/openrpc/src/examplePairingObjects/GetTransactionPairs.json @@ -0,0 +1,32 @@ +{ + "SuccessfulTransaction": { + "name": "Successful Transaction", + "description": "Query for a transaction hash that returns `SUCCESS` from the RPC node.", + "params": [ + { "$ref": "#/components/examples/RecentTransactionHash" } + ], + "result": { + "$ref": "#/components/examples/SuccessTransactionResult" + } + }, + "NotFoundTransaction": { + "name": "Not Found Transaction", + "description": "Query for a transaction hash that returns `NOT_FOUND` from the RPC node.", + "params": [ + { "$ref": "#/components/examples/TooOldTransactionHash" } + ], + "result": { + "$ref": "#/components/examples/NotFoundTransactionResult" + } + }, + "FailedTransaction": { + "name": "Failed Transaction", + "description": "Query for a transaction hash that returns `FAILED` from the RPC node.", + "params": [ + { "$ref": "#/components/examples/FailedTransactionHash" } + ], + "result": { + "$ref": "#/components/examples/FailedTransactionResult" + } + } +} diff --git a/openrpc/src/examplePairingObjects/LedgerEntriesPairs.json b/openrpc/src/examplePairingObjects/LedgerEntriesPairs.json new file mode 100644 index 00000000..f66d45e8 --- /dev/null +++ b/openrpc/src/examplePairingObjects/LedgerEntriesPairs.json @@ -0,0 +1,32 @@ +{ + "CounterLedgerEntryExample": { + "name": "Retrieve a Contract's Counter Entry for an Address", + "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry.", + "params": [ + { "$ref": "#/components/examples/LedgerKeyCounterAddress" } + ], + "result": { + "$ref": "#/components/examples/LedgerEntryCounterAddressResult" + } + }, + "ContractBalanceLedgerEntryExample": { + "name": "Retrieve a Token's Balance Entry for Contract", + "description": "Example request to the `getNetwork` method for a SAC balance ledger entry belonging to a contract.", + "params": [ + { "$ref": "#/components/examples/LedgerKeyContractBalance" } + ], + "result": { + "$ref": "#/components/examples/LedgerEntryContractBalanceResult" + } + }, + "CombinedLedgerEntryExample": { + "name": "Retrieve Multiple Ledger Entries from Different Contracts.", + "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry and a SAC balance ledger entry.", + "params": [ + { "$ref": "#/components/examples/CombinedLedgerKeys" } + ], + "result": { + "$ref": "#/components/examples/CombinedLedgerEntryResult" + } + } +} diff --git a/openrpc/src/examplePairingObjects/NetworkPairs.json b/openrpc/src/examplePairingObjects/NetworkPairs.json new file mode 100644 index 00000000..4f452ff2 --- /dev/null +++ b/openrpc/src/examplePairingObjects/NetworkPairs.json @@ -0,0 +1,28 @@ +{ + "TestnetNetworkConfig": { + "name": "Testnet Network Configuration", + "description": "Example request to the `getNetwork` method for a node connected to the Stellar Testnet network.", + "params": [], + "result": { + "name": "getNetworkResult", + "value": { + "friendbotUrl": "https://friendbot-testnet.stellar.org/", + "passphrase": "Test SDF Network ; September 2015", + "protocolVersion": 20 + } + } + }, + "FuturenetNetworkConfig": { + "name": "Futurenet Network Configuration", + "description": "Example request to the `getNetwork` method for a node connected to the Stellar Futurenet network.", + "params": [], + "result": { + "name": "getNetworkResult", + "value": { + "friendbotUrl": "https://friendbot-futurenet.stellar.org/", + "passphrase": "Test SDF Future Network ; October 2022", + "protocolVersion": 20 + } + } + } +} diff --git a/openrpc/src/examplePairingObjects/SendTransactionPairs.json b/openrpc/src/examplePairingObjects/SendTransactionPairs.json new file mode 100644 index 00000000..5c22066b --- /dev/null +++ b/openrpc/src/examplePairingObjects/SendTransactionPairs.json @@ -0,0 +1,42 @@ +{ + "PendingTransaction": { + "name": "Pending Transaction", + "description": "Submitting a valid transaction using the `sendTransaction` method, resulting in a `PENDING` status.", + "params": [ + { "$ref": "#/components/examples/ValidSentTransaction" } + ], + "result": { + "$ref": "#/components/examples/PendingTransactionResult" + } + }, + "DuplicateTransaction": { + "name": "Duplicate Transaction", + "description": "Submitting a valid, yet duplicate transaction using the `sendTransaction` method, resulting in a `DUPLICATE` status.", + "params": [ + { "$ref": "#/components/examples/ValidSentTransaction" } + ], + "result": { + "$ref": "#/components/examples/DuplicateTransactionResult" + } + }, + "ErrorTransaction": { + "name": "Error Transaction", + "description": "Submitting an invalid transaction using the `sendTransaction` method, resulting in an `ERROR` status.", + "params": [ + { "$ref": "#/components/examples/InvalidSentTransaction" } + ], + "result": { + "$ref": "#/components/examples/ErrorTransactionResult" + } + }, + "TryAgainLaterTransaction": { + "name": "Try Again Later Transaction", + "description": "Submitting a valid transaction before an account's previously submitted transaction has settled using the `sendTransaction` method, resulting in a `TRY_AGAIN_LATER` status.", + "params": [ + { "$ref": "#/components/examples/ValidSentTransaction" } + ], + "result": { + "$ref": "#/components/examples/TryAgainLaterTransactionResult" + } + } +} diff --git a/openrpc/src/examplePairingObjects/SimulationPairs.json b/openrpc/src/examplePairingObjects/SimulationPairs.json new file mode 100644 index 00000000..3df5d03e --- /dev/null +++ b/openrpc/src/examplePairingObjects/SimulationPairs.json @@ -0,0 +1,24 @@ +{ + "SuccessfulTransactionSimulation": { + "name": "Successful Transaction Simulation", + "description": "Transaction simulation that succeeds and returns the necessary information to prepare and submit the transaction.", + "params": [ + { "$ref": "#/components/examples/ValidContractTransaction" }, + { "$ref": "#/components/examples/DefaultResourceConfig" } + ], + "result": { + "$ref": "#/components/examples/SuccessfulSimulationResult" + } + }, + "FailedTransactionSimulation": { + "name": "Failed Transaction Simulation", + "description": "Transaction simulation that fails due to the contract invocation being constructed with an improper number of arguments.", + "params": [ + { "$ref": "#/components/examples/InvalidContractTransaction" }, + { "$ref": "#/components/examples/DefaultResourceConfig" } + ], + "result": { + "$ref": "#/components/examples/FailedSimulationResult" + } + } +} diff --git a/openrpc/src/examples/Events.json b/openrpc/src/examples/Events.json new file mode 100644 index 00000000..1422f07d --- /dev/null +++ b/openrpc/src/examples/Events.json @@ -0,0 +1,113 @@ +{ + "StartLedger": { + "name": "startLedger", + "value": 2530000 + }, + "NativeTransfersFilter": { + "name": "filters", + "value": [ + { + "type": "contract", + "contractIds": [ "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC" ], + "topics": [ + [ "AAAADwAAAAh0cmFuc2Zlcg==", "*", "*", "*" ] + ] + } + ] + }, + "EmptyFilters": { + "name": "filters", + "value": [] + }, + "PaginationLimitTwo": { + "name": "pagination", + "value": { + "limit": 2 + } + }, + "TwoNativeTransferEvents": { + "name": "getEventsResult", + "value": { + "events": [ + { + "type": "contract", + "ledger": 2531021, + "ledgerClosedAt": "2023-11-15T08:58:25Z", + "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", + "id": "0010870652420501504-0000000004", + "pagingToken": "0010870652420501504-0000000004", + "topic": [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "AAAAEgAAAAAAAAAAjt5DlR5mhneFx/1Lct0ToW555OFzg/Y28++28cJXU+I=", + "AAAAEgAAAAAAAAAA33Fu/fnobL8/u8tyLCIZzpMXbsRWRBlfAuEv7fBvTwM=", + "AAAADgAAAAZuYXRpdmUAAA==" + ], + "value": { + "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" + }, + "inSuccessfulContractCall": true + }, + { + "type": "contract", + "ledger": 2531273, + "ledgerClosedAt": "2023-11-15T09:20:38Z", + "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", + "id": "0010871734752280576-0000000004", + "pagingToken": "0010871734752280576-0000000004", + "topic": [ + "AAAADwAAAAh0cmFuc2Zlcg==", + "AAAAEgAAAAAAAAAA+YQ+FM83vUUwQ6P3gKCMVTyC3/jO+DERXTWJDKEjagU=", + "AAAAEgAAAAAAAAAAwl0UMLLKYqMEedoowz8VnwbRywjcKEeQegoMmU6C9/0=", + "AAAADgAAAAZuYXRpdmUAAA==" + ], + "value": { + "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" + }, + "inSuccessfulContractCall": true + } + ], + "latestLedger": 2539388 + } + }, + "AnyTwoEvents": { + "name": "getEventsResult", + "value": { + "events": [ + { + "type": "diagnostic", + "ledger": 2530001, + "ledgerClosedAt": "2023-11-15T07:29:05Z", + "contractId": "", + "id": "0010866271553875968-0000000000", + "pagingToken": "0010866271553875968-0000000000", + "topic": [ + "AAAADwAAAAdmbl9jYWxsAA==", + "AAAADQAAACCGE7Aj5EvXxmmTtyojmlFF/Qv3qMTyL7THd6SG4GHZxQ==", + "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" + ], + "value": { + "xdr": "AAAAEAAAAAEAAAACAAAADwAAAAN1c2QAAAAACQAAAAAAAAAAAAAAAAASHQg=" + }, + "inSuccessfulContractCall": true + }, + { + "type": "diagnostic", + "ledger": 2530001, + "ledgerClosedAt": "2023-11-15T07:29:05Z", + "contractId": "CCDBHMBD4RF5PRTJSO3SUI42KFC72C7XVDCPEL5UY532JBXAMHM4KOQ3", + "id": "0010866271553875968-0000000001", + "pagingToken": "0010866271553875968-0000000001", + "topic": [ + "AAAADwAAAAlmbl9yZXR1cm4AAAA=", + "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" + ], + "value": { + "xdr": "AAAAAQ==" + }, + "inSuccessfulContractCall": true + } + ], + "latestLedger": 2539529 + } + } +} diff --git a/openrpc/src/examples/LedgerEntries.json b/openrpc/src/examples/LedgerEntries.json new file mode 100644 index 00000000..c92d0f4e --- /dev/null +++ b/openrpc/src/examples/LedgerEntries.json @@ -0,0 +1,71 @@ +{ + "LedgerKeyCounterAddress": { + "name": "keys", + "summary": "ledger key for an address' counter entry", + "description": "A ledger key that will request a ledger entry defined using a tuple variant enum in a contract: `Counter(Address)`", + "value": [ + "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=" + ] + }, + "LedgerEntryCounterAddressResult": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC", + "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", + "lastModifiedLedgerSeq": 2552504 + } + ], + "latestLedger": 2552990 + } + }, + "LedgerKeyContractBalance": { + "name": "keys", + "summary": "ledger key for a contract's native XLM balance", + "description": "A ledger key that will request a ledger entry corresponding to a contract's balance on the native XLM Stellar Asset Contract.", + "value": [ + "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" + ] + }, + "LedgerEntryContractBalanceResult": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", + "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", + "lastModifiedLedgerSeq": 2553612 + } + ], + "latestLedger": 2553713 + } + }, + "CombinedLedgerKeys": { + "name": "keys", + "summary": "ledger keys for multiple ledger entries", + "description": "Two ledger keys: One for a counter entry, and one for a contract's native XLM balance.", + "value": [ + "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", + "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" + ] + }, + "CombinedLedgerEntryResult": { + "name": "getLedgerEntriesResult", + "value": { + "entries": [ + { + "key": "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", + "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", + "lastModifiedLedgerSeq": 2553612 + }, + { + "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", + "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", + "lastModifiedLedgerSeq": 2552504 + } + ], + "latestLedger": 2553767 + } + } +} diff --git a/openrpc/src/examples/Simulations.json b/openrpc/src/examples/Simulations.json new file mode 100644 index 00000000..522574cc --- /dev/null +++ b/openrpc/src/examples/Simulations.json @@ -0,0 +1,59 @@ +{ + "ValidContractTransaction": { + "name": "transaction", + "summary": "a valid transaction", + "description": "A transaction that will correctly invoke a contract function.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAMAAAAAAAAAAAAAAAA=" + }, + "SuccessfulSimulationResult": { + "name": "simulateTransactionResult", + "value": { + "transactionData": "AAAAAAAAAAIAAAAGAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAFAAAAAEAAAAHy8vNUZ8vyZ2ybPHW0XbSrRtP7gEWsJ6zDzcfY9P8z88AAAABAAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAEAHfKyAAAFiAAAAIgAAAAAAAAAAw==", + "minResourceFee": "90353", + "events": [ + "AAAAAQAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAABAAAAABAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAM=", + "AAAAAQAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAACWZuX3JldHVybgAAAAAAAA8AAAAJaW5jcmVtZW50AAAAAAAAAwAAAAw=" + ], + "results": [ + { + "auth": [], + "xdr": "AAAAAwAAAAw=" + } + ], + "cost": { + "cpuInsns": "1635562", + "memBytes": "1295756" + }, + "latestLedger": 2552139 + } + }, + "InvalidContractTransaction": { + "name": "transaction", + "summary": "an invalid transaction", + "description": "A transaction that attempts to invoke a contract function with the wrong number of arguments.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAA" + }, + "FailedSimulationResult": { + "name": "simulateTransactionResult", + "value": { + "error": "host invocation failed\n\nCaused by:\n HostError: Error(WasmVm, InternalError)\n \n Event log (newest first):\n 0: [Diagnostic Event] contract:cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b, topics:[error, Error(WasmVm, InternalError)], data:[\"VM call failed: Func(MismatchingParameterLen)\", increment]\n 1: [Diagnostic Event] topics:[fn_call, Bytes(cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b), increment], data:3\n \n Backtrace (newest first):\n 0: soroban_env_host::vm::Vm::invoke_function_raw\n 1: soroban_env_host::host::frame::::with_frame\n 2: soroban_env_host::host::frame::::call_n_internal\n 3: soroban_env_host::host::frame::::invoke_function\n 4: preflight::preflight::preflight_invoke_hf_op\n 5: preflight::preflight_invoke_hf_op::{{closure}}\n 6: core::ops::function::FnOnce::call_once{{vtable.shim}}\n 7: preflight::catch_preflight_panic\n 8: _cgo_0b49d6ed4a0b_Cfunc_preflight_invoke_hf_op\n at tmp/go-build/cgo-gcc-prolog:103:11\n 9: runtime.asmcgocall\n at ./runtime/asm_amd64.s:848\n \n ", + "events": [ + "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAAAMAAAAD", + "AAAAAAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAEAAAAHAAAAEAAAAAEAAAACAAAADgAAAC1WTSBjYWxsIGZhaWxlZDogRnVuYyhNaXNtYXRjaGluZ1BhcmFtZXRlckxlbikAAAAAAAAPAAAACWluY3JlbWVudAAAAA==" + ], + "cost": { + "cpuInsns": "0", + "memBytes": "0" + }, + "latestLedger": 2552013 + } + }, + "DefaultResourceConfig": { + "name": "resourceConfig", + "summary": "the default resource configuration", + "description": "The default value for the (optional) resource configuration object for transaction simulation.", + "value": { + "instructionLeeway": 3000000 + } + } +} diff --git a/openrpc/src/examples/Transactions.json b/openrpc/src/examples/Transactions.json new file mode 100644 index 00000000..6e3721bd --- /dev/null +++ b/openrpc/src/examples/Transactions.json @@ -0,0 +1,111 @@ +{ + "RecentTransactionHash": { + "name": "hash", + "summary": "a recent transaction hash", + "description": "Transaction hash that hit the network recently enough to still be visible through the RPC node.", + "value": "6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da" + }, + "TooOldTransactionHash": { + "name": "hash", + "summary": "an old transaction hash", + "description": "Transaction has that is old enough for the RPC node to have forgotten about it.", + "value": "85f7aa8bfda425b98c0e53ffe56796ffd8865ec2fcc3ad71abf120801e2a14e5" + }, + "FailedTransactionHash": { + "name": "hash", + "summary": "a failed transaction hash", + "description": "Transaction hash that failed to be accepted into a ledger.", + "value": "2e4c699cbcb8ee83fffb857c9579bcc91f73f0df2a0444292f66e37563785929" + }, + "SuccessTransactionResult": { + "name": "getTransactionResult", + "value": { + "status": "SUCCESS", + "latestLedger": 2540076, + "latestLedgerCloseTime": "1700086333", + "oldestLedger": 2538637, + "oldestLedgerCloseTime": "1700078796", + "applicationOrder": 1, + "envelopeXdr": "AAAAAgAAAADGFY14/R1KD0VGtTbi5Yp4d7LuMW0iQbLM/AUiGKj5owCpsoQAJY3OAAAjqgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAARc2V0X2N1cnJlbmN5X3JhdGUAAAAAAAACAAAADwAAAANldXIAAAAACQAAAAAAAAAAAAAAAAARCz4AAAABAAAAAAAAAAAAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAARc2V0X2N1cnJlbmN5X3JhdGUAAAAAAAACAAAADwAAAANldXIAAAAACQAAAAAAAAAAAAAAAAARCz4AAAAAAAAAAQAAAAAAAAABAAAAB4408vVXuLU3mry897TfPpYjjsSN7n42REos241RddYdAAAAAQAAAAYAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAAUAAAAAQFvcYAAAImAAAAHxAAAAAAAAAACAAAAARio+aMAAABATbFMyom/TUz87wHex0LoYZA8jbNJkXbaDSgmOdk+wSBFJuMuta+/vSlro0e0vK2+1FqD/zWHZeYig4pKmM3rDA==", + "resultXdr": "AAAAAAARFy8AAAAAAAAAAQAAAAAAAAAYAAAAAMu8SHUN67hTUJOz3q+IrH9M/4dCVXaljeK6x1Ss20YWAAAAAA==", + "resultMetaXdr": "AAAAAwAAAAAAAAACAAAAAwAmwiAAAAAAAAAAAMYVjXj9HUoPRUa1NuLlinh3su4xbSJBssz8BSIYqPmjAAAAFUHZob0AJY3OAAAjqQAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAACbCHwAAAABlVUH3AAAAAAAAAAEAJsIgAAAAA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hfcndfa2V5X2J5dGUAAAAABQAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAACAAAADwAAAAxjb3JlX21ldHJpY3MAAAAPAAAAEG1heF9yd19kYXRhX2J5dGUAAAAFAAAAAAAAB+gAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAQbWF4X3J3X2NvZGVfYnl0ZQAAAAUAAAAAAACBgAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABNtYXhfZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAA==", + "ledger": 2540064, + "createdAt": "1700086268" + } + }, + "NotFoundTransactionResult": { + "name": "getTransactionResult", + "value": { + "status": "NOT_FOUND", + "latestLedger": 2540099, + "latestLedgerCloseTime": "1700086455", + "oldestLedger": 2538660, + "oldestLedgerCloseTime": "1700078913" + } + }, + "FailedTransactionResult": { + "name": "getTransactionResult", + "value": { + "status": "FAILED", + "latestLedger": 2540124, + "latestLedgerCloseTime": "1700086588", + "oldestLedger": 2538685, + "oldestLedgerCloseTime": "1700079044", + "applicationOrder": 2, + "envelopeXdr": "AAAAAgAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAAG4AFyJfAABKvgAAAAIAAAAAAAAAAQAmwlEAJsK1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAE/fr1kk7lqP0srDPW4JExF1MWmpsG49FsRE3b0vMCmzAAAAAUVVUlMAAAAArPm4/+q9j4dl178h2JjrqjgRXnQ1WiGkyVy+nv3nGkEAAAAAAVjZQAAAAAAAAAABy786aQAAAEDybJBtG7V5NrRFpoboRUN/5ecys5wSUgag3CnTtWLmq3JDOxrEjK9noAnu/F5O0E8iXuVzX9BxZSO9JZ+Tw6kK", + "resultXdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+gAAAAA=", + "resultMetaXdr": "AAAAAwAAAAAAAAACAAAAAwAmwlIAAAAAAAAAAFm/J+WxnkW6a1J1L63T9idZYwvdhZ3NfUEaT9DLvzppAAAAF0g7NXsAFyJfAABKvQAAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAACbCSwAAAABlVULiAAAAAAAAAAEAJsJSAAAAAAAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAABdIOzV7ABciXwAASr4AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAmwlIAAAAAZVVDBwAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "ledger": 2540114, + "createdAt": "1700086535" + } + }, + "ValidSentTransaction": { + "name": "transaction", + "summary": "a valid transaction sent to the network", + "description": "A valid Stellar transaction that was sent to the network successfully.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" + }, + "InvalidSentTransaction": { + "name": "transaction", + "summary": "an invalid transaction sent to the network", + "description": "An invalid Stellar transaction that was sent to the network, built with an incorrect sequence number.", + "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQMQkfl8sdCYQIOdJB0TyazJ126y2TFRjL8yNHSb4TTsH5Ym6qM6gkTx1ENRZ0PFprVGusMTHISzdPHYJ4njBZAQ=" + }, + "PendingTransactionResult": { + "name": "sendTransactionResult", + "value": { + "status": "PENDING", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + }, + "DuplicateTransactionResult": { + "name": "sendTransactionResult", + "value": { + "status": "DUPLICATE", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + }, + "ErrorTransactionResult": { + "name": "sendTransactionResult", + "value": { + "errorResultXdr": "AAAAAAAAAGT////7AAAAAA==", + "status": "ERROR", + "hash": "84a5f62bff422581dda019811daed0868a3db41833ad6e90a12f0d7db1be8167", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + }, + "TryAgainLaterTransactionResult": { + "name": "sendTransactionResult", + "value": { + "status": "TRY_AGAIN_LATER", + "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", + "latestLedger": 2553978, + "latestLedgerCloseTime": "1700159337" + } + } +} diff --git a/openrpc/src/methods/getEvents.json b/openrpc/src/methods/getEvents.json new file mode 100644 index 00000000..558b1d84 --- /dev/null +++ b/openrpc/src/methods/getEvents.json @@ -0,0 +1,42 @@ +{ + "name": "getEvents", + "summary": "returns contract events", + "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getEvents" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/StartLedger" + }, + { + "$ref": "#/components/contentDescriptors/EventFilters" + }, + { + "$ref": "#/components/contentDescriptors/Pagination" + } + ], + "result": { + "name": "getEventsResult", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Event" + } + } + } + } + }, + "examples": [ + { "$ref": "#/components/examplePairingObjects/NativeTransferEventsExample" }, + { "$ref": "#/components/examplePairingObjects/AnyEventsExample" } + ] +} + diff --git a/openrpc/src/methods/getHealth.json b/openrpc/src/methods/getHealth.json new file mode 100644 index 00000000..a83c063b --- /dev/null +++ b/openrpc/src/methods/getHealth.json @@ -0,0 +1,35 @@ +{ + "name": "getHealth", + "summary": "returns node health", + "description": "General node health check.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getHealth" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getHealthResult", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "\"healthy\"" + } + } + } + }, + "examples": [ + { + "name": "Current node health", + "description": "Example request to the `getHealth` method", + "params": [], + "result": { + "name": "getHealthResult", + "value": { + "status": "healthy" + } + } + } + ] +} diff --git a/openrpc/src/methods/getLatestLedger.json b/openrpc/src/methods/getLatestLedger.json new file mode 100644 index 00000000..6c19e5f9 --- /dev/null +++ b/openrpc/src/methods/getLatestLedger.json @@ -0,0 +1,42 @@ +{ + "name": "getLatestLedger", + "summary": "returns latest known ledger", + "description": "For finding out the current latest known ledger of this node. This is a subset of the ledger info from Horizon.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getLatestLedger" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getLatestLedgerResult", + "schema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/LedgerHash" + }, + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "sequence": { + "$ref": "#/components/schemas/LatestLedger" + } + } + } + }, + "examples": [ + { + "name": "Details of the Current Ledger", + "description": "Example request to the `getLatestLedger` method.", + "params": [], + "result": { + "name": "getLatestLedgerResult", + "value": { + "id": "c73c5eac58a441d4eb733c35253ae85f783e018f7be5ef974258fed067aabb36", + "protocolVersion": 20, + "sequence": 2539605 + } + } + } + ] +} diff --git a/openrpc/src/methods/getLedgerEntries.json b/openrpc/src/methods/getLedgerEntries.json new file mode 100644 index 00000000..e4741c1b --- /dev/null +++ b/openrpc/src/methods/getLedgerEntries.json @@ -0,0 +1,38 @@ +{ + "name": "getLedgerEntries", + "summary": "returns ledger entries", + "description": "For reading the current value of ledger entries directly.\n\nAllows you to directly inspect the current state of a contract, a contract's code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or `simulateTransaction`.\n\nTo fetch contract wasm byte-code, use the ContractCode ledger entry key.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getLedgerEntries" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/LedgerKeys" + } + ], + "result": { + "name": "getLedgerEntriesResult", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "entries": { + "type": "array", + "description": "Array of objects containing all found ledger entries", + "items": { + "$ref": "#/components/schemas/LedgerEntry" + } + } + }, + "required": [ "latestLedger" ] + } + }, + "examples": [ + { "$ref": "#/components/examplePairingObjects/CounterLedgerEntryExample" }, + { "$ref": "#/components/examplePairingObjects/ContractBalanceLedgerEntryExample" }, + { "$ref": "#/components/examplePairingObjects/CombinedLedgerEntryExample" } + ] +} diff --git a/openrpc/src/methods/getNetwork.json b/openrpc/src/methods/getNetwork.json new file mode 100644 index 00000000..e8e58d2a --- /dev/null +++ b/openrpc/src/methods/getNetwork.json @@ -0,0 +1,33 @@ +{ + "name": "getNetwork", + "summary": "returns network config", + "description": "General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getNetwork" + }, + "paramStructure": "by-name", + "params": [], + "result": { + "name": "getNetworkResult", + "schema": { + "type": "object", + "properties": { + "passphrase": { + "$ref": "#/components/schemas/NetworkPassphrase" + }, + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "friendbotUrl": { + "type": "string", + "description": "(optional) The URL of this network's \"friendbot\" faucet" + } + }, + "required": [ "passphrase", "protocolVersion" ] + } + }, + "examples": [ + { "$ref": "#/components/examplePairingObjects/TestnetNetworkConfig" }, + { "$ref": "#/components/examplePairingObjects/FuturenetNetworkConfig" } + ] +} diff --git a/openrpc/src/methods/getTransaction.json b/openrpc/src/methods/getTransaction.json new file mode 100644 index 00000000..db5150fa --- /dev/null +++ b/openrpc/src/methods/getTransaction.json @@ -0,0 +1,79 @@ +{ + "name": "getTransaction", + "summary": "returns transaction details", + "description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The soroban-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 1440 ledgers, approximately equivalent to a 2-hour timeframe. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting. For comprehensive debugging needs that extend beyond the 2-hour timeframe, it is advisable to retrieve transaction information from Horizon, as it provides a lasting and persistent record.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/getTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/TransactionHash" + } + ], + "result": { + "name": "getTransactionResult", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "The current status of the transaction by hash", + "enum": [ + "SUCCESS", + "NOT_FOUND", + "FAILED" + ] + }, + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "latestLedgerCloseTime": { + "$ref": "#/components/schemas/LatestLedgerCloseTime" + }, + "oldestLedger": { + "$ref": "#/components/schemas/OldestLedger" + }, + "oldestLedgerCloseTime": { + "$ref": "#/components/schemas/OldestLedgerCloseTime" + }, + "ledger": { + "title": "ledger", + "description": "(optional) The sequence number of the ledger which included the transaction. This field is only present if `status` is `SUCCESS` or `FAILED`.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "createdAt": { + "title": "createdAt", + "description": "(optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`.", + "$ref": "#/components/schemas/LedgerCloseTime" + }, + "applicationOrder": { + "type": "number", + "description": "(optional) The index of the transaction among all transactions included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "feeBump": { + "type": "boolean", + "description": "(optional) Indicates whether the transaction was fee bumped. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "envelopeXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction." + }, + "resultXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if `status` is `SUCCESS` or `FAILED`." + }, + "resultMetaXdr": { + "type": "string", + "description": "(optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction." + } + }, + "required": [ "status", "latestLedger", "latestLedgerCloseTime", "oldestLedger", "oldestLedgerCloseTime" ] + } + }, + "examples": [ + { "$ref": "#/components/examplePairingObjects/SuccessfulTransaction" }, + { "$ref": "#/components/examplePairingObjects/NotFoundTransaction" }, + { "$ref": "#/components/examplePairingObjects/FailedTransaction" } + ] +} diff --git a/openrpc/src/methods/sendTransaction.json b/openrpc/src/methods/sendTransaction.json new file mode 100644 index 00000000..6b6dfdc0 --- /dev/null +++ b/openrpc/src/methods/sendTransaction.json @@ -0,0 +1,55 @@ +{ + "name": "sendTransaction", + "summary": "submits a transaction", + "description": "Submit a real transaction to the Stellar network. This is the only way to make changes on-chain.\n\n Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call `getTransaction` to learn about transaction success/failure.\n\nThis supports all transactions, not only smart contract-related transactions.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/sendTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/SignedTransaction" + } + ], + "result": { + "name": "sendTransactionResult", + "summary": "Transaction status and network state.", + "description": "Transaction status and network state. The result will include if the transaction was successfully enqueued, and information about the current ledger.", + "schema": { + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/TransactionHash" + }, + "status": { + "type": "string", + "description": "The current status of the transaction by hash.", + "enum": [ + "PENDING", + "DUPLICATE", + "TRY_AGAIN_LATER", + "ERROR" + ] + }, + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "latestLedgerCloseTime": { + "$ref": "#/components/schemas/LatestLedgerCloseTime" + }, + "errorResultXdr": { + "type": "string", + "description": "(optional) If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.", + "contentEncoding": "base64" + } + }, + "required": [ "hash", "status", "latestLedger", "latestLedgerCloseTime" ] + } + }, + "examples": [ + { "$ref": "#/components/examplePairingObjects/PendingTransaction" }, + { "$ref": "#/components/examplePairingObjects/DuplicateTransaction" }, + { "$ref": "#/components/examplePairingObjects/ErrorTransaction" }, + { "$ref": "#/components/examplePairingObjects/TryAgainLaterTransaction" } + ] +} diff --git a/openrpc/src/methods/simulateTransaction.json b/openrpc/src/methods/simulateTransaction.json new file mode 100644 index 00000000..0265feb8 --- /dev/null +++ b/openrpc/src/methods/simulateTransaction.json @@ -0,0 +1,105 @@ +{ + "name": "simulateTransaction", + "summary": "submits a trial contract invocation transaction", + "description": "Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the network.", + "externalDocs": { + "url": "https://soroban.stellar.org/api/methods/simulateTransaction" + }, + "paramStructure": "by-name", + "params": [ + { + "$ref": "#/components/contentDescriptors/UnsignedTransaction" + }, + { + "$ref": "#/components/contentDescriptors/ResourceConfig" + } + ], + "result": { + "name": "simulateTransactionResult", + "summary": "anticipated affects of the transaction.", + "description": "The response will include the anticipated affects the given transaction will have on the network. Additionally, information needed to build, sign, and actually submit the transaction will be provided.", + "schema": { + "type": "object", + "properties": { + "latestLedger": { + "$ref": "#/components/schemas/LatestLedger" + }, + "minResourceFee": { + "type": "string", + "description": "(optional) Stringified number - Recommended minimum resource fee to add when submitting the transaction. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar). Not present in case of error." + }, + "cost": { + "type": "object", + "description": "(optional) - Information about instructions used, etc. Not present in case of error.", + "properties": { + "cpuInsns": { + "type": "string", + "description": "Stringified number - Total cpu instructions consumed by this transaction" + }, + "memBytes": { + "type": "string", + "description": "Stringified number - Total memory bytes allocated by this transaction" + } + }, + "required": [ "cpuInsns", "memBytes" ] + }, + "results": { + "type": "array", + "description": "(optional) - This array will only have one element: the result for the Host Function invocation. Only present on successful simulation (i.e. no error) of `InvokeHostFunction` operations.", + "items": { + "type": "object", + "properties": { + "xdr": { + "type": "string", + "description": "Serialized base64 string - return value of the Host Function call." + }, + "auth": { + "type": "array", + "description": "Array of serialized base64 strings - Per-address authorizations recorded when simulating this Host Function call.", + "items": { + "type": "string" + } + } + }, + "required": [ "xdr", "auth" ] + } + }, + "transactionData": { + "type": "string", + "description": "(optional) Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the simulated transaction. This data contains the refundable fee and resource usage information such as the ledger footprint and IO access data (serialized in a base64 string). Not present in case of error." + }, + "events": { + "type": "array", + "description": "(optional) Array of serialized base64 strings - Array of the events emitted during the contract invocation. The events are ordered by their emission time. (an array of serialized base64 strings). Only present when simulating of `InvokeHostFunction` operations, note that it can be present on error, providing extra context about what failed.", + "items": { + "type": "string" + } + }, + "restorePreamble": { + "type": "object", + "description": "(optional) - It can only be present on successful simulation (i.e. no error) of `InvokeHostFunction` operations. If present, it indicates that the simulation detected archived ledger entries which need to be restored before the submission of the `InvokeHostFunction` operation. The `minResourceFee` and `transactionData` fields should be used to submit a transaction containing a `RestoreFootprint` operation.", + "properties": { + "minResourceFee": { + "type": "string", + "description": "Stringified number - Recommended minimum resource fee to add when submitting the `RestoreFootprint` operation. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar)." + }, + "transactionData": { + "type": "string", + "description": "Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the `RestoreFootprint` operation." + } + }, + "required": [ "minResourceFee", "transactionData" ] + }, + "error": { + "type": "string", + "description": "(optional) - This field will include details about why the invoke host function call failed. Only present if the transaction simulation failed." + } + }, + "required": [ "latestLedger" ] + } + }, + "examples": [ + { "$ref": "#/components/examplePairingObjects/SuccessfulTransactionSimulation" }, + { "$ref": "#/components/examplePairingObjects/FailedTransactionSimulation" } + ] +} diff --git a/openrpc/src/schemas/ContractIds.json b/openrpc/src/schemas/ContractIds.json new file mode 100644 index 00000000..ed3f6b23 --- /dev/null +++ b/openrpc/src/schemas/ContractIds.json @@ -0,0 +1,16 @@ +{ + "ContractId": { + "title": "contractId", + "description": "A StrKey representation of a contract address (`C...`). ([SEP-23](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0023.md#specification)).", + "type": "string" + }, + "ContractIds": { + "title": "contractIds", + "type": "array", + "description": "List of contract IDs to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.", + "maxItems": 5, + "items": { + "$ref": "#/components/schemas/ContractId" + } + } +} diff --git a/openrpc/src/schemas/Event.json b/openrpc/src/schemas/Event.json new file mode 100644 index 00000000..3d208490 --- /dev/null +++ b/openrpc/src/schemas/Event.json @@ -0,0 +1,64 @@ +{ + "Event": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/EventType" + }, + "ledger": { + "description": "Sequence number of the ledger in which this event was emitted.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "ledgerClosedAt": { + "type": "string", + "description": "[ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp of the ledger closing time" + }, + "contractId": { + "description": "StrKey representation of the contract address that emitted this event.", + "$ref": "#/components/schemas/ContractId" + }, + "id": { + "$ref": "#/components/schemas/EventId" + }, + "pagingToken": { + "description": "Duplicate of `id` field, but in the standard place for pagination tokens.", + "$ref": "#/components/schemas/EventId" + }, + "inSuccessfulContractCall": { + "description": "If true the event was emitted during a successful contract call.", + "type": "boolean" + }, + "topic": { + "type": "array", + "description": "List containing the topic this event was emitted with.", + "$ref": "#/components/schemas/TopicFilter" + }, + "value": { + "$ref": "#/components/schemas/EventValue" + } + } + }, + "EventType": { + "title": "type", + "description": "The type of event emission.", + "type": "string", + "enum": [ "contract", "diagnostic", "system" ] + }, + "EventId": { + "description": "Unique identifier for this event.\n\n- The event's unique id field is based on a [`toid` from Horizon](https://github.com/stellar/go/blob/master/toid/main.go) as used in Horizon's /effects endpoint.\n\n- https://github.com/stellar/go/blob/master/services/horizon/internal/db2/history/effect.go#L58\n\n- Specifically, it is a string containing:\n\n- bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation.\n\n- For example: `1234-1`", + "type": "string" + }, + "EventXdr": { + "description": "The emitted body value of the event (serialized in a base64 string).", + "type": "string" + }, + "EventValue": { + "description": "The data the event was broadcasting in the emitted event.", + "type": "object", + "properties": { + "xdr": { + "$ref": "#/components/schemas/EventXdr" + } + } + } +} diff --git a/openrpc/src/schemas/EventFilters.json b/openrpc/src/schemas/EventFilters.json new file mode 100644 index 00000000..193b93cf --- /dev/null +++ b/openrpc/src/schemas/EventFilters.json @@ -0,0 +1,52 @@ +{ + "EventFilters": { + "type": "array", + "maxItems": 5, + "items": { + "$ref": "#/components/schemas/EventFilter" + } + }, + "EventFilter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/EventFilterType" + }, + "contractIds": { + "$ref": "#/components/schemas/ContractIds" + }, + "topics": { + "$ref": "#/components/schemas/TopicFilters" + } + }, + "required": [] + }, + "EventFilterType": { + "title": "type", + "type": "string", + "description": "A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included." + }, + "TopicFilters": { + "title": "topics", + "type": "array", + "description": "List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.", + "maxItems": 5, + "items": { + "$ref": "#/components/schemas/TopicFilter" + } + }, + "SegmentMatcher": { + "title": "SegmentMatcher", + "type": "string", + "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." + }, + "TopicFilter": { + "type": "array", + "description": "A `TopicFilter` is `SegmentMatcher[]`\n\n- The list can be 1-4 `SegmentMatchers` long.", + "minItems": 1, + "maxItems": 4, + "items": { + "$ref": "#/components/schemas/SegmentMatcher" + } + } +} diff --git a/openrpc/src/schemas/Hash.json b/openrpc/src/schemas/Hash.json new file mode 100644 index 00000000..f12fe2cf --- /dev/null +++ b/openrpc/src/schemas/Hash.json @@ -0,0 +1,19 @@ +{ + "Hash": { + "title": "hash", + "type": "string", + "minLength": 64, + "maxLength": 64, + "pattern": "^[a-f\\d]{64}$" + }, + "TransactionHash": { + "title": "hash", + "description": "Transaction hash (as a hex-encoded string)", + "$ref": "#/components/schemas/Hash" + }, + "LedgerHash": { + "title": "id", + "description": "Hash identifier of the latest ledger (as a hex-encoded string) known to Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/Hash" + } +} diff --git a/openrpc/src/schemas/LedgerCloseTime.json b/openrpc/src/schemas/LedgerCloseTime.json new file mode 100644 index 00000000..ba6df7fe --- /dev/null +++ b/openrpc/src/schemas/LedgerCloseTime.json @@ -0,0 +1,17 @@ +{ + "LedgerCloseTime": { + "title": "ledgerCloseTime", + "description": "The unix timestamp of the close time of the ledger.", + "type": "string" + }, + "LatestLedgerCloseTime": { + "title": "latestLedgerCloseTime", + "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerCloseTime" + }, + "OldestLedgerCloseTime": { + "title": "oldestLedgerCloseTime", + "description": "The unix timestamp of the close time of the oldest ledger ingested by Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerCloseTime" + } +} diff --git a/openrpc/src/schemas/LedgerEntries.json b/openrpc/src/schemas/LedgerEntries.json new file mode 100644 index 00000000..dc9b98ef --- /dev/null +++ b/openrpc/src/schemas/LedgerEntries.json @@ -0,0 +1,34 @@ +{ + "LedgerKey": { + "type": "string", + "description": "Ledger key, serialized as a base64 string, corresponding to an existing ledger entry you wish to retrieve." + }, + "LedgerKeys": { + "description": "Array containing ledger keys.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LedgerKey" + } + }, + "LedgerEntry": { + "type": "object", + "description": "Object containing information about an existing ledger entry.", + "properties": { + "key": { + "type": "string", + "description": "The key of the ledger entry (serialized in a base64 string)." + }, + "xdr": { + "type": "string", + "description": "The current value of the given ledger entry (serialized in a base64 string)." + }, + "lastModifiedLedgerSeq": { + "description": "The ledger sequence number of the last time this entry was updated.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "liveUntilLedgerSeq": { + "$ref": "#/components/schemas/LedgerSequence" + } + } + } +} diff --git a/openrpc/src/schemas/LedgerSequence.json b/openrpc/src/schemas/LedgerSequence.json new file mode 100644 index 00000000..bd097ba9 --- /dev/null +++ b/openrpc/src/schemas/LedgerSequence.json @@ -0,0 +1,17 @@ +{ + "LedgerSequence": { + "title": "ledgerSequence", + "description": "Sequence number of the ledger.", + "type": "number" + }, + "LatestLedger": { + "title": "latestLedger", + "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerSequence" + }, + "OldestLedger": { + "title": "oldestLedger", + "description": "The sequence number of the oldest ledger ingested by Soroban RPC at the time it handled the request.", + "$ref": "#/components/schemas/LedgerSequence" + } +} diff --git a/openrpc/src/schemas/NetworkConfig.json b/openrpc/src/schemas/NetworkConfig.json new file mode 100644 index 00000000..fdcf3a99 --- /dev/null +++ b/openrpc/src/schemas/NetworkConfig.json @@ -0,0 +1,12 @@ +{ + "ProtocolVersion": { + "title": "protocolVersion", + "description": "Stellar Core protocol version associated with the latest ledger.", + "type": "number" + }, + "NetworkPassphrase": { + "title": "networkPassphrase", + "description": "Network passphrase configured for this Soroban RPC node.", + "type": "string" + } +} diff --git a/openrpc/src/schemas/Pagination.json b/openrpc/src/schemas/Pagination.json new file mode 100644 index 00000000..0ccf4843 --- /dev/null +++ b/openrpc/src/schemas/Pagination.json @@ -0,0 +1,16 @@ +{ + "Pagination": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "A string ID that points to a specific location in a collection of responses and is pulled from the `paging_token` value of a record. When a cursor is provided Soroban-RPC will _not_ include the element whose id matches the cursor in the response. Only elements which appear _after_ the cursor are included." + }, + "limit": { + "type": "number", + "description": "The maximum number of records returned. The limit for [getEvents](https://soroban.stellar.org/api/getEvents) can range from 1 to 10000 - an upper limit that is hardcoded in Soroban-RPC for performance reasons. If this argument isn't designated, it defaults to 100." + } + }, + "required": [] + } +} diff --git a/openrpc/src/schemas/ResourceConfig.json b/openrpc/src/schemas/ResourceConfig.json new file mode 100644 index 00000000..92cfd4b4 --- /dev/null +++ b/openrpc/src/schemas/ResourceConfig.json @@ -0,0 +1,14 @@ +{ + "ResourceConfig": { + "title": "resourceConfig", + "description": "Configuration for how resources will be calculated.", + "type": "object", + "properties": { + "instructionLeeway": { + "title": "instructionLeeway", + "description": "Allow this many extra instructions when budgeting resources.", + "type": "number" + } + } + } +} diff --git a/openrpc/src/schemas/Transaction.json b/openrpc/src/schemas/Transaction.json new file mode 100644 index 00000000..730936cc --- /dev/null +++ b/openrpc/src/schemas/Transaction.json @@ -0,0 +1,7 @@ +{ + "Transaction": { + "title": "transaction", + "description": "A Stellar transaction, serialized as a base64 string", + "type": "string" + } +} diff --git a/package.json b/package.json index 79bb7292..8ee1956e 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,11 @@ "lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix", "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"", "prepare": "husky install", - "postinstall": "patch-package" + "postinstall": "patch-package", + "rpcspec:build": "node openrpc/scripts/build.mjs", + "rpcspec:validate": "node openrpc/scripts/build.mjs && node openrpc/scripts/validate.mjs" }, "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.1.0", "@docusaurus/core": "^2.2.0", "@docusaurus/preset-classic": "^2.2.0", "@docusaurus/theme-mermaid": "^2.4.1", @@ -65,6 +66,7 @@ "devDependencies": { "@docusaurus/eslint-plugin": "^2.2.0", "@docusaurus/plugin-google-analytics": "^2.2.0", + "@json-schema-tools/reference-resolver": "^1.2.5", "@stellar/eslint-config": "^2.1.2", "@stellar/prettier-config": "^1.0.1", "@stellar/tsconfig": "^1.0.2", @@ -76,6 +78,7 @@ "eslint-plugin-jsdoc": "^46.4.4", "eslint-plugin-prefer-arrow": "^1.2.3", "husky": "^8.0.3", + "json-schema-merge-allof": "^0.8.1", "mdast-util-to-markdown": "^1.4.0", "prettier": "^3.0.0", "react-player": "^2.12.0", diff --git a/static/openrpc.json b/static/openrpc.json index c345fe6a..da4c4972 100644 --- a/static/openrpc.json +++ b/static/openrpc.json @@ -1199,4 +1199,4 @@ } ], "components": {} -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index a4d7fbf3..ed6af1eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -151,17 +151,6 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@apidevtools/json-schema-ref-parser@^11.1.0": - version "11.1.0" - resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.1.0.tgz#0608ed1ba47c377c6732e7185f2ea06731b58fde" - integrity sha512-g/VW9ZQEFJAOwAyUb8JFf7MLiLy2uEB4rU270rGzDwICxnxMlPy0O11KVePSgS36K1NI29gSlK84n5INGhd4Ag== - dependencies: - "@jsdevtools/ono" "^7.1.3" - "@types/json-schema" "^7.0.13" - "@types/lodash.clonedeep" "^4.5.7" - js-yaml "^4.1.0" - lodash.clonedeep "^4.5.0" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.8.3": version "7.22.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" @@ -1952,11 +1941,6 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jsdevtools/ono@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" - integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== - "@json-schema-spec/json-pointer@^0.1.2": version "0.1.2" resolved "https://registry.yarnpkg.com/@json-schema-spec/json-pointer/-/json-pointer-0.1.2.tgz#5153d5d01b94134015ee829deca5a970cf0406fd" @@ -1984,7 +1968,7 @@ "@json-schema-spec/json-pointer" "^0.1.2" isomorphic-fetch "^3.0.0" -"@json-schema-tools/reference-resolver@^1.2.4": +"@json-schema-tools/reference-resolver@^1.2.4", "@json-schema-tools/reference-resolver@^1.2.5": version "1.2.5" resolved "https://registry.yarnpkg.com/@json-schema-tools/reference-resolver/-/reference-resolver-1.2.5.tgz#47179269010eeb1f6fc289fa355da7111b633baf" integrity sha512-xNQgX/ABnwvbIeexL5Czv08lXjHAL80HEUogza7E19eIL/EXD8HM4FvxG1JuTGyi5fA+sSP64C9pabELizcBBw== @@ -2926,7 +2910,7 @@ resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.7.tgz#226a9e31680835a6188e887f3988e60c04d3f6a3" integrity sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA== -"@types/json-schema@*", "@types/json-schema@^7.0.13", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -2936,18 +2920,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/lodash.clonedeep@^4.5.7": - version "4.5.9" - resolved "https://registry.yarnpkg.com/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz#ea48276c7cc18d080e00bb56cf965bcceb3f0fc1" - integrity sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q== - dependencies: - "@types/lodash" "*" - -"@types/lodash@*": - version "4.14.201" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.201.tgz#76f47cb63124e806824b6c18463daf3e1d480239" - integrity sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ== - "@types/mdast@^3.0.0": version "3.0.15" resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.15.tgz#49c524a263f30ffa28b71ae282f813ed000ab9f5" @@ -8020,11 +7992,6 @@ lodash-es@^4.17.21: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== - lodash.curry@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" From 4a74e0ef59aa53234ae831b61326b535f61a2a0b Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Thu, 21 Dec 2023 13:34:42 -0600 Subject: [PATCH 2/8] add a readme to the openrpc directory, ignore transitional files --- .gitignore | 3 + openrpc/README.md | 133 ++++ openrpc/openrpc.json | 1202 ------------------------------- openrpc/refs-openrpc.json | 1414 ------------------------------------- openrpc/scripts/build.mjs | 3 +- 5 files changed, 138 insertions(+), 2617 deletions(-) create mode 100644 openrpc/README.md delete mode 100644 openrpc/openrpc.json delete mode 100644 openrpc/refs-openrpc.json diff --git a/.gitignore b/.gitignore index ed3fe720..9944744b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* .vercel + +# non-production openrpc.json files +/openrpc/*openrpc.json diff --git a/openrpc/README.md b/openrpc/README.md new file mode 100644 index 00000000..04e360c1 --- /dev/null +++ b/openrpc/README.md @@ -0,0 +1,133 @@ +# Soroban RPC API Specification + +## Table of Contents + +- [Soroban RPC API Specification](#soroban-rpc-api-specification) + - [JSON-RPC](#json-rpc) + - [Building](#building) + - [Testing](#testing) + - [JSON `$ref`s](#json-refs) + - [Keeping Things Up-to-Date](#keeping-things-up-to-date) + - [Methods (`/openrpc/src/methods/*`)](#methods-openrpcsrcmethods) + - [Content Descriptors (`/openrpc/src/contentDescriptors/*`)](#content-descriptors-openrpcsrccontentdescriptors) + - [Schemas (`/openrpc/src/schemas/*`)](#schemas-openrpcsrcschemas) + - [Examples (`/openrpc/src/examples/*`)](#examples-openrpcsrcexamples) + - [Example Pairings (`/openrpc/src/examplePairingObjects/*`)](#example-pairings-openrpcsrcexamplepairingobjects) + +## JSON-RPC + +This is a specification of the API presented by Soroban RPC. + +### Building + +The specification is split into multiple files to improve readability. The +complete spec can be compiled into a single document as follows. (Run this +command from the root `soroban-docs` directory.) + +```bash +yarn rpcspec:build +# Build successful. +``` + +This will output the file to `/static/openrpc.json`. This file will have all +schema `$ref`s resolved. + +### Testing + +We have included a script which will test and validate the generated +specification file. + +```bash +yarn rpcspec:validate +# OpenRPC spec validated successfully. +``` + +### JSON `$ref`s + +These files make extensive use of `$ref` objects for improved readability and +maintainability. In the separate files, the references don't mean much, but when +things are generated they'll be resolved. If you are going to reference +something in the specification, you will need to use the following format: +`#/components/{schemas,examples,etc.}/NameOfComponentToReference`. + +The items broken out into objects that will be referenced are not held +individually in their own files. Instead, they are grouped into similar and +related files. For example: `/src/examples/Transactions.json` hold several +`example` components that are related to transactions, such as transaction +hashes, results from the `getTransaction` or `sendTransaction` methods, +transactions parameters that were sent using the `sendTransaction` method, etc. + +## Keeping Things Up-to-Date + +**Don't making any changes to `openrpc.json` or `refs-openrpc.json`!** Any +changes you make there, will not be actually reflected in the generated +specification file. Instead, any changes should be made in the files contained +in the `/openrpc/src` directory. + +This directory follows a structure similar to the schema defined in the OpenRPC +specification. Here are the pieces you'll need to know about: + +### Methods (`/openrpc/src/methods/*`) + +This collection of JSON files define the [method objects] that will go into the +generated specification file. The methods can be considered the container that +will ultimately hold _all_ of the details about how the method works (parameter +types, return types, examples, etc.). The following properties are required in +the method object: + +- `name` (string) - The canonical name for the method. The name MUST be unique + within the methods array +- `params` (list) - A list of parameters that are applicable for this method + +### Content Descriptors (`/openrpc/src/contentDescriptors/*`) + +This collection of JSON files define the [contentDescriptor objects] that will +go into the generated specification file. A content descriptor is a reusable way +of describing either parameters or results. (Though, I've found they're best +used as items in a method's `params` list). The following property are required +in the content descriptor object: + +- `name` (string) - Name of the content that is being described. If this object + is defining a parameter, the `name` field will define the parameter's key +- `schema` (object) - A schema that describes the content + +### Schemas (`/openrpc/src/schemas/*`) + +This collection of JSON files define the [schema objects] that will go into the +generated specification file. These schemas allow us to define input and output +data types. These schemas **MUST** follow the [JSON Schema Specification 7] + +### Examples (`/openrpc/src/examples/*`) + +This collection of JSON files define the [example objects] that will go into the +generated specification file. These objects define an example that is consistent +and matches the `schema` of a given content descriptor. These example objects +can act as either a parameter or result. The `value` property of the example +object allows us to embed a literal example of what the schema can look like. + +### Example Pairings (`/openrpc/src/examplePairingObjects/*`) + +This collection of JSON files define the [example pairing objects] that will go +into the generated specification file. The example pairing objects make up a +complete example request to the Soroban RPC service. This is where you can +specify a set of `params` that were supplied in the request, as well as the +value(s) returned in the `result` from the node. The following properties are +required in the example pairing objects: + +- `name` (string) - Name for the example pairing +- `params` (list) - A list of example parameters (or `$ref`s to example objects) +- `result` (example object) - Example result received from the node + +> _Note:_ The `result` property is not technically _required_ by the open-rpc +> specification if the method is to be represented as a notification. However, +> Soroban RPC doesn't make use of any methods as notifications, so we've listed +> it as required here. + +[method objects]: +[contentDescriptor objects]: + +[schema objects]: +[JSON Schema Specification 7]: + +[example objects]: +[example pairing objects]: diff --git a/openrpc/openrpc.json b/openrpc/openrpc.json deleted file mode 100644 index da4c4972..00000000 --- a/openrpc/openrpc.json +++ /dev/null @@ -1,1202 +0,0 @@ -{ - "openrpc": "1.2.4", - "info": { - "title": "Soroban RPC", - "description": "Soroban-RPC allows you to communicate directly with Soroban via a JSON RPC interface.", - "termsOfService": "https://stellar.org/terms-of-service", - "contact": { - "name": "Stellar Development Foundation", - "url": "https://stellar.org/connect", - "email": "hello@stellar.org" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "20.1.0" - }, - "servers": [ - { - "name": "Testnet", - "url": "https://soroban-testnet.stellar.org:443", - "summary": "Publicly available RPC server maintained by SDF, operating on the Testnet test network.", - "description": "Testnet is meant to be a stable network that runs a production (or near-production) version of the Stellar network." - }, - { - "name": "Futurenet", - "url": "https://rpc-futurenet.stellar.org:443", - "summary": "Publicly available RPC server maintained by SDF, operating on the Futurenet test network.", - "description": "Futurenet is meant to be a bleeding-edge, experimental network that runs an early, test version of the Stellar network." - } - ], - "methods": [ - { - "name": "getEvents", - "summary": "returns contract events", - "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getEvents" - }, - "paramStructure": "by-name", - "params": [ - { - "name": "startLedger", - "summary": "ledger to begin searching from", - "description": "Ledger sequence number to fetch events after (inclusive). This method will return an error if `startLedger` is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, `startLedger` must be omitted.", - "required": true, - "schema": { - "title": "ledgerSequence", - "description": "Sequence number of the ledger.", - "type": "number" - } - }, - { - "name": "filters", - "summary": "filters to narrow events search", - "description": "List of filters for the returned events. Events matching any of the filters are included. To match a filter, an event must match both a contractId and a topic. Maximum 5 filters are allowed per request.", - "schema": { - "type": "array", - "maxItems": 5, - "items": { - "type": "object", - "required": [], - "properties": { - "type": { - "title": "type", - "type": "string", - "description": "A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included." - }, - "contractIds": { - "title": "contractIds", - "type": "array", - "description": "List of contract IDs to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.", - "maxItems": 5, - "items": { - "title": "contractId", - "description": "A StrKey representation of a contract address (`C...`). ([SEP-23](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0023.md#specification)).", - "type": "string" - } - }, - "topics": { - "title": "topics", - "type": "array", - "description": "List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.", - "maxItems": 5, - "items": { - "type": "array", - "description": "A `TopicFilter` is `SegmentMatcher[]`\n\n- The list can be 1-4 `SegmentMatchers` long.", - "minItems": 1, - "maxItems": 4, - "items": { - "title": "SegmentMatcher", - "type": "string", - "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." - } - } - } - } - } - } - }, - { - "name": "pagination", - "summary": "pagination options", - "description": "Pagination in soroban-rpc is similar to pagination in Horizon. See [Pagination](https://soroban.stellar.org/api/pagination).", - "required": false, - "schema": { - "type": "object", - "required": [], - "properties": { - "cursor": { - "type": "string", - "description": "A string ID that points to a specific location in a collection of responses and is pulled from the `paging_token` value of a record. When a cursor is provided Soroban-RPC will _not_ include the element whose id matches the cursor in the response. Only elements which appear _after_ the cursor are included." - }, - "limit": { - "type": "number", - "description": "The maximum number of records returned. The limit for [getEvents](https://soroban.stellar.org/api/getEvents) can range from 1 to 10000 - an upper limit that is hardcoded in Soroban-RPC for performance reasons. If this argument isn't designated, it defaults to 100." - } - } - } - } - ], - "result": { - "name": "getEventsResult", - "schema": { - "type": "object", - "properties": { - "latestLedger": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "number" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "title": "type", - "description": "The type of event emission.", - "type": "string", - "enum": [ - "contract", - "diagnostic", - "system" - ] - }, - "ledger": { - "title": "ledgerSequence", - "description": "Sequence number of the ledger in which this event was emitted.", - "type": "number" - }, - "ledgerClosedAt": { - "type": "string", - "description": "[ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp of the ledger closing time" - }, - "contractId": { - "title": "contractId", - "description": "StrKey representation of the contract address that emitted this event.", - "type": "string" - }, - "id": { - "description": "Unique identifier for this event.\n\n- The event's unique id field is based on a [`toid` from Horizon](https://github.com/stellar/go/blob/master/toid/main.go) as used in Horizon's /effects endpoint.\n\n- https://github.com/stellar/go/blob/master/services/horizon/internal/db2/history/effect.go#L58\n\n- Specifically, it is a string containing:\n\n- bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation.\n\n- For example: `1234-1`", - "type": "string" - }, - "pagingToken": { - "description": "Duplicate of `id` field, but in the standard place for pagination tokens.", - "type": "string" - }, - "inSuccessfulContractCall": { - "description": "If true the event was emitted during a successful contract call.", - "type": "boolean" - }, - "topic": { - "type": "array", - "description": "List containing the topic this event was emitted with.", - "minItems": 1, - "maxItems": 4, - "items": { - "title": "SegmentMatcher", - "type": "string", - "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." - } - }, - "value": { - "description": "The data the event was broadcasting in the emitted event.", - "type": "object", - "properties": { - "xdr": { - "description": "The emitted body value of the event (serialized in a base64 string).", - "type": "string" - } - } - } - } - } - } - } - } - }, - "examples": [ - { - "name": "Native XLM Transfer Events", - "description": "Example request to the `getEvents` method, filtering for `transfer` events for native Lumens, and limiting the number of returned events to 2.", - "params": [ - { - "name": "startLedger", - "value": 2530000 - }, - { - "name": "filters", - "value": [ - { - "type": "contract", - "contractIds": [ - "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC" - ], - "topics": [ - [ - "AAAADwAAAAh0cmFuc2Zlcg==", - "*", - "*", - "*" - ] - ] - } - ] - }, - { - "name": "pagination", - "value": { - "limit": 2 - } - } - ], - "result": { - "name": "getEventsResult", - "value": { - "events": [ - { - "type": "contract", - "ledger": 2531021, - "ledgerClosedAt": "2023-11-15T08:58:25Z", - "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", - "id": "0010870652420501504-0000000004", - "pagingToken": "0010870652420501504-0000000004", - "topic": [ - "AAAADwAAAAh0cmFuc2Zlcg==", - "AAAAEgAAAAAAAAAAjt5DlR5mhneFx/1Lct0ToW555OFzg/Y28++28cJXU+I=", - "AAAAEgAAAAAAAAAA33Fu/fnobL8/u8tyLCIZzpMXbsRWRBlfAuEv7fBvTwM=", - "AAAADgAAAAZuYXRpdmUAAA==" - ], - "value": { - "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" - }, - "inSuccessfulContractCall": true - }, - { - "type": "contract", - "ledger": 2531273, - "ledgerClosedAt": "2023-11-15T09:20:38Z", - "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", - "id": "0010871734752280576-0000000004", - "pagingToken": "0010871734752280576-0000000004", - "topic": [ - "AAAADwAAAAh0cmFuc2Zlcg==", - "AAAAEgAAAAAAAAAA+YQ+FM83vUUwQ6P3gKCMVTyC3/jO+DERXTWJDKEjagU=", - "AAAAEgAAAAAAAAAAwl0UMLLKYqMEedoowz8VnwbRywjcKEeQegoMmU6C9/0=", - "AAAADgAAAAZuYXRpdmUAAA==" - ], - "value": { - "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" - }, - "inSuccessfulContractCall": true - } - ], - "latestLedger": 2539388 - } - } - }, - { - "name": "All Events", - "description": "Example request to the `getEvents` method, filtering for all events of all types for any and all contracts.", - "params": [ - { - "name": "startLedger", - "value": 2530000 - }, - { - "name": "pagination", - "value": { - "limit": 2 - } - } - ], - "result": { - "name": "getEventsResult", - "value": { - "events": [ - { - "type": "diagnostic", - "ledger": 2530001, - "ledgerClosedAt": "2023-11-15T07:29:05Z", - "contractId": "", - "id": "0010866271553875968-0000000000", - "pagingToken": "0010866271553875968-0000000000", - "topic": [ - "AAAADwAAAAdmbl9jYWxsAA==", - "AAAADQAAACCGE7Aj5EvXxmmTtyojmlFF/Qv3qMTyL7THd6SG4GHZxQ==", - "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" - ], - "value": { - "xdr": "AAAAEAAAAAEAAAACAAAADwAAAAN1c2QAAAAACQAAAAAAAAAAAAAAAAASHQg=" - }, - "inSuccessfulContractCall": true - }, - { - "type": "diagnostic", - "ledger": 2530001, - "ledgerClosedAt": "2023-11-15T07:29:05Z", - "contractId": "CCDBHMBD4RF5PRTJSO3SUI42KFC72C7XVDCPEL5UY532JBXAMHM4KOQ3", - "id": "0010866271553875968-0000000001", - "pagingToken": "0010866271553875968-0000000001", - "topic": [ - "AAAADwAAAAlmbl9yZXR1cm4AAAA=", - "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" - ], - "value": { - "xdr": "AAAAAQ==" - }, - "inSuccessfulContractCall": true - } - ], - "latestLedger": 2539529 - } - } - } - ] - }, - { - "name": "getHealth", - "summary": "returns node health", - "description": "General node health check.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getHealth" - }, - "paramStructure": "by-name", - "params": [], - "result": { - "name": "getHealthResult", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "\"healthy\"" - } - } - } - }, - "examples": [ - { - "name": "Current node health", - "description": "Example request to the `getHealth` method", - "params": [], - "result": { - "name": "getHealthResult", - "value": { - "status": "healthy" - } - } - } - ] - }, - { - "name": "getLatestLedger", - "summary": "returns latest known ledger", - "description": "For finding out the current latest known ledger of this node. This is a subset of the ledger info from Horizon.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getLatestLedger" - }, - "paramStructure": "by-name", - "params": [], - "result": { - "name": "getLatestLedgerResult", - "schema": { - "type": "object", - "properties": { - "id": { - "title": "id", - "type": "string", - "minLength": 64, - "maxLength": 64, - "pattern": "^[a-f\\d]{64}$", - "description": "Hash identifier of the latest ledger (as a hex-encoded string) known to Soroban RPC at the time it handled the request." - }, - "protocolVersion": { - "title": "protocolVersion", - "description": "Stellar Core protocol version associated with the latest ledger.", - "type": "number" - }, - "sequence": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "number" - } - } - } - }, - "examples": [ - { - "name": "Details of the Current Ledger", - "description": "Example request to the `getLatestLedger` method.", - "params": [], - "result": { - "name": "getLatestLedgerResult", - "value": { - "id": "c73c5eac58a441d4eb733c35253ae85f783e018f7be5ef974258fed067aabb36", - "protocolVersion": 20, - "sequence": 2539605 - } - } - } - ] - }, - { - "name": "getLedgerEntries", - "summary": "returns ledger entries", - "description": "For reading the current value of ledger entries directly.\n\nAllows you to directly inspect the current state of a contract, a contract's code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or `simulateTransaction`.\n\nTo fetch contract wasm byte-code, use the ContractCode ledger entry key.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getLedgerEntries" - }, - "paramStructure": "by-name", - "params": [ - { - "name": "keys", - "summary": "array of ledger keys", - "description": "Array containing the keys of the ledger entries you wish to retrieve. (an array of serialized base64 strings)", - "required": true, - "schema": { - "description": "Array containing ledger keys.", - "type": "array", - "items": { - "type": "string", - "description": "Ledger key, serialized as a base64 string, corresponding to an existing ledger entry you wish to retrieve." - } - } - } - ], - "result": { - "name": "getLedgerEntriesResult", - "schema": { - "type": "object", - "required": [ - "latestLedger" - ], - "properties": { - "latestLedger": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "number" - }, - "entries": { - "type": "array", - "description": "Array of objects containing all found ledger entries", - "items": { - "type": "object", - "description": "Object containing information about an existing ledger entry.", - "properties": { - "key": { - "type": "string", - "description": "The key of the ledger entry (serialized in a base64 string)." - }, - "xdr": { - "type": "string", - "description": "The current value of the given ledger entry (serialized in a base64 string)." - }, - "lastModifiedLedgerSeq": { - "title": "ledgerSequence", - "description": "The ledger sequence number of the last time this entry was updated.", - "type": "number" - }, - "liveUntilLedgerSeq": { - "title": "ledgerSequence", - "description": "Sequence number of the ledger.", - "type": "number" - } - } - } - } - } - } - }, - "examples": [ - { - "name": "Retrieve a Contract's Counter Entry for an Address", - "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry.", - "params": [ - { - "name": "keys", - "summary": "ledger key for an address' counter entry", - "description": "A ledger key that will request a ledger entry defined using a tuple variant enum in a contract: `Counter(Address)`", - "value": [ - "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=" - ] - } - ], - "result": { - "name": "getLedgerEntriesResult", - "value": { - "entries": [ - { - "key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC", - "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", - "lastModifiedLedgerSeq": 2552504 - } - ], - "latestLedger": 2552990 - } - } - }, - { - "name": "Retrieve a Token's Balance Entry for Contract", - "description": "Example request to the `getNetwork` method for a SAC balance ledger entry belonging to a contract.", - "params": [ - { - "name": "keys", - "summary": "ledger key for a contract's native XLM balance", - "description": "A ledger key that will request a ledger entry corresponding to a contract's balance on the native XLM Stellar Asset Contract.", - "value": [ - "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" - ] - } - ], - "result": { - "name": "getLedgerEntriesResult", - "value": { - "entries": [ - { - "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", - "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", - "lastModifiedLedgerSeq": 2553612 - } - ], - "latestLedger": 2553713 - } - } - }, - { - "name": "Retrieve Multiple Ledger Entries from Different Contracts.", - "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry and a SAC balance ledger entry.", - "params": [ - { - "name": "keys", - "summary": "ledger keys for multiple ledger entries", - "description": "Two ledger keys: One for a counter entry, and one for a contract's native XLM balance.", - "value": [ - "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", - "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" - ] - } - ], - "result": { - "name": "getLedgerEntriesResult", - "value": { - "entries": [ - { - "key": "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", - "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", - "lastModifiedLedgerSeq": 2553612 - }, - { - "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", - "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", - "lastModifiedLedgerSeq": 2552504 - } - ], - "latestLedger": 2553767 - } - } - } - ] - }, - { - "name": "getNetwork", - "summary": "returns network config", - "description": "General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getNetwork" - }, - "paramStructure": "by-name", - "params": [], - "result": { - "name": "getNetworkResult", - "schema": { - "type": "object", - "required": [ - "passphrase", - "protocolVersion" - ], - "properties": { - "passphrase": { - "title": "networkPassphrase", - "description": "Network passphrase configured for this Soroban RPC node.", - "type": "string" - }, - "protocolVersion": { - "title": "protocolVersion", - "description": "Stellar Core protocol version associated with the latest ledger.", - "type": "number" - }, - "friendbotUrl": { - "type": "string", - "description": "(optional) The URL of this network's \"friendbot\" faucet" - } - } - } - }, - "examples": [ - { - "name": "Testnet Network Configuration", - "description": "Example request to the `getNetwork` method for a node connected to the Stellar Testnet network.", - "params": [], - "result": { - "name": "getNetworkResult", - "value": { - "friendbotUrl": "https://friendbot-testnet.stellar.org/", - "passphrase": "Test SDF Network ; September 2015", - "protocolVersion": 20 - } - } - }, - { - "name": "Futurenet Network Configuration", - "description": "Example request to the `getNetwork` method for a node connected to the Stellar Futurenet network.", - "params": [], - "result": { - "name": "getNetworkResult", - "value": { - "friendbotUrl": "https://friendbot-futurenet.stellar.org/", - "passphrase": "Test SDF Future Network ; October 2022", - "protocolVersion": 20 - } - } - } - ] - }, - { - "name": "getTransaction", - "summary": "returns transaction details", - "description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The soroban-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 1440 ledgers, approximately equivalent to a 2-hour timeframe. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting. For comprehensive debugging needs that extend beyond the 2-hour timeframe, it is advisable to retrieve transaction information from Horizon, as it provides a lasting and persistent record.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getTransaction" - }, - "paramStructure": "by-name", - "params": [ - { - "name": "hash", - "summary": "transaction hash to query", - "description": "Transaction hash to query as a hex-encoded string. This transaction hash should correspond to transaction that has been previously submitted to the network.", - "required": true, - "schema": { - "title": "hash", - "type": "string", - "minLength": 64, - "maxLength": 64, - "pattern": "^[a-f\\d]{64}$", - "description": "Transaction hash (as a hex-encoded string)" - } - } - ], - "result": { - "name": "getTransactionResult", - "schema": { - "type": "object", - "required": [ - "status", - "latestLedger", - "latestLedgerCloseTime", - "oldestLedger", - "oldestLedgerCloseTime" - ], - "properties": { - "status": { - "type": "string", - "description": "The current status of the transaction by hash", - "enum": [ - "SUCCESS", - "NOT_FOUND", - "FAILED" - ] - }, - "latestLedger": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "number" - }, - "latestLedgerCloseTime": { - "title": "latestLedgerCloseTime", - "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "string" - }, - "oldestLedger": { - "title": "oldestLedger", - "description": "The sequence number of the oldest ledger ingested by Soroban RPC at the time it handled the request.", - "type": "number" - }, - "oldestLedgerCloseTime": { - "title": "oldestLedgerCloseTime", - "description": "The unix timestamp of the close time of the oldest ledger ingested by Soroban RPC at the time it handled the request.", - "type": "string" - }, - "ledger": { - "title": "ledger", - "description": "(optional) The sequence number of the ledger which included the transaction. This field is only present if `status` is `SUCCESS` or `FAILED`.", - "type": "number" - }, - "createdAt": { - "title": "createdAt", - "description": "(optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`.", - "type": "string" - }, - "applicationOrder": { - "type": "number", - "description": "(optional) The index of the transaction among all transactions included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`." - }, - "feeBump": { - "type": "boolean", - "description": "(optional) Indicates whether the transaction was fee bumped. This field is only present if `status` is `SUCCESS` or `FAILED`." - }, - "envelopeXdr": { - "type": "string", - "description": "(optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction." - }, - "resultXdr": { - "type": "string", - "description": "(optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if `status` is `SUCCESS` or `FAILED`." - }, - "resultMetaXdr": { - "type": "string", - "description": "(optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction." - } - } - } - }, - "examples": [ - { - "name": "Successful Transaction", - "description": "Query for a transaction hash that returns `SUCCESS` from the RPC node.", - "params": [ - { - "name": "hash", - "summary": "a recent transaction hash", - "description": "Transaction hash that hit the network recently enough to still be visible through the RPC node.", - "value": "6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da" - } - ], - "result": { - "name": "getTransactionResult", - "value": { - "status": "SUCCESS", - "latestLedger": 2540076, - "latestLedgerCloseTime": "1700086333", - "oldestLedger": 2538637, - "oldestLedgerCloseTime": "1700078796", - "applicationOrder": 1, - "envelopeXdr": "AAAAAgAAAADGFY14/R1KD0VGtTbi5Yp4d7LuMW0iQbLM/AUiGKj5owCpsoQAJY3OAAAjqgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAARc2V0X2N1cnJlbmN5X3JhdGUAAAAAAAACAAAADwAAAANldXIAAAAACQAAAAAAAAAAAAAAAAARCz4AAAABAAAAAAAAAAAAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAARc2V0X2N1cnJlbmN5X3JhdGUAAAAAAAACAAAADwAAAANldXIAAAAACQAAAAAAAAAAAAAAAAARCz4AAAAAAAAAAQAAAAAAAAABAAAAB4408vVXuLU3mry897TfPpYjjsSN7n42REos241RddYdAAAAAQAAAAYAAAABhhOwI+RL18Zpk7cqI5pRRf0L96jE8i+0x3ekhuBh2cUAAAAUAAAAAQFvcYAAAIm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AAIAAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAPZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAAAhjcHVfaW5zbgAAAAUAAAAAATLTQAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAAAhtZW1fYnl0ZQAAAAUAAAAAACqhewAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABFpbnZva2VfdGltZV9uc2VjcwAAAAAAAAUAAAAAABFfSQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAAA9tYXhfcndfa2V5X2J5dGUAAAAABQAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAACAAAADwAAAAxjb3JlX21ldHJpY3MAAAAPAAAAEG1heF9yd19kYXRhX2J5dGUAAAAFAAAAAAAAB+gAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAQbWF4X3J3X2NvZGVfYnl0ZQAAAAUAAAAAAACBgAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABNtYXhfZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAA==", - "ledger": 2540064, - "createdAt": "1700086268" - } - } - }, - { - "name": "Not Found Transaction", - "description": "Query for a transaction hash that returns `NOT_FOUND` from the RPC node.", - "params": [ - { - "name": "hash", - "summary": "an old transaction hash", - "description": "Transaction has that is old enough for the RPC node to have forgotten about it.", - "value": "85f7aa8bfda425b98c0e53ffe56796ffd8865ec2fcc3ad71abf120801e2a14e5" - } - ], - "result": { - "name": "getTransactionResult", - "value": { - "status": "NOT_FOUND", - "latestLedger": 2540099, - "latestLedgerCloseTime": "1700086455", - "oldestLedger": 2538660, - "oldestLedgerCloseTime": "1700078913" - } - } - }, - { - "name": "Failed Transaction", - "description": "Query for a transaction hash that returns `FAILED` from the RPC node.", - "params": [ - { - "name": "hash", - "summary": "a failed transaction hash", - "description": "Transaction hash that failed to be accepted into a ledger.", - "value": "2e4c699cbcb8ee83fffb857c9579bcc91f73f0df2a0444292f66e37563785929" - } - ], - "result": { - "name": "getTransactionResult", - "value": { - "status": "FAILED", - "latestLedger": 2540124, - "latestLedgerCloseTime": "1700086588", - "oldestLedger": 2538685, - "oldestLedgerCloseTime": "1700079044", - "applicationOrder": 2, - "envelopeXdr": "AAAAAgAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAAG4AFyJfAABKvgAAAAIAAAAAAAAAAQAmwlEAJsK1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAE/fr1kk7lqP0srDPW4JExF1MWmpsG49FsRE3b0vMCmzAAAAAUVVUlMAAAAArPm4/+q9j4dl178h2JjrqjgRXnQ1WiGkyVy+nv3nGkEAAAAAAVjZQAAAAAAAAAABy786aQAAAEDybJBtG7V5NrRFpoboRUN/5ecys5wSUgag3CnTtWLmq3JDOxrEjK9noAnu/F5O0E8iXuVzX9BxZSO9JZ+Tw6kK", - "resultXdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+gAAAAA=", - "resultMetaXdr": "AAAAAwAAAAAAAAACAAAAAwAmwlIAAAAAAAAAAFm/J+WxnkW6a1J1L63T9idZYwvdhZ3NfUEaT9DLvzppAAAAF0g7NXsAFyJfAABKvQAAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAACbCSwAAAABlVULiAAAAAAAAAAEAJsJSAAAAAAAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAABdIOzV7ABciXwAASr4AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAmwlIAAAAAZVVDBwAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "ledger": 2540114, - "createdAt": "1700086535" - } - } - } - ] - }, - { - "name": "sendTransaction", - "summary": "submits a transaction", - "description": "Submit a real transaction to the Stellar network. This is the only way to make changes on-chain.\n\n Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call `getTransaction` to learn about transaction success/failure.\n\nThis supports all transactions, not only smart contract-related transactions.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/sendTransaction" - }, - "paramStructure": "by-name", - "params": [ - { - "name": "transaction", - "summary": "transaction to be submitted to the network", - "description": "The signed transaction to broadcast for inclusion in a ledger.", - "required": true, - "schema": { - "title": "transaction", - "description": "A Stellar transaction, serialized as a base64 string", - "type": "string" - } - } - ], - "result": { - "name": "sendTransactionResult", - "summary": "Transaction status and network state.", - "description": "Transaction status and network state. The result will include if the transaction was successfully enqueued, and information about the current ledger.", - "schema": { - "type": "object", - "required": [ - "hash", - "status", - "latestLedger", - "latestLedgerCloseTime" - ], - "properties": { - "hash": { - "title": "hash", - "type": "string", - "minLength": 64, - "maxLength": 64, - "pattern": "^[a-f\\d]{64}$", - "description": "Transaction hash (as a hex-encoded string)" - }, - "status": { - "type": "string", - "description": "The current status of the transaction by hash.", - "enum": [ - "PENDING", - "DUPLICATE", - "TRY_AGAIN_LATER", - "ERROR" - ] - }, - "latestLedger": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "number" - }, - "latestLedgerCloseTime": { - "title": "latestLedgerCloseTime", - "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "string" - }, - "errorResultXdr": { - "type": "string", - "description": "(optional) If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.", - "contentEncoding": "base64" - } - } - } - }, - "examples": [ - { - "name": "Pending Transaction", - "description": "Submitting a valid transaction using the `sendTransaction` method, resulting in a `PENDING` status.", - "params": [ - { - "name": "transaction", - "summary": "a valid transaction sent to the network", - "description": "A valid Stellar transaction that was sent to the network successfully.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" - } - ], - "result": { - "name": "sendTransactionResult", - "value": { - "status": "PENDING", - "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - } - }, - { - "name": "Duplicate Transaction", - "description": "Submitting a valid, yet duplicate transaction using the `sendTransaction` method, resulting in a `DUPLICATE` status.", - "params": [ - { - "name": "transaction", - "summary": "a valid transaction sent to the network", - "description": "A valid Stellar transaction that was sent to the network successfully.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" - } - ], - "result": { - "name": "sendTransactionResult", - "value": { - "status": "DUPLICATE", - "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - } - }, - { - "name": "Error Transaction", - "description": "Submitting an invalid transaction using the `sendTransaction` method, resulting in an `ERROR` status.", - "params": [ - { - "name": "transaction", - "summary": "an invalid transaction sent to the network", - "description": "An invalid Stellar transaction that was sent to the network, built with an incorrect sequence number.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQMQkfl8sdCYQIOdJB0TyazJ126y2TFRjL8yNHSb4TTsH5Ym6qM6gkTx1ENRZ0PFprVGusMTHISzdPHYJ4njBZAQ=" - } - ], - "result": { - "name": "sendTransactionResult", - "value": { - "errorResultXdr": "AAAAAAAAAGT////7AAAAAA==", - "status": "ERROR", - "hash": "84a5f62bff422581dda019811daed0868a3db41833ad6e90a12f0d7db1be8167", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - } - }, - { - "name": "Try Again Later Transaction", - "description": "Submitting a valid transaction before an account's previously submitted transaction has settled using the `sendTransaction` method, resulting in a `TRY_AGAIN_LATER` status.", - "params": [ - { - "name": "transaction", - "summary": "a valid transaction sent to the network", - "description": "A valid Stellar transaction that was sent to the network successfully.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" - } - ], - "result": { - "name": "sendTransactionResult", - "value": { - "status": "TRY_AGAIN_LATER", - "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - } - } - ] - }, - { - "name": "simulateTransaction", - "summary": "submits a trial contract invocation transaction", - "description": "Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the network.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/simulateTransaction" - }, - "paramStructure": "by-name", - "params": [ - { - "name": "transaction", - "summary": "transaction to be simulated", - "description": "In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type `invokeHostFunction`.", - "required": true, - "schema": { - "title": "transaction", - "description": "A Stellar transaction, serialized as a base64 string", - "type": "string" - } - }, - { - "name": "resourceConfig", - "summary": "configuration for how resources will be calculated", - "description": "Contains configuration for how resources will be calculated when simulating transactions.", - "required": false, - "schema": { - "title": "resourceConfig", - "description": "Configuration for how resources will be calculated.", - "type": "object", - "properties": { - "instructionLeeway": { - "title": "instructionLeeway", - "description": "Allow this many extra instructions when budgeting resources.", - "type": "number" - } - } - } - } - ], - "result": { - "name": "simulateTransactionResult", - "summary": "anticipated affects of the transaction.", - "description": "The response will include the anticipated affects the given transaction will have on the network. Additionally, information needed to build, sign, and actually submit the transaction will be provided.", - "schema": { - "type": "object", - "required": [ - "latestLedger" - ], - "properties": { - "latestLedger": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "type": "number" - }, - "minResourceFee": { - "type": "string", - "description": "(optional) Stringified number - Recommended minimum resource fee to add when submitting the transaction. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar). Not present in case of error." - }, - "cost": { - "type": "object", - "description": "(optional) - Information about instructions used, etc. Not present in case of error.", - "required": [ - "cpuInsns", - "memBytes" - ], - "properties": { - "cpuInsns": { - "type": "string", - "description": "Stringified number - Total cpu instructions consumed by this transaction" - }, - "memBytes": { - "type": "string", - "description": "Stringified number - Total memory bytes allocated by this transaction" - } - } - }, - "results": { - "type": "array", - "description": "(optional) - This array will only have one element: the result for the Host Function invocation. Only present on successful simulation (i.e. no error) of `InvokeHostFunction` operations.", - "items": { - "type": "object", - "required": [ - "xdr", - "auth" - ], - "properties": { - "xdr": { - "type": "string", - "description": "Serialized base64 string - return value of the Host Function call." - }, - "auth": { - "type": "array", - "description": "Array of serialized base64 strings - Per-address authorizations recorded when simulating this Host Function call.", - "items": { - "type": "string" - } - } - } - } - }, - "transactionData": { - "type": "string", - "description": "(optional) Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the simulated transaction. This data contains the refundable fee and resource usage information such as the ledger footprint and IO access data (serialized in a base64 string). Not present in case of error." - }, - "events": { - "type": "array", - "description": "(optional) Array of serialized base64 strings - Array of the events emitted during the contract invocation. The events are ordered by their emission time. (an array of serialized base64 strings). Only present when simulating of `InvokeHostFunction` operations, note that it can be present on error, providing extra context about what failed.", - "items": { - "type": "string" - } - }, - "restorePreamble": { - "type": "object", - "description": "(optional) - It can only be present on successful simulation (i.e. no error) of `InvokeHostFunction` operations. If present, it indicates that the simulation detected archived ledger entries which need to be restored before the submission of the `InvokeHostFunction` operation. The `minResourceFee` and `transactionData` fields should be used to submit a transaction containing a `RestoreFootprint` operation.", - "required": [ - "minResourceFee", - "transactionData" - ], - "properties": { - "minResourceFee": { - "type": "string", - "description": "Stringified number - Recommended minimum resource fee to add when submitting the `RestoreFootprint` operation. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar)." - }, - "transactionData": { - "type": "string", - "description": "Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the `RestoreFootprint` operation." - } - } - }, - "error": { - "type": "string", - "description": "(optional) - This field will include details about why the invoke host function call failed. Only present if the transaction simulation failed." - } - } - } - }, - "examples": [ - { - "name": "Successful Transaction Simulation", - "description": "Transaction simulation that succeeds and returns the necessary information to prepare and submit the transaction.", - "params": [ - { - "name": "transaction", - "summary": "a valid transaction", - "description": "A transaction that will correctly invoke a contract function.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAMAAAAAAAAAAAAAAAA=" - }, - { - "name": "resourceConfig", - "summary": "the default resource configuration", - "description": "The default value for the (optional) resource configuration object for transaction simulation.", - "value": { - "instructionLeeway": 3000000 - } - } - ], - "result": { - "name": "simulateTransactionResult", - "value": { - "transactionData": "AAAAAAAAAAIAAAAGAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAFAAAAAEAAAAHy8vNUZ8vyZ2ybPHW0XbSrRtP7gEWsJ6zDzcfY9P8z88AAAABAAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAEAHfKyAAAFiAAAAIgAAAAAAAAAAw==", - "minResourceFee": "90353", - "events": [ - "AAAAAQAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAABAAAAABAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAM=", - "AAAAAQAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAACWZuX3JldHVybgAAAAAAAA8AAAAJaW5jcmVtZW50AAAAAAAAAwAAAAw=" - ], - "results": [ - { - "auth": [], - "xdr": "AAAAAwAAAAw=" - } - ], - "cost": { - "cpuInsns": "1635562", - "memBytes": "1295756" - }, - "latestLedger": 2552139 - } - } - }, - { - "name": "Failed Transaction Simulation", - "description": "Transaction simulation that fails due to the contract invocation being constructed with an improper number of arguments.", - "params": [ - { - "name": "transaction", - "summary": "an invalid transaction", - "description": "A transaction that attempts to invoke a contract function with the wrong number of arguments.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAA" - }, - { - "name": "resourceConfig", - "summary": "the default resource configuration", - "description": "The default value for the (optional) resource configuration object for transaction simulation.", - "value": { - "instructionLeeway": 3000000 - } - } - ], - "result": { - "name": "simulateTransactionResult", - "value": { - "error": "host invocation failed\n\nCaused by:\n HostError: Error(WasmVm, InternalError)\n \n Event log (newest first):\n 0: [Diagnostic Event] contract:cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b, topics:[error, Error(WasmVm, InternalError)], data:[\"VM call failed: Func(MismatchingParameterLen)\", increment]\n 1: [Diagnostic Event] topics:[fn_call, Bytes(cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b), increment], data:3\n \n Backtrace (newest first):\n 0: soroban_env_host::vm::Vm::invoke_function_raw\n 1: soroban_env_host::host::frame::::with_frame\n 2: soroban_env_host::host::frame::::call_n_internal\n 3: soroban_env_host::host::frame::::invoke_function\n 4: preflight::preflight::preflight_invoke_hf_op\n 5: preflight::preflight_invoke_hf_op::{{closure}}\n 6: core::ops::function::FnOnce::call_once{{vtable.shim}}\n 7: preflight::catch_preflight_panic\n 8: _cgo_0b49d6ed4a0b_Cfunc_preflight_invoke_hf_op\n at tmp/go-build/cgo-gcc-prolog:103:11\n 9: runtime.asmcgocall\n at ./runtime/asm_amd64.s:848\n \n ", - "events": [ - "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAAAMAAAAD", - "AAAAAAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAEAAAAHAAAAEAAAAAEAAAACAAAADgAAAC1WTSBjYWxsIGZhaWxlZDogRnVuYyhNaXNtYXRjaGluZ1BhcmFtZXRlckxlbikAAAAAAAAPAAAACWluY3JlbWVudAAAAA==" - ], - "cost": { - "cpuInsns": "0", - "memBytes": "0" - }, - "latestLedger": 2552013 - } - } - } - ] - } - ], - "components": {} -} \ No newline at end of file diff --git a/openrpc/refs-openrpc.json b/openrpc/refs-openrpc.json deleted file mode 100644 index 41cde0bc..00000000 --- a/openrpc/refs-openrpc.json +++ /dev/null @@ -1,1414 +0,0 @@ -{ - "openrpc": "1.2.4", - "info": { - "title": "Soroban RPC", - "description": "Soroban-RPC allows you to communicate directly with Soroban via a JSON RPC interface.", - "termsOfService": "https://stellar.org/terms-of-service", - "contact": { - "name": "Stellar Development Foundation", - "url": "https://stellar.org/connect", - "email": "hello@stellar.org" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "20.1.0" - }, - "servers": [ - { - "name": "Testnet", - "url": "https://soroban-testnet.stellar.org:443", - "summary": "Publicly available RPC server maintained by SDF, operating on the Testnet test network.", - "description": "Testnet is meant to be a stable network that runs a production (or near-production) version of the Stellar network." - }, - { - "name": "Futurenet", - "url": "https://rpc-futurenet.stellar.org:443", - "summary": "Publicly available RPC server maintained by SDF, operating on the Futurenet test network.", - "description": "Futurenet is meant to be a bleeding-edge, experimental network that runs an early, test version of the Stellar network." - } - ], - "methods": [ - { - "name": "getEvents", - "summary": "returns contract events", - "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getEvents" - }, - "paramStructure": "by-name", - "params": [ - { - "$ref": "#/components/contentDescriptors/StartLedger" - }, - { - "$ref": "#/components/contentDescriptors/EventFilters" - }, - { - "$ref": "#/components/contentDescriptors/Pagination" - } - ], - "result": { - "name": "getEventsResult", - "schema": { - "type": "object", - "properties": { - "latestLedger": { - "$ref": "#/components/schemas/LatestLedger" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Event" - } - } - } - } - }, - "examples": [ - { - "$ref": "#/components/examplePairingObjects/NativeTransferEventsExample" - }, - { - "$ref": "#/components/examplePairingObjects/AnyEventsExample" - } - ] - }, - { - "name": "getHealth", - "summary": "returns node health", - "description": "General node health check.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getHealth" - }, - "paramStructure": "by-name", - "params": [], - "result": { - "name": "getHealthResult", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "\"healthy\"" - } - } - } - }, - "examples": [ - { - "name": "Current node health", - "description": "Example request to the `getHealth` method", - "params": [], - "result": { - "name": "getHealthResult", - "value": { - "status": "healthy" - } - } - } - ] - }, - { - "name": "getLatestLedger", - "summary": "returns latest known ledger", - "description": "For finding out the current latest known ledger of this node. This is a subset of the ledger info from Horizon.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getLatestLedger" - }, - "paramStructure": "by-name", - "params": [], - "result": { - "name": "getLatestLedgerResult", - "schema": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/LedgerHash" - }, - "protocolVersion": { - "$ref": "#/components/schemas/ProtocolVersion" - }, - "sequence": { - "$ref": "#/components/schemas/LatestLedger" - } - } - } - }, - "examples": [ - { - "name": "Details of the Current Ledger", - "description": "Example request to the `getLatestLedger` method.", - "params": [], - "result": { - "name": "getLatestLedgerResult", - "value": { - "id": "c73c5eac58a441d4eb733c35253ae85f783e018f7be5ef974258fed067aabb36", - "protocolVersion": 20, - "sequence": 2539605 - } - } - } - ] - }, - { - "name": "getLedgerEntries", - "summary": "returns ledger entries", - "description": "For reading the current value of ledger entries directly.\n\nAllows you to directly inspect the current state of a contract, a contract's code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or `simulateTransaction`.\n\nTo fetch contract wasm byte-code, use the ContractCode ledger entry key.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getLedgerEntries" - }, - "paramStructure": "by-name", - "params": [ - { - "$ref": "#/components/contentDescriptors/LedgerKeys" - } - ], - "result": { - "name": "getLedgerEntriesResult", - "schema": { - "type": "object", - "properties": { - "latestLedger": { - "$ref": "#/components/schemas/LatestLedger" - }, - "entries": { - "type": "array", - "description": "Array of objects containing all found ledger entries", - "items": { - "$ref": "#/components/schemas/LedgerEntry" - } - } - }, - "required": [ - "latestLedger" - ] - } - }, - "examples": [ - { - "$ref": "#/components/examplePairingObjects/CounterLedgerEntryExample" - }, - { - "$ref": "#/components/examplePairingObjects/ContractBalanceLedgerEntryExample" - }, - { - "$ref": "#/components/examplePairingObjects/CombinedLedgerEntryExample" - } - ] - }, - { - "name": "getNetwork", - "summary": "returns network config", - "description": "General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getNetwork" - }, - "paramStructure": "by-name", - "params": [], - "result": { - "name": "getNetworkResult", - "schema": { - "type": "object", - "properties": { - "passphrase": { - "$ref": "#/components/schemas/NetworkPassphrase" - }, - "protocolVersion": { - "$ref": "#/components/schemas/ProtocolVersion" - }, - "friendbotUrl": { - "type": "string", - "description": "(optional) The URL of this network's \"friendbot\" faucet" - } - }, - "required": [ - "passphrase", - "protocolVersion" - ] - } - }, - "examples": [ - { - "$ref": "#/components/examplePairingObjects/TestnetNetworkConfig" - }, - { - "$ref": "#/components/examplePairingObjects/FuturenetNetworkConfig" - } - ] - }, - { - "name": "getTransaction", - "summary": "returns transaction details", - "description": "The getTransaction method provides details about the specified transaction. Clients are expected to periodically query this method to ascertain when a transaction has been successfully recorded on the blockchain. The soroban-rpc system maintains a restricted history of recently processed transactions, with the default retention window set at 1440 ledgers, approximately equivalent to a 2-hour timeframe. For private soroban-rpc instances, it is possible to modify the retention window value by adjusting the transaction-retention-window configuration setting. For comprehensive debugging needs that extend beyond the 2-hour timeframe, it is advisable to retrieve transaction information from Horizon, as it provides a lasting and persistent record.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/getTransaction" - }, - "paramStructure": "by-name", - "params": [ - { - "$ref": "#/components/contentDescriptors/TransactionHash" - } - ], - "result": { - "name": "getTransactionResult", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "The current status of the transaction by hash", - "enum": [ - "SUCCESS", - "NOT_FOUND", - "FAILED" - ] - }, - "latestLedger": { - "$ref": "#/components/schemas/LatestLedger" - }, - "latestLedgerCloseTime": { - "$ref": "#/components/schemas/LatestLedgerCloseTime" - }, - "oldestLedger": { - "$ref": "#/components/schemas/OldestLedger" - }, - "oldestLedgerCloseTime": { - "$ref": "#/components/schemas/OldestLedgerCloseTime" - }, - "ledger": { - "title": "ledger", - "description": "(optional) The sequence number of the ledger which included the transaction. This field is only present if `status` is `SUCCESS` or `FAILED`.", - "$ref": "#/components/schemas/LedgerSequence" - }, - "createdAt": { - "title": "createdAt", - "description": "(optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`.", - "$ref": "#/components/schemas/LedgerCloseTime" - }, - "applicationOrder": { - "type": "number", - "description": "(optional) The index of the transaction among all transactions included in the ledger. This field is only present if `status` is `SUCCESS` or `FAILED`." - }, - "feeBump": { - "type": "boolean", - "description": "(optional) Indicates whether the transaction was fee bumped. This field is only present if `status` is `SUCCESS` or `FAILED`." - }, - "envelopeXdr": { - "type": "string", - "description": "(optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction." - }, - "resultXdr": { - "type": "string", - "description": "(optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if `status` is `SUCCESS` or `FAILED`." - }, - "resultMetaXdr": { - "type": "string", - "description": "(optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction." - } - }, - "required": [ - "status", - "latestLedger", - "latestLedgerCloseTime", - "oldestLedger", - "oldestLedgerCloseTime" - ] - } - }, - "examples": [ - { - "$ref": "#/components/examplePairingObjects/SuccessfulTransaction" - }, - { - "$ref": "#/components/examplePairingObjects/NotFoundTransaction" - }, - { - "$ref": "#/components/examplePairingObjects/FailedTransaction" - } - ] - }, - { - "name": "sendTransaction", - "summary": "submits a transaction", - "description": "Submit a real transaction to the Stellar network. This is the only way to make changes on-chain.\n\n Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call `getTransaction` to learn about transaction success/failure.\n\nThis supports all transactions, not only smart contract-related transactions.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/sendTransaction" - }, - "paramStructure": "by-name", - "params": [ - { - "$ref": "#/components/contentDescriptors/SignedTransaction" - } - ], - "result": { - "name": "sendTransactionResult", - "summary": "Transaction status and network state.", - "description": "Transaction status and network state. The result will include if the transaction was successfully enqueued, and information about the current ledger.", - "schema": { - "type": "object", - "properties": { - "hash": { - "$ref": "#/components/schemas/TransactionHash" - }, - "status": { - "type": "string", - "description": "The current status of the transaction by hash.", - "enum": [ - "PENDING", - "DUPLICATE", - "TRY_AGAIN_LATER", - "ERROR" - ] - }, - "latestLedger": { - "$ref": "#/components/schemas/LatestLedger" - }, - "latestLedgerCloseTime": { - "$ref": "#/components/schemas/LatestLedgerCloseTime" - }, - "errorResultXdr": { - "type": "string", - "description": "(optional) If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.", - "contentEncoding": "base64" - } - }, - "required": [ - "hash", - "status", - "latestLedger", - "latestLedgerCloseTime" - ] - } - }, - "examples": [ - { - "$ref": "#/components/examplePairingObjects/PendingTransaction" - }, - { - "$ref": "#/components/examplePairingObjects/DuplicateTransaction" - }, - { - "$ref": "#/components/examplePairingObjects/ErrorTransaction" - }, - { - "$ref": "#/components/examplePairingObjects/TryAgainLaterTransaction" - } - ] - }, - { - "name": "simulateTransaction", - "summary": "submits a trial contract invocation transaction", - "description": "Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the network.", - "externalDocs": { - "url": "https://soroban.stellar.org/api/methods/simulateTransaction" - }, - "paramStructure": "by-name", - "params": [ - { - "$ref": "#/components/contentDescriptors/UnsignedTransaction" - }, - { - "$ref": "#/components/contentDescriptors/ResourceConfig" - } - ], - "result": { - "name": "simulateTransactionResult", - "summary": "anticipated affects of the transaction.", - "description": "The response will include the anticipated affects the given transaction will have on the network. Additionally, information needed to build, sign, and actually submit the transaction will be provided.", - "schema": { - "type": "object", - "properties": { - "latestLedger": { - "$ref": "#/components/schemas/LatestLedger" - }, - "minResourceFee": { - "type": "string", - "description": "(optional) Stringified number - Recommended minimum resource fee to add when submitting the transaction. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar). Not present in case of error." - }, - "cost": { - "type": "object", - "description": "(optional) - Information about instructions used, etc. Not present in case of error.", - "properties": { - "cpuInsns": { - "type": "string", - "description": "Stringified number - Total cpu instructions consumed by this transaction" - }, - "memBytes": { - "type": "string", - "description": "Stringified number - Total memory bytes allocated by this transaction" - } - }, - "required": [ - "cpuInsns", - "memBytes" - ] - }, - "results": { - "type": "array", - "description": "(optional) - This array will only have one element: the result for the Host Function invocation. Only present on successful simulation (i.e. no error) of `InvokeHostFunction` operations.", - "items": { - "type": "object", - "properties": { - "xdr": { - "type": "string", - "description": "Serialized base64 string - return value of the Host Function call." - }, - "auth": { - "type": "array", - "description": "Array of serialized base64 strings - Per-address authorizations recorded when simulating this Host Function call.", - "items": { - "type": "string" - } - } - }, - "required": [ - "xdr", - "auth" - ] - } - }, - "transactionData": { - "type": "string", - "description": "(optional) Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the simulated transaction. This data contains the refundable fee and resource usage information such as the ledger footprint and IO access data (serialized in a base64 string). Not present in case of error." - }, - "events": { - "type": "array", - "description": "(optional) Array of serialized base64 strings - Array of the events emitted during the contract invocation. The events are ordered by their emission time. (an array of serialized base64 strings). Only present when simulating of `InvokeHostFunction` operations, note that it can be present on error, providing extra context about what failed.", - "items": { - "type": "string" - } - }, - "restorePreamble": { - "type": "object", - "description": "(optional) - It can only be present on successful simulation (i.e. no error) of `InvokeHostFunction` operations. If present, it indicates that the simulation detected archived ledger entries which need to be restored before the submission of the `InvokeHostFunction` operation. The `minResourceFee` and `transactionData` fields should be used to submit a transaction containing a `RestoreFootprint` operation.", - "properties": { - "minResourceFee": { - "type": "string", - "description": "Stringified number - Recommended minimum resource fee to add when submitting the `RestoreFootprint` operation. This fee is to be added on top of the [Stellar network fee](https://developers.stellar.org/docs/encyclopedia/fees-surge-pricing-fee-strategies#network-fees-on-stellar)." - }, - "transactionData": { - "type": "string", - "description": "Serialized base64 string - The recommended Soroban Transaction Data to use when submitting the `RestoreFootprint` operation." - } - }, - "required": [ - "minResourceFee", - "transactionData" - ] - }, - "error": { - "type": "string", - "description": "(optional) - This field will include details about why the invoke host function call failed. Only present if the transaction simulation failed." - } - }, - "required": [ - "latestLedger" - ] - } - }, - "examples": [ - { - "$ref": "#/components/examplePairingObjects/SuccessfulTransactionSimulation" - }, - { - "$ref": "#/components/examplePairingObjects/FailedTransactionSimulation" - } - ] - } - ], - "components": { - "contentDescriptors": { - "EventFilters": { - "name": "filters", - "summary": "filters to narrow events search", - "description": "List of filters for the returned events. Events matching any of the filters are included. To match a filter, an event must match both a contractId and a topic. Maximum 5 filters are allowed per request.", - "schema": { - "$ref": "#/components/schemas/EventFilters" - } - }, - "LedgerKeys": { - "name": "keys", - "summary": "array of ledger keys", - "description": "Array containing the keys of the ledger entries you wish to retrieve. (an array of serialized base64 strings)", - "required": true, - "schema": { - "$ref": "#/components/schemas/LedgerKeys" - } - }, - "Pagination": { - "name": "pagination", - "summary": "pagination options", - "description": "Pagination in soroban-rpc is similar to pagination in Horizon. See [Pagination](https://soroban.stellar.org/api/pagination).", - "required": false, - "schema": { - "$ref": "#/components/schemas/Pagination" - } - }, - "ResourceConfig": { - "name": "resourceConfig", - "summary": "configuration for how resources will be calculated", - "description": "Contains configuration for how resources will be calculated when simulating transactions.", - "required": false, - "schema": { - "$ref": "#/components/schemas/ResourceConfig" - } - }, - "StartLedger": { - "name": "startLedger", - "summary": "ledger to begin searching from", - "description": "Ledger sequence number to fetch events after (inclusive). This method will return an error if `startLedger` is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, `startLedger` must be omitted.", - "required": true, - "schema": { - "$ref": "#/components/schemas/LedgerSequence" - } - }, - "SignedTransaction": { - "name": "transaction", - "summary": "transaction to be submitted to the network", - "description": "The signed transaction to broadcast for inclusion in a ledger.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Transaction" - } - }, - "UnsignedTransaction": { - "name": "transaction", - "summary": "transaction to be simulated", - "description": "In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type `invokeHostFunction`.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Transaction" - } - }, - "TransactionHash": { - "name": "hash", - "summary": "transaction hash to query", - "description": "Transaction hash to query as a hex-encoded string. This transaction hash should correspond to transaction that has been previously submitted to the network.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TransactionHash" - } - } - }, - "schemas": { - "ContractId": { - "title": "contractId", - "description": "A StrKey representation of a contract address (`C...`). ([SEP-23](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0023.md#specification)).", - "type": "string" - }, - "ContractIds": { - "title": "contractIds", - "type": "array", - "description": "List of contract IDs to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.", - "maxItems": 5, - "items": { - "$ref": "#/components/schemas/ContractId" - } - }, - "Event": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/EventType" - }, - "ledger": { - "description": "Sequence number of the ledger in which this event was emitted.", - "$ref": "#/components/schemas/LedgerSequence" - }, - "ledgerClosedAt": { - "type": "string", - "description": "[ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp of the ledger closing time" - }, - "contractId": { - "description": "StrKey representation of the contract address that emitted this event.", - "$ref": "#/components/schemas/ContractId" - }, - "id": { - "$ref": "#/components/schemas/EventId" - }, - "pagingToken": { - "description": "Duplicate of `id` field, but in the standard place for pagination tokens.", - "$ref": "#/components/schemas/EventId" - }, - "inSuccessfulContractCall": { - "description": "If true the event was emitted during a successful contract call.", - "type": "boolean" - }, - "topic": { - "type": "array", - "description": "List containing the topic this event was emitted with.", - "$ref": "#/components/schemas/TopicFilter" - }, - "value": { - "$ref": "#/components/schemas/EventValue" - } - } - }, - "EventType": { - "title": "type", - "description": "The type of event emission.", - "type": "string", - "enum": [ - "contract", - "diagnostic", - "system" - ] - }, - "EventId": { - "description": "Unique identifier for this event.\n\n- The event's unique id field is based on a [`toid` from Horizon](https://github.com/stellar/go/blob/master/toid/main.go) as used in Horizon's /effects endpoint.\n\n- https://github.com/stellar/go/blob/master/services/horizon/internal/db2/history/effect.go#L58\n\n- Specifically, it is a string containing:\n\n- bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation.\n\n- For example: `1234-1`", - "type": "string" - }, - "EventXdr": { - "description": "The emitted body value of the event (serialized in a base64 string).", - "type": "string" - }, - "EventValue": { - "description": "The data the event was broadcasting in the emitted event.", - "type": "object", - "properties": { - "xdr": { - "$ref": "#/components/schemas/EventXdr" - } - } - }, - "EventFilters": { - "type": "array", - "maxItems": 5, - "items": { - "$ref": "#/components/schemas/EventFilter" - } - }, - "EventFilter": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/EventFilterType" - }, - "contractIds": { - "$ref": "#/components/schemas/ContractIds" - }, - "topics": { - "$ref": "#/components/schemas/TopicFilters" - } - }, - "required": [] - }, - "EventFilterType": { - "title": "type", - "type": "string", - "description": "A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included." - }, - "TopicFilters": { - "title": "topics", - "type": "array", - "description": "List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.", - "maxItems": 5, - "items": { - "$ref": "#/components/schemas/TopicFilter" - } - }, - "SegmentMatcher": { - "title": "SegmentMatcher", - "type": "string", - "description": "A `SegmentMatcher` is one of the following:\n\n- For an exact segment match, a string containing a base64-encoded ScVal\n\n- For a wildcard single-segment match, the string \"*\", matches exactly one segment." - }, - "TopicFilter": { - "type": "array", - "description": "A `TopicFilter` is `SegmentMatcher[]`\n\n- The list can be 1-4 `SegmentMatchers` long.", - "minItems": 1, - "maxItems": 4, - "items": { - "$ref": "#/components/schemas/SegmentMatcher" - } - }, - "Hash": { - "title": "hash", - "type": "string", - "minLength": 64, - "maxLength": 64, - "pattern": "^[a-f\\d]{64}$" - }, - "TransactionHash": { - "title": "hash", - "description": "Transaction hash (as a hex-encoded string)", - "$ref": "#/components/schemas/Hash" - }, - "LedgerHash": { - "title": "id", - "description": "Hash identifier of the latest ledger (as a hex-encoded string) known to Soroban RPC at the time it handled the request.", - "$ref": "#/components/schemas/Hash" - }, - "LedgerCloseTime": { - "title": "ledgerCloseTime", - "description": "The unix timestamp of the close time of the ledger.", - "type": "string" - }, - "LatestLedgerCloseTime": { - "title": "latestLedgerCloseTime", - "description": "The unix timestamp of the close time of the latest ledger known to Soroban RPC at the time it handled the request.", - "$ref": "#/components/schemas/LedgerCloseTime" - }, - "OldestLedgerCloseTime": { - "title": "oldestLedgerCloseTime", - "description": "The unix timestamp of the close time of the oldest ledger ingested by Soroban RPC at the time it handled the request.", - "$ref": "#/components/schemas/LedgerCloseTime" - }, - "LedgerKey": { - "type": "string", - "description": "Ledger key, serialized as a base64 string, corresponding to an existing ledger entry you wish to retrieve." - }, - "LedgerKeys": { - "description": "Array containing ledger keys.", - "type": "array", - "items": { - "$ref": "#/components/schemas/LedgerKey" - } - }, - "LedgerEntry": { - "type": "object", - "description": "Object containing information about an existing ledger entry.", - "properties": { - "key": { - "type": "string", - "description": "The key of the ledger entry (serialized in a base64 string)." - }, - "xdr": { - "type": "string", - "description": "The current value of the given ledger entry (serialized in a base64 string)." - }, - "lastModifiedLedgerSeq": { - "description": "The ledger sequence number of the last time this entry was updated.", - "$ref": "#/components/schemas/LedgerSequence" - }, - "liveUntilLedgerSeq": { - "$ref": "#/components/schemas/LedgerSequence" - } - } - }, - "LedgerSequence": { - "title": "ledgerSequence", - "description": "Sequence number of the ledger.", - "type": "number" - }, - "LatestLedger": { - "title": "latestLedger", - "description": "The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.", - "$ref": "#/components/schemas/LedgerSequence" - }, - "OldestLedger": { - "title": "oldestLedger", - "description": "The sequence number of the oldest ledger ingested by Soroban RPC at the time it handled the request.", - "$ref": "#/components/schemas/LedgerSequence" - }, - "ProtocolVersion": { - "title": "protocolVersion", - "description": "Stellar Core protocol version associated with the latest ledger.", - "type": "number" - }, - "NetworkPassphrase": { - "title": "networkPassphrase", - "description": "Network passphrase configured for this Soroban RPC node.", - "type": "string" - }, - "Pagination": { - "type": "object", - "properties": { - "cursor": { - "type": "string", - "description": "A string ID that points to a specific location in a collection of responses and is pulled from the `paging_token` value of a record. When a cursor is provided Soroban-RPC will _not_ include the element whose id matches the cursor in the response. Only elements which appear _after_ the cursor are included." - }, - "limit": { - "type": "number", - "description": "The maximum number of records returned. The limit for [getEvents](https://soroban.stellar.org/api/getEvents) can range from 1 to 10000 - an upper limit that is hardcoded in Soroban-RPC for performance reasons. If this argument isn't designated, it defaults to 100." - } - }, - "required": [] - }, - "ResourceConfig": { - "title": "resourceConfig", - "description": "Configuration for how resources will be calculated.", - "type": "object", - "properties": { - "instructionLeeway": { - "title": "instructionLeeway", - "description": "Allow this many extra instructions when budgeting resources.", - "type": "number" - } - } - }, - "Transaction": { - "title": "transaction", - "description": "A Stellar transaction, serialized as a base64 string", - "type": "string" - } - }, - "examples": { - "StartLedger": { - "name": "startLedger", - "value": 2530000 - }, - "NativeTransfersFilter": { - "name": "filters", - "value": [ - { - "type": "contract", - "contractIds": [ - "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC" - ], - "topics": [ - [ - "AAAADwAAAAh0cmFuc2Zlcg==", - "*", - "*", - "*" - ] - ] - } - ] - }, - "EmptyFilters": { - "name": "filters", - "value": [] - }, - "PaginationLimitTwo": { - "name": "pagination", - "value": { - "limit": 2 - } - }, - "TwoNativeTransferEvents": { - "name": "getEventsResult", - "value": { - "events": [ - { - "type": "contract", - "ledger": 2531021, - "ledgerClosedAt": "2023-11-15T08:58:25Z", - "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", - "id": "0010870652420501504-0000000004", - "pagingToken": "0010870652420501504-0000000004", - "topic": [ - "AAAADwAAAAh0cmFuc2Zlcg==", - "AAAAEgAAAAAAAAAAjt5DlR5mhneFx/1Lct0ToW555OFzg/Y28++28cJXU+I=", - "AAAAEgAAAAAAAAAA33Fu/fnobL8/u8tyLCIZzpMXbsRWRBlfAuEv7fBvTwM=", - "AAAADgAAAAZuYXRpdmUAAA==" - ], - "value": { - "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" - }, - "inSuccessfulContractCall": true - }, - { - "type": "contract", - "ledger": 2531273, - "ledgerClosedAt": "2023-11-15T09:20:38Z", - "contractId": "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", - "id": "0010871734752280576-0000000004", - "pagingToken": "0010871734752280576-0000000004", - "topic": [ - "AAAADwAAAAh0cmFuc2Zlcg==", - "AAAAEgAAAAAAAAAA+YQ+FM83vUUwQ6P3gKCMVTyC3/jO+DERXTWJDKEjagU=", - "AAAAEgAAAAAAAAAAwl0UMLLKYqMEedoowz8VnwbRywjcKEeQegoMmU6C9/0=", - "AAAADgAAAAZuYXRpdmUAAA==" - ], - "value": { - "xdr": "AAAACgAAAAAAAAAAAAAAAAAAAJY=" - }, - "inSuccessfulContractCall": true - } - ], - "latestLedger": 2539388 - } - }, - "AnyTwoEvents": { - "name": "getEventsResult", - "value": { - "events": [ - { - "type": "diagnostic", - "ledger": 2530001, - "ledgerClosedAt": "2023-11-15T07:29:05Z", - "contractId": "", - "id": "0010866271553875968-0000000000", - "pagingToken": "0010866271553875968-0000000000", - "topic": [ - "AAAADwAAAAdmbl9jYWxsAA==", - "AAAADQAAACCGE7Aj5EvXxmmTtyojmlFF/Qv3qMTyL7THd6SG4GHZxQ==", - "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" - ], - "value": { - "xdr": "AAAAEAAAAAEAAAACAAAADwAAAAN1c2QAAAAACQAAAAAAAAAAAAAAAAASHQg=" - }, - "inSuccessfulContractCall": true - }, - { - "type": "diagnostic", - "ledger": 2530001, - "ledgerClosedAt": "2023-11-15T07:29:05Z", - "contractId": "CCDBHMBD4RF5PRTJSO3SUI42KFC72C7XVDCPEL5UY532JBXAMHM4KOQ3", - "id": "0010866271553875968-0000000001", - "pagingToken": "0010866271553875968-0000000001", - "topic": [ - "AAAADwAAAAlmbl9yZXR1cm4AAAA=", - "AAAADwAAABFzZXRfY3VycmVuY3lfcmF0ZQAAAA==" - ], - "value": { - "xdr": "AAAAAQ==" - }, - "inSuccessfulContractCall": true - } - ], - "latestLedger": 2539529 - } - }, - "LedgerKeyCounterAddress": { - "name": "keys", - "summary": "ledger key for an address' counter entry", - "description": "A ledger key that will request a ledger entry defined using a tuple variant enum in a contract: `Counter(Address)`", - "value": [ - "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=" - ] - }, - "LedgerEntryCounterAddressResult": { - "name": "getLedgerEntriesResult", - "value": { - "entries": [ - { - "key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC", - "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", - "lastModifiedLedgerSeq": 2552504 - } - ], - "latestLedger": 2552990 - } - }, - "LedgerKeyContractBalance": { - "name": "keys", - "summary": "ledger key for a contract's native XLM balance", - "description": "A ledger key that will request a ledger entry corresponding to a contract's balance on the native XLM Stellar Asset Contract.", - "value": [ - "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" - ] - }, - "LedgerEntryContractBalanceResult": { - "name": "getLedgerEntriesResult", - "value": { - "entries": [ - { - "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", - "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", - "lastModifiedLedgerSeq": 2553612 - } - ], - "latestLedger": 2553713 - } - }, - "CombinedLedgerKeys": { - "name": "keys", - "summary": "ledger keys for multiple ledger entries", - "description": "Two ledger keys: One for a counter entry, and one for a contract's native XLM balance.", - "value": [ - "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", - "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==" - ] - }, - "CombinedLedgerEntryResult": { - "name": "getLedgerEntriesResult", - "value": { - "entries": [ - { - "key": "AAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAE=", - "xdr": "AAAABgAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAAB0JhbGFuY2UAAAAAEgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAAAEAAAARAAAAAQAAAAMAAAAPAAAABmFtb3VudAAAAAAACgAAAAAAAAAAAAAAAB3NZQAAAAAPAAAACmF1dGhvcml6ZWQAAAAAAAAAAAABAAAADwAAAAhjbGF3YmFjawAAAAAAAAAA", - "lastModifiedLedgerSeq": 2553612 - }, - { - "key": "AAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABAAAAABAAAAAgAAAA8AAAAHQmFsYW5jZQAAAAASAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAAQ==", - "xdr": "AAAABgAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAQAAAAAQAAAAIAAAAPAAAAB0NvdW50ZXIAAAAAEgAAAAAAAAAAIOHWwMbBgBiAnwRt4k9nChmEOoSuLCVs2eqK9Qub+hgAAAABAAAAAwAAAAw=", - "lastModifiedLedgerSeq": 2552504 - } - ], - "latestLedger": 2553767 - } - }, - "ValidContractTransaction": { - "name": "transaction", - "summary": "a valid transaction", - "description": "A transaction that will correctly invoke a contract function.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAMAAAAAAAAAAAAAAAA=" - }, - "SuccessfulSimulationResult": { - "name": "simulateTransactionResult", - "value": { - "transactionData": "AAAAAAAAAAIAAAAGAAAAAcwD/nT9D7Dc2LxRdab+2vEUF8B+XoN7mQW21oxPT8ALAAAAFAAAAAEAAAAHy8vNUZ8vyZ2ybPHW0XbSrRtP7gEWsJ6zDzcfY9P8z88AAAABAAAABgAAAAHMA/50/Q+w3Ni8UXWm/trxFBfAfl6De5kFttaMT0/ACwAAABAAAAABAAAAAgAAAA8AAAAHQ291bnRlcgAAAAASAAAAAAAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAAEAHfKyAAAFiAAAAIgAAAAAAAAAAw==", - "minResourceFee": "90353", - "events": [ - "AAAAAQAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAABAAAAABAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAM=", - "AAAAAQAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAACWZuX3JldHVybgAAAAAAAA8AAAAJaW5jcmVtZW50AAAAAAAAAwAAAAw=" - ], - "results": [ - { - "auth": [], - "xdr": "AAAAAwAAAAw=" - } - ], - "cost": { - "cpuInsns": "1635562", - "memBytes": "1295756" - }, - "latestLedger": 2552139 - } - }, - "InvalidContractTransaction": { - "name": "transaction", - "summary": "an invalid transaction", - "description": "A transaction that attempts to invoke a contract function with the wrong number of arguments.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAA" - }, - "FailedSimulationResult": { - "name": "simulateTransactionResult", - "value": { - "error": "host invocation failed\n\nCaused by:\n HostError: Error(WasmVm, InternalError)\n \n Event log (newest first):\n 0: [Diagnostic Event] contract:cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b, topics:[error, Error(WasmVm, InternalError)], data:[\"VM call failed: Func(MismatchingParameterLen)\", increment]\n 1: [Diagnostic Event] topics:[fn_call, Bytes(cc03fe74fd0fb0dcd8bc5175a6fedaf11417c07e5e837b9905b6d68c4f4fc00b), increment], data:3\n \n Backtrace (newest first):\n 0: soroban_env_host::vm::Vm::invoke_function_raw\n 1: soroban_env_host::host::frame::::with_frame\n 2: soroban_env_host::host::frame::::call_n_internal\n 3: soroban_env_host::host::frame::::invoke_function\n 4: preflight::preflight::preflight_invoke_hf_op\n 5: preflight::preflight_invoke_hf_op::{{closure}}\n 6: core::ops::function::FnOnce::call_once{{vtable.shim}}\n 7: preflight::catch_preflight_panic\n 8: _cgo_0b49d6ed4a0b_Cfunc_preflight_invoke_hf_op\n at tmp/go-build/cgo-gcc-prolog:103:11\n 9: runtime.asmcgocall\n at ./runtime/asm_amd64.s:848\n \n ", - "events": [ - "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAPAAAACWluY3JlbWVudAAAAAAAAAMAAAAD", - "AAAAAAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAEAAAAHAAAAEAAAAAEAAAACAAAADgAAAC1WTSBjYWxsIGZhaWxlZDogRnVuYyhNaXNtYXRjaGluZ1BhcmFtZXRlckxlbikAAAAAAAAPAAAACWluY3JlbWVudAAAAA==" - ], - "cost": { - "cpuInsns": "0", - "memBytes": "0" - }, - "latestLedger": 2552013 - } - }, - "DefaultResourceConfig": { - "name": "resourceConfig", - "summary": "the default resource configuration", - "description": "The default value for the (optional) resource configuration object for transaction simulation.", - "value": { - "instructionLeeway": 3000000 - } - }, - "RecentTransactionHash": { - "name": "hash", - "summary": "a recent transaction hash", - "description": "Transaction hash that hit the network recently enough to still be visible through the RPC node.", - "value": "6bc97bddc21811c626839baf4ab574f4f9f7ddbebb44d286ae504396d4e752da" - }, - "TooOldTransactionHash": { - "name": "hash", - "summary": "an old transaction hash", - "description": "Transaction has that is old enough for the RPC node to have forgotten about it.", - "value": "85f7aa8bfda425b98c0e53ffe56796ffd8865ec2fcc3ad71abf120801e2a14e5" - }, - "FailedTransactionHash": { - "name": "hash", - "summary": "a failed transaction hash", - "description": "Transaction hash that failed to be accepted into a ledger.", - "value": "2e4c699cbcb8ee83fffb857c9579bcc91f73f0df2a0444292f66e37563785929" - }, - "SuccessTransactionResult": { - "name": "getTransactionResult", - "value": { - "status": "SUCCESS", - "latestLedger": 2540076, - "latestLedgerCloseTime": "1700086333", - "oldestLedger": 2538637, - "oldestLedgerCloseTime": "1700078796", - "applicationOrder": 1, - "envelopeXdr": "AAAAAgAAAADGFY14/R1KD0VGtTbi5Yp4d7LuMW0iQbLM/AUiGKj5owCpsoQAJY3OAAAjqgAAAAEAAAAAAAAAAAA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AAAAPAAAADGNvcmVfbWV0cmljcwAAAA8AAAAQbWF4X3J3X2NvZGVfYnl0ZQAAAAUAAAAAAACBgAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAA8AAAAMY29yZV9tZXRyaWNzAAAADwAAABNtYXhfZW1pdF9ldmVudF9ieXRlAAAAAAUAAAAAAAAAAA==", - "ledger": 2540064, - "createdAt": "1700086268" - } - }, - "NotFoundTransactionResult": { - "name": "getTransactionResult", - "value": { - "status": "NOT_FOUND", - "latestLedger": 2540099, - "latestLedgerCloseTime": "1700086455", - "oldestLedger": 2538660, - "oldestLedgerCloseTime": "1700078913" - } - }, - "FailedTransactionResult": { - "name": "getTransactionResult", - "value": { - "status": "FAILED", - "latestLedger": 2540124, - "latestLedgerCloseTime": "1700086588", - "oldestLedger": 2538685, - "oldestLedgerCloseTime": "1700079044", - "applicationOrder": 2, - "envelopeXdr": "AAAAAgAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAAG4AFyJfAABKvgAAAAIAAAAAAAAAAQAmwlEAJsK1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAE/fr1kk7lqP0srDPW4JExF1MWmpsG49FsRE3b0vMCmzAAAAAUVVUlMAAAAArPm4/+q9j4dl178h2JjrqjgRXnQ1WiGkyVy+nv3nGkEAAAAAAVjZQAAAAAAAAAABy786aQAAAEDybJBtG7V5NrRFpoboRUN/5ecys5wSUgag3CnTtWLmq3JDOxrEjK9noAnu/F5O0E8iXuVzX9BxZSO9JZ+Tw6kK", - "resultXdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+gAAAAA=", - "resultMetaXdr": "AAAAAwAAAAAAAAACAAAAAwAmwlIAAAAAAAAAAFm/J+WxnkW6a1J1L63T9idZYwvdhZ3NfUEaT9DLvzppAAAAF0g7NXsAFyJfAABKvQAAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAACbCSwAAAABlVULiAAAAAAAAAAEAJsJSAAAAAAAAAABZvyflsZ5FumtSdS+t0/YnWWML3YWdzX1BGk/Qy786aQAAABdIOzV7ABciXwAASr4AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAmwlIAAAAAZVVDBwAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "ledger": 2540114, - "createdAt": "1700086535" - } - }, - "ValidSentTransaction": { - "name": "transaction", - "summary": "a valid transaction sent to the network", - "description": "A valid Stellar transaction that was sent to the network successfully.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQATr6Ghp/DNO7S6JjEFwcJ9a+dvI6NJr7I/2eQttvoovjQ8te4zKKaapC3mbmx6ld6YKL5T81mxs45TjzdG5zw0=" - }, - "InvalidSentTransaction": { - "name": "transaction", - "summary": "an invalid transaction sent to the network", - "description": "An invalid Stellar transaction that was sent to the network, built with an incorrect sequence number.", - "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAVIZWxsbwAAAAAAAAEAAAAMU29yb2JhbiBEb2NzAAAAAAAAAAELm/oYAAAAQMQkfl8sdCYQIOdJB0TyazJ126y2TFRjL8yNHSb4TTsH5Ym6qM6gkTx1ENRZ0PFprVGusMTHISzdPHYJ4njBZAQ=" - }, - "PendingTransactionResult": { - "name": "sendTransactionResult", - "value": { - "status": "PENDING", - "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - }, - "DuplicateTransactionResult": { - "name": "sendTransactionResult", - "value": { - "status": "DUPLICATE", - "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - }, - "ErrorTransactionResult": { - "name": "sendTransactionResult", - "value": { - "errorResultXdr": "AAAAAAAAAGT////7AAAAAA==", - "status": "ERROR", - "hash": "84a5f62bff422581dda019811daed0868a3db41833ad6e90a12f0d7db1be8167", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - }, - "TryAgainLaterTransactionResult": { - "name": "sendTransactionResult", - "value": { - "status": "TRY_AGAIN_LATER", - "hash": "d8ec9b68780314ffdfdfc2194b1b35dd27d7303c3bceaef6447e31631a1419dc", - "latestLedger": 2553978, - "latestLedgerCloseTime": "1700159337" - } - } - }, - "examplePairingObjects": { - "NativeTransferEventsExample": { - "name": "Native XLM Transfer Events", - "description": "Example request to the `getEvents` method, filtering for `transfer` events for native Lumens, and limiting the number of returned events to 2.", - "params": [ - { - "$ref": "#/components/examples/StartLedger" - }, - { - "$ref": "#/components/examples/NativeTransfersFilter" - }, - { - "$ref": "#/components/examples/PaginationLimitTwo" - } - ], - "result": { - "$ref": "#/components/examples/TwoNativeTransferEvents" - } - }, - "AnyEventsExample": { - "name": "All Events", - "description": "Example request to the `getEvents` method, filtering for all events of all types for any and all contracts.", - "params": [ - { - "$ref": "#/components/examples/StartLedger" - }, - { - "$ref": "#/components/examples/PaginationLimitTwo" - } - ], - "result": { - "$ref": "#/components/examples/AnyTwoEvents" - } - }, - "SuccessfulTransaction": { - "name": "Successful Transaction", - "description": "Query for a transaction hash that returns `SUCCESS` from the RPC node.", - "params": [ - { - "$ref": "#/components/examples/RecentTransactionHash" - } - ], - "result": { - "$ref": "#/components/examples/SuccessTransactionResult" - } - }, - "NotFoundTransaction": { - "name": "Not Found Transaction", - "description": "Query for a transaction hash that returns `NOT_FOUND` from the RPC node.", - "params": [ - { - "$ref": "#/components/examples/TooOldTransactionHash" - } - ], - "result": { - "$ref": "#/components/examples/NotFoundTransactionResult" - } - }, - "FailedTransaction": { - "name": "Failed Transaction", - "description": "Query for a transaction hash that returns `FAILED` from the RPC node.", - "params": [ - { - "$ref": "#/components/examples/FailedTransactionHash" - } - ], - "result": { - "$ref": "#/components/examples/FailedTransactionResult" - } - }, - "CounterLedgerEntryExample": { - "name": "Retrieve a Contract's Counter Entry for an Address", - "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry.", - "params": [ - { - "$ref": "#/components/examples/LedgerKeyCounterAddress" - } - ], - "result": { - "$ref": "#/components/examples/LedgerEntryCounterAddressResult" - } - }, - "ContractBalanceLedgerEntryExample": { - "name": "Retrieve a Token's Balance Entry for Contract", - "description": "Example request to the `getNetwork` method for a SAC balance ledger entry belonging to a contract.", - "params": [ - { - "$ref": "#/components/examples/LedgerKeyContractBalance" - } - ], - "result": { - "$ref": "#/components/examples/LedgerEntryContractBalanceResult" - } - }, - "CombinedLedgerEntryExample": { - "name": "Retrieve Multiple Ledger Entries from Different Contracts.", - "description": "Example request to the `getNetwork` method for a `Counter(Address)` ledger entry and a SAC balance ledger entry.", - "params": [ - { - "$ref": "#/components/examples/CombinedLedgerKeys" - } - ], - "result": { - "$ref": "#/components/examples/CombinedLedgerEntryResult" - } - }, - "TestnetNetworkConfig": { - "name": "Testnet Network Configuration", - "description": "Example request to the `getNetwork` method for a node connected to the Stellar Testnet network.", - "params": [], - "result": { - "name": "getNetworkResult", - "value": { - "friendbotUrl": "https://friendbot-testnet.stellar.org/", - "passphrase": "Test SDF Network ; September 2015", - "protocolVersion": 20 - } - } - }, - "FuturenetNetworkConfig": { - "name": "Futurenet Network Configuration", - "description": "Example request to the `getNetwork` method for a node connected to the Stellar Futurenet network.", - "params": [], - "result": { - "name": "getNetworkResult", - "value": { - "friendbotUrl": "https://friendbot-futurenet.stellar.org/", - "passphrase": "Test SDF Future Network ; October 2022", - "protocolVersion": 20 - } - } - }, - "PendingTransaction": { - "name": "Pending Transaction", - "description": "Submitting a valid transaction using the `sendTransaction` method, resulting in a `PENDING` status.", - "params": [ - { - "$ref": "#/components/examples/ValidSentTransaction" - } - ], - "result": { - "$ref": "#/components/examples/PendingTransactionResult" - } - }, - "DuplicateTransaction": { - "name": "Duplicate Transaction", - "description": "Submitting a valid, yet duplicate transaction using the `sendTransaction` method, resulting in a `DUPLICATE` status.", - "params": [ - { - "$ref": "#/components/examples/ValidSentTransaction" - } - ], - "result": { - "$ref": "#/components/examples/DuplicateTransactionResult" - } - }, - "ErrorTransaction": { - "name": "Error Transaction", - "description": "Submitting an invalid transaction using the `sendTransaction` method, resulting in an `ERROR` status.", - "params": [ - { - "$ref": "#/components/examples/InvalidSentTransaction" - } - ], - "result": { - "$ref": "#/components/examples/ErrorTransactionResult" - } - }, - "TryAgainLaterTransaction": { - "name": "Try Again Later Transaction", - "description": "Submitting a valid transaction before an account's previously submitted transaction has settled using the `sendTransaction` method, resulting in a `TRY_AGAIN_LATER` status.", - "params": [ - { - "$ref": "#/components/examples/ValidSentTransaction" - } - ], - "result": { - "$ref": "#/components/examples/TryAgainLaterTransactionResult" - } - }, - "SuccessfulTransactionSimulation": { - "name": "Successful Transaction Simulation", - "description": "Transaction simulation that succeeds and returns the necessary information to prepare and submit the transaction.", - "params": [ - { - "$ref": "#/components/examples/ValidContractTransaction" - }, - { - "$ref": "#/components/examples/DefaultResourceConfig" - } - ], - "result": { - "$ref": "#/components/examples/SuccessfulSimulationResult" - } - }, - "FailedTransactionSimulation": { - "name": "Failed Transaction Simulation", - "description": "Transaction simulation that fails due to the contract invocation being constructed with an improper number of arguments.", - "params": [ - { - "$ref": "#/components/examples/InvalidContractTransaction" - }, - { - "$ref": "#/components/examples/DefaultResourceConfig" - } - ], - "result": { - "$ref": "#/components/examples/FailedSimulationResult" - } - } - } - } -} \ No newline at end of file diff --git a/openrpc/scripts/build.mjs b/openrpc/scripts/build.mjs index daffdebc..6e403856 100644 --- a/openrpc/scripts/build.mjs +++ b/openrpc/scripts/build.mjs @@ -122,7 +122,7 @@ const doc = { }, } -// fs.writeFileSync('openrpc/refs-openrpc.json', JSON.stringify(doc, null, 2)); +fs.writeFileSync('openrpc/refs-openrpc.json', JSON.stringify(doc, null, 2)); let spec = await dereferenceDocument(doc, defaultResolver.default) @@ -137,6 +137,7 @@ for (var i=0; i < spec.methods.length; i++) { } let data = JSON.stringify(spec, null, 2); +fs.writeFileSync('openrpc/openrpc.json', data); fs.writeFileSync('static/openrpc.json', data); console.log(); From 1efb7daa49508d858be0c6a884feeb1f6d473830 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Thu, 21 Dec 2023 13:37:59 -0600 Subject: [PATCH 3/8] add spec generation to docker file --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index de13c887..03688f7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git ma COPY . /app/ RUN yarn install +RUN yarn rpcspec:build RUN yarn build FROM nginx:1.17 From 978b8b0f54c794fe59b83f2f1e866794bfc7b917 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Thu, 21 Dec 2023 13:52:13 -0600 Subject: [PATCH 4/8] test change to `getEvents` method --- openrpc/src/methods/getEvents.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openrpc/src/methods/getEvents.json b/openrpc/src/methods/getEvents.json index 558b1d84..b0048144 100644 --- a/openrpc/src/methods/getEvents.json +++ b/openrpc/src/methods/getEvents.json @@ -1,7 +1,7 @@ { "name": "getEvents", "summary": "returns contract events", - "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", + "description": "I am testing out this specfile generation workflow!\n\nClients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", "externalDocs": { "url": "https://soroban.stellar.org/api/methods/getEvents" }, From d059aaf2b15cbd2a22ae75549d8f4235ae72c9a4 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Thu, 21 Dec 2023 14:04:05 -0600 Subject: [PATCH 5/8] Revert "test change to `getEvents` method" This reverts commit 978b8b0f54c794fe59b83f2f1e866794bfc7b917. --- openrpc/src/methods/getEvents.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openrpc/src/methods/getEvents.json b/openrpc/src/methods/getEvents.json index b0048144..558b1d84 100644 --- a/openrpc/src/methods/getEvents.json +++ b/openrpc/src/methods/getEvents.json @@ -1,7 +1,7 @@ { "name": "getEvents", "summary": "returns contract events", - "description": "I am testing out this specfile generation workflow!\n\nClients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", + "description": "Clients can request a filtered list of events emitted by a given ledger range.\n\nSoroban-RPC will support querying within a maximum 24 hours of recent ledgers.\n\nNote, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to \"ingest\" events into their own database for querying and serving.\n\nIf making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received.\n\nBy default soroban-rpc retains the most recent 24 hours of events.", "externalDocs": { "url": "https://soroban.stellar.org/api/methods/getEvents" }, From 2fdf828b216cd2338979d940ca458aafe3d75e5f Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Thu, 21 Dec 2023 14:13:06 -0600 Subject: [PATCH 6/8] remove console statements in build script --- openrpc/scripts/build.mjs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/openrpc/scripts/build.mjs b/openrpc/scripts/build.mjs index 6e403856..844e0d8c 100644 --- a/openrpc/scripts/build.mjs +++ b/openrpc/scripts/build.mjs @@ -15,13 +15,10 @@ function sortByMethodName(methods) { }) } -console.log("Loading files...\n"); - let methods = []; let methodsBase = "openrpc/src/methods/"; let methodFiles = fs.readdirSync(methodsBase); methodFiles.forEach(file => { - console.log(file); let raw = fs.readFileSync(methodsBase + file); let parsed = JSON.parse(raw); methods = [ @@ -34,7 +31,6 @@ let contentDescriptors = {}; let cdBase = "openrpc/src/contentDescriptors/"; let cdFiles = fs.readdirSync(cdBase); cdFiles.forEach(file => { - console.log(file); let raw = fs.readFileSync(cdBase + file); let parsed = JSON.parse(raw); contentDescriptors = { @@ -47,7 +43,6 @@ let schemas = {}; let schemasBase = "openrpc/src/schemas/" let schemaFiles = fs.readdirSync(schemasBase); schemaFiles.forEach(file => { - console.log(file); let raw = fs.readFileSync(schemasBase + file); let parsed = JSON.parse(raw); schemas = { @@ -60,7 +55,6 @@ let examples = {} let examplesBase = "openrpc/src/examples/" let examplesFiles = fs.readdirSync(examplesBase) examplesFiles.forEach(file => { - console.log(file) let raw = fs.readFileSync(examplesBase + file) let parsed = JSON.parse(raw) examples = { @@ -73,7 +67,6 @@ let examplePairingObjects = {} let epoBase = "openrpc/src/examplePairingObjects/" let epoFiles = fs.readdirSync(epoBase) epoFiles.forEach(file => { - console.log(file) let raw = fs.readFileSync(epoBase + file) let parsed = JSON.parse(raw) examplePairingObjects = { From 168af37547190cc2fb56499d19821d0404d443f9 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Fri, 22 Dec 2023 10:05:28 -0600 Subject: [PATCH 7/8] add note about the build process at deploy time --- openrpc/README.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/openrpc/README.md b/openrpc/README.md index 04e360c1..72ccd712 100644 --- a/openrpc/README.md +++ b/openrpc/README.md @@ -1,18 +1,17 @@ -# Soroban RPC API Specification +# Soroban RPC API Specification ## Table of Contents -- [Soroban RPC API Specification](#soroban-rpc-api-specification) - - [JSON-RPC](#json-rpc) - - [Building](#building) - - [Testing](#testing) - - [JSON `$ref`s](#json-refs) - - [Keeping Things Up-to-Date](#keeping-things-up-to-date) - - [Methods (`/openrpc/src/methods/*`)](#methods-openrpcsrcmethods) - - [Content Descriptors (`/openrpc/src/contentDescriptors/*`)](#content-descriptors-openrpcsrccontentdescriptors) - - [Schemas (`/openrpc/src/schemas/*`)](#schemas-openrpcsrcschemas) - - [Examples (`/openrpc/src/examples/*`)](#examples-openrpcsrcexamples) - - [Example Pairings (`/openrpc/src/examplePairingObjects/*`)](#example-pairings-openrpcsrcexamplepairingobjects) +- [JSON-RPC](#json-rpc) + - [Building](#building) + - [Testing](#testing) + - [JSON `$ref`s](#json-refs) +- [Keeping Things Up-to-Date](#keeping-things-up-to-date) + - [Methods (`/openrpc/src/methods/*`)](#methods-openrpcsrcmethods) + - [Content Descriptors (`/openrpc/src/contentDescriptors/*`)](#content-descriptors-openrpcsrccontentdescriptors) + - [Schemas (`/openrpc/src/schemas/*`)](#schemas-openrpcsrcschemas) + - [Examples (`/openrpc/src/examples/*`)](#examples-openrpcsrcexamples) + - [Example Pairings (`/openrpc/src/examplePairingObjects/*`)](#example-pairings-openrpcsrcexamplepairingobjects) ## JSON-RPC @@ -20,6 +19,12 @@ This is a specification of the API presented by Soroban RPC. ### Building +> _Note:_ The build process will provide an output file at +> `/static/openrpc.json`. This file should be included in any commits. However, +> this build process is re-run as part of our docusaurus deployment. So, it's +> necessary to update the actual source JSON files, and not just this built file +> as it will be overwritten at deploy time. + The specification is split into multiple files to improve readability. The complete spec can be compiled into a single document as follows. (Run this command from the root `soroban-docs` directory.) From 890114dd6bb1da2cc80c10ba1188b4c45c4c5047 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Tue, 9 Jan 2024 11:06:15 -0600 Subject: [PATCH 8/8] updating build with newest fields --- openrpc/src/methods/sendTransaction.json | 8 ++++++++ static/openrpc.json | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/openrpc/src/methods/sendTransaction.json b/openrpc/src/methods/sendTransaction.json index 6b6dfdc0..7239d2b2 100644 --- a/openrpc/src/methods/sendTransaction.json +++ b/openrpc/src/methods/sendTransaction.json @@ -41,6 +41,14 @@ "type": "string", "description": "(optional) If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.", "contentEncoding": "base64" + }, + "diagnosticEventsXdr": { + "type": "array", + "description": "(optional) If the transaction status is `ERROR`, this field may be present with an array of base64 encoded strings. Each string will decode to a raw DiagnosticEvent XDR struct containing details on why stellar-core rejected the transaction.", + "contentEncoding": "base64", + "items": { + "type": "string" + } } }, "required": [ "hash", "status", "latestLedger", "latestLedgerCloseTime" ] diff --git a/static/openrpc.json b/static/openrpc.json index 488281bc..dd91ba16 100644 --- a/static/openrpc.json +++ b/static/openrpc.json @@ -893,7 +893,10 @@ "diagnosticEventsXdr": { "type": "array", "description": "(optional) If the transaction status is `ERROR`, this field may be present with an array of base64 encoded strings. Each string will decode to a raw DiagnosticEvent XDR struct containing details on why stellar-core rejected the transaction.", - "contentEncoding": "base64" + "contentEncoding": "base64", + "items": { + "type": "string" + } } } }