@reyaxyz/common 0.129.0 → 0.131.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.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,qCAA0C;AAY7B,QAAA,kBAAkB,GAA8C;IAC3E,KAAK,EAAE;QACL,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,uBAAuB;QACpC,iBAAiB,EAAE,qBAAqB;QACxC,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACV,KAAK,EAAE,mBAAW,CAAC,WAAW;QAC9B,WAAW,EAAE,sBAAsB;QACnC,iBAAiB,EAAE,0BAA0B;QAC7C,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,kDAAkD;QAC/D,iBAAiB,EAAE,kCAAkC;QACrD,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE,IAAI;KACd;CACF,CAAC","sourcesContent":["import { API_TIMEOUT } from '../../utils';\nimport { ReyaChainId } from '../../types';\n\ntype ServiceEnvironment = 'production' | 'test' | 'local';\nexport interface ServiceConfig {\n chain: ReyaChainId;\n apiEndpoint: string;\n webSocketEndpoint: string;\n environment: ServiceEnvironment; // Configuration for SDK, such as base URL for the REST API\n timeout: number; // Optional timeout for API requests\n logging: boolean;\n}\n\nexport const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {\n local: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'http://localhost:3000',\n webSocketEndpoint: 'ws://localhost:8080',\n environment: 'local',\n timeout: API_TIMEOUT,\n logging: true,\n },\n production: {\n chain: ReyaChainId.reyaNetwork,\n apiEndpoint: 'https://api.reya.xyz',\n webSocketEndpoint: 'wss://websocket.reya.xyz',\n environment: 'production',\n timeout: API_TIMEOUT,\n logging: false,\n },\n test: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'https://m8mjgmqmte.eu-central-1.awsapprunner.com',\n webSocketEndpoint: 'wss://websocket-testnet.reya.xyz',\n environment: 'test',\n timeout: API_TIMEOUT,\n logging: true,\n },\n};\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,qCAA0C;AAY7B,QAAA,kBAAkB,GAA8C;IAC3E,KAAK,EAAE;QACL,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,uBAAuB;QACpC,iBAAiB,EAAE,qBAAqB;QACxC,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACV,KAAK,EAAE,mBAAW,CAAC,WAAW;QAC9B,WAAW,EAAE,sBAAsB;QACnC,iBAAiB,EAAE,0BAA0B;QAC7C,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,mBAAW,CAAC,UAAU;QAC7B,WAAW,EAAE,kDAAkD;QAC/D,iBAAiB,EAAE,kCAAkC;QACrD,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,mBAAW;QACpB,OAAO,EAAE,IAAI;KACd;CACF,CAAC","sourcesContent":["import { API_TIMEOUT } from '../../utils';\nimport { ReyaChainId } from '../../types';\n\nexport type ServiceEnvironment = 'production' | 'test' | 'local';\nexport interface ServiceConfig {\n chain: ReyaChainId;\n apiEndpoint: string;\n webSocketEndpoint: string;\n environment: ServiceEnvironment; // Configuration for SDK, such as base URL for the REST API\n timeout: number; // Optional timeout for API requests\n logging: boolean;\n}\n\nexport const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig> = {\n local: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'http://localhost:3000',\n webSocketEndpoint: 'ws://localhost:8080',\n environment: 'local',\n timeout: API_TIMEOUT,\n logging: true,\n },\n production: {\n chain: ReyaChainId.reyaNetwork,\n apiEndpoint: 'https://api.reya.xyz',\n webSocketEndpoint: 'wss://websocket.reya.xyz',\n environment: 'production',\n timeout: API_TIMEOUT,\n logging: false,\n },\n test: {\n chain: ReyaChainId.reyaCronos,\n apiEndpoint: 'https://m8mjgmqmte.eu-central-1.awsapprunner.com',\n webSocketEndpoint: 'wss://websocket-testnet.reya.xyz',\n environment: 'test',\n timeout: API_TIMEOUT,\n logging: true,\n },\n};\n"]}
@@ -542,6 +542,31 @@
542
542
  }
543
543
  ]
544
544
  },
545
+ {
546
+ "type": "function",
547
+ "name": "deposit",
548
+ "inputs": [
549
+ {
550
+ "name": "inputs",
551
+ "type": "tuple",
552
+ "internalType": "struct DepositInputs",
553
+ "components": [
554
+ {
555
+ "name": "recipient",
556
+ "type": "address",
557
+ "internalType": "address"
558
+ },
559
+ {
560
+ "name": "token",
561
+ "type": "address",
562
+ "internalType": "address"
563
+ }
564
+ ]
565
+ }
566
+ ],
567
+ "outputs": [],
568
+ "stateMutability": "nonpayable"
569
+ },
545
570
  {
546
571
  "type": "function",
547
572
  "name": "depositExistingMA",
@@ -761,80 +786,6 @@
761
786
  "outputs": [],
762
787
  "stateMutability": "nonpayable"
763
788
  },
