@cranberry-money/shared-constants 8.15.509 → 8.15.511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/business/index.d.ts +1 -0
- package/dist/business/index.d.ts.map +1 -1
- package/dist/business/index.js +1 -0
- package/dist/business/index.js.map +1 -1
- package/dist/business/trading.d.ts +43 -0
- package/dist/business/trading.d.ts.map +1 -0
- package/dist/business/trading.js +41 -0
- package/dist/business/trading.js.map +1 -0
- package/package.json +1 -1
package/dist/business/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/business/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/business/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
package/dist/business/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/business/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/business/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trading Constants
|
|
3
|
+
* Constants for P2P tokenized equity trading via the Arca platform.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ORDER_TYPE: {
|
|
6
|
+
readonly BUY: "BUY";
|
|
7
|
+
readonly SELL: "SELL";
|
|
8
|
+
};
|
|
9
|
+
export type OrderType = (typeof ORDER_TYPE)[keyof typeof ORDER_TYPE];
|
|
10
|
+
export declare const ORDER_STATUS: {
|
|
11
|
+
readonly OPEN: "OPEN";
|
|
12
|
+
readonly MATCHED: "MATCHED";
|
|
13
|
+
readonly PENDING_SIGNATURE: "PENDING_SIGNATURE";
|
|
14
|
+
readonly COMPLETED: "COMPLETED";
|
|
15
|
+
readonly CANCELLED: "CANCELLED";
|
|
16
|
+
readonly EXPIRED: "EXPIRED";
|
|
17
|
+
};
|
|
18
|
+
export type OrderStatus = (typeof ORDER_STATUS)[keyof typeof ORDER_STATUS];
|
|
19
|
+
export declare const ARCA_ENDPOINTS: {
|
|
20
|
+
readonly TOKENS: {
|
|
21
|
+
readonly LIST: "/v1/tokens/public/";
|
|
22
|
+
readonly DETAIL: (uuid: string) => `/v1/tokens/public/${string}/`;
|
|
23
|
+
readonly ORDER_BOOK: (tokenUuid: string) => `/v1/tokens/${string}/order-book/`;
|
|
24
|
+
};
|
|
25
|
+
readonly ORDERS: {
|
|
26
|
+
readonly LIST: "/v1/tokens/orders/public/";
|
|
27
|
+
readonly DETAIL: (uuid: string) => `/v1/tokens/orders/public/${string}/`;
|
|
28
|
+
readonly CREATE: "/v1/tokens/orders/public/create/";
|
|
29
|
+
readonly CANCEL: (uuid: string) => `/v1/tokens/orders/public/${string}/cancel/`;
|
|
30
|
+
readonly TRANSACTION: (uuid: string) => `/v1/tokens/orders/${string}/transaction/`;
|
|
31
|
+
};
|
|
32
|
+
readonly TRANSFERS: {
|
|
33
|
+
readonly BROADCAST: "/v1/tokens/transfers/broadcast/";
|
|
34
|
+
};
|
|
35
|
+
readonly WHITELIST: {
|
|
36
|
+
readonly STATUS: (address: string) => `/v1/whitelist/status/${string}/`;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const TRADING_CONFIG: {
|
|
40
|
+
readonly ORDER_BOOK_REFRESH_INTERVAL: 30000;
|
|
41
|
+
readonly DEFAULT_ORDER_EXPIRY_DAYS: 7;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=trading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trading.d.ts","sourceRoot":"","sources":["../../src/business/trading.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE3E,eAAO,MAAM,cAAc;;;gCAGR,MAAM;yCACG,MAAM;;;;gCAIf,MAAM;;gCAEN,MAAM;qCACD,MAAM;;;;;;mCAMR,MAAM;;CAElB,CAAC;AAEX,eAAO,MAAM,cAAc;;;CAGjB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trading Constants
|
|
3
|
+
* Constants for P2P tokenized equity trading via the Arca platform.
|
|
4
|
+
*/
|
|
5
|
+
export const ORDER_TYPE = {
|
|
6
|
+
BUY: 'BUY',
|
|
7
|
+
SELL: 'SELL',
|
|
8
|
+
};
|
|
9
|
+
export const ORDER_STATUS = {
|
|
10
|
+
OPEN: 'OPEN',
|
|
11
|
+
MATCHED: 'MATCHED',
|
|
12
|
+
PENDING_SIGNATURE: 'PENDING_SIGNATURE',
|
|
13
|
+
COMPLETED: 'COMPLETED',
|
|
14
|
+
CANCELLED: 'CANCELLED',
|
|
15
|
+
EXPIRED: 'EXPIRED',
|
|
16
|
+
};
|
|
17
|
+
export const ARCA_ENDPOINTS = {
|
|
18
|
+
TOKENS: {
|
|
19
|
+
LIST: '/v1/tokens/public/',
|
|
20
|
+
DETAIL: (uuid) => `/v1/tokens/public/${uuid}/`,
|
|
21
|
+
ORDER_BOOK: (tokenUuid) => `/v1/tokens/${tokenUuid}/order-book/`,
|
|
22
|
+
},
|
|
23
|
+
ORDERS: {
|
|
24
|
+
LIST: '/v1/tokens/orders/public/',
|
|
25
|
+
DETAIL: (uuid) => `/v1/tokens/orders/public/${uuid}/`,
|
|
26
|
+
CREATE: '/v1/tokens/orders/public/create/',
|
|
27
|
+
CANCEL: (uuid) => `/v1/tokens/orders/public/${uuid}/cancel/`,
|
|
28
|
+
TRANSACTION: (uuid) => `/v1/tokens/orders/${uuid}/transaction/`,
|
|
29
|
+
},
|
|
30
|
+
TRANSFERS: {
|
|
31
|
+
BROADCAST: '/v1/tokens/transfers/broadcast/',
|
|
32
|
+
},
|
|
33
|
+
WHITELIST: {
|
|
34
|
+
STATUS: (address) => `/v1/whitelist/status/${address}/`,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export const TRADING_CONFIG = {
|
|
38
|
+
ORDER_BOOK_REFRESH_INTERVAL: 30000,
|
|
39
|
+
DEFAULT_ORDER_EXPIRY_DAYS: 7,
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=trading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trading.js","sourceRoot":"","sources":["../../src/business/trading.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAIX,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,mBAAmB;IACtC,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACV,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE;QACN,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,qBAAqB,IAAI,GAAY;QAC/D,UAAU,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,cAAc,SAAS,cAAuB;KAClF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,2BAA2B;QACjC,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,4BAA4B,IAAI,GAAY;QACtE,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,4BAA4B,IAAI,UAAmB;QAC7E,WAAW,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,qBAAqB,IAAI,eAAwB;KACjF;IACD,SAAS,EAAE;QACT,SAAS,EAAE,iCAAiC;KAC7C;IACD,SAAS,EAAE;QACT,MAAM,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,wBAAwB,OAAO,GAAY;KACzE;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,2BAA2B,EAAE,KAAK;IAClC,yBAAyB,EAAE,CAAC;CACpB,CAAC"}
|