Compare commits

...

88 Commits

Author SHA1 Message Date
Alex Ant 8611c9bfb0 Автоматическое обновление - 2024-07-09 21:14:51 2024-07-09 21:14:58 +05:00
Alex Ant f725a21e19 Автоматическое обновление - 2024-07-09 20:45:27 2024-07-09 20:45:34 +05:00
Alex Ant 1cfb9824af Автоматическое обновление - 2024-07-09 20:44:52 2024-07-09 20:44:57 +05:00
Alex Ant 6628163ab2 Автоматическое обновление - 2024-07-09 20:36:57 2024-07-09 20:37:03 +05:00
Alex Ant bc5713626e lock 2024-07-09 19:42:02 +05:00
Alex Ant f23f09406b Автоматическое обновление - 2024-07-09 19:35:05 2024-07-09 19:35:13 +05:00
Alex Ant 3187c6026d Автоматическое обновление 2024-07-09 19:23:57 +05:00
Alex Ant fbf3e387b4 Автоматическое обновление 2024-07-09 19:18:49 +05:00
Alex Ant 2e11d991ee push 2024-07-09 18:58:45 +05:00
Alex Ant c7bc5a75cb new types 2024-07-09 18:38:36 +05:00
Alex Ant 267427a027 chore: release v1.0.3 2024-07-08 18:31:14 +05:00
Alex Ant 957d970ce3 chore: release v1.0.2 2024-07-08 13:44:44 +05:00
Alex Ant 4249339b92 chore: release v1.0.1 2024-07-08 11:33:43 +05:00
Alex Ant bb59279eb6 chore: release v1.0.0 2024-07-08 11:25:35 +05:00
Alex Ant 0f6b2d5cb7 release 2024-07-08 11:25:00 +05:00
Alex Ant 3b677628e5 update! 2024-07-08 11:22:30 +05:00
Alex Ant 89ae957020 update cooperative model 2024-07-08 11:08:15 +05:00
Alex Ant 370a9879a2 chore: release v0.5.29 2024-06-28 13:17:52 +05:00
Alex Ant 9738e9ef78 update types 2024-06-28 13:16:42 +05:00
Alex Ant 95a07a5ee5 chore: release v0.5.28 2024-06-28 12:19:46 +05:00
Alex Ant 178800d35f add username 2024-06-28 12:19:17 +05:00
Alex Ant 824704d359 chore: release v0.5.27 2024-06-28 12:01:30 +05:00
Alex Ant 257324387d cooperativeData interface 2024-06-28 12:01:06 +05:00
Alex Ant aeee4e566d chore: release v0.5.26 2024-06-28 11:44:38 +05:00
Alex Ant fa8e831358 update 2024-06-28 11:43:50 +05:00
Alex Ant e02a15a94c chore: release v0.5.25 2024-06-27 08:26:27 +05:00
Alex Ant 91b37f2efc admins page 2024-06-27 08:23:52 +05:00
Alex Ant a117ad0f41 chore: release v0.5.24 2024-06-25 15:29:19 +05:00
Alex Ant 80e7f6c3df update 2024-06-25 15:27:56 +05:00
Alex Ant 8bb02fd71b chore: release v0.5.23 2024-06-25 14:23:57 +05:00
Alex Ant 81a159ddfc update 2024-06-25 14:21:36 +05:00
Alex Ant 04ea8b74b9 chore: release v0.5.22 2024-06-20 18:03:44 +05:00
Alex Ant c0dbc41c6a update 2024-06-20 18:02:50 +05:00
Alex Ant df2a9021cf chore: release v0.5.21 2024-06-19 20:48:10 +05:00
Alex Ant 138510e751 update 2024-06-19 20:47:53 +05:00
Alex Ant 2647718fc2 chore: release v0.5.20 2024-06-15 15:56:30 +05:00
Alex Ant 35910cee3d next 2024-06-15 15:55:39 +05:00
Alex Ant 08da6158c5 chore: release v0.5.19 2024-06-10 17:24:50 +05:00
Alex Ant 86024438a7 registerUser 2024-06-10 17:24:26 +05:00
Alex Ant 28f2946dc2 docs-publish 2024-06-01 16:01:32 +05:00
Alex Ant c0df3f3e1a chore: release v0.5.18 2024-06-01 12:52:54 +05:00
Alex Ant 154505aa1f update 2024-06-01 12:51:16 +05:00
Alex Ant 34792c3942 chore: release v0.5.17 2024-06-01 12:07:43 +05:00
Alex Ant 885f49922a update 2024-06-01 12:06:28 +05:00
Alex Ant ff9f00f893 update 2024-06-01 11:18:41 +05:00
Alex Ant de10df2237 chore: release v0.5.16 2024-06-01 11:07:27 +05:00
Alex Ant 74fc3eacfa update 2024-06-01 11:07:01 +05:00
Alex Ant 4c7dfb1cd5 chore: release v0.5.15 2024-05-28 18:58:11 +05:00
Alex Ant bc13017122 update 2024-05-28 18:57:43 +05:00
Alex Ant dc4d0002b7 chore: release v0.5.14 2024-05-28 15:46:11 +05:00
Alex Ant 852579429e fix 2024-05-28 15:45:34 +05:00
Alex Ant 13a28f653b chore: release v0.5.13 2024-05-28 15:39:30 +05:00
Alex Ant 74216dfd94 decision -> newdecision, etc 2024-05-28 15:38:52 +05:00
Alex Ant b084ac7e01 chore: release v0.5.12 2024-05-22 19:20:20 +05:00
Alex Ant 90d37db911 update type 2024-05-22 19:19:46 +05:00
Alex Ant c2a9def867 chore: release v0.5.11 2024-05-12 13:05:43 +05:00
Alex Ant 663c483cd5 add createaccnt method 2024-05-12 13:04:59 +05:00
Alex Ant 14c44e7874 chore: release v0.5.10 2024-05-12 12:56:59 +05:00
Alex Ant 46d0c98487 chore: release v0.5.9 2024-05-12 12:55:26 +05:00
Alex Ant a35f7b7f89 add some actions 2024-05-12 12:54:54 +05:00
Alex Ant f20fef12ac chore: release v0.5.8 2024-05-12 12:45:25 +05:00
Alex Ant 1531f32af4 refactoring 2024-05-12 12:44:34 +05:00
Alex Ant d49c97b6f2 chore: release v0.5.7 2024-05-10 12:27:20 +05:00
Alex Ant ce930e611a update 2024-05-10 12:26:59 +05:00
Alex Ant 51eb5ae5a4 chore: release v0.5.6 2024-05-10 12:22:33 +05:00
Alex Ant 36656e920c update interfaces 2024-05-10 12:18:50 +05:00
Alex Ant 0fff6207d7 chore: release v0.5.5 2024-05-08 19:01:19 +05:00
Alex Ant 4e7030a2dd patch 2024-05-08 19:00:34 +05:00
Alex Ant b7889d9f42 chore: release v0.5.4 2024-05-08 18:54:57 +05:00
Alex Ant 9aae4e0c26 all namespaces should start with uppercase 2024-05-08 18:54:15 +05:00
Alex Ant 759c43401f chore: release v0.5.3 2024-05-08 18:41:43 +05:00
Alex Ant 060ff2ed0f fix 2024-05-08 18:41:20 +05:00
Alex Ant cfb85ea2c8 chore: release v0.5.2 2024-05-08 18:30:51 +05:00
Alex Ant 33a1158747 chore: release v0.5.1 2024-05-08 18:30:34 +05:00
Alex Ant 086646b5c4 fix 2024-05-08 18:29:57 +05:00
Alex Ant 88b6c743fa chore: release v0.5.1 2024-05-08 18:05:27 +05:00
Alex Ant b2bff2bbcb lookink for fix 2024-05-08 18:05:02 +05:00
Alex Ant 9204f8945f chore: release v0.5.0 2024-05-07 10:34:56 +05:00
Alex Ant dba0892b85 system contract 2024-05-07 10:34:20 +05:00
Alex Ant 997781dc97 chore: release v0.4.3 2024-05-04 16:50:31 +05:00
Alex Ant 01b48fb559 msig contract 2024-05-04 16:49:57 +05:00
Alex Ant 154cf87308 chore: release v0.4.2 2024-05-04 16:48:11 +05:00
Alex Ant adc4a6862f chore: release v0.4.1 2024-05-03 11:36:57 +03:00
Alex Ant c13b0f3b61 chore: release v0.4.0 2024-05-03 11:31:49 +03:00
Alex Ant 2df3389123 marketContract 2024-05-03 11:31:06 +03:00
Alex Ant c42f6a09bc chore: release v0.3.1 2024-05-02 17:37:00 +03:00
Alex Ant 6efd653864 chore: release v0.2.0 2024-05-01 19:01:56 +03:00
Alex Ant 096de7bf34 обновление структуры файлов и новые смарт-контракты 2024-05-01 19:00:52 +03:00
265 changed files with 11596 additions and 5604 deletions
+23 -23
View File
@@ -54,34 +54,34 @@ jobs:
- name: Typecheck
run: nr typecheck
test:
runs-on: ${{ matrix.os }}
# test:
# runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
# strategy:
# matrix:
# node: [lts/*]
# os: [ubuntu-latest, windows-latest, macos-latest]
# fail-fast: false
steps:
- uses: actions/checkout@v3
# steps:
# - uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
# - name: Install pnpm
# uses: pnpm/action-setup@v2
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# - name: Set node ${{ matrix.node }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node }}
- name: Setup
run: npm i -g @antfu/ni
# - name: Setup
# run: npm i -g @antfu/ni
- name: Install
run: nci
# - name: Install
# run: nci
- name: Build
run: nr build
# - name: Build
# run: nr build
- name: Test
run: nr test
# - name: Test
# run: nr test
+2 -2
View File
@@ -1,2 +1,2 @@
ignore-workspace-root-check=true
shell-emulator=true
# ignore-workspace-root-check=true
# shell-emulator=true
+113 -21
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,124 @@
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]
_description_
Модуль cooptypes содержит информацию для работы со смарт-контрактами кооперативной
экономики. В этом модуле представлены реестры действий и таблиц каждого
смарт-контракта, а также имена аккаунтов для разных блокчейн-сетей.
> **Note**:
> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template.
Каждое действие содержит интерфейс транзакции, информацию о требуемой авторизации и имя действия, которое нужно вызвать на уровне смарт-контракта.
## Sponsors
Каждая таблица содержит интерфейс для работы с данными и информацию о пространстве хранения информации в блокчейне.
<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>
## Как пользоваться
Перейти на страницу документации и ознакомиться с набором пространств имен контрактов, в каджом из которых есть действия и таблицы, а также, интерфейсы данных, имена контрактов, пространств хранения и требуемая авторизация. Всё это доступно из интерфейса IDE после импорта контракта.
## License
### Получение таблиц
[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
```
import EosApi from 'eosjs-api';
import {SovietContract} from 'cooptypes'
const options = {
httpEndpoint: 'http://127.0.0.1:8888',
};
const api = new EosApi(options);
const coopname = 'testcoop' - тестовое имя аккаунта кооператива
const _scope = SovietContract.Tables.Boards.scope
```
Получив _scope, необходимо проверить его и подставить переменную:
```
let scope
if (_scope === '_coopname' )
scope = coopname
if (_scope === '_username)
scope = username
... и так далее
```
scope - это области памяти хранения информации в смарт-контракте, которые представлены в виде универсальных параметров _username, _coopname или прочих, в соответствии с которыми необходимо подставить переменную.
Например, для получения таблицы с членами совета кооператива, необходимо подставить область памяти _coopname, или, 'testcoop', как было определено выше для тестового кооператива. Также, вместо _coopname могут быть указаны имена других контрактов или пользователей. Область памяти определяется тем, как именно смарт-контракт хранит информацию.
После подстановок, мы можем получить информацию из таблицы смарт-контракта блокчейна:
```
api.getTableRows(
{
json: true,
code: SovietContract.contractName.production, //извлекаем имя контракта
scope, //подставляем ранее полученную область памяти
table: SovietContract.Tables.Boards.tableName, //извлекаем имя таблицы в контракте
limit: 10, // устанавливаем лимит
// не обязательные параметры запроса
/* upper_bound, // - верхняя граница
lower_bound, // - нижняя граница
key_type, // - тип ключа
index_position, // нижняя граница
*/
})
```
Те же параметры scope, table, code могут быть использованы для получения информации из модуля [COOPARSER](https://github.com/copenomics/cooparser). Последнее используется, когда необходимо получить исторические данные и нет необходимости проверять их актуальность по наличию таблиц в блокчейне. Однако, таблицы в блокчейне необходимо всегда проверять перед отправкой любой транзакции действия. Нельзя полагаться на данные из парсера при подготовке транзакции действия.
### Транзакция действий
Состояние любого смарт-контракта может изменяться только с помощью действий. Для того, чтобы совершить действия, необходимо сформировать и отправить транзакцию с помощью библиотеки eosjs или альтернатив.
```
import { Api, JsonRpc } from 'eosjs';
import { JsSignatureProvider } from 'eosjs/dist/eosjs-jssig';
import { TextEncoder, TextDecoder } from 'util';
import fetch from 'isomorphic-fetch';
const signatureProvider = new JsSignatureProvider([wif]);
const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });
```
транзакция может содержать в себе массив действий, которые будут применяться последовательно друг за другом. Ниже мы сформируем транзакцию регистрации нового аккаунта, которая может быть вызвана только администратором или председателем кооператива.
```
const result = await eos.transact(
{
actions: [
{
//здесь мы извлекаем имя контракта
account: RegistratorContract.contractName.production,
//здесь мы извлекаем имя действия
name: RegistratorContract.Actions.CreateAccount.actionName,
authorization: [
{
// требуемые авторизации хранятся в RegistratorContract.Actions.CreateAccount.authorizations, откуда могут быть извлечены программно или вручную.
actor: chairman,
permission: 'active',
},
],
data: {
// подставляем данные действия
} as RegistratorContract.Actions.CreateAccount.ICreateAccount,
// здесь извлекаем интерфейс для действия
},
]
}
);
```
## Лицензия
[MIT](./LICENSE) License © 2024-PRESENT [CBS VOSKHOD](https://github.com/copenomics)
<!-- 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/copenomics/cooptypes.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/copenomics/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
+6 -2
View File
@@ -1,7 +1,11 @@
// @ts-check
import antfu from '@antfu/eslint-config'
// @ts-check
export default antfu(
{
typescript: true,
},
{
ignores: [
'docs/**/*',
@@ -9,7 +13,7 @@ export default antfu(
},
{
rules: {
// overrides
'jsdoc/empty-tags': 'off', // Добавьте это правило игнора
},
},
)
+16 -15
View File
@@ -1,17 +1,15 @@
{
"name": "cooptypes",
"type": "module",
"version": "0.1.0",
"packageManager": "pnpm@9.0.6",
"version": "1.0.8",
"description": "_description_",
"author": "Alex Ant <dacom.dark.sun@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/intellect-run/cooptypes.git"
"url": "git+https://github.com/coopenomics/cooptypes.git"
},
"keywords": [],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
@@ -19,9 +17,6 @@
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
@@ -38,22 +33,28 @@
"dev": "unbuild --stub",
"lint": "eslint .",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"release": "bumpp && npm publish && pnpm gh-pages --nojekyll -d docs",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
"prepare": "simple-git-hooks",
"doc": "typedoc"
},
"dependencies": {
"@typescript-eslint/parser": "^7.8.0"
},
"devDependencies": {
"@antfu/eslint-config": "^2.16.0",
"@antfu/eslint-config": "^2.16.1",
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.7",
"@types/node": "^20.12.7",
"@types/express": "^4.17.21",
"@types/node": "^20.12.8",
"better-docs": "^2.7.3",
"bumpp": "^9.4.0",
"bumpp": "^9.4.1",
"eslint": "^9.1.1",
"esno": "^4.7.0",
"jsdoc": "^4.0.2",
"gh-pages": "^6.1.1",
"jsdoc": "^4.0.3",
"lint-staged": "^15.2.2",
"pnpm": "^9.0.6",
"rimraf": "^5.0.5",
@@ -62,8 +63,8 @@
"typedoc-plugin-inline-sources": "^1.0.2",
"typescript": "^5.4.5",
"unbuild": "^2.0.0",
"vite": "^5.2.10",
"vitest": "^1.5.2"
"vite": "^5.2.11",
"vitest": "^1.5.3"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
+4873 -3767
View File
File diff suppressed because it is too large Load Diff
-5
View File
@@ -1,5 +0,0 @@
packages:
- playground
- docs
- packages/*
- examples/*
+34
View File
@@ -0,0 +1,34 @@
/**
* Обобщенное имя аккаунта пользователя, которое должно быть заменено на реальное.
*/
export const _username = '_username'
/**
* Обобщенное имя аккаунта кооператива, которое должно быть заменено на реальное.
*/
export const _coopname = '_coopname'
/**
* Обобщенное имя аккаунта председателя кооператива, которое должно быть заменено на реальное.
*/
export const _chairman = '_chairman'
/**
* Обобщенное имя аккаунта члена совета кооператива, которое должно быть заменено на реальное.
*/
export const _member = '_member'
/**
* Обобщенное имя аккаунта администратора кооператива, которое должно быть заменено на реальное.
*/
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'
+49
View File
@@ -0,0 +1,49 @@
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
export const _msig = {
production: 'eosio.msig',
testnet: 'eosio.msig',
} as const
export const _wrap = {
production: 'eosio.wrap',
testnet: 'eosio.wrap',
} 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 IDraft = Draft.IOnedraft
+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 ITranslation = Draft.ITranslation
@@ -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
+85
View File
@@ -0,0 +1,85 @@
/**
* @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'
/**
* Действие используется для создания вывода средств из фонда накопления или по фонду списания.
*/
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 IAccumulatedFund = Fund.IAccfund
+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 IExpensedFund = Fund.IExpfund
+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 IFundWithdraw = Fund.IFwithdraw
+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 Withdraws 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
+55
View File
@@ -0,0 +1,55 @@
/**
* Смарт-контракт шаблонов документов хранит предзаполненные черновики документов и их переводы.
*/
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'
/**
* Смарт-контракт советов кооперативов.
*/
export * as SovietContract from './soviet'
/**
* Смарт-контракт маркетплейса кооператива.
*/
export * as MarketContract from './marketplace'
/**
* Смарт-контракт для мульти-подписей транзакций.
*/
export * as MsigContract from './msig'
/**
* Контракт eosio.wrap позволяет блок продюсерам обходить проверки авторизации или выполнять привилегированные действия с одобрением 15 из 21 продюсера, тем самым упрощает действия блок продюсеров суперпользователей. Это также упрощает аудит этих действий.
*
* Данный контракт не предоставляет новых полномочий или привилегий, которые уже не существуют в блокчейнах на базе EOSIO. В таких блокчейнах 15 из 21 блок продюсера могут изменить разрешения аккаунта или модифицировать код контракта аккаунта, если решат, что это полезно для блокчейна и сообщества. Однако текущий метод не прозрачен и оставляет нежелательные последствия на определенных системных аккаунтах, поэтому контракт eosio.wrap решает эту проблему, предоставляя более простой метод выполнения важных управленческих действий.
*
* Единственное действие, реализуемое системным контрактом eosio.wrap, - это действие exec. Это действие позволяет выполнить транзакцию, которая передается в метод exec в виде упакованной транзакции в формате JSON через параметр 'trx' и аккаунт executer, который выполняет транзакцию. Аккаунт executer также будет использоваться для оплаты затрат RAM и CPU, необходимых для выполнения транзакции.
*/
export * as WrapContract from './wrap'
/**
* Системный контракт предоставляет основную функциональность для управления ресурсами, правами доступа,
* параметрами блокчейна, созданием аккаунтов и прочими системными задачами, необходимыми
* для работы и поддержания блокчейн-сети.
*/
export * as SystemContract from './system'
-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
}
}
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'accept'
/**
* @interface
*/
export type IAcceptRequest = Marketplace.IAccept
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Marketplace from '../../../interfaces/marketplace'
/**
* Имя действия
* Требуется авторизация {@link ContractNames._soviet | аккаунта контракта совета}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._soviet }] as const
/**
* Имя действия
*/
export const actionName = 'authorize'
/**
* @interface
*/
export type IAuthorize = Marketplace.IAuthorize
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'cancel'
/**
* @interface
*/
export type ICancelRequest = Marketplace.ICancel
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'complete'
/**
* @interface
*/
export type ICompleteRequest = Marketplace.IComplete
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._chairman | аккаунта председателя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._chairman }] as const
/**
* Имя действия
*/
export const actionName = 'recievecnfrm'
/**
* @interface
*/
export type IConfirmRecieve = Marketplace.IRecievecnfrm
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._chairman | аккаунта председателя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._chairman }] as const
/**
* Имя действия
*/
export const actionName = 'supplycnfrm'
/**
* @interface
*/
export type IConfirmSupply = Marketplace.ISupplycnfrm
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'offer'
/**
* @interface
*/
export type ICreateOffer = Marketplace.IOffer
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'order'
/**
* @interface
*/
export type ICreateOrder = Marketplace.IOrder
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'decline'
/**
* @interface
*/
export type IDeclineRequest = Marketplace.IDecline
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._chairman | аккаунта председателя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._chairman }] as const
/**
* Имя действия
*/
export const actionName = 'delivered'
/**
* @interface
*/
export type IDeliverOnRequest = Marketplace.IDelivered
@@ -0,0 +1,95 @@
/**
* Действие для подтверждения готовности выполнить поставку по входящей заявке.
*/
export * as AcceptRequest from './acceptRequest'
/**
* Действие вызывается автоматически после принятия решения советом для оповещения смарт-контракта маркетплейса.
* @private
*/
export * as Authorize from './authorize'
/**
* Действие для отмены заявки на поставку.
*/
export * as CancelRequest from './cancelRequest'
/**
* Действие для успешного завершения цикла поставки по заявке и разблокирования средств поставщика в кошельке.
*/
export * as CompleteRequest from './completeRequest'
/**
* Действие для подтверждения председателем получения поставки с подписью на акте приёма-передачи.
*/
export * as ConfirmRecieve from './confirmRecieve'
/**
* Действие для подтверждения председателем совершения поставки с подписью на акте приёма-передачи.
*/
export * as ConfirmSupply from './confirmSupply'
/**
* Действие для создания заявки на поставку имущества.
*/
export * as CreateOffer from './createOffer'
/**
* Действие для создания заявки на получение имущества.
*/
export * as CreateOrder from './createOrder'
/**
* Действие для отклонения готовности выполнить поставку по входящей заявке.
*/
export * as DeclineRequest from './declineRequest'
/**
* Действие для подтверждения готовности выполнить поставку по входящей заявке.
*/
export * as DeliverOnRequest from './deliverOnRequest'
/**
* Действие для модерации заявки на поставку.
*/
export * as ModerateRequest from './moderateRequest'
/**
* Приватное действие для возврата нового идентификатора заявки на поставку после создания заявки.
*/
export * as NewRequestId from './newRequestId'
/**
* Действие для открытия спора по заявке на поставку.
*/
export * as OpenDispute from './openDispute'
/**
* Действие для отказа в прохождении модерации с указанием причины.
*/
export * as ProhibitRequest from './prohibitRequest'
/**
* Действие для публикации заявки на поставку.
*/
export * as PublishRequest from './publishRequest'
/**
* Действие для подтверждения получения имущества пользователем из кооператива с подписью акта приёма-передачи.
*/
export * as RecieveOnRequest from './recieveOnRequest'
/**
* Действие для подтверждения поставки имущества пользователем в кооператив с подписью акта приёма-передачи.
*/
export * as SupplyOnRequest from './supplyOnRequest'
/**
* Действие для снятия заявки на поставку с публикации.
*/
export * as UnpublishRequest from './unpublishRequest'
/**
* Действие для обновления заявки на поставку.
*/
export * as UpdateRequests from './updateRequest'
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._admin | аккаунта администратора}.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'moderate'
/**
* @interface
*/
export type IModerateRequest = Marketplace.IModerate
@@ -0,0 +1,20 @@
import * as Permissions from '../../../common/permissions'
import * as ContractNames from '../../../common/names'
import type * as Marketplace from '../../../interfaces/marketplace'
/**
* Имя действия
* Требуется авторизация {@link ContractNames._marketplace | аккаунта контракта маркетплейса}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: ContractNames._marketplace }] as const
/**
* Имя действия
*/
export const actionName = 'newid'
/**
* @interface
* @private
*/
export type INewRequestId = Marketplace.INewid
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'dispute'
/**
* @interface
*/
export type IOpenDispute = Marketplace.IDispute
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._admin | аккаунта администратора}.
*/
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
/**
* Имя действия
*/
export const actionName = 'prohibit'
/**
* @interface
*/
export type IProhibitRequest = Marketplace.IProhibit
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'publish'
/**
* @interface
*/
export type IPublishRequest = Marketplace.IPublish
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'recieve'
/**
* @interface
*/
export type IRecieveOnRequest = Marketplace.IRecieve
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'supply'
/**
* @interface
*/
export type ISupplyOnRequest = Marketplace.ISupply
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'unpublish'
/**
* @interface
*/
export type IUnpublishRequest = Marketplace.IUnpublish
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'update'
/**
* @interface
*/
export type IUpdateRequest = Marketplace.IUpdate
+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/marketplace'
export const contractName = contractNames._marketplace
@@ -0,0 +1,4 @@
/**
* Таблица с заявками на поставки
*/
export * as Requests from './requests'
@@ -0,0 +1,21 @@
import type * as Marketplace from '../../../interfaces/marketplace'
import { Actors } from '../../../common'
/**
* Имя таблицы
*/
export const tableName = 'requests'
/**
* Таблица хранится в {@link Actors._coopname | области памяти кооператива}.
*/
/**
* Этот файл содержит интерфейс для таблицы "deposits".
*/
export const scope = Actors._coopname
/**
* @interface
* Таблица содержит переводы черновиков документов.
*/
export type IRequest = Marketplace.IRequest
@@ -0,0 +1,23 @@
import * as Permissions from '../../../common/permissions'
import type * as Msig from '../../../interfaces/msig'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'approve'
/**
* @interface
* @prop proposer - имя аккаунта, предложившего транзакцию.
* @prop proposal_name - имя утверждаемого предложения.
* @prop level - уровень разрешения для утверждения.
* @prop proposal_hash - хэш транзакции для дополнительной проверки.
*/
export type IApproveProposal = Msig.IApprove
@@ -0,0 +1,22 @@
import * as Permissions from '../../../common/permissions'
import type * as Msig from '../../../interfaces/msig'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'cancel'
/**
* @interface
* @prop proposer - имя аккаунта, предложившего транзакцию.
* @prop proposal_name - имя отменяемого предложения.
* @prop canceler - имя аккаунта, отменяющего предложение (должен быть либо `proposer`, либо после истечения срока).
*/
export type ICancelProposal = Msig.ICancel
@@ -0,0 +1,22 @@
import * as Permissions from '../../../common/permissions'
import type * as Msig from '../../../interfaces/msig'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'exec'
/**
* @interface
* @prop proposer - имя аккаунта, предложившего транзакцию.
* @prop proposal_name - имя исполняемого предложения.
* @prop executer - имя аккаунта, исполняющего транзакцию.
*/
export type IExecProposal = Msig.IExec
+41
View File
@@ -0,0 +1,41 @@
/**
* Создает предложение мультиподписи `proposal_name` от имени `proposer`, которое требует одобрения от аккаунтов,
* указанных в `requested`. Предложение содержит транзакцию `trx`, которая выполнится, если получит все нужные подписи.
* Если такое предложение уже существует, оно будет заменено новым.
*/
export * as ProposeTransaction from './proposeTransaction'
/**
* Утверждает предложение `proposal_name`, созданное аккаунтом `proposer`, используя разрешение `level`.
* При успехе переносят разрешение `level` из списка ожидающих в список предоставленных одобрений предложения.
* Расходы на изменение состояния хранилища берет на себя `proposer`.
*/
export * as ApproveProposal from './approveProposal'
/**
* Отзывает утверждение транзакцию под названием `proposal_name`, созданную аккаунтом `proposer`, используя разрешение `level`.
* Перемещает разрешение `level` обратно в список ожидающих одобрения.
*/
export * as UnapproveProposal from './unapproveProposal'
/**
* Отменяет предложение `proposal_name`, созданное аккаунтом `proposer`. Может отменить только создатель предложения
* `proposer` или другой аккаунт после истечения срока допустимости предложения.
*/
export * as CancelProposal from './cancelProposal'
/**
* Исполняет предложение мультиподписи `proposal_name`, созданное `proposer`, аккаунтом `executer`.
* Условия выполнения: `executer` должен иметь авторизацию, предложение должно существовать, получены все необходимые утверждения,
* срок допустимости предложения не истек, и ни одно из утвердивших разрешений не инвалидировано.
* Предложение исполняется как отложенная транзакция и удаляется из таблицы.
*/
export * as ExecProposal from './execProposal'
/**
* Действие, которое делает недействительными все неподтвержденные предложения мультиподписи для аккаунта `account`.
* После его вызова любые подписи от `account` для текущих и будущих предложений игнорируются, пока аккаунт снова не участвует в мультиподписи.
* Используется в случае, если ключи к аккаунту были скомпроментированы.
* @prop account - EOSIO аккаунт, который используется для инвалидации подписей
*/
export * as InvalidateProposal from './invalidateAccount'
@@ -0,0 +1,19 @@
import * as Permissions from '../../../common/permissions'
import type * as Msig from '../../../interfaces/msig'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'invalidate'
/**
* @interface
*/
export type IInvalidateAccount = Msig.IInvalidate
@@ -0,0 +1,23 @@
import * as Permissions from '../../../common/permissions'
import type * as Msig from '../../../interfaces/msig'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'propose'
/**
* @interface
* @prop proposer - имя аккаунта, создающего предложение.
* @prop proposal_name - уникальное имя предложения.
* @prop requested - массив уровней разрешений для одобрения предложения.
* @prop trx - сериализованная транзакция для предложения.
*/
export type IProposeTransaction = Msig.IPropose
@@ -0,0 +1,22 @@
import * as Permissions from '../../../common/permissions'
import type * as Msig from '../../../interfaces/msig'
import { Actors } from '../../../common'
/**
* Имя действия
* Требуется авторизация {@link Actors._username | аккаунта пользователя}.
*/
export const authorizations = [{ permissions: [Permissions.active], actor: Actors._username }] as const
/**
* Имя действия
*/
export const actionName = 'unapprove'
/**
* @interface
* @prop proposer - имя аккаунта, предложившего транзакцию.
* @prop proposal_name - имя предложения, для которого отзывается утверждение.
* @prop level - уровень разрешения, отзывающий утверждение.
*/
export type IUnapproveProposal = Msig.IUnapprove
+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/msig'
export const contractName = contractNames._msig
+17
View File
@@ -0,0 +1,17 @@
import type * as Marketplace from '../../../interfaces/msig'
import { ContractNames } from '../../../common'
/**
* Имя таблицы
*/
export const tableName = 'approvals'
/**
* Таблица хранится в {@link ContractNames._msig | области памяти контракта}.
*/
export const scope = ContractNames._msig
/**
* @interface
*/
export type IApproval = Marketplace.IOldApprovalsInfo
+17
View File
@@ -0,0 +1,17 @@
import type * as Marketplace from '../../../interfaces/msig'
import { ContractNames } from '../../../common'
/**
* Имя таблицы
*/
export const tableName = 'approvals2'
/**
* Таблица хранится в {@link ContractNames._msig | области памяти контракта}.
*/
export const scope = ContractNames._msig
/**
* @interface
*/
export type IApproval = Marketplace.IApproval
+20
View File
@@ -0,0 +1,20 @@
/**
* Таблица хранит информацию о предоставленных утверждениях для каждого предложения мультиподписи.
* @deprecated
*/
export * as Approvals from './approvals'
/**
* Таблица хранит информацию о предоставленных утверждениях для каждого предложения мультиподписи.
*/
export * as Approvals2 from './approvals2'
/**
* Таблица отслеживает аккаунты, инвалидировавшие свои разрешения для участия в мультиподписных предложениях.
*/
export * as Invalidations from './invalidations'
/**
* Содержит все активные предложения мультиподписи, включая данные о транзакциях и текущем статусе их одобрения.
*/
export * as Proposals from './proposals'
@@ -0,0 +1,17 @@
import type * as Marketplace from '../../../interfaces/msig'
import { ContractNames } from '../../../common'
/**
* Имя таблицы
*/
export const tableName = 'invals'
/**
* Таблица хранится в {@link ContractNames._msig | области памяти контракта}.
*/
export const scope = ContractNames._msig
/**
* @interface
*/
export type IInvalidation = Marketplace.IInvalidation
+17
View File
@@ -0,0 +1,17 @@
import type * as Marketplace from '../../../interfaces/msig'
import { ContractNames } from '../../../common'
/**
* Имя таблицы
*/
export const tableName = 'proposal'
/**
* Таблица хранится в {@link ContractNames._msig | области памяти контракта}.
*/
export const scope = ContractNames._msig
/**
* @interface
*/
export type IProposal = Marketplace.IProposal
-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

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