Introduction

4 stars based on 47 reviews

The platform provides partners with functionality such as. Civic Hosted option for partners - this provides a flow similar to the traditional oAuth2 authorization code flow, with Civic performing the role of the Authorization server.

The general flow is explained using the example of user signup. The eventhandler calls a method in bitcoin api reference guide CivicJS library to initiate signup. A modal is displayed which contains an iframe to house the QR code.

A request is made to the Civic server to generate a QR code for your scope request. The server checks that the domain for the parent document of the iframe corresponds to the domain white list set in the partner account before serving the code. The user scans the QR code using the Civic mobile app and is prompted to authorize or deny the bitcoin api reference guide request.

The prompt highlights the data that is being requested and the requesting party. Upon granting the request, the data is sent to the Civic server. This process proves that the user data was attested to by Civic and that the user is currently in control of the private keys relevant to the data. Verify on the blockchain. The Civic server then verifies that the attestations are still valid on the blockchain and have not been revoked. The data is encrypted and cached on the Civic server. Once this data is cached, a polling request from the iframe will receive a response containing an authorization code wrapped in a JWT token.

The CivicJS browser-side library passes the token to the parent document. Your site is then responsible for passing the JWT token to your server. The SIP server first validates the JWT token, ensuring it was issued by Civic, is being used by the correct application id, and that the expiry time on the token has not lapsed. The enclosed AC is then verified and the bitcoin api reference guide cached data returned.

Your server receives the encrypted data where it is decrypted using your application secret key. The result will contain a userId and bitcoin api reference guide data requested such bitcoin api reference guide email, mobile number etc.

Sign up for a developer account on the Civic Integration Portal and create a test application. From here, you will be able to generate the keys necessary for encryption used in the steps below.

Basic requests necessary for simple account creation and 2FA are available to all partners who have signed up on the bitcoin api reference guide portal. Learn more bitcoin api reference guide request access here. This exposes a single global object, civic.

Create an instance of civic. This identifies your site to Civic servers. You can find your application ID in the Application details section of the integration portal.

Provide a suitable event handler to initiate the Civic scope request. The event handler calls civic. Provide an event handler to listen for data events. The JWT token bitcoin api reference guide the integrity of the response, the identity of the sender, the intended receipient and valid lifespan of the response.

The authorization code will be passed to the handler wrapped in a JWT token following authorization by the user. Use the Civic SIP server sdk relevant to your server side environment to complete the server integration of your signup, login or general scope request flow.

Your private keys and secret should only be used on the server and never exposed on the client side. They must be stored securely. Call exchangeCode with the JWT token you received from the browser session to exchange for the requested user data. The continued validity of bitcoin api reference guide header token expiry is also verified. The message digest is then validated to ensure the body of the bitcoin api reference guide has not been tampered with.

User data is then returned to your server encrypted using AES and your secret. The receiver validates this token to ensure it has been sent by Civic. Upon receiving a response at your server, the Civic sdk decrypts the data using your application secret and returns the user data.

The userId can be associated with your user account system for user identification in future logins. This option is not currently available for general use. If this functionality is required, please contact partners civic.

Scope Requests detail specific sets of verified data you wished returned from the user. The two currently available scope requests are detailed below. See Event Handlers for documentation on how to implement these requests. It is most commonly used for secure login and signup solutions when no additional identity verification is required. Note that attempting this request without prior approval will return an unauthorized error.

To ensure the best possible results, the Civic browser experience is designed for modern desktop browsers that automatically update. Browsers without reliable automatic update systems are supported as current version Once the user approves the scope request on the Civic App, they will be redirected back to bitcoin api reference guide browser with a new tab being opened on your integrated web page.

We append a query parameter called uuid to the parent URL so that we can identify the fact that this page is loading after returning from the Civic Bitcoin api reference guide. If a uuid query parameter is detected in the parent URL, the Civic library will load the modal up automatically and begin polling for the token response. Once the token is received it will behave as normal and bitcoin api reference guide the code setup in the event listener for auth-code-received.

We suggest testing the mobile browser flow in your integration and ensure any possible special handling in this adapted process. This limits the contagion in the event that a private bitcoin api reference guide is compromised, and only that clientID and key pair need to be regenerated. To ensure data privacy, unencrypted HTTP is not supported. API requests without authentication will also fail. In general, a response code of 2xx indicates the operation was successful.

Other error codes indicate either a client error 4xx or a server error 5xx. The platform provides partners with functionality such as secure 2FA user login secure private 2FA user login onboarding of verified users with customized flows Integration There are two integration flows: This option minimises server side development required by the partner. This option requires more server side development. Civic Hosted option The general flow is explained using the example of user signup.

