ledger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PAYMENT                OperationType = "PAYMENT"
	WITHDRAWAL                           = "WITHDRAWAL"
	BLOCKCHAIN_TRANSACTION               = "BLOCKCHAIN_TRANSACTION"
	EXCHANGE                             = "EXCHANGE"
	//FAILED = "FAILED" // TO-DO
	DEPOSIT = "DEPOSIT"
	MINT    = "MINT"
	REVOKE  = "REVOKE"
)
View Source
const (
	ACCOUNT_BALANCE_LIMIT                   SubscriptionType = "ACCOUNT_BALANCE_LIMIT"
	OFFCHAIN_WITHDRAWAL                                      = "OFFCHAIN_WITHDRAWAL"
	TRANSACTION_HISTORY_REPORT                               = "TRANSACTION_HISTORY_REPORT"
	ACCOUNT_INCOMING_BLOCKCHAIN_TRANSACTION                  = "ACCOUNT_INCOMING_BLOCKCHAIN_TRANSACTION"
	COMPLETE_BLOCKCHAIN_TRANSACTION                          = "COMPLETE_BLOCKCHAIN_TRANSACTION"
)
View Source
const (
	FAILED                  TransactionType = "FAILED"
	DEBIT_PAYMENT                           = "DEBIT_PAYMENT"
	CREDIT_PAYMENT                          = "CREDIT_PAYMENT"
	CREDIT_DEPOSIT                          = "CREDIT_DEPOSIT"
	DEBIT_WITHDRAWAL                        = "DEBIT_WITHDRAWAL"
	CANCEL_WITHDRAWAL                       = "CANCEL_WITHDRAWAL"
	DEBIT_OUTGOING_PAYMENT                  = "DEBIT_OUTGOING_PAYMENT"
	CREDIT_INCOMING_PAYMENT                 = "CREDIT_INCOMING_PAYMENT"
	EXCHANGE_BUY                            = "EXCHANGE_BUY"
	EXCHANGE_SELL                           = "EXCHANGE_SELL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {

	/**
	 * For bookkeeping to distinct account purpose.
	 * @type {string}
	 * @memberof Account
	 */
	AccountCode string
	/**
	 * Account ID.
	 * @type {string}
	 * @memberof Account
	 */
	Id string
	/**
	 *
	 * @type {AccountBalance}
	 * @memberof Account
	 */
	Balance AccountBalance
	/**
	 * Time of account creation.
	 * @type {string}
	 * @memberof Account
	 */
	Created string
	/**
	 * Account currency. Supported values are BTC, LTC, BCH, ETH, XRP, Tatum Virtual Currencies started with VC_ prefix or ERC20 customer token created via Tatum Platform.
	 * @type {string}
	 * @memberof Account
	 */
	Currency string
	/**
	 * ID of newly created customer or existing customer associated with account.
	 * @type {string}
	 * @memberof Account
	 */
	CustomerId string
	/**
	 * Indicates whether account is frozen or not.
	 * @type {boolean}
	 * @memberof Account
	 */
	Frozen bool
	/**
	 * Indicates whether account is active or not.
	 * @type {boolean}
	 * @memberof Account
	 */
	Active bool
	/**
	 * Extended public key to derive address from.
	 * In case of XRP, this is account address, since address is defined as DestinationTag, which is address field.
	 * In case of XLM, this is account address, since address is defined as message, which is address field.
	 * @type {string}
	 * @memberof Account
	 */
	Xpub string
}

*

*
* @export
* @interface Account

type AccountBalance

type AccountBalance struct {
	// contains filtered or unexported fields
}

*

*
* @export
* @interface AccountBalance

type BasePairEnum

type BasePairEnum string

type Blockage

type Blockage struct {
	Id string
	/**
	 * ID of the account this blockage is for.
	 * @type {string}
	 * @memberof Blockage
	 */
	AccountId string
	/**
	 * Amount blocked on account.
	 * @type {string}
	 * @memberof Blockage
	 */
	Amount string
	/**
	 * Type of blockage.
	 * @type {string}
	 * @memberof Blockage
	 */
	Type string
	/**
	 * Description of blockage.
	 * @type {string}
	 * @memberof Blockage
	 */
	Description string
}

*

*
* @export
* @interface Blockage

type Customer

type Customer struct {
	Id string

	ExternalId string

	CustomerCountry request.Country

	AccountingCurrency common.Fiat

	ProviderCountry request.Country

	Active bool

	Enabled bool
}

type MarketValue

type MarketValue struct {

	/**
	 * Value of transaction in given base pair.
	 * @type {string}
	 * @memberof MarketValue
	 */
	Amount string
	/**
	 * Base pair.
	 * @type {string}
	 * @memberof MarketValue
	 */
	Currency common.Fiat
	/**
	 * Date of validity of rate in UTC.
	 * @type {number}
	 * @memberof MarketValue
	 */
	SourceDate uint32
	/**
	 * Source of base pair.
	 * @type {string}
	 * @memberof MarketValue
	 */
	Source string
}

*

*
* @export
* @interface MarketValue

type OperationType

type OperationType string

type OrderBookResponse

type OrderBookResponse struct {

	/**
	 * ID of the trade.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Id string

	/**
	 * Type of the trade, BUY or SELL.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Type request.TradeType

	/**
	 * Price to buy / sell.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Price string

	/**
	 * Amount of the trade to be bought / sold.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Amount string

	/**
	 * Trading pair.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Pair string

	/**
	 * How much of the trade was already filled.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Fill string

	/**
	 * ID of the account of the currency 1 trade currency.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Currency1AccountId string

	/**
	 * ID of the account of the currency 2 trade currency.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Currency2AccountId string

	/**
	 * Creation date, UTC millis.
	 * @type {string}
	 * @memberof OrderBook
	 */
	Created uint64
}

