diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2e5357d..c3228fa8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ jobs: matrix: platform: [ubuntu-latest] node-version: [20] - python-version: ['3.10'] rust-version: [stable] runs-on: ${{ matrix.platform }} @@ -25,14 +24,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: Use Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Use Poetry - uses: abatilo/actions-poetry@v2 - - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -48,18 +39,12 @@ jobs: - name: Start PostgreSQL run: npm run db:start - - name: Install Python dependencies - run: npm run python:install - - name: Start containers run: npm run docker:regtest && npm run docker:solidity - name: Deploy Ethereum contracts run: npm run docker:solidity:deploy - - name: Install Python dependencies in regtest container - run: docker exec regtest bash /root/poetry-install.sh - - name: Compile run: npm run compile @@ -69,30 +54,15 @@ jobs: - name: Lint run: npm run lint - - name: Python lint - run: npm run python:lint - - name: Start hold invoice plugin run: npm run docker:cln:hold - - name: Start mpay plugin - run: docker exec regtest lightning-cli plugin start /root/mpay.sh - - name: Unit tests run: npm run test:unit - name: Integration tests run: node run-int.js - - name: Stop hold invoice plugin - run: docker exec regtest lightning-cli plugin stop /root/.lightning/plugins/hold - - - name: Stop mpay plugin - run: docker exec regtest lightning-cli plugin stop /root/mpay.sh - - - name: Python plugin tests - run: npm run python:test - build-rust: strategy: matrix: diff --git a/lib/Boltz.ts b/lib/Boltz.ts index f6dc2097..1079edf3 100644 --- a/lib/Boltz.ts +++ b/lib/Boltz.ts @@ -26,7 +26,6 @@ import GrpcService from './grpc/GrpcService'; import { LightningClient } from './lightning/LightningClient'; import LndClient from './lightning/LndClient'; import ClnClient from './lightning/cln/ClnClient'; -import MpayClient from './lightning/cln/MpayClient'; import NotificationClient from './notifications/NotificationClient'; import NotificationProvider from './notifications/NotificationProvider'; import Blocks from './service/Blocks'; @@ -411,19 +410,6 @@ class Boltz { client.symbol, holdInfo.version, ); - - if (client.useMpay()) { - const mpayInfo = await client.mpay!.getInfo(); - this.logger.verbose( - `${client.symbol} ${MpayClient.serviceName} version: ${mpayInfo.version}`, - ); - - VersionCheck.checkLightningVersion( - MpayClient.serviceName, - client.symbol, - mpayInfo.version, - ); - } } this.logStatus(service, info); diff --git a/lib/VersionCheck.ts b/lib/VersionCheck.ts index 358f4ea8..8c21336c 100644 --- a/lib/VersionCheck.ts +++ b/lib/VersionCheck.ts @@ -1,7 +1,6 @@ import ChainClient from './chain/ChainClient'; import LndClient from './lightning/LndClient'; import ClnClient from './lightning/cln/ClnClient'; -import MpayClient from './lightning/cln/MpayClient'; type Version = string | number; @@ -82,17 +81,13 @@ class VersionCheck { maximal: 280000, }, [ClnClient.serviceName]: { - minimal: '24.08', + minimal: '24.11', maximal: '24.11.1', }, [ClnClient.serviceNameHold]: { minimal: '0.2.0', maximal: '0.2.0', }, - [MpayClient.serviceName]: { - minimal: '0.1.3', - maximal: '0.1.3', - }, [LndClient.serviceName]: { minimal: '0.18.0', maximal: '0.18.4', @@ -149,10 +144,6 @@ class VersionCheck { limits = VersionCheck.versionLimits[ClnClient.serviceNameHold]; break; - case MpayClient.serviceName: - limits = VersionCheck.versionLimits[MpayClient.serviceName]; - break; - default: throw `unsupported lightning client ${serviceName}`; } diff --git a/lib/lightning/cln/ClnClient.ts b/lib/lightning/cln/ClnClient.ts index d441b140..7088f2c8 100644 --- a/lib/lightning/cln/ClnClient.ts +++ b/lib/lightning/cln/ClnClient.ts @@ -10,15 +10,10 @@ import { ClientStatus } from '../../consts/Enums'; import { NodeType } from '../../db/models/ReverseSwap'; import { NodeClient } from '../../proto/cln/node_grpc_pb'; import * as noderpc from '../../proto/cln/node_pb'; -import { - DecodeResponse, - ListfundsOutputs, - ListpaysPays, -} from '../../proto/cln/node_pb'; +import { ListfundsOutputs, ListpaysPays } from '../../proto/cln/node_pb'; import * as primitivesrpc from '../../proto/cln/primitives_pb'; import { HoldClient } from '../../proto/hold/hold_grpc_pb'; import * as holdrpc from '../../proto/hold/hold_pb'; -import * as mpayrpc from '../../proto/mpay/mpay_pb'; import { WalletBalance } from '../../wallet/providers/WalletProviderInterface'; import { msatToSat, satToMsat, scidClnToLnd } from '../ChannelUtils'; import Errors from '../Errors'; @@ -40,12 +35,10 @@ import { RoutingHintsProvider, calculatePaymentFee, } from '../LightningClient'; -import Mpay from './MpayClient'; import { getRoute } from './Router'; import { ClnConfig, createSsl } from './Types'; import ListpaysPaysStatus = ListpaysPays.ListpaysPaysStatus; -import DecodeType = DecodeResponse.DecodeType; class ClnClient extends BaseClient @@ -57,8 +50,6 @@ class ClnClient public static readonly paymentPendingError = 'payment already pending'; - public readonly mpay?: Mpay; - private static readonly paymentMinFee = 121; private static readonly paymentTimeout = 300; @@ -93,17 +84,6 @@ class ClnClient this.nodeUri = `${config.host}:${config.port}`; this.holdUri = `${config.hold.host}:${config.hold.port}`; - - if (config.mpay) { - this.logger.verbose( - `Using mpay for ${ClnClient.serviceName} ${this.symbol}`, - ); - this.mpay = new Mpay(logger, this.symbol, config.mpay); - } else { - this.logger.warn( - `Mpay not configured for ${ClnClient.serviceName} ${this.symbol}; using pay`, - ); - } } public get type() { @@ -130,15 +110,16 @@ class ClnClient }; public static errIsIncorrectPaymentDetails = (err: string): boolean => { - return err.includes('WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS'); + return ( + err.includes('WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS') || + err.includes('incorrect_or_unknown_payment_details') + ); }; public serviceName = (): string => { return ClnClient.serviceName; }; - public useMpay = () => this.mpay !== undefined && this.mpay.isConnected(); - public connect = async (): Promise => { if (!this.isConnected()) { this.nodeClient = new NodeClient(this.nodeUri, this.nodeCreds, { @@ -151,8 +132,6 @@ class ClnClient 'grpc.ssl_target_name_override': 'hold', }); - this.mpay?.connect(); - try { await this.getInfo(); this.setClientStatus(ClientStatus.Connected); @@ -191,8 +170,6 @@ class ClnClient this.holdClient = undefined; } - this.mpay?.disconnect(); - this.removeAllListeners(); this.setClientStatus(ClientStatus.Disconnected); @@ -572,25 +549,9 @@ class ClnClient ), ); - // TODO: mpay support for bolt12 - const useMpay = - this.useMpay() && decoded.type !== DecodeType.BOLT12_INVOICE; - this.logger.verbose( - `Using ${useMpay ? 'mpay' : 'pay'} for ${ClnClient.serviceName} ${this.symbol} invoice payment`, - ); - - if (useMpay) { - return this.mpay!.sendPayment( - invoice, - maxFee, - ClnClient.paymentTimeout, - cltvDelta, - ); - } + const req = new noderpc.XpayRequest(); - const req = new noderpc.PayRequest(); - - req.setBolt11(invoice); + req.setInvstring(invoice); req.setRetryFor(ClnClient.paymentTimeout); const feeAmount = new primitivesrpc.Amount(); @@ -598,26 +559,26 @@ class ClnClient req.setMaxfee(feeAmount); if (cltvDelta) { - req.setMaxdelay(cltvDelta); + // TODO + // req.setMaxdelay(cltvDelta); } - const res = await this.unaryNodeCall< - noderpc.PayRequest, - noderpc.PayResponse - >('pay', req, false); - - if (res.getStatus() !== noderpc.PayResponse.PayStatus.COMPLETE) { - // TODO: error message? - throw 'payment failed'; - } + try { + const res = await this.unaryNodeCall< + noderpc.XpayRequest, + noderpc.XpayResponse + >('xpay', req, false); - const fee = - BigInt(res.getAmountSentMsat()!.getMsat()) - BigInt(decoded.valueMsat); + const fee = + BigInt(res.getAmountSentMsat()!.getMsat()) - BigInt(decoded.valueMsat); - return { - feeMsat: Number(fee), - preimage: Buffer.from(res.getPaymentPreimage_asU8()), - }; + return { + feeMsat: Number(fee), + preimage: Buffer.from(res.getPaymentPreimage_asU8()), + }; + } catch (e) { + throw this.parseError(e); + } }; public subscribeSingleInvoice = (preimageHash: Buffer): void => { @@ -720,26 +681,6 @@ class ClnClient }; } - // ... has failed... - if (this.mpay !== undefined) { - for (const payStatus of (await this.mpay.payStatus(invoice)).statusList) { - for (const attempt of payStatus.attemptsList) { - if ( - attempt.state === - mpayrpc.PayStatusResponse.PayStatus.Attempt.AttemptState - .ATTEMPT_PENDING || - attempt.failure === undefined - ) { - continue; - } - - if (ClnClient.errIsIncorrectPaymentDetails(attempt.failure.message)) { - throw attempt.failure.message; - } - } - } - } - // ... or is still pending const hasPendingPayments = pays.some( (pay) => pay.getStatus() === ListpaysPaysStatus.PENDING, @@ -847,6 +788,27 @@ class ClnClient setTimeout(() => this.reconnect(), this.RECONNECT_INTERVAL); } }; + + private parseError = (error: unknown) => { + if ( + typeof error === 'object' && + 'message' in error! && + typeof error.message === 'string' + ) { + const msg = error.message as string; + const messagePrefix = 'message: "'; + const messageSuffix = '", data:'; + + if (msg.includes(messagePrefix)) { + return msg.slice( + msg.indexOf(messagePrefix) + messagePrefix.length, + msg.indexOf(messageSuffix), + ); + } + } + + return formatError(error); + }; } export default ClnClient; diff --git a/lib/lightning/cln/MpayClient.ts b/lib/lightning/cln/MpayClient.ts deleted file mode 100644 index fffa04b2..00000000 --- a/lib/lightning/cln/MpayClient.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { ChannelCredentials, Metadata } from '@grpc/grpc-js'; -import BaseClient from '../../BaseClient'; -import Logger from '../../Logger'; -import { formatError, getHexBuffer } from '../../Utils'; -import { ClientStatus } from '../../consts/Enums'; -import { MpayClient } from '../../proto/mpay/mpay_grpc_pb'; -import * as mpayrpc from '../../proto/mpay/mpay_pb'; -import { grpcOptions, unaryCall } from '../GrpcUtils'; -import { PaymentResponse } from '../LightningClient'; -import { BaseConfig, createSsl } from './Types'; - -class Mpay extends BaseClient { - public static readonly serviceName = 'mpay'; - - private client?: MpayClient; - - private readonly uri: string; - private readonly creds: ChannelCredentials; - private readonly meta = new Metadata(); - - constructor( - logger: Logger, - public readonly symbol: string, - config: BaseConfig, - ) { - super(logger, symbol); - - this.uri = `${config.host}:${config.port}`; - this.creds = createSsl(Mpay.serviceName, this.symbol, config); - } - - public serviceName = () => Mpay.serviceName; - - public connect = async (): Promise => { - if (this.isConnected()) { - return true; - } - - this.client = new MpayClient(this.uri, this.creds, { - ...grpcOptions, - 'grpc.ssl_target_name_override': 'mpay', - }); - - try { - await this.getInfo(); - - this.setClientStatus(ClientStatus.Connected); - } catch (error) { - this.setClientStatus(ClientStatus.Disconnected); - - this.logger.error( - `Could not connect to ${Mpay.serviceName} ${ - this.symbol - }: ${formatError(error)}`, - ); - this.logger.info(`Retrying in ${this.RECONNECT_INTERVAL} ms`); - - this.reconnectionTimer = setTimeout( - this.connect, - this.RECONNECT_INTERVAL, - ); - - return false; - } - - return true; - }; - - public disconnect = () => { - this.clearReconnectTimer(); - - this.removeAllListeners(); - this.setClientStatus(ClientStatus.Disconnected); - this.client?.close(); - }; - - public getInfo = (): Promise => - this.unaryNodeCall('getInfo', new mpayrpc.GetInfoRequest()); - - public payStatus = (invoice: string) => { - const req = new mpayrpc.PayStatusRequest(); - req.setInvoice(invoice); - - return this.unaryNodeCall< - mpayrpc.PayStatusRequest, - mpayrpc.PayStatusResponse.AsObject - >('payStatus', req); - }; - - public sendPayment = async ( - invoice: string, - maxFeeMsat: number, - timeout: number, - maxDelay?: number, - ): Promise => { - const req = new mpayrpc.PayRequest(); - req.setBolt11(invoice); - req.setTimeout(timeout); - req.setMaxFeeMsat(maxFeeMsat); - - if (maxDelay) { - req.setMaxDelay(maxDelay); - } - - const res = await this.unaryNodeCall< - mpayrpc.PayRequest, - mpayrpc.PayResponse - >('pay', req, false); - - return { - feeMsat: res.getFeeMsat(), - preimage: getHexBuffer(res.getPaymentPreimage()), - }; - }; - - public resetPathMemory = ( - excludeTemporaryMemory: boolean = false, - excludePermanentMemory: boolean = false, - ) => { - const request = new mpayrpc.ResetPathMemoryRequest(); - request.setExcludeTemporaryMemory(excludeTemporaryMemory); - request.setExcludePermanentMemory(excludePermanentMemory); - - return this.unaryNodeCall< - mpayrpc.ResetPathMemoryRequest, - mpayrpc.ResetPathMemoryResponse - >('resetPathMemory', request); - }; - - private unaryNodeCall = ( - methodName: keyof MpayClient, - params: T, - toObject = true, - ): Promise => { - return unaryCall(this.client, methodName, params, this.meta, toObject); - }; -} - -export default Mpay; diff --git a/lib/lightning/cln/Types.ts b/lib/lightning/cln/Types.ts index 9e828fc2..38db8ef2 100644 --- a/lib/lightning/cln/Types.ts +++ b/lib/lightning/cln/Types.ts @@ -15,7 +15,6 @@ type ClnConfig = BaseConfig & { maxPaymentFeeRatio: number; hold: BaseConfig; - mpay?: BaseConfig; }; const createSsl = ( diff --git a/lib/proto/mpay/mpay_grpc_pb.d.ts b/lib/proto/mpay/mpay_grpc_pb.d.ts deleted file mode 100644 index 5c4c7053..00000000 --- a/lib/proto/mpay/mpay_grpc_pb.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -// package: mpay -// file: mpay.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as mpay_pb from "./mpay_pb"; - -interface IMpayService extends grpc.ServiceDefinition { - getInfo: IMpayService_IGetInfo; - getRoutes: IMpayService_IGetRoutes; - listPayments: IMpayService_IListPayments; - pay: IMpayService_IPay; - resetPathMemory: IMpayService_IResetPathMemory; - payStatus: IMpayService_IPayStatus; -} - -interface IMpayService_IGetInfo extends grpc.MethodDefinition { - path: "/mpay.Mpay/GetInfo"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IMpayService_IGetRoutes extends grpc.MethodDefinition { - path: "/mpay.Mpay/GetRoutes"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IMpayService_IListPayments extends grpc.MethodDefinition { - path: "/mpay.Mpay/ListPayments"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IMpayService_IPay extends grpc.MethodDefinition { - path: "/mpay.Mpay/Pay"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IMpayService_IResetPathMemory extends grpc.MethodDefinition { - path: "/mpay.Mpay/ResetPathMemory"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IMpayService_IPayStatus extends grpc.MethodDefinition { - path: "/mpay.Mpay/PayStatus"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const MpayService: IMpayService; - -export interface IMpayServer extends grpc.UntypedServiceImplementation { - getInfo: grpc.handleUnaryCall; - getRoutes: grpc.handleUnaryCall; - listPayments: grpc.handleUnaryCall; - pay: grpc.handleUnaryCall; - resetPathMemory: grpc.handleUnaryCall; - payStatus: grpc.handleUnaryCall; -} - -export interface IMpayClient { - getInfo(request: mpay_pb.GetInfoRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; - getInfo(request: mpay_pb.GetInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; - getInfo(request: mpay_pb.GetInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; - getRoutes(request: mpay_pb.GetRoutesRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetRoutesResponse) => void): grpc.ClientUnaryCall; - getRoutes(request: mpay_pb.GetRoutesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetRoutesResponse) => void): grpc.ClientUnaryCall; - getRoutes(request: mpay_pb.GetRoutesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetRoutesResponse) => void): grpc.ClientUnaryCall; - listPayments(request: mpay_pb.ListPaymentsRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.ListPaymentsResponse) => void): grpc.ClientUnaryCall; - listPayments(request: mpay_pb.ListPaymentsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.ListPaymentsResponse) => void): grpc.ClientUnaryCall; - listPayments(request: mpay_pb.ListPaymentsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.ListPaymentsResponse) => void): grpc.ClientUnaryCall; - pay(request: mpay_pb.PayRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayResponse) => void): grpc.ClientUnaryCall; - pay(request: mpay_pb.PayRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayResponse) => void): grpc.ClientUnaryCall; - pay(request: mpay_pb.PayRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayResponse) => void): grpc.ClientUnaryCall; - resetPathMemory(request: mpay_pb.ResetPathMemoryRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.ResetPathMemoryResponse) => void): grpc.ClientUnaryCall; - resetPathMemory(request: mpay_pb.ResetPathMemoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.ResetPathMemoryResponse) => void): grpc.ClientUnaryCall; - resetPathMemory(request: mpay_pb.ResetPathMemoryRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.ResetPathMemoryResponse) => void): grpc.ClientUnaryCall; - payStatus(request: mpay_pb.PayStatusRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayStatusResponse) => void): grpc.ClientUnaryCall; - payStatus(request: mpay_pb.PayStatusRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayStatusResponse) => void): grpc.ClientUnaryCall; - payStatus(request: mpay_pb.PayStatusRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayStatusResponse) => void): grpc.ClientUnaryCall; -} - -export class MpayClient extends grpc.Client implements IMpayClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public getInfo(request: mpay_pb.GetInfoRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; - public getInfo(request: mpay_pb.GetInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; - public getInfo(request: mpay_pb.GetInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; - public getRoutes(request: mpay_pb.GetRoutesRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetRoutesResponse) => void): grpc.ClientUnaryCall; - public getRoutes(request: mpay_pb.GetRoutesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetRoutesResponse) => void): grpc.ClientUnaryCall; - public getRoutes(request: mpay_pb.GetRoutesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.GetRoutesResponse) => void): grpc.ClientUnaryCall; - public listPayments(request: mpay_pb.ListPaymentsRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.ListPaymentsResponse) => void): grpc.ClientUnaryCall; - public listPayments(request: mpay_pb.ListPaymentsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.ListPaymentsResponse) => void): grpc.ClientUnaryCall; - public listPayments(request: mpay_pb.ListPaymentsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.ListPaymentsResponse) => void): grpc.ClientUnaryCall; - public pay(request: mpay_pb.PayRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayResponse) => void): grpc.ClientUnaryCall; - public pay(request: mpay_pb.PayRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayResponse) => void): grpc.ClientUnaryCall; - public pay(request: mpay_pb.PayRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayResponse) => void): grpc.ClientUnaryCall; - public resetPathMemory(request: mpay_pb.ResetPathMemoryRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.ResetPathMemoryResponse) => void): grpc.ClientUnaryCall; - public resetPathMemory(request: mpay_pb.ResetPathMemoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.ResetPathMemoryResponse) => void): grpc.ClientUnaryCall; - public resetPathMemory(request: mpay_pb.ResetPathMemoryRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.ResetPathMemoryResponse) => void): grpc.ClientUnaryCall; - public payStatus(request: mpay_pb.PayStatusRequest, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayStatusResponse) => void): grpc.ClientUnaryCall; - public payStatus(request: mpay_pb.PayStatusRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayStatusResponse) => void): grpc.ClientUnaryCall; - public payStatus(request: mpay_pb.PayStatusRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: mpay_pb.PayStatusResponse) => void): grpc.ClientUnaryCall; -} diff --git a/lib/proto/mpay/mpay_grpc_pb.js b/lib/proto/mpay/mpay_grpc_pb.js deleted file mode 100644 index 6cba3ff6..00000000 --- a/lib/proto/mpay/mpay_grpc_pb.js +++ /dev/null @@ -1,210 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var mpay_pb = require('./mpay_pb.js'); - -function serialize_mpay_GetInfoRequest(arg) { - if (!(arg instanceof mpay_pb.GetInfoRequest)) { - throw new Error('Expected argument of type mpay.GetInfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_GetInfoRequest(buffer_arg) { - return mpay_pb.GetInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_GetInfoResponse(arg) { - if (!(arg instanceof mpay_pb.GetInfoResponse)) { - throw new Error('Expected argument of type mpay.GetInfoResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_GetInfoResponse(buffer_arg) { - return mpay_pb.GetInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_GetRoutesRequest(arg) { - if (!(arg instanceof mpay_pb.GetRoutesRequest)) { - throw new Error('Expected argument of type mpay.GetRoutesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_GetRoutesRequest(buffer_arg) { - return mpay_pb.GetRoutesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_GetRoutesResponse(arg) { - if (!(arg instanceof mpay_pb.GetRoutesResponse)) { - throw new Error('Expected argument of type mpay.GetRoutesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_GetRoutesResponse(buffer_arg) { - return mpay_pb.GetRoutesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_ListPaymentsRequest(arg) { - if (!(arg instanceof mpay_pb.ListPaymentsRequest)) { - throw new Error('Expected argument of type mpay.ListPaymentsRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_ListPaymentsRequest(buffer_arg) { - return mpay_pb.ListPaymentsRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_ListPaymentsResponse(arg) { - if (!(arg instanceof mpay_pb.ListPaymentsResponse)) { - throw new Error('Expected argument of type mpay.ListPaymentsResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_ListPaymentsResponse(buffer_arg) { - return mpay_pb.ListPaymentsResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_PayRequest(arg) { - if (!(arg instanceof mpay_pb.PayRequest)) { - throw new Error('Expected argument of type mpay.PayRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_PayRequest(buffer_arg) { - return mpay_pb.PayRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_PayResponse(arg) { - if (!(arg instanceof mpay_pb.PayResponse)) { - throw new Error('Expected argument of type mpay.PayResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_PayResponse(buffer_arg) { - return mpay_pb.PayResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_PayStatusRequest(arg) { - if (!(arg instanceof mpay_pb.PayStatusRequest)) { - throw new Error('Expected argument of type mpay.PayStatusRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_PayStatusRequest(buffer_arg) { - return mpay_pb.PayStatusRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_PayStatusResponse(arg) { - if (!(arg instanceof mpay_pb.PayStatusResponse)) { - throw new Error('Expected argument of type mpay.PayStatusResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_PayStatusResponse(buffer_arg) { - return mpay_pb.PayStatusResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_ResetPathMemoryRequest(arg) { - if (!(arg instanceof mpay_pb.ResetPathMemoryRequest)) { - throw new Error('Expected argument of type mpay.ResetPathMemoryRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_ResetPathMemoryRequest(buffer_arg) { - return mpay_pb.ResetPathMemoryRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_mpay_ResetPathMemoryResponse(arg) { - if (!(arg instanceof mpay_pb.ResetPathMemoryResponse)) { - throw new Error('Expected argument of type mpay.ResetPathMemoryResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_mpay_ResetPathMemoryResponse(buffer_arg) { - return mpay_pb.ResetPathMemoryResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -var MpayService = exports.MpayService = { - getInfo: { - path: '/mpay.Mpay/GetInfo', - requestStream: false, - responseStream: false, - requestType: mpay_pb.GetInfoRequest, - responseType: mpay_pb.GetInfoResponse, - requestSerialize: serialize_mpay_GetInfoRequest, - requestDeserialize: deserialize_mpay_GetInfoRequest, - responseSerialize: serialize_mpay_GetInfoResponse, - responseDeserialize: deserialize_mpay_GetInfoResponse, - }, - getRoutes: { - path: '/mpay.Mpay/GetRoutes', - requestStream: false, - responseStream: false, - requestType: mpay_pb.GetRoutesRequest, - responseType: mpay_pb.GetRoutesResponse, - requestSerialize: serialize_mpay_GetRoutesRequest, - requestDeserialize: deserialize_mpay_GetRoutesRequest, - responseSerialize: serialize_mpay_GetRoutesResponse, - responseDeserialize: deserialize_mpay_GetRoutesResponse, - }, - listPayments: { - path: '/mpay.Mpay/ListPayments', - requestStream: false, - responseStream: false, - requestType: mpay_pb.ListPaymentsRequest, - responseType: mpay_pb.ListPaymentsResponse, - requestSerialize: serialize_mpay_ListPaymentsRequest, - requestDeserialize: deserialize_mpay_ListPaymentsRequest, - responseSerialize: serialize_mpay_ListPaymentsResponse, - responseDeserialize: deserialize_mpay_ListPaymentsResponse, - }, - pay: { - path: '/mpay.Mpay/Pay', - requestStream: false, - responseStream: false, - requestType: mpay_pb.PayRequest, - responseType: mpay_pb.PayResponse, - requestSerialize: serialize_mpay_PayRequest, - requestDeserialize: deserialize_mpay_PayRequest, - responseSerialize: serialize_mpay_PayResponse, - responseDeserialize: deserialize_mpay_PayResponse, - }, - resetPathMemory: { - path: '/mpay.Mpay/ResetPathMemory', - requestStream: false, - responseStream: false, - requestType: mpay_pb.ResetPathMemoryRequest, - responseType: mpay_pb.ResetPathMemoryResponse, - requestSerialize: serialize_mpay_ResetPathMemoryRequest, - requestDeserialize: deserialize_mpay_ResetPathMemoryRequest, - responseSerialize: serialize_mpay_ResetPathMemoryResponse, - responseDeserialize: deserialize_mpay_ResetPathMemoryResponse, - }, - // Workaround to expose the paystatus command via gRPC, since CLN doesn't -payStatus: { - path: '/mpay.Mpay/PayStatus', - requestStream: false, - responseStream: false, - requestType: mpay_pb.PayStatusRequest, - responseType: mpay_pb.PayStatusResponse, - requestSerialize: serialize_mpay_PayStatusRequest, - requestDeserialize: deserialize_mpay_PayStatusRequest, - responseSerialize: serialize_mpay_PayStatusResponse, - responseDeserialize: deserialize_mpay_PayStatusResponse, - }, -}; - -exports.MpayClient = grpc.makeGenericClientConstructor(MpayService); diff --git a/lib/proto/mpay/mpay_pb.d.ts b/lib/proto/mpay/mpay_pb.d.ts deleted file mode 100644 index 582d5945..00000000 --- a/lib/proto/mpay/mpay_pb.d.ts +++ /dev/null @@ -1,736 +0,0 @@ -// package: mpay -// file: mpay.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class GetInfoRequest extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoRequest): GetInfoRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoRequest; - static deserializeBinaryFromReader(message: GetInfoRequest, reader: jspb.BinaryReader): GetInfoRequest; -} - -export namespace GetInfoRequest { - export type AsObject = { - } -} - -export class GetInfoResponse extends jspb.Message { - getVersion(): string; - setVersion(value: string): GetInfoResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetInfoResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetInfoResponse): GetInfoResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetInfoResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetInfoResponse; - static deserializeBinaryFromReader(message: GetInfoResponse, reader: jspb.BinaryReader): GetInfoResponse; -} - -export namespace GetInfoResponse { - export type AsObject = { - version: string, - } -} - -export class GetRoutesRequest extends jspb.Message { - - hasDestination(): boolean; - clearDestination(): void; - getDestination(): string | undefined; - setDestination(value: string): GetRoutesRequest; - - hasMinSuccess(): boolean; - clearMinSuccess(): void; - getMinSuccess(): number | undefined; - setMinSuccess(value: number): GetRoutesRequest; - - hasMinSuccessEma(): boolean; - clearMinSuccessEma(): void; - getMinSuccessEma(): number | undefined; - setMinSuccessEma(value: number): GetRoutesRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetRoutesRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetRoutesRequest): GetRoutesRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetRoutesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetRoutesRequest; - static deserializeBinaryFromReader(message: GetRoutesRequest, reader: jspb.BinaryReader): GetRoutesRequest; -} - -export namespace GetRoutesRequest { - export type AsObject = { - destination?: string, - minSuccess?: number, - minSuccessEma?: number, - } -} - -export class GetRoutesResponse extends jspb.Message { - - getRoutesMap(): jspb.Map; - clearRoutesMap(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetRoutesResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetRoutesResponse): GetRoutesResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetRoutesResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetRoutesResponse; - static deserializeBinaryFromReader(message: GetRoutesResponse, reader: jspb.BinaryReader): GetRoutesResponse; -} - -export namespace GetRoutesResponse { - export type AsObject = { - - routesMap: Array<[string, GetRoutesResponse.Routes.AsObject]>, - } - - - export class Routes extends jspb.Message { - clearRoutesList(): void; - getRoutesList(): Array; - setRoutesList(value: Array): Routes; - addRoutes(value?: GetRoutesResponse.Routes.Route, index?: number): GetRoutesResponse.Routes.Route; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Routes.AsObject; - static toObject(includeInstance: boolean, msg: Routes): Routes.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Routes, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Routes; - static deserializeBinaryFromReader(message: Routes, reader: jspb.BinaryReader): Routes; - } - - export namespace Routes { - export type AsObject = { - routesList: Array, - } - - - export class Route extends jspb.Message { - clearRouteList(): void; - getRouteList(): Array; - setRouteList(value: Array): Route; - addRoute(value: string, index?: number): string; - getSuccessRate(): number; - setSuccessRate(value: number): Route; - getSuccessRateEma(): number; - setSuccessRateEma(value: number): Route; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Route.AsObject; - static toObject(includeInstance: boolean, msg: Route): Route.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Route, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Route; - static deserializeBinaryFromReader(message: Route, reader: jspb.BinaryReader): Route; - } - - export namespace Route { - export type AsObject = { - routeList: Array, - successRate: number, - successRateEma: number, - } - } - - } - -} - -export class ListPaymentsRequest extends jspb.Message { - - hasBolt11(): boolean; - clearBolt11(): void; - getBolt11(): string; - setBolt11(value: string): ListPaymentsRequest; - - hasPaymentHash(): boolean; - clearPaymentHash(): void; - getPaymentHash(): string; - setPaymentHash(value: string): ListPaymentsRequest; - - hasPagination(): boolean; - clearPagination(): void; - getPagination(): PaginationParams | undefined; - setPagination(value?: PaginationParams): ListPaymentsRequest; - - getIdentifierCase(): ListPaymentsRequest.IdentifierCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPaymentsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListPaymentsRequest): ListPaymentsRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPaymentsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPaymentsRequest; - static deserializeBinaryFromReader(message: ListPaymentsRequest, reader: jspb.BinaryReader): ListPaymentsRequest; -} - -export namespace ListPaymentsRequest { - export type AsObject = { - bolt11: string, - paymentHash: string, - pagination?: PaginationParams.AsObject, - } - - export enum IdentifierCase { - IDENTIFIER_NOT_SET = 0, - BOLT11 = 1, - PAYMENT_HASH = 2, - PAGINATION = 3, - } - -} - -export class PaginationParams extends jspb.Message { - getOffset(): number; - setOffset(value: number): PaginationParams; - getLimit(): number; - setLimit(value: number): PaginationParams; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PaginationParams.AsObject; - static toObject(includeInstance: boolean, msg: PaginationParams): PaginationParams.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PaginationParams, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PaginationParams; - static deserializeBinaryFromReader(message: PaginationParams, reader: jspb.BinaryReader): PaginationParams; -} - -export namespace PaginationParams { - export type AsObject = { - offset: number, - limit: number, - } -} - -export class ListPaymentsResponse extends jspb.Message { - clearPaymentsList(): void; - getPaymentsList(): Array; - setPaymentsList(value: Array): ListPaymentsResponse; - addPayments(value?: ListPaymentsResponse.Payment, index?: number): ListPaymentsResponse.Payment; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListPaymentsResponse.AsObject; - static toObject(includeInstance: boolean, msg: ListPaymentsResponse): ListPaymentsResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListPaymentsResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListPaymentsResponse; - static deserializeBinaryFromReader(message: ListPaymentsResponse, reader: jspb.BinaryReader): ListPaymentsResponse; -} - -export namespace ListPaymentsResponse { - export type AsObject = { - paymentsList: Array, - } - - - export class Payment extends jspb.Message { - getId(): number; - setId(value: number): Payment; - getDestination(): string; - setDestination(value: string): Payment; - getPaymentHash(): string; - setPaymentHash(value: string): Payment; - getAmount(): number; - setAmount(value: number): Payment; - getOk(): boolean; - setOk(value: boolean): Payment; - clearAttemptsList(): void; - getAttemptsList(): Array; - setAttemptsList(value: Array): Payment; - addAttempts(value?: ListPaymentsResponse.Payment.Attempt, index?: number): ListPaymentsResponse.Payment.Attempt; - getCreatedAt(): number; - setCreatedAt(value: number): Payment; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Payment.AsObject; - static toObject(includeInstance: boolean, msg: Payment): Payment.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Payment, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Payment; - static deserializeBinaryFromReader(message: Payment, reader: jspb.BinaryReader): Payment; - } - - export namespace Payment { - export type AsObject = { - id: number, - destination: string, - paymentHash: string, - amount: number, - ok: boolean, - attemptsList: Array, - createdAt: number, - } - - - export class Attempt extends jspb.Message { - getId(): number; - setId(value: number): Attempt; - getOk(): boolean; - setOk(value: boolean): Attempt; - getTime(): number; - setTime(value: number): Attempt; - clearHopsList(): void; - getHopsList(): Array; - setHopsList(value: Array): Attempt; - addHops(value?: ListPaymentsResponse.Payment.Attempt.Hop, index?: number): ListPaymentsResponse.Payment.Attempt.Hop; - getCreatedAt(): number; - setCreatedAt(value: number): Attempt; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Attempt.AsObject; - static toObject(includeInstance: boolean, msg: Attempt): Attempt.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Attempt, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Attempt; - static deserializeBinaryFromReader(message: Attempt, reader: jspb.BinaryReader): Attempt; - } - - export namespace Attempt { - export type AsObject = { - id: number, - ok: boolean, - time: number, - hopsList: Array, - createdAt: number, - } - - - export class Hop extends jspb.Message { - getId(): number; - setId(value: number): Hop; - getNode(): string; - setNode(value: string): Hop; - getChannel(): string; - setChannel(value: string): Hop; - getDirection(): number; - setDirection(value: number): Hop; - getOk(): boolean; - setOk(value: boolean): Hop; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Hop.AsObject; - static toObject(includeInstance: boolean, msg: Hop): Hop.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Hop, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Hop; - static deserializeBinaryFromReader(message: Hop, reader: jspb.BinaryReader): Hop; - } - - export namespace Hop { - export type AsObject = { - id: number, - node: string, - channel: string, - direction: number, - ok: boolean, - } - } - - } - - } - -} - -export class PayRequest extends jspb.Message { - getBolt11(): string; - setBolt11(value: string): PayRequest; - - hasMaxFeeMsat(): boolean; - clearMaxFeeMsat(): void; - getMaxFeeMsat(): number | undefined; - setMaxFeeMsat(value: number): PayRequest; - - hasExemptFeeMsat(): boolean; - clearExemptFeeMsat(): void; - getExemptFeeMsat(): number | undefined; - setExemptFeeMsat(value: number): PayRequest; - - hasTimeout(): boolean; - clearTimeout(): void; - getTimeout(): number | undefined; - setTimeout(value: number): PayRequest; - - hasMaxDelay(): boolean; - clearMaxDelay(): void; - getMaxDelay(): number | undefined; - setMaxDelay(value: number): PayRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayRequest.AsObject; - static toObject(includeInstance: boolean, msg: PayRequest): PayRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayRequest; - static deserializeBinaryFromReader(message: PayRequest, reader: jspb.BinaryReader): PayRequest; -} - -export namespace PayRequest { - export type AsObject = { - bolt11: string, - maxFeeMsat?: number, - exemptFeeMsat?: number, - timeout?: number, - maxDelay?: number, - } -} - -export class PayResponse extends jspb.Message { - getPaymentHash(): string; - setPaymentHash(value: string): PayResponse; - getPaymentPreimage(): string; - setPaymentPreimage(value: string): PayResponse; - getFeeMsat(): number; - setFeeMsat(value: number): PayResponse; - getTime(): number; - setTime(value: number): PayResponse; - getDestination(): string; - setDestination(value: string): PayResponse; - getAmountMsat(): number; - setAmountMsat(value: number): PayResponse; - getAmountSentMsat(): number; - setAmountSentMsat(value: number): PayResponse; - getParts(): number; - setParts(value: number): PayResponse; - getStatus(): string; - setStatus(value: string): PayResponse; - getCreatedAt(): number; - setCreatedAt(value: number): PayResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayResponse.AsObject; - static toObject(includeInstance: boolean, msg: PayResponse): PayResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayResponse; - static deserializeBinaryFromReader(message: PayResponse, reader: jspb.BinaryReader): PayResponse; -} - -export namespace PayResponse { - export type AsObject = { - paymentHash: string, - paymentPreimage: string, - feeMsat: number, - time: number, - destination: string, - amountMsat: number, - amountSentMsat: number, - parts: number, - status: string, - createdAt: number, - } -} - -export class ResetPathMemoryRequest extends jspb.Message { - - hasExcludePermanentMemory(): boolean; - clearExcludePermanentMemory(): void; - getExcludePermanentMemory(): boolean | undefined; - setExcludePermanentMemory(value: boolean): ResetPathMemoryRequest; - - hasExcludeTemporaryMemory(): boolean; - clearExcludeTemporaryMemory(): void; - getExcludeTemporaryMemory(): boolean | undefined; - setExcludeTemporaryMemory(value: boolean): ResetPathMemoryRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResetPathMemoryRequest.AsObject; - static toObject(includeInstance: boolean, msg: ResetPathMemoryRequest): ResetPathMemoryRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResetPathMemoryRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResetPathMemoryRequest; - static deserializeBinaryFromReader(message: ResetPathMemoryRequest, reader: jspb.BinaryReader): ResetPathMemoryRequest; -} - -export namespace ResetPathMemoryRequest { - export type AsObject = { - excludePermanentMemory?: boolean, - excludeTemporaryMemory?: boolean, - } -} - -export class ResetPathMemoryResponse extends jspb.Message { - getPayments(): number; - setPayments(value: number): ResetPathMemoryResponse; - getAttempts(): number; - setAttempts(value: number): ResetPathMemoryResponse; - getHops(): number; - setHops(value: number): ResetPathMemoryResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResetPathMemoryResponse.AsObject; - static toObject(includeInstance: boolean, msg: ResetPathMemoryResponse): ResetPathMemoryResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResetPathMemoryResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResetPathMemoryResponse; - static deserializeBinaryFromReader(message: ResetPathMemoryResponse, reader: jspb.BinaryReader): ResetPathMemoryResponse; -} - -export namespace ResetPathMemoryResponse { - export type AsObject = { - payments: number, - attempts: number, - hops: number, - } -} - -export class PayStatusRequest extends jspb.Message { - - hasInvoice(): boolean; - clearInvoice(): void; - getInvoice(): string | undefined; - setInvoice(value: string): PayStatusRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayStatusRequest.AsObject; - static toObject(includeInstance: boolean, msg: PayStatusRequest): PayStatusRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayStatusRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayStatusRequest; - static deserializeBinaryFromReader(message: PayStatusRequest, reader: jspb.BinaryReader): PayStatusRequest; -} - -export namespace PayStatusRequest { - export type AsObject = { - invoice?: string, - } -} - -export class PayStatusResponse extends jspb.Message { - clearStatusList(): void; - getStatusList(): Array; - setStatusList(value: Array): PayStatusResponse; - addStatus(value?: PayStatusResponse.PayStatus, index?: number): PayStatusResponse.PayStatus; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayStatusResponse.AsObject; - static toObject(includeInstance: boolean, msg: PayStatusResponse): PayStatusResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayStatusResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayStatusResponse; - static deserializeBinaryFromReader(message: PayStatusResponse, reader: jspb.BinaryReader): PayStatusResponse; -} - -export namespace PayStatusResponse { - export type AsObject = { - statusList: Array, - } - - - export class PayStatus extends jspb.Message { - - hasBolt11(): boolean; - clearBolt11(): void; - getBolt11(): string | undefined; - setBolt11(value: string): PayStatus; - - hasBolt12(): boolean; - clearBolt12(): void; - getBolt12(): string | undefined; - setBolt12(value: string): PayStatus; - getAmountMsat(): number; - setAmountMsat(value: number): PayStatus; - getDestination(): string; - setDestination(value: string): PayStatus; - clearAttemptsList(): void; - getAttemptsList(): Array; - setAttemptsList(value: Array): PayStatus; - addAttempts(value?: PayStatusResponse.PayStatus.Attempt, index?: number): PayStatusResponse.PayStatus.Attempt; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PayStatus.AsObject; - static toObject(includeInstance: boolean, msg: PayStatus): PayStatus.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PayStatus, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PayStatus; - static deserializeBinaryFromReader(message: PayStatus, reader: jspb.BinaryReader): PayStatus; - } - - export namespace PayStatus { - export type AsObject = { - bolt11?: string, - bolt12?: string, - amountMsat: number, - destination: string, - attemptsList: Array, - } - - - export class Attempt extends jspb.Message { - getStrategy(): string; - setStrategy(value: string): Attempt; - getStartTime(): number; - setStartTime(value: number): Attempt; - getAgeInSeconds(): number; - setAgeInSeconds(value: number): Attempt; - - hasEndTime(): boolean; - clearEndTime(): void; - getEndTime(): number | undefined; - setEndTime(value: number): Attempt; - getState(): PayStatusResponse.PayStatus.Attempt.AttemptState; - setState(value: PayStatusResponse.PayStatus.Attempt.AttemptState): Attempt; - - hasSuccess(): boolean; - clearSuccess(): void; - getSuccess(): PayStatusResponse.PayStatus.Attempt.Success | undefined; - setSuccess(value?: PayStatusResponse.PayStatus.Attempt.Success): Attempt; - - hasFailure(): boolean; - clearFailure(): void; - getFailure(): PayStatusResponse.PayStatus.Attempt.Failure | undefined; - setFailure(value?: PayStatusResponse.PayStatus.Attempt.Failure): Attempt; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Attempt.AsObject; - static toObject(includeInstance: boolean, msg: Attempt): Attempt.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Attempt, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Attempt; - static deserializeBinaryFromReader(message: Attempt, reader: jspb.BinaryReader): Attempt; - } - - export namespace Attempt { - export type AsObject = { - strategy: string, - startTime: number, - ageInSeconds: number, - endTime?: number, - state: PayStatusResponse.PayStatus.Attempt.AttemptState, - success?: PayStatusResponse.PayStatus.Attempt.Success.AsObject, - failure?: PayStatusResponse.PayStatus.Attempt.Failure.AsObject, - } - - - export class Success extends jspb.Message { - getId(): number; - setId(value: number): Success; - getPaymentPreimage(): string; - setPaymentPreimage(value: string): Success; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Success.AsObject; - static toObject(includeInstance: boolean, msg: Success): Success.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Success, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Success; - static deserializeBinaryFromReader(message: Success, reader: jspb.BinaryReader): Success; - } - - export namespace Success { - export type AsObject = { - id: number, - paymentPreimage: string, - } - } - - export class Failure extends jspb.Message { - getMessage(): string; - setMessage(value: string): Failure; - getCode(): number; - setCode(value: number): Failure; - - hasData(): boolean; - clearData(): void; - getData(): PayStatusResponse.PayStatus.Attempt.Failure.Data | undefined; - setData(value?: PayStatusResponse.PayStatus.Attempt.Failure.Data): Failure; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Failure.AsObject; - static toObject(includeInstance: boolean, msg: Failure): Failure.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Failure, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Failure; - static deserializeBinaryFromReader(message: Failure, reader: jspb.BinaryReader): Failure; - } - - export namespace Failure { - export type AsObject = { - message: string, - code: number, - data?: PayStatusResponse.PayStatus.Attempt.Failure.Data.AsObject, - } - - - export class Data extends jspb.Message { - getId(): number; - setId(value: number): Data; - getRawMessage(): string; - setRawMessage(value: string): Data; - getFailCode(): number; - setFailCode(value: number): Data; - getFailCodename(): string; - setFailCodename(value: string): Data; - getErringIndex(): number; - setErringIndex(value: number): Data; - getErringNode(): string; - setErringNode(value: string): Data; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Data.AsObject; - static toObject(includeInstance: boolean, msg: Data): Data.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Data, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Data; - static deserializeBinaryFromReader(message: Data, reader: jspb.BinaryReader): Data; - } - - export namespace Data { - export type AsObject = { - id: number, - rawMessage: string, - failCode: number, - failCodename: string, - erringIndex: number, - erringNode: string, - } - } - - } - - - export enum AttemptState { - ATTEMPT_PENDING = 0, - ATTEMPT_COMPLETED = 1, - } - - } - - } - -} diff --git a/lib/proto/mpay/mpay_pb.js b/lib/proto/mpay/mpay_pb.js deleted file mode 100644 index 255bd0d6..00000000 --- a/lib/proto/mpay/mpay_pb.js +++ /dev/null @@ -1,5741 +0,0 @@ -// source: mpay.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); - -goog.exportSymbol('proto.mpay.GetInfoRequest', null, global); -goog.exportSymbol('proto.mpay.GetInfoResponse', null, global); -goog.exportSymbol('proto.mpay.GetRoutesRequest', null, global); -goog.exportSymbol('proto.mpay.GetRoutesResponse', null, global); -goog.exportSymbol('proto.mpay.GetRoutesResponse.Routes', null, global); -goog.exportSymbol('proto.mpay.GetRoutesResponse.Routes.Route', null, global); -goog.exportSymbol('proto.mpay.ListPaymentsRequest', null, global); -goog.exportSymbol('proto.mpay.ListPaymentsRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.mpay.ListPaymentsResponse', null, global); -goog.exportSymbol('proto.mpay.ListPaymentsResponse.Payment', null, global); -goog.exportSymbol('proto.mpay.ListPaymentsResponse.Payment.Attempt', null, global); -goog.exportSymbol('proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop', null, global); -goog.exportSymbol('proto.mpay.PaginationParams', null, global); -goog.exportSymbol('proto.mpay.PayRequest', null, global); -goog.exportSymbol('proto.mpay.PayResponse', null, global); -goog.exportSymbol('proto.mpay.PayStatusRequest', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse.PayStatus', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse.PayStatus.Attempt', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data', null, global); -goog.exportSymbol('proto.mpay.PayStatusResponse.PayStatus.Attempt.Success', null, global); -goog.exportSymbol('proto.mpay.ResetPathMemoryRequest', null, global); -goog.exportSymbol('proto.mpay.ResetPathMemoryResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.GetInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.GetInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.GetInfoRequest.displayName = 'proto.mpay.GetInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.GetInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.GetInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.GetInfoResponse.displayName = 'proto.mpay.GetInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.GetRoutesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.GetRoutesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.GetRoutesRequest.displayName = 'proto.mpay.GetRoutesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.GetRoutesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.GetRoutesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.GetRoutesResponse.displayName = 'proto.mpay.GetRoutesResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.GetRoutesResponse.Routes = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.GetRoutesResponse.Routes.repeatedFields_, null); -}; -goog.inherits(proto.mpay.GetRoutesResponse.Routes, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.GetRoutesResponse.Routes.displayName = 'proto.mpay.GetRoutesResponse.Routes'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.GetRoutesResponse.Routes.Route = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.GetRoutesResponse.Routes.Route.repeatedFields_, null); -}; -goog.inherits(proto.mpay.GetRoutesResponse.Routes.Route, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.GetRoutesResponse.Routes.Route.displayName = 'proto.mpay.GetRoutesResponse.Routes.Route'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ListPaymentsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.mpay.ListPaymentsRequest.oneofGroups_); -}; -goog.inherits(proto.mpay.ListPaymentsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ListPaymentsRequest.displayName = 'proto.mpay.ListPaymentsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PaginationParams = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PaginationParams, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PaginationParams.displayName = 'proto.mpay.PaginationParams'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ListPaymentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.ListPaymentsResponse.repeatedFields_, null); -}; -goog.inherits(proto.mpay.ListPaymentsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ListPaymentsResponse.displayName = 'proto.mpay.ListPaymentsResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ListPaymentsResponse.Payment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.ListPaymentsResponse.Payment.repeatedFields_, null); -}; -goog.inherits(proto.mpay.ListPaymentsResponse.Payment, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ListPaymentsResponse.Payment.displayName = 'proto.mpay.ListPaymentsResponse.Payment'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.ListPaymentsResponse.Payment.Attempt.repeatedFields_, null); -}; -goog.inherits(proto.mpay.ListPaymentsResponse.Payment.Attempt, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ListPaymentsResponse.Payment.Attempt.displayName = 'proto.mpay.ListPaymentsResponse.Payment.Attempt'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.displayName = 'proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayRequest.displayName = 'proto.mpay.PayRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayResponse.displayName = 'proto.mpay.PayResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ResetPathMemoryRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.ResetPathMemoryRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ResetPathMemoryRequest.displayName = 'proto.mpay.ResetPathMemoryRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.ResetPathMemoryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.ResetPathMemoryResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.ResetPathMemoryResponse.displayName = 'proto.mpay.ResetPathMemoryResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayStatusRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusRequest.displayName = 'proto.mpay.PayStatusRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.PayStatusResponse.repeatedFields_, null); -}; -goog.inherits(proto.mpay.PayStatusResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusResponse.displayName = 'proto.mpay.PayStatusResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusResponse.PayStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.mpay.PayStatusResponse.PayStatus.repeatedFields_, null); -}; -goog.inherits(proto.mpay.PayStatusResponse.PayStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusResponse.PayStatus.displayName = 'proto.mpay.PayStatusResponse.PayStatus'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayStatusResponse.PayStatus.Attempt, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusResponse.PayStatus.Attempt.displayName = 'proto.mpay.PayStatusResponse.PayStatus.Attempt'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayStatusResponse.PayStatus.Attempt.Success, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.displayName = 'proto.mpay.PayStatusResponse.PayStatus.Attempt.Success'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.displayName = 'proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.displayName = 'proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.GetInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.GetInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.GetInfoRequest} - */ -proto.mpay.GetInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.GetInfoRequest; - return proto.mpay.GetInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.GetInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.GetInfoRequest} - */ -proto.mpay.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.GetInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.GetInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.GetInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.GetInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.GetInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.GetInfoResponse} - */ -proto.mpay.GetInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.GetInfoResponse; - return proto.mpay.GetInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.GetInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.GetInfoResponse} - */ -proto.mpay.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.GetInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.GetInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.GetInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string version = 1; - * @return {string} - */ -proto.mpay.GetInfoResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.GetInfoResponse} returns this - */ -proto.mpay.GetInfoResponse.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.GetRoutesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.GetRoutesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.GetRoutesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - minSuccess: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - minSuccessEma: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.GetRoutesRequest} - */ -proto.mpay.GetRoutesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.GetRoutesRequest; - return proto.mpay.GetRoutesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.GetRoutesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.GetRoutesRequest} - */ -proto.mpay.GetRoutesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 2: - var value = /** @type {number} */ (reader.readFloat()); - msg.setMinSuccess(value); - break; - case 3: - var value = /** @type {number} */ (reader.readFloat()); - msg.setMinSuccessEma(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.GetRoutesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.GetRoutesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.GetRoutesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeFloat( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeFloat( - 3, - f - ); - } -}; - - -/** - * optional string destination = 1; - * @return {string} - */ -proto.mpay.GetRoutesRequest.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.GetRoutesRequest} returns this - */ -proto.mpay.GetRoutesRequest.prototype.setDestination = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.GetRoutesRequest} returns this - */ -proto.mpay.GetRoutesRequest.prototype.clearDestination = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.GetRoutesRequest.prototype.hasDestination = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional float min_success = 2; - * @return {number} - */ -proto.mpay.GetRoutesRequest.prototype.getMinSuccess = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.GetRoutesRequest} returns this - */ -proto.mpay.GetRoutesRequest.prototype.setMinSuccess = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.GetRoutesRequest} returns this - */ -proto.mpay.GetRoutesRequest.prototype.clearMinSuccess = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.GetRoutesRequest.prototype.hasMinSuccess = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional float min_success_ema = 3; - * @return {number} - */ -proto.mpay.GetRoutesRequest.prototype.getMinSuccessEma = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.GetRoutesRequest} returns this - */ -proto.mpay.GetRoutesRequest.prototype.setMinSuccessEma = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.GetRoutesRequest} returns this - */ -proto.mpay.GetRoutesRequest.prototype.clearMinSuccessEma = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.GetRoutesRequest.prototype.hasMinSuccessEma = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.GetRoutesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.GetRoutesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.GetRoutesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - routesMap: (f = msg.getRoutesMap()) ? f.toObject(includeInstance, proto.mpay.GetRoutesResponse.Routes.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.GetRoutesResponse} - */ -proto.mpay.GetRoutesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.GetRoutesResponse; - return proto.mpay.GetRoutesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.GetRoutesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.GetRoutesResponse} - */ -proto.mpay.GetRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getRoutesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.mpay.GetRoutesResponse.Routes.deserializeBinaryFromReader, "", new proto.mpay.GetRoutesResponse.Routes()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.GetRoutesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.GetRoutesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.GetRoutesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRoutesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.mpay.GetRoutesResponse.Routes.serializeBinaryToWriter); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.GetRoutesResponse.Routes.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.GetRoutesResponse.Routes.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.GetRoutesResponse.Routes.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.GetRoutesResponse.Routes} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesResponse.Routes.toObject = function(includeInstance, msg) { - var f, obj = { - routesList: jspb.Message.toObjectList(msg.getRoutesList(), - proto.mpay.GetRoutesResponse.Routes.Route.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.GetRoutesResponse.Routes} - */ -proto.mpay.GetRoutesResponse.Routes.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.GetRoutesResponse.Routes; - return proto.mpay.GetRoutesResponse.Routes.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.GetRoutesResponse.Routes} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.GetRoutesResponse.Routes} - */ -proto.mpay.GetRoutesResponse.Routes.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = new proto.mpay.GetRoutesResponse.Routes.Route; - reader.readMessage(value,proto.mpay.GetRoutesResponse.Routes.Route.deserializeBinaryFromReader); - msg.addRoutes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.GetRoutesResponse.Routes.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.GetRoutesResponse.Routes.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.GetRoutesResponse.Routes} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesResponse.Routes.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRoutesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.mpay.GetRoutesResponse.Routes.Route.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.GetRoutesResponse.Routes.Route.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.GetRoutesResponse.Routes.Route.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.GetRoutesResponse.Routes.Route} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesResponse.Routes.Route.toObject = function(includeInstance, msg) { - var f, obj = { - routeList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - successRate: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), - successRateEma: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} - */ -proto.mpay.GetRoutesResponse.Routes.Route.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.GetRoutesResponse.Routes.Route; - return proto.mpay.GetRoutesResponse.Routes.Route.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.GetRoutesResponse.Routes.Route} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} - */ -proto.mpay.GetRoutesResponse.Routes.Route.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addRoute(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setSuccessRate(value); - break; - case 3: - var value = /** @type {number} */ (reader.readDouble()); - msg.setSuccessRateEma(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.GetRoutesResponse.Routes.Route.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.GetRoutesResponse.Routes.Route} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.GetRoutesResponse.Routes.Route.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRouteList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getSuccessRate(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getSuccessRateEma(); - if (f !== 0.0) { - writer.writeDouble( - 3, - f - ); - } -}; - - -/** - * repeated string route = 1; - * @return {!Array} - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.getRouteList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} returns this - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.setRouteList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} returns this - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.addRoute = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} returns this - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.clearRouteList = function() { - return this.setRouteList([]); -}; - - -/** - * optional double success_rate = 2; - * @return {number} - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.getSuccessRate = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} returns this - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.setSuccessRate = function(value) { - return jspb.Message.setProto3FloatField(this, 2, value); -}; - - -/** - * optional double success_rate_ema = 3; - * @return {number} - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.getSuccessRateEma = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} returns this - */ -proto.mpay.GetRoutesResponse.Routes.Route.prototype.setSuccessRateEma = function(value) { - return jspb.Message.setProto3FloatField(this, 3, value); -}; - - -/** - * repeated Route routes = 2; - * @return {!Array} - */ -proto.mpay.GetRoutesResponse.Routes.prototype.getRoutesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.mpay.GetRoutesResponse.Routes.Route, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.GetRoutesResponse.Routes} returns this -*/ -proto.mpay.GetRoutesResponse.Routes.prototype.setRoutesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.mpay.GetRoutesResponse.Routes.Route=} opt_value - * @param {number=} opt_index - * @return {!proto.mpay.GetRoutesResponse.Routes.Route} - */ -proto.mpay.GetRoutesResponse.Routes.prototype.addRoutes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.mpay.GetRoutesResponse.Routes.Route, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.GetRoutesResponse.Routes} returns this - */ -proto.mpay.GetRoutesResponse.Routes.prototype.clearRoutesList = function() { - return this.setRoutesList([]); -}; - - -/** - * map routes = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.mpay.GetRoutesResponse.prototype.getRoutesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.mpay.GetRoutesResponse.Routes)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.mpay.GetRoutesResponse} returns this - */ -proto.mpay.GetRoutesResponse.prototype.clearRoutesMap = function() { - this.getRoutesMap().clear(); - return this;}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.mpay.ListPaymentsRequest.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.mpay.ListPaymentsRequest.IdentifierCase = { - IDENTIFIER_NOT_SET: 0, - BOLT11: 1, - PAYMENT_HASH: 2, - PAGINATION: 3 -}; - -/** - * @return {proto.mpay.ListPaymentsRequest.IdentifierCase} - */ -proto.mpay.ListPaymentsRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.mpay.ListPaymentsRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.mpay.ListPaymentsRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ListPaymentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ListPaymentsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ListPaymentsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - pagination: (f = msg.getPagination()) && proto.mpay.PaginationParams.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ListPaymentsRequest} - */ -proto.mpay.ListPaymentsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ListPaymentsRequest; - return proto.mpay.ListPaymentsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ListPaymentsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ListPaymentsRequest} - */ -proto.mpay.ListPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setBolt11(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); - break; - case 3: - var value = new proto.mpay.PaginationParams; - reader.readMessage(value,proto.mpay.PaginationParams.deserializeBinaryFromReader); - msg.setPagination(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ListPaymentsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ListPaymentsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ListPaymentsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } - f = message.getPagination(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.mpay.PaginationParams.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string bolt11 = 1; - * @return {string} - */ -proto.mpay.ListPaymentsRequest.prototype.getBolt11 = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.ListPaymentsRequest} returns this - */ -proto.mpay.ListPaymentsRequest.prototype.setBolt11 = function(value) { - return jspb.Message.setOneofField(this, 1, proto.mpay.ListPaymentsRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.ListPaymentsRequest} returns this - */ -proto.mpay.ListPaymentsRequest.prototype.clearBolt11 = function() { - return jspb.Message.setOneofField(this, 1, proto.mpay.ListPaymentsRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.ListPaymentsRequest.prototype.hasBolt11 = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string payment_hash = 2; - * @return {string} - */ -proto.mpay.ListPaymentsRequest.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.ListPaymentsRequest} returns this - */ -proto.mpay.ListPaymentsRequest.prototype.setPaymentHash = function(value) { - return jspb.Message.setOneofField(this, 2, proto.mpay.ListPaymentsRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.ListPaymentsRequest} returns this - */ -proto.mpay.ListPaymentsRequest.prototype.clearPaymentHash = function() { - return jspb.Message.setOneofField(this, 2, proto.mpay.ListPaymentsRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.ListPaymentsRequest.prototype.hasPaymentHash = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional PaginationParams pagination = 3; - * @return {?proto.mpay.PaginationParams} - */ -proto.mpay.ListPaymentsRequest.prototype.getPagination = function() { - return /** @type{?proto.mpay.PaginationParams} */ ( - jspb.Message.getWrapperField(this, proto.mpay.PaginationParams, 3)); -}; - - -/** - * @param {?proto.mpay.PaginationParams|undefined} value - * @return {!proto.mpay.ListPaymentsRequest} returns this -*/ -proto.mpay.ListPaymentsRequest.prototype.setPagination = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.mpay.ListPaymentsRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.mpay.ListPaymentsRequest} returns this - */ -proto.mpay.ListPaymentsRequest.prototype.clearPagination = function() { - return this.setPagination(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.ListPaymentsRequest.prototype.hasPagination = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PaginationParams.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PaginationParams.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PaginationParams} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PaginationParams.toObject = function(includeInstance, msg) { - var f, obj = { - offset: jspb.Message.getFieldWithDefault(msg, 1, 0), - limit: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PaginationParams} - */ -proto.mpay.PaginationParams.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PaginationParams; - return proto.mpay.PaginationParams.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PaginationParams} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PaginationParams} - */ -proto.mpay.PaginationParams.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOffset(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PaginationParams.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PaginationParams.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PaginationParams} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PaginationParams.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOffset(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional uint64 offset = 1; - * @return {number} - */ -proto.mpay.PaginationParams.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PaginationParams} returns this - */ -proto.mpay.PaginationParams.prototype.setOffset = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 limit = 2; - * @return {number} - */ -proto.mpay.PaginationParams.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PaginationParams} returns this - */ -proto.mpay.PaginationParams.prototype.setLimit = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.ListPaymentsResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ListPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ListPaymentsResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ListPaymentsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), - proto.mpay.ListPaymentsResponse.Payment.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ListPaymentsResponse} - */ -proto.mpay.ListPaymentsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ListPaymentsResponse; - return proto.mpay.ListPaymentsResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ListPaymentsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ListPaymentsResponse} - */ -proto.mpay.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.mpay.ListPaymentsResponse.Payment; - reader.readMessage(value,proto.mpay.ListPaymentsResponse.Payment.deserializeBinaryFromReader); - msg.addPayments(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ListPaymentsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ListPaymentsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ListPaymentsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.mpay.ListPaymentsResponse.Payment.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.ListPaymentsResponse.Payment.repeatedFields_ = [6]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ListPaymentsResponse.Payment.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ListPaymentsResponse.Payment} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.Payment.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - destination: jspb.Message.getFieldWithDefault(msg, 2, ""), - paymentHash: jspb.Message.getFieldWithDefault(msg, 3, ""), - amount: jspb.Message.getFieldWithDefault(msg, 4, 0), - ok: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - attemptsList: jspb.Message.toObjectList(msg.getAttemptsList(), - proto.mpay.ListPaymentsResponse.Payment.Attempt.toObject, includeInstance), - createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ListPaymentsResponse.Payment} - */ -proto.mpay.ListPaymentsResponse.Payment.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ListPaymentsResponse.Payment; - return proto.mpay.ListPaymentsResponse.Payment.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ListPaymentsResponse.Payment} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ListPaymentsResponse.Payment} - */ -proto.mpay.ListPaymentsResponse.Payment.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmount(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOk(value); - break; - case 6: - var value = new proto.mpay.ListPaymentsResponse.Payment.Attempt; - reader.readMessage(value,proto.mpay.ListPaymentsResponse.Payment.Attempt.deserializeBinaryFromReader); - msg.addAttempts(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ListPaymentsResponse.Payment.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ListPaymentsResponse.Payment} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.Payment.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPaymentHash(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getOk(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getAttemptsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, - f, - proto.mpay.ListPaymentsResponse.Payment.Attempt.serializeBinaryToWriter - ); - } - f = message.getCreatedAt(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ListPaymentsResponse.Payment.Attempt.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - ok: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - time: jspb.Message.getFieldWithDefault(msg, 3, 0), - hopsList: jspb.Message.toObjectList(msg.getHopsList(), - proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.toObject, includeInstance), - createdAt: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ListPaymentsResponse.Payment.Attempt; - return proto.mpay.ListPaymentsResponse.Payment.Attempt.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOk(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTime(value); - break; - case 4: - var value = new proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop; - reader.readMessage(value,proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.deserializeBinaryFromReader); - msg.addHops(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ListPaymentsResponse.Payment.Attempt.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getOk(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getTime(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getHopsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.serializeBinaryToWriter - ); - } - f = message.getCreatedAt(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - node: jspb.Message.getFieldWithDefault(msg, 2, ""), - channel: jspb.Message.getFieldWithDefault(msg, 3, ""), - direction: jspb.Message.getFieldWithDefault(msg, 4, 0), - ok: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop; - return proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNode(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setChannel(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDirection(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOk(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getNode(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChannel(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getDirection(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getOk(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string node = 2; - * @return {string} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.getNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.setNode = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string channel = 3; - * @return {string} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.getChannel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.setChannel = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 direction = 4; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.getDirection = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.setDirection = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool ok = 5; - * @return {boolean} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.getOk = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop.prototype.setOk = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool ok = 2; - * @return {boolean} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.getOk = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.setOk = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional uint64 time = 3; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.getTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.setTime = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * repeated Hop hops = 4; - * @return {!Array} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.getHopsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} returns this -*/ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.setHopsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop=} opt_value - * @param {number=} opt_index - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.addHops = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.mpay.ListPaymentsResponse.Payment.Attempt.Hop, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.clearHopsList = function() { - return this.setHopsList([]); -}; - - -/** - * optional uint64 created_at = 5; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.getCreatedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.Attempt.prototype.setCreatedAt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string destination = 2; - * @return {string} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string payment_hash = 3; - * @return {string} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 amount = 4; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool ok = 5; - * @return {boolean} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getOk = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.setOk = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * repeated Attempt attempts = 6; - * @return {!Array} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getAttemptsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.mpay.ListPaymentsResponse.Payment.Attempt, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this -*/ -proto.mpay.ListPaymentsResponse.Payment.prototype.setAttemptsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); -}; - - -/** - * @param {!proto.mpay.ListPaymentsResponse.Payment.Attempt=} opt_value - * @param {number=} opt_index - * @return {!proto.mpay.ListPaymentsResponse.Payment.Attempt} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.addAttempts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.mpay.ListPaymentsResponse.Payment.Attempt, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.clearAttemptsList = function() { - return this.setAttemptsList([]); -}; - - -/** - * optional uint64 created_at = 7; - * @return {number} - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.getCreatedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ListPaymentsResponse.Payment} returns this - */ -proto.mpay.ListPaymentsResponse.Payment.prototype.setCreatedAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * repeated Payment payments = 1; - * @return {!Array} - */ -proto.mpay.ListPaymentsResponse.prototype.getPaymentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.mpay.ListPaymentsResponse.Payment, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.ListPaymentsResponse} returns this -*/ -proto.mpay.ListPaymentsResponse.prototype.setPaymentsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.mpay.ListPaymentsResponse.Payment=} opt_value - * @param {number=} opt_index - * @return {!proto.mpay.ListPaymentsResponse.Payment} - */ -proto.mpay.ListPaymentsResponse.prototype.addPayments = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.mpay.ListPaymentsResponse.Payment, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.ListPaymentsResponse} returns this - */ -proto.mpay.ListPaymentsResponse.prototype.clearPaymentsList = function() { - return this.setPaymentsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayRequest.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayRequest.toObject = function(includeInstance, msg) { - var f, obj = { - bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), - maxFeeMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), - exemptFeeMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - timeout: jspb.Message.getFieldWithDefault(msg, 4, 0), - maxDelay: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayRequest} - */ -proto.mpay.PayRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayRequest; - return proto.mpay.PayRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayRequest} - */ -proto.mpay.PayRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setBolt11(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxFeeMsat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setExemptFeeMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimeout(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxDelay(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBolt11(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint64( - 4, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeUint64( - 5, - f - ); - } -}; - - -/** - * optional string bolt11 = 1; - * @return {string} - */ -proto.mpay.PayRequest.prototype.getBolt11 = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.setBolt11 = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 max_fee_msat = 2; - * @return {number} - */ -proto.mpay.PayRequest.prototype.getMaxFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.setMaxFeeMsat = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.clearMaxFeeMsat = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayRequest.prototype.hasMaxFeeMsat = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint64 exempt_fee_msat = 3; - * @return {number} - */ -proto.mpay.PayRequest.prototype.getExemptFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.setExemptFeeMsat = function(value) { - return jspb.Message.setField(this, 3, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.clearExemptFeeMsat = function() { - return jspb.Message.setField(this, 3, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayRequest.prototype.hasExemptFeeMsat = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional uint64 timeout = 4; - * @return {number} - */ -proto.mpay.PayRequest.prototype.getTimeout = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.setTimeout = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.clearTimeout = function() { - return jspb.Message.setField(this, 4, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayRequest.prototype.hasTimeout = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional uint64 max_delay = 5; - * @return {number} - */ -proto.mpay.PayRequest.prototype.getMaxDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.setMaxDelay = function(value) { - return jspb.Message.setField(this, 5, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayRequest} returns this - */ -proto.mpay.PayRequest.prototype.clearMaxDelay = function() { - return jspb.Message.setField(this, 5, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayRequest.prototype.hasMaxDelay = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayResponse.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayResponse.toObject = function(includeInstance, msg) { - var f, obj = { - paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentPreimage: jspb.Message.getFieldWithDefault(msg, 2, ""), - feeMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - time: jspb.Message.getFieldWithDefault(msg, 4, 0), - destination: jspb.Message.getFieldWithDefault(msg, 5, ""), - amountMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - amountSentMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), - parts: jspb.Message.getFieldWithDefault(msg, 8, 0), - status: jspb.Message.getFieldWithDefault(msg, 9, ""), - createdAt: jspb.Message.getFieldWithDefault(msg, 10, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayResponse} - */ -proto.mpay.PayResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayResponse; - return proto.mpay.PayResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayResponse} - */ -proto.mpay.PayResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentPreimage(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTime(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmountMsat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmountSentMsat(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setParts(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setStatus(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPaymentHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPaymentPreimage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFeeMsat(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getTime(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getAmountMsat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getAmountSentMsat(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getParts(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getStatus(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getCreatedAt(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } -}; - - -/** - * optional string payment_hash = 1; - * @return {string} - */ -proto.mpay.PayResponse.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setPaymentHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string payment_preimage = 2; - * @return {string} - */ -proto.mpay.PayResponse.prototype.getPaymentPreimage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 fee_msat = 3; - * @return {number} - */ -proto.mpay.PayResponse.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setFeeMsat = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 time = 4; - * @return {number} - */ -proto.mpay.PayResponse.prototype.getTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string destination = 5; - * @return {string} - */ -proto.mpay.PayResponse.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional uint64 amount_msat = 6; - * @return {number} - */ -proto.mpay.PayResponse.prototype.getAmountMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setAmountMsat = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint64 amount_sent_msat = 7; - * @return {number} - */ -proto.mpay.PayResponse.prototype.getAmountSentMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setAmountSentMsat = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 parts = 8; - * @return {number} - */ -proto.mpay.PayResponse.prototype.getParts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setParts = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional string status = 9; - * @return {string} - */ -proto.mpay.PayResponse.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional uint64 created_at = 10; - * @return {number} - */ -proto.mpay.PayResponse.prototype.getCreatedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayResponse} returns this - */ -proto.mpay.PayResponse.prototype.setCreatedAt = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ResetPathMemoryRequest.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ResetPathMemoryRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ResetPathMemoryRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ResetPathMemoryRequest.toObject = function(includeInstance, msg) { - var f, obj = { - excludePermanentMemory: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - excludeTemporaryMemory: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ResetPathMemoryRequest} - */ -proto.mpay.ResetPathMemoryRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ResetPathMemoryRequest; - return proto.mpay.ResetPathMemoryRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ResetPathMemoryRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ResetPathMemoryRequest} - */ -proto.mpay.ResetPathMemoryRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExcludePermanentMemory(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExcludeTemporaryMemory(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ResetPathMemoryRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ResetPathMemoryRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ResetPathMemoryRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ResetPathMemoryRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( - 1, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bool exclude_permanent_memory = 1; - * @return {boolean} - */ -proto.mpay.ResetPathMemoryRequest.prototype.getExcludePermanentMemory = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.mpay.ResetPathMemoryRequest} returns this - */ -proto.mpay.ResetPathMemoryRequest.prototype.setExcludePermanentMemory = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.ResetPathMemoryRequest} returns this - */ -proto.mpay.ResetPathMemoryRequest.prototype.clearExcludePermanentMemory = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.ResetPathMemoryRequest.prototype.hasExcludePermanentMemory = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool exclude_temporary_memory = 2; - * @return {boolean} - */ -proto.mpay.ResetPathMemoryRequest.prototype.getExcludeTemporaryMemory = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.mpay.ResetPathMemoryRequest} returns this - */ -proto.mpay.ResetPathMemoryRequest.prototype.setExcludeTemporaryMemory = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.ResetPathMemoryRequest} returns this - */ -proto.mpay.ResetPathMemoryRequest.prototype.clearExcludeTemporaryMemory = function() { - return jspb.Message.setField(this, 2, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.ResetPathMemoryRequest.prototype.hasExcludeTemporaryMemory = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.ResetPathMemoryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.ResetPathMemoryResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.ResetPathMemoryResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ResetPathMemoryResponse.toObject = function(includeInstance, msg) { - var f, obj = { - payments: jspb.Message.getFieldWithDefault(msg, 1, 0), - attempts: jspb.Message.getFieldWithDefault(msg, 2, 0), - hops: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.ResetPathMemoryResponse} - */ -proto.mpay.ResetPathMemoryResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.ResetPathMemoryResponse; - return proto.mpay.ResetPathMemoryResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.ResetPathMemoryResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.ResetPathMemoryResponse} - */ -proto.mpay.ResetPathMemoryResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPayments(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAttempts(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setHops(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.ResetPathMemoryResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.ResetPathMemoryResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.ResetPathMemoryResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.ResetPathMemoryResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayments(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getAttempts(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getHops(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional uint64 payments = 1; - * @return {number} - */ -proto.mpay.ResetPathMemoryResponse.prototype.getPayments = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ResetPathMemoryResponse} returns this - */ -proto.mpay.ResetPathMemoryResponse.prototype.setPayments = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 attempts = 2; - * @return {number} - */ -proto.mpay.ResetPathMemoryResponse.prototype.getAttempts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ResetPathMemoryResponse} returns this - */ -proto.mpay.ResetPathMemoryResponse.prototype.setAttempts = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 hops = 3; - * @return {number} - */ -proto.mpay.ResetPathMemoryResponse.prototype.getHops = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.ResetPathMemoryResponse} returns this - */ -proto.mpay.ResetPathMemoryResponse.prototype.setHops = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusRequest.toObject = function(includeInstance, msg) { - var f, obj = { - invoice: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusRequest} - */ -proto.mpay.PayStatusRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusRequest; - return proto.mpay.PayStatusRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusRequest} - */ -proto.mpay.PayStatusRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setInvoice(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string invoice = 1; - * @return {string} - */ -proto.mpay.PayStatusRequest.prototype.getInvoice = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusRequest} returns this - */ -proto.mpay.PayStatusRequest.prototype.setInvoice = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayStatusRequest} returns this - */ -proto.mpay.PayStatusRequest.prototype.clearInvoice = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusRequest.prototype.hasInvoice = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.PayStatusResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.toObject = function(includeInstance, msg) { - var f, obj = { - statusList: jspb.Message.toObjectList(msg.getStatusList(), - proto.mpay.PayStatusResponse.PayStatus.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusResponse} - */ -proto.mpay.PayStatusResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusResponse; - return proto.mpay.PayStatusResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusResponse} - */ -proto.mpay.PayStatusResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.mpay.PayStatusResponse.PayStatus; - reader.readMessage(value,proto.mpay.PayStatusResponse.PayStatus.deserializeBinaryFromReader); - msg.addStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStatusList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.mpay.PayStatusResponse.PayStatus.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.mpay.PayStatusResponse.PayStatus.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusResponse.PayStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusResponse.PayStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.toObject = function(includeInstance, msg) { - var f, obj = { - bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), - bolt12: jspb.Message.getFieldWithDefault(msg, 5, ""), - amountMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), - destination: jspb.Message.getFieldWithDefault(msg, 3, ""), - attemptsList: jspb.Message.toObjectList(msg.getAttemptsList(), - proto.mpay.PayStatusResponse.PayStatus.Attempt.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusResponse.PayStatus} - */ -proto.mpay.PayStatusResponse.PayStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusResponse.PayStatus; - return proto.mpay.PayStatusResponse.PayStatus.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusResponse.PayStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusResponse.PayStatus} - */ -proto.mpay.PayStatusResponse.PayStatus.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setBolt11(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setBolt12(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmountMsat(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 4: - var value = new proto.mpay.PayStatusResponse.PayStatus.Attempt; - reader.readMessage(value,proto.mpay.PayStatusResponse.PayStatus.Attempt.deserializeBinaryFromReader); - msg.addAttempts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusResponse.PayStatus.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusResponse.PayStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 5)); - if (f != null) { - writer.writeString( - 5, - f - ); - } - f = message.getAmountMsat(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getAttemptsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.mpay.PayStatusResponse.PayStatus.Attempt.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusResponse.PayStatus.Attempt.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.toObject = function(includeInstance, msg) { - var f, obj = { - strategy: jspb.Message.getFieldWithDefault(msg, 1, ""), - startTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - ageInSeconds: jspb.Message.getFieldWithDefault(msg, 3, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - state: jspb.Message.getFieldWithDefault(msg, 5, 0), - success: (f = msg.getSuccess()) && proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.toObject(includeInstance, f), - failure: (f = msg.getFailure()) && proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusResponse.PayStatus.Attempt; - return proto.mpay.PayStatusResponse.PayStatus.Attempt.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setStrategy(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAgeInSeconds(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTime(value); - break; - case 5: - var value = /** @type {!proto.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState} */ (reader.readEnum()); - msg.setState(value); - break; - case 6: - var value = new proto.mpay.PayStatusResponse.PayStatus.Attempt.Success; - reader.readMessage(value,proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.deserializeBinaryFromReader); - msg.setSuccess(value); - break; - case 7: - var value = new proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure; - reader.readMessage(value,proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.deserializeBinaryFromReader); - msg.setFailure(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusResponse.PayStatus.Attempt.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStrategy(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getAgeInSeconds(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint64( - 4, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getSuccess(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.serializeBinaryToWriter - ); - } - f = message.getFailure(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState = { - ATTEMPT_PENDING: 0, - ATTEMPT_COMPLETED: 1 -}; - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - paymentPreimage: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusResponse.PayStatus.Attempt.Success; - return proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentPreimage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getPaymentPreimage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string payment_preimage = 2; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.prototype.getPaymentPreimage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Success.prototype.setPaymentPreimage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.toObject = function(includeInstance, msg) { - var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, ""), - code: jspb.Message.getFieldWithDefault(msg, 2, 0), - data: (f = msg.getData()) && proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure; - return proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCode(value); - break; - case 3: - var value = new proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data; - reader.readMessage(value,proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCode(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.toObject = function(opt_includeInstance) { - return proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - rawMessage: jspb.Message.getFieldWithDefault(msg, 2, ""), - failCode: jspb.Message.getFieldWithDefault(msg, 3, 0), - failCodename: jspb.Message.getFieldWithDefault(msg, 4, ""), - erringIndex: jspb.Message.getFieldWithDefault(msg, 5, 0), - erringNode: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data; - return proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRawMessage(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFailCode(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setFailCodename(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setErringIndex(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setErringNode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getRawMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFailCode(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getFailCodename(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getErringIndex(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getErringNode(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.setId = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string raw_message = 2; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.getRawMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.setRawMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional uint64 fail_code = 3; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.getFailCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.setFailCode = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string fail_codename = 4; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.getFailCodename = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.setFailCodename = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional uint64 erring_index = 5; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.getErringIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.setErringIndex = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string erring_node = 6; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.getErringNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data.prototype.setErringNode = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 code = 2; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional Data data = 3; - * @return {?proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.getData = function() { - return /** @type{?proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data} */ ( - jspb.Message.getWrapperField(this, proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data, 3)); -}; - - -/** - * @param {?proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.Data|undefined} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} returns this -*/ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure.prototype.hasData = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string strategy = 1; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getStrategy = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setStrategy = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint64 start_time = 2; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 age_in_seconds = 3; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getAgeInSeconds = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setAgeInSeconds = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 end_time = 4; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setEndTime = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.clearEndTime = function() { - return jspb.Message.setField(this, 4, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.hasEndTime = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional AttemptState state = 5; - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getState = function() { - return /** @type {!proto.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setState = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); -}; - - -/** - * optional Success success = 6; - * @return {?proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getSuccess = function() { - return /** @type{?proto.mpay.PayStatusResponse.PayStatus.Attempt.Success} */ ( - jspb.Message.getWrapperField(this, proto.mpay.PayStatusResponse.PayStatus.Attempt.Success, 6)); -}; - - -/** - * @param {?proto.mpay.PayStatusResponse.PayStatus.Attempt.Success|undefined} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this -*/ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setSuccess = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.clearSuccess = function() { - return this.setSuccess(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.hasSuccess = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional Failure failure = 7; - * @return {?proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.getFailure = function() { - return /** @type{?proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure} */ ( - jspb.Message.getWrapperField(this, proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure, 7)); -}; - - -/** - * @param {?proto.mpay.PayStatusResponse.PayStatus.Attempt.Failure|undefined} value - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this -*/ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.setFailure = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.clearFailure = function() { - return this.setFailure(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusResponse.PayStatus.Attempt.prototype.hasFailure = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional string bolt11 = 1; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.getBolt11 = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.setBolt11 = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.clearBolt11 = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.hasBolt11 = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string bolt12 = 5; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.getBolt12 = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.setBolt12 = function(value) { - return jspb.Message.setField(this, 5, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.clearBolt12 = function() { - return jspb.Message.setField(this, 5, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.hasBolt12 = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional uint64 amount_msat = 2; - * @return {number} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.getAmountMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.setAmountMsat = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string destination = 3; - * @return {string} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated Attempt attempts = 4; - * @return {!Array} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.getAttemptsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.mpay.PayStatusResponse.PayStatus.Attempt, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this -*/ -proto.mpay.PayStatusResponse.PayStatus.prototype.setAttemptsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.mpay.PayStatusResponse.PayStatus.Attempt=} opt_value - * @param {number=} opt_index - * @return {!proto.mpay.PayStatusResponse.PayStatus.Attempt} - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.addAttempts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.mpay.PayStatusResponse.PayStatus.Attempt, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.PayStatusResponse.PayStatus} returns this - */ -proto.mpay.PayStatusResponse.PayStatus.prototype.clearAttemptsList = function() { - return this.setAttemptsList([]); -}; - - -/** - * repeated PayStatus status = 1; - * @return {!Array} - */ -proto.mpay.PayStatusResponse.prototype.getStatusList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.mpay.PayStatusResponse.PayStatus, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.mpay.PayStatusResponse} returns this -*/ -proto.mpay.PayStatusResponse.prototype.setStatusList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.mpay.PayStatusResponse.PayStatus=} opt_value - * @param {number=} opt_index - * @return {!proto.mpay.PayStatusResponse.PayStatus} - */ -proto.mpay.PayStatusResponse.prototype.addStatus = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.mpay.PayStatusResponse.PayStatus, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.mpay.PayStatusResponse} returns this - */ -proto.mpay.PayStatusResponse.prototype.clearStatusList = function() { - return this.setStatusList([]); -}; - - -goog.object.extend(exports, proto.mpay); diff --git a/package.json b/package.json index 6b00a8a0..4e56b5d5 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,8 @@ "docker:solidity:deploy": "cd node_modules/boltz-core && cp -R ../@openzeppelin node_modules/ && npm run deploy:solidity", "docker:solidity:fund": "./bin/boltz-ethereum send 100000000000 && ./bin/boltz-ethereum send 1000000000 --token", "docker:start": "npm run docker:regtest && npm run docker:solidity && npm run docker:solidity:deploy && npm run docker:solidity:fund", - "docker:python:install": "docker exec regtest bash /root/poetry-install.sh", "docker:cln:hold": "cd hold && cargo build && cp target/debug/hold ../docker/regtest/data/cln/plugins && docker exec regtest lightning-cli plugin start /root/.lightning/plugins/hold && docker exec regtest chmod -R 777 /root/.lightning/regtest/hold", - "docker:cln:mpay": "docker exec regtest lightning-cli plugin start /root/mpay.sh", - "docker:cln:plugins": "npm run docker:cln:hold && npm run docker:cln:mpay", + "docker:cln:plugins": "npm run docker:cln:hold", "docker:stop": "docker kill regtest && docker rm regtest && docker kill anvil && docker rm anvil", "test": "npm run test:unit && npm run docker:start && npm run test:int && npm run docker:stop", "test:nodocker": "npm run test:unit && npm run test:int", @@ -40,12 +38,7 @@ "test:unit:coverage": "jest test/unit --coverage", "test:int": "jest test/integration --runInBand --testTimeout 10000", "changelog": "git-cliff -o CHANGELOG.md", - "prepublishOnly": "npm run compile && rm -f dist/package.json", - "python:install": "cd tools && poetry install", - "python:proto": "cd tools && poetry run python -m grpc_tools.protoc -I plugins/mpay/protos --python_out=plugins/mpay/protos --pyi_out=plugins/mpay/protos --grpc_python_out=plugins/mpay/protos plugins/mpay/protos/mpay.proto", - "python:lint": "cd tools && poetry run ruff check . ../docker", - "python:format": "cd tools && poetry run ruff format . ../docker", - "python:test": "cd tools && poetry run pytest" + "prepublishOnly": "npm run compile && rm -f dist/package.json" }, "bin": { "boltzd": "./bin/boltzd", diff --git a/protos.js b/protos.js index 5fc8dd5d..ad63304d 100644 --- a/protos.js +++ b/protos.js @@ -5,7 +5,6 @@ const childProcess = require('child_process'); const protoDir = path.join(__dirname, 'proto'); const protoDirHold = path.join(__dirname, 'hold/protos'); -const protoDirMpay = path.join(__dirname, 'tools/plugins/mpay/protos'); const protoDirSidecar = path.join(__dirname, 'boltzr/protos'); const libDir = path.join(__dirname, 'lib/proto'); @@ -22,10 +21,6 @@ const protoPaths = [ `--proto_path ${protoDirHold} ${protoDirHold}/*.proto`, path.join(libDir, 'hold'), ], - [ - `--proto_path ${protoDirMpay} ${protoDirMpay}/*.proto`, - path.join(libDir, 'mpay'), - ], [ `--proto_path ${protoDirSidecar} ${protoDirSidecar}/*.proto`, path.join(libDir, 'sidecar'), diff --git a/test/integration/Nodes.ts b/test/integration/Nodes.ts index 0510a6b3..391dae62 100644 --- a/test/integration/Nodes.ts +++ b/test/integration/Nodes.ts @@ -63,7 +63,6 @@ export const clnDataPath = `${resolve( export const clnCertsPath = `${clnDataPath}/certs`; export const clnHoldPath = `${clnDataPath}/hold`; -export const clnMpayPath = `${clnDataPath}/mpay`; export const clnClient = new ClnClient(Logger.disabledLogger, 'BTC', { host: host, @@ -79,13 +78,6 @@ export const clnClient = new ClnClient(Logger.disabledLogger, 'BTC', { privateKeyPath: `${clnHoldPath}/client-key.pem`, certChainPath: `${clnHoldPath}/client.pem`, }, - mpay: { - host: host, - port: 9293, - rootCertPath: `${clnMpayPath}/ca.pem`, - privateKeyPath: `${clnMpayPath}/client-key.pem`, - certChainPath: `${clnMpayPath}/client.pem`, - }, }); export const waitForClnChainSync = () => diff --git a/test/integration/lightning/PendingPaymentTracker.spec.ts b/test/integration/lightning/PendingPaymentTracker.spec.ts index 2604696d..ead95374 100644 --- a/test/integration/lightning/PendingPaymentTracker.spec.ts +++ b/test/integration/lightning/PendingPaymentTracker.spec.ts @@ -82,12 +82,10 @@ describe('PendingPaymentTracker', () => { await Swap.truncate(); await tracker.init(currencies); - await clnClient['mpay']?.resetPathMemory(); }); afterAll(async () => { await db.close(); - await clnClient['mpay']?.resetPathMemory(); await Sidecar.stop(); diff --git a/test/integration/lightning/cln/ClnClient.spec.ts b/test/integration/lightning/cln/ClnClient.spec.ts index 33c60780..3e1efab6 100644 --- a/test/integration/lightning/cln/ClnClient.spec.ts +++ b/test/integration/lightning/cln/ClnClient.spec.ts @@ -1,7 +1,6 @@ import { crypto } from 'bitcoinjs-lib'; import { randomBytes } from 'crypto'; import { getHexString, getUnixTime } from '../../../../lib/Utils'; -import { ClientStatus } from '../../../../lib/consts/Enums'; import Errors from '../../../../lib/lightning/Errors'; import { InvoiceFeature } from '../../../../lib/lightning/LightningClient'; import * as noderpc from '../../../../lib/proto/cln/node_pb'; @@ -112,6 +111,32 @@ describe('ClnClient', () => { }); }); + describe('sendPayment', () => { + test('should send payments', async () => { + const invoice = await bitcoinLndClient.addInvoice(100); + + const res = await clnClient.sendPayment(invoice.paymentRequest); + + expect(res.feeMsat).toEqual(0); + expect(getHexString(crypto.sha256(res.preimage))).toEqual( + getHexString(Buffer.from(invoice.rHash as string, 'base64')), + ); + }); + + test('should handle payment failures', async () => { + const invoice = await bitcoinLndClient.addInvoice(100); + await bitcoinLndClient.cancelHoldInvoice( + Buffer.from(invoice.rHash as string, 'base64'), + ); + + await expect( + clnClient.sendPayment(invoice.paymentRequest), + ).rejects.toEqual( + "Destination said it doesn't know invoice: incorrect_or_unknown_payment_details", + ); + }); + }); + test('should fail settle for invalid states', async () => { await expect(clnClient.settleHoldInvoice(randomBytes(32))).rejects.toEqual( expect.anything(), @@ -142,15 +167,7 @@ describe('ClnClient', () => { ); }); - test.each` - name | useMpay - ${'mpay'} | ${true} - ${'pay'} | ${false} - `('should detect pending payments with $name', async ({ useMpay }) => { - if (!useMpay) { - clnClient['mpay']!.setClientStatus(ClientStatus.Disconnected); - } - + test('should detect pending payments', async () => { const preimage = randomBytes(32); const invoice = await bitcoinLndClient.addHoldInvoice( 10_000, @@ -173,25 +190,13 @@ describe('ClnClient', () => { await bitcoinLndClient.settleHoldInvoice(preimage); expect((await payPromise).preimage).toEqual(preimage); - - clnClient['mpay']!.setClientStatus(ClientStatus.Connected); }); - test.each` - name | useMpay - ${'mpay'} | ${true} - ${'pay'} | ${false} - `('should detect successful payments with $name', async ({ useMpay }) => { - if (!useMpay) { - clnClient['mpay']!.setClientStatus(ClientStatus.Disconnected); - } - + test('should detect successful payments', async () => { const invoice = (await bitcoinLndClient.addInvoice(10_000)).paymentRequest; const payRes = await clnClient.sendPayment(invoice); expect(await clnClient.checkPayStatus(invoice)).toEqual(payRes); - - clnClient['mpay']!.setClientStatus(ClientStatus.Connected); }); test('should not throw when getting pay status of BOLT12 invoices', async () => { @@ -338,4 +343,15 @@ describe('ClnClient', () => { const routingHints = await clnClient.routingHints(channels[0].remotePubkey); expect(routingHints).toHaveLength(1); }); + + test.each` + error | expected + ${{ + message: 'Error calling method Xpay: RpcError { code: Some(203), message: "Destination said it doesn\'t know invoice: incorrect_or_unknown_payment_details", data: None }', +}} | ${"Destination said it doesn't know invoice: incorrect_or_unknown_payment_details"} + ${{ message: 'gRPC error' }} | ${'gRPC error'} + ${'fail'} | ${'fail'} + `('should parse error', ({ error, expected }) => { + expect(clnClient['parseError'](error)).toEqual(expected); + }); }); diff --git a/test/integration/lightning/cln/MpayClient.spec.ts b/test/integration/lightning/cln/MpayClient.spec.ts deleted file mode 100644 index 9cd3a9c5..00000000 --- a/test/integration/lightning/cln/MpayClient.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { crypto } from 'bitcoinjs-lib'; -import { bitcoinClient, bitcoinLndClient, clnClient } from '../../Nodes'; - -describe('MpayClient', () => { - beforeAll(async () => { - await bitcoinClient.generate(1); - await bitcoinLndClient.connect(false); - }); - - afterAll(() => { - clnClient.removeAllListeners(); - clnClient.disconnect(); - bitcoinLndClient.disconnect(); - }); - - const mpay = clnClient['mpay']!; - - test('should init with CLN client', async () => { - expect(mpay.isConnected()).toEqual(false); - await clnClient.connect(); - expect(mpay.isConnected()).toEqual(true); - }); - - test('should get info', async () => { - const info = await mpay.getInfo(); - expect(info).toEqual({ - version: expect.anything(), - }); - }); - - test('should pay invoices', async () => { - const { paymentRequest, rHash } = await bitcoinLndClient.addInvoice(10_000); - - const payRes = await mpay.sendPayment(paymentRequest, 10_000, 10); - - expect(payRes.feeMsat).not.toBeUndefined(); - expect(crypto.sha256(payRes.preimage)).toEqual( - Buffer.from(rHash as string, 'base64'), - ); - }); -}); diff --git a/test/integration/lightning/paymentTrackers/ClnPendingPaymentTracker.spec.ts b/test/integration/lightning/paymentTrackers/ClnPendingPaymentTracker.spec.ts index 0aaee698..0458cccd 100644 --- a/test/integration/lightning/paymentTrackers/ClnPendingPaymentTracker.spec.ts +++ b/test/integration/lightning/paymentTrackers/ClnPendingPaymentTracker.spec.ts @@ -26,23 +26,16 @@ describe('ClnPendingPaymentTracker', () => { }; beforeAll(async () => { - await Promise.all([ - clnClient.connect(false), - bitcoinLndClient.connect(false), - ]); + await Promise.all([clnClient.connect(), bitcoinLndClient.connect(false)]); }); beforeEach(async () => { - await clnClient['mpay']?.resetPathMemory(); - jest.resetAllMocks(); }); afterAll(async () => { tracker.stop(); - await clnClient['mpay']?.resetPathMemory(); - clnClient.disconnect(); bitcoinLndClient.disconnect(); }); @@ -137,7 +130,7 @@ describe('ClnPendingPaymentTracker', () => { test.each` error | expected ${'InvoiceExpiredError()'} | ${true} - ${'Permanent error WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS at node 1 (03c5fae1d507150bfb2f82b113e76f0ae2d05fde5b8463bffa15c4e0e4c3b6fc9f) in channel 124x1x0/0'} | ${true} + ${'permanent error WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS at node 1 (03c5fae1d507150bfb2f82b113e76f0ae2d05fde5b8463bffa15c4e0e4c3b6fc9f) in channel 124x1x0/0'} | ${true} ${'something that can be retried'} | ${false} `( 'should check if $error is a permanent error', diff --git a/test/integration/service/cooperative/MusigSigner.spec.ts b/test/integration/service/cooperative/MusigSigner.spec.ts index 0a8e4c3d..adde0182 100644 --- a/test/integration/service/cooperative/MusigSigner.spec.ts +++ b/test/integration/service/cooperative/MusigSigner.spec.ts @@ -94,8 +94,6 @@ describe('MusigSigner', () => { }); beforeEach(async () => { - await clnClient['mpay']?.resetPathMemory(); - jest.clearAllMocks(); }); diff --git a/tools/LICENSE b/tools/LICENSE deleted file mode 100644 index 586deda4..00000000 --- a/tools/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Boltz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tools/README.md b/tools/README.md deleted file mode 100644 index 814be820..00000000 --- a/tools/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Boltz tools - -This scripts were written and are used with `Python 3.10` or higher. Older versions *might* work too but I wouldn't rely on that. - -Unlike the `docker/build.py` script, these ones have dependencies that have to be installed with [Poetry](https://python-poetry.org/docs/): - -```bash -poetry install -``` - -## Streaming Server-Sent Events - -Streaming Server-Sent Events is a little tedious to do in the browser and there are hardly any tools available for it. To make this a little more convenient there is the `sse.py` script that allows for stream Server-Sent Events via the CLI: - -```bash -poetry run python sse.py -``` - -## Generating OTP tokens - -To generate OTP tokens for the `withdraw` Discord command without having to setup an app the script `otp.py` can be used: - -```bash -poetry run python otp.py -``` - -## Calculating the miner fee of transactions - -To calculate the miner fee of a transaction `miner_fee.py` can be used: - -```bash -poetry run python miner_fee.py -``` diff --git a/tools/__init__.py b/tools/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/miner_fee.py b/tools/miner_fee.py deleted file mode 100755 index 35ee2ddf..00000000 --- a/tools/miner_fee.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python3 -"""Calculate the miner fee of a transaction.""" - -from argparse import ArgumentParser -from dataclasses import dataclass -from pathlib import Path - -from bitcoinrpc.authproxy import AuthServiceProxy - -SAT_FACTOR = 10**8 - - -@dataclass -class MinerFee: - total: float - per_vbyte: int - - -def get_rpc_connection(rpc_port: int, cookie_file: str) -> AuthServiceProxy: - """Initialize the RPC connection to the daemon.""" - cookie_path = Path(__file__).parent.joinpath(Path(cookie_file)) - - with cookie_path.open() as cookie: - cookie_parts = cookie.read().split(":") - return AuthServiceProxy( - "http://{}:{}@127.0.0.1:{}".format( - cookie_parts[0], - cookie_parts[1], - rpc_port, - ) - ) - - -def get_raw_transaction(rpc_connection: AuthServiceProxy, transaction_id: str) -> any: - """Query a raw transaction verbosely.""" - return rpc_connection.getrawtransaction(transaction_id, 1) - - -def calculate_miner_fee( - rpc_connection: AuthServiceProxy, - transaction_id: str, -) -> MinerFee: - """Calcalute the miner fee of a transaction.""" - miner_fee = 0 - raw_transaction = get_raw_transaction(rpc_connection, transaction_id) - - for tx_input in raw_transaction["vin"]: - input_transaction = get_raw_transaction(rpc_connection, tx_input["txid"]) - miner_fee += input_transaction["vout"][tx_input["vout"]]["value"] - - for output in raw_transaction["vout"]: - miner_fee -= output["value"] - - return MinerFee(miner_fee, (miner_fee * SAT_FACTOR) / raw_transaction["vsize"]) - - -if __name__ == "__main__": - PARSER = ArgumentParser(description="Calculate the miner fee of a transaction") - - # CLI arguments - PARSER.add_argument( - "transaction", - help="Transaction of which the miner fee should be calculated", - type=str, - ) - - PARSER.add_argument( - "rpcport", - help="RPC port of the Bitcoin or Litecoin Core daemon", - type=int, - nargs="?", - default=18443, - ) - PARSER.add_argument( - "cookie_file", - help="Cookie file of the Bitcoin or Litecoin Core daemon", - type=str, - nargs="?", - default="../docker/regtest/data/core/cookies/.bitcoin-cookie", - ) - - ARGS = PARSER.parse_args() - - RPC_CONNECTION = get_rpc_connection(ARGS.rpcport, ARGS.cookie_file) - - fee = calculate_miner_fee(RPC_CONNECTION, ARGS.transaction) - print("Total:", fee.total) - print("Total sats:", int(fee.total * SAT_FACTOR)) - print(f"sat/vbyte: {fee.per_vbyte:.2f}") diff --git a/tools/otp.py b/tools/otp.py deleted file mode 100755 index b5a26e4f..00000000 --- a/tools/otp.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -"""Generates OTP tokens.""" - -from argparse import ArgumentParser - -import pyotp - -if __name__ == "__main__": - PARSER = ArgumentParser(description="Generate OTP tokens") - - # CLI arguments - PARSER.add_argument( - "secret", - help="Secret from which the token will be generated", - type=str, - nargs=1, - ) - - ARGS = PARSER.parse_args() - - TOTP = pyotp.TOTP(ARGS.secret[0]) - print(f"Token: {TOTP.now()}") diff --git a/tools/plugins/__init__.py b/tools/plugins/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/plugins/mpay/__init__.py b/tools/plugins/mpay/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/plugins/mpay/async_methods.py b/tools/plugins/mpay/async_methods.py deleted file mode 100644 index 8d192e7f..00000000 --- a/tools/plugins/mpay/async_methods.py +++ /dev/null @@ -1,23 +0,0 @@ -import functools -from concurrent.futures import ThreadPoolExecutor -from typing import Any, Callable - -from pyln.client.plugin import Request - - -def thread_method(executor: ThreadPoolExecutor) -> Callable[..., Any]: - def decorator(func: Callable[..., Any]) -> Callable[..., Any]: - @functools.wraps(func) - def wrapper(request: Request, *args: list[Any], **kwargs: dict[str, Any]) -> None: - def run() -> None: - try: - result = func(request, *args, **kwargs) - request.set_result(result) - except Exception as e: - request.set_exception(e) - - executor.submit(run) - - return wrapper - - return decorator diff --git a/tools/plugins/mpay/config.py b/tools/plugins/mpay/config.py deleted file mode 100644 index 1936e5f6..00000000 --- a/tools/plugins/mpay/config.py +++ /dev/null @@ -1,90 +0,0 @@ -from typing import Any - -from pyln.client import Plugin, __version__ -from strenum import StrEnum - -from plugins.mpay.consts import GRPC_HOST_REGTEST, PLUGIN_NAME, Network - - -class OptionKeys(StrEnum): - Db = f"{PLUGIN_NAME}-db" - - GrpcHost = f"{PLUGIN_NAME}-grpc-host" - GrpcPort = f"{PLUGIN_NAME}-grpc-port" - - DefaultMaxFee = f"{PLUGIN_NAME}-default-max-fee" - OverridePay = f"{PLUGIN_NAME}-override-pay" - - -class OptionDefaults(StrEnum): - GrpcHost = "127.0.0.1" - GrpcPort = "9293" - - DefaultMaxFee = "0.25" - DefaultOverridePay = "false" - - -def register_options(pl: Plugin) -> None: - pl.add_option( - OptionKeys.Db, - "", - f"""{PLUGIN_NAME} database connection string; - SQLite: sqlite+pysqlite:///path - PostgreSQL: postgresql+psycopg://username:password@host:port/database""", - ) - - pl.add_option(OptionKeys.GrpcHost, OptionDefaults.GrpcHost, f"{PLUGIN_NAME} gRPC host") - pl.add_option(OptionKeys.GrpcPort, OptionDefaults.GrpcPort, f"{PLUGIN_NAME} gRPC port") - - pl.add_option( - OptionKeys.DefaultMaxFee, - OptionDefaults.DefaultMaxFee, - f"{PLUGIN_NAME} default max fee", - ) - - override_description = f"{PLUGIN_NAME} override pay command to use mpay instead" - - # pyln.client added full dynamic option support in 24.05 - ver = __version__.split(".") - if int(ver[0].replace("v", "")) > 24 or (ver[0] == "24" and int(ver[1]) >= 5): - pl.add_option( - OptionKeys.OverridePay, - OptionDefaults.DefaultOverridePay, - override_description, - "bool", - dynamic=True, - ) - else: - pl.add_option( - OptionKeys.OverridePay, - OptionDefaults.DefaultOverridePay, - override_description, - "bool", - ) - - -class Config: - db: str - - grpc_host: str - grpc_port: int - - default_max_fee: float - override_pay: bool - - def __init__(self, pl: Plugin, configuration: dict[str, Any]) -> None: - self.db = configuration[OptionKeys.Db] - if self.db == "": - self.db = f"sqlite+pysqlite:///{pl.lightning_dir}/{PLUGIN_NAME}/mpay.sqlite3" - pl.log(f"No database configured; using default {self.db}") - - self.grpc_host = ( - configuration[OptionKeys.GrpcHost] - if pl.rpc.getinfo()["network"] != Network.Regtest - else GRPC_HOST_REGTEST - ) - self.grpc_port = int(configuration[OptionKeys.GrpcPort]) - - self.default_max_fee = float(configuration[OptionKeys.DefaultMaxFee]) - - self.override_pay = configuration[OptionKeys.OverridePay] diff --git a/tools/plugins/mpay/consts.py b/tools/plugins/mpay/consts.py deleted file mode 100644 index b93d3f1e..00000000 --- a/tools/plugins/mpay/consts.py +++ /dev/null @@ -1,14 +0,0 @@ -from strenum import StrEnum - - -class Network(StrEnum): - Mainnet = "bitcoin" - Testnet = "testnet" - Signet = "signet" - Regtest = "regtest" - - -PLUGIN_NAME = "mpay" -VERSION = "0.1.3" - -GRPC_HOST_REGTEST = "0.0.0.0" # noqa: S104 diff --git a/tools/plugins/mpay/data/__init__.py b/tools/plugins/mpay/data/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/plugins/mpay/data/network_info.py b/tools/plugins/mpay/data/network_info.py deleted file mode 100644 index 543a06f1..00000000 --- a/tools/plugins/mpay/data/network_info.py +++ /dev/null @@ -1,116 +0,0 @@ -from dataclasses import dataclass -from datetime import datetime, timedelta -from typing import Any - -from cachetools import TTLCache -from pyln.client import Plugin - - -@dataclass -class ChannelInfo: - destination: str - short_channel_id: str - direction: int - - delay: int - fee_per_millionth: int - base_fee_millisatoshi: int - - htlc_minimum_msat: int - htlc_maximum_msat: int - - @staticmethod - def from_listchannels(channel: dict[str, Any]) -> "ChannelInfo": - return ChannelInfo( - channel["destination"], - channel["short_channel_id"], - channel["direction"], - channel["delay"], - channel["fee_per_millionth"], - channel["base_fee_millisatoshi"], - channel["htlc_minimum_msat"], - channel["htlc_maximum_msat"], - ) - - @staticmethod - def from_peerchannels( - destination: str, short_channel_id: str, channel_side: int, updates: dict[str, Any] - ) -> "ChannelInfo": - return ChannelInfo( - destination, - short_channel_id, - channel_side, - updates["cltv_expiry_delta"], - updates["fee_proportional_millionths"], - updates["fee_base_msat"], - updates["htlc_minimum_msat"], - updates["htlc_maximum_msat"], - ) - - -class NetworkInfo: - _own_id: str - - _pl: Plugin - _alias_cache: TTLCache - - def __init__(self, pl: Plugin) -> None: - self._pl = pl - self._alias_cache = TTLCache(maxsize=10_000, ttl=timedelta(hours=6), timer=datetime.now) - - def init(self) -> None: - self._own_id = self._pl.rpc.getinfo()["id"] - - def get_node_alias(self, pubkey: str) -> str: - if pubkey in self._alias_cache: - return self._alias_cache[pubkey] - - nodes = self._pl.rpc.listnodes(pubkey)["nodes"] - alias = nodes[0]["alias"] if len(nodes) == 1 and "alias" in nodes[0] else pubkey[:20] - - self._alias_cache[pubkey] = alias - return alias - - def get_channel_info_side(self, short_channel_id: str, side: int) -> ChannelInfo: - channel = self._get_channel_info(short_channel_id, side) - if channel is not None: - return channel - - # 24.02 removed private channels from listchannels - channel = self._get_peer_channel_info(short_channel_id, side) - if channel is not None: - return channel - - msg = f"no channel with id {short_channel_id}" - raise ValueError(msg) - - def _get_channel_info(self, short_channel_id: str, side: int) -> ChannelInfo | None: - channel = self._pl.rpc.listchannels(short_channel_id=short_channel_id)["channels"] - if len(channel) == 0: - return None - - return ChannelInfo.from_listchannels( - channel[0] if channel[0]["direction"] == side else channel[1] - ) - - def _get_peer_channel_info(self, short_channel_id: str, side: int) -> ChannelInfo | None: - channels = self._pl.rpc.listpeerchannels()["channels"] - - channel = None - - for chan in channels: - if chan["short_channel_id"] == short_channel_id: - channel = chan - break - - if channel is None: - return None - - is_local = side == channel["direction"] - - return ChannelInfo.from_peerchannels( - self._own_id if is_local else channel["peer_id"], - channel["short_channel_id"], - side, - channel["updates"]["local" if is_local else "remote"], - ) diff --git a/tools/plugins/mpay/data/payments.py b/tools/plugins/mpay/data/payments.py deleted file mode 100644 index c9295534..00000000 --- a/tools/plugins/mpay/data/payments.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import Iterator - -from sqlalchemy import select -from sqlalchemy.orm import Session, joinedload - -from plugins.mpay.db.models import Attempt, Payment - - -class Payments: - @staticmethod - def fetch(s: Session, payment_hash: str) -> Iterator[Payment]: - return Payments._fetch(s, payment_hash, None, None) - - @staticmethod - def fetch_all(s: Session) -> Iterator[Payment]: - return Payments._fetch(s, None, None, None) - - @staticmethod - def fetch_paginated(s: Session, start_id: int, offset: int) -> Iterator[Payment]: - return Payments._fetch(s, None, start_id, offset) - - @staticmethod - def _fetch( - s: Session, - payment_hash: str | None, - offset: int | None, - limit: int | None, - ) -> Iterator[Payment]: - query = ( - select(Payment) - .order_by(Payment.created_at) - .options(joinedload(Payment.attempts, Attempt.hops)) - ) - - if payment_hash is not None: - query = query.where(Payment.payment_hash == payment_hash) - - if offset is not None: - query = query.where(Payment.id > offset) - - if limit is not None: - query = query.limit(limit) - - for row in s.execute(query).unique(): - yield row[0] diff --git a/tools/plugins/mpay/data/reset.py b/tools/plugins/mpay/data/reset.py deleted file mode 100644 index 5921ccf0..00000000 --- a/tools/plugins/mpay/data/reset.py +++ /dev/null @@ -1,39 +0,0 @@ -import json -from dataclasses import dataclass -from typing import Any - -from pyln.client import Plugin -from sqlalchemy import delete -from sqlalchemy.orm import Session - -from plugins.mpay.db.models import Attempt, Hop, Payment - - -@dataclass -class RemovedEntries: - payments: int - attempts: int - hops: int - - def to_dict(self) -> dict[str, Any]: - return self.__dict__ - - -class Reset: - _pl: Plugin - - def __init__(self, pl: Plugin) -> None: - self._pl = pl - - def reset_all(self, s: Session) -> RemovedEntries: - res = RemovedEntries(0, 0, 0) - - res.hops = s.execute(delete(Hop)).rowcount - res.attempts = s.execute(delete(Attempt)).rowcount - res.payments = s.execute(delete(Payment)).rowcount - - s.commit() - - self._pl.log(f"Reset path memory: {json.dumps(res.to_dict())}") - - return res diff --git a/tools/plugins/mpay/data/route_stats.py b/tools/plugins/mpay/data/route_stats.py deleted file mode 100644 index a7acf766..00000000 --- a/tools/plugins/mpay/data/route_stats.py +++ /dev/null @@ -1,135 +0,0 @@ -from pandas import DataFrame, Series -from sqlalchemy import String, func, select -from sqlalchemy.orm import Session - -from plugins.mpay.db.models import Attempt, Hop - -EMA_ALPHA = 0.4 -HOP_SEPERATOR = "/" - -ROUTE_SEPERATOR = "-" - - -class NotInRouteError(Exception): - pass - - -class RouteStats: - id: str - route: list[str] - - nodes: list[str] - - success_rate: float - success_rate_ema: float - - _attempts: DataFrame - - def __init__(self, route: list[str], nodes: list[str]) -> None: - self.route = route - self.id = ROUTE_SEPERATOR.join(self.route) - - self.nodes = nodes - - self._attempts = DataFrame(columns=["attempt_id", "ok"]) - - def __str__(self) -> str: - """Pretty print the route with statistics.""" - return f"{' -> '.join(self.route)} {self.pretty_statistics}" - - @property - def pretty_statistics(self) -> str: - return ( - f"(success_rate: {round(self.success_rate, 4)}, " - f"success_rate_ema: {round(self.success_rate_ema, 4)})" - ) - - def slice_for_destination(self, destination: str) -> "RouteStats": - destination_index = self.destination_index(destination) - - sliced = RouteStats(self.route[:destination_index], self.nodes[:destination_index]) - sliced._attempts = ( # noqa: SLF001 - self._attempts.groupby(["attempt_id"])[["attempt_id", "ok"]] - .apply(lambda x: x[:destination_index]) - .reset_index(drop=True) - ) - sliced.calculate_rates() - - return sliced - - def add_attempt(self, attempt_id: int, oks: list[bool], no_recalculate: bool = False) -> None: - if len(oks) != len(self.route): - msg = "length of oks does not match length of route" - raise ValueError(msg) - - for ok in oks: - self._attempts.loc[len(self._attempts)] = [attempt_id, ok] - - if not no_recalculate: - self.calculate_rates() - - def calculate_rates(self) -> None: - def to_group(attempt: DataFrame) -> Series: - return Series( - { - "ok": not attempt.query("ok == False").shape[0] > 0, - } - ) - - groups = self._attempts.groupby(["attempt_id"]).apply(to_group, include_groups=False) - - self.success_rate = (groups["ok"] == True).mean() # noqa: E712 - self.success_rate_ema = groups["ok"].ewm(alpha=EMA_ALPHA).mean().iloc[-1] - - def destination_index(self, destination: str) -> int: - try: - return self.nodes.index(destination) + 1 - except ValueError: - raise NotInRouteError from None - - -class RouteStatsFetcher: - @staticmethod - def get_routes( - s: Session, - ) -> list[RouteStats]: - res = s.execute( - select( - Attempt.id, - Hop.node, - (Hop.channel + HOP_SEPERATOR + func.Cast(Hop.direction, String)).label("channel"), - Hop.ok, - Attempt.created_at, - ) - .join(Attempt.hops) - .order_by(Attempt.id, Hop.id) - ) - hops = DataFrame(res.fetchall(), columns=list(res.keys())) - - if hops.empty: - return [] - - attempts = hops.groupby(["id"]) - - routes: dict[str, RouteStats] = {} - - for attempt in attempts: - attempt_id = attempt[0][0] - route = attempt[1] - route_id = ROUTE_SEPERATOR.join(route["channel"].values) - - if route_id not in routes: - stats = RouteStats( - route["channel"].to_list(), - route["node"].to_list(), - ) - routes[route_id] = stats - else: - stats = routes[route_id] - - stats.add_attempt(attempt_id, route["ok"].values, True) - - for route in routes.values(): - route.calculate_rates() - - return list(routes.values()) diff --git a/tools/plugins/mpay/data/router.py b/tools/plugins/mpay/data/router.py deleted file mode 100644 index 05ff522c..00000000 --- a/tools/plugins/mpay/data/router.py +++ /dev/null @@ -1,79 +0,0 @@ -import copy -from typing import Any, Iterator - -from pyln.client import Millisatoshi, Plugin - -from plugins.mpay.data.network_info import ChannelInfo, NetworkInfo -from plugins.mpay.data.route_stats import HOP_SEPERATOR, RouteStats -from plugins.mpay.data.routes import Routes -from plugins.mpay.pay.excludes import ExcludesPayment -from plugins.mpay.pay.route import Route -from plugins.mpay.routing_hints import parse_routing_hints -from plugins.mpay.utils import format_error - -_MIN_EMA_RATE = 0.5 - - -class MaxHtlcTooSmallError(Exception): - pass - - -class InExcludeListError(ValueError): - def __init__(self, channel: str) -> None: - super(ValueError, self).__init__(f"{channel} is in exclude list") - - -class Router: - routes: Routes - - _pl: Plugin - _network_info: NetworkInfo - - def __init__(self, pl: Plugin, routes: Routes, network_info: NetworkInfo) -> None: - self.routes = routes - - self._pl = pl - self._network_info = network_info - - def fetch_routes( - self, dec: dict[str, Any], amount: Millisatoshi, excludes: ExcludesPayment - ) -> Iterator[tuple[RouteStats, Route]]: - has_routing_hint, destination, routing_hint = parse_routing_hints(dec) - - route_stats = self.routes.get_routes(destination, 0, _MIN_EMA_RATE, excludes) - - self._pl.log(f"Found {len(route_stats)} potential known routes to {destination}") - - for stat_route in route_stats: - try: - route = self._transform_stat_route(stat_route, amount, excludes) - if has_routing_hint: - route.add_routing_hint(copy.deepcopy(routing_hint)) - - yield stat_route, route - except GeneratorExit: # noqa: PERF203 - break - except BaseException as e: - # TODO: penalize in db? - self._pl.log(f"Disregarding route {stat_route} because: {format_error(e)}") - - def _transform_stat_route( - self, stats: RouteStats, amount: Millisatoshi, exclude_list: ExcludesPayment - ) -> Route: - for hop in stats.route: - if hop in exclude_list: - raise InExcludeListError(hop) - - chan_infos = [self._get_channel_info(hop) for hop in stats.route] - - # TODO: make sure all channels are active - - # Make sure the minimal htlc_maximum_msat size on the route is bigger than our amount - if min(chan_infos, key=lambda e: e.htlc_maximum_msat).htlc_maximum_msat < int(amount): - raise MaxHtlcTooSmallError - - return Route.from_channel_infos(amount, chan_infos) - - def _get_channel_info(self, hop: str) -> ChannelInfo: - split = hop.split(HOP_SEPERATOR) - return self._network_info.get_channel_info_side(split[0], int(split[1])) diff --git a/tools/plugins/mpay/data/routes.py b/tools/plugins/mpay/data/routes.py deleted file mode 100644 index 5034203c..00000000 --- a/tools/plugins/mpay/data/routes.py +++ /dev/null @@ -1,213 +0,0 @@ -from __future__ import annotations - -import functools -import time -from collections import defaultdict -from typing import TYPE_CHECKING, Any, Callable, TypeVar - -from sqlalchemy.orm import Session - -from plugins.mpay.data.reset import RemovedEntries, Reset -from plugins.mpay.data.route_stats import ROUTE_SEPERATOR, RouteStats, RouteStatsFetcher -from plugins.mpay.db.models import Attempt, Hop, Payment - -if TYPE_CHECKING: - from pyln.client import Plugin - - from plugins.mpay.db.db import Database - from plugins.mpay.pay.excludes import ExcludesPayment - from plugins.mpay.pay.route import Route - from plugins.mpay.pay.sendpay import PaymentError - - -class RoutesFetchingError(Exception): - def __init__(self) -> None: - super().__init__("Routes are still fetching") - - -R = TypeVar("R") - - -def _check_fetching(func: Callable[..., R]) -> Callable[..., R]: - @functools.wraps(func) - def wrapper(self: Routes, *args: tuple, **kwargs: dict[str, Any]) -> R: - if self._is_fetching: - raise RoutesFetchingError - - return func(self, *args, **kwargs) - - return wrapper - - -def _hop_from_route(attempt: Attempt, hop: dict[str, Any], ok: bool) -> Hop: - return Hop( - attempt_id=attempt.id, - node=hop["id"], - channel=hop["channel"], - direction=hop["direction"], - ok=ok, - ) - - -class Routes: - _pl: Plugin - _db: Database - _reset: Reset - _fetcher: RouteStatsFetcher - - _routes: dict[str, RouteStats] - _routes_for_node: defaultdict[str, list[RouteStats]] - - _is_fetching: bool - - def __init__(self, pl: Plugin, db: Database) -> None: - self._pl = pl - self._db = db - self._reset = Reset(pl) - self._fetcher = RouteStatsFetcher() - - self._routes = {} - self._routes_for_node = defaultdict(list) - - self._is_fetching = True - - def fetch_from_db(self) -> None: - self._is_fetching = True - self._pl.log("Fetching routes from database") - start_time = time.time() - - with Session(self._db.engine) as s: - routes = [route for route in self._fetcher.get_routes(s) if len(route.route) > 1] - self._pl.log(f"Found {len(routes)} routes") - - for route in routes: - self._index_route(route) - - self._is_fetching = False - self._pl.log(f"Finished indexing routes in {(time.time() - start_time):.2f}s") - - @_check_fetching - def reset(self) -> RemovedEntries: - self._pl.log("Resetting path memory") - - self._routes.clear() - self._routes_for_node.clear() - - with Session(self._db.engine) as s: - return self._reset.reset_all(s) - - @_check_fetching - def get_destinations(self) -> list[str]: - return list(self._routes_for_node.keys()) - - @_check_fetching - def get_routes( - self, - destination: str, - min_success: float = 0, - min_success_ema: float = 0, - excludes: ExcludesPayment | None = None, - ) -> list[RouteStats]: - routes = self._routes_for_node[destination] - - routes_dict: dict[str, RouteStats] = {} - for route in routes: - if route.nodes[-1] != destination: - continue - - routes_dict[route.id] = route - - for route in routes: - if route.nodes[-1] == destination: - continue - - sliced_id = ROUTE_SEPERATOR.join(route.route[: route.destination_index(destination)]) - if sliced_id not in routes_dict: - sliced_route = route.slice_for_destination(destination) - routes_dict[sliced_id] = sliced_route - self._index_route(sliced_route) - - return sorted( - [ - route - for route in routes_dict.values() - if route.success_rate >= min_success - and route.success_rate_ema >= min_success_ema - and (excludes is None or all(hop not in excludes for hop in route.route)) - ], - key=lambda x: x.success_rate, - reverse=True, - ) - - def insert_successful_attempt( - self, session: Session, payment: Payment, route: Route, duration: int - ) -> None: - payment.ok = True - - attempt = Attempt( - payment_id=payment.id, - ok=True, - time=duration, - ) - session.add(attempt) - - hops = [_hop_from_route(attempt, hop, True) for hop in route.route] - - for hop in hops: - attempt.hops.append(hop) - - session.add_all(hops) - session.commit() - - self._append_attempt(route, attempt, hops) - - def insert_failed_attempt( - self, session: Session, payment: Payment, route: Route, error: PaymentError - ) -> None: - # If there is a permanent error at the last hop, we got the HTLC through successfully - if error.is_permanent and error.erring_index == len(route): - self.insert_successful_attempt(session, payment, route, error.time) - return - - payment.ok = False - - attempt = Attempt( - payment_id=payment.id, - ok=False, - time=error.time, - ) - session.add(attempt) - - hops = [ - _hop_from_route(attempt, hop, index < error.erring_index) - for index, hop in enumerate(route.route) - ] - - for hop in hops: - attempt.hops.append(hop) - - session.add_all(hops) - session.commit() - - self._append_attempt(route, attempt, hops) - - def _append_attempt(self, route: Route, attempt: Attempt, hops: list[Hop]) -> None: - oks = [hop.ok for hop in hops] - - for i in range(2, len(route.route) + 1): - hops = [f"{hop['channel']}/{hop['direction']}" for hop in route.route[:i]] - route_id = ROUTE_SEPERATOR.join(hops) - - if route_id in self._routes: - stats = self._routes[route_id] - else: - stats = RouteStats(hops, [hop["id"] for hop in route.route[:i]]) - self._index_route(stats) - - stats.add_attempt(attempt.id, oks[:i]) - - def _index_route(self, route: RouteStats) -> None: - self._routes[route.id] = route - - for node in route.nodes[1:]: - self._routes_for_node[node].append(route) diff --git a/tools/plugins/mpay/data/tests/test_network_info.py b/tools/plugins/mpay/data/tests/test_network_info.py deleted file mode 100644 index 2b56fa2b..00000000 --- a/tools/plugins/mpay/data/tests/test_network_info.py +++ /dev/null @@ -1,61 +0,0 @@ -import pytest - -from plugins.mpay.data.network_info import ChannelInfo, NetworkInfo -from plugins.mpay.tests.utils import LndNode, RpcPlugin, cln_con, lnd - - -class TestNetworkInfo: - # noinspection PyTypeChecker - ni = NetworkInfo(RpcPlugin()) - - def test_init(self) -> None: - self.ni.init() - assert self.ni._own_id == cln_con("getinfo")["id"] # noqa: SLF001 - - @pytest.mark.parametrize("node", [LndNode.One, LndNode.Two]) - def test_get_node_alias(self, node: LndNode) -> None: - info = lnd(node, "getinfo") - pubkey = info["identity_pubkey"] - - assert self.ni.get_node_alias(pubkey) == info["alias"] - assert self.ni._alias_cache[pubkey] == info["alias"] # noqa: SLF001 - - # Cached value - assert self.ni.get_node_alias(pubkey) == info["alias"] - - def test_get_node_alias_not_found(self) -> None: - pubkey = "02d96eadea3d780104449aca5c93461ce67c1564e2e1d73225fa67dd3b997a6018" - assert self.ni.get_node_alias(pubkey) == pubkey[:20] - - def test_get_channel_info(self) -> None: - channel_id = cln_con("listchannels")["channels"][0]["short_channel_id"] - assert self.ni._get_channel_info(channel_id, 0) == ChannelInfo.from_listchannels( # noqa: SLF001 - cln_con(f"listchannels {channel_id}")["channels"][0] - ) - - @pytest.mark.parametrize("side", [0, 1]) - def test_get_channel_info_side(self, side: int) -> None: - channel_id = cln_con("listchannels")["channels"][0]["short_channel_id"] - assert self.ni.get_channel_info_side(channel_id, side) == ChannelInfo.from_listchannels( - cln_con(f"listchannels {channel_id}")["channels"][side] - ) - - @pytest.mark.parametrize("side", [0, 1]) - def test_get_channel_info_side_peer_channel(self, side: int) -> None: - peer_channels = cln_con("listpeerchannels")["channels"] - channel = next(chan for chan in peer_channels if chan["private"]) - - assert self.ni.get_channel_info_side( - channel["short_channel_id"], side - ) == ChannelInfo.from_peerchannels( - cln_con("getinfo")["id"] if side == channel["direction"] else channel["peer_id"], - channel["short_channel_id"], - side, - channel["updates"]["local" if side == channel["direction"] else "remote"], - ) - - def test_get_channel_info_not_found(self) -> None: - channel_id = "811759x3111x1" - - with pytest.raises(ValueError, match=f"no channel with id {channel_id}"): - self.ni.get_channel_info_side(channel_id, 1) diff --git a/tools/plugins/mpay/data/tests/test_route_stats.py b/tools/plugins/mpay/data/tests/test_route_stats.py deleted file mode 100644 index f36437f9..00000000 --- a/tools/plugins/mpay/data/tests/test_route_stats.py +++ /dev/null @@ -1,155 +0,0 @@ -# ruff: noqa: E501 - -from typing import ClassVar -from unittest.mock import MagicMock - -import pytest -from sqlalchemy import text -from sqlalchemy.orm import Session - -from plugins.mpay.data.route_stats import NotInRouteError, RouteStatsFetcher -from plugins.mpay.db.db import Database - -SQLITE_MEMORY_PATH = "sqlite+pysqlite://" - - -def setup_db(db: Database) -> None: - with Session(db.engine) as e: - for statement in [ - "INSERT INTO payments (id, destination, payment_hash, amount, ok) VALUES (61, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', 'e2961acb1e203a452d456106124b574b5b8011a5350e883d494e297344015098', 1000000000, true);", - "INSERT INTO payments (id, destination, payment_hash, amount, ok) VALUES (62, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', 'bc4ac4addc32d095d1f54f834459e3e2f88cfec2f3c5dc092fd9bd4945fa80b8', 1000000000, true);", - "INSERT INTO payments (id, destination, payment_hash, amount, ok) VALUES (63, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '37a7e19e7ceff635f8172a7615583c2b6863ccd9a574dae868c38343cde8389a', 1000000000, false);", - "INSERT INTO payments (id, destination, payment_hash, amount, ok) VALUES (58, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', 'e4396922dfb81776ff58ad3363677ab397a6985c7bc0de95494ea0211bceaa8d', 1000000000, true);", - "INSERT INTO payments (id, destination, payment_hash, amount, ok) VALUES (59, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '52c8729f6e25161e66be75a4abbb0ecf4cd901bd7f4fb3b464f78dc8aa9b2c6e', 1000000000, true);", - "INSERT INTO payments (id, destination, payment_hash, amount, ok) VALUES (60, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '1a64b1c042448041aa12e57f459fdfa7cc28f35f6a5a02fb3f54b81f4127ee99', 1000000000, true);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (181, 58, false, 3);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (182, 58, true, 5);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (183, 59, true, 3);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (184, 60, true, 2);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (185, 61, false, 2);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (186, 61, true, 2);", - "INSERT INTO attempts (id, payment_id, ok, time) VALUES (187, 62, true, 2);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (544, 181, '033b63e4a9931dc151037acbce12f4f8968c86f5655cf102bbfa85a26bd4adc6d9', '814196x3317x2', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (545, 181, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '783038x1808x1', 0, false);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (546, 181, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, false);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (547, 182, '0380ef0209ff1b46c38a37cd40f613d1dae3eba481a909459d6c1434a0e56e5d8c', '809469x300x4', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (548, 182, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '797131x955x7', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (549, 182, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (550, 183, '0380ef0209ff1b46c38a37cd40f613d1dae3eba481a909459d6c1434a0e56e5d8c', '809469x300x4', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (551, 183, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '797131x955x7', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (552, 183, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (553, 184, '0380ef0209ff1b46c38a37cd40f613d1dae3eba481a909459d6c1434a0e56e5d8c', '809469x300x4', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (554, 184, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '797131x955x7', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (555, 184, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (556, 185, '0380ef0209ff1b46c38a37cd40f613d1dae3eba481a909459d6c1434a0e56e5d8c', '809469x300x4', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (557, 185, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '797131x955x7', 0, false);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (558, 185, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, false);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (559, 186, '03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9', '814829x1702x7', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (560, 186, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '815007x921x1', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (561, 186, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (562, 187, '03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9', '814829x1702x7', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (563, 187, '03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5', '815007x921x1', 0, true);", - "INSERT INTO hops (id, attempt_id, node, channel, direction, ok) VALUES (564, 187, '0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db', '745530x1313x1', 1, true);", - ]: - e.execute(text(statement)) - e.commit() - - -class TestRouteStatsFetcher: - pl = MagicMock() - db = Database(pl) - db.connect(SQLITE_MEMORY_PATH) - - destination = "03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5" - route_stats: ClassVar[tuple[list[str], float, float]] = [ - (["814196x3317x2/0", "783038x1808x1/0", "745530x1313x1/1"], 0, 0), - ( - ["809469x300x4/0", "797131x955x7/0", "745530x1313x1/1"], - 0.75, - 0.5404411764705882, - ), - (["814829x1702x7/0", "815007x921x1/0", "745530x1313x1/1"], 1, 1), - ] - - @pytest.fixture(scope="class", autouse=True) - def _before_all(self) -> None: - setup_db(self.db) - - def test_get_routes_empty_db(self) -> None: - empty_db = Database(self.pl) - empty_db.connect(SQLITE_MEMORY_PATH) - - with Session(empty_db.engine) as s: - routes = RouteStatsFetcher.get_routes(s) - - empty_db.close() - assert len(routes) == 0 - - def test_get_routes(self) -> None: - with Session(self.db.engine) as s: - res = RouteStatsFetcher.get_routes(s) - - assert len(res) == 3 - - for elem in zip(res, self.route_stats): - route = elem[0] - expected = elem[1] - - assert list(route.route) == expected[0] - assert route.success_rate == expected[1] - assert route.success_rate_ema == expected[2] - - def test_route_slice(self) -> None: - with Session(self.db.engine) as s: - route = RouteStatsFetcher.get_routes(s)[1] - - sliced = route.slice_for_destination(route.nodes[0]) - - assert sliced.nodes == [route.nodes[0]] - assert sliced.route == [route.route[0]] - assert sliced.success_rate == 1.0 - assert sliced.success_rate_ema == 1.0 - - def test_route_slice_not_in_route_error(self) -> None: - with Session(self.db.engine) as s: - route = RouteStatsFetcher.get_routes(s)[1] - - with pytest.raises(NotInRouteError): - route.slice_for_destination("invalid_destination") - - def test_route_slice_add_attempt(self) -> None: - with Session(self.db.engine) as s: - route = RouteStatsFetcher.get_routes(s)[2] - - sliced = route.slice_for_destination(route.nodes[1]) - sliced.add_attempt(10, [True, True]) - - assert sliced.success_rate == 1.0 - assert sliced.success_rate_ema == 1.0 - - def test_route_slice_add_attempt_failed(self) -> None: - with Session(self.db.engine) as s: - route = RouteStatsFetcher.get_routes(s)[2] - - sliced = route.slice_for_destination(route.nodes[1]) - sliced.add_attempt(10, [False, False]) - - assert sliced.success_rate == 0.6666666666666666 - assert sliced.success_rate_ema == 0.8163265306122449 - - @pytest.mark.parametrize("count", [1, 2, 10]) - def test_route_slice_add_attempt_ok_len_mismatch(self, count: int) -> None: - with Session(self.db.engine) as s: - route = RouteStatsFetcher.get_routes(s)[2] - - with pytest.raises(ValueError, match="length of oks does not match length of route"): - route.add_attempt(10, [True for _ in range(count)]) - - def test_route_str(self) -> None: - with Session(self.db.engine) as s: - route = RouteStatsFetcher.get_routes(s)[2] - - assert ( - str(route) - == "814829x1702x7/0 -> 815007x921x1/0 -> 745530x1313x1/1 (success_rate: 1.0, success_rate_ema: 1.0)" - ) diff --git a/tools/plugins/mpay/data/tests/test_routes.py b/tools/plugins/mpay/data/tests/test_routes.py deleted file mode 100644 index ae7b5a79..00000000 --- a/tools/plugins/mpay/data/tests/test_routes.py +++ /dev/null @@ -1,272 +0,0 @@ -import time -from typing import Callable -from unittest.mock import MagicMock - -import pytest -from sqlalchemy import select -from sqlalchemy.orm import Session - -from plugins.mpay.data.routes import Routes, RoutesFetchingError -from plugins.mpay.data.tests.test_route_stats import SQLITE_MEMORY_PATH, setup_db -from plugins.mpay.db.db import Database -from plugins.mpay.db.models import Attempt, Hop, Payment -from plugins.mpay.pay.excludes import Excludes, ExcludesPayment -from plugins.mpay.pay.route import Fees, Route -from plugins.mpay.pay.sendpay import PERMANENT_ERRORS, PaymentError - - -class TestRoutes: - pl = MagicMock() - db = Database(pl) - db.connect(SQLITE_MEMORY_PATH) - - @pytest.fixture(scope="class", autouse=True) - def _before_all(self) -> None: - setup_db(self.db) - - @pytest.fixture(scope="class", autouse=True) - def routes(self) -> Routes: - return Routes(self.pl, self.db) - - @pytest.mark.parametrize( - "method", [Routes(pl, db).reset, Routes(pl, db).get_destinations, Routes(pl, db).get_routes] - ) - def test_throw_when_not_initialized(self, method: Callable) -> None: - with pytest.raises(RoutesFetchingError): - method() - - def test_fetch_from_db(self, routes: Routes) -> None: - assert routes._is_fetching # noqa: SLF001 - routes.fetch_from_db() - assert not routes._is_fetching # noqa: SLF001 - - assert len(routes._routes) > 0 # noqa: SLF001 - assert len(routes._routes_for_node) > 0 # noqa: SLF001 - - def test_get_destinations(self, routes: Routes) -> None: - routes.fetch_from_db() - assert ( - routes.get_destinations().sort() - == [ - "03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5", - "0294774ee02a9faa5a5870061f7f4833686184ad14a0b163c49442516c9edac1db", - ].sort() - ) - - def test_get_routes(self, routes: Routes) -> None: - routes.fetch_from_db() - - destination = "03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5" - fetched = routes.get_routes( - destination=destination, - ) - - assert len(fetched) == 3 - assert all(route.nodes[-1] == destination for route in fetched) - - def test_get_routes_min_success(self, routes: Routes) -> None: - routes.fetch_from_db() - - destination = "03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5" - min_success = 0.5 - - fetched = routes.get_routes( - destination=destination, - min_success=min_success, - ) - - assert len(fetched) == 2 - assert all(route.success_rate >= min_success for route in fetched) - - def test_get_routes_min_success_ema(self, routes: Routes) -> None: - routes.fetch_from_db() - - destination = "03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5" - min_success_ema = 0.6 - - fetched = routes.get_routes( - destination=destination, - min_success_ema=min_success_ema, - ) - - assert len(fetched) == 1 - assert all(route.success_rate_ema >= min_success_ema for route in fetched) - - def test_get_routes_excludes(self, routes: Routes) -> None: - routes.fetch_from_db() - - destination = "03aab7e9327716ee946b8fbfae039b0db85356549e72c5cca113ea67893d0821e5" - excludes = ExcludesPayment(Excludes()) - excludes.add_local("809469x300x4/0") - excludes.add_local("783038x1808x1/0") - - fetched = routes.get_routes(destination=destination, excludes=excludes) - - assert len(fetched) == 1 - assert all(hop not in excludes for hop in fetched[0].route) - - def test_insert_successful_attempt(self, routes: Routes) -> None: - payment = Payment( - destination="Carol", - payment_hash="4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", - amount=1, - ) - route = Route( - [ - {"id": "Alice", "channel": "a", "direction": 1}, - {"id": "Bob", "channel": "b", "direction": 0}, - {"id": "Carol", "channel": "c", "direction": 1}, - ], - [Fees(0, 0), Fees(0, 0), Fees(0, 0)], - ) - duration = 10 - - session = Session(self.db.engine) - session.add(payment) - session.commit() - - routes.insert_successful_attempt(session, payment, route, duration) - - fetched_payments = session.execute( - select(Payment).where(Payment.payment_hash == payment.payment_hash) - ).fetchall() - assert len(fetched_payments) == 1 - assert fetched_payments[0][0].ok - - fetched_attempts = session.execute( - select(Attempt).where(Attempt.payment_id == payment.id) - ).fetchall() - assert len(fetched_attempts) == 1 - - fetched_attempt = fetched_attempts[0][0] - assert fetched_attempt.payment_id == payment.id - assert fetched_attempt.ok - assert fetched_attempt.time == duration - - fetched_hops = session.execute( - select(Hop).where(Hop.attempt_id == fetched_attempt.id) - ).fetchall() - assert len(fetched_hops) == 3 - - for hop in zip([hop[0] for hop in fetched_hops], route.route): - assert hop[0].node == hop[1]["id"] - assert hop[0].channel == hop[1]["channel"] - assert hop[0].direction == hop[1]["direction"] - assert hop[0].ok - - session.close() - - assert len(routes.get_routes(payment.destination)) == 1 - assert routes.get_routes(payment.destination)[0].success_rate == 1.0 - - assert len(routes.get_routes(route.route[0]["id"])) == 0 - assert len(routes.get_routes(route.route[1]["id"])) == 1 - - def test_insert_failed_payment(self, routes: Routes) -> None: - payment = Payment( - destination="Carol", - payment_hash="0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098", - amount=1, - ) - route = Route( - [ - {"id": "Alice", "channel": "a", "direction": 1}, - {"id": "Bob", "channel": "b", "direction": 0}, - {"id": "Carol", "channel": "c", "direction": 1}, - ], - [Fees(0, 0), Fees(0, 0), Fees(0, 0)], - ) - duration = 11 - error = PaymentError( - { - "data": { - "failcodename": "UNKNOWN_ERROR", - "erring_node": route[1]["id"], - "erring_index": 1, - "erring_channel": route[1]["channel"], - "erring_direction": route[1]["direction"], - "created_at": int(time.time() - duration), - } - } - ) - - session = Session(self.db.engine) - session.add(payment) - session.commit() - - routes.insert_failed_attempt(session, payment, route, error) - - fetched_payments = session.execute( - select(Payment).where(Payment.payment_hash == payment.payment_hash) - ).fetchall() - assert len(fetched_payments) == 1 - assert not fetched_payments[0][0].ok - - fetched_attempts = session.execute( - select(Attempt).where(Attempt.payment_id == payment.id) - ).fetchall() - assert len(fetched_attempts) == 1 - - fetched_attempt = fetched_attempts[0][0] - assert fetched_attempt.payment_id == payment.id - assert not fetched_attempt.ok - assert fetched_attempt.time == duration - - fetched_hops = session.execute( - select(Hop).where(Hop.attempt_id == fetched_attempt.id) - ).fetchall() - assert len(fetched_hops) == 3 - - for i, hop in enumerate(zip([hop[0] for hop in fetched_hops], route.route)): - assert hop[0].node == hop[1]["id"] - assert hop[0].channel == hop[1]["channel"] - assert hop[0].direction == hop[1]["direction"] - assert hop[0].ok if i < 1 else not hop[0].ok - - session.close() - - assert len(routes.get_routes(payment.destination)) == 1 - assert routes.get_routes(payment.destination)[0].success_rate == 0.5 - - def test_insert_failed_payment_last_hop_permanent(self, routes: Routes) -> None: - payment = Payment( - destination="Carol", - payment_hash="0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098", - amount=1, - ) - route = Route( - [ - {"id": "Alice", "channel": "a", "direction": 1}, - {"id": "Bob", "channel": "b", "direction": 0}, - {"id": "Carol", "channel": "c", "direction": 1}, - ], - [Fees(0, 0), Fees(0, 0), Fees(0, 0)], - ) - error = PaymentError( - { - "data": { - "failcodename": PERMANENT_ERRORS[0], - "erring_node": route[1]["id"], - "erring_index": 3, - "erring_channel": route[1]["channel"], - "erring_direction": route[1]["direction"], - "created_at": int(time.time()), - } - } - ) - - session = Session(self.db.engine) - session.add(payment) - session.commit() - - routes.insert_failed_attempt(session, payment, route, error) - - assert len(routes.get_routes(payment.destination)) == 1 - assert routes.get_routes(payment.destination)[0].success_rate == 0.6666666666666666 - - def test_reset(self, routes: Routes) -> None: - routes.fetch_from_db() - routes.reset() - - assert len(routes._routes) == 0 # noqa: SLF001 - assert len(routes._routes_for_node) == 0 # noqa: SLF001 diff --git a/tools/plugins/mpay/db/__init__.py b/tools/plugins/mpay/db/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/plugins/mpay/db/db.py b/tools/plugins/mpay/db/db.py deleted file mode 100644 index 6b2c1db2..00000000 --- a/tools/plugins/mpay/db/db.py +++ /dev/null @@ -1,28 +0,0 @@ -from pyln.client import Plugin -from sqlalchemy import Connection, Engine, create_engine - -from plugins.mpay.db.models import Base - - -class Database: - con: Connection - engine: Engine - - _pl: Plugin - - def __init__(self, pl: Plugin) -> None: - self._pl = pl - - def connect(self, connection: str) -> None: - try: - self.engine = create_engine(connection) - self.con = self.engine.connect() - Base.metadata.create_all(self.engine) - - self._pl.log("Connected to database") - except BaseException as e: - self._pl.log(f"Could not connect to database: {e}", level="warn") - raise - - def close(self) -> None: - self.con.close() diff --git a/tools/plugins/mpay/db/models.py b/tools/plugins/mpay/db/models.py deleted file mode 100644 index d1ef4f10..00000000 --- a/tools/plugins/mpay/db/models.py +++ /dev/null @@ -1,103 +0,0 @@ -from __future__ import annotations - -from datetime import datetime -from typing import Any - -from sqlalchemy import ( - BIGINT, - TIMESTAMP, - Boolean, - DateTime, - ForeignKey, - Index, - Integer, - String, - func, -) -from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship - - -def to_dict(obj: object) -> dict[str, Any]: - return { - field.name: getattr(obj, field.name) - if not isinstance(getattr(obj, field.name), datetime) - else int(getattr(obj, field.name).timestamp()) - for field in obj.__table__.c - } - - -class Base(DeclarativeBase): - pass - - -# TODO: also other params or get from listpays? -class Payment(Base): - __tablename__ = "payments" - - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - destination: Mapped[str] = mapped_column(String(70), nullable=False) - payment_hash: Mapped[str] = mapped_column(String(64), nullable=False) - amount: Mapped[int] = mapped_column(BIGINT, nullable=False) - ok: Mapped[bool | None] = mapped_column(Boolean, nullable=True) - - created_at: Mapped[DateTime] = mapped_column( - TIMESTAMP, nullable=False, server_default=func.now() - ) - - attempts: Mapped[list[Attempt]] = relationship() - - __table_args__ = ( - Index("destination_idx", destination), - Index("payment_hash_idx", payment_hash), - ) - - def to_dict(self) -> dict[str, Any]: - res = to_dict(self) - res["attempts"] = [a.to_dict() for a in self.attempts] - - return res - - -# TODO: save relative fee? -class Attempt(Base): - __tablename__ = "attempts" - - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - payment_id: Mapped[int] = mapped_column(ForeignKey("payments.id"), nullable=False) - ok: Mapped[bool] = mapped_column(Boolean, nullable=False) - time: Mapped[int] = mapped_column(Integer, nullable=False) - - created_at: Mapped[DateTime] = mapped_column( - TIMESTAMP, nullable=False, server_default=func.now() - ) - - hops: Mapped[list[Hop]] = relationship() - - __table_args__ = (Index("payment_id_idx", payment_id),) - - def to_dict(self) -> dict[str, Any]: - res = to_dict(self) - res["hops"] = [h.to_dict() for h in self.hops] - - return res - - -class Hop(Base): - __tablename__ = "hops" - - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - attempt_id: Mapped[int] = mapped_column(ForeignKey("attempts.id"), nullable=False) - - node: Mapped[str] = mapped_column(String(70), nullable=False) - channel: Mapped[str] = mapped_column(String(50), nullable=False) - direction: Mapped[int] = mapped_column(Integer, nullable=False) - ok: Mapped[bool] = mapped_column(Boolean, nullable=False) - - __table_args__ = ( - Index("attempt_id_idx", attempt_id), - Index("node_idx", node), - Index("channel_idx", channel), - ) - - def to_dict(self) -> dict[str, Any]: - return to_dict(self) diff --git a/tools/plugins/mpay/defaults.py b/tools/plugins/mpay/defaults.py deleted file mode 100644 index 0448f552..00000000 --- a/tools/plugins/mpay/defaults.py +++ /dev/null @@ -1,2 +0,0 @@ -DEFAULT_EXEMPT_FEE = 21_000 -DEFAULT_PAYMENT_TIMEOUT = 60 diff --git a/tools/plugins/mpay/errors.py b/tools/plugins/mpay/errors.py deleted file mode 100644 index 5fe70226..00000000 --- a/tools/plugins/mpay/errors.py +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any, ClassVar - - -class Errors: - no_bolt11: ClassVar[dict[str, Any]] = { - "code": 4201, - "message": "no bolt11 specified", - } - no_negative_fee: ClassVar[dict[str, Any]] = { - "code": 4202, - "message": "negative fees not allowed", - } - invalid_bolt11: ClassVar[dict[str, Any]] = {"code": 4203, "message": "invalid bolt11"} diff --git a/tools/plugins/mpay/mpay.py b/tools/plugins/mpay/mpay.py deleted file mode 100755 index 35ee4710..00000000 --- a/tools/plugins/mpay/mpay.py +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/env python3 -import sys -from concurrent.futures import ThreadPoolExecutor -from pathlib import Path -from typing import Any - -from bolt11 import decode as bolt11_decode -from bolt11.exceptions import Bolt11Bech32InvalidException -from pyln.client import Plugin -from requests import Request -from sqlalchemy.orm import Session - -from plugins.mpay.async_methods import thread_method -from plugins.mpay.config import Config, register_options -from plugins.mpay.consts import PLUGIN_NAME, VERSION -from plugins.mpay.data.payments import Payments -from plugins.mpay.data.route_stats import RouteStats -from plugins.mpay.data.routes import Routes -from plugins.mpay.db.db import Database -from plugins.mpay.defaults import DEFAULT_EXEMPT_FEE, DEFAULT_PAYMENT_TIMEOUT -from plugins.mpay.errors import Errors -from plugins.mpay.pay.mpay import MPay -from plugins.mpay.rpc.server import Server -from plugins.mpay.utils import format_error - -_EMPTY_VALUES = ["", "none", "null", None] - -executor = ThreadPoolExecutor() - -pl = Plugin() -register_options(pl) - -db = Database(pl) - -routes = Routes(pl, db) -mpay = MPay(pl, db, routes) - -server = Server(pl, db, mpay, routes) - - -@pl.init() -@thread_method(executor=executor) -def init( - options: dict[str, Any], - configuration: dict[str, Any], - plugin: Plugin, - **kwargs: dict[str, Any], -) -> None: - try: - Path(f"{pl.lightning_dir}/{PLUGIN_NAME}").mkdir(exist_ok=True) - - cfg = Config(pl, options) - mpay.default_max_fee_perc = cfg.default_max_fee - - db.connect(cfg.db) - mpay.init() - executor.submit(routes.fetch_from_db) - - if cfg.grpc_port != -1: - server.start(cfg.grpc_host, cfg.grpc_port, configuration["lightning-dir"]) - else: - plugin.log("Not starting gRPC server") - - pl.log(f"Plugin {PLUGIN_NAME} v{VERSION} initialized") - if pl.get_option(f"{PLUGIN_NAME}-override-pay"): - pl.log("Overriding pay command: all your pay are belong to us!") - except BaseException as e: - pl.log(f"Could not start {PLUGIN_NAME} v{VERSION}: {e}", level="warn") - sys.exit(1) - - -@pl.subscribe("shutdown") -def shutdown(**kwargs: dict[str, Any]) -> None: - pl.log(f"Plugin {PLUGIN_NAME} stopping") - - if server.is_running(): - server.stop() - - db.close() - - pl.log(f"Plugin {PLUGIN_NAME} stopped") - sys.exit(0) - - -@pl.async_method( - method_name="mpay", - category=PLUGIN_NAME, -) -@thread_method(executor=executor) -def mpay_method( - request: Request, - bolt11: str = "", - max_fee: int | None = None, - exempt_fee: int = DEFAULT_EXEMPT_FEE, - timeout: int = DEFAULT_PAYMENT_TIMEOUT, -) -> dict[str, Any]: - if bolt11 == "": - return Errors.no_bolt11 - - if max_fee is not None and max_fee < 0: - return Errors.no_negative_fee - - try: - res = mpay.pay(bolt11, max_fee, exempt_fee, timeout) - except BaseException as e: - return {"error": format_error(e)} - - return res.to_dict() - - -@pl.async_method( - method_name="mpay-routes", - category=PLUGIN_NAME, -) -@thread_method(executor=executor) -def mpay_routes( - request: Request, destination: str = "", min_success: float = 0, min_success_ema: float = 0 -) -> dict[str, Any]: - def transform_route(route: RouteStats) -> dict[str, Any]: - return { - "route": list(route.route), - "nodes": list(route.nodes), - "success_rate": route.success_rate, - "success_rate_ema": route.success_rate_ema, - } - - if destination != "": - res = { - destination: [ - transform_route(route) - for route in routes.get_routes(destination, min_success, min_success_ema) - ] - } - else: - destinations = routes.get_destinations() - res = { - dest: [ - transform_route(route) - for route in routes.get_routes(dest, min_success, min_success_ema) - ] - for dest in destinations - } - - for key in [k for k, v in res.items() if len(v) == 0]: - del res[key] - - return {"routes": res} - - -@pl.async_method( - method_name="mpay-list", - category=PLUGIN_NAME, -) -@thread_method(executor=executor) -def mpay_list(request: Request, bolt11: str = "", payment_hash: str = "") -> dict[str, Any]: - if bolt11 not in _EMPTY_VALUES: - try: - payment_hash = bolt11_decode(bolt11).payment_hash - except Bolt11Bech32InvalidException: - return Errors.invalid_bolt11 - - with Session(db.engine) as s: - if payment_hash not in _EMPTY_VALUES: - res = Payments.fetch(s, payment_hash) - else: - res = Payments.fetch_all(s) - - return {"payments": [payment.to_dict() for payment in res]} - - -@pl.async_method( - method_name="mpay-resetpm", - category=PLUGIN_NAME, -) -@thread_method(executor=executor) -def mpay_reset( - request: Request, exclude_permanent_memory: bool = False, exclude_temporary_memory: bool = False -) -> dict[str, Any]: - if not exclude_temporary_memory: - mpay.reset_excludes() - - if not exclude_permanent_memory: - return {"deleted": routes.reset().to_dict()} - - return {"deleted": {"payments": 0, "attempts": 0, "hops": 0}} - - -@pl.hook("rpc_command") -def on_rpc_command( - plugin: Plugin, rpc_command: dict[str, Any], **kwargs: dict[str, Any] -) -> dict[str, Any]: - if not plugin.get_option(f"{PLUGIN_NAME}-override-pay"): - return {"result": "continue"} - - request = rpc_command - if request["method"] != "pay": - return {"result": "continue"} - - request["method"] = "mpay" - return {"replace": request} - - -pl.run() diff --git a/tools/plugins/mpay/pay/__init__.py b/tools/plugins/mpay/pay/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/plugins/mpay/pay/channels.py b/tools/plugins/mpay/pay/channels.py deleted file mode 100644 index 5cac5e78..00000000 --- a/tools/plugins/mpay/pay/channels.py +++ /dev/null @@ -1,112 +0,0 @@ -import copy -from dataclasses import dataclass -from typing import Any, Iterator - -from pyln.client import Millisatoshi, Plugin, RpcError - -from plugins.mpay.data.network_info import NetworkInfo -from plugins.mpay.pay.excludes import ExcludesPayment -from plugins.mpay.pay.route import Fees, Route -from plugins.mpay.routing_hints import parse_routing_hints - - -class NoRouteError(Exception): - pass - - -@dataclass -class PeerChannels: - channels: list[dict[str, Any]] - - def get_direct_channels(self, destination: str, amount: Millisatoshi) -> list[str]: - return [ - PeerChannels._get_channel_id(channel) - for channel in self.channels - if PeerChannels._has_channel_id(channel) - and channel["peer_id"] == destination - and PeerChannels._channel_is_suitable(channel, amount) - ] - - def get_exclude_list(self, amount: Millisatoshi) -> list[str]: - return [ - PeerChannels._get_channel_id(channel) - for channel in self.channels - if PeerChannels._has_channel_id(channel) - and not PeerChannels._channel_is_suitable(channel, amount) - ] - - @staticmethod - def _channel_is_suitable(channel: dict[str, Any], amount: Millisatoshi) -> bool: - return ( - channel["peer_connected"] - and channel["spendable_msat"] > amount - and channel["maximum_htlc_out_msat"] > amount - and len(channel["status"]) > 0 - and channel["status"][-1].startswith("CHANNELD_NORMAL:Channel ready for use") - and all("ERROR" not in status for status in channel["status"]) - ) - - @staticmethod - def _get_channel_id(channel: dict[str, Any]) -> str: - return f"{channel['short_channel_id']}/{channel['direction']}" - - @staticmethod - def _has_channel_id(channel: dict[str, Any]) -> bool: - return "short_channel_id" in channel and "direction" in channel - - -class ChannelsHelper: - _pl: Plugin - _ni: NetworkInfo - - def __init__(self, pl: Plugin, network_info: NetworkInfo) -> None: - self._pl = pl - self._ni = network_info - - def get_peer_channels(self) -> PeerChannels: - return PeerChannels(self._pl.rpc.listpeerchannels()["channels"]) - - def get_route( - self, - dec: dict[str, Any], - excludes: ExcludesPayment, - max_hops: int, - ) -> Iterator[Route]: - has_routing_hint, destination, routing_hint = parse_routing_hints(dec) - - while True: - try: - res = self._pl.rpc.getroute( - node_id=destination, - amount_msat=dec["amount_msat"], - exclude=excludes.to_list(), - maxhops=max_hops, - cltv=0, - riskfactor=0, - ) - except RpcError as e: - if "message" in e.error and ( - e.error["message"].startswith("Shortest route was") - or e.error["message"] == "Could not find a route" - ): - raise NoRouteError from None - - raise - - if "route" not in res: - raise NoRouteError - - route = Route( - res["route"], - [ - Fees.from_channel_info( - self._ni.get_channel_info_side(hop["channel"], hop["direction"]) - ) - for hop in res["route"] - ], - ) - - if has_routing_hint: - route.add_routing_hint(copy.deepcopy(routing_hint)) - - yield route diff --git a/tools/plugins/mpay/pay/excludes.py b/tools/plugins/mpay/pay/excludes.py deleted file mode 100644 index 4ce924d7..00000000 --- a/tools/plugins/mpay/pay/excludes.py +++ /dev/null @@ -1,53 +0,0 @@ -from datetime import datetime, timedelta - -from cachetools import TTLCache - - -class Excludes: - _excludes: TTLCache - - def __init__(self) -> None: - self._excludes = TTLCache(maxsize=25_000, ttl=timedelta(minutes=30), timer=datetime.now) - - def __contains__(self, channel: str) -> bool: - """Check if the exclude list includes a channel.""" - return channel in self._excludes - - def __len__(self) -> int: - """Return the number of entries in the cache.""" - return len(self._excludes) - - def add(self, channel: str) -> None: - self._excludes[channel] = True - - def to_set(self) -> set[str]: - return set(self._excludes.keys()) - - def reset(self) -> None: - self._excludes.clear() - - -class ExcludesPayment: - _global_excludes: Excludes - _excludes: set[str] - - def __init__(self, excludes: Excludes) -> None: - self._global_excludes = excludes - self._excludes = set() - - def __contains__(self, channel: str) -> bool: - """Check if the local or global include list includes a channel.""" - return channel in self._excludes or channel in self._global_excludes - - def init_locals(self, excludes: list[str]) -> None: - self._excludes = set(excludes) - - def add_local(self, exclude: str) -> None: - self._excludes.add(exclude) - - def add(self, channel: str) -> None: - self.add_local(channel) - self._global_excludes.add(channel) - - def to_list(self) -> list[str]: - return list(self._excludes.union(self._global_excludes.to_set())) diff --git a/tools/plugins/mpay/pay/invoice_check.py b/tools/plugins/mpay/pay/invoice_check.py deleted file mode 100644 index dcb5a3f9..00000000 --- a/tools/plugins/mpay/pay/invoice_check.py +++ /dev/null @@ -1,82 +0,0 @@ -import time - -from bolt11 import Bolt11, decode -from pyln.client import Plugin - -from plugins.mpay.consts import Network - - -class InvoiceNoSelfPaymentError(Exception): - pass - - -class InvoiceNetworkInvalidError(Exception): - pass - - -class InvoiceExpiredError(Exception): - pass - - -class InvoiceNoAmountError(Exception): - pass - - -NETWORK_PREFIXES = { - Network.Mainnet: "bc", - Network.Testnet: "tb", - Network.Signet: "tbs", - Network.Regtest: "bcrt", -} - - -def get_network_prefix(network: str) -> str: - # noinspection PyTypeChecker - return ( - NETWORK_PREFIXES[network] - if network in NETWORK_PREFIXES - else NETWORK_PREFIXES[Network.Mainnet] - ) - - -class InvoiceChecker: - _pl: Plugin - _node_id: str - _prefix: str - - def __init__(self, pl: Plugin) -> None: - self._pl = pl - - def init(self) -> None: - info = self._pl.rpc.getinfo() - self._node_id = info["id"] - self._prefix = get_network_prefix(info["network"]) - - def check(self, invoice: str) -> None: - dec = decode(invoice) - - for check in [ - self._check_amount, - self._check_network, - self._check_self_payment, - self._check_expiry, - ]: - check(dec) - - def _check_network(self, dec: Bolt11) -> None: - if dec.currency != self._prefix: - raise InvoiceNetworkInvalidError - - def _check_self_payment(self, dec: Bolt11) -> None: - if dec.payee == self._node_id: - raise InvoiceNoSelfPaymentError - - @staticmethod - def _check_expiry(dec: Bolt11) -> None: - if dec.date + dec.expiry <= int(time.time()): - raise InvoiceExpiredError - - @staticmethod - def _check_amount(dec: Bolt11) -> None: - if dec.amount_msat is None: - raise InvoiceNoAmountError diff --git a/tools/plugins/mpay/pay/mpay.py b/tools/plugins/mpay/pay/mpay.py deleted file mode 100644 index fc831c04..00000000 --- a/tools/plugins/mpay/pay/mpay.py +++ /dev/null @@ -1,149 +0,0 @@ -from pyln.client import Millisatoshi, Plugin -from sqlalchemy.orm import Session - -from plugins.mpay.data.network_info import NetworkInfo -from plugins.mpay.data.router import Router -from plugins.mpay.data.routes import Routes -from plugins.mpay.db.db import Database -from plugins.mpay.db.models import Payment -from plugins.mpay.pay.channels import ChannelsHelper -from plugins.mpay.pay.excludes import Excludes, ExcludesPayment -from plugins.mpay.pay.invoice_check import InvoiceChecker -from plugins.mpay.pay.payer import Payer -from plugins.mpay.pay.sendpay import STATUS_COMPLETE, PaymentHelper, PaymentResult -from plugins.mpay.utils import fee_with_percent, format_error - - -class MPay: - default_max_fee_perc: float = 0.05 - - pl: Plugin - - _db: Database - - _router: Router - _pay: PaymentHelper - _excludes: Excludes - _channels: ChannelsHelper - _network_info: NetworkInfo - _invoice_checker: InvoiceChecker - - def __init__(self, pl: Plugin, db: Database, routes: Routes) -> None: - self.pl = pl - self._db = db - self._excludes = Excludes() - self._pay = PaymentHelper(pl) - self._network_info = NetworkInfo(pl) - self._invoice_checker = InvoiceChecker(pl) - self._channels = ChannelsHelper(pl, self._network_info) - self._router = Router(pl, routes, self._network_info) - - def init(self) -> None: - self._network_info.init() - self._invoice_checker.init() - - def reset_excludes(self) -> None: - self.pl.log("Resetting temporary exclude list") - self._excludes.reset() - - def pay( - self, - bolt11: str, - max_fee: int | None, - exempt_fee: int, - timeout: int, - max_delay: int | None = None, - ) -> PaymentResult: - self._invoice_checker.check(bolt11) - dec = self.pl.rpc.decode(bolt11) - - amount = dec["amount_msat"] - payment_hash = dec["payment_hash"] - - already_paid = self._check_for_paid(payment_hash) - if already_paid is not None: - return already_paid - - with Session(self._db.engine) as session: - payment = Payment( - destination=dec["payee"], payment_hash=payment_hash, amount=int(amount) - ) - session.add(payment) - session.commit() - - max_fee = self._calculate_fee(amount, max_fee, exempt_fee) - self.pl.log( - f"Paying {payment_hash} for {amount} with max fee " - f"{fee_with_percent(dec['amount_msat'], max_fee)}" - ) - - try: - return Payer( - self.pl, - self._router, - self._pay, - self._channels, - self._network_info, - ExcludesPayment(self._excludes), - session, - payment, - bolt11, - dec, - max_fee, - timeout, - max_delay, - ).start() - except BaseException as e: - if payment.ok or payment.ok is None: - payment.ok = False - session.commit() - - self.pl.log(f"Payment {payment_hash} failed: {format_error(e)}", level="warn") - - raise - - # Paying an already paid invoice would result in instant success regardless - # of the route through which the payment was attempted. - # Therefore, we have to check for already paid invoices first, - # to not distort our success heuristics - def _check_for_paid(self, payment_hash: str) -> PaymentResult | None: - res = [ - entry - for entry in self.pl.rpc.listpays(payment_hash=payment_hash, status="complete")["pays"] - if "preimage" in entry - ] - - if len(res) == 0: - return None - - amount = Millisatoshi(sum(int(pay["amount_msat"]) for pay in res)) - amount_sent = Millisatoshi(sum(int(pay["amount_sent_msat"]) for pay in res)) - - return PaymentResult( - destination=res[0]["destination"], - payment_hash=payment_hash, - payment_preimage=res[0]["preimage"], - parts=len(res), - amount_msat=amount, - amount_sent_msat=amount_sent, - fee_msat=amount_sent - amount, - status=STATUS_COMPLETE, - created_at=res[0]["created_at"], - time=0, - ) - - def _calculate_fee( - self, amount: Millisatoshi, max_fee: int | None, exempt_fee: int - ) -> Millisatoshi: - if max_fee is not None: - return Millisatoshi(max_fee) - - calculated = Millisatoshi(round((int(amount) * self.default_max_fee_perc) / 100)) - self.pl.log(f"Calculated default max fee of {calculated}") - - exemption = Millisatoshi(exempt_fee) - if calculated < exemption: - self.pl.log(f"Using exempt fee of {exemption}") - return exemption - - return calculated diff --git a/tools/plugins/mpay/pay/payer.py b/tools/plugins/mpay/pay/payer.py deleted file mode 100644 index af759335..00000000 --- a/tools/plugins/mpay/pay/payer.py +++ /dev/null @@ -1,206 +0,0 @@ -from time import perf_counter -from typing import Any - -from pyln.client import Millisatoshi, Plugin -from sqlalchemy.orm import Session - -from plugins.mpay.data.network_info import NetworkInfo -from plugins.mpay.data.route_stats import RouteStats -from plugins.mpay.data.router import Router -from plugins.mpay.db.models import Payment -from plugins.mpay.pay.channels import ChannelsHelper, NoRouteError, PeerChannels -from plugins.mpay.pay.excludes import ExcludesPayment -from plugins.mpay.pay.route import Route -from plugins.mpay.pay.sendpay import PaymentError, PaymentHelper, PaymentResult -from plugins.mpay.utils import fee_with_percent - -_MAX_HOPS = 5 - - -class PaymentTimeoutError(Exception): - pass - - -class Payer: - _pl: Plugin - - _router: Router - _pay: PaymentHelper - _channels: ChannelsHelper - _network_info: NetworkInfo - - _excludes: ExcludesPayment - - _session: Session - _payment: Payment - - _bolt11: str - _dec: dict[str, Any] - _amount: Millisatoshi - - _max_fee: Millisatoshi - _timeout: int - _max_delay: int | None - - _start_time: float - - def __init__( - self, - pl: Plugin, - router: Router, - pay: PaymentHelper, - channel: ChannelsHelper, - network_info: NetworkInfo, - excludes: ExcludesPayment, - session: Session, - payment: Payment, - bolt11: str, - dec: dict[str, Any], - max_fee: Millisatoshi, - timeout: int, - max_delay: int | None, - ) -> None: - self._pl = pl - - self._router = router - self._pay = pay - self._channels = channel - self._network_info = network_info - - self._excludes = excludes - - self._session = session - self._payment = payment - - self._bolt11 = bolt11 - self._dec = dec - self._amount = dec["amount_msat"] - - self._max_fee = max_fee - self._timeout = timeout - self._max_delay = max_delay - - def start(self) -> PaymentResult: - self._start_time = perf_counter() - - peer_channels = self._channels.get_peer_channels() - self._excludes.init_locals(peer_channels.get_exclude_list(self._amount)) - - res = self._check_direct_channels(peer_channels) - if res is not None: - return res - - self._pl.log("Fetching known routes") - for stats, route in self._router.fetch_routes(self._dec, self._amount, self._excludes): - res = self._send_payment( - route, - stats, - ) - if res is not None: - return res - - self._check_timeout() - - self._pl.log("Ran out of known routes to try; falling back to getroute") - for max_hops in range(2, _MAX_HOPS + 1): - res = self._send_via_get_route(max_hops) - if res is not None: - return res - - raise NoRouteError - - def _check_direct_channels(self, peer_channels: PeerChannels) -> PaymentResult | None: - direct_channels = peer_channels.get_direct_channels(self._dec["payee"], self._amount) - if len(direct_channels) == 0: - return None - - self._pl.log(f"Found {len(direct_channels)} suitable direct channels") - return self._send_via_get_route(1) - - def _send_via_get_route(self, max_hops: int) -> PaymentResult | None: - try: - for route in self._channels.get_route(self._dec, self._excludes, max_hops): - res = self._send_payment( - route, - None, - ) - if res is not None: - return res - - self._check_timeout() - - except NoRouteError: - return None - - def _send_payment( - self, - route: Route, - stats: RouteStats | None, - ) -> PaymentResult | None: - if route.exceeds_fee(self._max_fee): - self._pl.log( - f"Not attempting route {route.pretty_print(self._network_info)}: " - f"fee {fee_with_percent(self._amount, route.fee)} exceeds budget" - ) - - # TODO: more sophisticated approach - most_expensive, fee = route.most_expensive_channel() - most_expensive_id = Route.channel_to_short_id(most_expensive) - self._excludes.add_local(most_expensive_id) - - self._pl.log(f"Excluding most expensive channel {most_expensive_id} ({fee})") - - return None - - if self._max_delay is not None and route.exceeds_delay(self._max_delay): - self._pl.log( - f"Not attempting route {route.pretty_print(self._network_info)}: " - f"delay {route.delay} exceeds max delay {self._max_delay}" - ) - - # TODO: more sophisticated approach - highest_delay, delay = route.highest_delay_channel() - highest_delay_id = Route.channel_to_short_id(highest_delay) - self._excludes.add_local(highest_delay_id) - - self._pl.log(f"Excluding most channel with highest delay {highest_delay_id} ({delay})") - return None - - route.add_cltv(self._dec["min_final_cltv_expiry"]) - self._pl.log( - f"Attempting route for {self._payment.payment_hash} with fee " - f"{fee_with_percent(self._amount, route.fee)}: " - f"{route.pretty_print(self._network_info)}" - f"{f' {stats.pretty_statistics}' if stats is not None else ''}" - ) - - try: - res = self._pay.send(route, self._bolt11, self._dec) - except PaymentError as e: - # TODO: more granular handling of these errors - self._excludes.add(f"{e.erring_channel}/{e.erring_direction}") - self._router.routes.insert_failed_attempt(self._session, self._payment, route, e) - - if e.is_permanent: - raise - - return None - - self._router.routes.insert_successful_attempt(self._session, self._payment, route, res.time) - - res.time = self._time_elapsed - self._pl.log( - f"Paid {self._payment.payment_hash} " - f"with fee {fee_with_percent(self._amount, res.fee_msat)} " - f"in {res.time}s via: {route.pretty_print(self._network_info)}" - ) - - return res - - @property - def _time_elapsed(self) -> int: - return round(perf_counter() - self._start_time) - - def _check_timeout(self) -> None: - if self._time_elapsed > self._timeout: - raise PaymentTimeoutError diff --git a/tools/plugins/mpay/pay/route.py b/tools/plugins/mpay/pay/route.py deleted file mode 100644 index 709a7b5d..00000000 --- a/tools/plugins/mpay/pay/route.py +++ /dev/null @@ -1,173 +0,0 @@ -from dataclasses import dataclass -from itertools import pairwise -from typing import Any - -from pyln.client import Millisatoshi - -from plugins.mpay.data.network_info import ChannelInfo, NetworkInfo - - -@dataclass -class Fees: - base_msat: int - proportional_millionths: int - - @staticmethod - def from_channel_info(info: ChannelInfo) -> "Fees": - return Fees( - base_msat=info.base_fee_millisatoshi, - proportional_millionths=info.fee_per_millionth, - ) - - -@dataclass -class RoutingHint: - hop_hint: dict[str, Any] - cltv_expiry_delta: int - - fees: Fees - - -class Route: - route: list[dict[str, Any]] - - fees: list[Fees] - - def __init__(self, route: list[dict[str, Any]], fees: list[Fees]) -> None: - if len(route) != len(fees): - msg = "invalid length of route or fees" - raise ValueError(msg) - - self.route = route - self.fees = fees - - def __len__(self) -> int: - """Return the length of the route.""" - return len(self.route) - - def __getitem__(self, item: int) -> dict[str, Any]: - """Get a hop from the route.""" - return self.route[item] - - @property - def fee(self) -> Millisatoshi: - return self.route[0]["amount_msat"] - self.route[-1]["amount_msat"] - - @property - def delay(self) -> int: - return self.route[0]["delay"] - - def most_expensive_channel(self) -> tuple[dict[str, Any], Millisatoshi]: - if len(self) == 0: - msg = "route needs at least one hop to calculate most expensive one" - raise ValueError(msg) - - most_expensive: tuple[dict[str, Any], Millisatoshi] = ( - self.route[0], - Millisatoshi(0), - ) - if len(self) == 1: - return most_expensive - - for first, second in pairwise(self.route): - fee = first["amount_msat"] - second["amount_msat"] - if fee > most_expensive[1]: - most_expensive = (first, fee) - - return most_expensive - - def highest_delay_channel(self) -> tuple[dict[str, Any], int]: - if len(self) == 0: - msg = "route needs at least one hop to calculate highest delay hop" - raise ValueError(msg) - - highest_delay: tuple[dict[str, Any], int] = ( - self.route[-1], - self.route[-1]["delay"], - ) - if len(self) == 1: - return highest_delay - - for first, second in pairwise(self.route): - delay = first["delay"] - second["delay"] - if delay > highest_delay[1]: - highest_delay = (first, delay) - - return highest_delay - - def exceeds_fee(self, max_fee: Millisatoshi) -> bool: - return self.fee >= max_fee - - def exceeds_delay(self, max_delay: int) -> bool: - return self.delay >= max_delay - - def add_cltv(self, cltv: int) -> None: - for hop in self.route: - hop["delay"] += cltv - - def add_fees(self, index: int, base_msat: int, proportional_millionths: int) -> None: - self.fees[index + 1] = Fees( - base_msat=base_msat, proportional_millionths=proportional_millionths - ) - hop = self[index] - - ppm_fee = round(int(hop["amount_msat"]) * proportional_millionths / 1_000_000) - hop["amount_msat"] += base_msat + ppm_fee - - for i in reversed(range(index)): - self[i]["amount_msat"] = Millisatoshi(int(self[i + 1]["amount_msat"])) - - fees = self.fees[i + 1] - self.add_fees(i, fees.base_msat, fees.proportional_millionths) - - def add_routing_hint(self, hint: RoutingHint) -> None: - self.add_cltv(hint.cltv_expiry_delta) - - self.route.append(hint.hop_hint) - self.fees.append(hint.fees) - - self.add_fees(len(self) - 2, hint.fees.base_msat, hint.fees.proportional_millionths) - - def pretty_print(self, network_info: NetworkInfo) -> str: - return " -> ".join( - [f"{network_info.get_node_alias(hop['id'])} ({hop['channel']})" for hop in self.route] - ) - - @staticmethod - def channel_to_short_id(channel: dict[str, Any]) -> str: - return f"{channel['channel']}/{channel['direction']}" - - @staticmethod - def from_channel_infos(amount: Millisatoshi, infos: list[ChannelInfo]) -> "Route": - if len(infos) == 0: - msg = "needs at last one channel info to create route" - raise ValueError(msg) - - route = Route([], []) - - for i, hop in enumerate(infos): - fees = Fees(hop.base_fee_millisatoshi, hop.fee_per_millionth) - route.fees.append(fees) - - if i != 0: - route.add_cltv(hop.delay) - route.add_fees( - i - 1, - fees.base_msat, - fees.proportional_millionths, - ) - - route.route.append(Route._hop_from_channel_info(amount, hop)) - - return route - - @staticmethod - def _hop_from_channel_info(amount: Millisatoshi, info: ChannelInfo) -> dict[str, Any]: - return { - "id": info.destination, - "channel": info.short_channel_id, - "direction": info.direction, - "amount_msat": Millisatoshi(int(amount)), - "delay": 0, - "style": "tlv", - } diff --git a/tools/plugins/mpay/pay/sendpay.py b/tools/plugins/mpay/pay/sendpay.py deleted file mode 100644 index 8829e39a..00000000 --- a/tools/plugins/mpay/pay/sendpay.py +++ /dev/null @@ -1,100 +0,0 @@ -import time -from dataclasses import dataclass -from typing import Any - -from pyln.client import Millisatoshi, Plugin, RpcError - -from plugins.mpay.pay.route import Route - -PERMANENT_ERRORS = ["WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS"] - -STATUS_COMPLETE = "complete" - - -@dataclass -class PaymentResult: - destination: str - - payment_hash: str - payment_preimage: str - - amount_msat: Millisatoshi - amount_sent_msat: Millisatoshi - - parts: int - status: str - fee_msat: Millisatoshi - - time: int - created_at: int - - def to_dict(self) -> dict[str, Any]: - return {k: int(v) if isinstance(v, Millisatoshi) else v for k, v in self.__dict__.items()} - - -class PaymentError(ValueError): - fail_code_name: str - is_permanent: bool - - erring_node: str - erring_index: int - erring_channel: str - erring_direction: int - - time: int - - def __init__(self, error: dict[str, Any]) -> None: - data = error["data"] - - self.fail_code_name = data["failcodename"] - self.is_permanent = self.fail_code_name in PERMANENT_ERRORS - - self.erring_node = data["erring_node"] - self.erring_index = data["erring_index"] - self.erring_channel = data["erring_channel"] - self.erring_direction = data["erring_direction"] - - self.time = int(time.time()) - data["created_at"] - - super(ValueError, self).__init__( - f"{'Permanent' if self.is_permanent else 'Temporary'} error {self.fail_code_name} " - f"at node {self.erring_index} ({self.erring_node}) " - f"in channel {self.erring_channel}/{self.erring_direction}" - ) - - -class PaymentHelper: - _pl: Plugin - - def __init__(self, pl: Plugin) -> None: - self._pl = pl - - def send(self, route: Route, bolt11: str, decoded: dict[str, Any]) -> PaymentResult: - pay = self._pl.rpc.sendpay( - bolt11=bolt11, - route=route.route, - payment_hash=decoded["payment_hash"], - payment_secret=decoded["payment_secret"], - ) - - try: - wait = self._pl.rpc.waitsendpay(pay["payment_hash"]) - - created_at = wait["created_at"] - amount_sent = wait["amount_sent_msat"] - amount = wait["amount_msat"] - - return PaymentResult( - destination=route.route[-1]["id"], - payment_hash=pay["payment_hash"], - payment_preimage=wait["payment_preimage"], - status=STATUS_COMPLETE, - amount_msat=Millisatoshi(amount), - amount_sent_msat=Millisatoshi(amount_sent), - fee_msat=Millisatoshi(amount_sent - amount), - parts=1, - created_at=created_at, - time=wait["completed_at"] - created_at, - ) - except RpcError as e: - raise PaymentError(e.error) from None diff --git a/tools/plugins/mpay/pay/tests/test_channels.py b/tools/plugins/mpay/pay/tests/test_channels.py deleted file mode 100644 index 6bfe1398..00000000 --- a/tools/plugins/mpay/pay/tests/test_channels.py +++ /dev/null @@ -1,346 +0,0 @@ -from typing import Any - -import pytest -from pyln.client import Millisatoshi - -from plugins.mpay.data.network_info import NetworkInfo -from plugins.mpay.pay.channels import ChannelsHelper, NoRouteError, PeerChannels -from plugins.mpay.pay.excludes import Excludes, ExcludesPayment -from plugins.mpay.pay.route import Fees, Route -from plugins.mpay.tests.utils import LndNode, RpcPlugin, cln_con, lnd - - -class TestPeerChannels: - @pytest.mark.parametrize( - ("amount", "destination", "excluded", "channels"), - [ - ( - 100, - "039277ad", - [1], - [ - { - "peer_connected": False, - "peer_id": "039277ad", - }, - { - "peer_connected": True, - "peer_id": "039277ad", - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "short_channel_id": "124x1x0", - "direction": 0, - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - { - "peer_connected": False, - "peer_id": "no match", - }, - ], - ), - ( - 100, - "039277ad", - [0], - [ - { - "peer_connected": True, - "peer_id": "039277ad", - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "short_channel_id": "124x1x0", - "direction": 0, - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - { - "peer_connected": True, - "peer_id": "039277ad", - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - ], - ), - ], - ) - def test_get_direct_channels( - self, amount: int, destination: str, excluded: list[int], channels: list[dict[str, Any]] - ) -> None: - assert PeerChannels(channels).get_direct_channels(destination, Millisatoshi(amount)) == [ - PeerChannels._get_channel_id(channels[i]) # noqa: SLF001 - for i in excluded - ] - - @pytest.mark.parametrize( - ("amount", "excluded", "channels"), - [ - ( - 100, - [], - [ - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - } - ], - ), - ( - 100, - [0], - [ - { - "peer_connected": False, - "short_channel_id": "124x1x0", - "direction": 0, - }, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - ], - ), - ( - 100, - [0, 2], - [ - { - "peer_connected": False, - "short_channel_id": "124x1x0", - "direction": 0, - }, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - { - "peer_connected": False, - "short_channel_id": "117x1x0", - "direction": 1, - }, - ], - ), - ( - 100, - [0], - [ - { - "peer_connected": False, - "short_channel_id": "124x1x0", - "direction": 0, - }, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - { - "peer_connected": False, - }, - ], - ), - ], - ) - def test_get_exclude_list( - self, amount: int, excluded: list[int], channels: list[dict[str, Any]] - ) -> None: - assert PeerChannels(channels).get_exclude_list(Millisatoshi(amount)) == [ - PeerChannels._get_channel_id(channels[i]) # noqa: SLF001 - for i in excluded - ] - - @pytest.mark.parametrize( - ("expected", "amount", "channel"), - [ - (False, 100, {"peer_connected": False}), - (False, 100, {"peer_connected": True, "spendable_msat": Millisatoshi(99)}), - (False, 100, {"peer_connected": True, "spendable_msat": Millisatoshi(100)}), - ( - False, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(99), - }, - ), - ( - False, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(100), - }, - ), - ( - False, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [], - }, - ), - ( - False, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": ["not ready"], - }, - ), - ( - True, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": ["not ready", "CHANNELD_NORMAL:Channel ready for use."], - }, - ), - ( - True, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "not ready", - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - ), - ( - False, - 100, - { - "peer_connected": True, - "spendable_msat": Millisatoshi(101), - "maximum_htlc_out_msat": Millisatoshi(101), - "status": [ - "CHANNELD_NORMAL:Received ERROR channel redacted: invalid commitment", - "CHANNELD_NORMAL:Channel ready for use. Channel announced.", - ], - }, - ), - ], - ) - def test_channel_is_suitable( - self, expected: bool, amount: int, channel: dict[str, Any] - ) -> None: - assert PeerChannels._channel_is_suitable(channel, Millisatoshi(amount)) == expected # noqa: SLF001 - - @pytest.mark.parametrize( - "channel", - [ - {"short_channel_id": "124x1x0", "direction": 0}, - {"short_channel_id": "117x1x0", "direction": 1}, - {"short_channel_id": "103x1x0", "direction": 0}, - ], - ) - def test_get_channel_id(self, channel: dict[str, Any]) -> None: - assert ( - PeerChannels._get_channel_id(channel) # noqa: SLF001 - == f"{channel['short_channel_id']}/{channel['direction']}" - ) - - @pytest.mark.parametrize( - ("channel", "expected"), - [ - ({"short_channel_id": "124x1x0", "direction": 0}, True), - ({"short_channel_id": "124x1x0"}, False), - ({"direction": 0}, False), - ], - ) - def test_has_channel_id(self, channel: dict[str, Any], expected: bool) -> None: - assert ( - PeerChannels._has_channel_id(channel) # noqa: SLF001 - == expected - ) - - -class TestChannelsHelper: - # noinspection PyTypeChecker - ni = NetworkInfo(RpcPlugin()) - # noinspection PyTypeChecker - ch = ChannelsHelper(RpcPlugin(), ni) - - def test_init(self) -> None: - self.ni.init() - - def test_get_peer_channels(self) -> None: - assert self.ch.get_peer_channels() == PeerChannels( - RpcPlugin().rpc.listpeerchannels()["channels"] - ) - - def test_get_route(self) -> None: - invoice = lnd(LndNode.Two, "addinvoice 1000")["payment_request"] - dec = cln_con(f"decode {invoice}") - - expected_routes = 2 - routes_found = 0 - - excludes = ExcludesPayment(Excludes()) - - for route in self.ch.get_route(dec, excludes, 2): - assert route[-1]["delay"] == 0 - assert route[-1]["id"] == dec["payee"] - assert route[-1]["amount_msat"] == dec["amount_msat"] - - for i, hop in enumerate(route.route): - assert Route.channel_to_short_id(hop) not in excludes - assert route.fees[i] == Fees.from_channel_info( - self.ni.get_channel_info_side(hop["channel"], hop["direction"]) - ) - - excludes.add_local(Route.channel_to_short_id(route[0])) - - routes_found += 1 - if routes_found == expected_routes: - break - - assert expected_routes == routes_found - - def test_get_route_hints(self) -> None: - invoice = lnd(LndNode.One, "addinvoice 1 --private")["payment_request"] - dec = cln_con(f"decode {invoice}") - - # Make sure there is a routing hint; else the test is pointless - assert len(dec["routes"]) > 0 - - route = next(self.ch.get_route(dec, ExcludesPayment(Excludes()), 2)) - assert route[-1]["id"] == dec["payee"] - assert route[-1]["amount_msat"] == dec["amount_msat"] - - def test_get_route_error(self) -> None: - invoice = lnd(LndNode.One, "addinvoice 1")["payment_request"] - dec = cln_con(f"decode {invoice}") - - with pytest.raises(NoRouteError): - next(self.ch.get_route(dec, ExcludesPayment(Excludes()), -1)) diff --git a/tools/plugins/mpay/pay/tests/test_excludes.py b/tools/plugins/mpay/pay/tests/test_excludes.py deleted file mode 100644 index 43482637..00000000 --- a/tools/plugins/mpay/pay/tests/test_excludes.py +++ /dev/null @@ -1,75 +0,0 @@ -import pytest - -from plugins.mpay.pay.excludes import Excludes, ExcludesPayment - - -class TestExcludes: - excludes = Excludes() - - @pytest.fixture(autouse=True) - def _before_each(self) -> None: - self.excludes = Excludes() - - @pytest.mark.parametrize("channel", ["1/1", "0/0", "123x123x123/0"]) - def test_add(self, channel: str) -> None: - self.excludes.add(channel) - assert channel in self.excludes - - def test_to_set(self) -> None: - excludes = ["1/1", "0/0", "123x123x123/0"] - for exclude in excludes: - self.excludes.add(exclude) - - assert self.excludes.to_set() == set(excludes) - - def test_reset(self) -> None: - self.excludes.add("1/1") - assert len(self.excludes) == 1 - - self.excludes.reset() - assert len(self.excludes) == 0 - - -class TestExcludesPayment: - excludes: Excludes - excludes_payment: ExcludesPayment - - @pytest.fixture(autouse=True) - def _before_each(self) -> None: - self.excludes = Excludes() - self.excludes_payment = ExcludesPayment(self.excludes) - - @pytest.mark.parametrize("channels", [["1/1", "0/0", "123x123x123/0"]]) - def test_init_locals(self, channels: list[str]) -> None: - self.excludes_payment.init_locals(channels) - - for channel in channels: - assert channel in self.excludes_payment - - @pytest.mark.parametrize("channel", ["1/1", "0/0", "123x123x123/0"]) - def test_add(self, channel: str) -> None: - self.excludes_payment.add(channel) - - assert channel in self.excludes_payment - assert channel in self.excludes - - assert channel in self.excludes_payment._excludes # noqa: SLF001 - - @pytest.mark.parametrize("channel", ["1/1", "0/0", "123x123x123/0"]) - def test_add_local(self, channel: str) -> None: - self.excludes_payment.add_local(channel) - - assert channel in self.excludes_payment - assert channel not in self.excludes - - def test_to_list(self) -> None: - excludes = ["1/1", "2/1"] - excludes_payment = ["1/0"] - - for exclude in excludes: - self.excludes.add(exclude) - - for exclude in excludes_payment: - self.excludes_payment.add(exclude) - - assert set(excludes + excludes_payment) == set(self.excludes_payment.to_list()) diff --git a/tools/plugins/mpay/pay/tests/test_invoice_check.py b/tools/plugins/mpay/pay/tests/test_invoice_check.py deleted file mode 100644 index 952afbbf..00000000 --- a/tools/plugins/mpay/pay/tests/test_invoice_check.py +++ /dev/null @@ -1,134 +0,0 @@ -import random -import time - -import pytest -from bolt11 import Bolt11, MilliSatoshi, decode, encode -from bolt11.models.tags import Tag, TagChar, Tags -from coincurve import PrivateKey - -from plugins.mpay.consts import Network -from plugins.mpay.pay.invoice_check import ( - NETWORK_PREFIXES, - InvoiceChecker, - InvoiceExpiredError, - InvoiceNetworkInvalidError, - InvoiceNoAmountError, - InvoiceNoSelfPaymentError, -) - - -class RpcCaller: - @staticmethod - def getinfo() -> dict[str, str]: - return { - "id": "03b40f44ad0ebd864916bc2fdd424acc648a6373ace27b9f8d337edac498383982", - "network": "regtest", - } - - -class RpcPlugin: - rpc = RpcCaller() - - -class TestInvoiceCheck: - checker = InvoiceChecker(RpcPlugin()) - - def test_init(self) -> None: - self.checker.init() - assert self.checker._prefix == "bcrt" # noqa: SLF001 - assert self.checker._node_id == RpcPlugin().rpc.getinfo()["id"] # noqa: SLF001 - - @pytest.mark.parametrize( - ("ok", "invoice"), - [ - ( - True, - "lnbcrt1230p1pjm498msp56yhrrjcj0r24vfhjnjds6gtel8z8aagfjtvq9dneh3hx03wt2k7spp5spkk9zl0kvvpf2mfcwu7n9d2ely9pz063464kp7csh8w6fyhlfaqdq8w3jhxaqxqyjw5qcqp29qxpqysgqclu6rq4xk4q8jflzrhscqwe9pvgxcv2sg2pav2wmavuxvymcljln75xf43s0p8xcjfvywdwgl3yzquek8a7jtqsjmrewcq4pvn2spsqqdzn3d8", - ), - ( - False, - "lntb1230p1pjm49d3sp57963uvpdnlp9x5ey3yxjyjduvqr330py78a86ea23h5cv98cmupspp50yp625zwtdpsu4q4wht56wh2j0er4ur66r2tyhgguza7hrdg3t0sdq8w3jhxaqxqyjw5qcqp2rzjq0k89d86yejwp3gu05crkc0g3v7qwp6y7rrwyxcgv579hq68e4ykzf6vwvqqqkgqqqqqqqvdqqqqqqgqqc9qxpqysgqwn03hhmss6e6n24lpjcxp4258nwm5cdm4ea8hnsewzwx30plxshz4tv52kz05kmy7ptkz3mqpvs659mxtrzj0knsjagkgumaxyvsckspsa64cq", - ), - ( - False, - "lnbc210n1pjm49wxsp5tnvvl6rnd2d4hamy6cx3kzxv7l655yh0cx7cqmfrza9ur049fe2spp54t3m29upv45fpdq6f6gjqtulgl28p0xwkhd7dlhw3a9w5m3n0qxqdq8d4cxz7gxqyjw5qcqpjrzjq207gdgypj9kvhmnru4seqws8y3cau0r5xcauzh6c268vds6ymt82rzmfuqqxacqqqqqqqt0qqqqphqqyg9qxpqysgqhwy0s9nkzg2g05xgvy9grxnunclyq93jg50whux3ppg6dd2n8u6xrvfjkg0ame39urz970pyejyquwdw762jdr32newsn4z5w4a5yrgqjww45f", - ), - ], - ) - def test_check_network(self, invoice: str, ok: bool) -> None: - if ok: - self.checker._check_network(decode(invoice)) # noqa: SLF001 - else: - with pytest.raises(InvoiceNetworkInvalidError): - self.checker._check_network(decode(invoice)) # noqa: SLF001 - - @pytest.mark.parametrize( - ("ok", "invoice"), - [ - ( - True, - "lnbcrt1231230n1pjuwm72pp59sf47h44yjzl5x8w2v3v3gqctu6uad9zkwf9qnspxl6ajkeeq6eqdqqcqzzsxqyz5vqsp5wg079faqgp5pplt7nks643mqt0y6wwfsq5zetpm9dt4uuv5dj6yq9qyyssq6d9cdgr3v3ncq2yavcxyz4ku9yx399aqynw8s3dhm2tu00yy98n5urke94l59dn5pngpxysnzptyv9alrrq5rdr2pjj4dvpmt272j0cpszwkwq", - ), - ( - False, - "lnbcrt1231231230p1pjuwma7sp5plj4ntddejnx8hc0l3xptagmvp32anz7hccxrzrr6xwsqrtyea3qpp5qjnz9rewdr5ly07ngw7kdf695jzrdt2cy2h043dlxt8yfdwnnk0qdq8v9ekgesxqyjw5qcqp2rzjq0kuk5cssreq495qpyf8q8v9dssd05ujxa3e7f5chk7pf0al6npevqqq0sqqqqgqqqqqqqlgqqqqqqgq2q9qxpqysgqz0w3la2mkkspuc2285x2wfcq479lg96z3fjy9exu05xzx4l5j8g9gww60237adryf5vpykxf2gxlqvtf00p98s5af02k8zac4440gzsq3cak6u", - ), - ], - ) - def test_check_self_payment(self, invoice: str, ok: bool) -> None: - if ok: - self.checker._check_self_payment(decode(invoice)) # noqa: SLF001 - else: - with pytest.raises(InvoiceNoSelfPaymentError): - self.checker._check_self_payment(decode(invoice)) # noqa: SLF001 - - @pytest.mark.parametrize( - ("ok", "invoice"), - [ - ( - True, - encode( - Bolt11( - NETWORK_PREFIXES[Network.Regtest], - int(time.time()), - Tags( - [ - Tag(TagChar.payment_hash, random.randbytes(32).hex()), - Tag(TagChar.payment_secret, random.randbytes(32).hex()), - Tag(TagChar.description, ""), - Tag(TagChar.expire_time, 3600), - ] - ), - MilliSatoshi(10_000), - ), - PrivateKey().secret.hex(), - ), - ), - ( - False, - "lnbcrt210n1pjm4939pp54jsfpkn9rc2dxwcvdlmgtsu7p7x45hu2acapzu2mv4hwgjpy8tasdqqcqzzsxqppsp5dg4k0kl5e2k0l5dntpwgcvj2h5xqzfs6407u30sy3zt3vj9jrrqs9qyyssqutprtqucuy5eu7a75mxavzwf4v9hmmlhtr0f28aj8c8cwzt3a7a927gpwyxnsug6xkf2xpsxqk49q0ngcwv8k84wxd3md86kv5mrmvgqxs0v6a", - ), - ], - ) - def test_check_expiry(self, invoice: str, ok: bool) -> None: - if ok: - self.checker.check(invoice) - else: - with pytest.raises(InvoiceExpiredError): - self.checker.check(invoice) - - @pytest.mark.parametrize( - ("invoice", "ok"), - [ - ( - "lnbcrt1pj7mx0ppp5pqwp604eq0dtv67r76vcpq24543lh3e790sx9rjekayrz67y8teqdqqcqzzsxqyz5vqsp5e9jtsnvdwq30g0kh2ju7xtushpjueqenfrkqreftxszx28hv8v3q9qyyssqmsjsycqrjqyrr332f278emaly7mt6ghzmhhnexpkv4v3gpxec7jzeny9ffv6uka8xpa7j6xtsrf8xtly87js7u8v48sd0lhk75dcyegpuqvuwz", - False, - ) - ], - ) - def test_check_amount(self, invoice: str, ok: bool) -> None: - if ok: - self.checker.check(invoice) - else: - with pytest.raises(InvoiceNoAmountError): - self.checker.check(invoice) diff --git a/tools/plugins/mpay/pay/tests/test_route.py b/tools/plugins/mpay/pay/tests/test_route.py deleted file mode 100644 index affc6c19..00000000 --- a/tools/plugins/mpay/pay/tests/test_route.py +++ /dev/null @@ -1,551 +0,0 @@ -# ruff: noqa: E501 - -import copy -from copy import deepcopy -from typing import Any - -import pytest -from pyln.client import Millisatoshi - -from plugins.mpay.data.network_info import ChannelInfo, NetworkInfo -from plugins.mpay.pay.route import Fees, Route, RoutingHint -from plugins.mpay.tests.utils import RpcPlugin - - -class TestRoute: - def test_route_fees_mismatch(self) -> None: - with pytest.raises( - ValueError, - match="invalid length of route or fees", - ): - Route([{}], []) - - with pytest.raises( - ValueError, - match="invalid length of route or fees", - ): - Route([], [Fees(0, 1)]) - - @pytest.mark.parametrize( - ("fee", "route_dict"), - [ - (0, [{"amount_msat": Millisatoshi(1)}]), - ( - 11, - [ - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - ], - ), - ( - 8, - [ - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - {"amount_msat": Millisatoshi(2)}, - ], - ), - ( - 9, - [ - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - {"amount_msat": Millisatoshi(1)}, - ], - ), - ], - ) - def test_fee(self, fee: int, route_dict: list[dict[str, Any]]) -> None: - assert Route(route_dict, [Fees(0, 0) for _ in route_dict]).fee == fee - - @pytest.mark.parametrize( - ("most_expensive", "fee", "route_dict"), - [ - (0, 0, [{"amount_msat": Millisatoshi(1)}]), - ( - 0, - 10, - [ - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - ], - ), - ( - 1, - 7, - [ - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - {"amount_msat": Millisatoshi(2)}, - ], - ), - ( - 3, - 8, - [ - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - {"amount_msat": Millisatoshi(1)}, - ], - ), - ], - ) - def test_most_expensive_channel( - self, most_expensive: int, fee: int, route_dict: list[dict[str, Any]] - ) -> None: - route = Route(route_dict, [Fees(0, 0) for _ in route_dict]) - assert route.most_expensive_channel() == ( - route[most_expensive], - Millisatoshi(fee), - ) - - def test_most_expensive_channel_no_hops(self) -> None: - with pytest.raises( - ValueError, - match="route needs at least one hop to calculate most expensive one", - ): - Route([], []).most_expensive_channel() - - def test_exceeds_fee(self) -> None: - route = Route( - [ - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(10)}, - {"amount_msat": Millisatoshi(9)}, - ], - [Fees(0, 0) for _ in range(3)], - ) - - assert not route.exceeds_fee(Millisatoshi(12)) - assert not route.exceeds_fee(Millisatoshi(13)) - - assert route.exceeds_fee(Millisatoshi(11)) - - assert route.exceeds_fee(Millisatoshi(1)) - assert route.exceeds_fee(Millisatoshi(0)) - - @pytest.mark.parametrize( - ("delay", "route_dict"), - [ - (2, [{"delay": 2}]), - ( - 123, - [ - {"delay": 123}, - {"delay": 50}, - {"delay": 10}, - ], - ), - ], - ) - def test_delay(self, delay: int, route_dict: list[dict[str, Any]]) -> None: - assert Route(route_dict, [Fees(0, 0) for _ in route_dict]).delay == delay - - @pytest.mark.parametrize( - ("highest_delay", "delay", "route_dict"), - [ - (0, 2, [{"delay": 2}]), - ( - 0, - 15, - [ - {"delay": 30}, - {"delay": 15}, - {"delay": 10}, - ], - ), - ( - 1, - 7, - [ - {"delay": 15}, - {"delay": 10}, - {"delay": 3}, - ], - ), - ( - 3, - 8, - [ - {"delay": 10}, - {"delay": 11}, - {"delay": 12}, - {"delay": 9}, - {"delay": 1}, - ], - ), - ], - ) - def test_highest_delay_channel( - self, highest_delay: int, delay: int, route_dict: list[dict[str, Any]] - ) -> None: - route = Route(route_dict, [Fees(0, 0) for _ in route_dict]) - assert route.highest_delay_channel() == ( - route[highest_delay], - delay, - ) - - def test_highest_delay_channel_no_hops(self) -> None: - with pytest.raises( - ValueError, - match="route needs at least one hop to calculate highest delay hop", - ): - Route([], []).highest_delay_channel() - - def test_exceeds_delay(self) -> None: - route = Route( - [ - {"delay": 20}, - {"delay": 10}, - {"delay": 9}, - ], - [Fees(0, 0) for _ in range(3)], - ) - - assert not route.exceeds_delay(21) - assert not route.exceeds_delay(22) - - assert route.exceeds_delay(20) - - assert route.exceeds_delay(1) - assert route.exceeds_delay(0) - - def test_add_cltv(self) -> None: - data = [ - {"delay": 90, "amount_msat": Millisatoshi(20)}, - {"delay": 40, "amount_msat": Millisatoshi(10)}, - {"delay": 9, "amount_msat": Millisatoshi(9)}, - ] - route = Route(deepcopy(data), [Fees(0, 0) for _ in data]) - - delta = 10 - route.add_cltv(delta) - - for i, hop in enumerate(route.route): - assert hop["delay"] == data[i]["delay"] + 10 - - @pytest.mark.parametrize( - ("index", "base", "ppm", "expected", "route_dict"), - [ - ( - 0, - 1, - 0, - [11, 10], - [{"amount_msat": Millisatoshi(10)}, {"amount_msat": Millisatoshi(10)}], - ), - ( - 0, - 0, - 100_000, - [11, 10], - [{"amount_msat": Millisatoshi(10)}, {"amount_msat": Millisatoshi(10)}], - ), - ( - 0, - 0, - 260_000, - [13, 10], - [{"amount_msat": Millisatoshi(10)}, {"amount_msat": Millisatoshi(10)}], - ), - ( - 0, - 1, - 100_000, - [12, 10], - [{"amount_msat": Millisatoshi(10)}, {"amount_msat": Millisatoshi(10)}], - ), - ( - 0, - 1, - 100_000, - [23, 20, 10], - [ - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(10)}, - ], - ), - ( - 1, - 1, - 100_000, - [23, 23, 10], - [ - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(20)}, - {"amount_msat": Millisatoshi(10)}, - ], - ), - ( - 1, - 1, - 100_000, - [111, 111, 100], - [ - {"amount_msat": Millisatoshi(100)}, - {"amount_msat": Millisatoshi(100)}, - {"amount_msat": Millisatoshi(100)}, - ], - ), - ], - ) - def test_add_fees( - self, - index: int, - base: int, - ppm: int, - expected: list[int], - route_dict: list[dict[str, Any]], - ) -> None: - route = Route(route_dict, [Fees(0, 0) for _ in route_dict]) - route.add_fees(index, base, ppm) - - for i, hop in enumerate(route.route): - assert int(hop["amount_msat"]) == expected[i] - - def test_add_routing_hint(self) -> None: - hop_hint = {"the": "hint"} - hint = RoutingHint( - hop_hint=copy.deepcopy(hop_hint), - cltv_expiry_delta=80, - fees=Fees(base_msat=1_000, proportional_millionths=100_000), - ) - - route_data = [ - {"amount_msat": Millisatoshi(100), "delay": 100}, - {"amount_msat": Millisatoshi(100), "delay": 50}, - {"amount_msat": Millisatoshi(100), "delay": 20}, - ] - route = Route(copy.deepcopy(route_data), [Fees(0, 0) for _ in route_data]) - route.add_routing_hint(hint) - - assert route[len(route) - 1] == hop_hint - - fee_delta = hint.fees.base_msat + ( - route_data[-1]["amount_msat"] * hint.fees.proportional_millionths / 1_000_000 - ) - - for i, hop in enumerate(route_data): - assert route[i]["delay"] == hop["delay"] + hint.cltv_expiry_delta - assert route[i]["amount_msat"] == hop["amount_msat"] + fee_delta - - def test_pretty_print(self) -> None: - # noinspection PyTypeChecker - ni = NetworkInfo(RpcPlugin()) - route = Route( - [ - { - "id": "026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2", - "channel": "1x1x1", - }, - { - "id": "02d96eadea3d780104449aca5c93461ce67c1564e2e1d73225fa67dd3b997a6018", - "channel": "2x2x2", - }, - ], - [Fees(0, 0) for _ in range(2)], - ) - - assert ( - route.pretty_print(ni) == "026165850492521f4ac8 (1x1x1) -> 02d96eadea3d78010444 (2x2x2)" - ) - - @pytest.mark.parametrize( - "channel", - [ - {"channel": "1x1x1", "direction": 0}, - {"channel": "1x1x1", "direction": 1}, - {"channel": "1x2x3", "direction": 1}, - ], - ) - def test_channel_to_short_id(self, channel: dict[str, Any]) -> None: - assert Route.channel_to_short_id(channel) == f"{channel['channel']}/{channel['direction']}" - - @pytest.mark.parametrize( - ("fee", "amounts", "delays", "route_data"), - [ - ( - 0, - [1_000_000], - [0], - [ - ChannelInfo.from_listchannels( - { - "destination": "0224da9fd6e22d31ccbbbd51125d3e99a91f17f7aeec597c4f3c87cc0e1761fa1b", - "short_channel_id": "103x1x0", - "direction": 1, - "base_fee_millisatoshi": 1_000, - "fee_per_millionth": 1, - "delay": 80, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ], - ), - ( - 1_001, - [1_001_001, 1_000_000], - [80, 0], - [ - ChannelInfo.from_listchannels( - { - "destination": "031fcfcd51ace905450e663d10886735b713324561e8f19d0de5d6c8c51de183e9", - "short_channel_id": "110x1x0", - "direction": 1, - "base_fee_millisatoshi": 1, - "fee_per_millionth": 1, - "delay": 6, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ChannelInfo.from_listchannels( - { - "destination": "0224da9fd6e22d31ccbbbd51125d3e99a91f17f7aeec597c4f3c87cc0e1761fa1b", - "short_channel_id": "103x1x0", - "direction": 1, - "base_fee_millisatoshi": 1_000, - "fee_per_millionth": 1, - "delay": 80, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ], - ), - ( - 3_022, - [1_003_022, 1_002_021, 1_000_000], - [160, 80, 0], - [ - ChannelInfo.from_listchannels( - { - "destination": "031fcfcd51ace905450e663d10886735b713324561e8f19d0de5d6c8c51de183e9", - "short_channel_id": "110x1x0", - "direction": 1, - "base_fee_millisatoshi": 1, - "fee_per_millionth": 1, - "delay": 6, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ChannelInfo.from_listchannels( - { - "destination": "0224da9fd6e22d31ccbbbd51125d3e99a91f17f7aeec597c4f3c87cc0e1761fa1b", - "short_channel_id": "103x1x0", - "direction": 1, - "base_fee_millisatoshi": 1_000, - "fee_per_millionth": 1, - "delay": 80, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ChannelInfo.from_listchannels( - { - "destination": "035718afb1d31390e7883285e72690129af0de738e5a445363c812208f9c3cca35", - "short_channel_id": "104x1x0", - "direction": 0, - "base_fee_millisatoshi": 2_000, - "fee_per_millionth": 21, - "delay": 80, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ], - ), - ( - 103_334, - [1_103_334, 1_102_222, 1_100_001, 1_000_000], - [260, 180, 100, 0], - [ - ChannelInfo.from_listchannels( - { - "destination": "031fcfcd51ace905450e663d10886735b713324561e8f19d0de5d6c8c51de183e9", - "short_channel_id": "110x1x0", - "direction": 1, - "base_fee_millisatoshi": 1_000_000, - "fee_per_millionth": 1, - "delay": 6, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ChannelInfo.from_listchannels( - { - "destination": "0224da9fd6e22d31ccbbbd51125d3e99a91f17f7aeec597c4f3c87cc0e1761fa1b", - "short_channel_id": "103x1x0", - "direction": 1, - "base_fee_millisatoshi": 10, - "fee_per_millionth": 1_000, - "delay": 80, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ChannelInfo.from_listchannels( - { - "destination": "035718afb1d31390e7883285e72690129af0de738e5a445363c812208f9c3cca35", - "short_channel_id": "104x1x0", - "direction": 0, - "base_fee_millisatoshi": 21, - "fee_per_millionth": 2_000, - "delay": 80, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ChannelInfo.from_listchannels( - { - "destination": "031fcfcd51ace905450e663d10886735b713324561e8f19d0de5d6c8c51de183e9", - "short_channel_id": "105x1x0", - "direction": 0, - "base_fee_millisatoshi": 1, - "fee_per_millionth": 100_000, - "delay": 100, - "htlc_minimum_msat": 1, - "htlc_maximum_msat": 1_000, - } - ), - ], - ), - ], - ) - def test_from_channel_infos( - self, - fee: int, - amounts: list[int], - delays: list[int], - route_data: list[ChannelInfo], - ) -> None: - amount = 1_000_000 - route = Route.from_channel_infos(Millisatoshi(amount), route_data) - - assert len(route) == len(route_data) - assert route.fee == fee - - for i, hop in enumerate(route.route): - assert hop["delay"] == delays[i] - assert hop["amount_msat"] == amounts[i] - - assert hop["id"] == route_data[i].destination - assert hop["channel"] == route_data[i].short_channel_id - assert hop["direction"] == route_data[i].direction - assert hop["style"] == "tlv" - - def test_from_channel_infos_empty(self) -> None: - with pytest.raises( - ValueError, - match="needs at last one channel info to create route", - ): - Route.from_channel_infos(Millisatoshi(1), []) diff --git a/tools/plugins/mpay/protos/__init__.py b/tools/plugins/mpay/protos/__init__.py deleted file mode 100644 index 1da1dcf0..00000000 --- a/tools/plugins/mpay/protos/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -import sys -from pathlib import Path - -sys.path.insert(0, str(Path(__file__).parent)) diff --git a/tools/plugins/mpay/protos/mpay.proto b/tools/plugins/mpay/protos/mpay.proto deleted file mode 100644 index d5244ce5..00000000 --- a/tools/plugins/mpay/protos/mpay.proto +++ /dev/null @@ -1,169 +0,0 @@ -syntax = "proto3"; - -package mpay; - -service Mpay { - rpc GetInfo (GetInfoRequest) returns (GetInfoResponse) {} - - rpc GetRoutes (GetRoutesRequest) returns (GetRoutesResponse) {} - rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse) {} - - rpc Pay (PayRequest) returns (PayResponse) {} - - rpc ResetPathMemory (ResetPathMemoryRequest) returns (ResetPathMemoryResponse) {} - - // Workaround to expose the paystatus command via gRPC, since CLN doesn't - rpc PayStatus (PayStatusRequest) returns (PayStatusResponse) {} -} - -message GetInfoRequest {} -message GetInfoResponse { - string version = 1; -} - -message GetRoutesRequest { - optional string destination = 1; - optional float min_success = 2; - optional float min_success_ema = 3; -} - -message GetRoutesResponse { - message Routes { - message Route { - repeated string route = 1; - double success_rate = 2; - double success_rate_ema = 3; - } - - repeated Route routes = 2; - } - - map routes = 1; -} - -message ListPaymentsRequest { - oneof identifier { - string bolt11 = 1; - string payment_hash = 2; - PaginationParams pagination = 3; - } -} - -message PaginationParams { - uint64 offset = 1; - uint32 limit = 2; -} - -message ListPaymentsResponse { - message Payment { - message Attempt { - message Hop { - uint64 id = 1; - string node = 2; - string channel = 3; - uint64 direction = 4; - bool ok = 5; - } - - uint64 id = 1; - bool ok = 2; - uint64 time = 3; - repeated Hop hops = 4; - uint64 created_at = 5; - } - - uint64 id = 1; - string destination = 2; - string payment_hash = 3; - uint64 amount = 4; - bool ok = 5; - repeated Attempt attempts = 6; - uint64 created_at = 7; - } - - repeated Payment payments = 1; -} - -message PayRequest { - string bolt11 = 1; - optional uint64 max_fee_msat = 2; - optional uint64 exempt_fee_msat = 3; - optional uint64 timeout = 4; - optional uint64 max_delay = 5; -} - -message PayResponse { - string payment_hash = 1; - string payment_preimage = 2; - uint64 fee_msat = 3; - uint64 time = 4; - string destination = 5; - uint64 amount_msat = 6; - uint64 amount_sent_msat = 7; - uint32 parts = 8; - string status = 9; - uint64 created_at = 10; -} - -message ResetPathMemoryRequest { - optional bool exclude_permanent_memory = 1; - optional bool exclude_temporary_memory = 2; -} - -message ResetPathMemoryResponse { - uint64 payments = 1; - uint64 attempts = 2; - uint64 hops = 3; -} - -message PayStatusRequest { - optional string invoice = 1; -} - -message PayStatusResponse { - message PayStatus { - message Attempt { - enum AttemptState { - ATTEMPT_PENDING = 0; - ATTEMPT_COMPLETED = 1; - } - - message Success { - uint64 id = 1; - string payment_preimage = 2; - } - - message Failure { - message Data { - uint64 id = 1; - string raw_message = 2; - uint64 fail_code = 3; - string fail_codename = 4; - uint64 erring_index = 5; - string erring_node = 6; - } - - string message = 1; - uint64 code = 2; - optional Data data = 3; - } - - string strategy = 1; - uint64 start_time = 2; - uint64 age_in_seconds = 3; - optional uint64 end_time = 4; - AttemptState state = 5; - optional Success success = 6; - optional Failure failure = 7; - } - - optional string bolt11 = 1; - optional string bolt12 = 5; - - uint64 amount_msat = 2; - string destination = 3; - repeated Attempt attempts = 4; - } - - repeated PayStatus status = 1; -} diff --git a/tools/plugins/mpay/protos/mpay_pb2.py b/tools/plugins/mpay/protos/mpay_pb2.py deleted file mode 100644 index b3ca75ef..00000000 --- a/tools/plugins/mpay/protos/mpay_pb2.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE -# source: mpay.proto -# Protobuf Python Version: 5.27.2 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 27, - 2, - '', - 'mpay.proto' -) -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nmpay.proto\x12\x04mpay\"\x10\n\x0eGetInfoRequest\"\"\n\x0fGetInfoResponse\x12\x0f\n\x07version\x18\x01 \x01(\t\"\x98\x01\n\x10GetRoutesRequest\x12\x18\n\x0b\x64\x65stination\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bmin_success\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x1c\n\x0fmin_success_ema\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\x0e\n\x0c_destinationB\x0e\n\x0c_min_successB\x12\n\x10_min_success_ema\"\xa0\x02\n\x11GetRoutesResponse\x12\x33\n\x06routes\x18\x01 \x03(\x0b\x32#.mpay.GetRoutesResponse.RoutesEntry\x1a\x86\x01\n\x06Routes\x12\x34\n\x06routes\x18\x02 \x03(\x0b\x32$.mpay.GetRoutesResponse.Routes.Route\x1a\x46\n\x05Route\x12\r\n\x05route\x18\x01 \x03(\t\x12\x14\n\x0csuccess_rate\x18\x02 \x01(\x01\x12\x18\n\x10success_rate_ema\x18\x03 \x01(\x01\x1aM\n\x0bRoutesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.mpay.GetRoutesResponse.Routes:\x02\x38\x01\"{\n\x13ListPaymentsRequest\x12\x10\n\x06\x62olt11\x18\x01 \x01(\tH\x00\x12\x16\n\x0cpayment_hash\x18\x02 \x01(\tH\x00\x12,\n\npagination\x18\x03 \x01(\x0b\x32\x16.mpay.PaginationParamsH\x00\x42\x0c\n\nidentifier\"1\n\x10PaginationParams\x12\x0e\n\x06offset\x18\x01 \x01(\x04\x12\r\n\x05limit\x18\x02 \x01(\r\"\xd2\x03\n\x14ListPaymentsResponse\x12\x34\n\x08payments\x18\x01 \x03(\x0b\x32\".mpay.ListPaymentsResponse.Payment\x1a\x83\x03\n\x07Payment\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t\x12\x14\n\x0cpayment_hash\x18\x03 \x01(\t\x12\x0e\n\x06\x61mount\x18\x04 \x01(\x04\x12\n\n\x02ok\x18\x05 \x01(\x08\x12<\n\x08\x61ttempts\x18\x06 \x03(\x0b\x32*.mpay.ListPaymentsResponse.Payment.Attempt\x12\x12\n\ncreated_at\x18\x07 \x01(\x04\x1a\xd2\x01\n\x07\x41ttempt\x12\n\n\x02id\x18\x01 \x01(\x04\x12\n\n\x02ok\x18\x02 \x01(\x08\x12\x0c\n\x04time\x18\x03 \x01(\x04\x12<\n\x04hops\x18\x04 \x03(\x0b\x32..mpay.ListPaymentsResponse.Payment.Attempt.Hop\x12\x12\n\ncreated_at\x18\x05 \x01(\x04\x1aO\n\x03Hop\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\x04\x12\n\n\x02ok\x18\x05 \x01(\x08\"\xc2\x01\n\nPayRequest\x12\x0e\n\x06\x62olt11\x18\x01 \x01(\t\x12\x19\n\x0cmax_fee_msat\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x1c\n\x0f\x65xempt_fee_msat\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x14\n\x07timeout\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x16\n\tmax_delay\x18\x05 \x01(\x04H\x03\x88\x01\x01\x42\x0f\n\r_max_fee_msatB\x12\n\x10_exempt_fee_msatB\n\n\x08_timeoutB\x0c\n\n_max_delay\"\xd4\x01\n\x0bPayResponse\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12\x18\n\x10payment_preimage\x18\x02 \x01(\t\x12\x10\n\x08\x66\x65\x65_msat\x18\x03 \x01(\x04\x12\x0c\n\x04time\x18\x04 \x01(\x04\x12\x13\n\x0b\x64\x65stination\x18\x05 \x01(\t\x12\x13\n\x0b\x61mount_msat\x18\x06 \x01(\x04\x12\x18\n\x10\x61mount_sent_msat\x18\x07 \x01(\x04\x12\r\n\x05parts\x18\x08 \x01(\r\x12\x0e\n\x06status\x18\t \x01(\t\x12\x12\n\ncreated_at\x18\n \x01(\x04\"\xa0\x01\n\x16ResetPathMemoryRequest\x12%\n\x18\x65xclude_permanent_memory\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12%\n\x18\x65xclude_temporary_memory\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x1b\n\x19_exclude_permanent_memoryB\x1b\n\x19_exclude_temporary_memory\"K\n\x17ResetPathMemoryResponse\x12\x10\n\x08payments\x18\x01 \x01(\x04\x12\x10\n\x08\x61ttempts\x18\x02 \x01(\x04\x12\x0c\n\x04hops\x18\x03 \x01(\x04\"4\n\x10PayStatusRequest\x12\x14\n\x07invoice\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_invoice\"\xc4\x07\n\x11PayStatusResponse\x12\x31\n\x06status\x18\x01 \x03(\x0b\x32!.mpay.PayStatusResponse.PayStatus\x1a\xfb\x06\n\tPayStatus\x12\x13\n\x06\x62olt11\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x62olt12\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x0b\x61mount_msat\x18\x02 \x01(\x04\x12\x13\n\x0b\x64\x65stination\x18\x03 \x01(\t\x12;\n\x08\x61ttempts\x18\x04 \x03(\x0b\x32).mpay.PayStatusResponse.PayStatus.Attempt\x1a\xc6\x05\n\x07\x41ttempt\x12\x10\n\x08strategy\x18\x01 \x01(\t\x12\x12\n\nstart_time\x18\x02 \x01(\x04\x12\x16\n\x0e\x61ge_in_seconds\x18\x03 \x01(\x04\x12\x15\n\x08\x65nd_time\x18\x04 \x01(\x04H\x00\x88\x01\x01\x12\x45\n\x05state\x18\x05 \x01(\x0e\x32\x36.mpay.PayStatusResponse.PayStatus.Attempt.AttemptState\x12G\n\x07success\x18\x06 \x01(\x0b\x32\x31.mpay.PayStatusResponse.PayStatus.Attempt.SuccessH\x01\x88\x01\x01\x12G\n\x07\x66\x61ilure\x18\x07 \x01(\x0b\x32\x31.mpay.PayStatusResponse.PayStatus.Attempt.FailureH\x02\x88\x01\x01\x1a/\n\x07Success\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x18\n\x10payment_preimage\x18\x02 \x01(\t\x1a\xfa\x01\n\x07\x46\x61ilure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\x04\x12I\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x36.mpay.PayStatusResponse.PayStatus.Attempt.Failure.DataH\x00\x88\x01\x01\x1a|\n\x04\x44\x61ta\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x13\n\x0braw_message\x18\x02 \x01(\t\x12\x11\n\tfail_code\x18\x03 \x01(\x04\x12\x15\n\rfail_codename\x18\x04 \x01(\t\x12\x14\n\x0c\x65rring_index\x18\x05 \x01(\x04\x12\x13\n\x0b\x65rring_node\x18\x06 \x01(\tB\x07\n\x05_data\":\n\x0c\x41ttemptState\x12\x13\n\x0f\x41TTEMPT_PENDING\x10\x00\x12\x15\n\x11\x41TTEMPT_COMPLETED\x10\x01\x42\x0b\n\t_end_timeB\n\n\x08_successB\n\n\x08_failureB\t\n\x07_bolt11B\t\n\x07_bolt122\x89\x03\n\x04Mpay\x12\x38\n\x07GetInfo\x12\x14.mpay.GetInfoRequest\x1a\x15.mpay.GetInfoResponse\"\x00\x12>\n\tGetRoutes\x12\x16.mpay.GetRoutesRequest\x1a\x17.mpay.GetRoutesResponse\"\x00\x12G\n\x0cListPayments\x12\x19.mpay.ListPaymentsRequest\x1a\x1a.mpay.ListPaymentsResponse\"\x00\x12,\n\x03Pay\x12\x10.mpay.PayRequest\x1a\x11.mpay.PayResponse\"\x00\x12P\n\x0fResetPathMemory\x12\x1c.mpay.ResetPathMemoryRequest\x1a\x1d.mpay.ResetPathMemoryResponse\"\x00\x12>\n\tPayStatus\x12\x16.mpay.PayStatusRequest\x1a\x17.mpay.PayStatusResponse\"\x00\x62\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mpay_pb2', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - DESCRIPTOR._loaded_options = None - _globals['_GETROUTESRESPONSE_ROUTESENTRY']._loaded_options = None - _globals['_GETROUTESRESPONSE_ROUTESENTRY']._serialized_options = b'8\001' - _globals['_GETINFOREQUEST']._serialized_start=20 - _globals['_GETINFOREQUEST']._serialized_end=36 - _globals['_GETINFORESPONSE']._serialized_start=38 - _globals['_GETINFORESPONSE']._serialized_end=72 - _globals['_GETROUTESREQUEST']._serialized_start=75 - _globals['_GETROUTESREQUEST']._serialized_end=227 - _globals['_GETROUTESRESPONSE']._serialized_start=230 - _globals['_GETROUTESRESPONSE']._serialized_end=518 - _globals['_GETROUTESRESPONSE_ROUTES']._serialized_start=305 - _globals['_GETROUTESRESPONSE_ROUTES']._serialized_end=439 - _globals['_GETROUTESRESPONSE_ROUTES_ROUTE']._serialized_start=369 - _globals['_GETROUTESRESPONSE_ROUTES_ROUTE']._serialized_end=439 - _globals['_GETROUTESRESPONSE_ROUTESENTRY']._serialized_start=441 - _globals['_GETROUTESRESPONSE_ROUTESENTRY']._serialized_end=518 - _globals['_LISTPAYMENTSREQUEST']._serialized_start=520 - _globals['_LISTPAYMENTSREQUEST']._serialized_end=643 - _globals['_PAGINATIONPARAMS']._serialized_start=645 - _globals['_PAGINATIONPARAMS']._serialized_end=694 - _globals['_LISTPAYMENTSRESPONSE']._serialized_start=697 - _globals['_LISTPAYMENTSRESPONSE']._serialized_end=1163 - _globals['_LISTPAYMENTSRESPONSE_PAYMENT']._serialized_start=776 - _globals['_LISTPAYMENTSRESPONSE_PAYMENT']._serialized_end=1163 - _globals['_LISTPAYMENTSRESPONSE_PAYMENT_ATTEMPT']._serialized_start=953 - _globals['_LISTPAYMENTSRESPONSE_PAYMENT_ATTEMPT']._serialized_end=1163 - _globals['_LISTPAYMENTSRESPONSE_PAYMENT_ATTEMPT_HOP']._serialized_start=1084 - _globals['_LISTPAYMENTSRESPONSE_PAYMENT_ATTEMPT_HOP']._serialized_end=1163 - _globals['_PAYREQUEST']._serialized_start=1166 - _globals['_PAYREQUEST']._serialized_end=1360 - _globals['_PAYRESPONSE']._serialized_start=1363 - _globals['_PAYRESPONSE']._serialized_end=1575 - _globals['_RESETPATHMEMORYREQUEST']._serialized_start=1578 - _globals['_RESETPATHMEMORYREQUEST']._serialized_end=1738 - _globals['_RESETPATHMEMORYRESPONSE']._serialized_start=1740 - _globals['_RESETPATHMEMORYRESPONSE']._serialized_end=1815 - _globals['_PAYSTATUSREQUEST']._serialized_start=1817 - _globals['_PAYSTATUSREQUEST']._serialized_end=1869 - _globals['_PAYSTATUSRESPONSE']._serialized_start=1872 - _globals['_PAYSTATUSRESPONSE']._serialized_end=2836 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS']._serialized_start=1945 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS']._serialized_end=2836 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT']._serialized_start=2104 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT']._serialized_end=2814 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_SUCCESS']._serialized_start=2417 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_SUCCESS']._serialized_end=2464 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_FAILURE']._serialized_start=2467 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_FAILURE']._serialized_end=2717 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_FAILURE_DATA']._serialized_start=2584 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_FAILURE_DATA']._serialized_end=2708 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_ATTEMPTSTATE']._serialized_start=2719 - _globals['_PAYSTATUSRESPONSE_PAYSTATUS_ATTEMPT_ATTEMPTSTATE']._serialized_end=2777 - _globals['_MPAY']._serialized_start=2839 - _globals['_MPAY']._serialized_end=3232 -# @@protoc_insertion_point(module_scope) diff --git a/tools/plugins/mpay/protos/mpay_pb2.pyi b/tools/plugins/mpay/protos/mpay_pb2.pyi deleted file mode 100644 index 82459158..00000000 --- a/tools/plugins/mpay/protos/mpay_pb2.pyi +++ /dev/null @@ -1,256 +0,0 @@ -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class GetInfoRequest(_message.Message): - __slots__ = () - def __init__(self) -> None: ... - -class GetInfoResponse(_message.Message): - __slots__ = ("version",) - VERSION_FIELD_NUMBER: _ClassVar[int] - version: str - def __init__(self, version: _Optional[str] = ...) -> None: ... - -class GetRoutesRequest(_message.Message): - __slots__ = ("destination", "min_success", "min_success_ema") - DESTINATION_FIELD_NUMBER: _ClassVar[int] - MIN_SUCCESS_FIELD_NUMBER: _ClassVar[int] - MIN_SUCCESS_EMA_FIELD_NUMBER: _ClassVar[int] - destination: str - min_success: float - min_success_ema: float - def __init__(self, destination: _Optional[str] = ..., min_success: _Optional[float] = ..., min_success_ema: _Optional[float] = ...) -> None: ... - -class GetRoutesResponse(_message.Message): - __slots__ = ("routes",) - class Routes(_message.Message): - __slots__ = ("routes",) - class Route(_message.Message): - __slots__ = ("route", "success_rate", "success_rate_ema") - ROUTE_FIELD_NUMBER: _ClassVar[int] - SUCCESS_RATE_FIELD_NUMBER: _ClassVar[int] - SUCCESS_RATE_EMA_FIELD_NUMBER: _ClassVar[int] - route: _containers.RepeatedScalarFieldContainer[str] - success_rate: float - success_rate_ema: float - def __init__(self, route: _Optional[_Iterable[str]] = ..., success_rate: _Optional[float] = ..., success_rate_ema: _Optional[float] = ...) -> None: ... - ROUTES_FIELD_NUMBER: _ClassVar[int] - routes: _containers.RepeatedCompositeFieldContainer[GetRoutesResponse.Routes.Route] - def __init__(self, routes: _Optional[_Iterable[_Union[GetRoutesResponse.Routes.Route, _Mapping]]] = ...) -> None: ... - class RoutesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: GetRoutesResponse.Routes - def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[GetRoutesResponse.Routes, _Mapping]] = ...) -> None: ... - ROUTES_FIELD_NUMBER: _ClassVar[int] - routes: _containers.MessageMap[str, GetRoutesResponse.Routes] - def __init__(self, routes: _Optional[_Mapping[str, GetRoutesResponse.Routes]] = ...) -> None: ... - -class ListPaymentsRequest(_message.Message): - __slots__ = ("bolt11", "payment_hash", "pagination") - BOLT11_FIELD_NUMBER: _ClassVar[int] - PAYMENT_HASH_FIELD_NUMBER: _ClassVar[int] - PAGINATION_FIELD_NUMBER: _ClassVar[int] - bolt11: str - payment_hash: str - pagination: PaginationParams - def __init__(self, bolt11: _Optional[str] = ..., payment_hash: _Optional[str] = ..., pagination: _Optional[_Union[PaginationParams, _Mapping]] = ...) -> None: ... - -class PaginationParams(_message.Message): - __slots__ = ("offset", "limit") - OFFSET_FIELD_NUMBER: _ClassVar[int] - LIMIT_FIELD_NUMBER: _ClassVar[int] - offset: int - limit: int - def __init__(self, offset: _Optional[int] = ..., limit: _Optional[int] = ...) -> None: ... - -class ListPaymentsResponse(_message.Message): - __slots__ = ("payments",) - class Payment(_message.Message): - __slots__ = ("id", "destination", "payment_hash", "amount", "ok", "attempts", "created_at") - class Attempt(_message.Message): - __slots__ = ("id", "ok", "time", "hops", "created_at") - class Hop(_message.Message): - __slots__ = ("id", "node", "channel", "direction", "ok") - ID_FIELD_NUMBER: _ClassVar[int] - NODE_FIELD_NUMBER: _ClassVar[int] - CHANNEL_FIELD_NUMBER: _ClassVar[int] - DIRECTION_FIELD_NUMBER: _ClassVar[int] - OK_FIELD_NUMBER: _ClassVar[int] - id: int - node: str - channel: str - direction: int - ok: bool - def __init__(self, id: _Optional[int] = ..., node: _Optional[str] = ..., channel: _Optional[str] = ..., direction: _Optional[int] = ..., ok: bool = ...) -> None: ... - ID_FIELD_NUMBER: _ClassVar[int] - OK_FIELD_NUMBER: _ClassVar[int] - TIME_FIELD_NUMBER: _ClassVar[int] - HOPS_FIELD_NUMBER: _ClassVar[int] - CREATED_AT_FIELD_NUMBER: _ClassVar[int] - id: int - ok: bool - time: int - hops: _containers.RepeatedCompositeFieldContainer[ListPaymentsResponse.Payment.Attempt.Hop] - created_at: int - def __init__(self, id: _Optional[int] = ..., ok: bool = ..., time: _Optional[int] = ..., hops: _Optional[_Iterable[_Union[ListPaymentsResponse.Payment.Attempt.Hop, _Mapping]]] = ..., created_at: _Optional[int] = ...) -> None: ... - ID_FIELD_NUMBER: _ClassVar[int] - DESTINATION_FIELD_NUMBER: _ClassVar[int] - PAYMENT_HASH_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - OK_FIELD_NUMBER: _ClassVar[int] - ATTEMPTS_FIELD_NUMBER: _ClassVar[int] - CREATED_AT_FIELD_NUMBER: _ClassVar[int] - id: int - destination: str - payment_hash: str - amount: int - ok: bool - attempts: _containers.RepeatedCompositeFieldContainer[ListPaymentsResponse.Payment.Attempt] - created_at: int - def __init__(self, id: _Optional[int] = ..., destination: _Optional[str] = ..., payment_hash: _Optional[str] = ..., amount: _Optional[int] = ..., ok: bool = ..., attempts: _Optional[_Iterable[_Union[ListPaymentsResponse.Payment.Attempt, _Mapping]]] = ..., created_at: _Optional[int] = ...) -> None: ... - PAYMENTS_FIELD_NUMBER: _ClassVar[int] - payments: _containers.RepeatedCompositeFieldContainer[ListPaymentsResponse.Payment] - def __init__(self, payments: _Optional[_Iterable[_Union[ListPaymentsResponse.Payment, _Mapping]]] = ...) -> None: ... - -class PayRequest(_message.Message): - __slots__ = ("bolt11", "max_fee_msat", "exempt_fee_msat", "timeout", "max_delay") - BOLT11_FIELD_NUMBER: _ClassVar[int] - MAX_FEE_MSAT_FIELD_NUMBER: _ClassVar[int] - EXEMPT_FEE_MSAT_FIELD_NUMBER: _ClassVar[int] - TIMEOUT_FIELD_NUMBER: _ClassVar[int] - MAX_DELAY_FIELD_NUMBER: _ClassVar[int] - bolt11: str - max_fee_msat: int - exempt_fee_msat: int - timeout: int - max_delay: int - def __init__(self, bolt11: _Optional[str] = ..., max_fee_msat: _Optional[int] = ..., exempt_fee_msat: _Optional[int] = ..., timeout: _Optional[int] = ..., max_delay: _Optional[int] = ...) -> None: ... - -class PayResponse(_message.Message): - __slots__ = ("payment_hash", "payment_preimage", "fee_msat", "time", "destination", "amount_msat", "amount_sent_msat", "parts", "status", "created_at") - PAYMENT_HASH_FIELD_NUMBER: _ClassVar[int] - PAYMENT_PREIMAGE_FIELD_NUMBER: _ClassVar[int] - FEE_MSAT_FIELD_NUMBER: _ClassVar[int] - TIME_FIELD_NUMBER: _ClassVar[int] - DESTINATION_FIELD_NUMBER: _ClassVar[int] - AMOUNT_MSAT_FIELD_NUMBER: _ClassVar[int] - AMOUNT_SENT_MSAT_FIELD_NUMBER: _ClassVar[int] - PARTS_FIELD_NUMBER: _ClassVar[int] - STATUS_FIELD_NUMBER: _ClassVar[int] - CREATED_AT_FIELD_NUMBER: _ClassVar[int] - payment_hash: str - payment_preimage: str - fee_msat: int - time: int - destination: str - amount_msat: int - amount_sent_msat: int - parts: int - status: str - created_at: int - def __init__(self, payment_hash: _Optional[str] = ..., payment_preimage: _Optional[str] = ..., fee_msat: _Optional[int] = ..., time: _Optional[int] = ..., destination: _Optional[str] = ..., amount_msat: _Optional[int] = ..., amount_sent_msat: _Optional[int] = ..., parts: _Optional[int] = ..., status: _Optional[str] = ..., created_at: _Optional[int] = ...) -> None: ... - -class ResetPathMemoryRequest(_message.Message): - __slots__ = ("exclude_permanent_memory", "exclude_temporary_memory") - EXCLUDE_PERMANENT_MEMORY_FIELD_NUMBER: _ClassVar[int] - EXCLUDE_TEMPORARY_MEMORY_FIELD_NUMBER: _ClassVar[int] - exclude_permanent_memory: bool - exclude_temporary_memory: bool - def __init__(self, exclude_permanent_memory: bool = ..., exclude_temporary_memory: bool = ...) -> None: ... - -class ResetPathMemoryResponse(_message.Message): - __slots__ = ("payments", "attempts", "hops") - PAYMENTS_FIELD_NUMBER: _ClassVar[int] - ATTEMPTS_FIELD_NUMBER: _ClassVar[int] - HOPS_FIELD_NUMBER: _ClassVar[int] - payments: int - attempts: int - hops: int - def __init__(self, payments: _Optional[int] = ..., attempts: _Optional[int] = ..., hops: _Optional[int] = ...) -> None: ... - -class PayStatusRequest(_message.Message): - __slots__ = ("invoice",) - INVOICE_FIELD_NUMBER: _ClassVar[int] - invoice: str - def __init__(self, invoice: _Optional[str] = ...) -> None: ... - -class PayStatusResponse(_message.Message): - __slots__ = ("status",) - class PayStatus(_message.Message): - __slots__ = ("bolt11", "bolt12", "amount_msat", "destination", "attempts") - class Attempt(_message.Message): - __slots__ = ("strategy", "start_time", "age_in_seconds", "end_time", "state", "success", "failure") - class AttemptState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - ATTEMPT_PENDING: _ClassVar[PayStatusResponse.PayStatus.Attempt.AttemptState] - ATTEMPT_COMPLETED: _ClassVar[PayStatusResponse.PayStatus.Attempt.AttemptState] - ATTEMPT_PENDING: PayStatusResponse.PayStatus.Attempt.AttemptState - ATTEMPT_COMPLETED: PayStatusResponse.PayStatus.Attempt.AttemptState - class Success(_message.Message): - __slots__ = ("id", "payment_preimage") - ID_FIELD_NUMBER: _ClassVar[int] - PAYMENT_PREIMAGE_FIELD_NUMBER: _ClassVar[int] - id: int - payment_preimage: str - def __init__(self, id: _Optional[int] = ..., payment_preimage: _Optional[str] = ...) -> None: ... - class Failure(_message.Message): - __slots__ = ("message", "code", "data") - class Data(_message.Message): - __slots__ = ("id", "raw_message", "fail_code", "fail_codename", "erring_index", "erring_node") - ID_FIELD_NUMBER: _ClassVar[int] - RAW_MESSAGE_FIELD_NUMBER: _ClassVar[int] - FAIL_CODE_FIELD_NUMBER: _ClassVar[int] - FAIL_CODENAME_FIELD_NUMBER: _ClassVar[int] - ERRING_INDEX_FIELD_NUMBER: _ClassVar[int] - ERRING_NODE_FIELD_NUMBER: _ClassVar[int] - id: int - raw_message: str - fail_code: int - fail_codename: str - erring_index: int - erring_node: str - def __init__(self, id: _Optional[int] = ..., raw_message: _Optional[str] = ..., fail_code: _Optional[int] = ..., fail_codename: _Optional[str] = ..., erring_index: _Optional[int] = ..., erring_node: _Optional[str] = ...) -> None: ... - MESSAGE_FIELD_NUMBER: _ClassVar[int] - CODE_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - message: str - code: int - data: PayStatusResponse.PayStatus.Attempt.Failure.Data - def __init__(self, message: _Optional[str] = ..., code: _Optional[int] = ..., data: _Optional[_Union[PayStatusResponse.PayStatus.Attempt.Failure.Data, _Mapping]] = ...) -> None: ... - STRATEGY_FIELD_NUMBER: _ClassVar[int] - START_TIME_FIELD_NUMBER: _ClassVar[int] - AGE_IN_SECONDS_FIELD_NUMBER: _ClassVar[int] - END_TIME_FIELD_NUMBER: _ClassVar[int] - STATE_FIELD_NUMBER: _ClassVar[int] - SUCCESS_FIELD_NUMBER: _ClassVar[int] - FAILURE_FIELD_NUMBER: _ClassVar[int] - strategy: str - start_time: int - age_in_seconds: int - end_time: int - state: PayStatusResponse.PayStatus.Attempt.AttemptState - success: PayStatusResponse.PayStatus.Attempt.Success - failure: PayStatusResponse.PayStatus.Attempt.Failure - def __init__(self, strategy: _Optional[str] = ..., start_time: _Optional[int] = ..., age_in_seconds: _Optional[int] = ..., end_time: _Optional[int] = ..., state: _Optional[_Union[PayStatusResponse.PayStatus.Attempt.AttemptState, str]] = ..., success: _Optional[_Union[PayStatusResponse.PayStatus.Attempt.Success, _Mapping]] = ..., failure: _Optional[_Union[PayStatusResponse.PayStatus.Attempt.Failure, _Mapping]] = ...) -> None: ... - BOLT11_FIELD_NUMBER: _ClassVar[int] - BOLT12_FIELD_NUMBER: _ClassVar[int] - AMOUNT_MSAT_FIELD_NUMBER: _ClassVar[int] - DESTINATION_FIELD_NUMBER: _ClassVar[int] - ATTEMPTS_FIELD_NUMBER: _ClassVar[int] - bolt11: str - bolt12: str - amount_msat: int - destination: str - attempts: _containers.RepeatedCompositeFieldContainer[PayStatusResponse.PayStatus.Attempt] - def __init__(self, bolt11: _Optional[str] = ..., bolt12: _Optional[str] = ..., amount_msat: _Optional[int] = ..., destination: _Optional[str] = ..., attempts: _Optional[_Iterable[_Union[PayStatusResponse.PayStatus.Attempt, _Mapping]]] = ...) -> None: ... - STATUS_FIELD_NUMBER: _ClassVar[int] - status: _containers.RepeatedCompositeFieldContainer[PayStatusResponse.PayStatus] - def __init__(self, status: _Optional[_Iterable[_Union[PayStatusResponse.PayStatus, _Mapping]]] = ...) -> None: ... diff --git a/tools/plugins/mpay/protos/mpay_pb2_grpc.py b/tools/plugins/mpay/protos/mpay_pb2_grpc.py deleted file mode 100644 index 5ebbcb83..00000000 --- a/tools/plugins/mpay/protos/mpay_pb2_grpc.py +++ /dev/null @@ -1,313 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc -import warnings - -import mpay_pb2 as mpay__pb2 - -GRPC_GENERATED_VERSION = '1.67.1' -GRPC_VERSION = grpc.__version__ -_version_not_supported = False - -try: - from grpc._utilities import first_version_is_lower - _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) -except ImportError: - _version_not_supported = True - -if _version_not_supported: - raise RuntimeError( - f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in mpay_pb2_grpc.py depends on' - + f' grpcio>={GRPC_GENERATED_VERSION}.' - + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' - + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' - ) - - -class MpayStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetInfo = channel.unary_unary( - '/mpay.Mpay/GetInfo', - request_serializer=mpay__pb2.GetInfoRequest.SerializeToString, - response_deserializer=mpay__pb2.GetInfoResponse.FromString, - _registered_method=True) - self.GetRoutes = channel.unary_unary( - '/mpay.Mpay/GetRoutes', - request_serializer=mpay__pb2.GetRoutesRequest.SerializeToString, - response_deserializer=mpay__pb2.GetRoutesResponse.FromString, - _registered_method=True) - self.ListPayments = channel.unary_unary( - '/mpay.Mpay/ListPayments', - request_serializer=mpay__pb2.ListPaymentsRequest.SerializeToString, - response_deserializer=mpay__pb2.ListPaymentsResponse.FromString, - _registered_method=True) - self.Pay = channel.unary_unary( - '/mpay.Mpay/Pay', - request_serializer=mpay__pb2.PayRequest.SerializeToString, - response_deserializer=mpay__pb2.PayResponse.FromString, - _registered_method=True) - self.ResetPathMemory = channel.unary_unary( - '/mpay.Mpay/ResetPathMemory', - request_serializer=mpay__pb2.ResetPathMemoryRequest.SerializeToString, - response_deserializer=mpay__pb2.ResetPathMemoryResponse.FromString, - _registered_method=True) - self.PayStatus = channel.unary_unary( - '/mpay.Mpay/PayStatus', - request_serializer=mpay__pb2.PayStatusRequest.SerializeToString, - response_deserializer=mpay__pb2.PayStatusResponse.FromString, - _registered_method=True) - - -class MpayServicer(object): - """Missing associated documentation comment in .proto file.""" - - def GetInfo(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetRoutes(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ListPayments(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Pay(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetPathMemory(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def PayStatus(self, request, context): - """Workaround to expose the paystatus command via gRPC, since CLN doesn't - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_MpayServicer_to_server(servicer, server): - rpc_method_handlers = { - 'GetInfo': grpc.unary_unary_rpc_method_handler( - servicer.GetInfo, - request_deserializer=mpay__pb2.GetInfoRequest.FromString, - response_serializer=mpay__pb2.GetInfoResponse.SerializeToString, - ), - 'GetRoutes': grpc.unary_unary_rpc_method_handler( - servicer.GetRoutes, - request_deserializer=mpay__pb2.GetRoutesRequest.FromString, - response_serializer=mpay__pb2.GetRoutesResponse.SerializeToString, - ), - 'ListPayments': grpc.unary_unary_rpc_method_handler( - servicer.ListPayments, - request_deserializer=mpay__pb2.ListPaymentsRequest.FromString, - response_serializer=mpay__pb2.ListPaymentsResponse.SerializeToString, - ), - 'Pay': grpc.unary_unary_rpc_method_handler( - servicer.Pay, - request_deserializer=mpay__pb2.PayRequest.FromString, - response_serializer=mpay__pb2.PayResponse.SerializeToString, - ), - 'ResetPathMemory': grpc.unary_unary_rpc_method_handler( - servicer.ResetPathMemory, - request_deserializer=mpay__pb2.ResetPathMemoryRequest.FromString, - response_serializer=mpay__pb2.ResetPathMemoryResponse.SerializeToString, - ), - 'PayStatus': grpc.unary_unary_rpc_method_handler( - servicer.PayStatus, - request_deserializer=mpay__pb2.PayStatusRequest.FromString, - response_serializer=mpay__pb2.PayStatusResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'mpay.Mpay', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - server.add_registered_method_handlers('mpay.Mpay', rpc_method_handlers) - - - # This class is part of an EXPERIMENTAL API. -class Mpay(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def GetInfo(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mpay.Mpay/GetInfo', - mpay__pb2.GetInfoRequest.SerializeToString, - mpay__pb2.GetInfoResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def GetRoutes(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mpay.Mpay/GetRoutes', - mpay__pb2.GetRoutesRequest.SerializeToString, - mpay__pb2.GetRoutesResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def ListPayments(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mpay.Mpay/ListPayments', - mpay__pb2.ListPaymentsRequest.SerializeToString, - mpay__pb2.ListPaymentsResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def Pay(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mpay.Mpay/Pay', - mpay__pb2.PayRequest.SerializeToString, - mpay__pb2.PayResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def ResetPathMemory(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mpay.Mpay/ResetPathMemory', - mpay__pb2.ResetPathMemoryRequest.SerializeToString, - mpay__pb2.ResetPathMemoryResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def PayStatus(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/mpay.Mpay/PayStatus', - mpay__pb2.PayStatusRequest.SerializeToString, - mpay__pb2.PayStatusResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) diff --git a/tools/plugins/mpay/routing_hints.py b/tools/plugins/mpay/routing_hints.py deleted file mode 100644 index 4e479294..00000000 --- a/tools/plugins/mpay/routing_hints.py +++ /dev/null @@ -1,42 +0,0 @@ -from typing import Any - -from plugins.mpay.pay.route import Fees, RoutingHint - - -class OnlySingleRoutingHintsError(Exception): - pass - - -# TODO: don't *always* use the routing hint but add it as option -def parse_routing_hints(dec: dict[str, Any]) -> tuple[bool, str, RoutingHint | None]: - payee = dec["payee"] - - if "routes" not in dec: - return False, payee, None - - routing_hints = dec["routes"] - if len(routing_hints) != 1 or len(routing_hints[0]) != 1: - # TODO: multiple routing hints support - raise OnlySingleRoutingHintsError - - hop_hint = routing_hints[0][0] - - return ( - True, - hop_hint["pubkey"], - RoutingHint( - hop_hint={ - "id": payee, - "channel": hop_hint["short_channel_id"], - "direction": 1, - "amount_msat": dec["amount_msat"], - "delay": 0, - "style": "tlv", - }, - fees=Fees( - base_msat=hop_hint["fee_base_msat"], - proportional_millionths=hop_hint["fee_proportional_millionths"], - ), - cltv_expiry_delta=hop_hint["cltv_expiry_delta"], - ), - ) diff --git a/tools/plugins/mpay/rpc/__init__.py b/tools/plugins/mpay/rpc/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/plugins/mpay/rpc/certs.py b/tools/plugins/mpay/rpc/certs.py deleted file mode 100644 index b2be35ee..00000000 --- a/tools/plugins/mpay/rpc/certs.py +++ /dev/null @@ -1,97 +0,0 @@ -import datetime -from dataclasses import dataclass -from pathlib import Path - -from cryptography import x509 -from cryptography.hazmat.primitives import hashes, serialization -from cryptography.hazmat.primitives.asymmetric import ec -from cryptography.hazmat.primitives.asymmetric.ec import ( - SECP256R1, -) -from cryptography.x509.oid import NameOID - -from plugins.mpay.utils import time_now - - -@dataclass -class Certificate: - key: bytes - cert: bytes - - -def load_certs(name: str, base_path: str) -> tuple[Certificate, Certificate]: - Path(base_path).mkdir(exist_ok=True) - - ca_cert = get_cert(name, base_path, "ca") - server_cert = get_cert(name, base_path, "server", ca_cert.key) - get_cert(name, base_path, "client", ca_cert.key) - - return ca_cert, server_cert - - -def get_cert(subject: str, base_path: str, name: str, ca_key: bytes | None = None) -> Certificate: - def get_path(file_name: str) -> str: - return str(Path(base_path).joinpath(Path(file_name))) - - cert_path = f"{get_path(name)}.pem" - key_path = f"{get_path(name)}-key.pem" - - if all(Path.exists(Path(path)) for path in [cert_path, key_path]): - return Certificate( - key=Path.read_bytes(Path(key_path)), - cert=Path.read_bytes(Path(cert_path)), - ) - - key = ec.generate_private_key(curve=SECP256R1()) - - is_ca = ca_key is None - - subject_prefix = subject.upper() - issuer_name = create_cert_name(f"{subject_prefix} Root CA") - - cert = ( - x509.CertificateBuilder() - .subject_name(issuer_name if is_ca else create_cert_name(f"{subject_prefix} {name}")) - .issuer_name(issuer_name) - .public_key(key.public_key()) - .serial_number(x509.random_serial_number()) - .not_valid_before(time_now()) - .not_valid_after(time_now() + datetime.timedelta(weeks=52 * 10)) - .add_extension( - x509.SubjectAlternativeName([x509.DNSName(name) for name in [subject, "localhost"]]), - critical=False, - ) - ) - - if is_ca: - cert = cert.add_extension(x509.BasicConstraints(ca=True, path_length=None), critical=True) - - cert = cert.sign( - serialization.load_pem_private_key(ca_key, password=None) if not is_ca else key, - hashes.SHA256(), - ) - - key_bytes = key.private_bytes( - encoding=serialization.Encoding.PEM, - format=serialization.PrivateFormat.TraditionalOpenSSL, - encryption_algorithm=serialization.NoEncryption(), - ) - cert_bytes = cert.public_bytes(serialization.Encoding.PEM) - - for file_path, content in [(cert_path, cert_bytes), (key_path, key_bytes)]: - write_bytes(file_path, content) - - return Certificate(key=key_bytes, cert=cert_bytes) - - -def create_cert_name(common_name: str) -> x509.Name: - return x509.Name( - [ - x509.NameAttribute(NameOID.COMMON_NAME, common_name), - ] - ) - - -def write_bytes(name: str, content: bytes) -> None: - with Path.open(Path(name), "b+w") as f: - f.write(content) diff --git a/tools/plugins/mpay/rpc/grpc_server.py b/tools/plugins/mpay/rpc/grpc_server.py deleted file mode 100644 index 48bb11ea..00000000 --- a/tools/plugins/mpay/rpc/grpc_server.py +++ /dev/null @@ -1,110 +0,0 @@ -import threading -from abc import ABC, abstractmethod -from concurrent.futures import ThreadPoolExecutor -from typing import Callable - -import grpc -from grpc_interceptor import ServerInterceptor -from pyln.client import Plugin - -from plugins.mpay.rpc.certs import load_certs - - -def handle_grpc_error( - plugin: Plugin, - method_name: str, - context: grpc.ServicerContext, - e: Exception, -) -> None: - estr = str(e) if str(e) != "" else repr(e) - - plugin.log(f"gRPC call {method_name} failed: {estr}", level="warn") - context.abort(grpc.StatusCode.INTERNAL, estr) - - -class ServerError(Exception): - def __init__(self, message: str) -> None: - super().__init__(message) - - -class LogInterceptor(ServerInterceptor): - _plugin: Plugin - - def __init__(self, plugin: Plugin) -> None: - self._plugin = plugin - - def intercept( - self, - method: Callable, - request: object, - context: grpc.ServicerContext, - method_name: str, - ) -> object: - try: - self._plugin.log(f"gRPC call {method_name}", level="debug") - return method(request, context) - except Exception as e: - handle_grpc_error(self._plugin, method_name, context, e) - - -class GrpcServer(ABC): - _name: str - _use_ssl: bool - - _plugin: Plugin - _server: grpc.Server | None - - _server_thread: threading.Thread | None - - def __init__(self, name: str, pl: Plugin, use_ssl: bool = True) -> None: - self._name = name - self._use_ssl = use_ssl - - self._plugin = pl - self._server = None - self._server_thread = None - - def start(self, host: str, port: int, lightning_dir: str | None) -> None: - self._server = grpc.server( - ThreadPoolExecutor(), - interceptors=[LogInterceptor(self._plugin)], - ) - self._register_service() - - address = f"{host}:{port}" - - if self._use_ssl and lightning_dir is not None: - ca_cert, server_cert = load_certs(self._name, f"{lightning_dir}/{self._name}") - self._server.add_secure_port( - address, - grpc.ssl_server_credentials( - [(server_cert.key, server_cert.cert)], ca_cert.cert, True - ), - ) - else: - self._server.add_insecure_port(address) - - def start_server() -> None: - self._server.start() - - self._plugin.log(f"Started {self._name} gRPC server on {address}") - self._server.wait_for_termination() - - self._server_thread = threading.Thread(target=start_server) - self._server_thread.start() - - def is_running(self) -> bool: - return self._server is not None - - def stop(self) -> None: - if self.is_running(): - self._server.stop(False) - self._server_thread.join() - self._plugin.log("Stopped gRPC server") - else: - msg = "server not running" - raise ServerError(msg) - - @abstractmethod - def _register_service(self) -> None: - pass diff --git a/tools/plugins/mpay/rpc/server.py b/tools/plugins/mpay/rpc/server.py deleted file mode 100644 index 7b093511..00000000 --- a/tools/plugins/mpay/rpc/server.py +++ /dev/null @@ -1,174 +0,0 @@ -import grpc -from bolt11 import decode as bolt11_decode -from pyln.client import Plugin -from sqlalchemy.orm import Session - -from plugins.mpay.consts import PLUGIN_NAME, VERSION -from plugins.mpay.data.payments import Payments -from plugins.mpay.data.routes import Routes -from plugins.mpay.db.db import Database -from plugins.mpay.defaults import DEFAULT_EXEMPT_FEE, DEFAULT_PAYMENT_TIMEOUT -from plugins.mpay.pay.mpay import MPay -from plugins.mpay.protos.mpay_pb2 import ( - GetInfoRequest, - GetInfoResponse, - GetRoutesRequest, - GetRoutesResponse, - ListPaymentsRequest, - ListPaymentsResponse, - PayRequest, - PayResponse, - PayStatusRequest, - PayStatusResponse, - ResetPathMemoryRequest, - ResetPathMemoryResponse, -) -from plugins.mpay.protos.mpay_pb2_grpc import MpayServicer, add_MpayServicer_to_server -from plugins.mpay.rpc.grpc_server import GrpcServer -from plugins.mpay.rpc.transformers import ( - pay_status_response_to_grpc, - payment_to_grpc, - routes_to_grpc, -) - - -class MpayService(MpayServicer): - _db: Database - _mpay: MPay - _routes: Routes - - def __init__( - self, - db: Database, - mpay: MPay, - routes: Routes, - ) -> None: - self._db = db - self._mpay = mpay - self._routes = routes - - def GetInfo(self, request: GetInfoRequest, context: grpc.ServicerContext) -> GetInfoResponse: # noqa: N802, ARG002 - return GetInfoResponse(version=VERSION) - - def Pay(self, request: PayRequest, context: grpc.ServicerContext) -> PayResponse: # noqa: N802, ARG002 - res = self._mpay.pay( - bolt11=request.bolt11, - max_fee=request.max_fee_msat if request.max_fee_msat != 0 else None, - exempt_fee=request.exempt_fee_msat - if request.exempt_fee_msat != 0 - else DEFAULT_EXEMPT_FEE, - timeout=request.timeout if request.timeout != 0 else DEFAULT_PAYMENT_TIMEOUT, - max_delay=request.max_delay if request.max_delay != 0 else None, - ) - - return PayResponse( - destination=res.destination, - payment_hash=res.payment_hash, - payment_preimage=res.payment_preimage, - amount_msat=int(res.amount_msat), - amount_sent_msat=int(res.amount_sent_msat), - fee_msat=int(res.fee_msat), - parts=res.parts, - status=res.status, - time=res.time, - created_at=res.created_at, - ) - - def GetRoutes( # noqa: N802 - self, - request: GetRoutesRequest, - context: grpc.ServicerContext, # noqa: ARG002 - ) -> GetRoutesResponse: - if request.destination != "": - destinations = [request.destination] - else: - destinations = self._routes.get_destinations() - - routes = { - dest: routes_to_grpc( - self._routes.get_routes(dest, request.min_success, request.min_success_ema) - ) - for dest in destinations - } - - for key in [k for k, v in routes.items() if len(v.routes) == 0]: - del routes[key] - - return GetRoutesResponse(routes=routes) - - def ListPayments( # noqa: N802 - self, - request: ListPaymentsRequest, - context: grpc.ServicerContext, # noqa: ARG002 - ) -> ListPaymentsResponse: - payment_hash = request.payment_hash - - if request.bolt11 != "": - payment_hash = bolt11_decode(request.bolt11).payment_hash - - with Session(self._db.engine) as s: - if payment_hash != "": - res = Payments.fetch(s, payment_hash) - elif request.HasField("pagination"): - res = Payments.fetch_paginated( - s, request.pagination.offset, request.pagination.limit - ) - else: - res = Payments.fetch_all(s) - return ListPaymentsResponse(payments=[payment_to_grpc(payment) for payment in res]) - - def ResetPathMemory( # noqa: N802 - self, - request: ResetPathMemoryRequest, - context: grpc.ServicerContext, # noqa: ARG002 - ) -> ResetPathMemoryResponse: - if not request.exclude_temporary_memory: - self._mpay.reset_excludes() - - if not request.exclude_permanent_memory: - res = self._routes.reset() - return ResetPathMemoryResponse( - payments=res.payments, - attempts=res.attempts, - hops=res.hops, - ) - - return ResetPathMemoryResponse( - payments=0, - attempts=0, - hops=0, - ) - - def PayStatus( # noqa: N802 - self, - request: PayStatusRequest, - context: grpc.ServicerContext, # noqa: ARG002 - ) -> PayStatusResponse: - return pay_status_response_to_grpc( - self._mpay.pl.rpc.paystatus(request.invoice if request.invoice != "" else None) - ) - - -class Server(GrpcServer): - _db: Database - _mpay: MPay - _routes: Routes - - def __init__( - self, - pl: Plugin, - db: Database, - mpay: MPay, - routes: Routes, - ) -> None: - super().__init__(PLUGIN_NAME, pl) - - self._db = db - self._mpay = mpay - self._routes = routes - - def _register_service(self) -> None: - add_MpayServicer_to_server( - MpayService(self._db, self._mpay, self._routes), - self._server, - ) diff --git a/tools/plugins/mpay/rpc/tests/test_server.py b/tools/plugins/mpay/rpc/tests/test_server.py deleted file mode 100644 index e8e4af12..00000000 --- a/tools/plugins/mpay/rpc/tests/test_server.py +++ /dev/null @@ -1,182 +0,0 @@ -import hashlib -from pathlib import Path - -import bolt11 -import grpc -import pytest - -# noinspection PyProtectedMember -from grpc._channel import _InactiveRpcError - -from plugins.mpay.config import OptionDefaults -from plugins.mpay.consts import VERSION -from plugins.mpay.pay.sendpay import STATUS_COMPLETE -from plugins.mpay.protos.mpay_pb2 import ( - GetInfoRequest, - GetInfoResponse, - GetRoutesRequest, - GetRoutesResponse, - ListPaymentsRequest, - ListPaymentsResponse, - PaginationParams, - PayRequest, - PayResponse, - ResetPathMemoryRequest, - ResetPathMemoryResponse, -) -from plugins.mpay.protos.mpay_pb2_grpc import MpayStub -from plugins.mpay.tests.utils import ( - PLUGIN_PATH_MPAY, - LndNode, - cln_con, - connect_peers, - lnd, - start_plugin, - stop_plugin, -) - - -class TestGrpc: - @pytest.fixture(scope="class", autouse=True) - def cl(self) -> MpayStub: - stop_plugin(cln_con, PLUGIN_PATH_MPAY) - start_plugin(cln_con, PLUGIN_PATH_MPAY) - - connect_peers(cln_con) - - cert_path = Path("../docker/regtest/data/cln/mpay") - creds = grpc.ssl_channel_credentials( - root_certificates=cert_path.joinpath("ca.pem").read_bytes(), - private_key=cert_path.joinpath("client-key.pem").read_bytes(), - certificate_chain=cert_path.joinpath("client.pem").read_bytes(), - ) - channel = grpc.secure_channel( - f"127.0.0.1:{OptionDefaults.GrpcPort}", - creds, - options=(("grpc.ssl_target_name_override", "mpay"),), - ) - client = MpayStub(channel) - client.ResetPathMemory(ResetPathMemoryRequest()) - - yield client - - channel.close() - - stop_plugin(cln_con, PLUGIN_PATH_MPAY) - - def test_get_info(self, cl: MpayStub) -> None: - res: GetInfoResponse = cl.GetInfo(GetInfoRequest()) - assert res.version == VERSION - - @pytest.mark.parametrize("node", [LndNode.One, LndNode.Two]) - def test_pay(self, cl: MpayStub, node: LndNode) -> None: - invoice = lnd(node, "addinvoice 1")["payment_request"] - self.invoice = invoice - - res: PayResponse = cl.Pay(PayRequest(bolt11=invoice)) - - dec = bolt11.decode(invoice) - - assert res.destination == dec.payee - assert res.payment_hash == dec.payment_hash - assert hashlib.sha256(bytes.fromhex(res.payment_preimage)).hexdigest() == dec.payment_hash - assert res.amount_msat == 1_000 - assert res.amount_sent_msat == 1_000 - assert res.parts == 1 - assert res.status == STATUS_COMPLETE - assert res.time < 10 - assert res.fee_msat == 0 - - def test_pay_twice(self, cl: MpayStub) -> None: - invoice = lnd(LndNode.One, "listinvoices")["invoices"][-1] - res: PayResponse = cl.Pay(PayRequest(bolt11=invoice["payment_request"])) - - assert res.time == 0 - assert res.payment_hash == invoice["r_hash"] - assert res.payment_preimage == invoice["r_preimage"] - - @pytest.mark.parametrize(("min_success", "min_success_ema"), [(2, 0), (0, 2)]) - def test_get_routes_min_success( - self, cl: MpayStub, min_success: int, min_success_ema: int - ) -> None: - res: GetRoutesResponse = cl.GetRoutes( - GetRoutesRequest( - min_success=min_success, - min_success_ema=min_success_ema, - ) - ) - assert len(res.routes) == 0 - - def test_list_payments(self, cl: MpayStub) -> None: - res: ListPaymentsResponse = cl.ListPayments(ListPaymentsRequest()) - assert len(res.payments) == 2 - - for i, payment in enumerate(res.payments): - assert payment.id >= 0 - assert ( - payment.destination - == lnd((LndNode.One if i == 0 else LndNode.Two), "getinfo")["identity_pubkey"] - ) - assert len(payment.payment_hash) == 64 - assert payment.amount == 1000 - assert payment.ok - assert len(payment.attempts) > 0 - - res: ListPaymentsResponse = cl.ListPayments( - ListPaymentsRequest( - pagination=PaginationParams(offset=0, limit=1), - ) - ) - assert len(res.payments) == 1 - assert res.payments[0].id == 1 - - res: ListPaymentsResponse = cl.ListPayments( - ListPaymentsRequest( - pagination=PaginationParams(offset=1, limit=1), - ) - ) - assert len(res.payments) == 1 - assert res.payments[0].id == 2 - - def test_list_payments_payment_hash(self, cl: MpayStub) -> None: - payment_hash = cln_con("listpays")["pays"][-1]["payment_hash"] - res: ListPaymentsResponse = cl.ListPayments(ListPaymentsRequest(payment_hash=payment_hash)) - - assert len(res.payments) == 1 - assert res.payments[0].payment_hash == payment_hash - - def test_list_payments_bolt11(self, cl: MpayStub) -> None: - pay = cln_con("listpays")["pays"][-1] - res: ListPaymentsResponse = cl.ListPayments(ListPaymentsRequest(bolt11=pay["bolt11"])) - - assert len(res.payments) == 1 - assert res.payments[0].payment_hash == pay["payment_hash"] - - def test_list_payments_bolt11_invalid(self, cl: MpayStub) -> None: - with pytest.raises(_InactiveRpcError): - cl.ListPayments(ListPaymentsRequest(bolt11="invalid bolt11")) - - def test_reset_path_memory_exclude_permanent_memory(self, cl: MpayStub) -> None: - res: ResetPathMemoryResponse = cl.ResetPathMemory( - ResetPathMemoryRequest(exclude_permanent_memory=True) - ) - - assert res.payments == 0 - assert res.attempts == 0 - assert res.hops == 0 - - pays: ListPaymentsResponse = cl.ListPayments(ListPaymentsRequest()) - assert len(pays.payments) > 0 - - def test_reset_path_memory(self, cl: MpayStub) -> None: - res: ResetPathMemoryResponse = cl.ResetPathMemory(ResetPathMemoryRequest()) - - assert res.payments > 0 - assert res.attempts > 0 - assert res.hops > 0 - - pays: ListPaymentsResponse = cl.ListPayments(ListPaymentsRequest()) - assert len(pays.payments) == 0 - - routes: GetRoutesResponse = cl.GetRoutes(GetRoutesRequest()) - assert len(routes.routes) == 0 diff --git a/tools/plugins/mpay/rpc/transformers.py b/tools/plugins/mpay/rpc/transformers.py deleted file mode 100644 index 00bad33c..00000000 --- a/tools/plugins/mpay/rpc/transformers.py +++ /dev/null @@ -1,114 +0,0 @@ -from typing import Any - -from plugins.mpay.data.route_stats import RouteStats -from plugins.mpay.db.models import Attempt, Hop, Payment -from plugins.mpay.protos.mpay_pb2 import GetRoutesResponse, ListPaymentsResponse, PayStatusResponse -from plugins.mpay.utils import parse_time - -PAY_STATUS_STATE_TO_GRPC = { - "pending": PayStatusResponse.PayStatus.Attempt.AttemptState.ATTEMPT_PENDING, - "completed": PayStatusResponse.PayStatus.Attempt.AttemptState.ATTEMPT_COMPLETED, -} - - -def routes_to_grpc(routes: list[RouteStats]) -> GetRoutesResponse.Routes: - return GetRoutesResponse.Routes(routes=[route_to_grpc(route) for route in routes]) - - -def route_to_grpc(route: RouteStats) -> GetRoutesResponse.Routes.Route: - return GetRoutesResponse.Routes.Route( - route=route.route, - success_rate=route.success_rate, - success_rate_ema=route.success_rate_ema, - ) - - -def payment_to_grpc(payment: Payment) -> ListPaymentsResponse.Payment: - return ListPaymentsResponse.Payment( - id=payment.id, - destination=payment.destination, - payment_hash=payment.payment_hash, - amount=payment.amount, - ok=payment.ok, - attempts=[attempt_to_grpc(attempt) for attempt in payment.attempts], - created_at=int(payment.created_at.timestamp()), - ) - - -def attempt_to_grpc(attempt: Attempt) -> ListPaymentsResponse.Payment.Attempt: - return ListPaymentsResponse.Payment.Attempt( - id=attempt.id, - ok=attempt.ok, - time=attempt.time, - hops=[hop_to_grpc(hop) for hop in attempt.hops], - created_at=int(attempt.created_at.timestamp()), - ) - - -def hop_to_grpc(hop: Hop) -> ListPaymentsResponse.Payment.Attempt.Hop: - return ListPaymentsResponse.Payment.Attempt.Hop( - id=hop.id, - node=hop.node, - channel=hop.channel, - direction=hop.direction, - ok=hop.ok, - ) - - -def pay_status_response_to_grpc(res: dict[str, Any]) -> PayStatusResponse: - return PayStatusResponse( - status=[ - PayStatusResponse.PayStatus( - bolt11=status.get("bolt11", None), - bolt12=status.get("bolt12", None), - amount_msat=int(status["amount_msat"]), - destination=status["destination"], - attempts=[_pay_status_attempt_to_grpc(attempt) for attempt in status["attempts"]], - ) - for status in res["pay"] - ] - ) - - -def _pay_status_attempt_to_grpc( - res: dict[str, Any], -) -> PayStatusResponse.PayStatus.Attempt: - def transform_failure_data( - failure_data: dict[str, Any], - ) -> PayStatusResponse.PayStatus.Attempt.Failure.Data: - return PayStatusResponse.PayStatus.Attempt.Failure.Data( - id=failure_data["id"], - raw_message=failure_data["raw_message"], - fail_code=failure_data["failcode"], - fail_codename=failure_data["failcodename"], - erring_index=failure_data["erring_index"], - erring_node=failure_data["erring_node"], - ) - - def transform_failure( - failure: dict[str, Any], - ) -> PayStatusResponse.PayStatus.Attempt.Failure: - return PayStatusResponse.PayStatus.Attempt.Failure( - message=failure["message"], - code=failure["code"], - data=transform_failure_data(failure["data"]) if "data" in failure else None, - ) - - attempt = PayStatusResponse.PayStatus.Attempt( - strategy=res.get("strategy", ""), - start_time=parse_time(res["start_time"]), - age_in_seconds=res["age_in_seconds"], - state=PAY_STATUS_STATE_TO_GRPC[res["state"]], - success=PayStatusResponse.PayStatus.Attempt.Success( - id=res["success"]["id"], - payment_preimage=res["success"]["payment_preimage"], - ) - if "success" in res - else None, - failure=transform_failure(res["failure"]) if "failure" in res else None, - ) - - if "end_time" in res: - attempt.end_time = parse_time(res["end_time"]) - - return attempt diff --git a/tools/plugins/mpay/tests/test_routing_hints.py b/tools/plugins/mpay/tests/test_routing_hints.py deleted file mode 100644 index 3431db12..00000000 --- a/tools/plugins/mpay/tests/test_routing_hints.py +++ /dev/null @@ -1,62 +0,0 @@ -from typing import Any - -import pytest -from pyln.client import Millisatoshi - -from plugins.mpay.pay.route import Fees, RoutingHint -from plugins.mpay.routing_hints import OnlySingleRoutingHintsError, parse_routing_hints - - -class TestRoutingHints: - def test_parse_routing_hints_no_routes(self) -> None: - payee = "destination" - assert parse_routing_hints({"payee": payee}) == (False, payee, None) - - @pytest.mark.parametrize( - "dec", - [ - {"payee": "test", "routes": []}, - {"payee": "test", "routes": [[]]}, - {"payee": "test", "routes": [[{}], []]}, - ], - ) - def test_parse_routing_hints_only_single_error(self, dec: dict[str, Any]) -> None: - with pytest.raises(OnlySingleRoutingHintsError): - parse_routing_hints(dec) - - def test_parse_routing_hints(self) -> None: - dec = { - "payee": "test", - "amount_msat": Millisatoshi(1233214), - "routes": [ - [ - { - "pubkey": "hint pubkey", - "short_channel_id": "id", - "fee_base_msat": 123, - "fee_proportional_millionths": 10, - "cltv_expiry_delta": 10, - } - ] - ], - } - - assert parse_routing_hints(dec) == ( - True, - dec["routes"][0][0]["pubkey"], - RoutingHint( - hop_hint={ - "id": dec["payee"], - "channel": dec["routes"][0][0]["short_channel_id"], - "direction": 1, - "amount_msat": dec["amount_msat"], - "delay": 0, - "style": "tlv", - }, - fees=Fees( - base_msat=dec["routes"][0][0]["fee_base_msat"], - proportional_millionths=dec["routes"][0][0]["fee_proportional_millionths"], - ), - cltv_expiry_delta=dec["routes"][0][0]["cltv_expiry_delta"], - ), - ) diff --git a/tools/plugins/mpay/tests/test_utils.py b/tools/plugins/mpay/tests/test_utils.py deleted file mode 100644 index b4dce03a..00000000 --- a/tools/plugins/mpay/tests/test_utils.py +++ /dev/null @@ -1,18 +0,0 @@ -from pyln.client import Millisatoshi - -from plugins.mpay.utils import fee_with_percent, format_error - - -class NoStrException(BaseException): - pass - - -class TestUtils: - def test_format_error(self) -> None: - msg = "test" - assert format_error(ValueError(msg)) == msg - assert format_error(NoStrException()) == repr(NoStrException()) - - def test_fee_with_percent(self) -> None: - assert fee_with_percent(Millisatoshi(100), Millisatoshi(1)) == "1msat (1.0%)" - assert fee_with_percent(Millisatoshi(3), Millisatoshi(1)) == "1msat (33.3333%)" diff --git a/tools/plugins/mpay/tests/utils.py b/tools/plugins/mpay/tests/utils.py deleted file mode 100644 index 73909ebf..00000000 --- a/tools/plugins/mpay/tests/utils.py +++ /dev/null @@ -1,103 +0,0 @@ -import json -import os -from enum import Enum -from typing import Any, Callable - -PLUGIN_PATH_MPAY = "/root/mpay.sh" - -CliCaller = Callable[..., dict[str, Any]] - - -class LndNode(Enum): - One = 1 - Two = 2 - - -class RpcCaller: - @staticmethod - def getinfo() -> dict: - return cln_con("getinfo") - - @staticmethod - def listpeerchannels(peer_id: str | None = None) -> dict: - return cln_con(f"listpeerchannels {peer_id if peer_id is not None else ''}") - - @staticmethod - def listchannels(**kwargs: dict[str, str]) -> dict: - args = "listchannels -k" - for key, val in kwargs.items(): - args += f" {key}={val}" - - return cln_con(args) - - @staticmethod - def listnodes(pubkey: str | None = None) -> dict: - args = "listnodes" - - if pubkey is not None: - args += f" {pubkey}" - - return cln_con(args) - - @staticmethod - def getroute(**kwargs: dict[str, Any]) -> dict: - args = "getroute -k" - for key, val in kwargs.items(): - if key == "exclude": - args += f" {key}={str(val).replace(' ', '')}" - else: - args += f" {key if key != 'node_id' else 'id'}={val}" - - return cln_con(args) - - -class RpcPlugin: - rpc = RpcCaller() - - -def start_plugin(cln: CliCaller, path: str) -> None: - cln("plugin", "start", path) - - -def stop_plugin(cln: CliCaller, path: str) -> None: - plugins = cln("plugin", "list")["plugins"] - if not any(path in plugin["name"] for plugin in plugins): - return - - cln("plugin", "stop", path) - - -def cln_con(*args: str) -> dict[str, Any]: - return json.load( - os.popen( - f"docker exec regtest lightning-cli {' '.join(args)}", - ) - ) - - -def lnd_raw(node: LndNode, *args: str) -> str: - node_cmd = "docker exec regtest lncli --network regtest --lnddir /root/.lnd-btc" - - if node == LndNode.Two: - node_cmd += " --rpcserver localhost:10011" - - return os.popen( - f"{node_cmd} {' '.join(args)}", - ).read() - - -def lnd(node: LndNode, *args: str) -> dict[str, Any]: - return json.loads(lnd_raw(node, *args)) - - -def connect_peers(cln: CliCaller) -> None: - cln_id = cln("getinfo")["id"] - - def lnd_connect(node: LndNode) -> None: - if len(lnd(node, "listpeers")["peers"]) == 2: - return - - lnd(node, "connect", f"{cln_id}@127.0.0.1:9737") - - for i in LndNode: - lnd_connect(i) diff --git a/tools/plugins/mpay/utils.py b/tools/plugins/mpay/utils.py deleted file mode 100644 index cff19356..00000000 --- a/tools/plugins/mpay/utils.py +++ /dev/null @@ -1,22 +0,0 @@ -from datetime import datetime, timezone - -from pyln.client import Millisatoshi - - -def time_now() -> datetime: - return datetime.now(tz=timezone.utc) - - -def parse_time(time: str) -> int: - try: - return int(datetime.strptime(time, "%Y-%m-%dT%H:%M:%S.%f%z").timestamp()) - except ValueError: - return 0 - - -def format_error(e: BaseException) -> str: - return str(e) if str(e) != "" else repr(e) - - -def fee_with_percent(amount: Millisatoshi, fee: Millisatoshi) -> str: - return f"{fee} ({round(int(fee) / int(amount) * 100, 4)}%)" diff --git a/tools/poetry.lock b/tools/poetry.lock deleted file mode 100644 index ea7ce9c0..00000000 --- a/tools/poetry.lock +++ /dev/null @@ -1,1553 +0,0 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. - -[[package]] -name = "asn1crypto" -version = "1.5.1" -description = "Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP" -optional = false -python-versions = "*" -files = [ - {file = "asn1crypto-1.5.1-py2.py3-none-any.whl", hash = "sha256:db4e40728b728508912cbb3d44f19ce188f218e9eba635821bb4b68564f8fd67"}, - {file = "asn1crypto-1.5.1.tar.gz", hash = "sha256:13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c"}, -] - -[[package]] -name = "base58" -version = "2.1.1" -description = "Base58 and Base58Check implementation." -optional = false -python-versions = ">=3.5" -files = [ - {file = "base58-2.1.1-py3-none-any.whl", hash = "sha256:11a36f4d3ce51dfc1043f3218591ac4eb1ceb172919cebe05b52a5bcc8d245c2"}, - {file = "base58-2.1.1.tar.gz", hash = "sha256:c5d0cb3f5b6e81e8e35da5754388ddcc6d0d14b6c6a132cb93d69ed580a7278c"}, -] - -[package.extras] -tests = ["PyHamcrest (>=2.0.2)", "mypy", "pytest (>=4.6)", "pytest-benchmark", "pytest-cov", "pytest-flake8"] - -[[package]] -name = "bech32" -version = "1.2.0" -description = "Reference implementation for Bech32 and segwit addresses." -optional = false -python-versions = ">=3.5" -files = [ - {file = "bech32-1.2.0-py3-none-any.whl", hash = "sha256:990dc8e5a5e4feabbdf55207b5315fdd9b73db40be294a19b3752cde9e79d981"}, - {file = "bech32-1.2.0.tar.gz", hash = "sha256:7d6db8214603bd7871fcfa6c0826ef68b85b0abd90fa21c285a9c5e21d2bd899"}, -] - -[[package]] -name = "bitarray" -version = "2.9.3" -description = "efficient arrays of booleans -- C extension" -optional = false -python-versions = "*" -files = [ - {file = "bitarray-2.9.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2cf5f5400636c7dda797fd681795ce63932458620fe8c40955890380acba9f62"}, - {file = "bitarray-2.9.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3487b4718ffa5942fab777835ee36085f8dda7ec4bd0b28433efb117f84852b6"}, - {file = "bitarray-2.9.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:10f44b1e4994035408bea54d7bf0aec79744cad709706bedf28091a48bb7f1a4"}, - {file = "bitarray-2.9.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb5c16f97c65add6535748a9c98c70e7ca79759c38a2eb990127fef72f76111a"}, - {file = "bitarray-2.9.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:13dbfc42971ba84e9c4ba070f720df6570285a3f89187f07ef422efcb611c19f"}, - {file = "bitarray-2.9.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c28076acfbe7f9a5494d7ae98094a6e209c390c340938845f294818ebf5e4d3"}, - {file = "bitarray-2.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b7cdd21835936d9a66477836ca23b2cb63295142cb9d9158883e2c0f1f8f6bd"}, - {file = "bitarray-2.9.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9f60887ab3a46e507fa6f8544d8d4b0748da48718591dfe3fe80c62bdea60f10"}, - {file = "bitarray-2.9.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f75e1abd4a37cba3002521d3f5e2b50ef4f4a74342207cad3f52468411d5d8ba"}, - {file = "bitarray-2.9.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dc63da9695383c048b83f5ab77eab35a55bbb2e77c7b6e762eba219929b45b84"}, - {file = "bitarray-2.9.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6fe5a57b859d9bc9c2fd27c78c4b7b83158faf984202de6fb44618caeebfff10"}, - {file = "bitarray-2.9.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1fe5a37bd9441a5ecc2f6e71b43df7176fa376a542ef97484310b8b46a45649a"}, - {file = "bitarray-2.9.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8a16e42c169ca818d6a15b5dd5acd5d2a26af0fa0588e1036e0e58d01f8387d4"}, - {file = "bitarray-2.9.3-cp310-cp310-win32.whl", hash = "sha256:5e6b5e7940af3474ffaa930cd1ce8215181cbe864d6b5ddb67a15d3c15e935cd"}, - {file = "bitarray-2.9.3-cp310-cp310-win_amd64.whl", hash = "sha256:c63dbb99ef2ab1281871678624f9c9a5f1682b826e668ce559275ec488b3fa8b"}, - {file = "bitarray-2.9.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:49fb93b488d180f5c84b79fe687c585a84bf0295ff035d63e09ee24ce1da0558"}, - {file = "bitarray-2.9.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c2944fb83bbc2aa7f29a713bc4f8c1318e54fa0d06a72bedd350a3fb4a4b91d8"}, - {file = "bitarray-2.9.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3612d9d3788dc62f1922c917b1539f1cdf02cecc9faef8ae213a8b36093136ca"}, - {file = "bitarray-2.9.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90a9300cdb7c99b1e692bb790cba8acecee1a345a83e58e28c94a0d87c522237"}, - {file = "bitarray-2.9.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1211ed66acbbb221fd7554abf4206a384d79e6192d5cb95325c5c361bbb52a74"}, - {file = "bitarray-2.9.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67757279386accf93eba76b8f97b5acf1664a3e350cbea5f300f53490f8764fd"}, - {file = "bitarray-2.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64e19c6a99c32f460c2613f797f77aa37d8e298891d00ea5355158cce80e11ec"}, - {file = "bitarray-2.9.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:72734bd3775f43c5a75385730abb9f84fee6c627eb14f579de4be478f1615c8c"}, - {file = "bitarray-2.9.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a92703471b5d3316c7481bc1852f620f42f7a1b62be27f39d13694827635786f"}, - {file = "bitarray-2.9.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:d5d77c81300ca430d4b195ccfbb629d6858258f541b6e96c6b11ec1563cd2681"}, - {file = "bitarray-2.9.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3ba8a29c0d091c952ced1607ce715f5e0524899f24333a493807d00f5938463d"}, - {file = "bitarray-2.9.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:418171d035b191dbe5e86cd2bfb5c3e1ae7d947edc22857a897d1c7251674ae5"}, - {file = "bitarray-2.9.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1e0bd272eba256183be2a17488f9cb096d2e6d3435ecf2e28c1e0857c6d20749"}, - {file = "bitarray-2.9.3-cp311-cp311-win32.whl", hash = "sha256:cc3fd2b0637a619cf13e122bbcf4729ae214d5f25623675597e67c25f9edfe61"}, - {file = "bitarray-2.9.3-cp311-cp311-win_amd64.whl", hash = "sha256:e1fc2a81a585dbe5e367682156e6350d908a56e2ffd6ca651b0af01994db596f"}, - {file = "bitarray-2.9.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:dc47be026f76f1728af00dc7140cec8483fe2f0c476bbf2a59ef47865e00ff96"}, - {file = "bitarray-2.9.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:82b091742ff511cdb06f90af0d2c22e7af3dbff9b8212e2e0d88dfef6a8570b3"}, - {file = "bitarray-2.9.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d5edb4302a0e3a3d1d0eeb891de3c615d4cb7a446fb41c21eecdcfb29400a6f"}, - {file = "bitarray-2.9.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb4786c5525069c19820549dd2f42d33632bc42959ad167138bd8ee5024b922b"}, - {file = "bitarray-2.9.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bfe2de2b4df61ccb9244871a0fdf1fff83be0c1bd7187048c3cf7f81c5fe631"}, - {file = "bitarray-2.9.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:31e4f69538f95d2934587d957eea0d283162322dd1af29e57122b20b8cd60f92"}, - {file = "bitarray-2.9.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ca44908b2bc08d8995770018638d62626706864f9c599b7818225a12f3dbc2c"}, - {file = "bitarray-2.9.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:279f8de5d251ee521e365df29c927d9b5732f1ed4f373d2dbbd278fcbad94ff5"}, - {file = "bitarray-2.9.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c49bb631b38431c09ecd534d56ef04264397d24d18c4ee6653c84e14ae09d92d"}, - {file = "bitarray-2.9.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:192bffc93ee9a5b6c833c98d1dcc81f5633ddd726b85e18341387d0c1d51f691"}, - {file = "bitarray-2.9.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c516cec28c6511df51d87033f40ec420324a2247469b0c989d344f4d27ea37d2"}, - {file = "bitarray-2.9.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:66241cb9a1c1db294f46cd440141e57e8242874e38f3f61877f72d92ae14768a"}, - {file = "bitarray-2.9.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ab1f0e7631110c89bea7b605c0c35832333eb9cc97e5de05d71c76d42a1858c9"}, - {file = "bitarray-2.9.3-cp312-cp312-win32.whl", hash = "sha256:42aa5bee6fe8ad3385eaf5c6585016bbc38a7b75efb52ce5c6f8e00e05237dfa"}, - {file = "bitarray-2.9.3-cp312-cp312-win_amd64.whl", hash = "sha256:dc3fd647d845b94fac3652390866f921f914a17f3807a031c826f68dae3f43e3"}, - {file = "bitarray-2.9.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:fcfcc1989e3e021a282624017b7fb754210f5332e933b1c3ebc79643727b6551"}, - {file = "bitarray-2.9.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:71b1e229a706798a9e106ca7b03d4c63455deb40b18c92950ec073a05a8f8285"}, - {file = "bitarray-2.9.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4bb49556d3d505d24c942a4206ad4d0d40e89fa3016a7ea6edc994d5c08d4a8e"}, - {file = "bitarray-2.9.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4466aa1e533a59d5f7fd37219d154ec3f2ba73fce3d8a2e11080ec475bc15fb"}, - {file = "bitarray-2.9.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a9b75adc0fd0bf278bea89dc3d679d74e10d2df98d3d074b7f3d36f323138818"}, - {file = "bitarray-2.9.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:701582bbbeac372b1cd8a3c9daf6c2336dc2d22e14373a6271d788bc4f2b6edc"}, - {file = "bitarray-2.9.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ea1f119668bbdbd68008031491515e84441e505163918819994b28f295f762c"}, - {file = "bitarray-2.9.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9f400bc18a70bfdb073532c3054ecd78a0e64f96ff7b6140adde5b122580ec2b"}, - {file = "bitarray-2.9.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:aacff5656fb3e15cede7d02903da2634d376aa928d7a81ec8df19b0724d7972a"}, - {file = "bitarray-2.9.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:8a2ae42a14cbf766d4478d7101da6359b0648dd813e60eb3486ac56ad2f5add3"}, - {file = "bitarray-2.9.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:616698edb547d10f0b960cb9f2e8629c55a420dd4c2b1ab46706f49a1815621d"}, - {file = "bitarray-2.9.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:f277c50ba184929dfeed39b6cf9468e3446093521b0aeb52bd54a21ca08f5473"}, - {file = "bitarray-2.9.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:661237739b385c90d8837d5e96b06de093cc6e610236977e198f88f5a979686e"}, - {file = "bitarray-2.9.3-cp313-cp313-win32.whl", hash = "sha256:68acec6c19d798051f178a1197b76f891985f683f95a4b12811b68e58b080f5a"}, - {file = "bitarray-2.9.3-cp313-cp313-win_amd64.whl", hash = "sha256:3055720afdcfd7e8f630fa16db7bed7e55c9d0a1f4756195e3b250e203f3b436"}, - {file = "bitarray-2.9.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:72bf17d0e7d8a4f645655a07999d23e42472cbf2100b8dad7ce26586075241d7"}, - {file = "bitarray-2.9.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cfd332b5f1ad8c4dc3cc79ecef33c19b42d8d8e6a39fd5c9ecb5855be0b9723"}, - {file = "bitarray-2.9.3-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d5b466ef1e48f25621c9d27e95deb5e33b8656827ed8aa530b972de73870bd1f"}, - {file = "bitarray-2.9.3-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:938cf26fdaf4d0adfac82d830c025523c5d36ddead0470b735286028231c1784"}, - {file = "bitarray-2.9.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0f766669e768ef9a2b23ecfa710b38b6a48da3f91755113c79320b207ae255d"}, - {file = "bitarray-2.9.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b6337c0c64044f35ddfb241143244aac707a68f34ae31a71dad115f773ccc8b"}, - {file = "bitarray-2.9.3-cp36-cp36m-musllinux_1_2_aarch64.whl", hash = "sha256:731b59540167f8b2b20f69f487ecee2339fc4657059906a16cb51acac17f89c3"}, - {file = "bitarray-2.9.3-cp36-cp36m-musllinux_1_2_i686.whl", hash = "sha256:4feed0539a9d6432361fc4d3820eea3a81fa631d542f166cf8430aad81a971da"}, - {file = "bitarray-2.9.3-cp36-cp36m-musllinux_1_2_ppc64le.whl", hash = "sha256:eb65c96a42e73f35175ec738d67992ffdf054c20abee3933cfcfa2343fa1187d"}, - {file = "bitarray-2.9.3-cp36-cp36m-musllinux_1_2_s390x.whl", hash = "sha256:4f40ceac94d182de6135759d81289683ff3e4cf0da709bc5826a7fe00d754114"}, - {file = "bitarray-2.9.3-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:5b29f7844080a281635a231a37e99f0bd6f567af6cf19f4f6d212137f99a9cdf"}, - {file = "bitarray-2.9.3-cp36-cp36m-win32.whl", hash = "sha256:947cf522a3b339b73114d12417fd848fa01303dbaa7883ced4c87688dba5637c"}, - {file = "bitarray-2.9.3-cp36-cp36m-win_amd64.whl", hash = "sha256:ea794ea60d514d68777a87a74106110db7a4bbc2c46720e67010e3071afefb95"}, - {file = "bitarray-2.9.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c7bc7cb79dcac8bdce23b305e671c06eaeffb012fa065b8c33bc51df7e1733f0"}, - {file = "bitarray-2.9.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d6380ad0f929ad9220abadd1c9b7234271c4b6ea9c753a88611d489e93a8f2e"}, - {file = "bitarray-2.9.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05f4e2451e2ad450b41ede8440e52c1fd798e81027e1dc2256292ec0787d3bf1"}, - {file = "bitarray-2.9.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7267885c98138f3707c710d5b08eedef150a3e5112c760cfe1200f3366fd7064"}, - {file = "bitarray-2.9.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:976957423cb41df8fe0eb811dbb53d8c5ab1ca3beec7a3ca7ff679be44a72714"}, - {file = "bitarray-2.9.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0ec5141a69f73ed6ff17ea7344d5cc166e087095bfe3661dbb42b519e76aa16"}, - {file = "bitarray-2.9.3-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:218a1b7c0652a3c1020f903ded0f9768c3719fb6d43a6e9d346e985292992d35"}, - {file = "bitarray-2.9.3-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:cf0c9ebf2df280794244e1e12ed626357506ddaa2f0d6f69efe493ae7bbf4bf7"}, - {file = "bitarray-2.9.3-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:c450a04a7e091b57d4c0bd1531648522cd0ef26913ad0e5dea0432ea29b0e5c1"}, - {file = "bitarray-2.9.3-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:a212eb89a50e32ef4969387e44a7410447dc59587615e3966d090edc338a1b85"}, - {file = "bitarray-2.9.3-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:4269232026212ee6b73379b88a578107a6b36a6182307a49d5509686c7495261"}, - {file = "bitarray-2.9.3-cp37-cp37m-win32.whl", hash = "sha256:8a0fb358e6a43f216c3fb0871e2ac14c16563aec363c23bc2fbbb18f6201285d"}, - {file = "bitarray-2.9.3-cp37-cp37m-win_amd64.whl", hash = "sha256:a8368774cdc737eec8fce6f28d0abc095fbc0edccf8fab8d29fddc264b68def9"}, - {file = "bitarray-2.9.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7d0724a4fef6ded914075a3385ea2d05afdeed567902f83490ed4e7e7e75d9bf"}, - {file = "bitarray-2.9.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0e11b37c6dff6f41ebc49914628824ceb8c8d6ebd0fda2ebe3c0fe0c63e8621e"}, - {file = "bitarray-2.9.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:085f4081d72c7468f82f722a9f113e03a1f7a4c132ef4c2a4e680c5d78b7db00"}, - {file = "bitarray-2.9.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b530b5fbed2900634fbc43f546e384abd72ad9c49795ff5bd6a93cac1aa9c4d8"}, - {file = "bitarray-2.9.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09ff88e4385967571146fb0d270442de39393d44198f4d108f3350cfd6486f0b"}, - {file = "bitarray-2.9.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a344bb212ddf87db4976a6711d274660a5d887da4fd3faafcdaa092152f85a6d"}, - {file = "bitarray-2.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc569c96b990f92fd5946d5b50501fee48b01a116a286d1de7961ebd9c6f06f3"}, - {file = "bitarray-2.9.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2fbbe7938ef8a7abe3e8519fa0578b51d2787f7171d3144e7d373551b5851fd"}, - {file = "bitarray-2.9.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:0b5912fab904507b47217509b01aa903d7f98b6e725e490a7f01661f4d9a4fa7"}, - {file = "bitarray-2.9.3-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:0c836ccfca9cf60927256738ef234dfe500565492eff269610cdd1bca56801d0"}, - {file = "bitarray-2.9.3-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:af0e4441ebf51c18fc450962f1e201c96f444d63b17cc8dcf7c0b05111bd4486"}, - {file = "bitarray-2.9.3-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:9e9b57175fb6fe76d7ddd0647e06a25f6e23f4b54b5febf337c5a840ab37dc3b"}, - {file = "bitarray-2.9.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:7f7de81721ae9492926bd067007ac974692182bb83fc8f0ba330a67f37a018bd"}, - {file = "bitarray-2.9.3-cp38-cp38-win32.whl", hash = "sha256:4beafb6b6e344385480df6611fdebfcb3579bbb40636ce1ddf5e72fb744e095f"}, - {file = "bitarray-2.9.3-cp38-cp38-win_amd64.whl", hash = "sha256:d8eaeca98900bd6f06a29cdef57999813a67d314f661d14901d71e04f4cf9f00"}, - {file = "bitarray-2.9.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:413965d9d384aef90e58b959f4a39f1d5060b145c26080297b7b4cf23cf38faa"}, - {file = "bitarray-2.9.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2fbb56f2bb89c3a15304a6c0ea56013dc340a98337d9bbd7fc5c21451dc05f8c"}, - {file = "bitarray-2.9.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b8a84f39f7885627711473872d8fc58fc7a0a1e4ecd9ddf42daf9a3643432742"}, - {file = "bitarray-2.9.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45147a9c8580e857c1344d15bd49d2b4387777bd582a2ede11be2ba740653f28"}, - {file = "bitarray-2.9.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed255423dc60c6b2d5c0d90c13dea2962a31929767fdf1c525ab3210269e75c5"}, - {file = "bitarray-2.9.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4f5bd02671ea5c4ad52bbfe0e8e8197b6e8fa85dec1e93a4a05448c19354cc65"}, - {file = "bitarray-2.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1c99c58f044549c93fb6d4cda22678deccaed19845eaa2e6917b5b7ca058f2d"}, - {file = "bitarray-2.9.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:921ee87681e32e17d1849e11c96eb6a8a7edaa1269dd26831013daf8546bde05"}, - {file = "bitarray-2.9.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2ed97d8ec40c4658d9f9aa8f26cb473f44fa1dbccba3fa3fbe4a102e38c6a8d7"}, - {file = "bitarray-2.9.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9d7f7db37edb9c50c9aad6a18f2e87dd7dc5ff2a33406821804a03263fedb2ca"}, - {file = "bitarray-2.9.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:292f726cdb9efc744ed0a1d7453c44151526648148a28d9a2495cc7c7b2c62a8"}, - {file = "bitarray-2.9.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2cc94784238782a9376f307b1aa9a85ce77b6eded9f82d2fe062db7fdb02c645"}, - {file = "bitarray-2.9.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5051436b1d318f6ce0df3b2f8a60bfa66a54c1d9e8719d6cb6b448140e7061f2"}, - {file = "bitarray-2.9.3-cp39-cp39-win32.whl", hash = "sha256:a3d436c686ce59fd0b93438ed2c0e1d3e1716e56bce64b874d05b9f49f1ca5d1"}, - {file = "bitarray-2.9.3-cp39-cp39-win_amd64.whl", hash = "sha256:f168fc45664266a560f2cb28a327041b7f69d4a7faad8ab89e0a1dd7c270a70d"}, - {file = "bitarray-2.9.3-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ae36787299cff41f212aee33cfe1defee13979a41552665a412b6ca3fa8f7eb8"}, - {file = "bitarray-2.9.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42afe48abb8eeb386d93e7f1165ace1dd027f136a8a31edd2b20bc57a0c071d7"}, - {file = "bitarray-2.9.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:451ceecdb86bb95ae101b0d65c8c4524d692ae3666662fef8c89877ce17748c5"}, - {file = "bitarray-2.9.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4d67d3e3de2aede737b12cd75a84963700c941b77b579c14bd05517e05d7a9f"}, - {file = "bitarray-2.9.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2406d13ded84049b4238815a5821e44d6f58ba00fbb6b705b6ef8ccd88be8f03"}, - {file = "bitarray-2.9.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0db944fc2a048020fc940841ef46c0295b045d45a5a582cba69f78962a49a384"}, - {file = "bitarray-2.9.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25c603f141171a7d108773d5136d14e572c473e4cdb3fb464c39c8a138522eb2"}, - {file = "bitarray-2.9.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86c06b02705305cab0914d209caa24effda81316e2f2555a71a9aa399b75c5a5"}, - {file = "bitarray-2.9.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ddda45b24a802eaaca8f794e6267ff2b62de5fe7b900b76d6f662d95192bebf"}, - {file = "bitarray-2.9.3-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:81490623950d04870c6dd4d7e6df2eb68dd04eca8bec327895ebee8bbe0cc3c7"}, - {file = "bitarray-2.9.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a9e69ac6a514cc574891c24a50847022dac2fef8c3f4df530f92820a07337755"}, - {file = "bitarray-2.9.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:545c695ee69d26b41351ced4c76244d8b6225669fc0af3652ff8ed5a6b28325d"}, - {file = "bitarray-2.9.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fbb2e6daabd2a64d091ac7460b0c5c5f9268199ae9a8ce32737cf5273987f1fa"}, - {file = "bitarray-2.9.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a969e5cf63144b944ee8d0a0739f53ef1ae54725b5e01258d690a8995d880526"}, - {file = "bitarray-2.9.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:73bbb9301ac9000f869c51db2cc5fcc6541985d3fcdcfe6e02f90c9e672a00be"}, - {file = "bitarray-2.9.3-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7c07e346926488a85a48542d898f4168f3587ec42379fef0d18be301e08a3f27"}, - {file = "bitarray-2.9.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a26d8a14cd8ee496306f2afac34833502dd1ae826355af309333b6f252b23fe"}, - {file = "bitarray-2.9.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cef148ed37c892395ca182d6a235524165a9f765f4283d0a1ced891e7c43c67a"}, - {file = "bitarray-2.9.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94f35a8f0c8a50ee98a8bef9a070d0b68ecf623f20a2148cc039aba5557346a6"}, - {file = "bitarray-2.9.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b03207460daae828e2743874c84264e8d96a8c6156490279092b624cd5d2de08"}, - {file = "bitarray-2.9.3.tar.gz", hash = "sha256:9eff55cf189b0c37ba97156a00d640eb7392db58a8049be6f26ff2712b93fa89"}, -] - -[[package]] -name = "bitstring" -version = "4.2.3" -description = "Simple construction, analysis and modification of binary data." -optional = false -python-versions = ">=3.8" -files = [ - {file = "bitstring-4.2.3-py3-none-any.whl", hash = "sha256:20ed0036e2fcf0323acb0f92f0b7b178516a080f3e91061470aa019ac4ede404"}, - {file = "bitstring-4.2.3.tar.gz", hash = "sha256:e0c447af3fda0d114f77b88c2d199f02f97ee7e957e6d719f40f41cf15fbb897"}, -] - -[package.dependencies] -bitarray = ">=2.9.0,<3.0.0" - -[[package]] -name = "bolt11" -version = "2.1.0" -description = "A library for encoding and decoding BOLT11 payment requests." -optional = false -python-versions = ">=3.8.1" -files = [ - {file = "bolt11-2.1.0-py3-none-any.whl", hash = "sha256:1535e441233414a9d8031a99fd3be07de4674bffda948033579404d44a42f614"}, - {file = "bolt11-2.1.0.tar.gz", hash = "sha256:177c63cd88d1eaba669eddb5937364676226253f2e9e5b77e8fe317ef32e62dd"}, -] - -[package.dependencies] -base58 = "*" -bech32 = "*" -bitstring = "*" -click = "*" -coincurve = "*" - -[[package]] -name = "cachetools" -version = "5.5.0" -description = "Extensible memoizing collections and decorators" -optional = false -python-versions = ">=3.7" -files = [ - {file = "cachetools-5.5.0-py3-none-any.whl", hash = "sha256:02134e8439cdc2ffb62023ce1debca2944c3f289d66bb17ead3ab3dede74b292"}, - {file = "cachetools-5.5.0.tar.gz", hash = "sha256:2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a"}, -] - -[[package]] -name = "certifi" -version = "2024.12.14" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, - {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, -] - -[[package]] -name = "cffi" -version = "1.17.1" -description = "Foreign Function Interface for Python calling C code." -optional = false -python-versions = ">=3.8" -files = [ - {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, - {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, - {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, - {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, - {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, - {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, - {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, - {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, - {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, - {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, - {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, - {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, - {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, - {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, - {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, - {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, - {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, - {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, - {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, - {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, - {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, - {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, - {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, - {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, - {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, - {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, - {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, - {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, -] - -[package.dependencies] -pycparser = "*" - -[[package]] -name = "charset-normalizer" -version = "3.4.0" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, -] - -[[package]] -name = "click" -version = "8.1.8" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, - {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "coincurve" -version = "18.0.0" -description = "Cross-platform Python CFFI bindings for libsecp256k1" -optional = false -python-versions = ">=3.7" -files = [ - {file = "coincurve-18.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0b1a42eba91b9e4f833309e94bc6a270b1700cb4567d4809ef91f00968b57925"}, - {file = "coincurve-18.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:116bf1b60a6e72e23c6b153d7c79f0e565d82973d917a3cecf655ffb29263163"}, - {file = "coincurve-18.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d53e2a268142924c24e9b786b3e6c3603fae54bb8211560036b0e9ce6a9f2dbc"}, - {file = "coincurve-18.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b31ab366fadff16ecfdde96ffc07e70fee83850f88bd1f985a8b4977a68bbfb"}, - {file = "coincurve-18.0.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e3c37cfadac6896668a130ea46296a3dfdeea0160fd66a51e377ad00795269"}, - {file = "coincurve-18.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f3e5f2a2d774050b3ea8bf2167f2d598fde58d7690779931516714d98b65d884"}, - {file = "coincurve-18.0.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:83379dd70291480df2052554851bfd17444c003aef7c4bb02d96d73eec69fe28"}, - {file = "coincurve-18.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:33678f6b43edbeab6605584c725305f4f814239780c53eba0f8e4bc4a52b1d1a"}, - {file = "coincurve-18.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f40646d5f29ac9026f8cc1b368bc9ab68710fad055b64fbec020f9bbfc99b242"}, - {file = "coincurve-18.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:779da694dea1b1d09e16b00e079f6a1195290ce9568f39c95cddf35f1f49ec49"}, - {file = "coincurve-18.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7844f01904e32317a00696a27fd771860e53a2fa62e5c66eace9337d2742c9e6"}, - {file = "coincurve-18.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257c6171cd0301c119ef41360f0d0c2fb5cc288717b33d3bd5482a4c9ae04551"}, - {file = "coincurve-18.0.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f8bcb9c40fd730cf377fa448f1304355d6497fb3d00b7b0a69a10dfcc14a6d28"}, - {file = "coincurve-18.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e3abb7f65e2b5fb66a15e374faeaafe6700fdb83fb66d1873ddff91c395a3b74"}, - {file = "coincurve-18.0.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f44b9ba588b34795d1b4074f9a9fa372adef3fde58300bf32f40a69e8cd72a23"}, - {file = "coincurve-18.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:908467330cd3047c71105a08394c4f3e7dce76e4371b030ba8b0ef863013e3ca"}, - {file = "coincurve-18.0.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:599b1b3cf097cae920d97f31a5b8e8aff185ca8fa5d8a785b2edf7b199fb9731"}, - {file = "coincurve-18.0.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d2c20d108580bce5efedb980688031462168f4de2446de95898b48a249127a2"}, - {file = "coincurve-18.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eba563f7f70c10323227d1890072172bd84df6f814c9a6b012033b214426b6cf"}, - {file = "coincurve-18.0.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:412a06b7d1b8229f25318f05e76310298da5ad55d73851eabac7ddfdcdc5bff4"}, - {file = "coincurve-18.0.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:286969b6f789bbd9d744d28350a3630c1cb3ee045263469a28892f70a4a6654a"}, - {file = "coincurve-18.0.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:14700463009c7d799a746929728223aa53ff1ece394ea408516d98d637434883"}, - {file = "coincurve-18.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7f1142252e870f091b2c2c21cc1fadfdd29af23d02e99f29add0f14d1ba94b4c"}, - {file = "coincurve-18.0.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cd11d2ca5b7e989c5ce1af217a2ad78c19c21afca786f198d1b1a408d6f408dc"}, - {file = "coincurve-18.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1bce17d7475cee9db2c2fa7af07eaab582732b378acf6dcaee417de1df2d8661"}, - {file = "coincurve-18.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ab662b67454fea7f0a5ae855ba6ad9410bcaebe68b97f4dade7b5944dec3a11"}, - {file = "coincurve-18.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23b9ced9cce32dabb4bc15fa6449252fa51efddf0268481973e4c3772a5a68c6"}, - {file = "coincurve-18.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d05641cf31d68514c47cb54105d20acbae79fc3ee3942454eaaf411babb3f880"}, - {file = "coincurve-18.0.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a7b31efe56b3f6434828ad5f6ecde4a95747bb69b59032746482eebb8f3456a4"}, - {file = "coincurve-18.0.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2d95103ed43df855121cd925869ae2589360a8d94fcd61b236958deacfb9a359"}, - {file = "coincurve-18.0.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:abeb4c1d78e1a81a3f1c99a406cd858669582ada2d976e876ef694f57dec95ca"}, - {file = "coincurve-18.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fceca9d6ecaa1e8f891675e4f4ff530d54e41c648fc6e8a816835ffa640fa899"}, - {file = "coincurve-18.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e009f06287507158f16c82cc313c0f3bfd0e9ec1e82d1a4d5fa1c5b6c0060f69"}, - {file = "coincurve-18.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a0c0c1e492ef08efe99d25a23d535e2bff667bbef43d71a6f8893ae811b3d81"}, - {file = "coincurve-18.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3caf58877bcf41eb4c1be7a2d54317f0b31541d99ba248dae28821b19c52a0db"}, - {file = "coincurve-18.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8964e680c622a2b5eea940abdf51c77c1bd3d4fde2a04cec2420bf91981b198a"}, - {file = "coincurve-18.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:73e464e0ace77c686fdc54590e5592905b6802f9fc20a0c023f0b1585669d6a3"}, - {file = "coincurve-18.0.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ba9eaddd50a2ce0d891af7cee11c2e048d1f0f44bf87db00a5c4b1eee7e3391b"}, - {file = "coincurve-18.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8290903d4629f27f9f3cdeec72ffa97536c5a6ed5ba7e3413b2707991c650fbe"}, - {file = "coincurve-18.0.0-py3-none-win32.whl", hash = "sha256:c60690bd7704d8563968d2dded33eb514875a52b5964f085409965ad041b2555"}, - {file = "coincurve-18.0.0-py3-none-win_amd64.whl", hash = "sha256:704d1abf2e78def33988368592233a8ec9b98bfc45dfa2ec9e898adfad46e5ad"}, - {file = "coincurve-18.0.0.tar.gz", hash = "sha256:c86626afe417a09d8e80e56780efcae3ae516203b23b5ade84813916e1c94fc1"}, -] - -[package.dependencies] -asn1crypto = "*" -cffi = ">=1.3.0" - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "cryptography" -version = "41.0.7" -description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -optional = false -python-versions = ">=3.7" -files = [ - {file = "cryptography-41.0.7-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:3c78451b78313fa81607fa1b3f1ae0a5ddd8014c38a02d9db0616133987b9cdf"}, - {file = "cryptography-41.0.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:928258ba5d6f8ae644e764d0f996d61a8777559f72dfeb2eea7e2fe0ad6e782d"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a1b41bc97f1ad230a41657d9155113c7521953869ae57ac39ac7f1bb471469a"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:841df4caa01008bad253bce2a6f7b47f86dc9f08df4b433c404def869f590a15"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5429ec739a29df2e29e15d082f1d9ad683701f0ec7709ca479b3ff2708dae65a"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:43f2552a2378b44869fe8827aa19e69512e3245a219104438692385b0ee119d1"}, - {file = "cryptography-41.0.7-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:af03b32695b24d85a75d40e1ba39ffe7db7ffcb099fe507b39fd41a565f1b157"}, - {file = "cryptography-41.0.7-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:49f0805fc0b2ac8d4882dd52f4a3b935b210935d500b6b805f321addc8177406"}, - {file = "cryptography-41.0.7-cp37-abi3-win32.whl", hash = "sha256:f983596065a18a2183e7f79ab3fd4c475205b839e02cbc0efbbf9666c4b3083d"}, - {file = "cryptography-41.0.7-cp37-abi3-win_amd64.whl", hash = "sha256:90452ba79b8788fa380dfb587cca692976ef4e757b194b093d845e8d99f612f2"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:079b85658ea2f59c4f43b70f8119a52414cdb7be34da5d019a77bf96d473b960"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:b640981bf64a3e978a56167594a0e97db71c89a479da8e175d8bb5be5178c003"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e3114da6d7f95d2dee7d3f4eec16dacff819740bbab931aff8648cb13c5ff5e7"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d5ec85080cce7b0513cfd233914eb8b7bbd0633f1d1703aa28d1dd5a72f678ec"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7a698cb1dac82c35fcf8fe3417a3aaba97de16a01ac914b89a0889d364d2f6be"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:37a138589b12069efb424220bf78eac59ca68b95696fc622b6ccc1c0a197204a"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:68a2dec79deebc5d26d617bfdf6e8aab065a4f34934b22d3b5010df3ba36612c"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:09616eeaef406f99046553b8a40fbf8b1e70795a91885ba4c96a70793de5504a"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:48a0476626da912a44cc078f9893f292f0b3e4c739caf289268168d8f4702a39"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c7f3201ec47d5207841402594f1d7950879ef890c0c495052fa62f58283fde1a"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c5ca78485a255e03c32b513f8c2bc39fedb7f5c5f8535545bdc223a03b24f248"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:d6c391c021ab1f7a82da5d8d0b3cee2f4b2c455ec86c8aebbc84837a631ff309"}, - {file = "cryptography-41.0.7.tar.gz", hash = "sha256:13f93ce9bea8016c253b34afc6bd6a75993e5c40672ed5405a9c832f0d4a00bc"}, -] - -[package.dependencies] -cffi = ">=1.12" - -[package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] -docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] -nox = ["nox"] -pep8test = ["black", "check-sdist", "mypy", "ruff"] -sdist = ["build"] -ssh = ["bcrypt (>=3.1.5)"] -test = ["pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] -test-randomorder = ["pytest-randomly"] - -[[package]] -name = "exceptiongroup" -version = "1.2.2" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, - {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, -] - -[package.extras] -test = ["pytest (>=6)"] - -[[package]] -name = "greenlet" -version = "3.1.1" -description = "Lightweight in-process concurrent programming" -optional = false -python-versions = ">=3.7" -files = [ - {file = "greenlet-3.1.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:0bbae94a29c9e5c7e4a2b7f0aae5c17e8e90acbfd3bf6270eeba60c39fce3563"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fde093fb93f35ca72a556cf72c92ea3ebfda3d79fc35bb19fbe685853869a83"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:36b89d13c49216cadb828db8dfa6ce86bbbc476a82d3a6c397f0efae0525bdd0"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94b6150a85e1b33b40b1464a3f9988dcc5251d6ed06842abff82e42632fac120"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93147c513fac16385d1036b7e5b102c7fbbdb163d556b791f0f11eada7ba65dc"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:da7a9bff22ce038e19bf62c4dd1ec8391062878710ded0a845bcf47cc0200617"}, - {file = "greenlet-3.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b2795058c23988728eec1f36a4e5e4ebad22f8320c85f3587b539b9ac84128d7"}, - {file = "greenlet-3.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ed10eac5830befbdd0c32f83e8aa6288361597550ba669b04c48f0f9a2c843c6"}, - {file = "greenlet-3.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:77c386de38a60d1dfb8e55b8c1101d68c79dfdd25c7095d51fec2dd800892b80"}, - {file = "greenlet-3.1.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:e4d333e558953648ca09d64f13e6d8f0523fa705f51cae3f03b5983489958c70"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09fc016b73c94e98e29af67ab7b9a879c307c6731a2c9da0db5a7d9b7edd1159"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d5e975ca70269d66d17dd995dafc06f1b06e8cb1ec1e9ed54c1d1e4a7c4cf26e"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b2813dc3de8c1ee3f924e4d4227999285fd335d1bcc0d2be6dc3f1f6a318ec1"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e347b3bfcf985a05e8c0b7d462ba6f15b1ee1c909e2dcad795e49e91b152c383"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e8f8c9cb53cdac7ba9793c276acd90168f416b9ce36799b9b885790f8ad6c0a"}, - {file = "greenlet-3.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:62ee94988d6b4722ce0028644418d93a52429e977d742ca2ccbe1c4f4a792511"}, - {file = "greenlet-3.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1776fd7f989fc6b8d8c8cb8da1f6b82c5814957264d1f6cf818d475ec2bf6395"}, - {file = "greenlet-3.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:48ca08c771c268a768087b408658e216133aecd835c0ded47ce955381105ba39"}, - {file = "greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:4afe7ea89de619adc868e087b4d2359282058479d7cfb94970adf4b55284574d"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f406b22b7c9a9b4f8aa9d2ab13d6ae0ac3e85c9a809bd590ad53fed2bf70dc79"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c3a701fe5a9695b238503ce5bbe8218e03c3bcccf7e204e455e7462d770268aa"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2846930c65b47d70b9d178e89c7e1a69c95c1f68ea5aa0a58646b7a96df12441"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99cfaa2110534e2cf3ba31a7abcac9d328d1d9f1b95beede58294a60348fba36"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1443279c19fca463fc33e65ef2a935a5b09bb90f978beab37729e1c3c6c25fe9"}, - {file = "greenlet-3.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b7cede291382a78f7bb5f04a529cb18e068dd29e0fb27376074b6d0317bf4dd0"}, - {file = "greenlet-3.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:23f20bb60ae298d7d8656c6ec6db134bca379ecefadb0b19ce6f19d1f232a942"}, - {file = "greenlet-3.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:7124e16b4c55d417577c2077be379514321916d5790fa287c9ed6f23bd2ffd01"}, - {file = "greenlet-3.1.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:05175c27cb459dcfc05d026c4232f9de8913ed006d42713cb8a5137bd49375f1"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:935e943ec47c4afab8965954bf49bfa639c05d4ccf9ef6e924188f762145c0ff"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:667a9706c970cb552ede35aee17339a18e8f2a87a51fba2ed39ceeeb1004798a"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b8a678974d1f3aa55f6cc34dc480169d58f2e6d8958895d68845fa4ab566509e"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efc0f674aa41b92da8c49e0346318c6075d734994c3c4e4430b1c3f853e498e4"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0153404a4bb921f0ff1abeb5ce8a5131da56b953eda6e14b88dc6bbc04d2049e"}, - {file = "greenlet-3.1.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:275f72decf9932639c1c6dd1013a1bc266438eb32710016a1c742df5da6e60a1"}, - {file = "greenlet-3.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c4aab7f6381f38a4b42f269057aee279ab0fc7bf2e929e3d4abfae97b682a12c"}, - {file = "greenlet-3.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:b42703b1cf69f2aa1df7d1030b9d77d3e584a70755674d60e710f0af570f3761"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1695e76146579f8c06c1509c7ce4dfe0706f49c6831a817ac04eebb2fd02011"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7876452af029456b3f3549b696bb36a06db7c90747740c5302f74a9e9fa14b13"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ead44c85f8ab905852d3de8d86f6f8baf77109f9da589cb4fa142bd3b57b475"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8320f64b777d00dd7ccdade271eaf0cad6636343293a25074cc5566160e4de7b"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6510bf84a6b643dabba74d3049ead221257603a253d0a9873f55f6a59a65f822"}, - {file = "greenlet-3.1.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:04b013dc07c96f83134b1e99888e7a79979f1a247e2a9f59697fa14b5862ed01"}, - {file = "greenlet-3.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:411f015496fec93c1c8cd4e5238da364e1da7a124bcb293f085bf2860c32c6f6"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47da355d8687fd65240c364c90a31569a133b7b60de111c255ef5b606f2ae291"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98884ecf2ffb7d7fe6bd517e8eb99d31ff7855a840fa6d0d63cd07c037f6a981"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1d4aeb8891338e60d1ab6127af1fe45def5259def8094b9c7e34690c8858803"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db32b5348615a04b82240cc67983cb315309e88d444a288934ee6ceaebcad6cc"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dcc62f31eae24de7f8dce72134c8651c58000d3b1868e01392baea7c32c247de"}, - {file = "greenlet-3.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1d3755bcb2e02de341c55b4fca7a745a24a9e7212ac953f6b3a48d117d7257aa"}, - {file = "greenlet-3.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b8da394b34370874b4572676f36acabac172602abf054cbc4ac910219f3340af"}, - {file = "greenlet-3.1.1-cp37-cp37m-win32.whl", hash = "sha256:a0dfc6c143b519113354e780a50381508139b07d2177cb6ad6a08278ec655798"}, - {file = "greenlet-3.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:54558ea205654b50c438029505def3834e80f0869a70fb15b871c29b4575ddef"}, - {file = "greenlet-3.1.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:346bed03fe47414091be4ad44786d1bd8bef0c3fcad6ed3dee074a032ab408a9"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfc59d69fc48664bc693842bd57acfdd490acafda1ab52c7836e3fc75c90a111"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d21e10da6ec19b457b82636209cbe2331ff4306b54d06fa04b7c138ba18c8a81"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:37b9de5a96111fc15418819ab4c4432e4f3c2ede61e660b1e33971eba26ef9ba"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef9ea3f137e5711f0dbe5f9263e8c009b7069d8a1acea822bd5e9dae0ae49c8"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85f3ff71e2e60bd4b4932a043fbbe0f499e263c628390b285cb599154a3b03b1"}, - {file = "greenlet-3.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:95ffcf719966dd7c453f908e208e14cde192e09fde6c7186c8f1896ef778d8cd"}, - {file = "greenlet-3.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:03a088b9de532cbfe2ba2034b2b85e82df37874681e8c470d6fb2f8c04d7e4b7"}, - {file = "greenlet-3.1.1-cp38-cp38-win32.whl", hash = "sha256:8b8b36671f10ba80e159378df9c4f15c14098c4fd73a36b9ad715f057272fbef"}, - {file = "greenlet-3.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:7017b2be767b9d43cc31416aba48aab0d2309ee31b4dbf10a1d38fb7972bdf9d"}, - {file = "greenlet-3.1.1-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:396979749bd95f018296af156201d6211240e7a23090f50a8d5d18c370084dc3"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca9d0ff5ad43e785350894d97e13633a66e2b50000e8a183a50a88d834752d42"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f6ff3b14f2df4c41660a7dec01045a045653998784bf8cfcb5a525bdffffbc8f"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94ebba31df2aa506d7b14866fed00ac141a867e63143fe5bca82a8e503b36437"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73aaad12ac0ff500f62cebed98d8789198ea0e6f233421059fa68a5aa7220145"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63e4844797b975b9af3a3fb8f7866ff08775f5426925e1e0bbcfe7932059a12c"}, - {file = "greenlet-3.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7939aa3ca7d2a1593596e7ac6d59391ff30281ef280d8632fa03d81f7c5f955e"}, - {file = "greenlet-3.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d0028e725ee18175c6e422797c407874da24381ce0690d6b9396c204c7f7276e"}, - {file = "greenlet-3.1.1-cp39-cp39-win32.whl", hash = "sha256:5e06afd14cbaf9e00899fae69b24a32f2196c19de08fcb9f4779dd4f004e5e7c"}, - {file = "greenlet-3.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:3319aa75e0e0639bc15ff54ca327e8dc7a6fe404003496e3c6925cd3142e0e22"}, - {file = "greenlet-3.1.1.tar.gz", hash = "sha256:4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467"}, -] - -[package.extras] -docs = ["Sphinx", "furo"] -test = ["objgraph", "psutil"] - -[[package]] -name = "grpc-interceptor" -version = "0.15.4" -description = "Simplifies gRPC interceptors" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "grpc-interceptor-0.15.4.tar.gz", hash = "sha256:1f45c0bcb58b6f332f37c637632247c9b02bc6af0fdceb7ba7ce8d2ebbfb0926"}, - {file = "grpc_interceptor-0.15.4-py3-none-any.whl", hash = "sha256:0035f33228693ed3767ee49d937bac424318db173fef4d2d0170b3215f254d9d"}, -] - -[package.dependencies] -grpcio = ">=1.49.1,<2.0.0" - -[package.extras] -testing = ["protobuf (>=4.21.9)"] - -[[package]] -name = "grpcio" -version = "1.68.1" -description = "HTTP/2-based RPC framework" -optional = false -python-versions = ">=3.8" -files = [ - {file = "grpcio-1.68.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:d35740e3f45f60f3c37b1e6f2f4702c23867b9ce21c6410254c9c682237da68d"}, - {file = "grpcio-1.68.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:d99abcd61760ebb34bdff37e5a3ba333c5cc09feda8c1ad42547bea0416ada78"}, - {file = "grpcio-1.68.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:f8261fa2a5f679abeb2a0a93ad056d765cdca1c47745eda3f2d87f874ff4b8c9"}, - {file = "grpcio-1.68.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0feb02205a27caca128627bd1df4ee7212db051019a9afa76f4bb6a1a80ca95e"}, - {file = "grpcio-1.68.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:919d7f18f63bcad3a0f81146188e90274fde800a94e35d42ffe9eadf6a9a6330"}, - {file = "grpcio-1.68.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:963cc8d7d79b12c56008aabd8b457f400952dbea8997dd185f155e2f228db079"}, - {file = "grpcio-1.68.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ccf2ebd2de2d6661e2520dae293298a3803a98ebfc099275f113ce1f6c2a80f1"}, - {file = "grpcio-1.68.1-cp310-cp310-win32.whl", hash = "sha256:2cc1fd04af8399971bcd4f43bd98c22d01029ea2e56e69c34daf2bf8470e47f5"}, - {file = "grpcio-1.68.1-cp310-cp310-win_amd64.whl", hash = "sha256:ee2e743e51cb964b4975de572aa8fb95b633f496f9fcb5e257893df3be854746"}, - {file = "grpcio-1.68.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:55857c71641064f01ff0541a1776bfe04a59db5558e82897d35a7793e525774c"}, - {file = "grpcio-1.68.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4b177f5547f1b995826ef529d2eef89cca2f830dd8b2c99ffd5fde4da734ba73"}, - {file = "grpcio-1.68.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:3522c77d7e6606d6665ec8d50e867f13f946a4e00c7df46768f1c85089eae515"}, - {file = "grpcio-1.68.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9d1fae6bbf0816415b81db1e82fb3bf56f7857273c84dcbe68cbe046e58e1ccd"}, - {file = "grpcio-1.68.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:298ee7f80e26f9483f0b6f94cc0a046caf54400a11b644713bb5b3d8eb387600"}, - {file = "grpcio-1.68.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cbb5780e2e740b6b4f2d208e90453591036ff80c02cc605fea1af8e6fc6b1bbe"}, - {file = "grpcio-1.68.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ddda1aa22495d8acd9dfbafff2866438d12faec4d024ebc2e656784d96328ad0"}, - {file = "grpcio-1.68.1-cp311-cp311-win32.whl", hash = "sha256:b33bd114fa5a83f03ec6b7b262ef9f5cac549d4126f1dc702078767b10c46ed9"}, - {file = "grpcio-1.68.1-cp311-cp311-win_amd64.whl", hash = "sha256:7f20ebec257af55694d8f993e162ddf0d36bd82d4e57f74b31c67b3c6d63d8b2"}, - {file = "grpcio-1.68.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:8829924fffb25386995a31998ccbbeaa7367223e647e0122043dfc485a87c666"}, - {file = "grpcio-1.68.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:3aed6544e4d523cd6b3119b0916cef3d15ef2da51e088211e4d1eb91a6c7f4f1"}, - {file = "grpcio-1.68.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:4efac5481c696d5cb124ff1c119a78bddbfdd13fc499e3bc0ca81e95fc573684"}, - {file = "grpcio-1.68.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ab2d912ca39c51f46baf2a0d92aa265aa96b2443266fc50d234fa88bf877d8e"}, - {file = "grpcio-1.68.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95c87ce2a97434dffe7327a4071839ab8e8bffd0054cc74cbe971fba98aedd60"}, - {file = "grpcio-1.68.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:e4842e4872ae4ae0f5497bf60a0498fa778c192cc7a9e87877abd2814aca9475"}, - {file = "grpcio-1.68.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:255b1635b0ed81e9f91da4fcc8d43b7ea5520090b9a9ad9340d147066d1d3613"}, - {file = "grpcio-1.68.1-cp312-cp312-win32.whl", hash = "sha256:7dfc914cc31c906297b30463dde0b9be48e36939575eaf2a0a22a8096e69afe5"}, - {file = "grpcio-1.68.1-cp312-cp312-win_amd64.whl", hash = "sha256:a0c8ddabef9c8f41617f213e527254c41e8b96ea9d387c632af878d05db9229c"}, - {file = "grpcio-1.68.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:a47faedc9ea2e7a3b6569795c040aae5895a19dde0c728a48d3c5d7995fda385"}, - {file = "grpcio-1.68.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:390eee4225a661c5cd133c09f5da1ee3c84498dc265fd292a6912b65c421c78c"}, - {file = "grpcio-1.68.1-cp313-cp313-manylinux_2_17_aarch64.whl", hash = "sha256:66a24f3d45c33550703f0abb8b656515b0ab777970fa275693a2f6dc8e35f1c1"}, - {file = "grpcio-1.68.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c08079b4934b0bf0a8847f42c197b1d12cba6495a3d43febd7e99ecd1cdc8d54"}, - {file = "grpcio-1.68.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8720c25cd9ac25dd04ee02b69256d0ce35bf8a0f29e20577427355272230965a"}, - {file = "grpcio-1.68.1-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:04cfd68bf4f38f5bb959ee2361a7546916bd9a50f78617a346b3aeb2b42e2161"}, - {file = "grpcio-1.68.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c28848761a6520c5c6071d2904a18d339a796ebe6b800adc8b3f474c5ce3c3ad"}, - {file = "grpcio-1.68.1-cp313-cp313-win32.whl", hash = "sha256:77d65165fc35cff6e954e7fd4229e05ec76102d4406d4576528d3a3635fc6172"}, - {file = "grpcio-1.68.1-cp313-cp313-win_amd64.whl", hash = "sha256:a8040f85dcb9830d8bbb033ae66d272614cec6faceee88d37a88a9bd1a7a704e"}, - {file = "grpcio-1.68.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:eeb38ff04ab6e5756a2aef6ad8d94e89bb4a51ef96e20f45c44ba190fa0bcaad"}, - {file = "grpcio-1.68.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:8a3869a6661ec8f81d93f4597da50336718bde9eb13267a699ac7e0a1d6d0bea"}, - {file = "grpcio-1.68.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:2c4cec6177bf325eb6faa6bd834d2ff6aa8bb3b29012cceb4937b86f8b74323c"}, - {file = "grpcio-1.68.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12941d533f3cd45d46f202e3667be8ebf6bcb3573629c7ec12c3e211d99cfccf"}, - {file = "grpcio-1.68.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80af6f1e69c5e68a2be529990684abdd31ed6622e988bf18850075c81bb1ad6e"}, - {file = "grpcio-1.68.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e8dbe3e00771bfe3d04feed8210fc6617006d06d9a2679b74605b9fed3e8362c"}, - {file = "grpcio-1.68.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:83bbf5807dc3ee94ce1de2dfe8a356e1d74101e4b9d7aa8c720cc4818a34aded"}, - {file = "grpcio-1.68.1-cp38-cp38-win32.whl", hash = "sha256:8cb620037a2fd9eeee97b4531880e439ebfcd6d7d78f2e7dcc3726428ab5ef63"}, - {file = "grpcio-1.68.1-cp38-cp38-win_amd64.whl", hash = "sha256:52fbf85aa71263380d330f4fce9f013c0798242e31ede05fcee7fbe40ccfc20d"}, - {file = "grpcio-1.68.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:cb400138e73969eb5e0535d1d06cae6a6f7a15f2cc74add320e2130b8179211a"}, - {file = "grpcio-1.68.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a1b988b40f2fd9de5c820f3a701a43339d8dcf2cb2f1ca137e2c02671cc83ac1"}, - {file = "grpcio-1.68.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:96f473cdacfdd506008a5d7579c9f6a7ff245a9ade92c3c0265eb76cc591914f"}, - {file = "grpcio-1.68.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:37ea3be171f3cf3e7b7e412a98b77685eba9d4fd67421f4a34686a63a65d99f9"}, - {file = "grpcio-1.68.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ceb56c4285754e33bb3c2fa777d055e96e6932351a3082ce3559be47f8024f0"}, - {file = "grpcio-1.68.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:dffd29a2961f3263a16d73945b57cd44a8fd0b235740cb14056f0612329b345e"}, - {file = "grpcio-1.68.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:025f790c056815b3bf53da850dd70ebb849fd755a4b1ac822cb65cd631e37d43"}, - {file = "grpcio-1.68.1-cp39-cp39-win32.whl", hash = "sha256:1098f03dedc3b9810810568060dea4ac0822b4062f537b0f53aa015269be0a76"}, - {file = "grpcio-1.68.1-cp39-cp39-win_amd64.whl", hash = "sha256:334ab917792904245a028f10e803fcd5b6f36a7b2173a820c0b5b076555825e1"}, - {file = "grpcio-1.68.1.tar.gz", hash = "sha256:44a8502dd5de653ae6a73e2de50a401d84184f0331d0ac3daeb044e66d5c5054"}, -] - -[package.extras] -protobuf = ["grpcio-tools (>=1.68.1)"] - -[[package]] -name = "grpcio-tools" -version = "1.68.1" -description = "Protobuf code generator for gRPC" -optional = false -python-versions = ">=3.8" -files = [ - {file = "grpcio_tools-1.68.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:3a93ea324c5cbccdff55110777410d026dc1e69c3d47684ac97f57f7a77b9c70"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:94cbfb9482cfd7bdb5f081b94fa137a16e4fe031daa57a2cd85d8cb4e18dce25"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:bbe7e1641859c858d0f4631f7f7c09e7302433f1aa037028d2419c1410945fac"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:55c0f91c4294c5807796ed26af42509f3d68497942a92d9ee9f43b08768d6c3c"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85adc798fd3b57ab3e998b5897c5daab6840211ac16cdf3ba99901cb9b90094a"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f0bdccb00709bf6180a80a353a99fa844cc0bb2d450cdf7fc6ab22c988bb6b4c"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2465e4d347b35dc0c007e074c79d5ded0a89c3aa26651e690f83593e0cc28af8"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-win32.whl", hash = "sha256:83c124a1776c1027da7d36584c8044cfed7a9f10e90f08dafde8d2a4cb822319"}, - {file = "grpcio_tools-1.68.1-cp310-cp310-win_amd64.whl", hash = "sha256:283fd1359d619d42c3346f1d8f0a70636a036a421178803a1ab8083fa4228a38"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:02f04de42834129eb54bb12469160ab631a0395d6a2b77975381c02b994086c3"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:92b6aab37095879ef9ee428dd171740ff794f4c7a66bc1cc7280cd0051f8cd96"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:1f0ac6ac5e1e33b998511981b3ef36489501833413354f3597b97a3452d7d7ba"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28e0bca3a262af86557f30e30ddf2fadc2324ee05cd7352716924cc7f83541f1"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12239cf5ca6b7b4937103953cf35c49683d935e32e98596fe52dd35168aa86e6"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8e48d8884fcf6b182c73d0560a183404458e30a0f479918b88ca8fbd48b8b05f"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e4e8059469847441855322da16fa2c0f9787b996c237a98778210e31188a8652"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-win32.whl", hash = "sha256:21815d54a83effbd2600d16382a7897298cfeffe578557fc9a47b642cc8ddafe"}, - {file = "grpcio_tools-1.68.1-cp311-cp311-win_amd64.whl", hash = "sha256:2114528723d9f12d3e24af3d433ec6f140deea1dd64d3bb1b4ebced217f1867c"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:d67a9d1ad22ff0d22715dba1d5f8f23ebd47cea84ccd20c90bf4690d988adc5b"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:c7f1e704ff73eb01afac51b63b74868a35aaa5d6f791fc63bd41af44a51aa232"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:e9f69988bd77db014795511c498e89a0db24bd47877e65921364114f88de3bee"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8585ec7d11fcc2bb635b39605a4466ca9fa28dbae0c184fe58f456da72cb9031"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c81d0be6c46fcbcd2cd126804060a95531cdf6d779436b2fbc68c8b4a7db2dc1"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6efdb02e75baf289935b5dad665f0e0f7c3311d86aae0cd2c709e2a8a34bb620"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8ea367639e771e5a05f7320eb4ae2b27e09d2ec3baeae9819d1c590cc7eaaa08"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-win32.whl", hash = "sha256:a5b1021c9942bba7eca1555061e2d308f506198088a3a539fcb3633499c6635f"}, - {file = "grpcio_tools-1.68.1-cp312-cp312-win_amd64.whl", hash = "sha256:315ad9c28940c95e85e57aeca309d298113175c2d5e8221501a05a51072f5477"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:67e49b5ede0cc8a0f988f41f7b72f6bc03180aecdb5213bd985bc1bbfd9ffdac"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:b78e38f953062d45ff92ec940da292dc9bfbf26de492c8dc44e12b13493a8e80"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-manylinux_2_17_aarch64.whl", hash = "sha256:8ebe9df5bab4121e8f51e013a379be2027179a0c8013e89d686a1e5800e9c205"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be553e3ea7447ed9e2e2d089f3b0a77000e86d2681b3c77498c98dddffc62d22"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4877f3eabb6185b5691f5218fedc86a84a833734847a294048862ec910a2854"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:b98173e536e8f2779eff84a03409cca6497dc1fad3d10a47c8d881b2cb36259b"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:5b64035dcd0df70acf3af972c3f103b0ce141d29732fd94eaa8b38cf7c8e62fe"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-win32.whl", hash = "sha256:573f3ed3276df20c308797ae834ac6c5595b1dd2953b243eedadbcd986a287d7"}, - {file = "grpcio_tools-1.68.1-cp313-cp313-win_amd64.whl", hash = "sha256:c4539c6231015c40db879fbc0feaaf03adb4275c1bd2b4dd26e2323f2a13655a"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:3e0fc6dbc64efc7bb0fe23ce46587e0cbeb512142d543834c2bc9100c8f255ff"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:79337ac1b19610b99f93aa52ae05e5fbf96adbe60d54ecf192af44cc69118d19"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:eb7cae5f0232aba9057f26a45ef6b0a5633d36627fe49442c0985b6f44b67822"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25fe1bcbb558a477c525bec9d67e1469d47dddc9430e6e5c0d11f67f08cfc810"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ce901f42037d1ebc7724e721180d03e33163d5acf0a62c52728e6c36117c5e9"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3c213c2208c42dce2a5fc7cfb2b952a3c22ef019812f9f27bd54c6e00ee0720e"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ff6ae5031a03ab90e9c508d12914438b73efd44b5eed9946bf8974c453d0ed57"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-win32.whl", hash = "sha256:41e631e72b6b94eb6f3d9cd533c682249f82fc58007c7561f6e521b884a6347e"}, - {file = "grpcio_tools-1.68.1-cp38-cp38-win_amd64.whl", hash = "sha256:69fb93761f116a5b063fb4f6150023c4d785304b37adcebf561b95018f9b40ae"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:31c703dba465956acb83adc105d61297459d0d14b512441d827f6c040cbffe2b"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1093f441751689d225916e3fe02daf98d2becab688b9e167bd2c38454ec50906"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:3543b9205e5b88d2280493aa9b55d35ce9cc45b7a0891c9d84c200652802e22a"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:79d575cc5a522b9920d9a07387976fc02d162bdf97ba51cf91fabdca8dfdb491"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d546e4a506288d6227acc0eb625039c5e1ad96218c8cfe9ecf661a41e15e442e"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:aced9c7a4edbf6eff73720bfa6fefd9053ae294535a488dfb92a372913eda10d"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3c08d1a244b5025ba3f8ef81d0885b431b93cc20bc4560add4cdfcf38c1bfad"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-win32.whl", hash = "sha256:049f05a3f227e9f696059a20b2858e6d7c1cd6037d8471306d7ab7627b1a4ce4"}, - {file = "grpcio_tools-1.68.1-cp39-cp39-win_amd64.whl", hash = "sha256:4c3599c75b1157e6bda24cdbdadb023bf0fe1085aa1e0047a1f35a8778f9b56e"}, - {file = "grpcio_tools-1.68.1.tar.gz", hash = "sha256:2413a17ad16c9c821b36e4a67fc64c37b9e4636ab1c3a07778018801378739ba"}, -] - -[package.dependencies] -grpcio = ">=1.68.1" -protobuf = ">=5.26.1,<6.0dev" -setuptools = "*" - -[[package]] -name = "idna" -version = "3.10" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.6" -files = [ - {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, - {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, -] - -[package.extras] -all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] - -[[package]] -name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" -optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "numpy" -version = "2.2.1" -description = "Fundamental package for array computing in Python" -optional = false -python-versions = ">=3.10" -files = [ - {file = "numpy-2.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5edb4e4caf751c1518e6a26a83501fda79bff41cc59dac48d70e6d65d4ec4440"}, - {file = "numpy-2.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aa3017c40d513ccac9621a2364f939d39e550c542eb2a894b4c8da92b38896ab"}, - {file = "numpy-2.2.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:61048b4a49b1c93fe13426e04e04fdf5a03f456616f6e98c7576144677598675"}, - {file = "numpy-2.2.1-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:7671dc19c7019103ca44e8d94917eba8534c76133523ca8406822efdd19c9308"}, - {file = "numpy-2.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4250888bcb96617e00bfa28ac24850a83c9f3a16db471eca2ee1f1714df0f957"}, - {file = "numpy-2.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7746f235c47abc72b102d3bce9977714c2444bdfaea7888d241b4c4bb6a78bf"}, - {file = "numpy-2.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:059e6a747ae84fce488c3ee397cee7e5f905fd1bda5fb18c66bc41807ff119b2"}, - {file = "numpy-2.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f62aa6ee4eb43b024b0e5a01cf65a0bb078ef8c395e8713c6e8a12a697144528"}, - {file = "numpy-2.2.1-cp310-cp310-win32.whl", hash = "sha256:48fd472630715e1c1c89bf1feab55c29098cb403cc184b4859f9c86d4fcb6a95"}, - {file = "numpy-2.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:b541032178a718c165a49638d28272b771053f628382d5e9d1c93df23ff58dbf"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40f9e544c1c56ba8f1cf7686a8c9b5bb249e665d40d626a23899ba6d5d9e1484"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9b57eaa3b0cd8db52049ed0330747b0364e899e8a606a624813452b8203d5f7"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:bc8a37ad5b22c08e2dbd27df2b3ef7e5c0864235805b1e718a235bcb200cf1cb"}, - {file = "numpy-2.2.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:9036d6365d13b6cbe8f27a0eaf73ddcc070cae584e5ff94bb45e3e9d729feab5"}, - {file = "numpy-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51faf345324db860b515d3f364eaa93d0e0551a88d6218a7d61286554d190d73"}, - {file = "numpy-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38efc1e56b73cc9b182fe55e56e63b044dd26a72128fd2fbd502f75555d92591"}, - {file = "numpy-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:31b89fa67a8042e96715c68e071a1200c4e172f93b0fbe01a14c0ff3ff820fc8"}, - {file = "numpy-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4c86e2a209199ead7ee0af65e1d9992d1dce7e1f63c4b9a616500f93820658d0"}, - {file = "numpy-2.2.1-cp311-cp311-win32.whl", hash = "sha256:b34d87e8a3090ea626003f87f9392b3929a7bbf4104a05b6667348b6bd4bf1cd"}, - {file = "numpy-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:360137f8fb1b753c5cde3ac388597ad680eccbbbb3865ab65efea062c4a1fd16"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:694f9e921a0c8f252980e85bce61ebbd07ed2b7d4fa72d0e4246f2f8aa6642ab"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3683a8d166f2692664262fd4900f207791d005fb088d7fdb973cc8d663626faa"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:780077d95eafc2ccc3ced969db22377b3864e5b9a0ea5eb347cc93b3ea900315"}, - {file = "numpy-2.2.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:55ba24ebe208344aa7a00e4482f65742969a039c2acfcb910bc6fcd776eb4355"}, - {file = "numpy-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b1d07b53b78bf84a96898c1bc139ad7f10fda7423f5fd158fd0f47ec5e01ac7"}, - {file = "numpy-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5062dc1a4e32a10dc2b8b13cedd58988261416e811c1dc4dbdea4f57eea61b0d"}, - {file = "numpy-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:fce4f615f8ca31b2e61aa0eb5865a21e14f5629515c9151850aa936c02a1ee51"}, - {file = "numpy-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:67d4cda6fa6ffa073b08c8372aa5fa767ceb10c9a0587c707505a6d426f4e046"}, - {file = "numpy-2.2.1-cp312-cp312-win32.whl", hash = "sha256:32cb94448be47c500d2c7a95f93e2f21a01f1fd05dd2beea1ccd049bb6001cd2"}, - {file = "numpy-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:ba5511d8f31c033a5fcbda22dd5c813630af98c70b2661f2d2c654ae3cdfcfc8"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f1d09e520217618e76396377c81fba6f290d5f926f50c35f3a5f72b01a0da780"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3ecc47cd7f6ea0336042be87d9e7da378e5c7e9b3c8ad0f7c966f714fc10d821"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f419290bc8968a46c4933158c91a0012b7a99bb2e465d5ef5293879742f8797e"}, - {file = "numpy-2.2.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5b6c390bfaef8c45a260554888966618328d30e72173697e5cabe6b285fb2348"}, - {file = "numpy-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:526fc406ab991a340744aad7e25251dd47a6720a685fa3331e5c59fef5282a59"}, - {file = "numpy-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f74e6fdeb9a265624ec3a3918430205dff1df7e95a230779746a6af78bc615af"}, - {file = "numpy-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:53c09385ff0b72ba79d8715683c1168c12e0b6e84fb0372e97553d1ea91efe51"}, - {file = "numpy-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f3eac17d9ec51be534685ba877b6ab5edc3ab7ec95c8f163e5d7b39859524716"}, - {file = "numpy-2.2.1-cp313-cp313-win32.whl", hash = "sha256:9ad014faa93dbb52c80d8f4d3dcf855865c876c9660cb9bd7553843dd03a4b1e"}, - {file = "numpy-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:164a829b6aacf79ca47ba4814b130c4020b202522a93d7bff2202bfb33b61c60"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4dfda918a13cc4f81e9118dea249e192ab167a0bb1966272d5503e39234d694e"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:733585f9f4b62e9b3528dd1070ec4f52b8acf64215b60a845fa13ebd73cd0712"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:89b16a18e7bba224ce5114db863e7029803c179979e1af6ad6a6b11f70545008"}, - {file = "numpy-2.2.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:676f4eebf6b2d430300f1f4f4c2461685f8269f94c89698d832cdf9277f30b84"}, - {file = "numpy-2.2.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27f5cdf9f493b35f7e41e8368e7d7b4bbafaf9660cba53fb21d2cd174ec09631"}, - {file = "numpy-2.2.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1ad395cf254c4fbb5b2132fee391f361a6e8c1adbd28f2cd8e79308a615fe9d"}, - {file = "numpy-2.2.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:08ef779aed40dbc52729d6ffe7dd51df85796a702afbf68a4f4e41fafdc8bda5"}, - {file = "numpy-2.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:26c9c4382b19fcfbbed3238a14abf7ff223890ea1936b8890f058e7ba35e8d71"}, - {file = "numpy-2.2.1-cp313-cp313t-win32.whl", hash = "sha256:93cf4e045bae74c90ca833cba583c14b62cb4ba2cba0abd2b141ab52548247e2"}, - {file = "numpy-2.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:bff7d8ec20f5f42607599f9994770fa65d76edca264a87b5e4ea5629bce12268"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7ba9cc93a91d86365a5d270dee221fdc04fb68d7478e6bf6af650de78a8339e3"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:3d03883435a19794e41f147612a77a8f56d4e52822337844fff3d4040a142964"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4511d9e6071452b944207c8ce46ad2f897307910b402ea5fa975da32e0102800"}, - {file = "numpy-2.2.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5c5cc0cbabe9452038ed984d05ac87910f89370b9242371bd9079cb4af61811e"}, - {file = "numpy-2.2.1.tar.gz", hash = "sha256:45681fd7128c8ad1c379f0ca0776a8b0c6583d2f69889ddac01559dfe4390918"}, -] - -[[package]] -name = "packaging" -version = "24.2" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, - {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, -] - -[[package]] -name = "pandas" -version = "2.2.3" -description = "Powerful data structures for data analysis, time series, and statistics" -optional = false -python-versions = ">=3.9" -files = [ - {file = "pandas-2.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1948ddde24197a0f7add2bdc4ca83bf2b1ef84a1bc8ccffd95eda17fd836ecb5"}, - {file = "pandas-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:381175499d3802cde0eabbaf6324cce0c4f5d52ca6f8c377c29ad442f50f6348"}, - {file = "pandas-2.2.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d9c45366def9a3dd85a6454c0e7908f2b3b8e9c138f5dc38fed7ce720d8453ed"}, - {file = "pandas-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86976a1c5b25ae3f8ccae3a5306e443569ee3c3faf444dfd0f41cda24667ad57"}, - {file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b8661b0238a69d7aafe156b7fa86c44b881387509653fdf857bebc5e4008ad42"}, - {file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:37e0aced3e8f539eccf2e099f65cdb9c8aa85109b0be6e93e2baff94264bdc6f"}, - {file = "pandas-2.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:56534ce0746a58afaf7942ba4863e0ef81c9c50d3f0ae93e9497d6a41a057645"}, - {file = "pandas-2.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:66108071e1b935240e74525006034333f98bcdb87ea116de573a6a0dccb6c039"}, - {file = "pandas-2.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7c2875855b0ff77b2a64a0365e24455d9990730d6431b9e0ee18ad8acee13dbd"}, - {file = "pandas-2.2.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd8d0c3be0515c12fed0bdbae072551c8b54b7192c7b1fda0ba56059a0179698"}, - {file = "pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c124333816c3a9b03fbeef3a9f230ba9a737e9e5bb4060aa2107a86cc0a497fc"}, - {file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:63cc132e40a2e084cf01adf0775b15ac515ba905d7dcca47e9a251819c575ef3"}, - {file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:29401dbfa9ad77319367d36940cd8a0b3a11aba16063e39632d98b0e931ddf32"}, - {file = "pandas-2.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:3fc6873a41186404dad67245896a6e440baacc92f5b716ccd1bc9ed2995ab2c5"}, - {file = "pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9"}, - {file = "pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4"}, - {file = "pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3"}, - {file = "pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319"}, - {file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8"}, - {file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a"}, - {file = "pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13"}, - {file = "pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015"}, - {file = "pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28"}, - {file = "pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0"}, - {file = "pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24"}, - {file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659"}, - {file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb"}, - {file = "pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d"}, - {file = "pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468"}, - {file = "pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18"}, - {file = "pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2"}, - {file = "pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4"}, - {file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d"}, - {file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a"}, - {file = "pandas-2.2.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc6b93f9b966093cb0fd62ff1a7e4c09e6d546ad7c1de191767baffc57628f39"}, - {file = "pandas-2.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5dbca4c1acd72e8eeef4753eeca07de9b1db4f398669d5994086f788a5d7cc30"}, - {file = "pandas-2.2.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8cd6d7cc958a3910f934ea8dbdf17b2364827bb4dafc38ce6eef6bb3d65ff09c"}, - {file = "pandas-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99df71520d25fade9db7c1076ac94eb994f4d2673ef2aa2e86ee039b6746d20c"}, - {file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31d0ced62d4ea3e231a9f228366919a5ea0b07440d9d4dac345376fd8e1477ea"}, - {file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7eee9e7cea6adf3e3d24e304ac6b8300646e2a5d1cd3a3c2abed9101b0846761"}, - {file = "pandas-2.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:4850ba03528b6dd51d6c5d273c46f183f39a9baf3f0143e566b89450965b105e"}, - {file = "pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667"}, -] - -[package.dependencies] -numpy = [ - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, -] -python-dateutil = ">=2.8.2" -pytz = ">=2020.1" -tzdata = ">=2022.7" - -[package.extras] -all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] -aws = ["s3fs (>=2022.11.0)"] -clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] -compression = ["zstandard (>=0.19.0)"] -computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] -consortium-standard = ["dataframe-api-compat (>=0.1.7)"] -excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] -feather = ["pyarrow (>=10.0.1)"] -fss = ["fsspec (>=2022.11.0)"] -gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] -hdf5 = ["tables (>=3.8.0)"] -html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] -mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] -output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] -parquet = ["pyarrow (>=10.0.1)"] -performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] -plot = ["matplotlib (>=3.6.3)"] -postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] -pyarrow = ["pyarrow (>=10.0.1)"] -spss = ["pyreadstat (>=1.2.0)"] -sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] -test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] -xml = ["lxml (>=4.9.2)"] - -[[package]] -name = "pluggy" -version = "1.5.0" -description = "plugin and hook calling mechanisms for python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, - {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, -] - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "protobuf" -version = "5.29.2" -description = "" -optional = false -python-versions = ">=3.8" -files = [ - {file = "protobuf-5.29.2-cp310-abi3-win32.whl", hash = "sha256:c12ba8249f5624300cf51c3d0bfe5be71a60c63e4dcf51ffe9a68771d958c851"}, - {file = "protobuf-5.29.2-cp310-abi3-win_amd64.whl", hash = "sha256:842de6d9241134a973aab719ab42b008a18a90f9f07f06ba480df268f86432f9"}, - {file = "protobuf-5.29.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a0c53d78383c851bfa97eb42e3703aefdc96d2036a41482ffd55dc5f529466eb"}, - {file = "protobuf-5.29.2-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:494229ecd8c9009dd71eda5fd57528395d1eacdf307dbece6c12ad0dd09e912e"}, - {file = "protobuf-5.29.2-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:b6b0d416bbbb9d4fbf9d0561dbfc4e324fd522f61f7af0fe0f282ab67b22477e"}, - {file = "protobuf-5.29.2-cp38-cp38-win32.whl", hash = "sha256:e621a98c0201a7c8afe89d9646859859be97cb22b8bf1d8eacfd90d5bda2eb19"}, - {file = "protobuf-5.29.2-cp38-cp38-win_amd64.whl", hash = "sha256:13d6d617a2a9e0e82a88113d7191a1baa1e42c2cc6f5f1398d3b054c8e7e714a"}, - {file = "protobuf-5.29.2-cp39-cp39-win32.whl", hash = "sha256:36000f97ea1e76e8398a3f02936aac2a5d2b111aae9920ec1b769fc4a222c4d9"}, - {file = "protobuf-5.29.2-cp39-cp39-win_amd64.whl", hash = "sha256:2d2e674c58a06311c8e99e74be43e7f3a8d1e2b2fdf845eaa347fbd866f23355"}, - {file = "protobuf-5.29.2-py3-none-any.whl", hash = "sha256:fde4554c0e578a5a0bcc9a276339594848d1e89f9ea47b4427c80e5d72f90181"}, - {file = "protobuf-5.29.2.tar.gz", hash = "sha256:b2cc8e8bb7c9326996f0e160137b0861f1a82162502658df2951209d0cb0309e"}, -] - -[[package]] -name = "psycopg" -version = "3.2.3" -description = "PostgreSQL database adapter for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "psycopg-3.2.3-py3-none-any.whl", hash = "sha256:644d3973fe26908c73d4be746074f6e5224b03c1101d302d9a53bf565ad64907"}, - {file = "psycopg-3.2.3.tar.gz", hash = "sha256:a5764f67c27bec8bfac85764d23c534af2c27b893550377e37ce59c12aac47a2"}, -] - -[package.dependencies] -psycopg-binary = {version = "3.2.3", optional = true, markers = "implementation_name != \"pypy\" and extra == \"binary\""} -typing-extensions = {version = ">=4.6", markers = "python_version < \"3.13\""} -tzdata = {version = "*", markers = "sys_platform == \"win32\""} - -[package.extras] -binary = ["psycopg-binary (==3.2.3)"] -c = ["psycopg-c (==3.2.3)"] -dev = ["ast-comments (>=1.1.2)", "black (>=24.1.0)", "codespell (>=2.2)", "dnspython (>=2.1)", "flake8 (>=4.0)", "mypy (>=1.11)", "types-setuptools (>=57.4)", "wheel (>=0.37)"] -docs = ["Sphinx (>=5.0)", "furo (==2022.6.21)", "sphinx-autobuild (>=2021.3.14)", "sphinx-autodoc-typehints (>=1.12)"] -pool = ["psycopg-pool"] -test = ["anyio (>=4.0)", "mypy (>=1.11)", "pproxy (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.5)"] - -[[package]] -name = "psycopg-binary" -version = "3.2.3" -description = "PostgreSQL database adapter for Python -- C optimisation distribution" -optional = false -python-versions = ">=3.8" -files = [ - {file = "psycopg_binary-3.2.3-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:965455eac8547f32b3181d5ec9ad8b9be500c10fe06193543efaaebe3e4ce70c"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:71adcc8bc80a65b776510bc39992edf942ace35b153ed7a9c6c573a6849ce308"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f73adc05452fb85e7a12ed3f69c81540a8875960739082e6ea5e28c373a30774"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8630943143c6d6ca9aefc88bbe5e76c90553f4e1a3b2dc339e67dc34aa86f7e"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bffb61e198a91f712cc3d7f2d176a697cb05b284b2ad150fb8edb308eba9002"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc4fa2240c9fceddaa815a58f29212826fafe43ce80ff666d38c4a03fb036955"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:192a5f8496e6e1243fdd9ac20e117e667c0712f148c5f9343483b84435854c78"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:64dc6e9ec64f592f19dc01a784e87267a64a743d34f68488924251253da3c818"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:79498df398970abcee3d326edd1d4655de7d77aa9aecd578154f8af35ce7bbd2"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:949551752930d5e478817e0b49956350d866b26578ced0042a61967e3fcccdea"}, - {file = "psycopg_binary-3.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:80a2337e2dfb26950894c8301358961430a0304f7bfe729d34cc036474e9c9b1"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:6d8f2144e0d5808c2e2aed40fbebe13869cd00c2ae745aca4b3b16a435edb056"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:94253be2b57ef2fea7ffe08996067aabf56a1eb9648342c9e3bad9e10c46e045"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fda0162b0dbfa5eaed6cdc708179fa27e148cb8490c7d62e5cf30713909658ea"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c0419cdad8c70eaeb3116bb28e7b42d546f91baf5179d7556f230d40942dc78"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:74fbf5dd3ef09beafd3557631e282f00f8af4e7a78fbfce8ab06d9cd5a789aae"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d784f614e4d53050cbe8abf2ae9d1aaacf8ed31ce57b42ce3bf2a48a66c3a5c"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4e76ce2475ed4885fe13b8254058be710ec0de74ebd8ef8224cf44a9a3358e5f"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5938b257b04c851c2d1e6cb2f8c18318f06017f35be9a5fe761ee1e2e344dfb7"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:257c4aea6f70a9aef39b2a77d0658a41bf05c243e2bf41895eb02220ac6306f3"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:06b5cc915e57621eebf2393f4173793ed7e3387295f07fed93ed3fb6a6ccf585"}, - {file = "psycopg_binary-3.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:09baa041856b35598d335b1a74e19a49da8500acedf78164600694c0ba8ce21b"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:48f8ca6ee8939bab760225b2ab82934d54330eec10afe4394a92d3f2a0c37dd6"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:5361ea13c241d4f0ec3f95e0bf976c15e2e451e9cc7ef2e5ccfc9d170b197a40"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb987f14af7da7c24f803111dbc7392f5070fd350146af3345103f76ea82e339"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0463a11b1cace5a6aeffaf167920707b912b8986a9c7920341c75e3686277920"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8b7be9a6c06518967b641fb15032b1ed682fd3b0443f64078899c61034a0bca6"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64a607e630d9f4b2797f641884e52b9f8e239d35943f51bef817a384ec1678fe"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:fa33ead69ed133210d96af0c63448b1385df48b9c0247eda735c5896b9e6dbbf"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:1f8b0d0e99d8e19923e6e07379fa00570be5182c201a8c0b5aaa9a4d4a4ea20b"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:709447bd7203b0b2debab1acec23123eb80b386f6c29e7604a5d4326a11e5bd6"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5e37d5027e297a627da3551a1e962316d0f88ee4ada74c768f6c9234e26346d9"}, - {file = "psycopg_binary-3.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:261f0031ee6074765096a19b27ed0f75498a8338c3dcd7f4f0d831e38adf12d1"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:41fdec0182efac66b27478ac15ef54c9ebcecf0e26ed467eb7d6f262a913318b"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:07d019a786eb020c0f984691aa1b994cb79430061065a694cf6f94056c603d26"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c57615791a337378fe5381143259a6c432cdcbb1d3e6428bfb7ce59fff3fb5c"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8eb9a4e394926b93ad919cad1b0a918e9b4c846609e8c1cfb6b743683f64da0"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5905729668ef1418bd36fbe876322dcb0f90b46811bba96d505af89e6fbdce2f"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd65774ed7d65101b314808b6893e1a75b7664f680c3ef18d2e5c84d570fa393"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:700679c02f9348a0d0a2adcd33a0275717cd0d0aee9d4482b47d935023629505"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96334bb64d054e36fed346c50c4190bad9d7c586376204f50bede21a913bf942"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:9099e443d4cc24ac6872e6a05f93205ba1a231b1a8917317b07c9ef2b955f1f4"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1985ab05e9abebfbdf3163a16ebb37fbc5d49aff2bf5b3d7375ff0920bbb54cd"}, - {file = "psycopg_binary-3.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:e90352d7b610b4693fad0feea48549d4315d10f1eba5605421c92bb834e90170"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:69320f05de8cdf4077ecd7fefdec223890eea232af0d58f2530cbda2871244a0"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4926ea5c46da30bec4a85907aa3f7e4ea6313145b2aa9469fdb861798daf1502"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c64c4cd0d50d5b2288ab1bcb26c7126c772bbdebdfadcd77225a77df01c4a57e"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05a1bdce30356e70a05428928717765f4a9229999421013f41338d9680d03a63"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ad357e426b0ea5c3043b8ec905546fa44b734bf11d33b3da3959f6e4447d350"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:967b47a0fd237aa17c2748fdb7425015c394a6fb57cdad1562e46a6eb070f96d"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:71db8896b942770ed7ab4efa59b22eee5203be2dfdee3c5258d60e57605d688c"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:2773f850a778575dd7158a6dd072f7925b67f3ba305e2003538e8831fec77a1d"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aeddf7b3b3f6e24ccf7d0edfe2d94094ea76b40e831c16eff5230e040ce3b76b"}, - {file = "psycopg_binary-3.2.3-cp38-cp38-win_amd64.whl", hash = "sha256:824c867a38521d61d62b60aca7db7ca013a2b479e428a0db47d25d8ca5067410"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:9994f7db390c17fc2bd4c09dca722fd792ff8a49bb3bdace0c50a83f22f1767d"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1303bf8347d6be7ad26d1362af2c38b3a90b8293e8d56244296488ee8591058e"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:842da42a63ecb32612bb7f5b9e9f8617eab9bc23bd58679a441f4150fcc51c96"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2bb342a01c76f38a12432848e6013c57eb630103e7556cf79b705b53814c3949"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd40af959173ea0d087b6b232b855cfeaa6738f47cb2a0fd10a7f4fa8b74293f"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9b60b465773a52c7d4705b0a751f7f1cdccf81dd12aee3b921b31a6e76b07b0e"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fc6d87a1c44df8d493ef44988a3ded751e284e02cdf785f746c2d357e99782a6"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:f0b018e37608c3bfc6039a1dc4eb461e89334465a19916be0153c757a78ea426"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2a29f5294b0b6360bfda69653697eff70aaf2908f58d1073b0acd6f6ab5b5a4f"}, - {file = "psycopg_binary-3.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:e56b1fd529e5dde2d1452a7d72907b37ed1b4f07fdced5d8fb1e963acfff6749"}, -] - -[[package]] -name = "pycparser" -version = "2.22" -description = "C parser in Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, - {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, -] - -[[package]] -name = "pyln-bolt7" -version = "1.0.246" -description = "BOLT7" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "pyln-bolt7-1.0.246.tar.gz", hash = "sha256:2b53744fa21c1b12d2c9c9df153651b122e38fa65d4a5c3f2957317ee148e089"}, - {file = "pyln_bolt7-1.0.246-py3-none-any.whl", hash = "sha256:54d48ec27fdc8751762cb068b0a9f2757a58fb57933c6d8f8255d02c27eb63c5"}, -] - -[[package]] -name = "pyln-client" -version = "24.11.1" -description = "Client library and plugin library for Core Lightning" -optional = false -python-versions = "<4.0,>=3.8" -files = [ - {file = "pyln_client-24.11.1-py3-none-any.whl", hash = "sha256:ee7523671c196603d87c21c743f3d6edb39841a447cd2dbf22745236bf86058e"}, - {file = "pyln_client-24.11.1.tar.gz", hash = "sha256:4cdaaa7b7cd4faba556fd29eee38f191d599f8860e6c76e49a400751430408dd"}, -] - -[package.dependencies] -pyln-bolt7 = ">=1.0" -pyln-proto = ">=23" - -[[package]] -name = "pyln-proto" -version = "24.5" -description = "This package implements some of the Lightning Network protocol in pure python. It is intended for protocol testing and some minor tooling only. It is not deemed secure enough to handle any amount of real funds (you have been warned!)." -optional = false -python-versions = "<4.0,>=3.8" -files = [ - {file = "pyln_proto-24.5-py3-none-any.whl", hash = "sha256:78b9982412cfea8172dfafe217001bdf3d6ee8d585f138b8868925e47a8c54b2"}, - {file = "pyln_proto-24.5.tar.gz", hash = "sha256:b6e7a0cd5bd3905d743ec2c3ef93233271062e0abf0b7647a449ff71c0f20074"}, -] - -[package.dependencies] -base58 = ">=2.1.1,<3.0.0" -bitstring = ">=4.1.0,<5.0.0" -coincurve = ">=18,<19" -cryptography = ">=41,<42" -PySocks = ">=1,<2" - -[[package]] -name = "pyotp" -version = "2.9.0" -description = "Python One Time Password Library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pyotp-2.9.0-py3-none-any.whl", hash = "sha256:81c2e5865b8ac55e825b0358e496e1d9387c811e85bb40e71a3b29b288963612"}, - {file = "pyotp-2.9.0.tar.gz", hash = "sha256:346b6642e0dbdde3b4ff5a930b664ca82abfa116356ed48cc42c7d6590d36f63"}, -] - -[package.extras] -test = ["coverage", "mypy", "ruff", "wheel"] - -[[package]] -name = "pysocks" -version = "1.7.1" -description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "PySocks-1.7.1-py27-none-any.whl", hash = "sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299"}, - {file = "PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5"}, - {file = "PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"}, -] - -[[package]] -name = "pytest" -version = "8.3.4" -description = "pytest: simple powerful testing with Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, - {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=1.5,<2" -tomli = {version = ">=1", markers = "python_version < \"3.11\""} - -[package.extras] -dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] - -[[package]] -name = "python-bitcoinrpc" -version = "1.0" -description = "Enhanced version of python-jsonrpc for use with Bitcoin" -optional = false -python-versions = "*" -files = [ - {file = "python-bitcoinrpc-1.0.tar.gz", hash = "sha256:a6a6f35672635163bc491c25fe29520bdd063dedbeda3b37bf5be97aa038c6e7"}, -] - -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, - {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "pytz" -version = "2024.2" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -files = [ - {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, - {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, -] - -[[package]] -name = "requests" -version = "2.32.3" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.8" -files = [ - {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, - {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "ruff" -version = "0.8.4" -description = "An extremely fast Python linter and code formatter, written in Rust." -optional = false -python-versions = ">=3.7" -files = [ - {file = "ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60"}, - {file = "ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac"}, - {file = "ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8"}, - {file = "ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835"}, - {file = "ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d"}, - {file = "ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08"}, - {file = "ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8"}, -] - -[[package]] -name = "setuptools" -version = "75.6.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.9" -files = [ - {file = "setuptools-75.6.0-py3-none-any.whl", hash = "sha256:ce74b49e8f7110f9bf04883b730f4765b774ef3ef28f722cce7c273d253aaf7d"}, - {file = "setuptools-75.6.0.tar.gz", hash = "sha256:8199222558df7c86216af4f84c30e9b34a61d8ba19366cc914424cdbd28252f6"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.7.0)"] -core = ["importlib_metadata (>=6)", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (>=1.12,<1.14)", "pytest-mypy"] - -[[package]] -name = "six" -version = "1.17.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, - {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, -] - -[[package]] -name = "sqlalchemy" -version = "2.0.36" -description = "Database Abstraction Library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "SQLAlchemy-2.0.36-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:59b8f3adb3971929a3e660337f5dacc5942c2cdb760afcabb2614ffbda9f9f72"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37350015056a553e442ff672c2d20e6f4b6d0b2495691fa239d8aa18bb3bc908"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8318f4776c85abc3f40ab185e388bee7a6ea99e7fa3a30686580b209eaa35c08"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c245b1fbade9c35e5bd3b64270ab49ce990369018289ecfde3f9c318411aaa07"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:69f93723edbca7342624d09f6704e7126b152eaed3cdbb634cb657a54332a3c5"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f9511d8dd4a6e9271d07d150fb2f81874a3c8c95e11ff9af3a2dfc35fe42ee44"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-win32.whl", hash = "sha256:c3f3631693003d8e585d4200730616b78fafd5a01ef8b698f6967da5c605b3fa"}, - {file = "SQLAlchemy-2.0.36-cp310-cp310-win_amd64.whl", hash = "sha256:a86bfab2ef46d63300c0f06936bd6e6c0105faa11d509083ba8f2f9d237fb5b5"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fd3a55deef00f689ce931d4d1b23fa9f04c880a48ee97af488fd215cf24e2a6c"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4f5e9cd989b45b73bd359f693b935364f7e1f79486e29015813c338450aa5a71"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0ddd9db6e59c44875211bc4c7953a9f6638b937b0a88ae6d09eb46cced54eff"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2519f3a5d0517fc159afab1015e54bb81b4406c278749779be57a569d8d1bb0d"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:59b1ee96617135f6e1d6f275bbe988f419c5178016f3d41d3c0abb0c819f75bb"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:39769a115f730d683b0eb7b694db9789267bcd027326cccc3125e862eb03bfd8"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-win32.whl", hash = "sha256:66bffbad8d6271bb1cc2f9a4ea4f86f80fe5e2e3e501a5ae2a3dc6a76e604e6f"}, - {file = "SQLAlchemy-2.0.36-cp311-cp311-win_amd64.whl", hash = "sha256:23623166bfefe1487d81b698c423f8678e80df8b54614c2bf4b4cfcd7c711959"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f7b64e6ec3f02c35647be6b4851008b26cff592a95ecb13b6788a54ef80bbdd4"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:46331b00096a6db1fdc052d55b101dbbfc99155a548e20a0e4a8e5e4d1362855"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdf3386a801ea5aba17c6410dd1dc8d39cf454ca2565541b5ac42a84e1e28f53"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac9dfa18ff2a67b09b372d5db8743c27966abf0e5344c555d86cc7199f7ad83a"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:90812a8933df713fdf748b355527e3af257a11e415b613dd794512461eb8a686"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1bc330d9d29c7f06f003ab10e1eaced295e87940405afe1b110f2eb93a233588"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-win32.whl", hash = "sha256:79d2e78abc26d871875b419e1fd3c0bca31a1cb0043277d0d850014599626c2e"}, - {file = "SQLAlchemy-2.0.36-cp312-cp312-win_amd64.whl", hash = "sha256:b544ad1935a8541d177cb402948b94e871067656b3a0b9e91dbec136b06a2ff5"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b5cc79df7f4bc3d11e4b542596c03826063092611e481fcf1c9dfee3c94355ef"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3c01117dd36800f2ecaa238c65365b7b16497adc1522bf84906e5710ee9ba0e8"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9bc633f4ee4b4c46e7adcb3a9b5ec083bf1d9a97c1d3854b92749d935de40b9b"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e46ed38affdfc95d2c958de328d037d87801cfcbea6d421000859e9789e61c2"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b2985c0b06e989c043f1dc09d4fe89e1616aadd35392aea2844f0458a989eacf"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a121d62ebe7d26fec9155f83f8be5189ef1405f5973ea4874a26fab9f1e262c"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-win32.whl", hash = "sha256:0572f4bd6f94752167adfd7c1bed84f4b240ee6203a95e05d1e208d488d0d436"}, - {file = "SQLAlchemy-2.0.36-cp313-cp313-win_amd64.whl", hash = "sha256:8c78ac40bde930c60e0f78b3cd184c580f89456dd87fc08f9e3ee3ce8765ce88"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:be9812b766cad94a25bc63bec11f88c4ad3629a0cec1cd5d4ba48dc23860486b"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50aae840ebbd6cdd41af1c14590e5741665e5272d2fee999306673a1bb1fdb4d"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4557e1f11c5f653ebfdd924f3f9d5ebfc718283b0b9beebaa5dd6b77ec290971"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:07b441f7d03b9a66299ce7ccf3ef2900abc81c0db434f42a5694a37bd73870f2"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:28120ef39c92c2dd60f2721af9328479516844c6b550b077ca450c7d7dc68575"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-win32.whl", hash = "sha256:b81ee3d84803fd42d0b154cb6892ae57ea6b7c55d8359a02379965706c7efe6c"}, - {file = "SQLAlchemy-2.0.36-cp37-cp37m-win_amd64.whl", hash = "sha256:f942a799516184c855e1a32fbc7b29d7e571b52612647866d4ec1c3242578fcb"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3d6718667da04294d7df1670d70eeddd414f313738d20a6f1d1f379e3139a545"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:72c28b84b174ce8af8504ca28ae9347d317f9dba3999e5981a3cd441f3712e24"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b11d0cfdd2b095e7b0686cf5fabeb9c67fae5b06d265d8180715b8cfa86522e3"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e32092c47011d113dc01ab3e1d3ce9f006a47223b18422c5c0d150af13a00687"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6a440293d802d3011028e14e4226da1434b373cbaf4a4bbb63f845761a708346"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c54a1e53a0c308a8e8a7dffb59097bff7facda27c70c286f005327f21b2bd6b1"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-win32.whl", hash = "sha256:1e0d612a17581b6616ff03c8e3d5eff7452f34655c901f75d62bd86449d9750e"}, - {file = "SQLAlchemy-2.0.36-cp38-cp38-win_amd64.whl", hash = "sha256:8958b10490125124463095bbdadda5aa22ec799f91958e410438ad6c97a7b793"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dc022184d3e5cacc9579e41805a681187650e170eb2fd70e28b86192a479dcaa"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b817d41d692bf286abc181f8af476c4fbef3fd05e798777492618378448ee689"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4e46a888b54be23d03a89be510f24a7652fe6ff660787b96cd0e57a4ebcb46d"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4ae3005ed83f5967f961fd091f2f8c5329161f69ce8480aa8168b2d7fe37f06"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:03e08af7a5f9386a43919eda9de33ffda16b44eb11f3b313e6822243770e9763"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb986bad3ed5ceaf090200eba750b5245150bd97d3e67343a3cfed06feecf7"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-win32.whl", hash = "sha256:9fe53b404f24789b5ea9003fc25b9a3988feddebd7e7b369c8fac27ad6f52f28"}, - {file = "SQLAlchemy-2.0.36-cp39-cp39-win_amd64.whl", hash = "sha256:af148a33ff0349f53512a049c6406923e4e02bf2f26c5fb285f143faf4f0e46a"}, - {file = "SQLAlchemy-2.0.36-py3-none-any.whl", hash = "sha256:fddbe92b4760c6f5d48162aef14824add991aeda8ddadb3c31d56eb15ca69f8e"}, - {file = "sqlalchemy-2.0.36.tar.gz", hash = "sha256:7f2767680b6d2398aea7082e45a774b2b0767b5c8d8ffb9c8b683088ea9b29c5"}, -] - -[package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} -typing-extensions = ">=4.6.0" - -[package.extras] -aiomysql = ["aiomysql (>=0.2.0)", "greenlet (!=0.4.17)"] -aioodbc = ["aioodbc", "greenlet (!=0.4.17)"] -aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing_extensions (!=3.10.0.1)"] -asyncio = ["greenlet (!=0.4.17)"] -asyncmy = ["asyncmy (>=0.2.3,!=0.2.4,!=0.2.6)", "greenlet (!=0.4.17)"] -mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2,!=1.1.5,!=1.1.10)"] -mssql = ["pyodbc"] -mssql-pymssql = ["pymssql"] -mssql-pyodbc = ["pyodbc"] -mypy = ["mypy (>=0.910)"] -mysql = ["mysqlclient (>=1.4.0)"] -mysql-connector = ["mysql-connector-python"] -oracle = ["cx_oracle (>=8)"] -oracle-oracledb = ["oracledb (>=1.0.1)"] -postgresql = ["psycopg2 (>=2.7)"] -postgresql-asyncpg = ["asyncpg", "greenlet (!=0.4.17)"] -postgresql-pg8000 = ["pg8000 (>=1.29.1)"] -postgresql-psycopg = ["psycopg (>=3.0.7)"] -postgresql-psycopg2binary = ["psycopg2-binary"] -postgresql-psycopg2cffi = ["psycopg2cffi"] -postgresql-psycopgbinary = ["psycopg[binary] (>=3.0.7)"] -pymysql = ["pymysql"] -sqlcipher = ["sqlcipher3_binary"] - -[[package]] -name = "sseclient" -version = "0.0.27" -description = "Python client library for reading Server Sent Event streams." -optional = false -python-versions = "*" -files = [ - {file = "sseclient-0.0.27.tar.gz", hash = "sha256:b2fe534dcb33b1d3faad13d60c5a7c718e28f85987f2a034ecf5ec279918c11c"}, -] - -[package.dependencies] -requests = ">=2.9" -six = "*" - -[[package]] -name = "strenum" -version = "0.4.15" -description = "An Enum that inherits from str." -optional = false -python-versions = "*" -files = [ - {file = "StrEnum-0.4.15-py3-none-any.whl", hash = "sha256:a30cda4af7cc6b5bf52c8055bc4bf4b2b6b14a93b574626da33df53cf7740659"}, - {file = "StrEnum-0.4.15.tar.gz", hash = "sha256:878fb5ab705442070e4dd1929bb5e2249511c0bcf2b0eeacf3bcd80875c82eff"}, -] - -[package.extras] -docs = ["myst-parser[linkify]", "sphinx", "sphinx-rtd-theme"] -release = ["twine"] -test = ["pylint", "pytest", "pytest-black", "pytest-cov", "pytest-pylint"] - -[[package]] -name = "tomli" -version = "2.2.1" -description = "A lil' TOML parser" -optional = false -python-versions = ">=3.8" -files = [ - {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, - {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, - {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, - {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, - {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, - {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, - {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, - {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, - {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, - {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, - {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, - {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, - {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, - {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, - {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, - {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, - {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, - {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, -] - -[[package]] -name = "typing-extensions" -version = "4.12.2" -description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false -python-versions = ">=3.8" -files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, -] - -[[package]] -name = "tzdata" -version = "2024.2" -description = "Provider of IANA time zone data" -optional = false -python-versions = ">=2" -files = [ - {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, - {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, -] - -[[package]] -name = "urllib3" -version = "2.3.0" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.9" -files = [ - {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, - {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - -[metadata] -lock-version = "2.0" -python-versions = ">=3.10,<3.13" -content-hash = "1307157f27650316884aef723fc29bc8932663277045660f812ccfbe6bcdd85e" diff --git a/tools/pyproject.toml b/tools/pyproject.toml deleted file mode 100644 index d17519eb..00000000 --- a/tools/pyproject.toml +++ /dev/null @@ -1,45 +0,0 @@ -[tool.poetry] -name = "plugins" -version = "0.1.0" -description = "" -authors = ["michael1011 "] - -[tool.poetry.dependencies] -python = ">=3.10,<3.13" -python-bitcoinrpc = "^1.0" -pyotp = "^2.8.0" -sseclient = "^0.0.27" -ruff = "^0.8.4" -pyln-client = "^24.8.2" -bolt11 = "^2.1.0" -grpcio = "^1.67.1" -grpcio-tools = "^1.67.1" -grpc-interceptor = "^0.15.4" -psycopg = { version = "^3.2.3", extras = ["binary"] } -sqlalchemy = "^2.0.36" -cachetools = "^5.5.0" -pandas = "^2.2.3" -strenum = "^0.4.15" -cryptography = "^41" - -[tool.poetry.group.test.dependencies] -pytest = "^8.3.4" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - -[tool.ruff] -exclude = ["plugins/hold/protos", "plugins/mpay/protos"] -line-length = 100 - -[tool.ruff.lint] -select = ["ALL"] -ignore = [ - "T201", "D101", "D211", "D213", "INP001", "BLE001", "FBT001", "FBT002", "FBT003", "S605", - "TD002", "TD003", "D102", "D103", "D107", "D100", "SLOT000", "S101", "FIX002", "S311", "UP035", - "PLR2004", "ARG001", "PLR0913", "D104", "FA102", "COM812", "UP032", "ISC001", "A003", "D203" -] - -[tool.ruff.format] -quote-style = "double" diff --git a/tools/sse.py b/tools/sse.py deleted file mode 100755 index b0df57d8..00000000 --- a/tools/sse.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 -"""Listen to Server-Send events via the CLI.""" - -from argparse import ArgumentParser - -from sseclient import SSEClient - - -def stream_server_side_events(url: str) -> None: - """Listen to a stream of events and prints them to the console.""" - print(f"Listening to: {url}") - - try: - client = SSEClient(url) - - for message in client: - print(message) - - except KeyboardInterrupt: - print("Cancelling stream") - - except Exception as exception: - print(f"Could not listen to {url}: {exception}") - - -if __name__ == "__main__": - PARSER = ArgumentParser(description="Stream Server-Sent events") - - # CLI arguments - PARSER.add_argument( - "url", - help="URL of the Server-Sent event stream", - type=str, - nargs=1, - ) - - ARGS = PARSER.parse_args() - - stream_server_side_events(ARGS.url[0]) diff --git a/tools/stats.sql b/tools/stats.sql deleted file mode 100644 index 202485c5..00000000 --- a/tools/stats.sql +++ /dev/null @@ -1,184 +0,0 @@ --- Views - -CREATE OR REPLACE VIEW successfulSwaps AS ( - SELECT - id, - pair, - status, - referral, - fee, - CASE WHEN "orderSide" = 1 - THEN "invoiceAmount" - ELSE "onchainAmount" - END AS amount, - "createdAt" - FROM swaps - WHERE pair IN ('BTC/BTC', 'L-BTC/BTC') AND - status = 'transaction.claimed' -); - -CREATE OR REPLACE VIEW successReverseSwaps AS ( - SELECT - id, - pair, - status, - referral, - fee, - CASE WHEN "orderSide" = 1 - THEN "onchainAmount" - ELSE "invoiceAmount" - END AS amount, - "createdAt" - FROM "reverseSwaps" - WHERE pair IN ('BTC/BTC', 'L-BTC/BTC') AND - status = 'invoice.settled' -); - --- Taproot - -WITH allSwaps AS ( - SELECT 'swaps' AS type, pair, version, "createdAt" - FROM swaps - WHERE status = 'transaction.claimed' - UNION - SELECT 'reverse' AS type, pair, version, "createdAt" - FROM "reverseSwaps" - WHERE status = 'invoice.settled' -), postTaproot AS ( - SELECT - EXTRACT(YEAR FROM "createdAt") AS year, - EXTRACT(MONTH FROM "createdAt") AS month, - EXTRACT(DAY FROM "createdAt") AS day, - type, - pair, - version, - COUNT(*) AS count - FROM allSwaps - WHERE "createdAt" >= ( - SELECT MIN("createdAt") FROM allSwaps WHERE version = 1 - ) - GROUP BY - EXTRACT(YEAR FROM "createdAt"), - EXTRACT(MONTH FROM "createdAt"), - EXTRACT(DAY FROM "createdAt"), - type, - pair, - version -) -SELECT - year, - month, - day, - type, - pair, - SUM(count) as count, - SUM(CASE WHEN version = 1 THEN count ELSE 0 END) as count_taproot, - 100.0 * SUM(CASE WHEN version = 1 THEN count ELSE 0 END) / - NULLIF(SUM(count), 0) as taproot_percentage -FROM postTaproot -GROUP BY GROUPING SETS ( - (year, month), - (year, month, day), - (year, month, day, type), - (year, month, day, type, pair) -) -ORDER BY year, month, day NULLS FIRST, type NULLS FIRST, pair NULLS FIRST; - --- --- Stats --- - --- Volume - -WITH data AS ( - SELECT * FROM successfulSwaps - UNION ALL - SELECT * FROM successReverseSwaps -) -SELECT - EXTRACT(YEAR FROM "createdAt") AS year, - EXTRACT(MONTH FROM "createdAt") AS month, - pair, - SUM(amount) / POW(10, 8) AS sum -FROM data -GROUP BY GROUPING SETS ( - (), - (year), - (year, month), - (year, month, pair) -) -ORDER BY - year NULLS FIRST, - month NULLS FIRST, - pair NULLS FIRST; - --- Referrals - -WITH data AS ( - SELECT pair, status, fee, referral, "createdAt" FROM successfulSwaps - UNION ALL - SELECT pair, status, fee, referral, "createdAt" FROM successReverseSwaps -) -SELECT - EXTRACT(YEAR from data."createdAt") AS year, - EXTRACT(MONTH from data."createdAt") AS month, - pair, - data.referral as referral, - COUNT(*) AS count, - (SUM(data.fee * r."feeShare") / 100)::BIGINT AS sum -FROM data - INNER JOIN referrals r ON data.referral = r.id -GROUP BY GROUPING SETS ( - (year, month, data.referral), - (year, month, pair, data.referral) -) -ORDER BY year, month, pair NULLS FIRST, referral; - --- Volume shares - -WITH successful AS ( - SELECT - pair, - EXTRACT(YEAR FROM "createdAt") AS year, - EXTRACT(MONTH FROM "createdAt") AS month, - COUNT(*) AS count, - SUM(amount) / POW(10, 8) AS volume - FROM (SELECT * FROM successfulSwaps UNION SELECT * FROM successReverseSwaps) as allSwaps - GROUP BY pair, year, month -) -SELECT - year AS year, - month AS month, - pair AS pair, - SUM(count) AS count, - SUM(count) * 100 / SUM(SUM(count)) OVER (PARTITION BY year, month) AS count_pct, - SUM(volume) AS volume, - SUM(volume) * 100 / SUM(SUM(volume)) OVER (PARTITION BY year, month) AS volume_pct -FROM successful -GROUP BY year, month, pair -ORDER BY year, month, pair NULLS FIRST; - --- Marked swaps - -WITH swaps AS ( - SELECT s.id AS id, fee, s."createdAt" AS "createdAt" - FROM successfulSwaps s INNER JOIN "markedSwaps" m ON s.id = m.id -), reverseSwaps as ( - SELECT s.id AS id, fee, s."createdAt" AS "createdAt" - FROM successReverseSwaps s INNER JOIN "markedSwaps" m ON s.id = m.id -), marked AS ( - SELECT * - FROM swaps UNION ALL SELECT * FROM reverseSwaps -) -SELECT - EXTRACT(YEAR FROM "createdAt") AS year, - EXTRACT(MONTH FROM "createdAt") AS month, - EXTRACT(DAY FROM "createdAt") AS day, - SUM(fee) AS revenue -FROM marked -GROUP BY GROUPING SETS ( - (year, month, day), - (year, month), - (year) -) -ORDER BY year, month NULLS LAST, day NULLS LAST;