From 4c4c74fa327f2d08b8fa19772a8787b0a032abc5 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 9 Feb 2024 12:09:05 +0100 Subject: [PATCH] msggen: Regenerate to include `offer` and `listoffers` Changelog-None Unrelease, so no notes needed. --- contrib/msggen/msggen/schema.json | 76 ++++++++++++++++++- contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py | 1 + .../pyln/grpc/primitives_pb2.py | 1 + 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json index 21f39a0270b8..85e107d16e73 100644 --- a/contrib/msggen/msggen/schema.json +++ b/contrib/msggen/msggen/schema.json @@ -2583,7 +2583,7 @@ "description": "period starts at this UNIX timestamp" }, "start_any_period": { - "type": "u64", + "type": "boolean", "description": "you can start at any period (only if `basetime` present)" }, "limit": { @@ -2878,7 +2878,7 @@ "description": "period starts at this UNIX timestamp" }, "start_any_period": { - "type": "u64", + "type": "boolean", "description": "you can start at any period (only if `basetime` present)" }, "limit": { @@ -3242,7 +3242,7 @@ "description": "period starts at this UNIX timestamp" }, "start_any_period": { - "type": "u64", + "type": "boolean", "description": "you can start at any period (only if `basetime` present)" }, "limit": { @@ -10163,6 +10163,22 @@ } } }, + "listoffers.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [], + "additionalProperties": false, + "properties": { + "offer_id": { + "type": "hash", + "description": "Only return offers matching this ID" + }, + "active_only": { + "type": "boolean", + "description": "f active_only is set and is true, only offers with active true are returned." + } + } + }, "listoffers.schema.json": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", @@ -13412,6 +13428,60 @@ "additionalProperties": false, "properties": {} }, + "offer.request.json": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "amount", + "description" + ], + "properties": { + "amount": { + "type": "string", + "description": "The amount parameter can be the string \"any\", which creates an offer that can be paid with any amount (e.g. a donation). Otherwise it can be a positive value in millisatoshi precision; it can be a whole number, or a whole number ending in msat or sat, or a number with three decimal places ending in sat, or a number with 1 to 11 decimal places ending in btc. `amount` can also have an ISO 4217 postfix (i.e. USD), in which case currency conversion will need to be done for the invoice itself. A plugin is needed which provides the \"currencyconvert\" API for this currency, otherwise the offer creation will fail." + }, + "description": { + "type": "string", + "description": "a short description of purpose of the offer" + }, + "issuer": { + "type": "string", + "description": "who is issuing this offer" + }, + "label": { + "type": "string", + "description": "an internal-use name for the offer" + }, + "quantity_max": { + "type": "u64", + "description": "specifies the number of items up (and including) this maximum" + }, + "absolute_expiry": { + "type": "u64", + "description": "the time the offer is valid until, in seconds since the first day of 1970 UTC" + }, + "recurrence": { + "type": "string", + "description": "A recurrence period with unit (matches '[0-9]+(seconds|minutes|hours|days|weeks|months|years)' " + }, + "recurrence_base": { + "type": "string", + "description": "Time in seconds since the first day of 1970 UTC. If not prefixed with an '@' the offer will start in any period (no missed payments will be performed)" + }, + "recurrence_paywindow": { + "type": "string", + "description": "an optional argument of form '-time+time[%]'. The first time is the number of seconds before the start of a period in which an invoice and payment is valid, the second time is the number of seconds after the start of the period. For example -604800+86400 means you can fetch an pay the invoice 4 weeks before the given period starts, and up to 1 day afterwards. The optional % indicates that the amount of the invoice will be scaled by the time remaining in the period. If this is not specified, the default is that payment is allowed during the current and previous periods. This is encoded in the offer." + }, + "recurrence_limit": { + "type": "u64", + "description": "the maximum recurrence period which exists" + }, + "single_use": { + "type": "boolean", + "description": "indicates that the offer is only valid once" + } + } + }, "offer.schema.json": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", diff --git a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py index a45bddf4f67e..7c07461f6f74 100644 --- a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py +++ b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: node.proto +# Protobuf Python Version: 4.25.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool diff --git a/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py b/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py index c0ce0d478484..437ba89fea6a 100644 --- a/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py +++ b/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: primitives.proto +# Protobuf Python Version: 4.25.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool