Categorygithub.com/tokenized/teller_client
modulepackage
0.0.0-20240625183324-93b448097203
Repository: https://github.com/tokenized/teller_client.git
Documentation: pkg.go.dev

# README

Teller Client

Teller client provides functions to access and control a Teller agent.

Requests

Requests are sent via peer channel to the Teller agent, then responses are sent back via a different peer channel. Message formats and serialization are defined in messages.go.

Create Instrument

A create instrument request tells the Teller agent to create a new instrument to be distributed. The Teller agent then generates a new administration key and funds it with some bitcoin. It then requests a new hosted contract address. Then sends a contract offer. When it sees the corresponding contract formation on chain it sends an instrument definition. When it sees the corresponding instrument creation, it sends back a response containing the information about the instrument that was created.

Send Tokens

A send token request tells the Teller agent to send tokens to a specified payment request. Teller responds by completing the payment request and transmitting the transaction. The Teller agent then waits for the settlement and sends back a response containing the txid of the settlement.

Receive Tokens

A receive token request tells the Teller agent that it should receive tokens. Teller responds with a payment request to receive the tokens. The Teller agent then waits to see the payment request completed on chain, at which point it sends back a response containing the txid of the settlement.

Reclaim Bitcoin

A reclaim bitcoin request tells the Teller agent to collect all of its UTXOs and spend them into a specified address. This can be used to close the Teller agent, or to pull bitcoin from unused instrument administration addresses. The Teller agent can continue to be used as long as the bitcoin funding address is re-funded.

Configuration and Use

Configure Client

Use Client

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
from teller.
to teller.
from teller.
banking to teller.
to teller.
banking to teller.
teller to banking.
teller to banking.
teller to banking.
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
Protocol ID for teller.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReceiveTokens represents a request for teller to receive tokens from a user.
No description provided by the author
SendTokens represents a request to teller to send tokens.
TokensReceived represents a response from teller that specifies the tokens for a request have been received.
TokensSent represents a response from teller that requested tokens have been sent.
TokensToReceive represents a response from teller with the payment request.
No description provided by the author

# Type aliases

No description provided by the author