Skip to main content

ListAutopilotFeatures

ListAutopilotFeatures fetches all the features supported by the Autopilot server along with the rules that we need to support in order to subscribe to those features.

Source: lit-autopilot.proto

gRPC

rpc ListAutopilotFeatures (ListAutopilotFeaturesRequest) returns (ListAutopilotFeaturesResponse);

REST

HTTP MethodPath
GET /v1/autopilot/features

Code Samples

const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');

const GRPC_HOST = 'localhost:8443'
const MACAROON_PATH = 'LIT_DIR/regtest/lit.macaroon'
const TLS_PATH = 'LIT_DIR/tls.cert'

const loaderOptions = {
keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true,
};
const packageDefinition = protoLoader.loadSync('lit-autopilot.proto', loaderOptions);
const litrpc = grpc.loadPackageDefinition(packageDefinition).litrpc;
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const tlsCert = fs.readFileSync(TLS_PATH);
const sslCreds = grpc.credentials.createSsl(tlsCert);
const macaroon = fs.readFileSync(MACAROON_PATH).toString('hex');
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
let metadata = new grpc.Metadata();
metadata.add('macaroon', macaroon);
callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
let client = new litrpc.Autopilot(GRPC_HOST, creds);
let request = {};
client.listAutopilotFeatures(request, function(err, response) {
console.log(response);
});
// Console output:
// {
// "features": <FeaturesEntry>,
// }

Messages

litrpc.ListAutopilotFeaturesRequest

Source: lit-autopilot.proto

note

This request has no parameters.

litrpc.ListAutopilotFeaturesResponse

Source: lit-autopilot.proto

FieldgRPC TypeREST Type
features
FeaturesEntry[]object

Nested Messages

litrpc.ChannelPolicyBounds

FieldgRPC TypeREST Type
min_base_msat
uint64string
max_base_msat
uint64string
min_rate_ppm
uint32integer
max_rate_ppm
uint32integer
min_cltv_delta
uint32integer
max_cltv_delta
uint32integer
min_htlc_msat
uint64string
max_htlc_msat
uint64string

litrpc.ChannelRestrict

FieldgRPC TypeREST Type
channel_ids
uint64[]array

litrpc.Feature

FieldgRPC TypeREST Type
name
stringstring
description
stringstring
rules
RulesEntry[]object
permissions_list
Permissions[]array
requires_upgrade
boolboolean
default_config
stringstring
privacy_flags
uint64string

litrpc.Feature.RulesEntry

FieldgRPC TypeREST Type
key
stringunknown
value
RuleValuesunknown

litrpc.HistoryLimit

FieldgRPC TypeREST Type
start_time
uint64string
duration
uint64string

litrpc.ListAutopilotFeaturesResponse.FeaturesEntry

FieldgRPC TypeREST Type
key
stringunknown
value
Featureunknown

litrpc.MacaroonPermission

FieldgRPC TypeREST Type
entity
stringstring
action
stringstring

litrpc.OffChainBudget

FieldgRPC TypeREST Type
max_amt_msat
uint64string
max_fees_msat
uint64string

litrpc.OnChainBudget

FieldgRPC TypeREST Type
absolute_amt_sats
uint64string
max_sat_per_v_byte
uint64string

litrpc.PeerRestrict

FieldgRPC TypeREST Type
peer_ids
string[]array

litrpc.Permissions

FieldgRPC TypeREST Type
method
stringstring
operations
MacaroonPermission[]array

litrpc.Rate

FieldgRPC TypeREST Type
iterations
uint32integer
num_hours
uint32integer

litrpc.RateLimit

FieldgRPC TypeREST Type
read_limit
Rateobject
write_limit
Rateobject

litrpc.RuleValue

FieldgRPC TypeREST Type
rate_limit
RateLimitobject
chan_policy_bounds
ChannelPolicyBoundsobject
history_limit
HistoryLimitobject
off_chain_budget
OffChainBudgetobject
on_chain_budget
OnChainBudgetobject
send_to_self
SendToSelfobject
channel_restrict
ChannelRestrictobject
peer_restrict
PeerRestrictobject

litrpc.RuleValues

FieldgRPC TypeREST Type
known
boolboolean
defaults
RuleValueobject
min_value
RuleValueobject
max_value
RuleValueobject

litrpc.SendToSelf

note

This response has no parameters.