type Reference

type Reference struct {
	Reference string
}

type Subscription

type Subscription struct {

	/**
	 * Type of the subscription.
	 * @type {string}
	 * @memberof Subscription
	 */
	Type common.SubscriptionType
	/**
	 * ID of the subscription.
	 * @type {string}
	 * @memberof Subscription
	 */
	Id string
	/**
	 * Additional attributes based on the subscription type.
	 * @type {object}
	 * @memberof Subscription
	 */
	Attr interface{}
}

type SubscriptionType

type SubscriptionType string

type Transaction

type Transaction struct {

	/**
	 * Source account - source of transaction(s)
	 * @type {string}
	 * @memberof Transaction
	 */
	AccountId string
	/**
	 * Amount in account's currency
	 * @type {string}
	 * @memberof Transaction
	 */
	Amount string
	/**
	 * Whether the transaction is anonymous. If true, counter account owner does not see source account.
	 * @type {boolean}
	 * @memberof Transaction
	 */
	Anonymous bool
	/**
	 * Counter account - transaction(s) destination account. In case of blockchain recipient, this is addess of blockchain account.
	 * @type {string}
	 * @memberof Transaction
	 */
	CounterAccountId string
	/**
	 * Transaction currency
	 * @type {string}
	 * @memberof Transaction
	 */
	Currency string
	/**
	 * Time in UTC of transaction.
	 * @type {number}
	 * @memberof Transaction
	 */
	Created uint32
	/**
	 * List of market values of given transaction with all supported base pairs.
	 * @type {Array<MarketValue>}
	 * @memberof Transaction
	 */
	MarketValue []MarketValue
	/**
	 * Type of operation.
	 * @type {string}
	 * @memberof Transaction
	 */
	OperationType common.OperationType
	/**
	 * Payment ID defined in payment order by sender.
	 * @type {string}
	 * @memberof Transaction
	 */
	PaymentId string
	/**
	 * Present only for operationType WITHDRAWAL and XLM / XRP based accounts it represents message or destinationTag of the recipient, if present.
	 * @type {string}
	 * @memberof Transaction
	 */
	Attr string
	/**
	 * For operationType DEPOSIT it represents address, on which was deposit credited for the account.
	 * @type {string}
	 * @memberof Transaction
	 */
	Address string
	/**
	 * Note visible for both sender and recipient.
	 * @type {string}
	 * @memberof Transaction
	 */
	RecipientNote string
	/**
	 * Transaction internal reference - unique identifier within Tatum ledger. In order of failure, use this value to search for problems.
	 * @type {string}
	 * @memberof Transaction
	 */
	Reference string
	/**
	 * For operationType DEPOSIT, BLOCKCHAIN_TRANSACTION it represents transaction id, for which deposit occured.
	 * @type {string}
	 * @memberof Transaction
	 */
	TxId string
	/**
	 * Note visible for sender.
	 * @type {string}
	 * @memberof Transaction
	 */
	SenderNote string
	/**
	 * For bookkeeping to distinct transaction purpose.
	 * @type {string}
	 * @memberof Transaction
	 */
	TransactionCode string
	/**
	 * Type of payment.
	 * @type {string}
	 * @memberof Transaction
	 */
	TransactionType common.TransactionType
}

*

*
* @export
* @interface Transaction

type TransactionType

type TransactionType string

type VC

type VC struct {

	/**
	 * Exchange rate of the base pair. Each unit of the created curency will represent value of baseRate*1 basePair.
	 * @type {number}
	 * @memberof VC
	 */
	BaseRate uint32
	/**
	 * Base pair for virtual currency. Transaction value will be calculated according to this base pair. e.g. 1 VC_VIRTUAL is equal to 1 BTC, if basePair is set to BTC.
	 * @type {string}
	 * @memberof VC
	 */
	BasePair BasePairEnum
	/**
	 * ID of customer associated with virtual currency.
	 * @type {string}
	 * @memberof VC
	 */
	CustomerId string
	/**
	 * Used as a description within Tatum system.
	 * @type {string}
	 * @memberof VC
	 */
	Description string
	/**
	 * Virtual currency name. Must be prefixed with 'VC_'.
	 * @type {string}
	 * @memberof VC
	 */
	Name string
	/**
	 * Supply of virtual currency.
	 * @type {string}
	 * @memberof VC
	 */
	Supply string
	/**
	 * Virtual currency account.
	 * @type {string}
	 * @memberof VC
	 */
	AccountId string
	/**
	 * Address of ERC20 token.
	 * @type {string}
	 * @memberof VC
	 */
	Erc20Address string
	/**
	 * Virtual currency account, on which initial supply was minted.
	 * @type {string}
	 * @memberof VC
	 */
	IssuerAccount string
	/**
	 * Blockchain, on which this virtual currency is paired on. Not present, when Tatum's private ledger is used as a base ledger.
	 * @type {string}
	 * @memberof VC
	 */
	Chain string
	/**
	 * Ethereum address, where initial supply was minted.
	 * @type {string}
	 * @memberof VC
	 */
	InitialAddress string
}

*

*
* @export
* @interface VC

Jump to

Keyboard shortcuts

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