Merge pull request #11065 from ellemouton/agent/walletrpc-create-account
What changed, and why it matters
This commit adds a new, clearly marked experimental RPC and command-line option called XCreateAccount that lets an LND user create a separate, named pocket of on-chain funds within the same wallet. It is not a security patch and does not fix a vulnerability. The main risk is user error: money sent to one of these accounts cannot be found again with only the wallet seed, so the user must separately save extra recovery details. The feature is gated behind an explicit 'I know what I am doing' flag on release builds to reduce accidental misuse.
No urgent action. Operators should treat this as a new experimental feature with recovery caveats. If running a node with untrusted RPC access, review macaroon permissions because the new RPC creates wallet state and derives keys; restrict access appropriately. Users who create such an account must securely record the derivation path, key scope, account index, and issued address count alongside their seed.
Security signals we found
New RPC adds wallet account-creation surface area
Feature is explicitly experimental and gated by i_know_what_i_am_doing on release builds
Documentation warns that seed-only restore does not recover these accounts
Server-side rejections for duplicate, reserved, empty names and unsupported address schema
No vulnerability fix, bounds check, authentication change, or cryptographic hardening visible
Evidence from the diff
The change introduces walletrpc.XCreateAccount and the lncli ‘wallet accounts create’ command. It wires a new btcwallet account-creation path through lnd’s wallet controller interfaces, adds proto/gRPC/REST/JSON bindings, and includes integration tests. The server rejects duplicate names, reserved names, empty names, and the strict nested-witness schema. On release builds the RPC requires i_know_what_i_am_doing=true. The documentation and CLI warnings repeatedly note that seed-only recovery will not rediscover these accounts because btcwallet’s recovery manager only scans the default account. No vulnerability, bug fix, or security patch is present in the diff.
Changed components
lnrpc/walletrpc/walletkit.protolnrpc/walletrpc/walletkit_server.golnrpc/walletrpc/walletkit.pb.golnrpc/walletrpc/walletkit.pb.gw.golnrpc/walletrpc/walletkit.pb.json.gocmd/commands/walletrpc_active.golnwallet/btcwallet/btcwallet.golnwallet/interface.golnwallet/rpcwallet/rpcwallet.goitest/lnd_wallet_xcreate_account.goInspect captured patch +1879 / −319
### cmd/commands/walletrpc_active.go
@@ -11,6 +11,7 @@ import (
"errors"
"fmt"
"math"
+ "os"
"sort"
"strconv"
"strings"
@@ -49,6 +50,7 @@ var (
Usage: "Interact with wallet accounts.",
Subcommands: []cli.Command{
listAccountsCommand,
+ createAccountCommand,
importAccountCommand,
importPubKeyCommand,
},
@@ -1873,6 +1875,103 @@ func listLeases(ctx *cli.Context) error {
return nil
}
+var createAccountCommand = cli.Command{
+ Name: "create",
+ Usage: "Create a new on-chain wallet account (experimental).",
+ ArgsUsage: "name",
+ Description: `
+ Creates a new named account within the wallet, deriving the account's
+ keys from the wallet's master key.
+
+ This wraps the experimental XCreateAccount RPC: the X prefix marks it
+ as an API that may change or be removed without the usual deprecation
+ period, and it is gated as described below until recovery handles
+ these accounts.
+
+ Unlike 'accounts import', which registers a watch-only account from an
+ extended public key, the account created here is fully owned by the
+ wallet: it derives its own addresses and can sign for its own outputs.
+ Coin selection, change, balance and address derivation can then all be
+ scoped to the account by passing its name, which makes it usable as an
+ isolated pocket of funds inside a single wallet.
+
+ The address type permanently fixes the key scope the account lives in,
+ and therefore the address type of both its receive and its change
+ outputs. It defaults to taproot and cannot be changed afterwards.
+
+ IMPORTANT: funds held in an account created here are NOT found by a
+ seed-only restore, because the wallet's recovery scan only rederives
+ addresses for the default account. Recovering them additionally
+ requires the account's key scope and index, and re-deriving the
+ addresses it had issued, before rescanning. Record the derivation path
+ printed below alongside your seed before depositing to this account.
+ `,
+ Flags: []cli.Flag{
+ cli.StringFlag{
+ Name: "address_type",
+ Usage: "(optional) the address type the " +
+ "account holds, one of: p2wkh, " +
+ "np2wkh-p2wkh, p2tr; defaults to p2tr",
+ },
+ cli.BoolFlag{
+ Name: "i_know_what_i_am_doing",
+ Usage: "required on a release build, " +
+ "confirming you accept that a seed-only " +
+ "restore will not rediscover this " +
+ "account's funds",
+ },
+ },
+ Action: actionDecorator(createAccount),
+}
+
+func createAccount(ctx *cli.Context) error {
+ ctxc := getContext()
+
+ // Display the command's help message if we do not have the expected
+ // number of arguments/flags.
+ if ctx.NArg() != 1 || ctx.NumFlags() > 2 {
+ return cli.ShowCommandHelp(ctx, "create")
+ }
+
+ addrType, err := parseAddrType(ctx.String("address_type"))
+ if err != nil {
+ return err
+ }
+
+ // The server always refuses this one, since a wallet-derived account
+ // carries no address schema and would silently behave as the hybrid
+ // scheme. Say so here rather than spending a round trip on it.
+ if addrType == walletrpc.AddressType_NESTED_WITNESS_PUBKEY_HASH {
+ return errors.New("np2wkh accounts cannot be created; a " +
+ "wallet-derived account of that key scope provides " +
+ "the hybrid scheme, so use np2wkh-p2wkh instead")
+ }
+
+ walletClient, cleanUp := getWalletClient(ctx)
+ defer cleanUp()
+
+ req := &walletrpc.XCreateAccountRequest{
+ Name: ctx.Args().First(),
+ AddressType: addrType,
+ IKnowWhatIAmDoing: ctx.Bool("i_know_what_i_am_doing"),
+ }
+ resp, err := walletClient.XCreateAccount(ctxc, req)
+ if err != nil {
+ return err
+ }
+
+ printRespJSON(resp)
+
+ // The derivation path in the response is what a later recovery needs,
+ // so point at it here rather than only in the command's help text:
+ // this is the one moment the operator is looking at it.
+ _, _ = fmt.Fprintf(os.Stderr, "\nNOTE: a seed-only restore will not "+
+ "find funds in this account. Record its derivation path "+
+ "(above) with your seed before depositing.\n")
+
+ return nil
+}
+
var listAccountsCommand = cli.Command{
Name: "list",
Usage: "Retrieve information of existing on-chain wallet accounts.",
### docs/release-notes/release-notes-0.22.0.md
@@ -72,6 +72,23 @@
the chain backend via bitcoind's `submitpackage`, allowing a zero-fee v3/TRUC
parent to be accepted together with a fee-paying CPFP child.
+* A new [`walletrpc.XCreateAccount`](https://github.com/lightningnetwork/lnd/pull/11065)
+ RPC creates a named wallet account whose keys are derived from the wallet's
+ master key. Unlike `ImportAccount`, which registers a watch-only account from
+ an extended public key, the resulting account can sign for its own outputs, so
+ a single wallet can be partitioned into isolated pockets of funds: coin
+ selection, change, balance and address derivation can all be scoped to an
+ account by name.
+
+ The RPC is **experimental**, which the `X` prefix marks: it may change or be
+ removed without the usual deprecation period. It is additionally gated on
+ release builds, where a caller must set `i_know_what_i_am_doing`, following
+ the same pattern as `AbandonChannel`. A seed-only restore does not rediscover
+ funds held in an account created this way, because the recovery scan only
+ rederives addresses for the default account, and reconstructing one by hand
+ requires reproducing its key scope, its account index and the addresses it
+ had issued. Both gates come off once recovery handles these accounts.
+
## lncli Additions
* The `estimateroutefee` command now supports [restricting fee estimates to
@@ -84,6 +101,10 @@
command submits a package of hex-encoded transactions via the new
`SubmitPackage` RPC.
+* A new [`wallet accounts create`](https://github.com/lightningnetwork/lnd/pull/11065)
+ command creates a wallet-owned named account via the new `XCreateAccount`
+ RPC.
+
# Improvements
## Functional Updates
### itest/lnd_wallet.go
@@ -12,6 +12,14 @@ import (
// walletTestCases defines a set of tests aiming at asserting functionalities
// provided by the wallerpc.
var walletTestCases = []*lntest.TestCase{
+ {
+ Name: "xcreate account",
+ TestFunc: testXCreateAccount,
+ },
+ {
+ Name: "xcreate account rejections",
+ TestFunc: testXCreateAccountRejections,
+ },
{
Name: "listunspent P2WPKH",
TestFunc: func(ht *lntest.HarnessTest) {
### itest/lnd_wallet_xcreate_account.go
@@ -0,0 +1,190 @@
+package itest
+
+import (
+ "github.com/btcsuite/btcd/btcutil/v2"
+ "github.com/btcsuite/btcd/wire/v2"
+ "github.com/lightningnetwork/lnd/lnrpc"
+ "github.com/lightningnetwork/lnd/lnrpc/walletrpc"
+ "github.com/lightningnetwork/lnd/lntest"
+ "github.com/lightningnetwork/lnd/lnwallet"
+ "github.com/stretchr/testify/require"
+)
+
+const (
+ // createAccountName is the account these tests create and spend from.
+ createAccountName = "custom"
+
+ // defaultCreateAccountFeeRate is the sat/vB rate the miner uses when
+ // funding the account under test.
+ defaultCreateAccountFeeRate = btcutil.Amount(10)
+
+ // maxCreateAccountSpendFee bounds what the account's own spend may
+ // cost. The transaction is one input and two outputs at 5 sat/vB, so
+ // a few thousand sats is a generous ceiling; the point is only to
+ // distinguish "paid a fee" from "the money went somewhere else".
+ maxCreateAccountSpendFee = btcutil.Amount(10_000)
+)
+
+// testXCreateAccount asserts the end-to-end behaviour of an account created
+// from the wallet's own master key: it is not watch-only, its funds are
+// reported against it rather than the default account, and — the property
+// that distinguishes it from an imported account — the wallet can sign for
+// it.
+func testXCreateAccount(ht *lntest.HarnessTest) {
+ alice := ht.NewNode("Alice", nil)
+
+ account := alice.RPC.XCreateAccount(&walletrpc.XCreateAccountRequest{
+ Name: createAccountName,
+ AddressType: walletrpc.AddressType_TAPROOT_PUBKEY,
+ }).GetAccount()
+
+ require.Equal(ht, createAccountName, account.GetName())
+ require.Equal(
+ ht, walletrpc.AddressType_TAPROOT_PUBKEY,
+ account.GetAddressType(),
+ )
+
+ // The whole point of this RPC: unlike an imported account, the wallet
+ // holds the keys, so it can spend what the account receives.
+ require.False(ht, account.GetWatchOnly(), "account must be spendable")
+
+ // It shows up in ListAccounts under the scope it was created in.
+ listed := alice.RPC.ListAccounts(&walletrpc.ListAccountsRequest{
+ Name: createAccountName,
+ AddressType: walletrpc.AddressType_TAPROOT_PUBKEY,
+ }).GetAccounts()
+ require.Len(ht, listed, 1)
+ require.Equal(ht, account.GetExtendedPublicKey(),
+ listed[0].GetExtendedPublicKey())
+
+ // Fund an address belonging to the new account. The address type has
+ // to match the one the account was created with: lnd resolves a custom
+ // account name inside the key scope the requested type implies.
+ addr := alice.RPC.NewAddress(&lnrpc.NewAddressRequest{
+ Type: lnrpc.AddressType_TAPROOT_PUBKEY,
+ Account: createAccountName,
+ }).GetAddress()
+
+ const fundAmt = btcutil.Amount(500_000)
+ ht.SendOutputsWithoutChange(
+ []*wire.TxOut{{
+ Value: int64(fundAmt),
+ PkScript: ht.PayToAddrScript(ht.DecodeAddress(addr)),
+ }}, defaultCreateAccountFeeRate,
+ )
+ ht.MineBlocksAndAssertNumTxes(1, 1)
+
+ // The balance lands in the new account, and nowhere else. Both halves
+ // matter: the account must see its own coins, and the default account
+ // must not see them.
+ ht.AssertWalletAccountBalance(
+ alice, createAccountName, int64(fundAmt), 0,
+ )
+ ht.AssertWalletAccountBalance(
+ alice, lnwallet.DefaultAccountName, 0, 0,
+ )
+
+ // Now prove the wallet can actually spend it. An imported (watch-only)
+ // account gets this far too — funding a PSBT only needs public data —
+ // but finalizing is where it fails, because the wallet has no private
+ // key for it and silently signs nothing.
+ dest := alice.RPC.NewAddress(&lnrpc.NewAddressRequest{
+ Type: lnrpc.AddressType_TAPROOT_PUBKEY,
+ Account: createAccountName,
+ }).GetAddress()
+
+ funded := alice.RPC.FundPsbt(&walletrpc.FundPsbtRequest{
+ Template: &walletrpc.FundPsbtRequest_Raw{
+ Raw: &walletrpc.TxTemplate{
+ Outputs: map[string]uint64{
+ dest: uint64(fundAmt / 2),
+ },
+ },
+ },
+ Fees: &walletrpc.FundPsbtRequest_SatPerVbyte{
+ SatPerVbyte: 5,
+ },
+ Account: createAccountName,
+ })
+
+ finalized := alice.RPC.FinalizePsbt(&walletrpc.FinalizePsbtRequest{
+ FundedPsbt: funded.GetFundedPsbt(),
+ Account: createAccountName,
+ })
+ require.NotEmpty(ht, finalized.GetRawFinalTx(),
+ "wallet produced no signed transaction for its own account")
+
+ alice.RPC.PublishTransaction(&walletrpc.Transaction{
+ TxHex: finalized.GetRawFinalTx(),
+ })
+ ht.MineBlocksAndAssertNumTxes(1, 1)
+
+ // The spend confirmed, and both halves of where the money went matter.
+ // The account still holds its funds minus fees, which is what shows
+ // the inputs were spent from it and the change came back to it rather
+ // than leaking elsewhere; and the default account is still empty,
+ // which shows "elsewhere" was not it.
+ accounts := alice.RPC.WalletBalance().GetAccountBalance()
+ after := btcutil.Amount(
+ accounts[createAccountName].GetConfirmedBalance(),
+ )
+ require.Less(ht, after, fundAmt, "the spend should have paid a fee")
+ require.Greater(ht, after, fundAmt-maxCreateAccountSpendFee,
+ "the account should still hold its funds minus fees")
+
+ ht.AssertWalletAccountBalance(
+ alice, lnwallet.DefaultAccountName, 0, 0,
+ )
+}
+
+// testXCreateAccountRejections asserts the requests lnd refuses, each of which
+// would otherwise leave the caller with an account that does not behave the
+// way it asked for.
+func testXCreateAccountRejections(ht *lntest.HarnessTest) {
+ alice := ht.NewNode("Alice", nil)
+
+ alice.RPC.XCreateAccount(&walletrpc.XCreateAccountRequest{
+ Name: createAccountName,
+ AddressType: walletrpc.AddressType_TAPROOT_PUBKEY,
+ })
+
+ // The same name a second time, even under a different address type.
+ // Coin selection resolves a custom account name to whichever key scope
+ // matches first, so a duplicate would make later funding ambiguous.
+ err := alice.RPC.XCreateAccountAssertErr(
+ &walletrpc.XCreateAccountRequest{
+ Name: createAccountName,
+ AddressType: walletrpc.AddressType_WITNESS_PUBKEY_HASH,
+ },
+ )
+ require.ErrorContains(ht, err, "already exists")
+
+ // The wallet's own reserved account names.
+ err = alice.RPC.XCreateAccountAssertErr(
+ &walletrpc.XCreateAccountRequest{
+ Name: lnwallet.DefaultAccountName,
+ AddressType: walletrpc.AddressType_TAPROOT_PUBKEY,
+ },
+ )
+ require.ErrorContains(ht, err, "reserved")
+
+ // An empty name.
+ err = alice.RPC.XCreateAccountAssertErr(
+ &walletrpc.XCreateAccountRequest{
+ AddressType: walletrpc.AddressType_TAPROOT_PUBKEY,
+ },
+ )
+ require.ErrorContains(ht, err, "account name is required")
+
+ // The strict nested-witness scheme, which a wallet-derived account
+ // cannot provide: it stores no address schema, so it would silently
+ // behave as the hybrid scheme instead.
+ err = alice.RPC.XCreateAccountAssertErr(
+ &walletrpc.XCreateAccountRequest{
+ Name: "nested",
+ AddressType: walletrpc.
+ AddressType_NESTED_WITNESS_PUBKEY_HASH,
+ },
+ )
+ require.ErrorContains(ht, err, "cannot be created")
+}
### lnrpc/walletrpc/walletkit.pb.go
@@ -1305,6 +1305,130 @@ func (x *ListAccountsResponse) GetAccounts() []*Account {
return nil
}
+type XCreateAccountRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The name to identify the new account with. The name must not be empty and
+ // must not already be in use by another account, in any key scope. The
+ // names of the wallet's built-in accounts ("default" and "imported") are
+ // reserved and cannot be used.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The type of addresses the account should hold, which selects the BIP-0043
+ // key scope the account is created under. A custom account only ever exists
+ // within a single key scope, so this permanently fixes both the account's
+ // address type and the address type of its change outputs. If unset, an
+ // account holding taproot addresses is created.
+ //
+ // NESTED_WITNESS_PUBKEY_HASH is not accepted: a wallet-derived account
+ // carries no address schema of its own, so it would silently behave as
+ // HYBRID_NESTED_WITNESS_PUBKEY_HASH. Ask for that type explicitly if it
+ // is what you want.
+ AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
+ // Override the requirement for being in dev mode by setting this to true and
+ // confirming the user knows what they are doing: funds held in an account
+ // created here are not rediscovered by a seed-only restore, so recovering
+ // them requires having recorded the account's key scope and index and the
+ // number of addresses it issued.
+ IKnowWhatIAmDoing bool `protobuf:"varint,3,opt,name=i_know_what_i_am_doing,json=iKnowWhatIAmDoing,proto3" json:"i_know_what_i_am_doing,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *XCreateAccountRequest) Reset() {
+ *x = XCreateAccountRequest{}
+ mi := &file_walletrpc_walletkit_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *XCreateAccountRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*XCreateAccountRequest) ProtoMessage() {}
+
+func (x *XCreateAccountRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_walletrpc_walletkit_proto_msgTypes[14]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use XCreateAccountRequest.ProtoReflect.Descriptor instead.
+func (*XCreateAccountRequest) Descriptor() ([]byte, []int) {
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *XCreateAccountRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *XCreateAccountRequest) GetAddressType() AddressType {
+ if x != nil {
+ return x.AddressType
+ }
+ return AddressType_UNKNOWN
+}
+
+func (x *XCreateAccountRequest) GetIKnowWhatIAmDoing() bool {
+ if x != nil {
+ return x.IKnowWhatIAmDoing
+ }
+ return false
+}
+
+type XCreateAccountResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The newly created account.
+ Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *XCreateAccountResponse) Reset() {
+ *x = XCreateAccountResponse{}
+ mi := &file_walletrpc_walletkit_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *XCreateAccountResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*XCreateAccountResponse) ProtoMessage() {}
+
+func (x *XCreateAccountResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_walletrpc_walletkit_proto_msgTypes[15]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use XCreateAccountResponse.ProtoReflect.Descriptor instead.
+func (*XCreateAccountResponse) Descriptor() ([]byte, []int) {
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *XCreateAccountResponse) GetAccount() *Account {
+ if x != nil {
+ return x.Account
+ }
+ return nil
+}
+
type RequiredReserveRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The number of additional channels the user would like to open.
@@ -1315,7 +1439,7 @@ type RequiredReserveRequest struct {
func (x *RequiredReserveRequest) Reset() {
*x = RequiredReserveRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[14]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1327,7 +1451,7 @@ func (x *RequiredReserveRequest) String() string {
func (*RequiredReserveRequest) ProtoMessage() {}
func (x *RequiredReserveRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[14]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1340,7 +1464,7 @@ func (x *RequiredReserveRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RequiredReserveRequest.ProtoReflect.Descriptor instead.
func (*RequiredReserveRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{14}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{16}
}
func (x *RequiredReserveRequest) GetAdditionalPublicChannels() uint32 {
@@ -1360,7 +1484,7 @@ type RequiredReserveResponse struct {
func (x *RequiredReserveResponse) Reset() {
*x = RequiredReserveResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[15]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1372,7 +1496,7 @@ func (x *RequiredReserveResponse) String() string {
func (*RequiredReserveResponse) ProtoMessage() {}
func (x *RequiredReserveResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[15]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1385,7 +1509,7 @@ func (x *RequiredReserveResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RequiredReserveResponse.ProtoReflect.Descriptor instead.
func (*RequiredReserveResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{15}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{17}
}
func (x *RequiredReserveResponse) GetRequiredReserve() int64 {
@@ -1408,7 +1532,7 @@ type ListAddressesRequest struct {
func (x *ListAddressesRequest) Reset() {
*x = ListAddressesRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[16]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1420,7 +1544,7 @@ func (x *ListAddressesRequest) String() string {
func (*ListAddressesRequest) ProtoMessage() {}
func (x *ListAddressesRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[16]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1433,7 +1557,7 @@ func (x *ListAddressesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListAddressesRequest.ProtoReflect.Descriptor instead.
func (*ListAddressesRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{16}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{18}
}
func (x *ListAddressesRequest) GetAccountName() string {
@@ -1460,7 +1584,7 @@ type ListAddressesResponse struct {
func (x *ListAddressesResponse) Reset() {
*x = ListAddressesResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[17]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1472,7 +1596,7 @@ func (x *ListAddressesResponse) String() string {
func (*ListAddressesResponse) ProtoMessage() {}
func (x *ListAddressesResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[17]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1485,7 +1609,7 @@ func (x *ListAddressesResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListAddressesResponse.ProtoReflect.Descriptor instead.
func (*ListAddressesResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{17}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{19}
}
func (x *ListAddressesResponse) GetAccountWithAddresses() []*AccountWithAddresses {
@@ -1505,7 +1629,7 @@ type GetTransactionRequest struct {
func (x *GetTransactionRequest) Reset() {
*x = GetTransactionRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[18]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1517,7 +1641,7 @@ func (x *GetTransactionRequest) String() string {
func (*GetTransactionRequest) ProtoMessage() {}
func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[18]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1530,7 +1654,7 @@ func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{18}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{20}
}
func (x *GetTransactionRequest) GetTxid() string {
@@ -1554,7 +1678,7 @@ type SignMessageWithAddrRequest struct {
func (x *SignMessageWithAddrRequest) Reset() {
*x = SignMessageWithAddrRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[19]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1566,7 +1690,7 @@ func (x *SignMessageWithAddrRequest) String() string {
func (*SignMessageWithAddrRequest) ProtoMessage() {}
func (x *SignMessageWithAddrRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[19]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1579,7 +1703,7 @@ func (x *SignMessageWithAddrRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignMessageWithAddrRequest.ProtoReflect.Descriptor instead.
func (*SignMessageWithAddrRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{19}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{21}
}
func (x *SignMessageWithAddrRequest) GetMsg() []byte {
@@ -1606,7 +1730,7 @@ type SignMessageWithAddrResponse struct {
func (x *SignMessageWithAddrResponse) Reset() {
*x = SignMessageWithAddrResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[20]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1618,7 +1742,7 @@ func (x *SignMessageWithAddrResponse) String() string {
func (*SignMessageWithAddrResponse) ProtoMessage() {}
func (x *SignMessageWithAddrResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[20]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1631,7 +1755,7 @@ func (x *SignMessageWithAddrResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignMessageWithAddrResponse.ProtoReflect.Descriptor instead.
func (*SignMessageWithAddrResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{20}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{22}
}
func (x *SignMessageWithAddrResponse) GetSignature() string {
@@ -1658,7 +1782,7 @@ type VerifyMessageWithAddrRequest struct {
func (x *VerifyMessageWithAddrRequest) Reset() {
*x = VerifyMessageWithAddrRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[21]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1670,7 +1794,7 @@ func (x *VerifyMessageWithAddrRequest) String() string {
func (*VerifyMessageWithAddrRequest) ProtoMessage() {}
func (x *VerifyMessageWithAddrRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[21]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1683,7 +1807,7 @@ func (x *VerifyMessageWithAddrRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use VerifyMessageWithAddrRequest.ProtoReflect.Descriptor instead.
func (*VerifyMessageWithAddrRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{21}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{23}
}
func (x *VerifyMessageWithAddrRequest) GetMsg() []byte {
@@ -1719,7 +1843,7 @@ type VerifyMessageWithAddrResponse struct {
func (x *VerifyMessageWithAddrResponse) Reset() {
*x = VerifyMessageWithAddrResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[22]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1731,7 +1855,7 @@ func (x *VerifyMessageWithAddrResponse) String() string {
func (*VerifyMessageWithAddrResponse) ProtoMessage() {}
func (x *VerifyMessageWithAddrResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[22]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1744,7 +1868,7 @@ func (x *VerifyMessageWithAddrResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use VerifyMessageWithAddrResponse.ProtoReflect.Descriptor instead.
func (*VerifyMessageWithAddrResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{22}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{24}
}
func (x *VerifyMessageWithAddrResponse) GetValid() bool {
@@ -1790,7 +1914,7 @@ type ImportAccountRequest struct {
func (x *ImportAccountRequest) Reset() {
*x = ImportAccountRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[23]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1802,7 +1926,7 @@ func (x *ImportAccountRequest) String() string {
func (*ImportAccountRequest) ProtoMessage() {}
func (x *ImportAccountRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[23]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1815,7 +1939,7 @@ func (x *ImportAccountRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportAccountRequest.ProtoReflect.Descriptor instead.
func (*ImportAccountRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{23}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{25}
}
func (x *ImportAccountRequest) GetName() string {
@@ -1871,7 +1995,7 @@ type ImportAccountResponse struct {
func (x *ImportAccountResponse) Reset() {
*x = ImportAccountResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[24]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1883,7 +2007,7 @@ func (x *ImportAccountResponse) String() string {
func (*ImportAccountResponse) ProtoMessage() {}
func (x *ImportAccountResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[24]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[26]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1896,7 +2020,7 @@ func (x *ImportAccountResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportAccountResponse.ProtoReflect.Descriptor instead.
func (*ImportAccountResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{24}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{26}
}
func (x *ImportAccountResponse) GetAccount() *Account {
@@ -1932,7 +2056,7 @@ type ImportPublicKeyRequest struct {
func (x *ImportPublicKeyRequest) Reset() {
*x = ImportPublicKeyRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[25]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1944,7 +2068,7 @@ func (x *ImportPublicKeyRequest) String() string {
func (*ImportPublicKeyRequest) ProtoMessage() {}
func (x *ImportPublicKeyRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[25]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[27]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1957,7 +2081,7 @@ func (x *ImportPublicKeyRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportPublicKeyRequest.ProtoReflect.Descriptor instead.
func (*ImportPublicKeyRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{25}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{27}
}
func (x *ImportPublicKeyRequest) GetPublicKey() []byte {
@@ -1984,7 +2108,7 @@ type ImportPublicKeyResponse struct {
func (x *ImportPublicKeyResponse) Reset() {
*x = ImportPublicKeyResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[26]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1996,7 +2120,7 @@ func (x *ImportPublicKeyResponse) String() string {
func (*ImportPublicKeyResponse) ProtoMessage() {}
func (x *ImportPublicKeyResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[26]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[28]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2009,7 +2133,7 @@ func (x *ImportPublicKeyResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportPublicKeyResponse.ProtoReflect.Descriptor instead.
func (*ImportPublicKeyResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{26}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{28}
}
func (x *ImportPublicKeyResponse) GetStatus() string {
@@ -2036,7 +2160,7 @@ type ImportTapscriptRequest struct {
func (x *ImportTapscriptRequest) Reset() {
*x = ImportTapscriptRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[27]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2048,7 +2172,7 @@ func (x *ImportTapscriptRequest) String() string {
func (*ImportTapscriptRequest) ProtoMessage() {}
func (x *ImportTapscriptRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[27]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[29]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2061,7 +2185,7 @@ func (x *ImportTapscriptRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportTapscriptRequest.ProtoReflect.Descriptor instead.
func (*ImportTapscriptRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{27}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{29}
}
func (x *ImportTapscriptRequest) GetInternalPublicKey() []byte {
@@ -2164,7 +2288,7 @@ type TapscriptFullTree struct {
func (x *TapscriptFullTree) Reset() {
*x = TapscriptFullTree{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[28]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2176,7 +2300,7 @@ func (x *TapscriptFullTree) String() string {
func (*TapscriptFullTree) ProtoMessage() {}
func (x *TapscriptFullTree) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[28]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[30]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2189,7 +2313,7 @@ func (x *TapscriptFullTree) ProtoReflect() protoreflect.Message {
// Deprecated: Use TapscriptFullTree.ProtoReflect.Descriptor instead.
func (*TapscriptFullTree) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{28}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{30}
}
func (x *TapscriptFullTree) GetAllLeaves() []*TapLeaf {
@@ -2211,7 +2335,7 @@ type TapLeaf struct {
func (x *TapLeaf) Reset() {
*x = TapLeaf{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[29]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2223,7 +2347,7 @@ func (x *TapLeaf) String() string {
func (*TapLeaf) ProtoMessage() {}
func (x *TapLeaf) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[29]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2236,7 +2360,7 @@ func (x *TapLeaf) ProtoReflect() protoreflect.Message {
// Deprecated: Use TapLeaf.ProtoReflect.Descriptor instead.
func (*TapLeaf) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{29}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{31}
}
func (x *TapLeaf) GetLeafVersion() uint32 {
@@ -2268,7 +2392,7 @@ type TapscriptPartialReveal struct {
func (x *TapscriptPartialReveal) Reset() {
*x = TapscriptPartialReveal{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[30]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2280,7 +2404,7 @@ func (x *TapscriptPartialReveal) String() string {
func (*TapscriptPartialReveal) ProtoMessage() {}
func (x *TapscriptPartialReveal) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[30]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[32]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2293,7 +2417,7 @@ func (x *TapscriptPartialReveal) ProtoReflect() protoreflect.Message {
// Deprecated: Use TapscriptPartialReveal.ProtoReflect.Descriptor instead.
func (*TapscriptPartialReveal) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{30}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{32}
}
func (x *TapscriptPartialReveal) GetRevealedLeaf() *TapLeaf {
@@ -2321,7 +2445,7 @@ type ImportTapscriptResponse struct {
func (x *ImportTapscriptResponse) Reset() {
*x = ImportTapscriptResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[31]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2333,7 +2457,7 @@ func (x *ImportTapscriptResponse) String() string {
func (*ImportTapscriptResponse) ProtoMessage() {}
func (x *ImportTapscriptResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[31]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[33]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2346,7 +2470,7 @@ func (x *ImportTapscriptResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportTapscriptResponse.ProtoReflect.Descriptor instead.
func (*ImportTapscriptResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{31}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{33}
}
func (x *ImportTapscriptResponse) GetP2TrAddress() string {
@@ -2370,7 +2494,7 @@ type Transaction struct {
func (x *Transaction) Reset() {
*x = Transaction{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[32]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2382,7 +2506,7 @@ func (x *Transaction) String() string {
func (*Transaction) ProtoMessage() {}
func (x *Transaction) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[32]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[34]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2395,7 +2519,7 @@ func (x *Transaction) ProtoReflect() protoreflect.Message {
// Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{32}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{34}
}
func (x *Transaction) GetTxHex() []byte {
@@ -2426,7 +2550,7 @@ type PublishResponse struct {
func (x *PublishResponse) Reset() {
*x = PublishResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[33]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2438,7 +2562,7 @@ func (x *PublishResponse) String() string {
func (*PublishResponse) ProtoMessage() {}
func (x *PublishResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[33]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[35]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2451,7 +2575,7 @@ func (x *PublishResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{33}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{35}
}
func (x *PublishResponse) GetPublishError() string {
@@ -2477,7 +2601,7 @@ type SubmitPackageRequest struct {
func (x *SubmitPackageRequest) Reset() {
*x = SubmitPackageRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[34]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2489,7 +2613,7 @@ func (x *SubmitPackageRequest) String() string {
func (*SubmitPackageRequest) ProtoMessage() {}
func (x *SubmitPackageRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[34]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[36]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2502,7 +2626,7 @@ func (x *SubmitPackageRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SubmitPackageRequest.ProtoReflect.Descriptor instead.
func (*SubmitPackageRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{34}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{36}
}
func (x *SubmitPackageRequest) GetRawTxs() [][]byte {
@@ -2535,7 +2659,7 @@ type SubmitPackageTxResult struct {
func (x *SubmitPackageTxResult) Reset() {
*x = SubmitPackageTxResult{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[35]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2547,7 +2671,7 @@ func (x *SubmitPackageTxResult) String() string {
func (*SubmitPackageTxResult) ProtoMessage() {}
func (x *SubmitPackageTxResult) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[35]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[37]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2560,7 +2684,7 @@ func (x *SubmitPackageTxResult) ProtoReflect() protoreflect.Message {
// Deprecated: Use SubmitPackageTxResult.ProtoReflect.Descriptor instead.
func (*SubmitPackageTxResult) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{35}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{37}
}
func (x *SubmitPackageTxResult) GetTxid() string {
@@ -2598,7 +2722,7 @@ type SubmitPackageResponse struct {
func (x *SubmitPackageResponse) Reset() {
*x = SubmitPackageResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[36]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2610,7 +2734,7 @@ func (x *SubmitPackageResponse) String() string {
func (*SubmitPackageResponse) ProtoMessage() {}
func (x *SubmitPackageResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[36]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[38]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2623,7 +2747,7 @@ func (x *SubmitPackageResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SubmitPackageResponse.ProtoReflect.Descriptor instead.
func (*SubmitPackageResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{36}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{38}
}
func (x *SubmitPackageResponse) GetPackageMsg() string {
@@ -2657,7 +2781,7 @@ type RemoveTransactionResponse struct {
func (x *RemoveTransactionResponse) Reset() {
*x = RemoveTransactionResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[37]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2669,7 +2793,7 @@ func (x *RemoveTransactionResponse) String() string {
func (*RemoveTransactionResponse) ProtoMessage() {}
func (x *RemoveTransactionResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[37]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[39]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2682,7 +2806,7 @@ func (x *RemoveTransactionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RemoveTransactionResponse.ProtoReflect.Descriptor instead.
func (*RemoveTransactionResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{37}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{39}
}
func (x *RemoveTransactionResponse) GetStatus() string {
@@ -2714,7 +2838,7 @@ type SendOutputsRequest struct {
func (x *SendOutputsRequest) Reset() {
*x = SendOutputsRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[38]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2726,7 +2850,7 @@ func (x *SendOutputsRequest) String() string {
func (*SendOutputsRequest) ProtoMessage() {}
func (x *SendOutputsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[38]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[40]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2739,7 +2863,7 @@ func (x *SendOutputsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SendOutputsRequest.ProtoReflect.Descriptor instead.
func (*SendOutputsRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{38}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{40}
}
func (x *SendOutputsRequest) GetSatPerKw() int64 {
@@ -2794,7 +2918,7 @@ type SendOutputsResponse struct {
func (x *SendOutputsResponse) Reset() {
*x = SendOutputsResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[39]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2806,7 +2930,7 @@ func (x *SendOutputsResponse) String() string {
func (*SendOutputsResponse) ProtoMessage() {}
func (x *SendOutputsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[39]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[41]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2819,7 +2943,7 @@ func (x *SendOutputsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SendOutputsResponse.ProtoReflect.Descriptor instead.
func (*SendOutputsResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{39}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{41}
}
func (x *SendOutputsResponse) GetRawTx() []byte {
@@ -2839,7 +2963,7 @@ type EstimateFeeRequest struct {
func (x *EstimateFeeRequest) Reset() {
*x = EstimateFeeRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[40]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2851,7 +2975,7 @@ func (x *EstimateFeeRequest) String() string {
func (*EstimateFeeRequest) ProtoMessage() {}
func (x *EstimateFeeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[40]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[42]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2864,7 +2988,7 @@ func (x *EstimateFeeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use EstimateFeeRequest.ProtoReflect.Descriptor instead.
func (*EstimateFeeRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{40}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{42}
}
func (x *EstimateFeeRequest) GetConfTarget() int32 {
@@ -2887,7 +3011,7 @@ type EstimateFeeResponse struct {
func (x *EstimateFeeResponse) Reset() {
*x = EstimateFeeResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[41]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2899,7 +3023,7 @@ func (x *EstimateFeeResponse) String() string {
func (*EstimateFeeResponse) ProtoMessage() {}
func (x *EstimateFeeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[41]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[43]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2912,7 +3036,7 @@ func (x *EstimateFeeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use EstimateFeeResponse.ProtoReflect.Descriptor instead.
func (*EstimateFeeResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{41}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{43}
}
func (x *EstimateFeeResponse) GetSatPerKw() int64 {
@@ -2992,7 +3116,7 @@ type PendingSweep struct {
func (x *PendingSweep) Reset() {
*x = PendingSweep{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[42]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3004,7 +3128,7 @@ func (x *PendingSweep) String() string {
func (*PendingSweep) ProtoMessage() {}
func (x *PendingSweep) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[42]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[44]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3017,7 +3141,7 @@ func (x *PendingSweep) ProtoReflect() protoreflect.Message {
// Deprecated: Use PendingSweep.ProtoReflect.Descriptor instead.
func (*PendingSweep) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{42}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{44}
}
func (x *PendingSweep) GetOutpoint() *lnrpc.OutPoint {
@@ -3138,7 +3262,7 @@ type PendingSweepsRequest struct {
func (x *PendingSweepsRequest) Reset() {
*x = PendingSweepsRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[43]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3150,7 +3274,7 @@ func (x *PendingSweepsRequest) String() string {
func (*PendingSweepsRequest) ProtoMessage() {}
func (x *PendingSweepsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[43]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[45]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3163,7 +3287,7 @@ func (x *PendingSweepsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use PendingSweepsRequest.ProtoReflect.Descriptor instead.
func (*PendingSweepsRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{43}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{45}
}
type PendingSweepsResponse struct {
@@ -3176,7 +3300,7 @@ type PendingSweepsResponse struct {
func (x *PendingSweepsResponse) Reset() {
*x = PendingSweepsResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[44]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3188,7 +3312,7 @@ func (x *PendingSweepsResponse) String() string {
func (*PendingSweepsResponse) ProtoMessage() {}
func (x *PendingSweepsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[44]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[46]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3201,7 +3325,7 @@ func (x *PendingSweepsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use PendingSweepsResponse.ProtoReflect.Descriptor instead.
func (*PendingSweepsResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{44}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{46}
}
func (x *PendingSweepsResponse) GetPendingSweeps() []*PendingSweep {
@@ -3256,7 +3380,7 @@ type BumpFeeRequest struct {
func (x *BumpFeeRequest) Reset() {
*x = BumpFeeRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[45]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3268,7 +3392,7 @@ func (x *BumpFeeRequest) String() string {
func (*BumpFeeRequest) ProtoMessage() {}
func (x *BumpFeeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[45]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[47]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3281,7 +3405,7 @@ func (x *BumpFeeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use BumpFeeRequest.ProtoReflect.Descriptor instead.
func (*BumpFeeRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{45}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{47}
}
func (x *BumpFeeRequest) GetOutpoint() *lnrpc.OutPoint {
@@ -3352,7 +3476,7 @@ type BumpFeeResponse struct {
func (x *BumpFeeResponse) Reset() {
*x = BumpFeeResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[46]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3364,7 +3488,7 @@ func (x *BumpFeeResponse) String() string {
func (*BumpFeeResponse) ProtoMessage() {}
func (x *BumpFeeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[46]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[48]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3377,7 +3501,7 @@ func (x *BumpFeeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use BumpFeeResponse.ProtoReflect.Descriptor instead.
func (*BumpFeeResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{46}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{48}
}
func (x *BumpFeeResponse) GetStatus() string {
@@ -3421,7 +3545,7 @@ type BumpForceCloseFeeRequest struct {
func (x *BumpForceCloseFeeRequest) Reset() {
*x = BumpForceCloseFeeRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[47]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3433,7 +3557,7 @@ func (x *BumpForceCloseFeeRequest) String() string {
func (*BumpForceCloseFeeRequest) ProtoMessage() {}
func (x *BumpForceCloseFeeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[47]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[49]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3446,7 +3570,7 @@ func (x *BumpForceCloseFeeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use BumpForceCloseFeeRequest.ProtoReflect.Descriptor instead.
func (*BumpForceCloseFeeRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{47}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{49}
}
func (x *BumpForceCloseFeeRequest) GetChanPoint() *lnrpc.ChannelPoint {
@@ -3501,7 +3625,7 @@ type BumpForceCloseFeeResponse struct {
func (x *BumpForceCloseFeeResponse) Reset() {
*x = BumpForceCloseFeeResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[48]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3513,7 +3637,7 @@ func (x *BumpForceCloseFeeResponse) String() string {
func (*BumpForceCloseFeeResponse) ProtoMessage() {}
func (x *BumpForceCloseFeeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[48]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[50]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3526,7 +3650,7 @@ func (x *BumpForceCloseFeeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use BumpForceCloseFeeResponse.ProtoReflect.Descriptor instead.
func (*BumpForceCloseFeeResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{48}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{50}
}
func (x *BumpForceCloseFeeResponse) GetStatus() string {
@@ -3552,7 +3676,7 @@ type ListSweepsRequest struct {
func (x *ListSweepsRequest) Reset() {
*x = ListSweepsRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[49]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3564,7 +3688,7 @@ func (x *ListSweepsRequest) String() string {
func (*ListSweepsRequest) ProtoMessage() {}
func (x *ListSweepsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[49]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[51]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3577,7 +3701,7 @@ func (x *ListSweepsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListSweepsRequest.ProtoReflect.Descriptor instead.
func (*ListSweepsRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{49}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{51}
}
func (x *ListSweepsRequest) GetVerbose() bool {
@@ -3607,7 +3731,7 @@ type ListSweepsResponse struct {
func (x *ListSweepsResponse) Reset() {
*x = ListSweepsResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[50]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3619,7 +3743,7 @@ func (x *ListSweepsResponse) String() string {
func (*ListSweepsResponse) ProtoMessage() {}
func (x *ListSweepsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[50]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[52]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3632,7 +3756,7 @@ func (x *ListSweepsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListSweepsResponse.ProtoReflect.Descriptor instead.
func (*ListSweepsResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{50}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{52}
}
func (x *ListSweepsResponse) GetSweeps() isListSweepsResponse_Sweeps {
@@ -3691,7 +3815,7 @@ type LabelTransactionRequest struct {
func (x *LabelTransactionRequest) Reset() {
*x = LabelTransactionRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[51]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3703,7 +3827,7 @@ func (x *LabelTransactionRequest) String() string {
func (*LabelTransactionRequest) ProtoMessage() {}
func (x *LabelTransactionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[51]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[53]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3716,7 +3840,7 @@ func (x *LabelTransactionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use LabelTransactionRequest.ProtoReflect.Descriptor instead.
func (*LabelTransactionRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{51}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{53}
}
func (x *LabelTransactionRequest) GetTxid() []byte {
@@ -3750,7 +3874,7 @@ type LabelTransactionResponse struct {
func (x *LabelTransactionResponse) Reset() {
*x = LabelTransactionResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[52]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3762,7 +3886,7 @@ func (x *LabelTransactionResponse) String() string {
func (*LabelTransactionResponse) ProtoMessage() {}
func (x *LabelTransactionResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[52]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[54]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3775,7 +3899,7 @@ func (x *LabelTransactionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use LabelTransactionResponse.ProtoReflect.Descriptor instead.
func (*LabelTransactionResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{52}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{54}
}
func (x *LabelTransactionResponse) GetStatus() string {
@@ -3830,7 +3954,7 @@ type FundPsbtRequest struct {
func (x *FundPsbtRequest) Reset() {
*x = FundPsbtRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[53]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3842,7 +3966,7 @@ func (x *FundPsbtRequest) String() string {
func (*FundPsbtRequest) ProtoMessage() {}
func (x *FundPsbtRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[53]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[55]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3855,7 +3979,7 @@ func (x *FundPsbtRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use FundPsbtRequest.ProtoReflect.Descriptor instead.
func (*FundPsbtRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{53}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{55}
}
func (x *FundPsbtRequest) GetTemplate() isFundPsbtRequest_Template {
@@ -4072,7 +4196,7 @@ type FundPsbtResponse struct {
func (x *FundPsbtResponse) Reset() {
*x = FundPsbtResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[54]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4084,7 +4208,7 @@ func (x *FundPsbtResponse) String() string {
func (*FundPsbtResponse) ProtoMessage() {}
func (x *FundPsbtResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[54]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[56]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4097,7 +4221,7 @@ func (x *FundPsbtResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use FundPsbtResponse.ProtoReflect.Descriptor instead.
func (*FundPsbtResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{54}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{56}
}
func (x *FundPsbtResponse) GetFundedPsbt() []byte {
@@ -4139,7 +4263,7 @@ type TxTemplate struct {
func (x *TxTemplate) Reset() {
*x = TxTemplate{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[55]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4151,7 +4275,7 @@ func (x *TxTemplate) String() string {
func (*TxTemplate) ProtoMessage() {}
func (x *TxTemplate) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[55]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[57]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4164,7 +4288,7 @@ func (x *TxTemplate) ProtoReflect() protoreflect.Message {
// Deprecated: Use TxTemplate.ProtoReflect.Descriptor instead.
func (*TxTemplate) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{55}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{57}
}
func (x *TxTemplate) GetInputs() []*lnrpc.OutPoint {
@@ -4204,7 +4328,7 @@ type PsbtCoinSelect struct {
func (x *PsbtCoinSelect) Reset() {
*x = PsbtCoinSelect{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[56]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4216,7 +4340,7 @@ func (x *PsbtCoinSelect) String() string {
func (*PsbtCoinSelect) ProtoMessage() {}
func (x *PsbtCoinSelect) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[56]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[58]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4229,7 +4353,7 @@ func (x *PsbtCoinSelect) ProtoReflect() protoreflect.Message {
// Deprecated: Use PsbtCoinSelect.ProtoReflect.Descriptor instead.
func (*PsbtCoinSelect) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{56}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{58}
}
func (x *PsbtCoinSelect) GetPsbt() []byte {
@@ -4305,7 +4429,7 @@ type UtxoLease struct {
func (x *UtxoLease) Reset() {
*x = UtxoLease{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[57]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4317,7 +4441,7 @@ func (x *UtxoLease) String() string {
func (*UtxoLease) ProtoMessage() {}
func (x *UtxoLease) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[57]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[59]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4330,7 +4454,7 @@ func (x *UtxoLease) ProtoReflect() protoreflect.Message {
// Deprecated: Use UtxoLease.ProtoReflect.Descriptor instead.
func (*UtxoLease) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{57}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{59}
}
func (x *UtxoLease) GetId() []byte {
@@ -4379,7 +4503,7 @@ type SignPsbtRequest struct {
func (x *SignPsbtRequest) Reset() {
*x = SignPsbtRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[58]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[60]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4391,7 +4515,7 @@ func (x *SignPsbtRequest) String() string {
func (*SignPsbtRequest) ProtoMessage() {}
func (x *SignPsbtRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[58]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[60]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4404,7 +4528,7 @@ func (x *SignPsbtRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignPsbtRequest.ProtoReflect.Descriptor instead.
func (*SignPsbtRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{58}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{60}
}
func (x *SignPsbtRequest) GetFundedPsbt() []byte {
@@ -4426,7 +4550,7 @@ type SignPsbtResponse struct {
func (x *SignPsbtResponse) Reset() {
*x = SignPsbtResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[59]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[61]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4438,7 +4562,7 @@ func (x *SignPsbtResponse) String() string {
func (*SignPsbtResponse) ProtoMessage() {}
func (x *SignPsbtResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[59]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[61]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4451,7 +4575,7 @@ func (x *SignPsbtResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SignPsbtResponse.ProtoReflect.Descriptor instead.
func (*SignPsbtResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{59}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{61}
}
func (x *SignPsbtResponse) GetSignedPsbt() []byte {
@@ -4483,7 +4607,7 @@ type FinalizePsbtRequest struct {
func (x *FinalizePsbtRequest) Reset() {
*x = FinalizePsbtRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[60]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[62]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4495,7 +4619,7 @@ func (x *FinalizePsbtRequest) String() string {
func (*FinalizePsbtRequest) ProtoMessage() {}
func (x *FinalizePsbtRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[60]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[62]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4508,7 +4632,7 @@ func (x *FinalizePsbtRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use FinalizePsbtRequest.ProtoReflect.Descriptor instead.
func (*FinalizePsbtRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{60}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{62}
}
func (x *FinalizePsbtRequest) GetFundedPsbt() []byte {
@@ -4537,7 +4661,7 @@ type FinalizePsbtResponse struct {
func (x *FinalizePsbtResponse) Reset() {
*x = FinalizePsbtResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[61]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[63]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4549,7 +4673,7 @@ func (x *FinalizePsbtResponse) String() string {
func (*FinalizePsbtResponse) ProtoMessage() {}
func (x *FinalizePsbtResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[61]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[63]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4562,7 +4686,7 @@ func (x *FinalizePsbtResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use FinalizePsbtResponse.ProtoReflect.Descriptor instead.
func (*FinalizePsbtResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{61}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{63}
}
func (x *FinalizePsbtResponse) GetSignedPsbt() []byte {
@@ -4587,7 +4711,7 @@ type ListLeasesRequest struct {
func (x *ListLeasesRequest) Reset() {
*x = ListLeasesRequest{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[62]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[64]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4599,7 +4723,7 @@ func (x *ListLeasesRequest) String() string {
func (*ListLeasesRequest) ProtoMessage() {}
func (x *ListLeasesRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[62]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[64]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4612,7 +4736,7 @@ func (x *ListLeasesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListLeasesRequest.ProtoReflect.Descriptor instead.
func (*ListLeasesRequest) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{62}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{64}
}
type ListLeasesResponse struct {
@@ -4625,7 +4749,7 @@ type ListLeasesResponse struct {
func (x *ListLeasesResponse) Reset() {
*x = ListLeasesResponse{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[63]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[65]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4637,7 +4761,7 @@ func (x *ListLeasesResponse) String() string {
func (*ListLeasesResponse) ProtoMessage() {}
func (x *ListLeasesResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[63]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[65]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4650,7 +4774,7 @@ func (x *ListLeasesResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListLeasesResponse.ProtoReflect.Descriptor instead.
func (*ListLeasesResponse) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{63}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{65}
}
func (x *ListLeasesResponse) GetLockedUtxos() []*UtxoLease {
@@ -4672,7 +4796,7 @@ type ListSweepsResponse_TransactionIDs struct {
func (x *ListSweepsResponse_TransactionIDs) Reset() {
*x = ListSweepsResponse_TransactionIDs{}
- mi := &file_walletrpc_walletkit_proto_msgTypes[65]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4684,7 +4808,7 @@ func (x *ListSweepsResponse_TransactionIDs) String() string {
func (*ListSweepsResponse_TransactionIDs) ProtoMessage() {}
func (x *ListSweepsResponse_TransactionIDs) ProtoReflect() protoreflect.Message {
- mi := &file_walletrpc_walletkit_proto_msgTypes[65]
+ mi := &file_walletrpc_walletkit_proto_msgTypes[67]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4697,7 +4821,7 @@ func (x *ListSweepsResponse_TransactionIDs) ProtoReflect() protoreflect.Message
// Deprecated: Use ListSweepsResponse_TransactionIDs.ProtoReflect.Descriptor instead.
func (*ListSweepsResponse_TransactionIDs) Descriptor() ([]byte, []int) {
- return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{50, 0}
+ return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{52, 0}
}
func (x *ListSweepsResponse_TransactionIDs) GetTransactionIds() []string {
@@ -4769,7 +4893,13 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
"\x04name\x18\x01 \x01(\tR\x04name\x129\n" +
"\faddress_type\x18\x02 \x01(\x0e2\x16.walletrpc.AddressTypeR\vaddressType\"F\n" +
"\x14ListAccountsResponse\x12.\n" +
- "\baccounts\x18\x01 \x03(\v2\x12.walletrpc.AccountR\baccounts\"V\n" +
+ "\baccounts\x18\x01 \x03(\v2\x12.walletrpc.AccountR\baccounts\"\x99\x01\n" +
+ "\x15XCreateAccountRequest\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x129\n" +
+ "\faddress_type\x18\x02 \x01(\x0e2\x16.walletrpc.AddressTypeR\vaddressType\x121\n" +
+ "\x16i_know_what_i_am_doing\x18\x03 \x01(\bR\x11iKnowWhatIAmDoing\"F\n" +
+ "\x16XCreateAccountResponse\x12,\n" +
+ "\aaccount\x18\x01 \x01(\v2\x12.walletrpc.AccountR\aaccount\"V\n" +
"\x16RequiredReserveRequest\x12<\n" +
"\x1aadditional_public_channels\x18\x01 \x01(\rR\x18additionalPublicChannels\"D\n" +
"\x17RequiredReserveResponse\x12)\n" +
@@ -5050,7 +5180,7 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
"\x1fTAPROOT_COMMITMENT_REVOKE_FINAL\x10**V\n" +
"\x11ChangeAddressType\x12#\n" +
"\x1fCHANGE_ADDRESS_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n" +
- "\x18CHANGE_ADDRESS_TYPE_P2TR\x10\x012\xaa\x12\n" +
+ "\x18CHANGE_ADDRESS_TYPE_P2TR\x10\x012\x81\x13\n" +
"\tWalletKit\x12L\n" +
"\vListUnspent\x12\x1d.walletrpc.ListUnspentRequest\x1a\x1e.walletrpc.ListUnspentResponse\x12L\n" +
"\vLeaseOutput\x12\x1d.walletrpc.LeaseOutputRequest\x1a\x1e.walletrpc.LeaseOutputResponse\x12R\n" +
@@ -5061,7 +5191,8 @@ const file_walletrpc_walletkit_proto_rawDesc = "" +
"\tDeriveKey\x12\x13.signrpc.KeyLocator\x1a\x16.signrpc.KeyDescriptor\x12;\n" +
"\bNextAddr\x12\x16.walletrpc.AddrRequest\x1a\x17.walletrpc.AddrResponse\x12F\n" +
"\x0eGetTransaction\x12 .walletrpc.GetTransactionRequest\x1a\x12.lnrpc.Transaction\x12O\n" +
- "\fListAccounts\x12\x1e.walletrpc.ListAccountsRequest\x1a\x1f.walletrpc.ListAccountsResponse\x12X\n" +
+ "\fListAccounts\x12\x1e.walletrpc.ListAccountsRequest\x1a\x1f.walletrpc.ListAccountsResponse\x12U\n" +
+ "\x0eXCreateAccount\x12 .walletrpc.XCreateAccountRequest\x1a!.walletrpc.XCreateAccountResponse\x12X\n" +
"\x0fRequiredReserve\x12!.walletrpc.RequiredReserveRequest\x1a\".walletrpc.RequiredReserveResponse\x12R\n" +
"\rListAddresses\x12\x1f.walletrpc.ListAddressesRequest\x1a .walletrpc.ListAddressesResponse\x12d\n" +
"\x13SignMessageWithAddr\x12%.walletrpc.SignMessageWithAddrRequest\x1a&.walletrpc.SignMessageWithAddrResponse\x12j\n" +
@@ -5097,7 +5228,7 @@ func file_walletrpc_walletkit_proto_rawDescGZIP() []byte {
}
var file_walletrpc_walletkit_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
-var file_walletrpc_walletkit_proto_msgTypes = make([]protoimpl.MessageInfo, 67)
+var file_walletrpc_walletkit_proto_msgTypes = make([]protoimpl.MessageInfo, 69)
var file_walletrpc_walletkit_proto_goTypes = []any{
(AddressType)(0), // 0: walletrpc.AddressType
(WitnessType)(0), // 1: walletrpc.WitnessType
@@ -5116,197 +5247,203 @@ var file_walletrpc_walletkit_proto_goTypes = []any{
(*AccountWithAddresses)(nil), // 14: walletrpc.AccountWithAddresses
(*ListAccountsRequest)(nil), // 15: walletrpc.ListAccountsRequest
(*ListAccountsResponse)(nil), // 16: walletrpc.ListAccountsResponse
- (*RequiredReserveRequest)(nil), // 17: walletrpc.RequiredReserveRequest
- (*RequiredReserveResponse)(nil), // 18: walletrpc.RequiredReserveResponse
- (*ListAddressesRequest)(nil), // 19: walletrpc.ListAddressesRequest
- (*ListAddressesResponse)(nil), // 20: walletrpc.ListAddressesResponse
- (*GetTransactionRequest)(nil), // 21: walletrpc.GetTransactionRequest
- (*SignMessageWithAddrRequest)(nil), // 22: walletrpc.SignMessageWithAddrRequest
- (*SignMessageWithAddrResponse)(nil), // 23: walletrpc.SignMessageWithAddrResponse
- (*VerifyMessageWithAddrRequest)(nil), // 24: walletrpc.VerifyMessageWithAddrRequest
- (*VerifyMessageWithAddrResponse)(nil), // 25: walletrpc.VerifyMessageWithAddrResponse
- (*ImportAccountRequest)(nil), // 26: walletrpc.ImportAccountRequest
- (*ImportAccountResponse)(nil), // 27: walletrpc.ImportAccountResponse
- (*ImportPublicKeyRequest)(nil), // 28: walletrpc.ImportPublicKeyRequest
- (*ImportPublicKeyResponse)(nil), // 29: walletrpc.ImportPublicKeyResponse
- (*ImportTapscriptRequest)(nil), // 30: walletrpc.ImportTapscriptRequest
- (*TapscriptFullTree)(nil), // 31: walletrpc.TapscriptFullTree
- (*TapLeaf)(nil), // 32: walletrpc.TapLeaf
- (*TapscriptPartialReveal)(nil), // 33: walletrpc.TapscriptPartialReveal
- (*ImportTapscriptResponse)(nil), // 34: walletrpc.ImportTapscriptResponse
- (*Transaction)(nil), // 35: walletrpc.Transaction
- (*PublishResponse)(nil), // 36: walletrpc.PublishResponse
- (*SubmitPackageRequest)(nil), // 37: walletrpc.SubmitPackageRequest
- (*SubmitPackageTxResult)(nil), // 38: walletrpc.SubmitPackageTxResult
- (*SubmitPackageResponse)(nil), // 39: walletrpc.SubmitPackageResponse
- (*RemoveTransactionResponse)(nil), // 40: walletrpc.RemoveTransactionResponse
- (*SendOutputsRequest)(nil), // 41: walletrpc.SendOutputsRequest
- (*SendOutputsResponse)(nil), // 42: walletrpc.SendOutputsResponse
- (*EstimateFeeRequest)(nil), // 43: walletrpc.EstimateFeeRequest
- (*EstimateFeeResponse)(nil), // 44: walletrpc.EstimateFeeResponse
- (*PendingSweep)(nil), // 45: walletrpc.PendingSweep
- (*PendingSweepsRequest)(nil), // 46: walletrpc.PendingSweepsRequest
- (*PendingSweepsResponse)(nil), // 47: walletrpc.PendingSweepsResponse
- (*BumpFeeRequest)(nil), // 48: walletrpc.BumpFeeRequest
- (*BumpFeeResponse)(nil), // 49: walletrpc.BumpFeeResponse
- (*BumpForceCloseFeeRequest)(nil), // 50: walletrpc.BumpForceCloseFeeRequest
- (*BumpForceCloseFeeResponse)(nil), // 51: walletrpc.BumpForceCloseFeeResponse
- (*ListSweepsRequest)(nil), // 52: walletrpc.ListSweepsRequest
- (*ListSweepsResponse)(nil), // 53: walletrpc.ListSweepsResponse
- (*LabelTransactionRequest)(nil), // 54: walletrpc.LabelTransactionRequest
- (*LabelTransactionResponse)(nil), // 55: walletrpc.LabelTransactionResponse
- (*FundPsbtRequest)(nil), // 56: walletrpc.FundPsbtRequest
- (*FundPsbtResponse)(nil), // 57: walletrpc.FundPsbtResponse
- (*TxTemplate)(nil), // 58: walletrpc.TxTemplate
- (*PsbtCoinSelect)(nil), // 59: walletrpc.PsbtCoinSelect
- (*UtxoLease)(nil), // 60: walletrpc.UtxoLease
- (*SignPsbtRequest)(nil), // 61: walletrpc.SignPsbtRequest
- (*SignPsbtResponse)(nil), // 62: walletrpc.SignPsbtResponse
- (*FinalizePsbtRequest)(nil), // 63: walletrpc.FinalizePsbtRequest
- (*FinalizePsbtResponse)(nil), // 64: walletrpc.FinalizePsbtResponse
- (*ListLeasesRequest)(nil), // 65: walletrpc.ListLeasesRequest
- (*ListLeasesResponse)(nil), // 66: walletrpc.ListLeasesResponse
- nil, // 67: walletrpc.SubmitPackageResponse.TxResultsEntry
- (*ListSweepsResponse_TransactionIDs)(nil), // 68: walletrpc.ListSweepsResponse.TransactionIDs
- nil, // 69: walletrpc.TxTemplate.OutputsEntry
- (*lnrpc.Utxo)(nil), // 70: lnrpc.Utxo
- (*lnrpc.OutPoint)(nil), // 71: lnrpc.OutPoint
- (*signrpc.TxOut)(nil), // 72: signrpc.TxOut
- (lnrpc.CoinSelectionStrategy)(0), // 73: lnrpc.CoinSelectionStrategy
- (*lnrpc.ChannelPoint)(nil), // 74: lnrpc.ChannelPoint
- (*lnrpc.TransactionDetails)(nil), // 75: lnrpc.TransactionDetails
- (*signrpc.KeyLocator)(nil), // 76: signrpc.KeyLocator
- (*signrpc.KeyDescriptor)(nil), // 77: signrpc.KeyDescriptor
- (*lnrpc.Transaction)(nil), // 78: lnrpc.Transaction
+ (*XCreateAccountRequest)(nil), // 17: walletrpc.XCreateAccountRequest
+ (*XCreateAccountResponse)(nil), // 18: walletrpc.XCreateAccountResponse
+ (*RequiredReserveRequest)(nil), // 19: walletrpc.RequiredReserveRequest
+ (*RequiredReserveResponse)(nil), // 20: walletrpc.RequiredReserveResponse
+ (*ListAddressesRequest)(nil), // 21: walletrpc.ListAddressesRequest
+ (*ListAddressesResponse)(nil), // 22: walletrpc.ListAddressesResponse
+ (*GetTransactionRequest)(nil), // 23: walletrpc.GetTransactionRequest
+ (*SignMessageWithAddrRequest)(nil), // 24: walletrpc.SignMessageWithAddrRequest
+ (*SignMessageWithAddrResponse)(nil), // 25: walletrpc.SignMessageWithAddrResponse
+ (*VerifyMessageWithAddrRequest)(nil), // 26: walletrpc.VerifyMessageWithAddrRequest
+ (*VerifyMessageWithAddrResponse)(nil), // 27: walletrpc.VerifyMessageWithAddrResponse
+ (*ImportAccountRequest)(nil), // 28: walletrpc.ImportAccountRequest
+ (*ImportAccountResponse)(nil), // 29: walletrpc.ImportAccountResponse
+ (*ImportPublicKeyRequest)(nil), // 30: walletrpc.ImportPublicKeyRequest
+ (*ImportPublicKeyResponse)(nil), // 31: walletrpc.ImportPublicKeyResponse
+ (*ImportTapscriptRequest)(nil), // 32: walletrpc.ImportTapscriptRequest
+ (*TapscriptFullTree)(nil), // 33: walletrpc.TapscriptFullTree
+ (*TapLeaf)(nil), // 34: walletrpc.TapLeaf
+ (*TapscriptPartialReveal)(nil), // 35: walletrpc.TapscriptPartialReveal
+ (*ImportTapscriptResponse)(nil), // 36: walletrpc.ImportTapscriptResponse
+ (*Transaction)(nil), // 37: walletrpc.Transaction
+ (*PublishResponse)(nil), // 38: walletrpc.PublishResponse
+ (*SubmitPackageRequest)(nil), // 39: walletrpc.SubmitPackageRequest
+ (*SubmitPackageTxResult)(nil), // 40: walletrpc.SubmitPackageTxResult
+ (*SubmitPackageResponse)(nil), // 41: walletrpc.SubmitPackageResponse
+ (*RemoveTransactionResponse)(nil), // 42: walletrpc.RemoveTransactionResponse
+ (*SendOutputsRequest)(nil), // 43: walletrpc.SendOutputsRequest
+ (*SendOutputsResponse)(nil), // 44: walletrpc.SendOutputsResponse
+ (*EstimateFeeRequest)(nil), // 45: walletrpc.EstimateFeeRequest
+ (*EstimateFeeResponse)(nil), // 46: walletrpc.EstimateFeeResponse
+ (*PendingSweep)(nil), // 47: walletrpc.PendingSweep
+ (*PendingSweepsRequest)(nil), // 48: walletrpc.PendingSweepsRequest
+ (*PendingSweepsResponse)(nil), // 49: walletrpc.PendingSweepsResponse
+ (*BumpFeeRequest)(nil), // 50: walletrpc.BumpFeeRequest
+ (*BumpFeeResponse)(nil), // 51: walletrpc.BumpFeeResponse
+ (*BumpForceCloseFeeRequest)(nil), // 52: walletrpc.BumpForceCloseFeeRequest
+ (*BumpForceCloseFeeResponse)(nil), // 53: walletrpc.BumpForceCloseFeeResponse
+ (*ListSweepsRequest)(nil), // 54: walletrpc.ListSweepsRequest
+ (*ListSweepsResponse)(nil), // 55: walletrpc.ListSweepsResponse
+ (*LabelTransactionRequest)(nil), // 56: walletrpc.LabelTransactionRequest
+ (*LabelTransactionResponse)(nil), // 57: walletrpc.LabelTransactionResponse
+ (*FundPsbtRequest)(nil), // 58: walletrpc.FundPsbtRequest
+ (*FundPsbtResponse)(nil), // 59: walletrpc.FundPsbtResponse
+ (*TxTemplate)(nil), // 60: walletrpc.TxTemplate
+ (*PsbtCoinSelect)(nil), // 61: walletrpc.PsbtCoinSelect
+ (*UtxoLease)(nil), // 62: walletrpc.UtxoLease
+ (*SignPsbtRequest)(nil), // 63: walletrpc.SignPsbtRequest
+ (*SignPsbtResponse)(nil), // 64: walletrpc.SignPsbtResponse
+ (*FinalizePsbtRequest)(nil), // 65: walletrpc.FinalizePsbtRequest
+ (*FinalizePsbtResponse)(nil), // 66: walletrpc.FinalizePsbtResponse
+ (*ListLeasesRequest)(nil), // 67: walletrpc.ListLeasesRequest
+ (*ListLeasesResponse)(nil), // 68: walletrpc.ListLeasesResponse
+ nil, // 69: walletrpc.SubmitPackageResponse.TxResultsEntry
+ (*ListSweepsResponse_TransactionIDs)(nil), // 70: walletrpc.ListSweepsResponse.TransactionIDs
+ nil, // 71: walletrpc.TxTemplate.OutputsEntry
+ (*lnrpc.Utxo)(nil), // 72: lnrpc.Utxo
+ (*lnrpc.OutPoint)(nil), // 73: lnrpc.OutPoint
+ (*signrpc.TxOut)(nil), // 74: signrpc.TxOut
+ (lnrpc.CoinSelectionStrategy)(0), // 75: lnrpc.CoinSelectionStrategy
+ (*lnrpc.ChannelPoint)(nil), // 76: lnrpc.ChannelPoint
+ (*lnrpc.TransactionDetails)(nil), // 77: lnrpc.TransactionDetails
+ (*signrpc.KeyLocator)(nil), // 78: signrpc.KeyLocator
+ (*signrpc.KeyDescriptor)(nil), // 79: signrpc.KeyDescriptor
+ (*lnrpc.Transaction)(nil), // 80: lnrpc.Transaction
}
var file_walletrpc_walletkit_proto_depIdxs = []int32{
- 70, // 0: walletrpc.ListUnspentResponse.utxos:type_name -> lnrpc.Utxo
- 71, // 1: walletrpc.LeaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint
- 71, // 2: walletrpc.ReleaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint
+ 72, // 0: walletrpc.ListUnspentResponse.utxos:type_name -> lnrpc.Utxo
+ 73, // 1: walletrpc.LeaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint
+ 73, // 2: walletrpc.ReleaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint
0, // 3: walletrpc.AddrRequest.type:type_name -> walletrpc.AddressType
0, // 4: walletrpc.Account.address_type:type_name -> walletrpc.AddressType
0, // 5: walletrpc.AccountWithAddresses.address_type:type_name -> walletrpc.AddressType
13, // 6: walletrpc.AccountWithAddresses.addresses:type_name -> walletrpc.AddressProperty
0, // 7: walletrpc.ListAccountsRequest.address_type:type_name -> walletrpc.AddressType
12, // 8: walletrpc.ListAccountsResponse.accounts:type_name -> walletrpc.Account
- 14, // 9: walletrpc.ListAddressesResponse.account_with_addresses:type_name -> walletrpc.AccountWithAddresses
- 0, // 10: walletrpc.ImportAccountRequest.address_type:type_name -> walletrpc.AddressType
- 12, // 11: walletrpc.ImportAccountResponse.account:type_name -> walletrpc.Account
- 0, // 12: walletrpc.ImportPublicKeyRequest.address_type:type_name -> walletrpc.AddressType
- 31, // 13: walletrpc.ImportTapscriptRequest.full_tree:type_name -> walletrpc.TapscriptFullTree
- 33, // 14: walletrpc.ImportTapscriptRequest.partial_reveal:type_name -> walletrpc.TapscriptPartialReveal
- 32, // 15: walletrpc.TapscriptFullTree.all_leaves:type_name -> walletrpc.TapLeaf
- 32, // 16: walletrpc.TapscriptPartialReveal.revealed_leaf:type_name -> walletrpc.TapLeaf
- 67, // 17: walletrpc.SubmitPackageResponse.tx_results:type_name -> walletrpc.SubmitPackageResponse.TxResultsEntry
- 72, // 18: walletrpc.SendOutputsRequest.outputs:type_name -> signrpc.TxOut
- 73, // 19: walletrpc.SendOutputsRequest.coin_selection_strategy:type_name -> lnrpc.CoinSelectionStrategy
- 71, // 20: walletrpc.PendingSweep.outpoint:type_name -> lnrpc.OutPoint
- 1, // 21: walletrpc.PendingSweep.witness_type:type_name -> walletrpc.WitnessType
- 45, // 22: walletrpc.PendingSweepsResponse.pending_sweeps:type_name -> walletrpc.PendingSweep
- 71, // 23: walletrpc.BumpFeeRequest.outpoint:type_name -> lnrpc.OutPoint
- 74, // 24: walletrpc.BumpForceCloseFeeRequest.chan_point:type_name -> lnrpc.ChannelPoint
- 75, // 25: walletrpc.ListSweepsResponse.transaction_details:type_name -> lnrpc.TransactionDetails
- 68, // 26: walletrpc.ListSweepsResponse.transaction_ids:type_name -> walletrpc.ListSweepsResponse.TransactionIDs
- 58, // 27: walletrpc.FundPsbtRequest.raw:type_name -> walletrpc.TxTemplate
- 59, // 28: walletrpc.FundPsbtRequest.coin_select:type_name -> walletrpc.PsbtCoinSelect
- 2, // 29: walletrpc.FundPsbtRequest.change_type:type_name -> walletrpc.ChangeAddressType
- 73, // 30: walletrpc.FundPsbtRequest.coin_selection_strategy:type_name -> lnrpc.CoinSelectionStrategy
- 60, // 31: walletrpc.FundPsbtResponse.locked_utxos:type_name -> walletrpc.UtxoLease
- 71, // 32: walletrpc.TxTemplate.inputs:type_name -> lnrpc.OutPoint
- 69, // 33: walletrpc.TxTemplate.outputs:type_name -> walletrpc.TxTemplate.OutputsEntry
- 71, // 34: walletrpc.UtxoLease.outpoint:type_name -> lnrpc.OutPoint
- 60, // 35: walletrpc.ListLeasesResponse.locked_utxos:type_name -> walletrpc.UtxoLease
- 38, // 36: walletrpc.SubmitPackageResponse.TxResultsEntry.value:type_name -> walletrpc.SubmitPackageTxResult
- 3, // 37: walletrpc.WalletKit.ListUnspent:input_type -> walletrpc.ListUnspentRequest
- 5, // 38: walletrpc.WalletKit.LeaseOutput:input_type -> walletrpc.LeaseOutputRequest
- 7, // 39: walletrpc.WalletKit.ReleaseOutput:input_type -> walletrpc.ReleaseOutputRequest
- 65, // 40: walletrpc.WalletKit.ListLeases:input_type -> walletrpc.ListLeasesRequest
- 9, // 41: walletrpc.WalletKit.DeriveNextKey:input_type -> walletrpc.KeyReq
- 76, // 42: walletrpc.WalletKit.DeriveKey:input_type -> signrpc.KeyLocator
- 10, // 43: walletrpc.WalletKit.NextAddr:input_type -> walletrpc.AddrRequest
- 21, // 44: walletrpc.WalletKit.GetTransaction:input_type -> walletrpc.GetTransactionRequest
- 15, // 45: walletrpc.WalletKit.ListAccounts:input_type -> walletrpc.ListAccountsRequest
- 17, // 46: walletrpc.WalletKit.RequiredReserve:input_type -> walletrpc.RequiredReserveRequest
- 19, // 47: walletrpc.WalletKit.ListAddresses:input_type -> walletrpc.ListAddressesRequest
- 22, // 48: walletrpc.WalletKit.SignMessageWithAddr:input_type -> walletrpc.SignMessageWithAddrRequest
- 24, // 49: walletrpc.WalletKit.VerifyMessageWithAddr:input_type -> walletrpc.VerifyMessageWithAddrRequest
- 26, // 50: walletrpc.WalletKit.ImportAccount:input_type -> walletrpc.ImportAccountRequest
- 28, // 51: walletrpc.WalletKit.ImportPublicKey:input_type -> walletrpc.ImportPublicKeyRequest
- 30, // 52: walletrpc.WalletKit.ImportTapscript:input_type -> walletrpc.ImportTapscriptRequest
- 35, // 53: walletrpc.WalletKit.PublishTransaction:input_type -> walletrpc.Transaction
- 37, // 54: walletrpc.WalletKit.SubmitPackage:input_type -> walletrpc.SubmitPackageRequest
- 21, // 55: walletrpc.WalletKit.RemoveTransaction:input_type -> walletrpc.GetTransactionRequest
- 41, // 56: walletrpc.WalletKit.SendOutputs:input_type -> walletrpc.SendOutputsRequest
- 43, // 57: walletrpc.WalletKit.EstimateFee:input_type -> walletrpc.EstimateFeeRequest
- 46, // 58: walletrpc.WalletKit.PendingSweeps:input_type -> walletrpc.PendingSweepsRequest
- 48, // 59: walletrpc.WalletKit.BumpFee:input_type -> walletrpc.BumpFeeRequest
- 50, // 60: walletrpc.WalletKit.BumpForceCloseFee:input_type -> walletrpc.BumpForceCloseFeeRequest
- 52, // 61: walletrpc.WalletKit.ListSweeps:input_type -> walletrpc.ListSweepsRequest
- 54, // 62: walletrpc.WalletKit.LabelTransaction:input_type -> walletrpc.LabelTransactionRequest
- 56, // 63: walletrpc.WalletKit.FundPsbt:input_type -> walletrpc.FundPsbtRequest
- 61, // 64: walletrpc.WalletKit.SignPsbt:input_type -> walletrpc.SignPsbtRequest
- 63, // 65: walletrpc.WalletKit.FinalizePsbt:input_type -> walletrpc.FinalizePsbtRequest
- 4, // 66: walletrpc.WalletKit.ListUnspent:output_type -> walletrpc.ListUnspentResponse
- 6, // 67: walletrpc.WalletKit.LeaseOutput:output_type -> walletrpc.LeaseOutputResponse
- 8, // 68: walletrpc.WalletKit.ReleaseOutput:output_type -> walletrpc.ReleaseOutputResponse
- 66, // 69: walletrpc.WalletKit.ListLeases:output_type -> walletrpc.ListLeasesResponse
- 77, // 70: walletrpc.WalletKit.DeriveNextKey:output_type -> signrpc.KeyDescriptor
- 77, // 71: walletrpc.WalletKit.DeriveKey:output_type -> signrpc.KeyDescriptor
- 11, // 72: walletrpc.WalletKit.NextAddr:output_type -> walletrpc.AddrResponse
- 78, // 73: walletrpc.WalletKit.GetTransaction:output_type -> lnrpc.Transaction
- 16, // 74: walletrpc.WalletKit.ListAccounts:output_type -> walletrpc.ListAccountsResponse
- 18, // 75: walletrpc.WalletKit.RequiredReserve:output_type -> walletrpc.RequiredReserveResponse
- 20, // 76: walletrpc.WalletKit.ListAddresses:output_type -> walletrpc.ListAddressesResponse
- 23, // 77: walletrpc.WalletKit.SignMessageWithAddr:output_type -> walletrpc.SignMessageWithAddrResponse
- 25, // 78: walletrpc.WalletKit.VerifyMessageWithAddr:output_type -> walletrpc.VerifyMessageWithAddrResponse
- 27, // 79: walletrpc.WalletKit.ImportAccount:output_type -> walletrpc.ImportAccountResponse
- 29, // 80: walletrpc.WalletKit.ImportPublicKey:output_type -> walletrpc.ImportPublicKeyResponse
- 34, // 81: walletrpc.WalletKit.ImportTapscript:output_type -> walletrpc.ImportTapscriptResponse
- 36, // 82: walletrpc.WalletKit.PublishTransaction:output_type -> walletrpc.PublishResponse
- 39, // 83: walletrpc.WalletKit.SubmitPackage:output_type -> walletrpc.SubmitPackageResponse
- 40, // 84: walletrpc.WalletKit.RemoveTransaction:output_type -> walletrpc.RemoveTransactionResponse
- 42, // 85: walletrpc.WalletKit.SendOutputs:output_type -> walletrpc.SendOutputsResponse
- 44, // 86: walletrpc.WalletKit.EstimateFee:output_type -> walletrpc.EstimateFeeResponse
- 47, // 87: walletrpc.WalletKit.PendingSweeps:output_type -> walletrpc.PendingSweepsResponse
- 49, // 88: walletrpc.WalletKit.BumpFee:output_type -> walletrpc.BumpFeeResponse
- 51, // 89: walletrpc.WalletKit.BumpForceCloseFee:output_type -> walletrpc.BumpForceCloseFeeResponse
- 53, // 90: walletrpc.WalletKit.ListSweeps:output_type -> walletrpc.ListSweepsResponse
- 55, // 91: walletrpc.WalletKit.LabelTransaction:output_type -> walletrpc.LabelTransactionResponse
- 57, // 92: walletrpc.WalletKit.FundPsbt:output_type -> walletrpc.FundPsbtResponse
- 62, // 93: walletrpc.WalletKit.SignPsbt:output_type -> walletrpc.SignPsbtResponse
- 64, // 94: walletrpc.WalletKit.FinalizePsbt:output_type -> walletrpc.FinalizePsbtResponse
- 66, // [66:95] is the sub-list for method output_type
- 37, // [37:66] is the sub-list for method input_type
- 37, // [37:37] is the sub-list for extension type_name
- 37, // [37:37] is the sub-list for extension extendee
- 0, // [0:37] is the sub-list for field type_name
+ 0, // 9: walletrpc.XCreateAccountRequest.address_type:type_name -> walletrpc.AddressType
+ 12, // 10: walletrpc.XCreateAccountResponse.account:type_name -> walletrpc.Account
+ 14, // 11: walletrpc.ListAddressesResponse.account_with_addresses:type_name -> walletrpc.AccountWithAddresses
+ 0, // 12: walletrpc.ImportAccountRequest.address_type:type_name -> walletrpc.AddressType
+ 12, // 13: walletrpc.ImportAccountResponse.account:type_name -> walletrpc.Account
+ 0, // 14: walletrpc.ImportPublicKeyRequest.address_type:type_name -> walletrpc.AddressType
+ 33, // 15: walletrpc.ImportTapscriptRequest.full_tree:type_name -> walletrpc.TapscriptFullTree
+ 35, // 16: walletrpc.ImportTapscriptRequest.partial_reveal:type_name -> walletrpc.TapscriptPartialReveal
+ 34, // 17: walletrpc.TapscriptFullTree.all_leaves:type_name -> walletrpc.TapLeaf
+ 34, // 18: walletrpc.TapscriptPartialReveal.revealed_leaf:type_name -> walletrpc.TapLeaf
+ 69, // 19: walletrpc.SubmitPackageResponse.tx_results:type_name -> walletrpc.SubmitPackageResponse.TxResultsEntry
+ 74, // 20: walletrpc.SendOutputsRequest.outputs:type_name -> signrpc.TxOut
+ 75, // 21: walletrpc.SendOutputsRequest.coin_selection_strategy:type_name -> lnrpc.CoinSelectionStrategy
+ 73, // 22: walletrpc.PendingSweep.outpoint:type_name -> lnrpc.OutPoint
+ 1, // 23: walletrpc.PendingSweep.witness_type:type_name -> walletrpc.WitnessType
+ 47, // 24: walletrpc.PendingSweepsResponse.pending_sweeps:type_name -> walletrpc.PendingSweep
+ 73, // 25: walletrpc.BumpFeeRequest.outpoint:type_name -> lnrpc.OutPoint
+ 76, // 26: walletrpc.BumpForceCloseFeeRequest.chan_point:type_name -> lnrpc.ChannelPoint
+ 77, // 27: walletrpc.ListSweepsResponse.transaction_details:type_name -> lnrpc.TransactionDetails
+ 70, // 28: walletrpc.ListSweepsResponse.transaction_ids:type_name -> walletrpc.ListSweepsResponse.TransactionIDs
+ 60, // 29: walletrpc.FundPsbtRequest.raw:type_name -> walletrpc.TxTemplate
+ 61, // 30: walletrpc.FundPsbtRequest.coin_select:type_name -> walletrpc.PsbtCoinSelect
+ 2, // 31: walletrpc.FundPsbtRequest.change_type:type_name -> walletrpc.ChangeAddressType
+ 75, // 32: walletrpc.FundPsbtRequest.coin_selection_strategy:type_name -> lnrpc.CoinSelectionStrategy
+ 62, // 33: walletrpc.FundPsbtResponse.locked_utxos:type_name -> walletrpc.UtxoLease
+ 73, // 34: walletrpc.TxTemplate.inputs:type_name -> lnrpc.OutPoint
+ 71, // 35: walletrpc.TxTemplate.outputs:type_name -> walletrpc.TxTemplate.OutputsEntry
+ 73, // 36: walletrpc.UtxoLease.outpoint:type_name -> lnrpc.OutPoint
+ 62, // 37: walletrpc.ListLeasesResponse.locked_utxos:type_name -> walletrpc.UtxoLease
+ 40, // 38: walletrpc.SubmitPackageResponse.TxResultsEntry.value:type_name -> walletrpc.SubmitPackageTxResult
+ 3, // 39: walletrpc.WalletKit.ListUnspent:input_type -> walletrpc.ListUnspentRequest
+ 5, // 40: walletrpc.WalletKit.LeaseOutput:input_type -> walletrpc.LeaseOutputRequest
+ 7, // 41: walletrpc.WalletKit.ReleaseOutput:input_type -> walletrpc.ReleaseOutputRequest
+ 67, // 42: walletrpc.WalletKit.ListLeases:input_type -> walletrpc.ListLeasesRequest
+ 9, // 43: walletrpc.WalletKit.DeriveNextKey:input_type -> walletrpc.KeyReq
+ 78, // 44: walletrpc.WalletKit.DeriveKey:input_type -> signrpc.KeyLocator
+ 10, // 45: walletrpc.WalletKit.NextAddr:input_type -> walletrpc.AddrRequest
+ 23, // 46: walletrpc.WalletKit.GetTransaction:input_type -> walletrpc.GetTransactionRequest
+ 15, // 47: walletrpc.WalletKit.ListAccounts:input_type -> walletrpc.ListAccountsRequest
+ 17, // 48: walletrpc.WalletKit.XCreateAccount:input_type -> walletrpc.XCreateAccountRequest
+ 19, // 49: walletrpc.WalletKit.RequiredReserve:input_type -> walletrpc.RequiredReserveRequest
+ 21, // 50: walletrpc.WalletKit.ListAddresses:input_type -> walletrpc.ListAddressesRequest
+ 24, // 51: walletrpc.WalletKit.SignMessageWithAddr:input_type -> walletrpc.SignMessageWithAddrRequest
+ 26, // 52: walletrpc.WalletKit.VerifyMessageWithAddr:input_type -> walletrpc.VerifyMessageWithAddrRequest
+ 28, // 53: walletrpc.WalletKit.ImportAccount:input_type -> walletrpc.ImportAccountRequest
+ 30, // 54: walletrpc.WalletKit.ImportPublicKey:input_type -> walletrpc.ImportPublicKeyRequest
+ 32, // 55: walletrpc.WalletKit.ImportTapscript:input_type -> walletrpc.ImportTapscriptRequest
+ 37, // 56: walletrpc.WalletKit.PublishTransaction:input_type -> walletrpc.Transaction
+ 39, // 57: walletrpc.WalletKit.SubmitPackage:input_type -> walletrpc.SubmitPackageRequest
+ 23, // 58: walletrpc.WalletKit.RemoveTransaction:input_type -> walletrpc.GetTransactionRequest
+ 43, // 59: walletrpc.WalletKit.SendOutputs:input_type -> walletrpc.SendOutputsRequest
+ 45, // 60: walletrpc.WalletKit.EstimateFee:input_type -> walletrpc.EstimateFeeRequest
+ 48, // 61: walletrpc.WalletKit.PendingSweeps:input_type -> walletrpc.PendingSweepsRequest
+ 50, // 62: walletrpc.WalletKit.BumpFee:input_type -> walletrpc.BumpFeeRequest
+ 52, // 63: walletrpc.WalletKit.BumpForceCloseFee:input_type -> walletrpc.BumpForceCloseFeeRequest
+ 54, // 64: walletrpc.WalletKit.ListSweeps:input_type -> walletrpc.ListSweepsRequest
+ 56, // 65: walletrpc.WalletKit.LabelTransaction:input_type -> walletrpc.LabelTransactionRequest
+ 58, // 66: walletrpc.WalletKit.FundPsbt:input_type -> walletrpc.FundPsbtRequest
+ 63, // 67: walletrpc.WalletKit.SignPsbt:input_type -> walletrpc.SignPsbtRequest
+ 65, // 68: walletrpc.WalletKit.FinalizePsbt:input_type -> walletrpc.FinalizePsbtRequest
+ 4, // 69: walletrpc.WalletKit.ListUnspent:output_type -> walletrpc.ListUnspentResponse
+ 6, // 70: walletrpc.WalletKit.LeaseOutput:output_type -> walletrpc.LeaseOutputResponse
+ 8, // 71: walletrpc.WalletKit.ReleaseOutput:output_type -> walletrpc.ReleaseOutputResponse
+ 68, // 72: walletrpc.WalletKit.ListLeases:output_type -> walletrpc.ListLeasesResponse
+ 79, // 73: walletrpc.WalletKit.DeriveNextKey:output_type -> signrpc.KeyDescriptor
+ 79, // 74: walletrpc.WalletKit.DeriveKey:output_type -> signrpc.KeyDescriptor
+ 11, // 75: walletrpc.WalletKit.NextAddr:output_type -> walletrpc.AddrResponse
+ 80, // 76: walletrpc.WalletKit.GetTransaction:output_type -> lnrpc.Transaction
+ 16, // 77: walletrpc.WalletKit.ListAccounts:output_type -> walletrpc.ListAccountsResponse
+ 18, // 78: walletrpc.WalletKit.XCreateAccount:output_type -> walletrpc.XCreateAccountResponse
+ 20, // 79: walletrpc.WalletKit.RequiredReserve:output_type -> walletrpc.RequiredReserveResponse
+ 22, // 80: walletrpc.WalletKit.ListAddresses:output_type -> walletrpc.ListAddressesResponse
+ 25, // 81: walletrpc.WalletKit.SignMessageWithAddr:output_type -> walletrpc.SignMessageWithAddrResponse
+ 27, // 82: walletrpc.WalletKit.VerifyMessageWithAddr:output_type -> walletrpc.VerifyMessageWithAddrResponse
+ 29, // 83: walletrpc.WalletKit.ImportAccount:output_type -> walletrpc.ImportAccountResponse
+ 31, // 84: walletrpc.WalletKit.ImportPublicKey:output_type -> walletrpc.ImportPublicKeyResponse
+ 36, // 85: walletrpc.WalletKit.ImportTapscript:output_type -> walletrpc.ImportTapscriptResponse
+ 38, // 86: walletrpc.WalletKit.PublishTransaction:output_type -> walletrpc.PublishResponse
+ 41, // 87: walletrpc.WalletKit.SubmitPackage:output_type -> walletrpc.SubmitPackageResponse
+ 42, // 88: walletrpc.WalletKit.RemoveTransaction:output_type -> walletrpc.RemoveTransactionResponse
+ 44, // 89: walletrpc.WalletKit.SendOutputs:output_type -> walletrpc.SendOutputsResponse
+ 46, // 90: walletrpc.WalletKit.EstimateFee:output_type -> walletrpc.EstimateFeeResponse
+ 49, // 91: walletrpc.WalletKit.PendingSweeps:output_type -> walletrpc.PendingSweepsResponse
+ 51, // 92: walletrpc.WalletKit.BumpFee:output_type -> walletrpc.BumpFeeResponse
+ 53, // 93: walletrpc.WalletKit.BumpForceCloseFee:output_type -> walletrpc.BumpForceCloseFeeResponse
+ 55, // 94: walletrpc.WalletKit.ListSweeps:output_type -> walletrpc.ListSweepsResponse
+ 57, // 95: walletrpc.WalletKit.LabelTransaction:output_type -> walletrpc.LabelTransactionResponse
+ 59, // 96: walletrpc.WalletKit.FundPsbt:output_type -> walletrpc.FundPsbtResponse
+ 64, // 97: walletrpc.WalletKit.SignPsbt:output_type -> walletrpc.SignPsbtResponse
+ 66, // 98: walletrpc.WalletKit.FinalizePsbt:output_type -> walletrpc.FinalizePsbtResponse
+ 69, // [69:99] is the sub-list for method output_type
+ 39, // [39:69] is the sub-list for method input_type
+ 39, // [39:39] is the sub-list for extension type_name
+ 39, // [39:39] is the sub-list for extension extendee
+ 0, // [0:39] is the sub-list for field type_name
}
func init() { file_walletrpc_walletkit_proto_init() }
func file_walletrpc_walletkit_proto_init() {
if File_walletrpc_walletkit_proto != nil {
return
}
- file_walletrpc_walletkit_proto_msgTypes[27].OneofWrappers = []any{
+ file_walletrpc_walletkit_proto_msgTypes[29].OneofWrappers = []any{
(*ImportTapscriptRequest_FullTree)(nil),
(*ImportTapscriptRequest_PartialReveal)(nil),
(*ImportTapscriptRequest_RootHashOnly)(nil),
(*ImportTapscriptRequest_FullKeyOnly)(nil),
}
- file_walletrpc_walletkit_proto_msgTypes[34].OneofWrappers = []any{}
- file_walletrpc_walletkit_proto_msgTypes[50].OneofWrappers = []any{
+ file_walletrpc_walletkit_proto_msgTypes[36].OneofWrappers = []any{}
+ file_walletrpc_walletkit_proto_msgTypes[52].OneofWrappers = []any{
(*ListSweepsResponse_TransactionDetails)(nil),
(*ListSweepsResponse_TransactionIds)(nil),
}
- file_walletrpc_walletkit_proto_msgTypes[53].OneofWrappers = []any{
+ file_walletrpc_walletkit_proto_msgTypes[55].OneofWrappers = []any{
(*FundPsbtRequest_Psbt)(nil),
(*FundPsbtRequest_Raw)(nil),
(*FundPsbtRequest_CoinSelect)(nil),
(*FundPsbtRequest_TargetConf)(nil),
(*FundPsbtRequest_SatPerVbyte)(nil),
(*FundPsbtRequest_SatPerKw)(nil),
}
- file_walletrpc_walletkit_proto_msgTypes[56].OneofWrappers = []any{
+ file_walletrpc_walletkit_proto_msgTypes[58].OneofWrappers = []any{
(*PsbtCoinSelect_ExistingOutputIndex)(nil),
(*PsbtCoinSelect_Add)(nil),
}
@@ -5316,7 +5453,7 @@ func file_walletrpc_walletkit_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_walletrpc_walletkit_proto_rawDesc), len(file_walletrpc_walletkit_proto_rawDesc)),
NumEnums: 3,
- NumMessages: 67,
+ NumMessages: 69,
NumExtensions: 0,
NumServices: 1,
},
### lnrpc/walletrpc/walletkit.pb.gw.go
@@ -326,6 +326,40 @@ func local_request_WalletKit_ListAccounts_0(ctx context.Context, marshaler runti
}
+func request_WalletKit_XCreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq XCreateAccountRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.XCreateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_WalletKit_XCreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server WalletKitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq XCreateAccountRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.XCreateAccount(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
var (
filter_WalletKit_RequiredReserve_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
@@ -1245,6 +1279,31 @@ func RegisterWalletKitHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
+ mux.Handle("POST", pattern_WalletKit_XCreateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/walletrpc.WalletKit/XCreateAccount", runtime.WithHTTPPathPattern("/v2/wallet/accounts/create"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_WalletKit_XCreateAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_WalletKit_XCreateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_WalletKit_RequiredReserve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1984,6 +2043,28 @@ func RegisterWalletKitHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
+ mux.Handle("POST", pattern_WalletKit_XCreateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/walletrpc.WalletKit/XCreateAccount", runtime.WithHTTPPathPattern("/v2/wallet/accounts/create"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_WalletKit_XCreateAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_WalletKit_XCreateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_WalletKit_RequiredReserve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -2446,6 +2527,8 @@ var (
pattern_WalletKit_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "accounts"}, ""))
+ pattern_WalletKit_XCreateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "accounts", "create"}, ""))
+
pattern_WalletKit_RequiredReserve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "reserve"}, ""))
pattern_WalletKit_ListAddresses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "addresses"}, ""))
@@ -2506,6 +2589,8 @@ var (
forward_WalletKit_ListAccounts_0 = runtime.ForwardResponseMessage
+ forward_WalletKit_XCreateAccount_0 = runtime.ForwardResponseMessage
+
forward_WalletKit_RequiredReserve_0 = runtime.ForwardResponseMessage
forward_WalletKit_ListAddresses_0 = runtime.ForwardResponseMessage
### lnrpc/walletrpc/walletkit.pb.json.go
@@ -247,6 +247,31 @@ func RegisterWalletKitJSONCallbacks(registry map[string]func(ctx context.Context
callback(string(respBytes), nil)
}
+ registry["walletrpc.WalletKit.XCreateAccount"] = func(ctx context.Context,
+ conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
+
+ req := &XCreateAccountRequest{}
+ err := marshaler.Unmarshal([]byte(reqJSON), req)
+ if err != nil {
+ callback("", err)
+ return
+ }
+
+ client := NewWalletKitClient(conn)
+ resp, err := client.XCreateAccount(ctx, req)
+ if err != nil {
+ callback("", err)
+ return
+ }
+
+ respBytes, err := marshaler.Marshal(resp)
+ if err != nil {
+ callback("", err)
+ return
+ }
+ callback(string(respBytes), nil)
+ }
+
registry["walletrpc.WalletKit.RequiredReserve"] = func(ctx context.Context,
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
### lnrpc/walletrpc/walletkit.proto
@@ -87,6 +87,63 @@ service WalletKit {
*/
rpc ListAccounts (ListAccountsRequest) returns (ListAccountsResponse);
+ /* lncli: `wallet accounts create`
+ XCreateAccount is an experimental API that creates a new named account
+ within the wallet, deriving the account's keys from the wallet's master
+ key.
+
+ In contrast to ImportAccount, which registers a watch-only account from an
+ externally supplied extended public key, the account created here is fully
+ owned by the wallet: it derives its own addresses and can sign for its own
+ outputs. That makes it usable as an isolated pocket of funds inside a single
+ wallet, because coin selection, change, balance and address derivation can
+ all be scoped to it by name.
+
+ NOTE: The X prefix marks this API as experimental: it may change or be
+ removed without the usual deprecation period. It additionally requires
+ i_know_what_i_am_doing on release builds, because a seed-only restore does
+ not rediscover the funds an account created here holds; see the recovery
+ note below. That second gate comes off once recovery handles these
+ accounts, at which point the X can be dropped too.
+
+ NOTE: The wallet must be unlocked, as deriving the account key requires
+ access to the master private key.
+
+ NOTE: The call is not idempotent, and the account is created before the
+ response is sent. A client that cancels or times out may still have had
+ the account created, in which case its retry fails with "already exists"
+ — indistinguishable from a genuine name clash. Check ListAccounts before
+ retrying.
+
+ NOTE: The account's address type is permanent and also fixes the type of
+ its change outputs. lnd resolves a custom account name within the key
+ scope implied by the requested address type, so every later call must ask
+ for the address type that maps to the same scope or the account will
+ appear not to exist. NextAddr and NewAddress take lnrpc.AddressType,
+ which has no HYBRID_NESTED_WITNESS_PUBKEY_HASH member: an account created
+ as HYBRID_NESTED_WITNESS_PUBKEY_HASH must be addressed with
+ NESTED_PUBKEY_HASH, which maps to the same BIP-0049Plus scope.
+ TAPROOT_PUBKEY and WITNESS_PUBKEY_HASH map across unchanged.
+
+ NOTE: Funds held in an account created here are not rediscovered by a
+ seed-only recovery, because lnd's recovery scan only rederives addresses
+ for the wallet's default account (btcwallet's RecoveryManager hardcodes
+ waddrmgr.DefaultAccountNum). They are still recoverable, but only by
+ reconstructing the account first, and the account name is not what has to
+ be reproduced: accounts are derived from an index that btcwallet assigns
+ sequentially per key scope, shared with accounts created by ImportAccount.
+
+ To keep an account recoverable, record its key scope, the account index
+ (the account's derivation_path in the response), and how many addresses
+ it has issued. To restore: re-create every account in that key scope in
+ their original order so the index counter lands on the same value,
+ re-derive at least as many addresses as were previously issued with
+ NextAddr — a rescan only searches for addresses already present in the
+ wallet database, and a freshly created account has none — and only then
+ rescan with --reset-wallet-transactions.
+ */
+ rpc XCreateAccount (XCreateAccountRequest) returns (XCreateAccountResponse);
+
/* lncli: `wallet requiredreserve`
RequiredReserve returns the minimum amount of satoshis that should be kept
in the wallet in order to fee bump anchor channels if necessary. The value
@@ -587,6 +644,40 @@ message ListAccountsResponse {
repeated Account accounts = 1;
}
+message XCreateAccountRequest {
+ // The name to identify the new account with. The name must not be empty and
+ // must not already be in use by another account, in any key scope. The
+ // names of the wallet's built-in accounts ("default" and "imported") are
+ // reserved and cannot be used.
+ string name = 1;
+
+ // The type of addresses the account should hold, which selects the BIP-0043
+ // key scope the account is created under. A custom account only ever exists
+ // within a single key scope, so this permanently fixes both the account's
+ // address type and the address type of its change outputs. If unset, an
+ // account holding taproot addresses is created.
+ //
+ // NESTED_WITNESS_PUBKEY_HASH is not accepted: a wallet-derived account
+ // carries no address schema of its own, so it would silently behave as
+ // HYBRID_NESTED_WITNESS_PUBKEY_HASH. Ask for that type explicitly if it
+ // is what you want.
+ AddressType address_type = 2;
+
+ /*
+ Override the requirement for being in dev mode by setting this to true and
+ confirming the user knows what they are doing: funds held in an account
+ created here are not rediscovered by a seed-only restore, so recovering
+ them requires having recorded the account's key scope and index and the
+ number of addresses it issued.
+ */
+ bool i_know_what_i_am_doing = 3;
+}
+
+message XCreateAccountResponse {
+ // The newly created account.
+ Account account = 1;
+}
+
message RequiredReserveRequest {
// The number of additional channels the user would like to open.
uint32 additional_public_channels = 1;
### lnrpc/walletrpc/walletkit.swagger.json
@@ -96,6 +96,40 @@
]
}
},
+ "/v2/wallet/accounts/create": {
+ "post": {
+ "summary": "lncli: `wallet accounts create`\nXCreateAccount is an experimental API that creates a new named account\nwithin the wallet, deriving the account's keys from the wallet's master\nkey.",
+ "description": "In contrast to ImportAccount, which registers a watch-only account from an\nexternally supplied extended public key, the account created here is fully\nowned by the wallet: it derives its own addresses and can sign for its own\noutputs. That makes it usable as an isolated pocket of funds inside a single\nwallet, because coin selection, change, balance and address derivation can\nall be scoped to it by name.\n\nNOTE: The X prefix marks this API as experimental: it may change or be\nremoved without the usual deprecation period. It additionally requires\ni_know_what_i_am_doing on release builds, because a seed-only restore does\nnot rediscover the funds an account created here holds; see the recovery\nnote below. That second gate comes off once recovery handles these\naccounts, at which point the X can be dropped too.\n\nNOTE: The wallet must be unlocked, as deriving the account key requires\naccess to the master private key.\n\nNOTE: The call is not idempotent, and the account is created before the\nresponse is sent. A client that cancels or times out may still have had\nthe account created, in which case its retry fails with \"already exists\"\n— indistinguishable from a genuine name clash. Check ListAccounts before\nretrying.\n\nNOTE: The account's address type is permanent and also fixes the type of\nits change outputs. lnd resolves a custom account name within the key\nscope implied by the requested address type, so every later call must ask\nfor the address type that maps to the same scope or the account will\nappear not to exist. NextAddr and NewAddress take lnrpc.AddressType,\nwhich has no HYBRID_NESTED_WITNESS_PUBKEY_HASH member: an account created\nas HYBRID_NESTED_WITNESS_PUBKEY_HASH must be addressed with\nNESTED_PUBKEY_HASH, which maps to the same BIP-0049Plus scope.\nTAPROOT_PUBKEY and WITNESS_PUBKEY_HASH map across unchanged.\n\nNOTE: Funds held in an account created here are not rediscovered by a\nseed-only recovery, because lnd's recovery scan only rederives addresses\nfor the wallet's default account (btcwallet's RecoveryManager hardcodes\nwaddrmgr.DefaultAccountNum). They are still recoverable, but only by\nreconstructing the account first, and the account name is not what has to\nbe reproduced: accounts are derived from an index that btcwallet assigns\nsequentially per key scope, shared with accounts created by ImportAccount.\n\nTo keep an account recoverable, record its key scope, the account index\n(the account's derivation_path in the response), and how many addresses\nit has issued. To restore: re-create every account in that key scope in\ntheir original order so the index counter lands on the same value,\nre-derive at least as many addresses as were previously issued with\nNextAddr — a rescan only searches for addresses already present in the\nwallet database, and a freshly created account has none — and only then\nrescan with --reset-wallet-transactions.",
+ "operationId": "WalletKit_XCreateAccount",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/walletrpcXCreateAccountResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/walletrpcXCreateAccountRequest"
+ }
+ }
+ ],
+ "tags": [
+ "WalletKit"
+ ]
+ }
+ },
"/v2/wallet/accounts/import": {
"post": {
"summary": "lncli: `wallet accounts import`\nImportAccount imports an account backed by an account extended public key.\nThe master key fingerprint denotes the fingerprint of the root key\ncorresponding to the account public key (also known as the key with\nderivation path m/). This may be required by some hardware wallets for\nproper identification and signing.",
@@ -2458,6 +2492,32 @@
],
"default": "UNKNOWN_WITNESS",
"description": " - COMMITMENT_TIME_LOCK: A witness that allows us to spend the output of a commitment transaction\nafter a relative lock-time lockout.\n - COMMITMENT_NO_DELAY: A witness that allows us to spend a settled no-delay output immediately on a\ncounterparty's commitment transaction.\n - COMMITMENT_REVOKE: A witness that allows us to sweep the settled output of a malicious\ncounterparty's who broadcasts a revoked commitment transaction.\n - HTLC_OFFERED_REVOKE: A witness that allows us to sweep an HTLC which we offered to the remote\nparty in the case that they broadcast a revoked commitment state.\n - HTLC_ACCEPTED_REVOKE: A witness that allows us to sweep an HTLC output sent to us in the case that\nthe remote party broadcasts a revoked commitment state.\n - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL: A witness that allows us to sweep an HTLC output that we extended to a\nparty, but was never fulfilled. This HTLC output isn't directly on the\ncommitment transaction, but is the result of a confirmed second-level HTLC\ntransaction. As a result, we can only spend this after a CSV delay.\n - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL: A witness that allows us to sweep an HTLC output that was offered to us, and\nfor which we have a payment preimage. This HTLC output isn't directly on our\ncommitment transaction, but is the result of confirmed second-level HTLC\ntransaction. As a result, we can only spend this after a CSV delay.\n - HTLC_OFFERED_REMOTE_TIMEOUT: A witness that allows us to sweep an HTLC that we offered to the remote\nparty which lies in the commitment transaction of the remote party. We can\nspend this output after the absolute CLTV timeout of the HTLC as passed.\n - HTLC_ACCEPTED_REMOTE_SUCCESS: A witness that allows us to sweep an HTLC that was offered to us by the\nremote party. We use this witness in the case that the remote party goes to\nchain, and we know the pre-image to the HTLC. We can sweep this without any\nadditional timeout.\n - HTLC_SECOND_LEVEL_REVOKE: A witness that allows us to sweep an HTLC from the remote party's commitment\ntransaction in the case that the broadcast a revoked commitment, but then\nalso immediately attempt to go to the second level to claim the HTLC.\n - WITNESS_KEY_HASH: A witness type that allows us to spend a regular p2wkh output that's sent to\nan output which is under complete control of the backing wallet.\n - NESTED_WITNESS_KEY_HASH: A witness type that allows us to sweep an output that sends to a nested P2SH\nscript that pays to a key solely under our control.\n - COMMITMENT_ANCHOR: A witness type that allows us to spend our anchor on the commitment\ntransaction.\n - COMMITMENT_NO_DELAY_TWEAKLESS: A witness type that is similar to the COMMITMENT_NO_DELAY type,\nbut it omits the tweak that randomizes the key we need to\nspend with a channel peer supplied set of randomness.\n - COMMITMENT_TO_REMOTE_CONFIRMED: A witness type that allows us to spend our output on the counterparty's\ncommitment transaction after a confirmation.\n - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED: A witness type that allows us to sweep an HTLC output that we extended\nto a party, but was never fulfilled. This _is_ the HTLC output directly\non our commitment transaction, and the input to the second-level HTLC\ntimeout transaction. It can only be spent after CLTV expiry, and\ncommitment confirmation.\n - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED: A witness type that allows us to sweep an HTLC output that was offered\nto us, and for which we have a payment preimage. This _is_ the HTLC\noutput directly on our commitment transaction, and the input to the\nsecond-level HTLC success transaction. It can only be spent after the\ncommitment has confirmed.\n - LEASE_COMMITMENT_TIME_LOCK: A witness type that allows us to spend our output on our local\ncommitment transaction after a relative and absolute lock-time lockout as\npart of the script enforced lease commitment type.\n - LEASE_COMMITMENT_TO_REMOTE_CONFIRMED: A witness type that allows us to spend our output on the counterparty's\ncommitment transaction after a confirmation and absolute locktime as part\nof the script enforced lease commitment type.\n - LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL: A witness type that allows us to sweep an HTLC output that we extended\nto a party, but was never fulfilled. This HTLC output isn't directly on\nthe commitment transaction, but is the result of a confirmed second-level\nHTLC transaction. As a result, we can only spend this after a CSV delay\nand CLTV locktime as part of the script enforced lease commitment type.\n - LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL: A witness type that allows us to sweep an HTLC output that was offered\nto us, and for which we have a payment preimage. This HTLC output isn't\ndirectly on our commitment transaction, but is the result of confirmed\nsecond-level HTLC transaction. As a result, we can only spend this after\na CSV delay and CLTV locktime as part of the script enforced lease\ncommitment type.\n - TAPROOT_PUB_KEY_SPEND: A witness type that allows us to spend a regular p2tr output that's sent\nto an output which is under complete control of the backing wallet.\n - TAPROOT_LOCAL_COMMIT_SPEND: A witness type that allows us to spend our settled local commitment after a\nCSV delay when we force close the channel.\n - TAPROOT_REMOTE_COMMIT_SPEND: A witness type that allows us to spend our settled local commitment after\na CSV delay when the remote party has force closed the channel.\n - TAPROOT_ANCHOR_SWEEP_SPEND: A witness type that we'll use for spending our own anchor output.\n - TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL: A witness that allows us to timeout an HTLC we offered to the remote party\non our commitment transaction. We use this when we need to go on chain to\ntime out an HTLC.\n - TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL: A witness type that allows us to sweep an HTLC we accepted on our commitment\ntransaction after we go to the second level on chain.\n - TAPROOT_HTLC_SECOND_LEVEL_REVOKE: A witness that allows us to sweep an HTLC on the revoked transaction of the\nremote party that goes to the second level.\n - TAPROOT_HTLC_ACCEPTED_REVOKE: A witness that allows us to sweep an HTLC sent to us by the remote party\nin the event that they broadcast a revoked state.\n - TAPROOT_HTLC_OFFERED_REVOKE: A witness that allows us to sweep an HTLC we offered to the remote party if\nthey broadcast a revoked commitment.\n - TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT: A witness that allows us to sweep an HTLC we offered to the remote party\nthat lies on the commitment transaction for the remote party. We can spend\nthis output after the absolute CLTV timeout of the HTLC as passed.\n - TAPROOT_HTLC_LOCAL_OFFERED_TIMEOUT: A witness type that allows us to sign the second level HTLC timeout\ntransaction when spending from an HTLC residing on our local commitment\ntransaction.\nThis is used by the sweeper to re-sign inputs if it needs to aggregate\nseveral second level HTLCs.\n - TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS: A witness that allows us to sweep an HTLC that was offered to us by the\nremote party for a taproot channels. We use this witness in the case that\nthe remote party goes to chain, and we know the pre-image to the HTLC. We\ncan sweep this without any additional timeout.\n - TAPROOT_HTLC_ACCEPTED_LOCAL_SUCCESS: A witness type that allows us to sweep the HTLC offered to us on our local\ncommitment transaction. We'll use this when we need to go on chain to sweep\nthe HTLC. In this case, this is the second level HTLC success transaction.\n - TAPROOT_COMMITMENT_REVOKE: A witness that allows us to sweep the settled output of a malicious\ncounterparty's who broadcasts a revoked taproot commitment transaction.\n - TAPROOT_LOCAL_COMMIT_SPEND_FINAL: A witness type that allows us to spend our settled local commitment after a\nCSV delay when we force close a production taproot channel.\n - TAPROOT_REMOTE_COMMIT_SPEND_FINAL: A witness type that allows us to spend our settled local commitment after\na CSV delay when the remote party has force closed a production taproot\nchannel.\n - TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_FINAL: A witness that allows us to timeout an HTLC we offered to the remote party\non our production taproot commitment transaction. We use this when we need\nto go on chain to time out an HTLC.\n - TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_FINAL: A witness type that allows us to sweep an HTLC we accepted on our\nproduction taproot commitment transaction after we go to the second level\non chain.\n - TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT_FINAL: A witness that allows us to sweep an HTLC we offered to the remote party\nthat lies on the production taproot commitment transaction for the remote\nparty. We can spend this output after the absolute CLTV timeout of the\nHTLC as passed.\n - TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS_FINAL: A witness that allows us to sweep an HTLC that was offered to us by the\nremote party for a production taproot channel. We use this witness in the\ncase that the remote party goes to chain, and we know the pre-image to the\nHTLC. We can sweep this without any additional timeout.\n - TAPROOT_COMMITMENT_REVOKE_FINAL: A witness type that allows us to sweep the settled output of a malicious\ncounterparty's who broadcasts a revoked production taproot commitment\ntransaction."
+ },
+ "walletrpcXCreateAccountRequest": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name to identify the new account with. The name must not be empty and\nmust not already be in use by another account, in any key scope. The\nnames of the wallet's built-in accounts (\"default\" and \"imported\") are\nreserved and cannot be used."
+ },
+ "address_type": {
+ "$ref": "#/definitions/walletrpcAddressType",
+ "description": "The type of addresses the account should hold, which selects the BIP-0043\nkey scope the account is created under. A custom account only ever exists\nwithin a single key scope, so this permanently fixes both the account's\naddress type and the address type of its change outputs. If unset, an\naccount holding taproot addresses is created.\n\nNESTED_WITNESS_PUBKEY_HASH is not accepted: a wallet-derived account\ncarries no address schema of its own, so it would silently behave as\nHYBRID_NESTED_WITNESS_PUBKEY_HASH. Ask for that type explicitly if it\nis what you want."
+ },
+ "i_know_what_i_am_doing": {
+ "type": "boolean",
+ "description": "Override the requirement for being in dev mode by setting this to true and\nconfirming the user knows what they are doing: funds held in an account\ncreated here are not rediscovered by a seed-only restore, so recovering\nthem requires having recorded the account's key scope and index and the\nnumber of addresses it issued."
+ }
+ }
+ },
+ "walletrpcXCreateAccountResponse": {
+ "type": "object",
+ "properties": {
+ "account": {
+ "$ref": "#/definitions/walletrpcAccount",
+ "description": "The newly created account."
+ }
+ }
}
}
}
### lnrpc/walletrpc/walletkit.yaml
@@ -63,6 +63,9 @@ http:
body: "*"
- selector: walletrpc.WalletKit.ListAccounts
get: "/v2/wallet/accounts"
+ - selector: walletrpc.WalletKit.XCreateAccount
+ post: "/v2/wallet/accounts/create"
+ body: "*"
- selector: walletrpc.WalletKit.RequiredReserve
get: "/v2/wallet/reserve"
- selector: walletrpc.WalletKit.ListAddresses
### lnrpc/walletrpc/walletkit_grpc.pb.go
@@ -57,6 +57,61 @@ type WalletKitClient interface {
// name and key scope filter can be provided to filter through all of the
// wallet accounts and return only those matching.
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
+ // lncli: `wallet accounts create`
+ // XCreateAccount is an experimental API that creates a new named account
+ // within the wallet, deriving the account's keys from the wallet's master
+ // key.
+ //
+ // In contrast to ImportAccount, which registers a watch-only account from an
+ // externally supplied extended public key, the account created here is fully
+ // owned by the wallet: it derives its own addresses and can sign for its own
+ // outputs. That makes it usable as an isolated pocket of funds inside a single
+ // wallet, because coin selection, change, balance and address derivation can
+ // all be scoped to it by name.
+ //
+ // NOTE: The X prefix marks this API as experimental: it may change or be
+ // removed without the usual deprecation period. It additionally requires
+ // i_know_what_i_am_doing on release builds, because a seed-only restore does
+ // not rediscover the funds an account created here holds; see the recovery
+ // note below. That second gate comes off once recovery handles these
+ // accounts, at which point the X can be dropped too.
+ //
+ // NOTE: The wallet must be unlocked, as deriving the account key requires
+ // access to the master private key.
+ //
+ // NOTE: The call is not idempotent, and the account is created before the
+ // response is sent. A client that cancels or times out may still have had
+ // the account created, in which case its retry fails with "already exists"
+ // — indistinguishable from a genuine name clash. Check ListAccounts before
+ // retrying.
+ //
+ // NOTE: The account's address type is permanent and also fixes the type of
+ // its change outputs. lnd resolves a custom account name within the key
+ // scope implied by the requested address type, so every later call must ask
+ // for the address type that maps to the same scope or the account will
+ // appear not to exist. NextAddr and NewAddress take lnrpc.AddressType,
+ // which has no HYBRID_NESTED_WITNESS_PUBKEY_HASH member: an account created
+ // as HYBRID_NESTED_WITNESS_PUBKEY_HASH must be addressed with
+ // NESTED_PUBKEY_HASH, which maps to the same BIP-0049Plus scope.
+ // TAPROOT_PUBKEY and WITNESS_PUBKEY_HASH map across unchanged.
+ //
+ // NOTE: Funds held in an account created here are not rediscovered by a
+ // seed-only recovery, because lnd's recovery scan only rederives addresses
+ // for the wallet's default account (btcwallet's RecoveryManager hardcodes
+ // waddrmgr.DefaultAccountNum). They are still recoverable, but only by
+ // reconstructing the account first, and the account name is not what has to
+ // be reproduced: accounts are derived from an index that btcwallet assigns
+ // sequentially per key scope, shared with accounts created by ImportAccount.
+ //
+ // To keep an account recoverable, record its key scope, the account index
+ // (the account's derivation_path in the response), and how many addresses
+ // it has issued. To restore: re-create every account in that key scope in
+ // their original order so the index counter lands on the same value,
+ // re-derive at least as many addresses as were previously issued with
+ // NextAddr — a rescan only searches for addresses already present in the
+ // wallet database, and a freshly created account has none — and only then
+ // rescan with --reset-wallet-transactions.
+ XCreateAccount(ctx context.Context, in *XCreateAccountRequest, opts ...grpc.CallOption) (*XCreateAccountResponse, error)
// lncli: `wallet requiredreserve`
// RequiredReserve returns the minimum amount of satoshis that should be kept
// in the wallet in order to fee bump anchor channels if necessary. The value
@@ -383,6 +438,15 @@ func (c *walletKitClient) ListAccounts(ctx context.Context, in *ListAccountsRequ
return out, nil
}
+func (c *walletKitClient) XCreateAccount(ctx context.Context, in *XCreateAccountRequest, opts ...grpc.CallOption) (*XCreateAccountResponse, error) {
+ out := new(XCreateAccountResponse)
+ err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/XCreateAccount", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *walletKitClient) RequiredReserve(ctx context.Context, in *RequiredReserveRequest, opts ...grpc.CallOption) (*RequiredReserveResponse, error) {
out := new(RequiredReserveResponse)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/RequiredReserve", in, out, opts...)
@@ -604,6 +668,61 @@ type WalletKitServer interface {
// name and key scope filter can be provided to filter through all of the
// wallet accounts and return only those matching.
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
+ // lncli: `wallet accounts create`
+ // XCreateAccount is an experimental API that creates a new named account
+ // within the wallet, deriving the account's keys from the wallet's master
+ // key.
+ //
+ // In contrast to ImportAccount, which registers a watch-only account from an
+ // externally supplied extended public key, the account created here is fully
+ // owned by the wallet: it derives its own addresses and can sign for its own
+ // outputs. That makes it usable as an isolated pocket of funds inside a single
+ // wallet, because coin selection, change, balance and address derivation can
+ // all be scoped to it by name.
+ //
+ // NOTE: The X prefix marks this API as experimental: it may change or be
+ // removed without the usual deprecation period. It additionally requires
+ // i_know_what_i_am_doing on release builds, because a seed-only restore does
+ // not rediscover the funds an account created here holds; see the recovery
+ // note below. That second gate comes off once recovery handles these
+ // accounts, at which point the X can be dropped too.
+ //
+ // NOTE: The wallet must be unlocked, as deriving the account key requires
+ // access to the master private key.
+ //
+ // NOTE: The call is not idempotent, and the account is created before the
+ // response is sent. A client that cancels or times out may still have had
+ // the account created, in which case its retry fails with "already exists"
+ // — indistinguishable from a genuine name clash. Check ListAccounts before
+ // retrying.
+ //
+ // NOTE: The account's address type is permanent and also fixes the type of
+ // its change outputs. lnd resolves a custom account name within the key
+ // scope implied by the requested address type, so every later call must ask
+ // for the address type that maps to the same scope or the account will
+ // appear not to exist. NextAddr and NewAddress take lnrpc.AddressType,
+ // which has no HYBRID_NESTED_WITNESS_PUBKEY_HASH member: an account created
+ // as HYBRID_NESTED_WITNESS_PUBKEY_HASH must be addressed with
+ // NESTED_PUBKEY_HASH, which maps to the same BIP-0049Plus scope.
+ // TAPROOT_PUBKEY and WITNESS_PUBKEY_HASH map across unchanged.
+ //
+ // NOTE: Funds held in an account created here are not rediscovered by a
+ // seed-only recovery, because lnd's recovery scan only rederives addresses
+ // for the wallet's default account (btcwallet's RecoveryManager hardcodes
+ // waddrmgr.DefaultAccountNum). They are still recoverable, but only by
+ // reconstructing the account first, and the account name is not what has to
+ // be reproduced: accounts are derived from an index that btcwallet assigns
+ // sequentially per key scope, shared with accounts created by ImportAccount.
+ //
+ // To keep an account recoverable, record its key scope, the account index
+ // (the account's derivation_path in the response), and how many addresses
+ // it has issued. To restore: re-create every account in that key scope in
+ // their original order so the index counter lands on the same value,
+ // re-derive at least as many addresses as were previously issued with
+ // NextAddr — a rescan only searches for addresses already present in the
+ // wallet database, and a freshly created account has none — and only then
+ // rescan with --reset-wallet-transactions.
+ XCreateAccount(context.Context, *XCreateAccountRequest) (*XCreateAccountResponse, error)
// lncli: `wallet requiredreserve`
// RequiredReserve returns the minimum amount of satoshis that should be kept
// in the wallet in order to fee bump anchor channels if necessary. The value
@@ -873,6 +992,9 @@ func (UnimplementedWalletKitServer) GetTransaction(context.Context, *GetTransact
func (UnimplementedWalletKitServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
}
+func (UnimplementedWalletKitServer) XCreateAccount(context.Context, *XCreateAccountRequest) (*XCreateAccountResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method XCreateAccount not implemented")
+}
func (UnimplementedWalletKitServer) RequiredReserve(context.Context, *RequiredReserveRequest) (*RequiredReserveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RequiredReserve not implemented")
}
@@ -1108,6 +1230,24 @@ func _WalletKit_ListAccounts_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
+func _WalletKit_XCreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(XCreateAccountRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(WalletKitServer).XCreateAccount(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/walletrpc.WalletKit/XCreateAccount",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(WalletKitServer).XCreateAccount(ctx, req.(*XCreateAccountRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _WalletKit_RequiredReserve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequiredReserveRequest)
if err := dec(in); err != nil {
@@ -1511,6 +1651,10 @@ var WalletKit_ServiceDesc = grpc.ServiceDesc{
MethodName: "ListAccounts",
Handler: _WalletKit_ListAccounts_Handler,
},
+ {
+ MethodName: "XCreateAccount",
+ Handler: _WalletKit_XCreateAccount_Handler,
+ },
{
MethodName: "RequiredReserve",
Handler: _WalletKit_RequiredReserve_Handler,
### lnrpc/walletrpc/walletkit_server.go
@@ -32,6 +32,7 @@ import (
base "github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/contractcourt"
@@ -171,6 +172,10 @@ var (
Entity: "onchain",
Action: "read",
}},
+ "/walletrpc.WalletKit/XCreateAccount": {{
+ Entity: "onchain",
+ Action: "write",
+ }},
"/walletrpc.WalletKit/RequiredReserve": {{
Entity: "onchain",
Action: "read",
@@ -2692,6 +2697,95 @@ func (w *WalletKit) ListAccounts(ctx context.Context,
return &ListAccountsResponse{Accounts: rpcAccounts}, nil
}
+// errAccountCreationNotAcked is returned on a release build when the caller
+// has not acknowledged that a created account is invisible to a seed-only
+// restore.
+var errAccountCreationNotAcked = errors.New("XCreateAccount is experimental: " +
+ "funds in a created account are NOT rediscovered by a seed-only " +
+ "restore. Set i_know_what_i_am_doing to proceed, having recorded the " +
+ "account's key scope and index")
+
+// defaultXCreateAccountAddrType is the address type a new account is created
+// with when the request does not specify one. A custom account lives in exactly
+// one key scope, and that scope permanently fixes the address type of both its
+// receive and its change addresses, so an unset value cannot be resolved later.
+// Taproot is chosen because it is the most recent scope the wallet supports and
+// its outputs are the cheapest to spend.
+const defaultXCreateAccountAddrType = AddressType_TAPROOT_PUBKEY
+
+// XCreateAccount is an experimental API that creates a new named account
+// within the wallet, deriving the account's keys from the wallet's master
+// key.
+//
+// In contrast to ImportAccount, which registers a watch-only account from an
+// externally supplied extended public key, the account created here is fully
+// owned by the wallet: it derives its own addresses and can sign for its own
+// outputs. That makes it usable as an isolated pocket of funds inside a single
+// wallet, because coin selection, change, balance and address derivation can
+// all be scoped to it by name.
+func (w *WalletKit) XCreateAccount(_ context.Context,
+ req *XCreateAccountRequest) (*XCreateAccountResponse, error) {
+
+ // Kept behind an explicit acknowledgement while recovery cannot find
+ // these accounts: funds held in one are not rediscovered by a
+ // seed-only restore, and reconstructing it by hand means reproducing
+ // its key scope, its account index and the addresses it issued. That
+ // is a foot-gun rather than a reason to withhold the RPC, so this
+ // follows AbandonChannel: available in dev builds, and on release
+ // builds to a caller that attests to knowing the consequence.
+ // Removing the gate is the last step of fixing recovery.
+ if !req.GetIKnowWhatIAmDoing() && !build.IsDevBuild() {
+ return nil, errAccountCreationNotAcked
+ }
+
+ addrType := req.AddressType
+ if addrType == AddressType_UNKNOWN {
+ addrType = defaultXCreateAccountAddrType
+ }
+
+ // Map the requested address type onto the key scope the account will
+ // live in.
+ var keyScope waddrmgr.KeyScope
+ switch addrType {
+ case AddressType_WITNESS_PUBKEY_HASH:
+ keyScope = waddrmgr.KeyScopeBIP0084
+
+ // An account derived by the wallet stores no address schema of its own,
+ // so BIP-0049Plus always behaves as the hybrid scheme (nested pubkeys
+ // externally, witness pubkeys internally). Honouring a request for the
+ // strict nested scheme is impossible here, and silently substituting
+ // the hybrid one would hand back an account whose change outputs are
+ // not what the caller asked for.
+ case AddressType_NESTED_WITNESS_PUBKEY_HASH:
+ return nil, fmt.Errorf("address type %v cannot be created; "+
+ "use %v, which is what a wallet-derived account of "+
+ "this key scope provides", req.AddressType,
+ AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH)
+
+ case AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH:
+ keyScope = waddrmgr.KeyScopeBIP0049Plus
+
+ case AddressType_TAPROOT_PUBKEY:
+ keyScope = waddrmgr.KeyScopeBIP0086
+
+ default:
+ return nil, fmt.Errorf("unhandled address type %v",
+ req.AddressType)
+ }
+
+ account, err := w.cfg.Wallet.CreateAccount(keyScope, req.Name)
+ if err != nil {
+ return nil, err
+ }
+
+ rpcAccount, err := marshalWalletAccount(w.internalScope(), account)
+ if err != nil {
+ return nil, err
+ }
+
+ return &XCreateAccountResponse{Account: rpcAccount}, nil
+}
+
// RequiredReserve returns the minimum amount of satoshis that should be
// kept in the wallet in order to fee bump anchor channels if necessary.
// The value scales with the number of public anchor channels but is
### lnrpc/walletrpc/xcreate_account_gate_test.go
@@ -0,0 +1,52 @@
+//go:build walletrpc
+// +build walletrpc
+
+package walletrpc
+
+import (
+ "testing"
+
+ "github.com/lightningnetwork/lnd/build"
+ "github.com/stretchr/testify/require"
+)
+
+// TestXCreateAccountExperimentalGate asserts the acknowledgement gate, which is
+// what keeps an operator from creating an unrecoverable account by accident.
+//
+// The gate has to admit two callers: a dev build, and a release build whose
+// caller has explicitly attested. Getting this wrong in the strict direction
+// makes the RPC unusable on the release images real deployments run; getting
+// it wrong in the loose direction silently drops the warning entirely.
+func TestXCreateAccountExperimentalGate(t *testing.T) {
+ t.Parallel()
+
+ if build.IsDevBuild() {
+ // A dev build lets the call through, so it would reach the
+ // wallet and there is nothing to assert here without one. That
+ // direction is covered by the itest, whose binaries are built
+ // with this tag.
+ t.Skip("gate is open on dev builds; covered by the itest")
+ }
+
+ // The wallet is never reached when the gate refuses, so a nil config
+ // is enough to prove the refusal happens first.
+ w := &WalletKit{}
+
+ _, err := w.XCreateAccount(t.Context(), &XCreateAccountRequest{
+ Name: "custom",
+ AddressType: AddressType_TAPROOT_PUBKEY,
+ })
+ require.ErrorIs(t, err, errAccountCreationNotAcked)
+
+ // The same request with the acknowledgement set gets past the gate,
+ // which on a nil wallet means it panics rather than returning the
+ // refusal — so assert on the gate, not on what follows it.
+ require.Panics(t, func() {
+ //nolint:errcheck // Panics past the gate, which is the point.
+ w.XCreateAccount(t.Context(), &XCreateAccountRequest{
+ Name: "custom",
+ AddressType: AddressType_TAPROOT_PUBKEY,
+ IKnowWhatIAmDoing: true,
+ })
+ }, "acknowledged request must get past the gate")
+}
### lntest/mock/walletcontroller.go
@@ -124,6 +124,13 @@ func (w *WalletController) ListAddresses(string,
return nil, nil
}
+// CreateAccount currently returns a dummy value.
+func (w *WalletController) CreateAccount(waddrmgr.KeyScope,
+ string) (*waddrmgr.AccountProperties, error) {
+
+ return nil, nil
+}
+
// ImportAccount currently returns a dummy value.
func (w *WalletController) ImportAccount(string, *hdkeychain.ExtendedKey,
uint32, *waddrmgr.AddressType, bool) (*waddrmgr.AccountProperties,
### lntest/rpc/wallet_kit.go
@@ -303,6 +303,33 @@ func (h *HarnessRPC) ListAccounts(
return resp
}
+// XCreateAccount makes a RPC call to the node's WalletKitClient and asserts.
+func (h *HarnessRPC) XCreateAccount(req *walletrpc.XCreateAccountRequest,
+) *walletrpc.XCreateAccountResponse {
+
+ ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
+ defer cancel()
+
+ resp, err := h.WalletKit.XCreateAccount(ctxt, req)
+ h.NoError(err, "XCreateAccount")
+
+ return resp
+}
+
+// XCreateAccountAssertErr makes the XCreateAccount RPC call and asserts an
+// error is returned. It then returns the error.
+func (h *HarnessRPC) XCreateAccountAssertErr(
+ req *walletrpc.XCreateAccountRequest) error {
+
+ ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
+ defer cancel()
+
+ _, err := h.WalletKit.XCreateAccount(ctxt, req)
+ require.Error(h, err)
+
+ return err
+}
+
// ImportAccount makes a RPC call to the node's WalletKitClient and asserts.
func (h *HarnessRPC) ImportAccount(
req *walletrpc.ImportAccountRequest) *walletrpc.ImportAccountResponse {
### lnwallet/btcwallet/btcwallet.go
@@ -99,6 +99,17 @@ type BtcWallet struct {
chainKeyScope waddrmgr.KeyScope
+ // accountMtx serialises the calls that add a named account, meaning
+ // CreateAccount and ImportAccount. Both do the same check-then-act
+ // against the same invariant — a name must exist in at most one key
+ // scope — and both need two database transactions to do it, since
+ // btcwallet exposes no way to check and create in one. Without a lock
+ // covering both, two concurrent calls (in either combination) can pass
+ // their duplicate checks and then each create the name under a
+ // different scope, which is precisely the ambiguity the checks exist
+ // to prevent.
+ accountMtx sync.Mutex
+
blockCache *blockcache.BlockCache
*input.MusigSessionManager
@@ -477,6 +488,27 @@ func (b *BtcWallet) keyScopeForAccountAddr(accountName string,
// key scope.
accountNumber, err := b.wallet.AccountNumber(addrKeyScope, accountName)
if err != nil {
+ // A custom account lives in exactly one key scope — one of
+ // BIP-0049Plus, BIP-0084 or BIP-0086, fixed when it was
+ // created — so asking for an address type that maps elsewhere
+ // reports the account as missing even though it exists. That
+ // bare "not found" says nothing about which scope to ask for,
+ // so check whether the name resolves anywhere before passing
+ // it on.
+ if waddrmgr.IsError(err, waddrmgr.ErrAccountNotFound) {
+ scope, _, lookupErr := b.lookupFirstCustomAccount(
+ accountName,
+ )
+ if lookupErr == nil {
+ return waddrmgr.KeyScope{}, 0, fmt.Errorf(
+ "account %v exists under key scope "+
+ "%v, not %v; request the "+
+ "address type belonging to "+
+ "that scope instead",
+ accountName, scope, addrKeyScope)
+ }
+ }
+
return waddrmgr.KeyScope{}, 0, err
}
@@ -790,6 +822,100 @@ func (b *BtcWallet) ListAddresses(name string,
return addresses, nil
}
+// accountCreator is the subset of btcwallet's wallet API needed to derive a
+// brand new account from the wallet's master key. It is declared here because
+// btcwallet's base.Interface does not include NextAccount yet.
+type accountCreator interface {
+ // NextAccount creates the next account within the given key scope and
+ // returns its account number.
+ NextAccount(scope waddrmgr.KeyScope, name string) (uint32, error)
+}
+
+// CreateAccount creates a new account within the given key scope, deriving the
+// account's keys from the wallet's master key.
+//
+// In contrast to ImportAccount, which registers a watch-only account from an
+// externally supplied extended public key, the account created here is fully
+// owned by the wallet: it derives its own addresses and can sign for its own
+// outputs. That makes it usable as an isolated pocket of funds inside a single
+// wallet, because coin selection, change, balance and address derivation can
+// all be scoped to it by name.
+//
+// NOTE: The wallet must be unlocked, as deriving the account key requires
+// access to the master private key.
+//
+// This is a part of the WalletController interface.
+func (b *BtcWallet) CreateAccount(keyScope waddrmgr.KeyScope,
+ name string) (*waddrmgr.AccountProperties, error) {
+
+ if name == "" {
+ return nil, errors.New("account name is required")
+ }
+
+ // The wallet creates both of these accounts itself, in every key scope,
+ // and neither is backed by a derived account key we could recreate
+ // here.
+ if name == lnwallet.DefaultAccountName ||
+ name == waddrmgr.ImportedAddrAccountName {
+
+ return nil, fmt.Errorf("account name %v is reserved by the "+
+ "wallet", name)
+ }
+
+ // Everything below reads and then mutates the account namespace, and
+ // btcwallet cannot do that in one database transaction, so hold the
+ // lock across both. It only serialises callers within this process;
+ // nothing stops a second process driving the same wallet, but lnd is
+ // the sole writer of its own.
+ b.accountMtx.Lock()
+ defer b.accountMtx.Unlock()
+
+ // Reject a duplicate name in *any* key scope, not just the requested
+ // one. Coin selection resolves a custom account name through
+ // lookupFirstCustomAccount, which returns whichever scope happens to
+ // match first, so the same name existing under two scopes would make
+ // every later funding call for that name ambiguous. btcwallet's own
+ // duplicate check is per-scope, so it would not catch that.
+ _, err := b.ListAccounts(name, nil)
+ switch {
+ case err == nil:
+ return nil, fmt.Errorf("account %v already exists", name)
+
+ // The name is free in every scope, which is what we want.
+ case waddrmgr.IsError(err, waddrmgr.ErrAccountNotFound):
+
+ default:
+ return nil, err
+ }
+
+ // btcwallet's base.Interface does not expose NextAccount yet, even
+ // though the concrete *wallet.Wallet implements it. Assert for the
+ // capability instead of widening the interface, so lnd doesn't need to
+ // carry a forked btcwallet: a replace directive here would not
+ // propagate to modules that depend on lnd, and would have to be
+ // duplicated by every one of them. This assertion can be dropped once
+ // NextAccount is part of base.Interface upstream.
+ creator, ok := b.wallet.(accountCreator)
+ if !ok {
+ return nil, fmt.Errorf("wallet of type %T does not support "+
+ "creating accounts", b.wallet)
+ }
+
+ account, err := creator.NextAccount(keyScope, name)
+ if err != nil {
+ return nil, fmt.Errorf("unable to create account %v: %w",
+ name, err)
+ }
+
+ props, err := b.wallet.AccountProperties(keyScope, account)
+ if err != nil {
+ return nil, fmt.Errorf("unable to fetch properties of new "+
+ "account %v: %w", name, err)
+ }
+
+ return props, nil
+}
+
// ImportAccount imports an account backed by an account extended public key.
// The master key fingerprint denotes the fingerprint of the root key
// corresponding to the account public key (also known as the key with
@@ -820,6 +946,12 @@ func (b *BtcWallet) ImportAccount(name string, accountPubKey *hdkeychain.Extende
dryRun bool) (*waddrmgr.AccountProperties, []address.Address,
[]address.Address, error) {
+ // This shares the account namespace with CreateAccount and does the
+ // same check-then-act against it, so it takes the same lock; see the
+ // field's documentation.
+ b.accountMtx.Lock()
+ defer b.accountMtx.Unlock()
+
// For custom accounts, we first check if there is no existing account
// with the same name.
if name != lnwallet.DefaultAccountName &&
### lnwallet/btcwallet/create_account_test.go
@@ -0,0 +1,334 @@
+package btcwallet
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+ "sync"
+ "testing"
+ "time"
+
+ "github.com/btcsuite/btcwallet/waddrmgr"
+ base "github.com/btcsuite/btcwallet/wallet"
+ "github.com/lightningnetwork/lnd/lnwallet"
+ "github.com/stretchr/testify/require"
+)
+
+// createAccountWallet is a minimal fake of btcwallet's base.Interface covering
+// only the calls CreateAccount makes. The embedded interface is deliberately
+// left nil so that any additional call this test does not expect panics loudly
+// rather than silently returning a zero value.
+type createAccountWallet struct {
+ base.Interface
+
+ // existing maps a key scope to the account names that already exist in
+ // it, which drives the duplicate-name lookups.
+ existing map[waddrmgr.KeyScope][]string
+
+ // createdScope and createdName record the arguments of the NextAccount
+ // call so the test can assert the scope was forwarded unchanged.
+ createdScope waddrmgr.KeyScope
+ createdName string
+
+ // nextAccountErr, when set, is returned by NextAccount.
+ nextAccountErr error
+}
+
+// AccountPropertiesByName reports whether the named account exists in the given
+// scope, mirroring waddrmgr's not-found error so that the caller's
+// waddrmgr.IsError check behaves as it does against a real wallet.
+func (w *createAccountWallet) AccountPropertiesByName(scope waddrmgr.KeyScope,
+ name string) (*waddrmgr.AccountProperties, error) {
+
+ if slices.Contains(w.existing[scope], name) {
+ return &waddrmgr.AccountProperties{
+ AccountName: name,
+ }, nil
+ }
+
+ return nil, newAccountNotFoundError(name)
+}
+
+// lookupOnlyWallet answers the duplicate-name lookups but deliberately does not
+// implement NextAccount, standing in for a wallet backend that cannot derive
+// new accounts.
+type lookupOnlyWallet struct {
+ base.Interface
+}
+
+// AccountPropertiesByName always reports the account as missing.
+func (w *lookupOnlyWallet) AccountPropertiesByName(_ waddrmgr.KeyScope,
+ name string) (*waddrmgr.AccountProperties, error) {
+
+ return nil, newAccountNotFoundError(name)
+}
+
+// NextAccount records the requested scope and name.
+func (w *createAccountWallet) NextAccount(scope waddrmgr.KeyScope,
+ name string) (uint32, error) {
+
+ if w.nextAccountErr != nil {
+ return 0, w.nextAccountErr
+ }
+
+ w.createdScope = scope
+ w.createdName = name
+
+ return 7, nil
+}
+
+// AccountProperties returns the properties of the freshly created account.
+func (w *createAccountWallet) AccountProperties(_ waddrmgr.KeyScope,
+ account uint32) (*waddrmgr.AccountProperties, error) {
+
+ return &waddrmgr.AccountProperties{
+ AccountNumber: account,
+ AccountName: w.createdName,
+ }, nil
+}
+
+// TestCreateAccount asserts the guard rails around creating a wallet-owned
+// account: the wallet's own reserved account names cannot be taken, a name may
+// not be reused, and the requested key scope is what the account is created in.
+func TestCreateAccount(t *testing.T) {
+ t.Parallel()
+
+ const accountName = "custom"
+
+ tests := []struct {
+ name string
+ accountName string
+ keyScope waddrmgr.KeyScope
+ existing map[waddrmgr.KeyScope][]string
+ expectedErr string
+ }{{
+ name: "taproot account created",
+ accountName: accountName,
+ keyScope: waddrmgr.KeyScopeBIP0086,
+ }, {
+ name: "witness pubkey account created",
+ accountName: accountName,
+ keyScope: waddrmgr.KeyScopeBIP0084,
+ }, {
+ name: "empty name rejected",
+ accountName: "",
+ keyScope: waddrmgr.KeyScopeBIP0086,
+ expectedErr: "account name is required",
+ }, {
+ name: "default account name reserved",
+ accountName: lnwallet.DefaultAccountName,
+ keyScope: waddrmgr.KeyScopeBIP0086,
+ expectedErr: "reserved by the wallet",
+ }, {
+ name: "imported account name reserved",
+ accountName: waddrmgr.ImportedAddrAccountName,
+ keyScope: waddrmgr.KeyScopeBIP0086,
+ expectedErr: "reserved by the wallet",
+ }, {
+ name: "duplicate in requested scope rejected",
+ accountName: accountName,
+ keyScope: waddrmgr.KeyScopeBIP0086,
+ existing: map[waddrmgr.KeyScope][]string{
+ waddrmgr.KeyScopeBIP0086: {accountName},
+ },
+ expectedErr: "already exists",
+ }, {
+ // A name that exists under a different scope must also be
+ // rejected: coin selection resolves a custom account name to
+ // whichever scope matches first, so allowing the same name
+ // twice would make later funding calls ambiguous.
+ name: "duplicate in other scope rejected",
+ accountName: accountName,
+ keyScope: waddrmgr.KeyScopeBIP0086,
+ existing: map[waddrmgr.KeyScope][]string{
+ waddrmgr.KeyScopeBIP0084: {accountName},
+ },
+ expectedErr: "already exists",
+ }}
+
+ for _, test := range tests {
+ t.Run(test.name, func(t *testing.T) {
+ t.Parallel()
+
+ fake := &createAccountWallet{existing: test.existing}
+ w := &BtcWallet{wallet: fake}
+
+ props, err := w.CreateAccount(
+ test.keyScope, test.accountName,
+ )
+
+ if test.expectedErr != "" {
+ require.ErrorContains(t, err, test.expectedErr)
+ require.Nil(t, props)
+
+ // A rejected request must not have reached the
+ // wallet.
+ require.Empty(t, fake.createdName)
+
+ return
+ }
+
+ require.NoError(t, err)
+ require.Equal(t, test.accountName, props.AccountName)
+ require.Equal(t, test.keyScope, fake.createdScope)
+ require.Equal(t, test.accountName, fake.createdName)
+ })
+ }
+}
+
+// TestCreateAccountUnsupportedWallet asserts that a wallet backend which cannot
+// derive new accounts is reported as such instead of panicking.
+func TestCreateAccountUnsupportedWallet(t *testing.T) {
+ t.Parallel()
+
+ w := &BtcWallet{wallet: &lookupOnlyWallet{}}
+
+ _, err := w.CreateAccount(waddrmgr.KeyScopeBIP0086, "custom")
+ require.ErrorContains(t, err, "does not support creating accounts")
+}
+
+// TestCreateAccountWalletError asserts that a failure from the underlying
+// wallet is surfaced with the account name attached.
+func TestCreateAccountWalletError(t *testing.T) {
+ t.Parallel()
+
+ walletErr := errors.New("wallet is locked")
+ fake := &createAccountWallet{nextAccountErr: walletErr}
+ w := &BtcWallet{wallet: fake}
+
+ _, err := w.CreateAccount(waddrmgr.KeyScopeBIP0086, "custom")
+ require.ErrorIs(t, err, walletErr)
+ require.ErrorContains(t, err, "custom")
+}
+
+// TestCreateAccountSerialisesCallers asserts that concurrent CreateAccount
+// calls do not overlap.
+//
+// The duplicate-name check and the creation are separate database
+// transactions, and btcwallet's own check is per-scope, so two overlapping
+// calls could both pass the check and both create — leaving one name in two
+// key scopes, the exact ambiguity the check exists to prevent. The wallet
+// fake reports the greatest number of calls it ever saw inside the critical
+// section, which is 1 only while the caller serialises them.
+func TestCreateAccountSerialisesCallers(t *testing.T) {
+ t.Parallel()
+
+ const callers = 8
+
+ fake := &serialisingWallet{}
+ w := &BtcWallet{wallet: fake}
+
+ var wg sync.WaitGroup
+ for i := range callers {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+
+ // Distinct names: a shared name would be rejected by
+ // the duplicate check, which is a different property
+ // from the one under test here.
+ _, _ = w.CreateAccount(
+ waddrmgr.KeyScopeBIP0086,
+ fmt.Sprintf("custom-%d", i),
+ )
+ }()
+ }
+ wg.Wait()
+
+ require.Equal(t, 1, fake.maxInFlight(),
+ "CreateAccount calls must not overlap")
+ require.Equal(t, callers, fake.created)
+}
+
+// serialisingWallet records created accounts and tracks how many callers are
+// ever inside CreateAccount's check-then-create section at once.
+type serialisingWallet struct {
+ base.Interface
+
+ mtx sync.Mutex
+ names []string
+ created int
+ inFlight int
+ maxSeen int
+}
+
+// AccountPropertiesByName marks the caller as in-flight, pauses long enough
+// for any unsynchronised peer to overlap with it, and reports whether the
+// account exists.
+func (w *serialisingWallet) AccountPropertiesByName(_ waddrmgr.KeyScope,
+ name string) (*waddrmgr.AccountProperties, error) {
+
+ w.enter()
+ defer w.exit()
+
+ time.Sleep(time.Millisecond)
+
+ w.mtx.Lock()
+ defer w.mtx.Unlock()
+
+ if slices.Contains(w.names, name) {
+ return &waddrmgr.AccountProperties{AccountName: name}, nil
+ }
+
+ return nil, newAccountNotFoundError(name)
+}
+
+// enter records one more caller inside the section.
+func (w *serialisingWallet) enter() {
+ w.mtx.Lock()
+ defer w.mtx.Unlock()
+
+ w.inFlight++
+ if w.inFlight > w.maxSeen {
+ w.maxSeen = w.inFlight
+ }
+}
+
+// exit records one fewer caller inside the section.
+func (w *serialisingWallet) exit() {
+ w.mtx.Lock()
+ defer w.mtx.Unlock()
+
+ w.inFlight--
+}
+
+// maxInFlight reports the greatest overlap observed.
+func (w *serialisingWallet) maxInFlight() int {
+ w.mtx.Lock()
+ defer w.mtx.Unlock()
+
+ return w.maxSeen
+}
+
+// NextAccount records the new account. It is instrumented like the lookup so
+// the test observes the whole check-then-create section: a lock around only
+// the lookup would otherwise pass while leaving the real window open.
+func (w *serialisingWallet) NextAccount(_ waddrmgr.KeyScope,
+ name string) (uint32, error) {
+
+ w.enter()
+ defer w.exit()
+
+ time.Sleep(time.Millisecond)
+
+ w.mtx.Lock()
+ defer w.mtx.Unlock()
+
+ w.names = append(w.names, name)
+ w.created++
+
+ return uint32(w.created), nil
+}
+
+// AccountProperties returns the properties of the created account.
+func (w *serialisingWallet) AccountProperties(_ waddrmgr.KeyScope,
+ account uint32) (*waddrmgr.AccountProperties, error) {
+
+ w.mtx.Lock()
+ defer w.mtx.Unlock()
+
+ return &waddrmgr.AccountProperties{
+ AccountNumber: account,
+ AccountName: w.names[len(w.names)-1],
+ }, nil
+}
### lnwallet/interface.go
@@ -307,6 +307,26 @@ type WalletController interface {
// wallet accounts and return the addresses of only those matching.
ListAddresses(string, bool) (AccountAddressMap, error)
+ // CreateAccount creates a new account within the given key scope,
+ // deriving the account's keys from the wallet's master key.
+ //
+ // In contrast to ImportAccount, which registers a watch-only account
+ // from an externally supplied extended public key, the account created
+ // here is fully owned by the wallet: it derives its own addresses and
+ // can sign for its own outputs. That makes it usable as an isolated
+ // pocket of funds inside a single wallet, because coin selection,
+ // change, balance and address derivation can all be scoped to it by
+ // name.
+ //
+ // A custom account only ever exists within a single key scope, so the
+ // scope chosen here permanently fixes both the account's address type
+ // and the address type used for its change outputs.
+ //
+ // NOTE: The wallet must be unlocked, as deriving the account key
+ // requires access to the master private key.
+ CreateAccount(keyScope waddrmgr.KeyScope,
+ name string) (*waddrmgr.AccountProperties, error)
+
// ImportAccount imports an account backed by an account extended public
// key. The master key fingerprint denotes the fingerprint of the root
// key corresponding to the account public key (also known as the key
### lnwallet/mock.go
@@ -134,6 +134,13 @@ func (w *mockWalletController) ListAddresses(string,
return nil, nil
}
+// CreateAccount currently returns a dummy value.
+func (w *mockWalletController) CreateAccount(waddrmgr.KeyScope,
+ string) (*waddrmgr.AccountProperties, error) {
+
+ return nil, nil
+}
+
// ImportAccount currently returns a dummy value.
func (w *mockWalletController) ImportAccount(string, *hdkeychain.ExtendedKey,
uint32, *waddrmgr.AddressType, bool) (*waddrmgr.AccountProperties,
### lnwallet/rpcwallet/rpcwallet.go
@@ -39,6 +39,15 @@ var (
// supported in remote signing mode.
ErrRemoteSigningPrivateKeyNotAvailable = errors.New("deriving " +
"private key is not supported by RPC based key ring")
+
+ // ErrRemoteSigningAccountCreation is returned when an account creation
+ // is requested from the RPC wallet, which has no master private key to
+ // derive one from. The account has to be created on the remote signer
+ // and its extended public key imported here instead.
+ ErrRemoteSigningAccountCreation = errors.New("creating accounts is " +
+ "not supported when using a remote signer; create the " +
+ "account on the signer and import its extended public key " +
+ "instead")
)
// RPCKeyRing is an implementation of the SecretKeyRing interface that uses a
@@ -215,6 +224,21 @@ func (r *RPCKeyRing) SignPsbt(packet *psbt.Packet) ([]uint32, error) {
return resp.SignedInputs, nil
}
+// CreateAccount is not supported when a remote signer is in use.
+//
+// The local wallet is watch-only, so it holds no master private key to derive
+// an account from; the promoted BtcWallet implementation would fail deep inside
+// waddrmgr with a bare "watching-only wallet". Creating the account on the
+// remote signer and importing its extended public key here (ImportAccount) is
+// the supported path, and has to be driven by the operator.
+//
+// NOTE: This is a part of the WalletController interface.
+func (r *RPCKeyRing) CreateAccount(waddrmgr.KeyScope,
+ string) (*waddrmgr.AccountProperties, error) {
+
+ return nil, ErrRemoteSigningAccountCreation
+}
+
// FinalizePsbt expects a partial transaction with all inputs and outputs fully
// declared and tries to sign all inputs that belong to the specified account.
// Lnd must be the last signer of the transaction. That means, if there are anyWhy this scored 24/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.