764
- {
765
- "type": "function",
766
- "name": "executeMatchOrders",
767
- "inputs": [
768
- {
769
- "name": "inputs",
770
- "type": "tuple",
771
- "internalType": "struct PeripheryMatchOrderInputs",
772
- "components": [
773
- {
774
- "name": "accountId",
775
- "type": "uint128",
776
- "internalType": "uint128"
777
- },
778
- {
779
- "name": "commands",
780
- "type": "tuple[]",
781
- "internalType": "struct Command[]",
782
- "components": [
783
- {
784
- "name": "commandType",
785
- "type": "uint8",
786
- "internalType": "enum CommandType"
787
- },
788
- {
789
- "name": "inputs",
790
- "type": "bytes",
791
- "internalType": "bytes"
792
- },
793
- {
794
- "name": "marketId",
795
- "type": "uint128",
796
- "internalType": "uint128"
797
- },
798
- {
799
- "name": "exchangeId",
800
- "type": "uint128",
801
- "internalType": "uint128"
802
- }
803
- ]
804
- },
805
- {
806
- "name": "sig",
807
- "type": "tuple",
808
- "internalType": "struct EIP712Signature",
809
- "components": [
810
- {
811
- "name": "v",
812
- "type": "uint8",
813
- "internalType": "uint8"
814
- },
815
- {
816
- "name": "r",
817
- "type": "bytes32",
818
- "internalType": "bytes32"
819
- },
820
- {
821
- "name": "s",
822
- "type": "bytes32",
823
- "internalType": "bytes32"
824
- },
825
- {
826
- "name": "deadline",
827
- "type": "uint256",
828
- "internalType": "uint256"
829
- }
830
- ]
831
- }
832
- ]
833
- }
834
- ],
835
- "outputs": [],
836
- "stateMutability": "nonpayable"
837
- },
838
789
  {
839
790
  "type": "function",
840
791
  "name": "isCommandAllowed",
@@ -1062,6 +1013,46 @@
1062
1013
  "outputs": [],
1063
1014
  "stateMutability": "nonpayable"
1064
1015
  },
1016
+ {
1017
+ "type": "function",
1018
+ "name": "withdraw",
1019
+ "inputs": [
1020
+ {
1021
+ "name": "inputs",
1022
+ "type": "tuple",
1023
+ "internalType": "struct WithdrawInputs",
1024
+ "components": [
1025
+ {
1026
+ "name": "tokenAmount",
1027
+ "type": "uint256",
1028
+ "internalType": "uint256"
1029
+ },
1030
+ {
1031
+ "name": "token",
1032
+ "type": "address",
1033
+ "internalType": "address"
1034
+ },
1035
+ {
1036
+ "name": "socketMsgGasLimit",
1037
+ "type": "uint256",
1038
+ "internalType": "uint256"
1039
+ },
1040
+ {
1041
+ "name": "chainId",
1042
+ "type": "uint256",
1043
+ "internalType": "uint256"
1044
+ },
1045
+ {
1046
+ "name": "receiver",
1047
+ "type": "address",
1048
+ "internalType": "address"
1049
+ }
1050
+ ]
1051
+ }
1052
+ ],
1053
+ "outputs": [],
1054
+ "stateMutability": "payable"
1055
+ },
1065
1056
  {
1066
1057
  "type": "function",
1067
1058
  "name": "withdrawMA",
@@ -1,5 +1,5 @@
1
1
  import { ReyaChainId } from '../../types';
2
- type ServiceEnvironment = 'production' | 'test' | 'local';
2
+ export type ServiceEnvironment = 'production' | 'test' | 'local';
3
3
  export interface ServiceConfig {
4
4
  chain: ReyaChainId;
5
5
  apiEndpoint: string;
@@ -9,5 +9,4 @@ export interface ServiceConfig {
9
9
  logging: boolean;
10
10
  }
11
11
  export declare const API_CLIENT_CONFIGS: Record<ServiceEnvironment, ServiceConfig>;
12
- export {};
13
12
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,kBAAkB,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC1D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAyBxE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"/","sources":["rest/helpers/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AACjE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAyBxE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.129.0",
3
+ "version": "0.131.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -43,5 +43,5 @@
43
43
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
44
44
  },
45
45
  "packageManager": "pnpm@8.3.1",
46
- "gitHead": "6c11e8f65bb519d2cbb4d7e0abfb0da3183fd15d"
46
+ "gitHead": "4f17d053028d8d12a174d05331bf06b1d044f070"
47
47
  }
@@ -1,7 +1,7 @@
1
1
  import { API_TIMEOUT } from '../../utils';
2
2
  import { ReyaChainId } from '../../types';
3
3
 
4
- type ServiceEnvironment = 'production' | 'test' | 'local';
4
+ export type ServiceEnvironment = 'production' | 'test' | 'local';
5
5
  export interface ServiceConfig {
6
6
  chain: ReyaChainId;
7
7
  apiEndpoint: string;
@@ -542,6 +542,31 @@
542
542
  }
543
543
  ]
