scripts

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Overview

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

Index

Constants

View Source
const BITCOIN_FEE_ESTIMATE_QUERY = `
query BitcoinFeeEstimate(
    $bitcoin_network: BitcoinNetwork!
) {
    bitcoin_fee_estimate(network: $bitcoin_network) {
        ...FeeEstimateFragment
    }
}

` + objects.FeeEstimateFragment
View Source
const CANCEL_INVOICE_MUTATION = `
mutation CancelInvoice(
    $invoice_id: ID!
) {
    cancel_invoice(input: {
        invoice_id: $invoice_id
    }) {
        invoice {
            ...InvoiceFragment
        }
    }
}

` + objects.InvoiceFragment
View Source
const CLAIM_UMA_INVITATION_MUTATION = `
mutation ClaimUmaInvitation(
    $invitation_code: String!
    $invitee_uma: String!
) {
    claim_uma_invitation(input: {
        invitation_code: $invitation_code
        invitee_uma: $invitee_uma
    }) {
        invitation {
            ...UmaInvitationFragment
        }
    }
}

` + objects.UmaInvitationFragment
View Source
const CLAIM_UMA_INVITATION_WITH_INCENTIVES_MUTATION = `
mutation ClaimUmaInvitationWithIncentives(
    $invitation_code: String!
    $invitee_uma: String!
    $invitee_phone_hash: String!
    $invitee_region: RegionCode!
) {
    claim_uma_invitation_with_incentives(input: {
        invitation_code: $invitation_code
        invitee_uma: $invitee_uma
        invitee_phone_hash: $invitee_phone_hash
        invitee_region: $invitee_region
    }) {
        invitation {
            ...UmaInvitationFragment
        }
    }
}

` + objects.UmaInvitationFragment
View Source
const CREATE_API_TOKEN_MUTATION = `
mutation CreateApiToken(
    $name: String!
    $permissions: [Permission!]!
) {
    create_api_token(input: {
        name: $name
        permissions: $permissions
    }) {
        api_token {
            ...ApiTokenFragment
        }
        client_secret
    }
}

` + objects.ApiTokenFragment
View Source
const CREATE_INVOICE_MUTATION = `
mutation CreateInvoice(
    $node_id: ID!
    $amount_msats: Long!
    $memo: String
    $invoice_type: InvoiceType
	$expiry_secs: Int
) {
    create_invoice(input: {
        node_id: $node_id
        amount_msats: $amount_msats
        memo: $memo
        invoice_type: $invoice_type
		expiry_secs: $expiry_secs
    }) {
        invoice {
            ...InvoiceFragment
        }
    }
}

` + objects.InvoiceFragment
View Source
const CREATE_LNURL_INVOICE_MUTATION = `
mutation CreateLnurlInvoice(
    $node_id: ID!
    $amount_msats: Long!
	$metadata_hash: String!
	$expiry_secs: Int
) {
    create_lnurl_invoice(input: {
        node_id: $node_id
        amount_msats: $amount_msats
        metadata_hash: $metadata_hash
		expiry_secs: $expiry_secs
    }) {
        invoice {
            ...InvoiceFragment
        }
    }
}

` + objects.InvoiceFragment
View Source
const CREATE_NODE_WALLET_ADDRESS_MUTATION = `` /* 163-byte string literal not displayed */
View Source
const CREATE_TEST_MODE_INVOICE_MUTATION = `` /* 352-byte string literal not displayed */
View Source
const CREATE_TEST_MODE_PAYMENT_MUTATION = `
mutation CreateTestModePayment(
    $local_node_id: ID!
    $encoded_invoice: String!
    $amount_msats: Long
) {
    create_test_mode_payment(input: {
        local_node_id: $local_node_id
        encoded_invoice: $encoded_invoice
        amount_msats: $amount_msats
    }) {
        payment {
            ...OutgoingPaymentFragment
        }
		incoming_payment {
			...IncomingPaymentFragment
		}
    }
}

` + objects.OutgoingPaymentFragment + objects.IncomingPaymentFragment
View Source
const CREATE_UMA_INVITATION_MUTATION = `
mutation CreateUmaInvitation(
    $inviter_uma: String!
) {
    create_uma_invitation(input: {
        inviter_uma: $inviter_uma
    }) {
        invitation {
            ...UmaInvitationFragment
        }
    }
}

` + objects.UmaInvitationFragment
View Source
const CREATE_UMA_INVITATION_WITH_INCENTIVES_MUTATION = `
mutation CreateUmaInvitationWithIncentives(
    $inviter_uma: String!
    $inviter_phone_hash: String!
    $inviter_region: RegionCode!
) {
    create_uma_invitation_with_incentives(input: {
        inviter_uma: $inviter_uma
        inviter_phone_hash: $inviter_phone_hash
        inviter_region: $inviter_region
    }) {
        invitation {
            ...UmaInvitationFragment
        }
    }
}

` + objects.UmaInvitationFragment
View Source
const CREATE_UMA_INVOICE_MUTATION = `
mutation CreateUmaInvoice(
    $node_id: ID!
    $amount_msats: Long!
	$metadata_hash: String!
	$expiry_secs: Int
) {
    create_uma_invoice(input: {
        node_id: $node_id
        amount_msats: $amount_msats
        metadata_hash: $metadata_hash
		expiry_secs: $expiry_secs
    }) {
        invoice {
            ...InvoiceFragment
        }
    }
}

` + objects.InvoiceFragment
View Source
const CURRENT_ACCOUNT_QUERY = `
query GetCurrentAccount {
    current_account {
        ...AccountFragment
    }
}

` + objects.AccountFragment
View Source
const DECLINE_TO_SIGN_MESSAGES_MUTATION = `
mutation DeclineToSignMessages($payload_ids: [ID!]!) {
	decline_to_sign_messages(input: {
		payload_ids: $payload_ids
	}) {
		...DeclineToSignMessagesOutputFragment
	}
}

` + objects.DeclineToSignMessagesOutputFragment
View Source
const DECODE_PAYMENT_REQUEST_QUERY = `
query DecodedPaymentRequest(
    $encoded_payment_request: String!
) {
    decoded_payment_request(encoded_payment_request: $encoded_payment_request) {
        __typename
        ... on InvoiceData {
            ...InvoiceDataFragment
        }
    }
}

` + objects.InvoiceDataFragment
View Source
const DELETE_API_TOKEN_MUTATION = `` /* 155-byte string literal not displayed */
View Source
const FETCH_UMA_INVITATION_QUERY = `
query FetchUmaInvitation(
    $invitation_code: String!
) {
    uma_invitation_by_code(code: $invitation_code) {
        ...UmaInvitationFragment
    }
}

` + objects.UmaInvitationFragment
View Source
const FUND_NODE_MUTATION = `
mutation FundNode(
    $node_id: ID!,
    $amount_sats: Long
) {
    fund_node(input: { node_id: $node_id, amount_sats: $amount_sats }) {
        amount {
            ...CurrencyAmountFragment
        }
    }
}

` + objects.CurrencyAmountFragment
View Source
const LIGHTNING_FEE_ESTIMATE_FOR_INVOICE_QUERY = `
query LightningFeeEstimateForInvoice(
    $node_id: ID!
    $encoded_payment_request: String!
    $amount_msats: Long
  ) {
    lightning_fee_estimate_for_invoice(input: {
      node_id: $node_id,
      encoded_payment_request: $encoded_payment_request,
      amount_msats: $amount_msats
    }) {
      ...LightningFeeEstimateOutputFragment
    }
  }

` + objects.LightningFeeEstimateOutputFragment
View Source
const LIGHTNING_FEE_ESTIMATE_FOR_NODE_QUERY = `
query LightningFeeEstimateForNode(
    $node_id: ID!
    $destination_node_public_key: String!
    $amount_msats: Long!
  ) {
    lightning_fee_estimate_for_node(input: {
      node_id: $node_id,
      destination_node_public_key: $destination_node_public_key,
      amount_msats: $amount_msats
    }) {
      ...LightningFeeEstimateOutputFragment
    }
  }

` + objects.LightningFeeEstimateOutputFragment
View Source
const OUTGOING_PAYMENTS_FOR_INVOICE_QUERY = `
query OutgoingPaymentsForInvoice(
	$encoded_invoice: String!
	$statuses: [PaymentStatus!]
} {
	outgoing_payments_for_invoice_query(input: {
		encoded_invoice: $encoded_invoice
		statuses: $statuses
	}) {
		...OutgoingPaymentsForInvoiceQueryOutputFragment
	}
}

` + objects.OutgoingPaymentsForInvoiceQueryOutputFragment
View Source
const PAY_INVOICE_MUTATION = `
mutation PayInvoice(
    $node_id: ID!
    $encoded_invoice: String!
    $timeout_secs: Int!
    $maximum_fees_msats: Long!
    $amount_msats: Long
) {
    pay_invoice(input: {
        node_id: $node_id
        encoded_invoice: $encoded_invoice
        timeout_secs: $timeout_secs
        maximum_fees_msats: $maximum_fees_msats
        amount_msats: $amount_msats
    }) {
        payment {
            ...OutgoingPaymentFragment
        }
    }
}

` + objects.OutgoingPaymentFragment
View Source
const PAY_UMA_INVOICE_MUTATION = `
mutation PayUmaInvoice(
    $node_id: ID!
    $encoded_invoice: String!
    $timeout_secs: Int!
    $maximum_fees_msats: Long!
    $amount_msats: Long
) {
    pay_uma_invoice(input: {
        node_id: $node_id
        encoded_invoice: $encoded_invoice
        timeout_secs: $timeout_secs
        maximum_fees_msats: $maximum_fees_msats
        amount_msats: $amount_msats
    }) {
        payment {
            ...OutgoingPaymentFragment
        }
    }
}

` + objects.OutgoingPaymentFragment
View Source
const RECOVER_NODE_SIGNING_KEY_QUERY = `` /* 249-byte string literal not displayed */
View Source
const REGISTER_PAYMENT_MUTATION = `` /* 362-byte string literal not displayed */
View Source
const RELEASE_CHANNEL_PER_COMMITMENT_SECRET_MUTATION = `
mutation ReleaseChannelPerCommitmentSecret(
  $channel_id: ID!
  $per_commitment_secret: Hash32!
  $per_commitment_index: Long!
) {
    release_channel_per_commitment_secret(input: {
		channel_id: $channel_id
		per_commitment_secret: $per_commitment_secret
    per_commitment_index: $per_commitment_index
	}) {
        ...ReleaseChannelPerCommitmentSecretOutputFragment
    }
}

` + objects.ReleaseChannelPerCommitmentSecretOutputFragment
View Source
const RELEASE_PAYMENT_PREIMAGE_MUTATION = `
mutation ReleasePaymentPreimage(
  $invoice_id: ID!
  $payment_preimage: Hash32!
) {
    release_payment_preimage(input: {
		invoice_id: $invoice_id
		payment_preimage: $payment_preimage
	}) {
        ...ReleasePaymentPreimageOutputFragment
    }
}

` + objects.ReleasePaymentPreimageOutputFragment
View Source
const REQUEST_WITHDRAWAL_MUTATION = `
mutation RequestWithdrawal(
    $node_id: ID!
    $amount_sats: Long!
    $bitcoin_address: String!
    $withdrawal_mode: WithdrawalMode!
) {
    request_withdrawal(input: {
        node_id: $node_id
        amount_sats: $amount_sats
        bitcoin_address: $bitcoin_address
        withdrawal_mode: $withdrawal_mode
    }) {
        request {
            ...WithdrawalRequestFragment
        }
    }
}

` + objects.WithdrawalRequestFragment
View Source
const SCREEN_NODE_MUTATION = `` /* 207-byte string literal not displayed */
View Source
const SEND_PAYMENT_MUTATION = `
mutation SendPayment(
    $node_id: ID!
    $destination_public_key: String!
    $amount_msats: Long!
    $timeout_secs: Int!
    $maximum_fees_msats: Long!
) {
    send_payment(input: {
        node_id: $node_id
        destination_public_key: $destination_public_key
        amount_msats: $amount_msats
        timeout_secs: $timeout_secs
        maximum_fees_msats: $maximum_fees_msats
    }) {
        payment {
            ...OutgoingPaymentFragment
        }
    }
}

` + objects.OutgoingPaymentFragment
View Source
const SET_INVOICE_PAYMENT_HASH = `
mutation SetInvoicePaymentHash(
  $invoice_id: ID!
  $payment_hash: Hash32!
  $preimage_nonce: Hash32
) {
    set_invoice_payment_hash(input: {
		invoice_id: $invoice_id
		payment_hash: $payment_hash
		preimage_nonce: $preimage_nonce
	}) {
        ...SetInvoicePaymentHashOutputFragment
    }
}

` + objects.SetInvoicePaymentHashOutputFragment
View Source
const SIGN_INVOICE_MUTATION = `
mutation SignInvoice(
  $invoice_id : ID!
  $signature : Signature!
  $recovery_id : Int!
) {
    sign_invoice(input: {
		invoice_id: $invoice_id
		signature: $signature
		recovery_id: $recovery_id
	}) {
        ...SignInvoiceOutputFragment
    }
}

` + objects.SignInvoiceOutputFragment
View Source
const SIGN_MESSAGES_MUTATION = `
mutation SignMessages(
  $signatures: [IdAndSignature!]!
) {
    sign_messages(input: {
		signatures: $signatures
	}) {
        ...SignMessagesOutputFragment
    }
}

` + objects.SignMessagesOutputFragment
View Source
const UPDATE_CHANNEL_PER_COMMITMENT_POINT_MUTATION = `
mutation UpdateChannelPerCommitmentPoint(
  $channel_id : ID!
  $per_commitment_point : PublicKey!
  $per_commitment_point_index : Long!
) {
    update_channel_per_commitment_point(input: {
		channel_id: $channel_id
    per_commitment_point_index: $per_commitment_point_index
		per_commitment_point: $per_commitment_point
	}) {
        ...UpdateChannelPerCommitmentPointOutputFragment
    }
}

` + objects.UpdateChannelPerCommitmentPointOutputFragment
View Source
const UPDATE_NODE_SHARED_SECRET_MUTATION = `
mutation UpdateNodeSharedSecret(
  $node_id : ID!
  $shared_secret : Hash32!
) {
    update_node_shared_secret(input: {
		node_id: $node_id
		shared_secret: $shared_secret
	}) {
        ...UpdateNodeSharedSecretOutputFragment
    }
}

` + objects.UpdateNodeSharedSecretOutputFragment
View Source
const WITHDRAWAL_FEE_ESTIMATE_QUERY = `
query WithdrawalFeeEstimate(
	$node_id: ID!
	$amount_sats: Long!
	$withdrawal_mode: WithdrawalMode!
) {
	withdrawal_fee_estimate(input: {
		node_id: $node_id
		amount_sats: $amount_sats
		withdrawal_mode: $withdrawal_mode
	}) {
		...WithdrawalFeeEstimateOutputFragment
	}
}

` + objects.WithdrawalFeeEstimateOutputFragment

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateApiTokenOutput

type CreateApiTokenOutput struct {
	// ApiToken is the API Token that has been created
	ApiToken *objects.ApiToken

	// ClientSecret should be used to authenticate against Lightspark API. This
	// secret is not stored and will never be available again after this. You
	// must keep this secret secure as it grants access to your account.
	ClientSecret string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL