@meshtrade/api-old 1.54.0 → 1.56.0

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.
@@ -14,7 +14,6 @@ export enum InstrumentType {
14
14
  INSTRUMENT_TYPE_UNIT_TRUST = 8,
15
15
  INSTRUMENT_TYPE_CRYPTO_CURRENCY = 9,
16
16
  INSTRUMENT_TYPE_FIAT_CURRENCY = 10,
17
- INSTRUMENT_TYPE_RIGHTS = 11,
18
17
  INSTRUMENT_TYPE_GOLD = 12,
19
18
  INSTRUMENT_TYPE_SILVER = 13,
20
19
  INSTRUMENT_TYPE_PLATINUM = 14,
@@ -31,4 +30,8 @@ export enum InstrumentType {
31
30
  INSTRUMENT_TYPE_ENDOWMENT_WRAPPER = 25,
32
31
  INSTRUMENT_TYPE_FUND = 26,
33
32
  INSTRUMENT_TYPE_FUND_STABLECOIN = 27,
33
+ INSTRUMENT_TYPE_AMC_STABLECOIN = 28,
34
+ INSTRUMENT_TYPE_ETF_STABLECOIN = 29,
35
+ INSTRUMENT_TYPE_ETN_STABLECOIN = 30,
36
+ INSTRUMENT_TYPE_CRYPTO_CURRENCY_STABLECOIN = 31,
34
37
  }
@@ -37,7 +37,6 @@ proto.meshtrade.studio.instrument.v1.InstrumentType = {
37
37
  INSTRUMENT_TYPE_UNIT_TRUST: 8,
38
38
  INSTRUMENT_TYPE_CRYPTO_CURRENCY: 9,
39
39
  INSTRUMENT_TYPE_FIAT_CURRENCY: 10,
40
- INSTRUMENT_TYPE_RIGHTS: 11,
41
40
  INSTRUMENT_TYPE_GOLD: 12,
42
41
  INSTRUMENT_TYPE_SILVER: 13,
43
42
  INSTRUMENT_TYPE_PLATINUM: 14,
@@ -53,7 +52,11 @@ proto.meshtrade.studio.instrument.v1.InstrumentType = {
53
52
  INSTRUMENT_TYPE_MONEY_MARKET_FUND_STABLECOIN: 24,
54
53
  INSTRUMENT_TYPE_ENDOWMENT_WRAPPER: 25,
55
54
  INSTRUMENT_TYPE_FUND: 26,
56
- INSTRUMENT_TYPE_FUND_STABLECOIN: 27
55
+ INSTRUMENT_TYPE_FUND_STABLECOIN: 27,
56
+ INSTRUMENT_TYPE_AMC_STABLECOIN: 28,
57
+ INSTRUMENT_TYPE_ETF_STABLECOIN: 29,
58
+ INSTRUMENT_TYPE_ETN_STABLECOIN: 30,
59
+ INSTRUMENT_TYPE_CRYPTO_CURRENCY_STABLECOIN: 31
57
60
  };
58
61
 
59
62
  goog.object.extend(exports, proto.meshtrade.studio.instrument.v1);
@@ -22,4 +22,5 @@ export enum Unit {
22
22
  UNIT_QUARTER_OUNCE = 16,
23
23
  UNIT_ONE_TENTH_OUNCE = 17,
24
24
  UNIT_ONE_HUNDREDTH_OUNCE = 18,
25
+ UNIT_TONNE = 19,
25
26
  }
@@ -44,7 +44,8 @@ proto.meshtrade.studio.instrument.v1.Unit = {
44
44
  UNIT_HALF_OUNCE: 15,
45
45
  UNIT_QUARTER_OUNCE: 16,
46
46
  UNIT_ONE_TENTH_OUNCE: 17,
47
- UNIT_ONE_HUNDREDTH_OUNCE: 18
47
+ UNIT_ONE_HUNDREDTH_OUNCE: 18,
48
+ UNIT_TONNE: 19
48
49
  };
49
50
 
50
51
  goog.object.extend(exports, proto.meshtrade.studio.instrument.v1);
@@ -12,4 +12,5 @@ export * from "./amountWrapper";
12
12
  export * from "./decimalConversions";
13
13
  export * from "./ledger";
14
14
  export * from "./token";
15
+ export * from "./timezone";
15
16
  export * from "./tokenWrapper";
@@ -53,4 +53,5 @@ __exportStar(require("./amountWrapper"), exports);
53
53
  __exportStar(require("./decimalConversions"), exports);
54
54
  __exportStar(require("./ledger"), exports);
55
55
  __exportStar(require("./token"), exports);
56
+ __exportStar(require("./timezone"), exports);
56
57
  __exportStar(require("./tokenWrapper"), exports);
@@ -0,0 +1,27 @@
1
+ import { Timezone } from "./timezone_pb";
2
+ /**
3
+ * Converts a Timezone enum value to its IANA timezone string.
4
+ *
5
+ * The returned string is compatible with dayjs .tz(), Intl.DateTimeFormat,
6
+ * and any API that accepts IANA timezone identifiers.
7
+ *
8
+ * @example
9
+ * timezoneToString(Timezone.TIMEZONE_AFRICA_JOHANNESBURG) // "Africa/Johannesburg"
10
+ * timezoneToString(Timezone.TIMEZONE_UTC) // "UTC"
11
+ */
12
+ export declare function timezoneToString(timezone: Timezone): string;
13
+ /**
14
+ * Converts an IANA timezone string to the corresponding Timezone enum value.
15
+ *
16
+ * Accepts strings as returned by dayjs.tz.guess(), Intl.DateTimeFormat().resolvedOptions().timeZone,
17
+ * or any standard IANA identifier.
18
+ *
19
+ * @example
20
+ * stringToTimezone("Africa/Johannesburg") // Timezone.TIMEZONE_AFRICA_JOHANNESBURG
21
+ * stringToTimezone("UTC") // Timezone.TIMEZONE_UTC
22
+ */
23
+ export declare function stringToTimezone(timezoneStr: string): Timezone;
24
+ /**
25
+ * Returns all supported Timezone enum values (excluding UNSPECIFIED).
26
+ */
27
+ export declare const allTimezones: Timezone[];
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allTimezones = void 0;
4
+ exports.timezoneToString = timezoneToString;
5
+ exports.stringToTimezone = stringToTimezone;
6
+ const timezone_pb_1 = require("./timezone_pb");
7
+ /**
8
+ * Mapping from Timezone enum to IANA timezone string.
9
+ *
10
+ * These strings are compatible with dayjs .tz() and Intl.DateTimeFormat.
11
+ */
12
+ const timezoneToIANA = {
13
+ [timezone_pb_1.Timezone.TIMEZONE_UNSPECIFIED]: "",
14
+ [timezone_pb_1.Timezone.TIMEZONE_UTC]: "UTC",
15
+ [timezone_pb_1.Timezone.TIMEZONE_EUROPE_LONDON]: "Europe/London",
16
+ [timezone_pb_1.Timezone.TIMEZONE_AFRICA_CASABLANCA]: "Africa/Casablanca",
17
+ [timezone_pb_1.Timezone.TIMEZONE_AFRICA_LAGOS]: "Africa/Lagos",
18
+ [timezone_pb_1.Timezone.TIMEZONE_EUROPE_PARIS]: "Europe/Paris",
19
+ [timezone_pb_1.Timezone.TIMEZONE_AFRICA_JOHANNESBURG]: "Africa/Johannesburg",
20
+ [timezone_pb_1.Timezone.TIMEZONE_AFRICA_MAPUTO]: "Africa/Maputo",
21
+ [timezone_pb_1.Timezone.TIMEZONE_EUROPE_ATHENS]: "Europe/Athens",
22
+ [timezone_pb_1.Timezone.TIMEZONE_AFRICA_CAIRO]: "Africa/Cairo",
23
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_JERUSALEM]: "Asia/Jerusalem",
24
+ [timezone_pb_1.Timezone.TIMEZONE_EUROPE_MOSCOW]: "Europe/Moscow",
25
+ [timezone_pb_1.Timezone.TIMEZONE_EUROPE_ISTANBUL]: "Europe/Istanbul",
26
+ [timezone_pb_1.Timezone.TIMEZONE_AFRICA_NAIROBI]: "Africa/Nairobi",
27
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_RIYADH]: "Asia/Riyadh",
28
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_TEHRAN]: "Asia/Tehran",
29
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_DUBAI]: "Asia/Dubai",
30
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_KARACHI]: "Asia/Karachi",
31
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_KOLKATA]: "Asia/Kolkata",
32
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_DHAKA]: "Asia/Dhaka",
33
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_BANGKOK]: "Asia/Bangkok",
34
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_SHANGHAI]: "Asia/Shanghai",
35
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_SINGAPORE]: "Asia/Singapore",
36
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_HONG_KONG]: "Asia/Hong_Kong",
37
+ [timezone_pb_1.Timezone.TIMEZONE_AUSTRALIA_PERTH]: "Australia/Perth",
38
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_TOKYO]: "Asia/Tokyo",
39
+ [timezone_pb_1.Timezone.TIMEZONE_ASIA_SEOUL]: "Asia/Seoul",
40
+ [timezone_pb_1.Timezone.TIMEZONE_AUSTRALIA_ADELAIDE]: "Australia/Adelaide",
41
+ [timezone_pb_1.Timezone.TIMEZONE_AUSTRALIA_BRISBANE]: "Australia/Brisbane",
42
+ [timezone_pb_1.Timezone.TIMEZONE_AUSTRALIA_SYDNEY]: "Australia/Sydney",
43
+ [timezone_pb_1.Timezone.TIMEZONE_PACIFIC_AUCKLAND]: "Pacific/Auckland",
44
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_SAO_PAULO]: "America/Sao_Paulo",
45
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_ARGENTINA_BUENOS_AIRES]: "America/Argentina/Buenos_Aires",
46
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_CARACAS]: "America/Caracas",
47
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_SANTIAGO]: "America/Santiago",
48
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_NEW_YORK]: "America/New_York",
49
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_CHICAGO]: "America/Chicago",
50
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_DENVER]: "America/Denver",
51
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_LOS_ANGELES]: "America/Los_Angeles",
52
+ [timezone_pb_1.Timezone.TIMEZONE_AMERICA_ANCHORAGE]: "America/Anchorage",
53
+ [timezone_pb_1.Timezone.TIMEZONE_PACIFIC_HONOLULU]: "Pacific/Honolulu",
54
+ };
55
+ // Reverse mapping: IANA string → Timezone enum
56
+ const ianaToTimezone = {};
57
+ for (const [key, value] of Object.entries(timezoneToIANA)) {
58
+ if (value) {
59
+ ianaToTimezone[value] = Number(key);
60
+ }
61
+ }
62
+ /**
63
+ * Converts a Timezone enum value to its IANA timezone string.
64
+ *
65
+ * The returned string is compatible with dayjs .tz(), Intl.DateTimeFormat,
66
+ * and any API that accepts IANA timezone identifiers.
67
+ *
68
+ * @example
69
+ * timezoneToString(Timezone.TIMEZONE_AFRICA_JOHANNESBURG) // "Africa/Johannesburg"
70
+ * timezoneToString(Timezone.TIMEZONE_UTC) // "UTC"
71
+ */
72
+ function timezoneToString(timezone) {
73
+ const iana = timezoneToIANA[timezone];
74
+ if (iana === undefined) {
75
+ throw new Error(`Unsupported Timezone enum value: ${timezone}`);
76
+ }
77
+ return iana;
78
+ }
79
+ /**
80
+ * Converts an IANA timezone string to the corresponding Timezone enum value.
81
+ *
82
+ * Accepts strings as returned by dayjs.tz.guess(), Intl.DateTimeFormat().resolvedOptions().timeZone,
83
+ * or any standard IANA identifier.
84
+ *
85
+ * @example
86
+ * stringToTimezone("Africa/Johannesburg") // Timezone.TIMEZONE_AFRICA_JOHANNESBURG
87
+ * stringToTimezone("UTC") // Timezone.TIMEZONE_UTC
88
+ */
89
+ function stringToTimezone(timezoneStr) {
90
+ const tz = ianaToTimezone[timezoneStr];
91
+ if (tz === undefined) {
92
+ throw new Error(`Unsupported IANA timezone string: ${timezoneStr}`);
93
+ }
94
+ return tz;
95
+ }
96
+ /**
97
+ * Returns all supported Timezone enum values (excluding UNSPECIFIED).
98
+ */
99
+ exports.allTimezones = Object.keys(timezoneToIANA)
100
+ .map(Number)
101
+ .filter((v) => v !== timezone_pb_1.Timezone.TIMEZONE_UNSPECIFIED);
@@ -0,0 +1,47 @@
1
+ import * as jspb from 'google-protobuf'
2
+
3
+
4
+
5
+ export enum Timezone {
6
+ TIMEZONE_UNSPECIFIED = 0,
7
+ TIMEZONE_UTC = 1,
8
+ TIMEZONE_EUROPE_LONDON = 2,
9
+ TIMEZONE_AFRICA_CASABLANCA = 3,
10
+ TIMEZONE_AFRICA_LAGOS = 4,
11
+ TIMEZONE_EUROPE_PARIS = 5,
12
+ TIMEZONE_AFRICA_JOHANNESBURG = 6,
13
+ TIMEZONE_AFRICA_MAPUTO = 7,
14
+ TIMEZONE_EUROPE_ATHENS = 8,
15
+ TIMEZONE_AFRICA_CAIRO = 9,
16
+ TIMEZONE_ASIA_JERUSALEM = 10,
17
+ TIMEZONE_EUROPE_MOSCOW = 11,
18
+ TIMEZONE_EUROPE_ISTANBUL = 12,
19
+ TIMEZONE_AFRICA_NAIROBI = 13,
20
+ TIMEZONE_ASIA_RIYADH = 14,
21
+ TIMEZONE_ASIA_TEHRAN = 15,
22
+ TIMEZONE_ASIA_DUBAI = 16,
23
+ TIMEZONE_ASIA_KARACHI = 17,
24
+ TIMEZONE_ASIA_KOLKATA = 18,
25
+ TIMEZONE_ASIA_DHAKA = 19,
26
+ TIMEZONE_ASIA_BANGKOK = 20,
27
+ TIMEZONE_ASIA_SHANGHAI = 21,
28
+ TIMEZONE_ASIA_SINGAPORE = 22,
29
+ TIMEZONE_ASIA_HONG_KONG = 23,
30
+ TIMEZONE_AUSTRALIA_PERTH = 24,
31
+ TIMEZONE_ASIA_TOKYO = 25,
32
+ TIMEZONE_ASIA_SEOUL = 26,
33
+ TIMEZONE_AUSTRALIA_ADELAIDE = 27,
34
+ TIMEZONE_AUSTRALIA_BRISBANE = 28,
35
+ TIMEZONE_AUSTRALIA_SYDNEY = 29,
36
+ TIMEZONE_PACIFIC_AUCKLAND = 30,
37
+ TIMEZONE_AMERICA_SAO_PAULO = 31,
38
+ TIMEZONE_AMERICA_ARGENTINA_BUENOS_AIRES = 32,
39
+ TIMEZONE_AMERICA_CARACAS = 33,
40
+ TIMEZONE_AMERICA_SANTIAGO = 34,
41
+ TIMEZONE_AMERICA_NEW_YORK = 35,
42
+ TIMEZONE_AMERICA_CHICAGO = 36,
43
+ TIMEZONE_AMERICA_DENVER = 37,
44
+ TIMEZONE_AMERICA_LOS_ANGELES = 38,
45
+ TIMEZONE_AMERICA_ANCHORAGE = 39,
46
+ TIMEZONE_PACIFIC_HONOLULU = 40,
47
+ }
@@ -0,0 +1,72 @@
1
+ // source: meshtrade/type/v1/timezone.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ goog.exportSymbol('proto.meshtrade.type.v1.Timezone', null, global);
25
+ /**
26
+ * @enum {number}
27
+ */
28
+ proto.meshtrade.type.v1.Timezone = {
29
+ TIMEZONE_UNSPECIFIED: 0,
30
+ TIMEZONE_UTC: 1,
31
+ TIMEZONE_EUROPE_LONDON: 2,
32
+ TIMEZONE_AFRICA_CASABLANCA: 3,
33
+ TIMEZONE_AFRICA_LAGOS: 4,
34
+ TIMEZONE_EUROPE_PARIS: 5,
35
+ TIMEZONE_AFRICA_JOHANNESBURG: 6,
36
+ TIMEZONE_AFRICA_MAPUTO: 7,
37
+ TIMEZONE_EUROPE_ATHENS: 8,
38
+ TIMEZONE_AFRICA_CAIRO: 9,
39
+ TIMEZONE_ASIA_JERUSALEM: 10,
40
+ TIMEZONE_EUROPE_MOSCOW: 11,
41
+ TIMEZONE_EUROPE_ISTANBUL: 12,
42
+ TIMEZONE_AFRICA_NAIROBI: 13,
43
+ TIMEZONE_ASIA_RIYADH: 14,
44
+ TIMEZONE_ASIA_TEHRAN: 15,
45
+ TIMEZONE_ASIA_DUBAI: 16,
46
+ TIMEZONE_ASIA_KARACHI: 17,
47
+ TIMEZONE_ASIA_KOLKATA: 18,
48
+ TIMEZONE_ASIA_DHAKA: 19,
49
+ TIMEZONE_ASIA_BANGKOK: 20,
50
+ TIMEZONE_ASIA_SHANGHAI: 21,
51
+ TIMEZONE_ASIA_SINGAPORE: 22,
52
+ TIMEZONE_ASIA_HONG_KONG: 23,
53
+ TIMEZONE_AUSTRALIA_PERTH: 24,
54
+ TIMEZONE_ASIA_TOKYO: 25,
55
+ TIMEZONE_ASIA_SEOUL: 26,
56
+ TIMEZONE_AUSTRALIA_ADELAIDE: 27,
57
+ TIMEZONE_AUSTRALIA_BRISBANE: 28,
58
+ TIMEZONE_AUSTRALIA_SYDNEY: 29,
59
+ TIMEZONE_PACIFIC_AUCKLAND: 30,
60
+ TIMEZONE_AMERICA_SAO_PAULO: 31,
61
+ TIMEZONE_AMERICA_ARGENTINA_BUENOS_AIRES: 32,
62
+ TIMEZONE_AMERICA_CARACAS: 33,
63
+ TIMEZONE_AMERICA_SANTIAGO: 34,
64
+ TIMEZONE_AMERICA_NEW_YORK: 35,
65
+ TIMEZONE_AMERICA_CHICAGO: 36,
66
+ TIMEZONE_AMERICA_DENVER: 37,
67
+ TIMEZONE_AMERICA_LOS_ANGELES: 38,
68
+ TIMEZONE_AMERICA_ANCHORAGE: 39,
69
+ TIMEZONE_PACIFIC_HONOLULU: 40
70
+ };
71
+
72
+ goog.object.extend(exports, proto.meshtrade.type.v1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshtrade/api-old",
3
- "version": "1.54.0",
3
+ "version": "1.56.0",
4
4
  "description": "Mesh Typescript SDK (Legacy)",
5
5
  "author": "Bernard Bussy <bernard@meshtrade.co>",
6
6
  "license": "UNLICENSED",