Documentation ¶
Index ¶
- Constants
- Variables
- func ActivateInvoiceMessage() (*cell.Cell, error)
- func ActivateStoreMessage() (*cell.Cell, error)
- func BuildURLForWallet(reciver string, cell_ *cell.Cell, amount uint64, comission uint64) string
- func DeactivateInvoiceMessage() (*cell.Cell, error)
- func DeactivateStoreMessage() (*cell.Cell, error)
- func EditInvoiceMessage(hasCustomer bool, customer string, invoiceID string, metadata string, ...) (*cell.Cell, error)
- func EditStoreMessage(storeName string, storeDescription string, storeImage string, ...) (*cell.Cell, error)
- func GetAmount(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (uint64, error)
- func GetCustomer(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (*address.Address, error)
- func GetDescription(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (string, error)
- func GetImage(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (string, error)
- func GetInvoiceID(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (string, error)
- func GetInvoiceMetadata(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (string, error)
- func GetInvoiceVersion(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (uint64, error)
- func GetIsActive(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (bool, error)
- func GetMccCode(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (int64, error)
- func GetMerchant(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (*address.Address, error)
- func GetName(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (string, error)
- func GetOwner(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (*address.Address, error)
- func GetStore(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (*address.Address, error)
- func GetStoreVersion(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (uint64, error)
- func GetStoreWebhook(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (string, error)
- func HasCustomer(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (bool, error)
- func InvoiceConfigToCell(config InvoiceData) (*cell.Cell, error)
- func IsActive(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (bool, error)
- func IsPaid(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (bool, error)
- func IssueInvoiceMessage(customer *address.Address, invoiceHasCustomer bool, invoiceID string, ...) (*cell.Cell, error)
- func PayInvoiceMessage() (*cell.Cell, error)
- func PrecalculateContractAddress(workchain int, code *cell.Cell, data *cell.Cell) string
- func PrecalculateInvoiceAddress(workchain int, config InvoiceData) (string, error)
- func RequestPurchaseMessage(invoiceID string, metadata string, amount uint64) (*cell.Cell, error)
- func StoreDataToCell(storeConfig StoreData) (*cell.Cell, error)
- func UpgradeCodeFullMessage(storeCode *cell.Cell, invoiceCode *cell.Cell, hasNewData bool, ...) (*cell.Cell, error)
- func UpgradeCodeInvoiceMessage(invoiceCode *cell.Cell) (*cell.Cell, error)
- func UpgradeCodeStoreMessage(storeCode *cell.Cell, hasNewData bool, newData *cell.Cell) (*cell.Cell, error)
- type InvoiceData
- type StoreData
Constants ¶
View Source
const ( InvoiceCode = "" /* 1368-byte string literal not displayed */ InvoiceVersion = 9 StoreCode = "" /* 1956-byte string literal not displayed */ StoreVersion = 11 )
View Source
const ( EditInvoice = 0x48c504f3 DeactivateInvoice = 0x1cc0b11e ActivateInvoice = 0xc285952f PayInvoice = 0xf53a02d3 )
OpCodes
View Source
const ( IssueInvoice = 0x4b4e70b0 RequestPurchase = 0x36b795b5 EditStore = 0xa0b2b61d DeleteStore = 0xfb4aca1a // UNUSED DeactivateStore = 0xf9bf9637 ActivateStore = 0x97500daf UpgradeCodeFull = 0xb43bbb52 UpgradeCodeStore = 0xacb08f28 UpgradeCodeInvoice = 0xb5f1424f )
OpCodes
View Source
const ZeroAddress string = "EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c"
Variables ¶
View Source
var ( DeployInvoiceFee = tlb.MustFromTON("0.005").NanoTON().Uint64() EditInvoiceFee = tlb.MustFromTON("0.005").NanoTON().Uint64() ActiveInvoiceFee = tlb.MustFromTON("0.005").NanoTON().Uint64() DeactiveInvoiceFee = tlb.MustFromTON("0.005").NanoTON().Uint64() )
View Source
var ( DeployStoreFee = tlb.MustFromTON("0.005").NanoTON().Uint64() EditStoreFee = tlb.MustFromTON("0.005").NanoTON().Uint64() ActivateStoreFee = tlb.MustFromTON("0.005").NanoTON().Uint64() DeactivateStoreFee = tlb.MustFromTON("0.005").NanoTON().Uint64() IssueInvoiceFee = tlb.MustFromTON("0.02").NanoTON().Uint64() RequestPurchaseFee = tlb.MustFromTON("0.05").NanoTON().Uint64() FullUpgradeFee = tlb.MustFromTON("0.006").NanoTON().Uint64() InvoiceUpgradeFee = tlb.MustFromTON("0.006").NanoTON().Uint64() )
Functions ¶
func ActivateInvoiceMessage ¶
func ActivateStoreMessage ¶
func BuildURLForWallet ¶
func DeactivateStoreMessage ¶
func EditInvoiceMessage ¶
func EditStoreMessage ¶
func GetCustomer ¶
func GetDescription ¶
func GetInvoiceID ¶
func GetInvoiceMetadata ¶
func GetInvoiceVersion ¶
func GetIsActive ¶
func GetMccCode ¶
func GetMerchant ¶
func GetStoreVersion ¶
func GetStoreWebhook ¶
func HasCustomer ¶
func InvoiceConfigToCell ¶
func InvoiceConfigToCell(config InvoiceData) (*cell.Cell, error)
func IssueInvoiceMessage ¶
func PayInvoiceMessage ¶
func PrecalculateInvoiceAddress ¶
func PrecalculateInvoiceAddress(workchain int, config InvoiceData) (string, error)
func RequestPurchaseMessage ¶
func UpgradeCodeFullMessage ¶
Types ¶
type InvoiceData ¶
type InvoiceData struct { Store string Merchant string Beneficiary string HasCustomer bool Customer string InvoiceID string Metadata string Amount uint64 Paid bool Active bool Version int64 }
func GetInvoiceData ¶
func GetInvoiceData(api *ton.APIClient, block *ton.BlockIDExt, addr *address.Address) (InvoiceData, error)
Click to show internal directories.
Click to hide internal directories.