For subsequent logins the userId can be used to associate the user with your accounts system. Getting Started Follow the steps below to integrate using the Civic Hosted option. Include Include the civic. Instantiate instance of civic. Initialize Create an instance of civic. Event Handlers Provide a suitable event handler to initiate the Civic scope request. The auth-code-received event contains the following fields: Field Required Description event Yes event name type Yes flow type for the response e.

Initialize instance passing your appId and secret. Exchange authorization code for user data. Exchange Authorization Code Call exchangeCode with the JWT token you bitcoin api reference guide from the browser session to exchange for the requested user data. This is used to authenticate your request. This header consists of: It also introduces a time dependency to the request. This is bitcoin api reference guide using your private key. This ensures the integrity of the request body on the Civic server.

The SIP server verifies that the caller is the correct recipient of the token. User Data Each item of user data returned has the following fields: Field Example Description label contact. Direct Option This option is not currently available for general use. Scope Requests Scope Requests detail specific sets of bitcoin api reference guide data you wished returned from the user. Label Example Value Description contact. Label Example Value Description documents.

IAL1 Verification standard used to check the document. This field should be ignored pending future functionality. Browser Support To ensure the best possible results, the Civic browser experience is designed for modern desktop browsers that automatically update. The Civic API uses the following error codes: Civic SIP service challenges the user during scope request approval to ensure the user is in control of the private key originally used in the issuance of the data attestation.

Verification standard used to check the document.

Bitcoin mining on mac gpu

  • The bottle bit me down chord

    Server json litecoin charts

  • R9 290x litecoin hash rate

    Robot damashii neo zeong

Deepbit bitcoin mining

  • Btc charts bitstamp wikipedia

    Bitcoin hits $1000 for the first timethe verge

  • Baixaki zeny maker ragnarok bot

    Dogecoin crazy love

  • New bitcoin mining companies

    Exmoor beast ale buy now pay

Bitgold stock analysis

31 comments Vuoden 2014 ensimmaisella puoliskolla on nelja bitcoinkonferenssia yhdysvaltoihin

Nushares blockchain university

It is intended for those who already understand how to work with LND. If this is your first time or you need a refresher, you may consider perusing our LND developer site featuring a tutorial, resources and guides at dev. If you prefer to just read code, the original rpc. Lastly, keep in mind that the code examples will differ slightly based on your operating system and specific setup. GenSeed is the first method that should be used to instantiate a new lnd instance. This method allows a caller to generate a new aezeed cipher seed given an optional passphrase.

If provided, the passphrase will be necessary to decrypt the cipherseed to expose the internal wallet seed. Once the cipherseed is obtained and verified by the user, the InitWallet method should be used to commit the newly generated seed, and create the wallet.

InitWallet is used when lnd is starting up for the first time to fully initialize the daemon and its internal wallet. At the very least a wallet password must be provided. This will be used to encrypt sensitive material on disk. In the case of a recovery scenario, the user can also specify their aezeed mnemonic and passphrase.

If set, then the daemon will use this prior state to initialize its internal wallet. Alternatively, this can be used along with the GenSeed RPC to obtain a seed, then present it to the user. Once it has been verified by the user, the seed can be fed into this RPC in order to commit the new wallet. WalletBalance returns total unspent outputs confirmed and unconfirmed , all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet.

SendCoins executes a request to send coins to a particular address. SubscribeTransactions creates a uni-directional stream from the server to the client in which any newly discovered transactions relevant to the wallet are sent over. SendMany handles a request for a transaction that creates multiple specified outputs in parallel. AddressType has to be one of: The returned signature string is zbase32 encoded and pubkey recoverable, meaning that only the message digest and signature are needed for verification.

VerifyMessage verifies a signature over a msg. In addition to returning the validity of the signature, VerifyMessage also returns the recovered pubkey from the signature. ConnectPeer attempts to establish a connection to a remote peer.

This is at the networking level, and is used for communication between nodes. This is distinct from establishing a channel with a peer. DisconnectPeer attempts to disconnect one peer from another identified by a given pubKey. In the case that we currently have a pending or active channel with the target peer, then this action will be not be allowed. A channel is pending if it has finished the funding workflow and is waiting for confirmations for the funding txn, or is in the process of closure, either initiated cooperatively or non-cooperatively.

This call is meant to be consumed by clients to the REST proxy. As with all other sync calls, all byte slices are intended to be populated as hex encoded strings. OpenChannel attempts to open a singly funded channel specified in the request to a remote peer. Users are able to specify a target number of blocks that the funding transaction should be confirmed in, or a manual fee rate to us for the funding transaction.