544
544
  },
545
+ {
546
+ "type": "function",
547
+ "name": "deposit",
548
+ "inputs": [
549
+ {
550
+ "name": "inputs",
551
+ "type": "tuple",
552
+ "internalType": "struct DepositInputs",
553
+ "components": [
554
+ {
555
+ "name": "recipient",
556
+ "type": "address",
557
+ "internalType": "address"
558
+ },
559
+ {
560
+ "name": "token",
561
+ "type": "address",
562
+ "internalType": "address"
563
+ }
564
+ ]
565
+ }
566
+ ],
567
+ "outputs": [],
568
+ "stateMutability": "nonpayable"
569
+ },
545
570
  {
546
571
  "type": "function",
547
572
  "name": "depositExistingMA",
@@ -761,80 +786,6 @@
761
786
  "outputs": [],
762
787
  "stateMutability": "nonpayable"
763
788
  },
764
- {
765
- "type": "function",
766
- "name": "executeMatchOrders",
767
- "inputs": [
768
- {
769
- "name": "inputs",
770
- "type": "tuple",
771
- "internalType": "struct PeripheryMatchOrderInputs",
772
- "components": [
773
- {
774
- "name": "accountId",
775
- "type": "uint128",
776
- "internalType": "uint128"
777
- },
778
- {
779
- "name": "commands",
780
- "type": "tuple[]",
781
- "internalType": "struct Command[]",
782
- "components": [
783
- {
784
- "name": "commandType",
785
- "type": "uint8",
786
- "internalType": "enum CommandType"
787
- },
788
- {
789
- "name": "inputs",
790
- "type": "bytes",
791
- "internalType": "bytes"
792
- },
793
- {
794
- "name": "marketId",
795
- "type": "uint128",
796
- "internalType": "uint128"
797
- },
798
- {
799
- "name": "exchangeId",
800
- "type": "uint128",
801
- "internalType": "uint128"
802
- }
803
- ]
804
- },
805
- {
806
- "name": "sig",
807
- "type": "tuple",
808
- "internalType": "struct EIP712Signature",
809
- "components": [
810
- {
811
- "name": "v",
812
- "type": "uint8",
813
- "internalType": "uint8"
814
- },
815
- {
816
- "name": "r",
817
- "type": "bytes32",
818
- "internalType": "bytes32"
819
- },
820
- {
821
- "name": "s",
822
- "type": "bytes32",
823
- "internalType": "bytes32"
824
- },
825
- {
826
- "name": "deadline",
827
- "type": "uint256",
828
- "internalType": "uint256"
829
- }
830
- ]
831
- }
832
- ]
833
- }
834
- ],
835
- "outputs": [],
836
- "stateMutability": "nonpayable"
837
- },
838
789
  {
839
790
  "type": "function",
840
791
  "name": "isCommandAllowed",
@@ -1062,6 +1013,46 @@
1062
1013
  "outputs": [],
1063
1014
  "stateMutability": "nonpayable"
1064
1015
  },
1016
+ {
1017
+ "type": "function",
1018
+ "name": "withdraw",
1019
+ "inputs": [
1020
+ {
1021
+ "name": "inputs",
1022
+ "type": "tuple",
1023
+ "internalType": "struct WithdrawInputs",
1024
+ "components": [
1025
+ {
1026
+ "name": "tokenAmount",
1027
+ "type": "uint256",
1028
+ "internalType": "uint256"
1029
+ },
1030
+ {
1031
+ "name": "token",
1032
+ "type": "address",
1033
+ "internalType": "address"
1034
+ },
1035
+ {
1036
+ "name": "socketMsgGasLimit",
1037
+ "type": "uint256",
1038
+ "internalType": "uint256"
1039
+ },
1040
+ {
1041
+ "name": "chainId",
1042
+ "type": "uint256",
1043
+ "internalType": "uint256"
1044
+ },
1045
+ {
1046
+ "name": "receiver",
1047
+ "type": "address",
1048
+ "internalType": "address"
1049
+ }
1050
+ ]
1051
+ }
1052
+ ],
1053
+ "outputs": [],
1054
+ "stateMutability": "payable"
1055
+ },
1065
1056
  {
1066
1057
  "type": "function",
1067
1058
  "name": "withdrawMA",