обновление структуры файлов и новые смарт-контракты

This commit is contained in:
Alex Ant
2024-05-01 19:00:52 +03:00
parent f644431ebc
commit 096de7bf34
102 changed files with 3270 additions and 1784 deletions
+18 -20
View File
@@ -1,4 +1,4 @@
# pkg-placeholder
# cooptypes
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
@@ -6,32 +6,30 @@
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]
_description_
## Обозначения
_username - имя аккаунта пользователя до 12 символов.
> **Note**:
> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template.
_coopname - имя аккаунта кооператива до 12 символов.
## Sponsors
_chairman - имя аккаунта председателя кооператива до 12 символов.
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
</a>
</p>
_admin - имя аккаунта администратора кооператива до 12 символов.
_contract - собственное имя аккаунта контракта до 12 символов, в котором вызывается действие.
## License
[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
[MIT](./LICENSE) License © 2024-PRESENT [Alex Ant](https://github.com/dacom-dark-sun)
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/pkg-placeholder
[npm-downloads-src]: https://img.shields.io/npm/dm/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/pkg-placeholder
[bundle-src]: https://img.shields.io/bundlephobia/minzip/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=pkg-placeholder
[license-src]: https://img.shields.io/github/license/antfu/pkg-placeholder.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/antfu/pkg-placeholder/blob/main/LICENSE
[npm-version-src]: https://img.shields.io/npm/v/cooptypes?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/cooptypes
[npm-downloads-src]: https://img.shields.io/npm/dm/cooptypes?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/cooptypes
[bundle-src]: https://img.shields.io/bundlephobia/minzip/cooptypes?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=cooptypes
[license-src]: https://img.shields.io/github/license/intellect-run/cooptypes.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/intellect-run/cooptypes/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/pkg-placeholder
[jsdocs-href]: https://www.jsdocs.io/package/cooptypes
+13 -12
View File
@@ -7,6 +7,10 @@ settings:
importers:
.:
dependencies:
typedoc-theme-category-nav:
specifier: ^0.0.3
version: 0.0.3(typedoc@0.25.13)
devDependencies:
'@antfu/eslint-config':
specifier: ^2.16.0
@@ -1732,7 +1736,6 @@ packages:
/ansi-sequence-parser@1.1.1:
resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==}
dev: true
/ansi-styles@3.2.1:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
@@ -1840,7 +1843,6 @@ packages:
/balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: true
/better-docs@2.7.3(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2):
resolution: {integrity: sha512-OEk9e7RQUQbo1DmVo0mdsALZ+mT0SwIen7/DGnN4xKNktXKgz1j7+KQ2pObNHHVSFGu8YMQW/Ig1v6eiTkdnbw==}
@@ -1888,7 +1890,6 @@ packages:
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
dependencies:
balanced-match: 1.0.2
dev: true
/brace@0.11.1:
resolution: {integrity: sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q==}
@@ -3808,7 +3809,6 @@ packages:
/jsonc-parser@3.2.1:
resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==}
dev: true
/jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
@@ -4022,7 +4022,6 @@ packages:
/lunr@2.3.9:
resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
dev: true
/magic-string@0.30.10:
resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}
@@ -4062,7 +4061,6 @@ packages:
resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==}
engines: {node: '>= 12'}
hasBin: true
dev: true
/mdast-util-from-markdown@0.8.5:
resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==}
@@ -4158,7 +4156,6 @@ packages:
engines: {node: '>=16 || 14 >=14.17'}
dependencies:
brace-expansion: 2.0.1
dev: true
/minipass@3.3.6:
resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==}
@@ -5337,7 +5334,6 @@ packages:
jsonc-parser: 3.2.1
vscode-oniguruma: 1.7.0
vscode-textmate: 8.0.0
dev: true
/siginfo@2.0.0:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
@@ -5702,6 +5698,15 @@ packages:
typedoc: 0.25.13(typescript@5.4.5)
dev: true
/typedoc-theme-category-nav@0.0.3(typedoc@0.25.13):
resolution: {integrity: sha512-ADTf9iVuNHzc0T2i7Qw4ah3I6fXZehEsQVyfY2HZBchfbLk+8/5v5dDC0yDqHa5aJ5vg6+OjOMHmmzjr8FQMFg==}
engines: {node: '>= 18'}
peerDependencies:
typedoc: ^0.25.6
dependencies:
typedoc: 0.25.13(typescript@5.4.5)
dev: false
/typedoc@0.25.13(typescript@5.4.5):
resolution: {integrity: sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==}
engines: {node: '>= 16'}
@@ -5714,7 +5719,6 @@ packages:
minimatch: 9.0.4
shiki: 0.14.7
typescript: 5.4.5
dev: true
/typescript@3.9.10:
resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==}
@@ -5732,7 +5736,6 @@ packages:
resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==}
engines: {node: '>=14.17'}
hasBin: true
dev: true
/uc.micro@1.0.6:
resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==}
@@ -5995,11 +5998,9 @@ packages:
/vscode-oniguruma@1.7.0:
resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==}
dev: true
/vscode-textmate@8.0.0:
resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==}
dev: true
/vue-docgen-api@3.26.0:
resolution: {integrity: sha512-ujdg4i5ZI/wE46RZQMFzKnDGyhEuPCu+fMA86CAd9EIek/6+OqraSVBm5ZkLrbEd5f8xxdnqMU4yiSGHHeao/Q==}
+29
View File
@@ -0,0 +1,29 @@
/**
* Обобщенное имя аккаунта пользователя, которое должно быть заменено на реальное.
*/
export const _username = '_username'
/**
* Обобщенное имя аккаунта кооператива, которое должно быть заменено на реальное.
*/
export const _coopname = '_coopname'
/**
* Обобщенное имя аккаунта председателя кооператива, которое должно быть заменено на реальное.
*/
export const _chairman = '_chairman'
/**
* Обобщенное имя аккаунта администратора кооператива, которое должно быть заменено на реальное.
*/
export const _admin = '_admin'
/**
* Обобщенное имя аккаунта контракта, которое должно быть заменено на реальное.
*/
export const _contract = '_contract'
/**
* Системное имя коллективного аккаунта делегатов. Обычно это аккаунт "eosio".
*/
export const _system = '_system'
+17
View File
@@ -0,0 +1,17 @@
export * as Actors from './actors'
export * as ContractNames from './names'
/**
* Структура разрешений определяет права доступа аккунтов для выполнения операций в системе. Существуют три типа разрешений:
* - active: Предоставляет разрешение на выполнение большинства действий аккаунтом.
* - owner: Позволяет изменять активные разрешения и имеет полный контроль над аккаунтом.
* - special: Определяет кастомное разрешение для конкретных действий (actionName) в рамках определённых контрактов (_contract). Это разрешение выдаётся советом кооператива администратору и требует явного указания имени действия и контракта.
*
* Для каждого действия, требующего авторизации с целью информирования о запрашиваемой контрактами авторизации, в документации указываются следующие параметры:
* - actor: Имя аккаунта, выполняющего действие.
* - permissions: Массив, включающий стандартные (active, owner) или специальные разрешения. Специальные разрешения оформлены в виде объекта с полями actionName и _contract.
*
* При использовании этих разрешений необходимо заменить реальные значения для _contract и actionName для обеспечения корректной авторизации операций.
*/
export * as Permissions from './permissions'
+39
View File
@@ -0,0 +1,39 @@
export const _draft = {
production: 'draft',
testnet: 'drafttest222',
} as const
export const _fund = {
production: 'fund',
testnet: 'fundtest2222',
} as const
export const _gateway = {
production: 'gateway',
testnet: 'gateway2222',
} as const
export const _system = {
production: 'eosio',
testnet: 'eosio',
} as const
export const _soviet = {
production: 'soviet',
testnet: 'soviettest22',
} as const
export const _marketplace = {
production: 'marketplace',
testnet: 'markettest22',
} as const
export const _registrator = {
production: 'registrator',
testnet: 'regtest22222',
} as const
export const _token = {
production: 'eosio.token',
testnet: 'eosio.token',
} as const
+30
View File
@@ -0,0 +1,30 @@
import type * as Actors from '../actors'
/**
* Активные разрешения прав доступа аккаунта для выполнения действий.
*/
export const active = 'active'
/**
* Разрешения прав доступа владельца аккаунта для замены активных разрешений.
*/
export const owner = 'owner'
/**
* Специальные разрешения прав доступа, которые выдаются советом кооператива аккаунту администратора с указанием контракта и имени действия, которые ему становятся доступны в кооперативе.
*/
export const special = {
contract: '_contract',
action: 'actionName',
} as const
/**
* Интерфейс `Authorization` представляет собой модель авторизации в системе.
*
* @property {Array} permissions - Массив разрешений, которые могут быть активными, владельцами или специальными.
* @property {Actors} actor - Актор, который может быть пользователем, председателем, администратором, контрактом или системным аккаунтом.
*/
export interface Authorization {
permissions: (typeof active | typeof owner | typeof special)[]
actor: typeof Actors._username | typeof Actors._chairman | typeof Actors._admin | typeof Actors._contract | typeof Actors._system
}
-30
View File
@@ -1,30 +0,0 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
declare namespace ano {
export type IAsset = string
export type IName = string
export type IUint64 = number | string
export interface IBalances extends IBalancesBase {
}
export interface IBalancesBase {
id: IUint64
contract: IName
quantity: IAsset
}
export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
key: IName
secondary_key: IName
value: IUint64
}
export interface INewid {
coop_id: IUint64
}
}
-2
View File
@@ -1,2 +0,0 @@
export type IName = string
export type IUint64 = number | string
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Draft from '../../../interfaces/draft'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._system }] as const
/**
* Имя действия
*/
export const actionName = 'createdraft'
/**
* @interface
*/
export type ICreateDraft = Draft.ICreatedraft
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Draft from '../../../interfaces/draft'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._system }] as const
/**
* Имя действия
*/
export const actionName = 'createtrans'
/**
* @interface
*/
export type ICreateTranslation = Draft.ICreatetrans
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Draft from '../../../interfaces/draft'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._system }] as const
/**
* Имя действия
*/
export const actionName = 'deldraft'
/**
* @interface
*/
export type IDeleteDraft = Draft.IDeldraft
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Draft from '../../../interfaces/draft'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._system }] as const
/**
* Имя действия
*/
export const actionName = 'edittrans'
/**
* @interface
*/
export type IEditTranslation = Draft.IEdittrans
+10
View File
@@ -0,0 +1,10 @@
export * as createTranslation from './createTranslation'
export * as createDraft from './createDraft'
export * as deleteDraft from './deleteDraft'
export * as editTranslation from './editTranslation'
/**
* Имя действия
* @private
*/
export * as newId from './newId'
+16
View File
@@ -0,0 +1,16 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Draft from '../../../interfaces/draft'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._draft }] as const
/**
* Имя действия
*/
export const actionName = 'newid'
/**
* @interface
* Действие вызывается контрактом в процессе исполнения для возврата идентификатора черновика.
*/
export type INewId = Draft.INewid
+11
View File
@@ -0,0 +1,11 @@
import * as contractNames from '../../common/names'
export * as Actions from './actions'
export * as Tables from './tables'
/**
* @private
*/
export * as Interfaces from '../../interfaces/draft'
export const contractName = contractNames._draft
+18
View File
@@ -0,0 +1,18 @@
import * as Actors from '../../../common/actors'
import type * as Draft from '../../../interfaces/draft'
/**
* Имя таблицы
*/
export const tableName = 'drafts'
/**
* Таблица хранится в {@link Actors._contract | области памяти контракта}.
*/
export const scope = Actors._contract
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type IDrafts = Draft.IDrafts
+2
View File
@@ -0,0 +1,2 @@
export * as Drafts from './drafts'
export * as Translations from './translations'
@@ -0,0 +1,18 @@
import * as Actors from '../../../common/actors'
import type * as Draft from '../../../interfaces/draft'
/**
* Имя таблицы
*/
export const tableName = 'translations'
/**
* Область хранения в памяти
*/
export const scope = Actors._contract
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type ITranslations = Draft.ITranslations
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._fund }] as const
/**
* Имя действия
*/
export const actionName = 'addaccum'
/**
* @interface
*/
export type IAddAccumulation = Fund.IAddaccum
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._gateway }] as const
/**
* Имя действия
*/
export const actionName = 'addcirculate'
/**
* @interface
*/
export type IAddCirculation = Fund.IAddcirculate
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._fund }] as const
/**
* Имя действия
*/
export const actionName = 'addexpense'
/**
* @interface
*/
export type IAddExpense = Fund.IAddexpense
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._soviet }] as const
/**
* Имя действия
*/
export const actionName = 'authorize'
/**
* @interface
*/
export type IAuthorize = Fund.IAuthorize
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Fund from '../../../interfaces/fund'
import * as Actors from '../../../common/actors'
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'complete'
/**
* @interface
*/
export type ICompleteWithdraw = Fund.IComplete
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Fund from '../../../interfaces/fund'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._chairman }] as const
/**
* Имя действия
*/
export const actionName = 'createfund'
/**
* @interface
*/
export type ICreateFund = Fund.ICreatefund
@@ -0,0 +1,26 @@
import * as Permissions from '../../../common/permissions'
import type * as Fund from '../../../interfaces/fund'
import { Actors } from '../../../common'
/**
* Требуется авторизация {@link Actors._username | аккаунта пользователя} для возврата паевого взноса,
* авторизация {@link Actors._admin | аккаунта администратора} со специальной доверенностью совета
* на совершение действия или авторизация любого {@link Actors._contract | контракта},
* которому было передано управление фондом накопления или списания.
*/
export const authorizations = [
{ permissions: [Permissions.active], actor: Actors._username },
{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin },
{ permissions: [Permissions.active], actor: Actors._contract },
] as const
/**
* Имя действия
*/
export const actionName = 'fundwithdraw'
/**
* @interface
*/
export type ICreateWithdraw = Fund.IFundwithdraw
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Fund from '../../../interfaces/fund'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._chairman }] as const
/**
* Имя действия
*/
export const actionName = 'delfund'
/**
* @interface
*/
export type IDeleteFund = Fund.IDelfund
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Fund from '../../../interfaces/fund'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._chairman }] as const
/**
* Имя действия
*/
export const actionName = 'editfund'
/**
* @interface
*/
export type IEditFund = Fund.IEditfund
+86
View File
@@ -0,0 +1,86 @@
/**
* @private
* Вызывается контрактом автоматически по ходу выполнения логики для прозрачного добавления фонда накопления.
*/
export * as addAccumulation from './addAccumulation'
/**
* @private
* Вызывается контрактом автоматически по ходу выполнения логики для прозрачного списания фонда накопления.
*/
export * as subAccumulation from './subAccumulation'
/**
* @private
* Вызывается контрактом автоматически по ходу выполнения логики для прозрачного увеличения паевого фонда.
*/
export * as addCirculation from './addCirculation'
/**
* @private
* Вызывается контрактом автоматически по ходу выполнения логики для прозрачного списания членских взносов по фонду.
*/
export * as addExpense from './addExpense'
/**
* @private
* Вызывается контрактом _soviet автоматически по ходу выполнения логики для установки решения совета кооператива о использовании фонда.
*/
export * as authorizeWithdraw from './authorizeWithdraw'
/**
* Вызывается администратором для подтверждения о совершении вывода.
*/
export * as completeWithdraw from './completeWithdraw'
/**
* Вызывается контрактом автоматически по ходу выполнения логики для возврата идентификатора нового фонда после его создания.
* @private
*/
export * as newFund from './newFund'
/**
* Вызывается председателем для создания фонда
*/
export * as createFund from './createFund'
/**
* Вызывается председателем для удаления фонда
*/
export * as deleteFund from './deleteFund'
/**
* Вызывается председателем для редактирования фонда
*/
export * as editFund from './editFund'
/**
* Действие используется для создания вывода средств из фонда накопления или по фонду списания, которое
* затем требует решения совета исполнения с помощью действия {@link authorizeWithdraw | авторизации} и последующего подтверждения исполнения с помощью действия {@link completeWithdraw | подтверждения}.
*/
export * as createWithdraw from './createWithdraw'
/**
* Метод используется при создании цифрового кооператива для инициализации его фондов с нулевыми значениями.
* @private
*/
export * as init from './init'
/**
* Действие вызывается контрактом в процессе исполнения для возврата идентификатора нового списания или вывода.
* @private
*/
export * as newWithdraw from './newWithdraw'
/**
* Действие для распределения членского взноса по фондам накопления согласно принятым положениям
* и сохранения остатка после распределения в кошельке для дальнейшего списания по статьям.
* @private
*/
export * as spreadAmount from './spreadAmount'
/**
* Метод списания средств из паевого фонда вызывается контрактом шлюза при выполнении поручения на вывод средств с кошелька.
* @private
*/
export * as subCirculation from './subCirculation'
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._soviet }] as const
/**
* Имя действия
*/
export const actionName = 'init'
/**
* @interface
*/
export type IInit = Fund.IInit
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._fund }] as const
/**
* Имя действия
*/
export const actionName = 'newfund'
/**
* @interface
*/
export type INewfund = Fund.INewfund
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._fund }] as const
/**
* Имя действия
*/
export const actionName = 'newwithdraw'
/**
* @interface
*/
export type INewWithdraw = Fund.INewwithdraw
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._marketplace }, { permissions: [Permissions.active], actor: ContractNames._gateway }] as const
/**
* Имя действия
*/
export const actionName = 'spreadamount'
/**
* @interface
*/
export type ISpreadAmount = Fund.ISpreadamount
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._fund }] as const
/**
* Имя действия
*/
export const actionName = 'subaccum'
/**
* @interface
*/
export type ISubAccumulation = Fund.ISubaccum
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Fund from '../../../interfaces/fund'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._gateway }] as const
/**
* Имя действия
*/
export const actionName = 'subcirculate'
/**
* @interface
*/
export type ISubCirculation = Fund.ISubcirculate
+11
View File
@@ -0,0 +1,11 @@
import * as contractNames from '../../common/names'
export * as Actions from './actions'
export * as Tables from './tables'
/**
* @private
*/
export * as Interfaces from '../../interfaces/fund'
export const contractName = contractNames._fund
@@ -0,0 +1,18 @@
import type * as Fund from '../../../interfaces/fund'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'accfunds'
/**
* Таблица хранится в {@link ContractNames._fund | области памяти контракта}.
*/
export const scope = ContractNames._fund
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type IAccumulatedFunds = Fund.IAccfunds
+17
View File
@@ -0,0 +1,17 @@
import type * as Fund from '../../../interfaces/fund'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'expfunds'
/**
* Таблица хранится в {@link ContractNames._fund | области памяти контракта}.
*/
export const scope = ContractNames._fund
/**
* @interface
*/
export type IExpensedFunds = Fund.IExpfunds
+17
View File
@@ -0,0 +1,17 @@
import type * as Fund from '../../../interfaces/fund'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'fundwallet'
/**
* Таблица хранится в {@link ContractNames._fund | области памяти контракта}.
*/
export const scope = ContractNames._fund
/**
* @interface
*/
export type IFundWallet = Fund.IFundwallet
@@ -0,0 +1,17 @@
import type * as Fund from '../../../interfaces/fund'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'fwithdraws'
/**
* Таблица хранится в {@link ContractNames._fund | области памяти контракта}.
*/
export const scope = ContractNames._fund
/**
* @interface
*/
export type IFundWithdraws = Fund.IFwithdraws
+20
View File
@@ -0,0 +1,20 @@
/**
* Таблица содержит информацию о фондах накопления и их балансах.
*
*/
export * as AccumulatedFunds from './accumulationFunds'
/**
* Таблица содержит информацию о фондах списания и их балансах.
*/
export * as ExpensedFunds from './expenseFunds'
/**
* Таблица содержит сводную информацию о балансе кошелька всех фондов кооператива.
*/
export * as FundWallet from './fundWallet'
/**
* Таблица содержит информацию о запросах на списание по статьям и выводах из фондов.
*/
export * as FundWithdraws from './fundWithdraws'
-119
View File
@@ -1,119 +0,0 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
declare namespace gateway {
export type IAsset = string
export type IName = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IBalances extends IBalancesBase {
}
export interface IBalancesBase {
id: IUint64
contract: IName
quantity: IAsset
}
export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
key: IName
secondary_key: IName
value: IUint64
}
export interface IDeposit {
coopname: IName
username: IName
type: IName
quantity: IAsset
}
export interface IDeposits {
id: IUint64
username: IName
coopname: IName
type: IName
token_contract: IName
quantity: IAsset
status: IName
link: string
memo: string
expired_at: ITimePointSec
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IDpcomplete {
coopname: IName
admin: IName
deposit_id: IUint64
memo: string
}
export interface IDpfail {
coopname: IName
admin: IName
deposit_id: IUint64
memo: string
}
export interface INewdepositid {
username: IName
id: IUint64
}
export interface INewwithdrid {
username: IName
id: IUint64
}
export interface IWithdraw {
coopname: IName
username: IName
quantity: IAsset
document: IDocument
bank_data_id: string
memo: string
}
export interface IWithdrawauth {
coopname: IName
withdraw_id: IUint64
}
export interface IWithdraws {
id: IUint64
username: IName
coopname: IName
bank_data_id: string
token_contract: IName
quantity: IAsset
status: IName
document: IDocument
memo: string
created_at: ITimePointSec
}
export interface IWthdcomplete {
coopname: IName
admin: IName
withdraw_id: IUint64
memo: string
}
export interface IWthdfail {
coopname: IName
admin: IName
withdraw_id: IUint64
memo: string
}
}
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Gateway from '../../../interfaces/gateway'
/**
* Имя действия
* Требуется авторизация {@link ContractNames._soviet | аккаунта контракта совета}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._soviet }] as const
/**
* Имя действия
*/
export const actionName = 'withdrawauth'
/**
* @interface
*/
export type IAuthorizeWithdraw = Gateway.IWithdrawauth
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Gateway from '../../../interfaces/gateway'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._admin | администратора кооператива} со специальным разрешением.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'dpcomplete'
/**
* @interface
*/
export type ICompleteDeposit = Gateway.IDpcomplete
@@ -0,0 +1,20 @@
import * as Permissions from '../../../common/permissions'
import type * as Gateway from '../../../interfaces/gateway'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._admin | администратора}.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'wthdcomplete'
/**
* @interface
* Действие для подтверждения платежа по возврату паевого взноса пользователю.
*/
export type IFailDeposit = Gateway.IWthdcomplete
@@ -0,0 +1,27 @@
import * as Permissions from '../../../common/permissions'
import type * as Gateway from '../../../interfaces/gateway'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._coopname | технического аккаунта кооператива} со специальным разрешением.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._coopname }] as const
/**
* Имя действия
*/
export const actionName = 'deposit'
/**
* @interface
* Действие для создания заявки на взнос в кошелёк, которое производится уполномоченным аккаунтом от кооператива с бэкенда.
* Создает новую запись депозита в таблице.
*
* @prop coopname Имя аккаунта кооператива, в рамках которого создается депозит.
* @prop username Имя пользователя, создающего запись.
* @prop type Тип заявки на депозит ('registration' или 'deposit').
* @prop quantity Количество в формате asset.
*/
export type ICreateDeposit = Gateway.IDeposit
@@ -0,0 +1,20 @@
import * as Permissions from '../../../common/permissions'
import type * as Gateway from '../../../interfaces/gateway'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'withdraw'
/**
* @interface
* Действие для создания заявки на возврат паевого взноса из кошелька.
*/
export type IFailDeposit = Gateway.IWithdraw
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Gateway from '../../../interfaces/gateway'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._admin | администратором кооператива} со специальным разрешением.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'dpfail'
/**
* @interface
*/
export type IFailDeposit = Gateway.IDpfail
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Gateway from '../../../interfaces/gateway'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._admin | администратора кооператива} со специальным разрешением.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'wthdfail'
/**
* @interface
*/
export type IFailWithdraw = Gateway.IWthdfail
+44
View File
@@ -0,0 +1,44 @@
/**
* Вызывается техническим аккаунтом кооператива для создания объекта депозита со статусом платежа.
*/
export * as createDeposit from './createDeposit'
/*
* Действие используется для установки статуса депозита в 'completed' и обновления его заметки.
* Это действие также производит выпуск токенов учёта на лицевой счёт пользователя, основываясь на данных депозита.
*/
export * as completeDeposit from './completeDeposit'
/**
* Действие `dpfail` используется для обозначения неудачи в обработке депозита, устанавливая его статус в 'failed' и обновляя заметку.
*/
export * as failDeposit from './failDeposit'
/**
* Действие вызывается контрактом автоматически по ходу выполнения логики для возврата идентификатора нового депозита.
* @private
*/
export * as newDepositId from './newDepositId'
/**
* Действие вызывается контрактом автоматически по ходу выполнения логики для возврата идентификатора нового депозита.
* @private
*/
export * as newWithdrawId from './newWithdrawId'
/**
* Действие вызывается для создания заявки на возврат паевого взноса пользователем.
*/
export * as createWithdraw from './createWithdraw'
/**
*
* Действие вызывается администратором для подтверждения платежа по возврату паевого взноса пользователю.
*/
export * as completeWithdraw from './completeWithdraw'
/**
*
* Действие вызывается администратором для информировании пользователя о возникновании ошибки в процессе возврата паевого взноса.
*/
export * as failWithdraw from './failWithdraw'
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Gateway from '../../../interfaces/gateway'
/**
* Имя действия
* Требуется авторизация {@link ContractNames._gateway | аккаунта контракта шлюза}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._gateway }] as const
/**
* Имя действия
*/
export const actionName = 'newdepositid'
/**
* @interface
*/
export type NewDepositId = Gateway.INewdepositid
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Gateway from '../../../interfaces/gateway'
/**
* Имя действия
* Требуется авторизация {@link ContractNames._gateway | аккаунта контракта шлюза}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._gateway }] as const
/**
* Имя действия
*/
export const actionName = 'newwithdrid'
/**
* @interface
*/
export type NewWithdrawId = Gateway.INewwithdrid
+11
View File
@@ -0,0 +1,11 @@
import * as contractNames from '../../common/names'
export * as Actions from './actions'
export * as Tables from './tables'
/**
* @private
*/
export * as Interfaces from '../../interfaces/gateway'
export const contractName = contractNames._gateway
+21
View File
@@ -0,0 +1,21 @@
import type * as Gateway from '../../../interfaces/gateway'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'deposits'
/**
* Таблица хранится в {@link ContractNames._gateway | области памяти контракта}.
*/
/**
* Этот файл содержит интерфейс для таблицы "deposits".
*/
export const scope = ContractNames._gateway
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type IDeposits = Gateway.IDeposits
+2
View File
@@ -0,0 +1,2 @@
export * as Deposits from './deposits'
export * as Withdrws from './withdraws'
+18
View File
@@ -0,0 +1,18 @@
import type * as Gateway from '../../../interfaces/gateway'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'withdraws'
/**
* Таблица хранится в {@link ContractNames._gateway | области памяти контракта}.
*/
export const scope = ContractNames._gateway
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type IWithdraws = Gateway.IWithdraws
+24
View File
@@ -0,0 +1,24 @@
/**
* Смарт-контракт шаблонов документов хранит предзаполненные черновики документов и их переводы.
*/
export * as DraftContract from './draft'
/**
* Смарт-контракт управления фондами кооператива.
*/
export * as FundContract from './fund'
/**
* Смарт-контракт управления депозитами и выводами кооператива.
*/
export * as GatewayContract from './gateway'
/**
* Смарт-контракт управления реестрами аккаунтов пользователей и организаций.
*/
export * as RegistratorContract from './registrator'
/**
* Смарт-контракт управления системными токенами.
*/
export * as TokenContract from './token'
-210
View File
@@ -1,210 +0,0 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
declare namespace marketplace {
export type IAsset = string
export type IName = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IAccept {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IAddpieces {
coopname: IName
username: IName
exchange_id: IUint64
new_pieces: IUint64
}
export interface IAuthorize {
coopname: IName
exchange_id: IUint64
contribution_product_decision_id: IUint64
contribution_product_authorization: IDocument
return_product_decision_id: IUint64
return_product_authorization: IDocument
}
export interface ICancel {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IComplete {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IDecline {
coopname: IName
username: IName
exchange_id: IUint64
meta: string
}
export interface IDelivered {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IDispute {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IExchange {
id: IUint64
parent_id: IUint64
program_id: IUint64
coopname: IName
type: IName
status: IName
username: IName
parent_username: IName
token_contract: IName
unit_cost: IAsset
supplier_amount: IAsset
total_cost: IAsset
membership_fee: IAsset
remain_units: IUint64
blocked_units: IUint64
delivered_units: IUint64
data: string
meta: string
money_contributor: IName
product_contributor: IName
contribute_product_statement: IDocument
return_product_statement: IDocument
contribution_product_decision_id: IUint64
contribution_product_authorization: IDocument
return_product_decision_id: IUint64
return_product_authorization: IDocument
product_contribution_act_validation: IDocument
product_contribution_act: IDocument
product_recieve_act: IDocument
product_recieve_act_validation: IDocument
product_lifecycle_secs: IUint64
cancellation_fee: IUint64
cancellation_fee_amount: IAsset
created_at: ITimePointSec
accepted_at: ITimePointSec
supplied_at: ITimePointSec
delivered_at: ITimePointSec
recieved_at: ITimePointSec
completed_at: ITimePointSec
declined_at: ITimePointSec
disputed_at: ITimePointSec
canceled_at: ITimePointSec
warranty_delay_until: ITimePointSec
deadline_for_receipt: ITimePointSec
is_warranty_return: boolean
warranty_return_id: IUint64
}
export interface IExchangeParams {
username: IName
parent_id: IUint64
program_id: IUint64
coopname: IName
pieces: IUint64
unit_cost: IAsset
product_lifecycle_secs: IUint64
document: IDocument
data: string
meta: string
}
export interface IModerate {
coopname: IName
username: IName
exchange_id: IUint64
cancellation_fee: IUint64
}
export interface INewid {
id: IUint64
type: IName
}
export interface IOffer {
params: IExchangeParams
}
export interface IOrder {
params: IExchangeParams
}
export interface IProhibit {
coopname: IName
username: IName
exchange_id: IUint64
meta: string
}
export interface IPublish {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IRecieve {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IRecievecnfrm {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface ISupply {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface ISupplycnfrm {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IUnpublish {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IUpdate {
coopname: IName
username: IName
exchange_id: IUint64
remain_units: IUint64
unit_cost: IAsset
data: string
meta: string
}
}
-145
View File
@@ -1,145 +0,0 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
declare namespace registrator {
export type IAsset = string
export type IName = string
export type IPublicKey = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IAccounts {
username: IName
referer: IName
registrator: IName
type: IName
status: IName
meta: string
reputation: IUint64
registration_amount: IAsset
registered_at: ITimePointSec
signature_expires_at: ITimePointSec
}
export interface IBalances extends IBalancesBase {
}
export interface IBalancesBase {
id: IUint64
contract: IName
quantity: IAsset
}
export interface IChangekey {
username: IName
public_key: IPublicKey
}
export interface IConfirmreg {
coopname: IName
member: IName
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IJoincoop {
coopname: IName
username: IName
document: IDocument
}
export interface INewaccount {
registrator: IName
referer: IName
username: IName
public_key: IPublicKey
signature_hash: string
meta: string
}
export interface IOrgData {
storage: IStorage
is_cooperative: boolean
coop_type: IName
token_contract: IName
announce: string
description: string
initial: IAsset
minimum: IAsset
}
export interface IOrgs {
username: IName
parent_username: IName
verifications: IVerification[]
storages: IStorage[]
is_cooperative: boolean
is_active: boolean
coop_type: IName
token_contract: IName
announce: string
description: string
registration: IAsset
initial: IAsset
minimum: IAsset
}
export interface IPlotData {
storage: IStorage
announce: string
description: string
}
export interface IRegorg {
coopname: IName
username: IName
params: IOrgData
}
export interface IRegplot {
coopname: IName
username: IName
params: IPlotData
}
export interface IReguser {
coopname: IName
username: IName
storage: IStorage
}
export interface IStorage {
storage_username: IName
}
export interface IUpdate {
username: IName
meta: string
}
export interface IUsers {
username: IName
is_active: boolean
storages: IStorage[]
verifications: IVerification[]
}
export interface IVerificate {
username: IName
procedure: IName
}
export interface IVerification {
verificator: IName
is_verified: boolean
procedure: IName
created_at: ITimePointSec
last_update: ITimePointSec
notice: string
}
}
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Registrator from '../../../interfaces/registrator'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._system }] as const
/**
* Имя действия
*/
export const actionName = 'changekey'
/**
* @interface
*/
export type IChangeKey = Registrator.IChangekey
@@ -0,0 +1,18 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Registrator from '../../../interfaces/registrator'
/**
* Требуется подпись контракта {@link ContractNames._soviet | совета}, которая поставляется автоматически в момент исполнения решения совета о приёме нового пайщика.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._soviet }] as const
/**
* Имя действия
*/
export const actionName = 'confirmreg'
/**
* @interface
*/
export type IConfirmJoin = Registrator.IConfirmreg
@@ -0,0 +1,18 @@
import * as Permissions from '../../../common/permissions'
import type * as Registrator from '../../../interfaces/registrator'
import { Actors } from '../../../common'
/**
* Требуется авторизация аккаунта {@link Actors._admin | администратора} c позитивным балансом AXON для оплаты аренды ресурсов.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'newaccount'
/**
* @interface
*/
export type ICreateAccount = Registrator.INewaccount
@@ -0,0 +1,35 @@
/**
* Действие верификации аккаунта
*/
export * as verificateAccount from './verificateAccount'
/**
* Действие обновления публичных данных аккаунта
*/
export * as updateAccount from './updateAccount'
/**
* Действие создания нового аккаунта
*/
export * as createAccount from './createAccount'
/**
* Действие регистрации карточки организации в кооперативе
*/
export * as registerOrganization from './registerOrganization'
/**
* Действие замены активного ключа пользователя за подписью системного аккаунта делегатов.
*/
export * as changeKey from './changeKey'
/**
* Действие подачи заявления на вступление в кооператив
*/
export * as joinCooperative from './joinCooperative'
/**
* Действие, которое вызывается контрактом _soviet для подтверждения заявки на вступление в кооператив после принятия советом решения.
* @private
*/
export * as confirmJoin from './confirmJoin'
@@ -0,0 +1,18 @@
import * as Permissions from '../../../common/permissions'
import type * as Registrator from '../../../interfaces/registrator'
import { Actors } from '../../../common'
/**
* Требуется авторизация администратора кооператива или пользователя.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._admin }, { permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'joincoop'
/**
* @interface
*/
export type IJoinCooperative = Registrator.IJoincoop
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Registrator from '../../../interfaces/registrator'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'regorg'
/**
* @interface
*/
export type IRegisterOrganization = Registrator.IRegorg
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Registrator from '../../../interfaces/registrator'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'reguser'
/**
* @interface
*/
export type IRegistrerUser = Registrator.IReguser
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Registrator from '../../../interfaces/registrator'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'update'
/**
* @interface
*/
export type IUpdateAccount = Registrator.IUpdate
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Registrator from '../../../interfaces/registrator'
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._system }] as const
/**
* Имя действия
*/
export const actionName = 'verificate'
/**
* @interface
*/
export type IVerificateAccount = Registrator.IVerificate
+11
View File
@@ -0,0 +1,11 @@
import * as contractNames from '../../common/names'
export * as Actions from './actions'
export * as Tables from './tables'
/**
* @private
*/
export * as Interfaces from '../../interfaces/registrator'
export const contractName = contractNames._registrator
@@ -0,0 +1,18 @@
import type * as Registrator from '../../../interfaces/registrator'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'accounts'
/**
* Таблица хранится в {@link ContractNames._registrator | области памяти контракта}.
*/
export const scope = ContractNames._registrator
/**
* @interface
* Таблица содержит реестр аккаунтов системы.
*/
export type IAccounts = Registrator.IAccounts
@@ -0,0 +1,17 @@
import { Actors } from '../../../common'
import type * as Registrator from '../../../interfaces/registrator'
/**
* Имя таблицы
*/
export const tableName = 'balances'
/**
* Таблица хранится в {@link Actors._coopname | области памяти кооператива}.
*/
export const scope = Actors._coopname
/**
* @interface
* Таблица содержит баланс для регистрации новых аккаунтов кооперативом.
*/
export type IBalances = Registrator.IBalancesBase
+20
View File
@@ -0,0 +1,20 @@
/**
* Таблица содержит реестр аккаунтов системы.
*
*/
export * as Accounts from './accounts'
// /**
// * Таблица содержит баланс для регистрации новых аккаунтов кооперативом.
// */
// export * as Balances from './balances'
/**
* Таблица содержит реестр организаций-пайщиков кооператива.
*/
export * as Organizations from './organizations'
/**
* Таблица содержит реестр пользователей-пайщиков кооператива.
*/
export * as Users from './users'
@@ -0,0 +1,18 @@
import type * as Registrator from '../../../interfaces/registrator'
import * as ContractNames from '../../../common/names'
/**
* Имя таблицы
*/
export const tableName = 'orgs'
/**
* Таблица хранится в {@link ContractNames._registrator | области памяти контракта}.
*/
export const scope = ContractNames._registrator
/**
* @interface
* Таблица содержит реестр организаций-пайщиков кооператива.
*/
export type IUsers = Registrator.IOrgs
+18
View File
@@ -0,0 +1,18 @@
import { Actors } from '../../../common'
import type * as Registrator from '../../../interfaces/registrator'
/**
* Имя таблицы
*/
export const tableName = 'users'
/**
* Таблица хранится в {@link Actors._coopname | области памяти кооператива}.
*/
export const scope = Actors._coopname
/**
* @interface
* Таблица содержит реестр пользователей-пайщиков кооператива.
*/
export type IUsers = Registrator.IUsers
-454
View File
@@ -1,454 +0,0 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
declare namespace soviet {
export type IAsset = string
export type IName = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IAct {
coopname: IName
username: IName
action: IName
decision_id: IUint64
document: IDocument
}
export interface IAddbalance {
coopname: IName
username: IName
quantity: IAsset
}
export interface IAddprogbal {
coopname: IName
username: IName
program_id: IUint64
quantity: IAsset
}
export interface IAddress {
latitude: string
longitude: string
country: string
state: string
city: string
district: string
street: string
house_number: string
building_section: string
unit_number: string
directions: string
phone_number: string
business_hours: string
}
export interface IAddresses {
id: IUint64
coopname: IName
cooplate: IName
data: IAddress
meta: string
}
export interface IAddstaff {
coopname: IName
chairman: IName
username: IName
rights: IRight[]
position_title: string
}
export interface IAuthorize {
coopname: IName
chairman: IName
decision_id: IUint64
document: IDocument
}
export interface IAutomate {
coopname: IName
board_id: IUint64
member: IName
action_type: IName
provider: IName
encrypted_private_key: string
}
export interface IAutomator {
id: IUint64
coopname: IName
board_id: IUint64
member: IName
action_type: IName
permission_name: IName
encrypted_private_key: string
}
export interface IAutosigner {
decision_id: IUint64
}
export interface IBatch {
coopname: IName
action: IName
batch_id: IUint64
}
export interface IBlockbal {
coopname: IName
username: IName
quantity: IAsset
}
export interface IBoardMember {
username: IName
is_voting: boolean
position_title: string
position: IName
}
export interface IBoards {
id: IUint64
type: IName
name: string
description: string
members: IBoardMember[]
created_at: ITimePointSec
last_update: ITimePointSec
}
export interface ICancelorder {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface ICancelvote {
coopname: IName
member: IName
decision_id: IUint64
}
export interface IChange {
coopname: IName
parent_username: IName
username: IName
exchange_id: IUint64
money_contributor: IName
product_contributor: IName
}
export interface IChanges {
id: IUint64
exchange_id: IUint64
contribution_product_decision_id: IUint64
return_product_decision_id: IUint64
}
export interface ICompleted {
coopname: IName
exchange_id: IUint64
}
export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
key: IName
secondary_key: IName
value: IUint64
}
export interface ICreaddress {
coopname: IName
chairman: IName
cooplate: IName
data: IAddress
meta: string
}
export interface ICreateboard {
coopname: IName
chairman: IName
type: IName
members: IBoardMember[]
name: string
description: string
}
export interface ICreateprog {
coopname: IName
chairman: IName
title: string
announce: string
description: string
preview: string
images: string
calculation_type: IName
fixed_membership_contribution: IAsset
membership_percent_fee: IUint64
}
export interface IDecision {
coopname: IName
username: IName
action: IName
decision_id: IUint64
document: IDocument
}
export interface IDecisions {
id: IUint64
coopname: IName
username: IName
type: IName
batch_id: IUint64
votes_for: IName[]
votes_against: IName[]
validated: boolean
approved: boolean
authorized: boolean
authorization: IDocument
created_at: ITimePointSec
}
export interface IDeladdress {
coopname: IName
chairman: IName
address_id: IUint64
}
export interface IDisableprog {
coopname: IName
id: IUint64
}
export interface IDisautomate {
coopname: IName
board_id: IUint64
member: IName
automation_id: IUint64
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IDraft {
coopname: IName
username: IName
decision_id: IUint64
}
export interface IEditaddress {
coopname: IName
chairman: IName
address_id: IUint64
cooplate: IName
data: IAddress
meta: string
}
export interface IEditprog {
coopname: IName
id: IUint64
title: string
announce: string
description: string
preview: string
images: string
}
export interface IExec {
executer: IName
coopname: IName
decision_id: IUint64
}
export interface IFundwithdraw {
coopname: IName
username: IName
type: IName
withdraw_id: IUint64
document: IDocument
}
export interface IJoincoop {
coopname: IName
username: IName
document: IDocument
}
export interface IJoincoops {
id: IUint64
username: IName
is_paid: boolean
statement: IDocument
notice: string
}
export interface IMcontribute {
coopname: IName
username: IName
program_id: IUint64
type: IName
secondary_id: IUint64
}
export interface IParticipants {
username: IName
created_at: ITimePointSec
last_update: ITimePointSec
last_min_pay: ITimePointSec
status: IName
is_initial: boolean
is_minimum: boolean
has_vote: boolean
}
export interface IPcontribute {
coopname: IName
username: IName
program_id: IUint64
type: IName
secondary_id: IUint64
}
export interface IProgcomarket {
id: IUint64
coopname: IName
is_active: boolean
title: string
announce: string
description: string
preview: string
images: string
meta: string
calculation_type: IName
membership_percent_fee: IUint64
fixed_membership_contribution: IAsset
}
export interface IProgram {
coopname: IName
program_id: IUint64
}
export interface IProgwallets {
id: IUint64
coopname: IName
program_id: IUint64
username: IName
available: IAsset
}
export interface IRecieved {
coopname: IName
exchange_id: IUint64
}
export interface IRegpaid {
coopname: IName
username: IName
}
export interface IRight {
contract: IName
action_name: IName
}
export interface IRmstaff {
coopname: IName
chairman: IName
username: IName
}
export interface ISetrights {
coopname: IName
chairman: IName
username: IName
rights: IRight[]
}
export interface IStaff {
username: IName
position_title: string
roles: IName[]
rights: IRight[]
created_at: ITimePointSec
updated_at: ITimePointSec
}
export interface IStatement {
coopname: IName
username: IName
action: IName
decision_id: IUint64
document: IDocument
}
export interface ISubbalance {
coopname: IName
username: IName
quantity: IAsset
}
export interface ISubprogbal {
coopname: IName
username: IName
program_id: IUint64
quantity: IAsset
}
export interface IUnblockbal {
coopname: IName
username: IName
quantity: IAsset
}
export interface IUpdateboard {
coopname: IName
chairman: IName
board_id: IUint64
members: IBoardMember[]
name: string
description: string
}
export interface IValidate {
coopname: IName
username: IName
decision_id: IUint64
}
export interface IVoteagainst {
coopname: IName
member: IName
decision_id: IUint64
}
export interface IVotefor {
coopname: IName
member: IName
decision_id: IUint64
}
export interface IWallets {
username: IName
coopname: IName
available: IAsset
blocked: IAsset
minimum: IAsset
}
export interface IWithdraw {
coopname: IName
username: IName
withdraw_id: IUint64
}
}
-687
View File
@@ -1,687 +0,0 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
declare namespace system {
export type IAsset = string
export type IName = string
export type IBytes = string | number[] | Uint8Array
export type IChecksum256 = string
export type IPublicKey = string
export type ISymbol = string
export type ITimePoint = string
export type ITimePointSec = string
export type IBlockTimestampType = string
export type IInt64 = number | string
export type IUint8 = number
export type IUint16 = number
export type IUint32 = number
export type IUint64 = number | string
export type IUint128 = string
export type IFloat64 = number
export type IBlockSigningAuthority = IVariantBlockSigningAuthorityV0
export type IBlockchainParametersT = IBlockchainParametersV1
export type IVariantBlockSigningAuthorityV0 = ['block_signing_authority_v0', IBlockSigningAuthorityV0]
export interface IAbiHash {
owner: IName
hash: IChecksum256
}
export interface IActivate {
feature_digest: IChecksum256
}
export interface IAuthority {
threshold: IUint32
keys: IKeyWeight[]
accounts: IPermissionLevelWeight[]
waits: IWaitWeight[]
}
export interface IBidRefund {
bidder: IName
amount: IAsset
}
export interface IBidname {
bidder: IName
newname: IName
bid: IAsset
}
export interface IBidrefund {
bidder: IName
newname: IName
}
export interface IBlockHeader {
timestamp: IUint32
producer: IName
confirmed: IUint16
previous: IChecksum256
transaction_mroot: IChecksum256
action_mroot: IChecksum256
schedule_version: IUint32
new_producers?: IProducerSchedule
}
export interface IBlockInfoRecord {
version: IUint8
block_height: IUint32
block_timestamp: ITimePoint
}
export interface IBlockSigningAuthorityV0 {
threshold: IUint32
keys: IKeyWeight[]
}
export interface IBlockchainParameters {
max_block_net_usage: IUint64
target_block_net_usage_pct: IUint32
max_transaction_net_usage: IUint32
base_per_transaction_net_usage: IUint32
net_usage_leeway: IUint32
context_free_discount_net_usage_num: IUint32
context_free_discount_net_usage_den: IUint32
max_block_cpu_usage: IUint32
target_block_cpu_usage_pct: IUint32
max_transaction_cpu_usage: IUint32
min_transaction_cpu_usage: IUint32
max_transaction_lifetime: IUint32
deferred_trx_expiration_window: IUint32
max_transaction_delay: IUint32
max_inline_action_size: IUint32
max_inline_action_depth: IUint16
max_authority_depth: IUint16
}
export interface IBlockchainParametersV1 extends IBlockchainParameters {
max_action_return_value_size: IUint32$
}
export interface IBuyram {
payer: IName
receiver: IName
quant: IAsset
}
export interface IBuyrambytes {
payer: IName
receiver: IName
bytes: IUint32
}
export interface IBuyrex {
from: IName
amount: IAsset
}
export interface ICanceldelay {
canceling_auth: IPermissionLevel
trx_id: IChecksum256
}
export interface ICfgpowerup {
args: IPowerupConfig
}
export interface IClaimrewards {
owner: IName
}
export interface ICloserex {
owner: IName
}
export interface ICnclrexorder {
owner: IName
}
export interface IConnector {
balance: IAsset
weight: IFloat64
}
export interface IConsolidate {
owner: IName
}
export interface IDefcpuloan {
from: IName
loan_num: IUint64
amount: IAsset
}
export interface IDefnetloan {
from: IName
loan_num: IUint64
amount: IAsset
}
export interface IDelegatebw {
from: IName
receiver: IName
stake_net_quantity: IAsset
stake_cpu_quantity: IAsset
transfer: boolean
}
export interface IDelegatedBandwidth {
from: IName
to: IName
net_weight: IAsset
cpu_weight: IAsset
}
export interface IDeleteauth {
account: IName
permission: IName
authorized_by: IName$
}
export interface IDeposit {
owner: IName
amount: IAsset
}
export interface IEmissionState {
tact_number: IUint64
tact_duration: IUint64
emission_factor: IFloat64
current_supply: IAsset
tact_open_at: ITimePointSec
tact_close_at: ITimePointSec
tact_fees: IAsset
back_from_producers: IAsset
tact_emission: IAsset
emission_start: IAsset
}
export interface IEosioGlobalState extends IBlockchainParameters {
max_ram_size: IUint64
total_ram_bytes_reserved: IUint64
total_ram_stake: IInt64
last_producer_schedule_update: IBlockTimestampType
last_pervote_bucket_fill: ITimePoint
pervote_bucket: IInt64
perblock_bucket: IInt64
total_unpaid_blocks: IUint32
total_activated_stake: IInt64
thresh_activated_stake_time: ITimePoint
last_producer_schedule_size: IUint16
total_producer_vote_weight: IFloat64
last_name_close: IBlockTimestampType
}
export interface IEosioGlobalState2 {
new_ram_per_block: IUint16
last_ram_increase: IBlockTimestampType
last_block_num: IBlockTimestampType
total_producer_votepay_share: IFloat64
revision: IUint8
}
export interface IEosioGlobalState3 {
last_vpay_state_update: ITimePoint
total_vpay_share_change_rate: IFloat64
}
export interface IEosioGlobalState4 {
continuous_rate: IFloat64
inflation_pay_factor: IInt64
votepay_factor: IInt64
}
export interface IExchangeState {
supply: IAsset
base: IConnector
quote: IConnector
}
export interface IFundcpuloan {
from: IName
loan_num: IUint64
payment: IAsset
}
export interface IFundnetloan {
from: IName
loan_num: IUint64
payment: IAsset
}
export interface IInit {
version: IVaruint32
core: ISymbol
}
export interface IInitemission {
init_supply: IAsset
tact_duration: IUint64
emission_factor: IFloat64
}
export interface IKeyWeight {
key: IPublicKey
weight: IUint16
}
export interface ILimitauthchg {
account: IName
allow_perms: IName[]
disallow_perms: IName[]
}
export interface ILinkauth {
account: IName
code: IName
type: IName
requirement: IName
authorized_by: IName$
}
export interface IMvfrsavings {
owner: IName
rex: IAsset
}
export interface IMvtosavings {
owner: IName
rex: IAsset
}
export interface INameBid {
newname: IName
high_bidder: IName
high_bid: IInt64
last_bid_time: ITimePoint
}
export interface INewaccount {
creator: IName
name: IName
owner: IAuthority
active: IAuthority
}
export interface IOnblock {
header: IBlockHeader
}
export interface IOnerror {
sender_id: IUint128
sent_trx: IBytes
}
export interface IPairTimePointSecInt64 {
first: ITimePointSec
second: IInt64
}
export interface IPermissionLevel {
actor: IName
permission: IName
}
export interface IPermissionLevelWeight {
permission: IPermissionLevel
weight: IUint16
}
export interface IPowerup {
payer: IName
receiver: IName
days: IUint32
payment: IAsset
transfer: boolean
}
export interface IPowerupConfig {
powerup_days?: IUint32
min_powerup_fee?: IAsset
}
export interface IPowerupOrder {
version: IUint8
id: IUint64
owner: IName
net_weight: IInt64
cpu_weight: IInt64
ram_bytes: IInt64
expires: ITimePointSec
}
export interface IPowerupState {
net: IPowerupStateResource
cpu: IPowerupStateResource
ram: IPowerupStateResource
powerup_days: IUint32
min_powerup_fee: IAsset
}
export interface IPowerupStateResource {
weight: IInt64
utilization: IInt64
}
export interface IPowerupexec {
user: IName
max: IUint16
}
export interface IProducerInfo {
owner: IName
total_votes: IFloat64
producer_key: IPublicKey
is_active: boolean
url: string
unpaid_blocks: IUint32
last_claim_time: ITimePoint
location: IUint16
producer_authority: IBlockSigningAuthority$
}
export interface IProducerInfo2 {
owner: IName
votepay_share: IFloat64
last_votepay_share_update: ITimePoint
}
export interface IProducerKey {
producer_name: IName
block_signing_key: IPublicKey
}
export interface IProducerSchedule {
version: IUint32
producers: IProducerKey[]
}
export interface IRamDebtRecord {
account: IName
ram_debt: IInt64
}
export interface IRefund {
owner: IName
}
export interface IRefundRequest {
owner: IName
request_time: ITimePointSec
net_amount: IAsset
cpu_amount: IAsset
}
export interface IRegproducer {
producer: IName
producer_key: IPublicKey
url: string
location: IUint16
}
export interface IRegproducer2 {
producer: IName
producer_authority: IBlockSigningAuthority
url: string
location: IUint16
}
export interface IRegproxy {
proxy: IName
isproxy: boolean
}
export interface IRentcpu {
from: IName
receiver: IName
loan_payment: IAsset
loan_fund: IAsset
}
export interface IRentnet {
from: IName
receiver: IName
loan_payment: IAsset
loan_fund: IAsset
}
export interface IRexBalance {
version: IUint8
owner: IName
vote_stake: IAsset
rex_balance: IAsset
matured_rex: IInt64
rex_maturities: IPairTimePointSecInt64[]
}
export interface IRexFund {
version: IUint8
owner: IName
balance: IAsset
}
export interface IRexLoan {
version: IUint8
from: IName
receiver: IName
payment: IAsset
balance: IAsset
total_staked: IAsset
loan_num: IUint64
expiration: ITimePoint
}
export interface IRexOrder {
version: IUint8
owner: IName
rex_requested: IAsset
proceeds: IAsset
stake_change: IAsset
order_time: ITimePoint
is_open: boolean
}
export interface IRexPool {
version: IUint8
total_lent: IAsset
total_unlent: IAsset
total_rent: IAsset
total_lendable: IAsset
total_rex: IAsset
namebid_proceeds: IAsset
loan_num: IUint64
}
export interface IRexReturnBuckets {
version: IUint8
return_buckets: IPairTimePointSecInt64[]
}
export interface IRexReturnPool {
version: IUint8
last_dist_time: ITimePointSec
pending_bucket_time: ITimePointSec
oldest_bucket_time: ITimePointSec
pending_bucket_proceeds: IInt64
current_rate_of_increase: IInt64
proceeds: IInt64
}
export interface IRexexec {
user: IName
max: IUint16
}
export interface IRmvproducer {
producer: IName
}
export interface ISellram {
account: IName
bytes: IInt64
}
export interface ISellrex {
from: IName
rex: IAsset
}
export interface ISetabi {
account: IName
abi: IBytes
memo: IString$
}
export interface ISetacctcpu {
account: IName
cpu_weight?: IInt64
}
export interface ISetacctnet {
account: IName
net_weight?: IInt64
}
export interface ISetacctram {
account: IName
ram_bytes?: IInt64
}
export interface ISetalimits {
account: IName
ram_bytes: IInt64
net_weight: IInt64
cpu_weight: IInt64
}
export interface ISetcode {
account: IName
vmtype: IUint8
vmversion: IUint8
code: IBytes
memo: IString$
}
export interface ISetinflation {
annual_rate: IInt64
inflation_pay_factor: IInt64
votepay_factor: IInt64
}
export interface ISetparams {
params: IBlockchainParametersT
}
export interface ISetpriv {
account: IName
is_priv: IUint8
}
export interface ISetram {
max_ram_size: IUint64
}
export interface ISetramrate {
bytes_per_block: IUint16
}
export interface ISetrex {
balance: IAsset
}
export interface IUndelegatebw {
from: IName
receiver: IName
unstake_net_quantity: IAsset
unstake_cpu_quantity: IAsset
}
export interface IUnlinkauth {
account: IName
code: IName
type: IName
authorized_by: IName$
}
export interface IUnregprod {
producer: IName
}
export interface IUnstaketorex {
owner: IName
receiver: IName
from_net: IAsset
from_cpu: IAsset
}
export interface IUpdateauth {
account: IName
permission: IName
parent: IName
auth: IAuthority
authorized_by: IName$
}
export interface IUpdaterex {
owner: IName
}
export interface IUpdtrevision {
revision: IUint8
}
export interface IUserResources {
owner: IName
net_weight: IAsset
cpu_weight: IAsset
ram_bytes: IInt64
}
export interface IVoteproducer {
voter: IName
proxy: IName
producers: IName[]
}
export interface IVoterInfo {
owner: IName
proxy: IName
producers: IName[]
staked: IInt64
last_vote_weight: IFloat64
proxied_vote_weight: IFloat64
is_proxy: boolean
flags1: IUint32
reserved2: IUint32
reserved3: IAsset
}
export interface IVoteupdate {
voter_name: IName
}
export interface IWaitWeight {
wait_sec: IUint32
weight: IUint16
}
export interface IWasmcfg {
settings: IName
}
export interface IWithdraw {
owner: IName
amount: IAsset
}
export interface ILimitAuthChange {
version: IUint8
account: IName
allow_perms: IName[]
disallow_perms: IName[]
}
}
+18
View File
@@ -0,0 +1,18 @@
import * as Permissions from '../../../common/permissions'
import type * as Token from '../../../interfaces/eosio.token'
import { Actors } from '../../../common'
/**
* Требуется авторизация владельца аккаунта, чей баланс закрывается.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'close'
/**
* @interface
*/
export type IClose = Token.IClose
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Token from '../../../interfaces/eosio.token'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._system }] as const
/**
* Имя действия
*/
export const actionName = 'create'
/**
* @interface
*/
export type ICreate = Token.ICreate
+29
View File
@@ -0,0 +1,29 @@
/**
* Действие совершения перевода токенов AXON между аккаунтами.
*/
export * as transfer from './transfer'
/**
* Действие создает нулевой баланс у пользователя за счет плательщика RAM. Используется автоматически при входящем переводе за счет RAM отправителя.
*/
export * as open from './open'
/**
* Действие удаляет запись о нулевом балансе пользователя и тем самым освобождает RAM плательщика.
*/
export * as close from './close'
/**
* Действие создаёт токен для последующего выпуска.
*/
export * as create from './create'
/**
* Действие по выпуску токенов.
*/
export * as issue from './issue'
/**
* Действие по сжиганию токенов.
*/
export * as retire from './retire'
+16
View File
@@ -0,0 +1,16 @@
import * as Permissions from '../../../common/permissions'
import type * as Token from '../../../interfaces/eosio.token'
/**
* Для выпуска токенов требуется авторизация учетной записи эмитента, указанная {@link create.ICreate | при создании токена}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: 'currencyStats.issuer' }] as const
/**
* Имя действия
*/
export const actionName = 'issue'
/**
* @interface
*/
export type IIssue = Token.IIssue
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Token from '../../../interfaces/eosio.token'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'open'
/**
* @interface
*/
export type IOpen = Token.IOpen
+17
View File
@@ -0,0 +1,17 @@
import * as Permissions from '../../../common/permissions'
import type * as Token from '../../../interfaces/eosio.token'
/**
* Для сжигания токенов требуется авторизация учетной записи эмитента, указанная {@link create.ICreate | при создании токена}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: 'currencyStats.issuer' }] as const
/**
* Имя действия
*/
export const actionName = 'retire'
/**
* @interface
*/
export type IRetire = Token.IRetire
+15
View File
@@ -0,0 +1,15 @@
import * as Permissions from '../../../common/permissions'
import type * as Token from '../../../interfaces/eosio.token'
import { Actors } from '../../../common'
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'transfer'
/**
* @interface
*/
export type ITransfer = Token.ITransfer
+11
View File
@@ -0,0 +1,11 @@
import * as contractNames from '../../common/names'
export * as Actions from './actions'
export * as Tables from './tables'
/**
* @private
*/
export * as Interfaces from '../../interfaces/eosio.token'
export const contractName = contractNames._token
@@ -0,0 +1,18 @@
import { Actors } from '../../../common'
import type * as Token from '../../../interfaces/eosio.token'
/**
* Имя таблицы
*/
export const tableName = 'accounts'
/**
* Таблица хранится в {@link Actors._username | области памяти пользователя}.
*/
export const scope = Actors._username
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type IAccountBalance = Token.IAccount
@@ -0,0 +1,17 @@
import type * as Token from '../../../interfaces/eosio.token'
/**
* Имя таблицы
*/
export const tableName = 'stat'
/**
* Таблица хранится в области памяти символа токена "AXON".
*/
export const scope = 'AXON'
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type ICurrencyStats = Token.ICurrencyStats
+9
View File
@@ -0,0 +1,9 @@
/**
* Таблица содержит информацию о балансе токенов пользователей
*/
export * as AccountBalance from './accountBalance'
/**
* Таблица содержит информацию о статистике токена
*/
export * as CurrencyStats from './currencyStats'
+13 -3
View File
@@ -1,4 +1,14 @@
// export * as FundContract from './contracts/fund'
/**
* Модуль cooptypes содержит информацию для работы со смарт-контрактами кооперативной экономики.
* В этом модуле представлены реестры действий и таблиц каждого смарт-контракта, а также имена аккаунтов для разных блокчейн-сетей.
*
* Каждое действие содержит интерфейс транзакции, информацию о требуемой авторизации и имя действия, которое нужно вызвать на уровне смарт-контракта.
*
* Каждая таблица содержит интерфейс для работы с данными и информацию о пространстве хранения информации в блокчейне.
*
* @packageDocumentation
* @module cooptypes
*/
// export * as DraftContract from './contracts/draft'
export * from './lists'
export * as _Common from './common'
export * from './contracts'
+27
View File
@@ -0,0 +1,27 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
export type IAsset = string
export type IName = string
export type IUint64 = number | string
export interface IBalances extends IBalancesBase {
}
export interface IBalancesBase {
id: IUint64
contract: IName
quantity: IAsset
}
export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
key: IName
secondary_key: IName
value: IUint64
}
export interface INewid {
coop_id: IUint64
}
@@ -7,7 +7,6 @@ export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
// тестовое описание
key: IName
secondary_key: IName
value: IUint64
+49
View File
@@ -0,0 +1,49 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
export type IAsset = string
export type IName = string
export type ISymbol = string
export interface IAccount {
balance: IAsset
}
export interface IClose {
owner: IName
symbol: ISymbol
}
export interface ICreate {
issuer: IName
maximum_supply: IAsset
}
export interface ICurrencyStats {
supply: IAsset
max_supply: IAsset
issuer: IName
}
export interface IIssue {
to: IName
quantity: IAsset
memo: string
}
export interface IOpen {
owner: IName
symbol: ISymbol
ram_payer: IName
}
export interface IRetire {
quantity: IAsset
memo: string
}
export interface ITransfer {
from: IName
to: IName
quantity: IAsset
memo: string
}
+231
View File
@@ -0,0 +1,231 @@
/** Представляет значение актива */
export type IAsset = string
/** Представляет значение имени */
export type IName = string
/** Представляет значение времени в секундах */
export type ITimePointSec = string
/** Представляет 64-битное беззнаковое целое число */
export type IUint64 = number | string
export interface IBalances extends IBalancesBase {
}
export interface IBalancesBase {
/** Уникальный идентификатор баланса */
id: IUint64
/** Имя контракта */
contract: IName
/** Количество актива */
quantity: IAsset
}
export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
/** Значение ключа */
key: IName
/** Значение вторичного ключа */
secondary_key: IName
/** Значение, связанное с ключами */
value: IUint64
}
export interface IDeposit {
/** Имя кооператива */
coopname: IName
/** Имя пользователя */
username: IName
/** Тип депозита */
type: IName
/** Количество актива */
quantity: IAsset
}
export interface IDeposits {
/** Уникальный идентификатор депозита */
id: IUint64
/** Имя пользователя */
username: IName
/** Имя кооператива */
coopname: IName
/** Тип депозита */
type: IName
/** Имя контракта токена */
token_contract: IName
/** Количество актива */
quantity: IAsset
/** Статус депозита */
status: IName
/** Связанная ссылка с депозитом */
link: string
/** Дополнительное примечание для депозита */
memo: string
/** Время истечения срока действия депозита */
expired_at: ITimePointSec
}
export interface IDocument {
/** Хэш-значение документа */
hash: string
/** Публичный ключ, связанный с документом */
pkey: string
/** Подпись документа */
sign: string
/** Метаданные документа */
meta: string
}
export interface IDpcomplete {
/** Имя кооператива */
coopname: IName
/** Имя администратора */
admin: IName
/** Уникальный идентификатор депозита */
deposit_id: IUint64
/** Дополнительное примечание для завершения */
memo: string
}
export interface IDpfail {
/** Имя кооператива */
coopname: IName
/** Имя администратора */
admin: IName
/** Уникальный идентификатор депозита */
deposit_id: IUint64
/** Дополнительное примечание для отказа */
memo: string
}
export interface INewdepositid {
/** Имя пользователя */
username: IName
/** Уникальный идентификатор депозита */
id: IUint64
}
export interface INewwithdrid {
/** Имя пользователя */
username: IName
/** Уникальный идентификатор вывода */
id: IUint64
}
export interface IWithdraw {
/** Имя кооператива */
coopname: IName
/** Имя пользователя */
username: IName
/** Количество актива */
quantity: IAsset
/** Документ, связанный с выводом */
document: IDocument
/** Идентификатор банковских данных */
bank_data_id: string
/** Дополнительное примечание для вывода */
memo: string
}
export interface IWithdrawauth {
/** Имя кооператива */
coopname: IName
/** Уникальный идентификатор вывода */
withdraw_id: IUint64
}
export interface IWithdraws {
/** Уникальный идентификатор вывода */
id: IUint64
/** Имя пользователя */
username: IName
/** Имя кооператива */
coopname: IName
/** Идентификатор банковских данных */
bank_data_id: string
/** Имя контракта токена */
token_contract: IName
/** Количество актива */
quantity: IAsset
/** Статус вывода */
status: IName
/** Документ, связанный с выводом */
document: IDocument
/** Дополнительное примечание для вывода */
memo: string
/** Время создания вывода */
created_at: ITimePointSec
}
export interface IWthdcomplete {
/** Имя кооператива */
coopname: IName
/** Имя администратора */
admin: IName
/** Уникальный идентификатор вывода */
withdraw_id: IUint64
/** Дополнительное примечание для завершения */
memo: string
}
export interface IWthdfail {
/** Имя кооператива */
coopname: IName
/** Имя администратора */
admin: IName
/** Уникальный идентификатор вывода */
withdraw_id: IUint64
/** Дополнительное примечание для отказа */
memo: string
}
+207
View File
@@ -0,0 +1,207 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
export type IAsset = string
export type IName = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IAccept {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IAddpieces {
coopname: IName
username: IName
exchange_id: IUint64
new_pieces: IUint64
}
export interface IAuthorize {
coopname: IName
exchange_id: IUint64
contribution_product_decision_id: IUint64
contribution_product_authorization: IDocument
return_product_decision_id: IUint64
return_product_authorization: IDocument
}
export interface ICancel {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IComplete {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IDecline {
coopname: IName
username: IName
exchange_id: IUint64
meta: string
}
export interface IDelivered {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IDispute {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IExchange {
id: IUint64
parent_id: IUint64
program_id: IUint64
coopname: IName
type: IName
status: IName
username: IName
parent_username: IName
token_contract: IName
unit_cost: IAsset
supplier_amount: IAsset
total_cost: IAsset
membership_fee: IAsset
remain_units: IUint64
blocked_units: IUint64
delivered_units: IUint64
data: string
meta: string
money_contributor: IName
product_contributor: IName
contribute_product_statement: IDocument
return_product_statement: IDocument
contribution_product_decision_id: IUint64
contribution_product_authorization: IDocument
return_product_decision_id: IUint64
return_product_authorization: IDocument
product_contribution_act_validation: IDocument
product_contribution_act: IDocument
product_recieve_act: IDocument
product_recieve_act_validation: IDocument
product_lifecycle_secs: IUint64
cancellation_fee: IUint64
cancellation_fee_amount: IAsset
created_at: ITimePointSec
accepted_at: ITimePointSec
supplied_at: ITimePointSec
delivered_at: ITimePointSec
recieved_at: ITimePointSec
completed_at: ITimePointSec
declined_at: ITimePointSec
disputed_at: ITimePointSec
canceled_at: ITimePointSec
warranty_delay_until: ITimePointSec
deadline_for_receipt: ITimePointSec
is_warranty_return: boolean
warranty_return_id: IUint64
}
export interface IExchangeParams {
username: IName
parent_id: IUint64
program_id: IUint64
coopname: IName
pieces: IUint64
unit_cost: IAsset
product_lifecycle_secs: IUint64
document: IDocument
data: string
meta: string
}
export interface IModerate {
coopname: IName
username: IName
exchange_id: IUint64
cancellation_fee: IUint64
}
export interface INewid {
id: IUint64
type: IName
}
export interface IOffer {
params: IExchangeParams
}
export interface IOrder {
params: IExchangeParams
}
export interface IProhibit {
coopname: IName
username: IName
exchange_id: IUint64
meta: string
}
export interface IPublish {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IRecieve {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IRecievecnfrm {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface ISupply {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface ISupplycnfrm {
coopname: IName
username: IName
exchange_id: IUint64
document: IDocument
}
export interface IUnpublish {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface IUpdate {
coopname: IName
username: IName
exchange_id: IUint64
remain_units: IUint64
unit_cost: IAsset
data: string
meta: string
}
+142
View File
@@ -0,0 +1,142 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
export type IAsset = string
export type IName = string
export type IPublicKey = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IAccounts {
username: IName
referer: IName
registrator: IName
type: IName
status: IName
meta: string
reputation: IUint64
registration_amount: IAsset
registered_at: ITimePointSec
signature_expires_at: ITimePointSec
}
export interface IBalances extends IBalancesBase {
}
export interface IBalancesBase {
id: IUint64
contract: IName
quantity: IAsset
}
export interface IChangekey {
username: IName
public_key: IPublicKey
}
export interface IConfirmreg {
coopname: IName
member: IName
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IJoincoop {
coopname: IName
username: IName
document: IDocument
}
export interface INewaccount {
registrator: IName
referer: IName
username: IName
public_key: IPublicKey
signature_hash: string
meta: string
}
export interface IOrgData {
storage: IStorage
is_cooperative: boolean
coop_type: IName
token_contract: IName
announce: string
description: string
initial: IAsset
minimum: IAsset
}
export interface IOrgs {
username: IName
parent_username: IName
verifications: IVerification[]
storages: IStorage[]
is_cooperative: boolean
is_active: boolean
coop_type: IName
token_contract: IName
announce: string
description: string
registration: IAsset
initial: IAsset
minimum: IAsset
}
export interface IPlotData {
storage: IStorage
announce: string
description: string
}
export interface IRegorg {
coopname: IName
username: IName
params: IOrgData
}
export interface IRegplot {
coopname: IName
username: IName
params: IPlotData
}
export interface IReguser {
coopname: IName
username: IName
storage: IStorage
}
export interface IStorage {
storage_username: IName
}
export interface IUpdate {
username: IName
meta: string
}
export interface IUsers {
username: IName
is_active: boolean
storages: IStorage[]
verifications: IVerification[]
}
export interface IVerificate {
username: IName
procedure: IName
}
export interface IVerification {
verificator: IName
is_verified: boolean
procedure: IName
created_at: ITimePointSec
last_update: ITimePointSec
notice: string
}
+451
View File
@@ -0,0 +1,451 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
export type IAsset = string
export type IName = string
export type ITimePointSec = string
export type IUint64 = number | string
export interface IAct {
coopname: IName
username: IName
action: IName
decision_id: IUint64
document: IDocument
}
export interface IAddbalance {
coopname: IName
username: IName
quantity: IAsset
}
export interface IAddprogbal {
coopname: IName
username: IName
program_id: IUint64
quantity: IAsset
}
export interface IAddress {
latitude: string
longitude: string
country: string
state: string
city: string
district: string
street: string
house_number: string
building_section: string
unit_number: string
directions: string
phone_number: string
business_hours: string
}
export interface IAddresses {
id: IUint64
coopname: IName
cooplate: IName
data: IAddress
meta: string
}
export interface IAddstaff {
coopname: IName
chairman: IName
username: IName
rights: IRight[]
position_title: string
}
export interface IAuthorize {
coopname: IName
chairman: IName
decision_id: IUint64
document: IDocument
}
export interface IAutomate {
coopname: IName
board_id: IUint64
member: IName
action_type: IName
provider: IName
encrypted_private_key: string
}
export interface IAutomator {
id: IUint64
coopname: IName
board_id: IUint64
member: IName
action_type: IName
permission_name: IName
encrypted_private_key: string
}
export interface IAutosigner {
decision_id: IUint64
}
export interface IBatch {
coopname: IName
action: IName
batch_id: IUint64
}
export interface IBlockbal {
coopname: IName
username: IName
quantity: IAsset
}
export interface IBoardMember {
username: IName
is_voting: boolean
position_title: string
position: IName
}
export interface IBoards {
id: IUint64
type: IName
name: string
description: string
members: IBoardMember[]
created_at: ITimePointSec
last_update: ITimePointSec
}
export interface ICancelorder {
coopname: IName
username: IName
exchange_id: IUint64
}
export interface ICancelvote {
coopname: IName
member: IName
decision_id: IUint64
}
export interface IChange {
coopname: IName
parent_username: IName
username: IName
exchange_id: IUint64
money_contributor: IName
product_contributor: IName
}
export interface IChanges {
id: IUint64
exchange_id: IUint64
contribution_product_decision_id: IUint64
return_product_decision_id: IUint64
}
export interface ICompleted {
coopname: IName
exchange_id: IUint64
}
export interface ICounts extends ICountsBase {
}
export interface ICountsBase {
key: IName
secondary_key: IName
value: IUint64
}
export interface ICreaddress {
coopname: IName
chairman: IName
cooplate: IName
data: IAddress
meta: string
}
export interface ICreateboard {
coopname: IName
chairman: IName
type: IName
members: IBoardMember[]
name: string
description: string
}
export interface ICreateprog {
coopname: IName
chairman: IName
title: string
announce: string
description: string
preview: string
images: string
calculation_type: IName
fixed_membership_contribution: IAsset
membership_percent_fee: IUint64
}
export interface IDecision {
coopname: IName
username: IName
action: IName
decision_id: IUint64
document: IDocument
}
export interface IDecisions {
id: IUint64
coopname: IName
username: IName
type: IName
batch_id: IUint64
votes_for: IName[]
votes_against: IName[]
validated: boolean
approved: boolean
authorized: boolean
authorization: IDocument
created_at: ITimePointSec
}
export interface IDeladdress {
coopname: IName
chairman: IName
address_id: IUint64
}
export interface IDisableprog {
coopname: IName
id: IUint64
}
export interface IDisautomate {
coopname: IName
board_id: IUint64
member: IName
automation_id: IUint64
}
export interface IDocument {
hash: string
pkey: string
sign: string
meta: string
}
export interface IDraft {
coopname: IName
username: IName
decision_id: IUint64
}
export interface IEditaddress {
coopname: IName
chairman: IName
address_id: IUint64
cooplate: IName
data: IAddress
meta: string
}
export interface IEditprog {
coopname: IName
id: IUint64
title: string
announce: string
description: string
preview: string
images: string
}
export interface IExec {
executer: IName
coopname: IName
decision_id: IUint64
}
export interface IFundwithdraw {
coopname: IName
username: IName
type: IName
withdraw_id: IUint64
document: IDocument
}
export interface IJoincoop {
coopname: IName
username: IName
document: IDocument
}
export interface IJoincoops {
id: IUint64
username: IName
is_paid: boolean
statement: IDocument
notice: string
}
export interface IMcontribute {
coopname: IName
username: IName
program_id: IUint64
type: IName
secondary_id: IUint64
}
export interface IParticipants {
username: IName
created_at: ITimePointSec
last_update: ITimePointSec
last_min_pay: ITimePointSec
status: IName
is_initial: boolean
is_minimum: boolean
has_vote: boolean
}
export interface IPcontribute {
coopname: IName
username: IName
program_id: IUint64
type: IName
secondary_id: IUint64
}
export interface IProgcomarket {
id: IUint64
coopname: IName
is_active: boolean
title: string
announce: string
description: string
preview: string
images: string
meta: string
calculation_type: IName
membership_percent_fee: IUint64
fixed_membership_contribution: IAsset
}
export interface IProgram {
coopname: IName
program_id: IUint64
}
export interface IProgwallets {
id: IUint64
coopname: IName
program_id: IUint64
username: IName
available: IAsset
}
export interface IRecieved {
coopname: IName
exchange_id: IUint64
}
export interface IRegpaid {
coopname: IName
username: IName
}
export interface IRight {
contract: IName
action_name: IName
}
export interface IRmstaff {
coopname: IName
chairman: IName
username: IName
}
export interface ISetrights {
coopname: IName
chairman: IName
username: IName
rights: IRight[]
}
export interface IStaff {
username: IName
position_title: string
roles: IName[]
rights: IRight[]
created_at: ITimePointSec
updated_at: ITimePointSec
}
export interface IStatement {
coopname: IName
username: IName
action: IName
decision_id: IUint64
document: IDocument
}
export interface ISubbalance {
coopname: IName
username: IName
quantity: IAsset
}
export interface ISubprogbal {
coopname: IName
username: IName
program_id: IUint64
quantity: IAsset
}
export interface IUnblockbal {
coopname: IName
username: IName
quantity: IAsset
}
export interface IUpdateboard {
coopname: IName
chairman: IName
board_id: IUint64
members: IBoardMember[]
name: string
description: string
}
export interface IValidate {
coopname: IName
username: IName
decision_id: IUint64
}
export interface IVoteagainst {
coopname: IName
member: IName
decision_id: IUint64
}
export interface IVotefor {
coopname: IName
member: IName
decision_id: IUint64
}
export interface IWallets {
username: IName
coopname: IName
available: IAsset
blocked: IAsset
minimum: IAsset
}
export interface IWithdraw {
coopname: IName
username: IName
withdraw_id: IUint64
}
+684
View File
@@ -0,0 +1,684 @@
// Generated by eosio-abi2ts 1.2.2 - eosio::abi/1.2
export type IAsset = string
export type IName = string
export type IBytes = string | number[] | Uint8Array
export type IChecksum256 = string
export type IPublicKey = string
export type ISymbol = string
export type ITimePoint = string
export type ITimePointSec = string
export type IBlockTimestampType = string
export type IInt64 = number | string
export type IUint8 = number
export type IUint16 = number
export type IUint32 = number
export type IUint64 = number | string
export type IUint128 = string
export type IFloat64 = number
export type IBlockSigningAuthority = IVariantBlockSigningAuthorityV0
export type IBlockchainParametersT = IBlockchainParametersV1
export type IVariantBlockSigningAuthorityV0 = ['block_signing_authority_v0', IBlockSigningAuthorityV0]
export interface IAbiHash {
owner: IName
hash: IChecksum256
}
export interface IActivate {
feature_digest: IChecksum256
}
export interface IAuthority {
threshold: IUint32
keys: IKeyWeight[]
accounts: IPermissionLevelWeight[]
waits: IWaitWeight[]
}
export interface IBidRefund {
bidder: IName
amount: IAsset
}
export interface IBidname {
bidder: IName
newname: IName
bid: IAsset
}
export interface IBidrefund {
bidder: IName
newname: IName
}
export interface IBlockHeader {
timestamp: IUint32
producer: IName
confirmed: IUint16
previous: IChecksum256
transaction_mroot: IChecksum256
action_mroot: IChecksum256
schedule_version: IUint32
new_producers?: IProducerSchedule
}
export interface IBlockInfoRecord {
version: IUint8
block_height: IUint32
block_timestamp: ITimePoint
}
export interface IBlockSigningAuthorityV0 {
threshold: IUint32
keys: IKeyWeight[]
}
export interface IBlockchainParameters {
max_block_net_usage: IUint64
target_block_net_usage_pct: IUint32
max_transaction_net_usage: IUint32
base_per_transaction_net_usage: IUint32
net_usage_leeway: IUint32
context_free_discount_net_usage_num: IUint32
context_free_discount_net_usage_den: IUint32
max_block_cpu_usage: IUint32
target_block_cpu_usage_pct: IUint32
max_transaction_cpu_usage: IUint32
min_transaction_cpu_usage: IUint32
max_transaction_lifetime: IUint32
deferred_trx_expiration_window: IUint32
max_transaction_delay: IUint32
max_inline_action_size: IUint32
max_inline_action_depth: IUint16
max_authority_depth: IUint16
}
export interface IBlockchainParametersV1 extends IBlockchainParameters {
max_action_return_value_size: IUint32
}
export interface IBuyram {
payer: IName
receiver: IName
quant: IAsset
}
export interface IBuyrambytes {
payer: IName
receiver: IName
bytes: IUint32
}
export interface IBuyrex {
from: IName
amount: IAsset
}
export interface ICanceldelay {
canceling_auth: IPermissionLevel
trx_id: IChecksum256
}
export interface ICfgpowerup {
args: IPowerupConfig
}
export interface IClaimrewards {
owner: IName
}
export interface ICloserex {
owner: IName
}
export interface ICnclrexorder {
owner: IName
}
export interface IConnector {
balance: IAsset
weight: IFloat64
}
export interface IConsolidate {
owner: IName
}
export interface IDefcpuloan {
from: IName
loan_num: IUint64
amount: IAsset
}
export interface IDefnetloan {
from: IName
loan_num: IUint64
amount: IAsset
}
export interface IDelegatebw {
from: IName
receiver: IName
stake_net_quantity: IAsset
stake_cpu_quantity: IAsset
transfer: boolean
}
export interface IDelegatedBandwidth {
from: IName
to: IName
net_weight: IAsset
cpu_weight: IAsset
}
export interface IDeleteauth {
account: IName
permission: IName
authorized_by: IName
}
export interface IDeposit {
owner: IName
amount: IAsset
}
export interface IEmissionState {
tact_number: IUint64
tact_duration: IUint64
emission_factor: IFloat64
current_supply: IAsset
tact_open_at: ITimePointSec
tact_close_at: ITimePointSec
tact_fees: IAsset
back_from_producers: IAsset
tact_emission: IAsset
emission_start: IAsset
}
export interface IEosioGlobalState extends IBlockchainParameters {
max_ram_size: IUint64
total_ram_bytes_reserved: IUint64
total_ram_stake: IInt64
last_producer_schedule_update: IBlockTimestampType
last_pervote_bucket_fill: ITimePoint
pervote_bucket: IInt64
perblock_bucket: IInt64
total_unpaid_blocks: IUint32
total_activated_stake: IInt64
thresh_activated_stake_time: ITimePoint
last_producer_schedule_size: IUint16
total_producer_vote_weight: IFloat64
last_name_close: IBlockTimestampType
}
export interface IEosioGlobalState2 {
new_ram_per_block: IUint16
last_ram_increase: IBlockTimestampType
last_block_num: IBlockTimestampType
total_producer_votepay_share: IFloat64
revision: IUint8
}
export interface IEosioGlobalState3 {
last_vpay_state_update: ITimePoint
total_vpay_share_change_rate: IFloat64
}
export interface IEosioGlobalState4 {
continuous_rate: IFloat64
inflation_pay_factor: IInt64
votepay_factor: IInt64
}
export interface IExchangeState {
supply: IAsset
base: IConnector
quote: IConnector
}
export interface IFundcpuloan {
from: IName
loan_num: IUint64
payment: IAsset
}
export interface IFundnetloan {
from: IName
loan_num: IUint64
payment: IAsset
}
export interface IInit {
version: IUint64
core: ISymbol
}
export interface IInitemission {
init_supply: IAsset
tact_duration: IUint64
emission_factor: IFloat64
}
export interface IKeyWeight {
key: IPublicKey
weight: IUint16
}
export interface ILimitauthchg {
account: IName
allow_perms: IName[]
disallow_perms: IName[]
}
export interface ILinkauth {
account: IName
code: IName
type: IName
requirement: IName
authorized_by: IName
}
export interface IMvfrsavings {
owner: IName
rex: IAsset
}
export interface IMvtosavings {
owner: IName
rex: IAsset
}
export interface INameBid {
newname: IName
high_bidder: IName
high_bid: IInt64
last_bid_time: ITimePoint
}
export interface INewaccount {
creator: IName
name: IName
owner: IAuthority
active: IAuthority
}
export interface IOnblock {
header: IBlockHeader
}
export interface IOnerror {
sender_id: IUint128
sent_trx: IBytes
}
export interface IPairTimePointSecInt64 {
first: ITimePointSec
second: IInt64
}
export interface IPermissionLevel {
actor: IName
permission: IName
}
export interface IPermissionLevelWeight {
permission: IPermissionLevel
weight: IUint16
}
export interface IPowerup {
payer: IName
receiver: IName
days: IUint32
payment: IAsset
transfer: boolean
}
export interface IPowerupConfig {
powerup_days?: IUint32
min_powerup_fee?: IAsset
}
export interface IPowerupOrder {
version: IUint8
id: IUint64
owner: IName
net_weight: IInt64
cpu_weight: IInt64
ram_bytes: IInt64
expires: ITimePointSec
}
export interface IPowerupState {
net: IPowerupStateResource
cpu: IPowerupStateResource
ram: IPowerupStateResource
powerup_days: IUint32
min_powerup_fee: IAsset
}
export interface IPowerupStateResource {
weight: IInt64
utilization: IInt64
}
export interface IPowerupexec {
user: IName
max: IUint16
}
export interface IProducerInfo {
owner: IName
total_votes: IFloat64
producer_key: IPublicKey
is_active: boolean
url: string
unpaid_blocks: IUint32
last_claim_time: ITimePoint
location: IUint16
producer_authority: IBlockSigningAuthority
}
export interface IProducerInfo2 {
owner: IName
votepay_share: IFloat64
last_votepay_share_update: ITimePoint
}
export interface IProducerKey {
producer_name: IName
block_signing_key: IPublicKey
}
export interface IProducerSchedule {
version: IUint32
producers: IProducerKey[]
}
export interface IRamDebtRecord {
account: IName
ram_debt: IInt64
}
export interface IRefund {
owner: IName
}
export interface IRefundRequest {
owner: IName
request_time: ITimePointSec
net_amount: IAsset
cpu_amount: IAsset
}
export interface IRegproducer {
producer: IName
producer_key: IPublicKey
url: string
location: IUint16
}
export interface IRegproducer2 {
producer: IName
producer_authority: IBlockSigningAuthority
url: string
location: IUint16
}
export interface IRegproxy {
proxy: IName
isproxy: boolean
}
export interface IRentcpu {
from: IName
receiver: IName
loan_payment: IAsset
loan_fund: IAsset
}
export interface IRentnet {
from: IName
receiver: IName
loan_payment: IAsset
loan_fund: IAsset
}
export interface IRexBalance {
version: IUint8
owner: IName
vote_stake: IAsset
rex_balance: IAsset
matured_rex: IInt64
rex_maturities: IPairTimePointSecInt64[]
}
export interface IRexFund {
version: IUint8
owner: IName
balance: IAsset
}
export interface IRexLoan {
version: IUint8
from: IName
receiver: IName
payment: IAsset
balance: IAsset
total_staked: IAsset
loan_num: IUint64
expiration: ITimePoint
}
export interface IRexOrder {
version: IUint8
owner: IName
rex_requested: IAsset
proceeds: IAsset
stake_change: IAsset
order_time: ITimePoint
is_open: boolean
}
export interface IRexPool {
version: IUint8
total_lent: IAsset
total_unlent: IAsset
total_rent: IAsset
total_lendable: IAsset
total_rex: IAsset
namebid_proceeds: IAsset
loan_num: IUint64
}
export interface IRexReturnBuckets {
version: IUint8
return_buckets: IPairTimePointSecInt64[]
}
export interface IRexReturnPool {
version: IUint8
last_dist_time: ITimePointSec
pending_bucket_time: ITimePointSec
oldest_bucket_time: ITimePointSec
pending_bucket_proceeds: IInt64
current_rate_of_increase: IInt64
proceeds: IInt64
}
export interface IRexexec {
user: IName
max: IUint16
}
export interface IRmvproducer {
producer: IName
}
export interface ISellram {
account: IName
bytes: IInt64
}
export interface ISellrex {
from: IName
rex: IAsset
}
export interface ISetabi {
account: IName
abi: IBytes
memo: string
}
export interface ISetacctcpu {
account: IName
cpu_weight?: IInt64
}
export interface ISetacctnet {
account: IName
net_weight?: IInt64
}
export interface ISetacctram {
account: IName
ram_bytes?: IInt64
}
export interface ISetalimits {
account: IName
ram_bytes: IInt64
net_weight: IInt64
cpu_weight: IInt64
}
export interface ISetcode {
account: IName
vmtype: IUint8
vmversion: IUint8
code: IBytes
memo: string
}
export interface ISetinflation {
annual_rate: IInt64
inflation_pay_factor: IInt64
votepay_factor: IInt64
}
export interface ISetparams {
params: IBlockchainParametersT
}
export interface ISetpriv {
account: IName
is_priv: IUint8
}
export interface ISetram {
max_ram_size: IUint64
}
export interface ISetramrate {
bytes_per_block: IUint16
}
export interface ISetrex {
balance: IAsset
}
export interface IUndelegatebw {
from: IName
receiver: IName
unstake_net_quantity: IAsset
unstake_cpu_quantity: IAsset
}
export interface IUnlinkauth {
account: IName
code: IName
type: IName
authorized_by: IName
}
export interface IUnregprod {
producer: IName
}
export interface IUnstaketorex {
owner: IName
receiver: IName
from_net: IAsset
from_cpu: IAsset
}
export interface IUpdateauth {
account: IName
permission: IName
parent: IName
auth: IAuthority
authorized_by: IName
}
export interface IUpdaterex {
owner: IName
}
export interface IUpdtrevision {
revision: IUint8
}
export interface IUserResources {
owner: IName
net_weight: IAsset
cpu_weight: IAsset
ram_bytes: IInt64
}
export interface IVoteproducer {
voter: IName
proxy: IName
producers: IName[]
}
export interface IVoterInfo {
owner: IName
proxy: IName
producers: IName[]
staked: IInt64
last_vote_weight: IFloat64
proxied_vote_weight: IFloat64
is_proxy: boolean
flags1: IUint32
reserved2: IUint32
reserved3: IAsset
}
export interface IVoteupdate {
voter_name: IName
}
export interface IWaitWeight {
wait_sec: IUint32
weight: IUint16
}
export interface IWasmcfg {
settings: IName
}
export interface IWithdraw {
owner: IName
amount: IAsset
}
export interface ILimitAuthChange {
version: IUint8
account: IName
allow_perms: IName[]
disallow_perms: IName[]
}
-7
View File
@@ -1,7 +0,0 @@
/**
* Comments for variable
*
* @source source tag comment?
*/
export const coopname = 'системное_имя_кооператива'
export const username = 'системное_имя_пользователя'
-39
View File
@@ -1,39 +0,0 @@
import type * as Draft from '../contracts/draft'
import { coopname, username } from './base'
export * as Interfaces from '../contracts/draft'
export const Accounts = {
production: 'draft',
testnet: 'drafttest222',
} as const
export const Scopes = {
global: Accounts,
coopname,
username,
} as const
export const TablesAndScopes = [{
translations: {
name: 'translations',
scope: Scopes.global,
},
}] as const
/**
* @category General Use
*/
// eslint-disable-next-line ts/no-namespace
export namespace Actions {
/**
* вававава
* @group Events
*/
export type ITranslations = Draft.ITranslations
}
export interface Tables {
/** Перевод такой хороший */
translations: Draft.ITranslations // < Перевод,
}
-45
View File
@@ -1,45 +0,0 @@
import type * as Draft from '../contracts/fund'
export * from '../contracts/fund'
/** Контракт развернут на следующих аккаунтах в соответствующих сетях. */
/**
* Comments for variable
*
* @source source tag comment?
*/
export const DraftContractAccounts = {
production: 'draft',
testnet: 'drafttest222',
}
export const coopname = 'системное_имя_кооператива'
export const username = 'системное_имя_пользователя'
export const TableScopes = {
global: DraftContractAccounts,
coopname,
username,
}
export const DraftContractTablesAndScopes = [{
translations: {
name: 'translations',
scope: TableScopes.global,
},
}]
export interface Actions {
/** Действие такое-сякое */
// ICreatetrans: Draft.ICreatetrans
DraftContract: {
ICreatetrans: Draft.IAccfunds
}
}
export interface Tables {
/** Перевод такой хороший */
ITranslations: {
table: Draft.IAddcirculate // < Перевод
}
}
-3
View File
@@ -1,3 +0,0 @@
export * from './base'
export * as DraftContract from './draft'
// export * as FundContract from './fund'

Some files were not shown because too many files have changed in this diff Show More