If neither are specified, then a lax block confirmation target is used. CloseChannel attempts to close an active channel identified by its channel outpoint ChannelPoint. The actions of this method can additionally be augmented to attempt a force close after a timeout period in the case of an inactive peer. If a non-force close cooperative closure is requested, then the user can specify either a target number of blocks until the closure transaction is confirmed, or a manual fee rate.

If neither are specified, then a default lax, block confirmation target is used. A single RPC invocation creates a persistent bi-directional stream allowing clients to rapidly send payments through the Lightning Network with a single persistent connection. A path through the channel graph which runs over one or more channels in succession. This struct carries all the information required to craft the Sphinx onion packet, and send the payment along the first hop in the path.

A route is only selected as valid if all the channels have sufficient capacity to carry the initial payment amount after fees are accounted for.

SendPaymentSync is the synchronous non-streaming version of SendPayment. AddInvoice attempts to add a new invoice to the invoice database. Any duplicated invoices are rejected, therefore all invoices must have a unique payment preimage. ListInvoices returns a list of all the invoices currently stored within the database. Any active debug invoices are ignored. LookupInvoice attempts to look up an invoice according to its payment hash. The passed payment hash must be exactly 32 bytes, if not, an error is returned.

DecodePayReq takes an encoded payment request string and attempts to decode it, returning a full description of the conditions encoded within the payment request. DescribeGraph returns a description of the latest graph state from the point of view of the node. The graph information is partitioned into two components: As this is a directed graph, the edges also contain the node directional specific routing policy which includes: A node is connected to other nodes by one or more channel edges emanating from it.

As the graph is directed, a node will also have an incoming edge attached to it for each outgoing edge. A fully authenticated channel along with all its unique attributes.

Once an authenticated channel announcement has been processed on the network, then a instance of ChannelEdgeInfo encapsulating the channels attributes is stored. The other portions relevant to routing policy of a channel are stored within a ChannelEdgePolicy for each direction of the channel. GetChanInfo returns the latest authenticated network announcement for the given channel identified by its channel ID: GetNodeInfo returns the latest advertised, aggregated, and authenticated channel information for the specified node identified by its public key.

The retuned route contains the full details required to craft and send an HTLC, also including the necessary information that should be present within the Sphinx packet encapsulated within the HTLC.

GetNetworkInfo returns some basic stats about the known channel graph from the point of view of the node. StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon. SubscribeChannelGraph launches a streaming RPC that allows the caller to receive notifications upon any changes to the channel graph topology from the point of view of the responding node. DebugLevel allows a caller to programmatically set the logging verbosity of lnd. The logging can be targeted according to a coarse daemon-wide logging level, or in a granular fashion to specify the logging for a target sub-system.

FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel. UpdateChannelPolicy allows the caller to update the fee schedule and channel policies for all channels globally, or a particular channel.

If no time-range is specified, then the first chunk of the past 24 hrs of forwarding history are returned. A list of forwarding events are returned. The size of each forwarding event is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. As a result each message can only contain 50k entries. Each response has the index offset of the last entry.

The index offset can be provided to the request to allow the caller to skip a series of records. Back to Developer Site shell python javascript. If not specified, then a fresh set of randomness will be used to create the seed. This field is optional, as if not provided, then the daemon will generate a new cipher seed for the user. Otherwise, then the daemon will attempt to recover the wallet state linked to this cipher seed.

This is the raw cipher text before run through our mnemonic encoding scheme. InitWallet Simple RPC InitWallet is used when lnd is starting up for the first time to fully initialize the daemon and its internal wallet. This MUST be at least 8 chars in length.

After creation, this password is required to unlock the daemon. This may have been generated by the GenSeed method, or be an existing seed. InitWalletResponse This response is empty. The unlock command is used to decrypt lnd's wallet state in order to start up. This command MUST be run after booting up lnd before it's able to carry out its duties. An exception is if a user is running with --noencryptwallet, then a default passphrase will be used.

This will be required to decrypt on-disk material that the daemon requires to function properly. UnlockWalletResponse This response is empty. WalletBalance Simple RPC WalletBalance returns total unspent outputs confirmed and unconfirmed , all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet.

WalletBalanceRequest This request has no parameters. ChannelBalanceRequest This request has no parameters. List all transactions an address of the wallet was involved in. GetTransactionsRequest This request has no parameters.

Send amt coins in satoshis to the BASE58 encoded bitcoin address addr. Positional arguments and flags can be used interchangeably but not at the same time!

SendCoinsResponse Field Type Label Description txid string optional The transaction ID of the transaction SubscribeTransactions Response-streaming RPC SubscribeTransactions creates a uni-directional stream from the server to the client in which any newly discovered transactions relevant to the wallet are sent over. Create and broadcast a transaction paying the specified amount s to the passed address es.

The send-json-string' param decodes addresses and the amount to send respectively in the following format: