@reyaxyz/common 0.96.0 → 0.98.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.
- package/README.md +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/services/getNativeToken.js +1 -0
- package/dist/services/getNativeToken.js.map +1 -1
- package/dist/services/getSocketBridgeTime.js +3 -0
- package/dist/services/getSocketBridgeTime.js.map +1 -1
- package/dist/transactions/abis/CoreProxy.json +5600 -0
- package/dist/transactions/abis/Periphery.json +1464 -0
- package/dist/transactions/abis/socket/VaultWithPayload.json +40 -0
- package/dist/transactions/action.js +22 -0
- package/dist/transactions/action.js.map +1 -0
- package/dist/transactions/consts.js +7 -0
- package/dist/transactions/consts.js.map +1 -0
- package/dist/transactions/contractAddresses.js +36 -0
- package/dist/transactions/contractAddresses.js.map +1 -0
- package/dist/transactions/executeTransaction.js +120 -0
- package/dist/transactions/executeTransaction.js.map +1 -0
- package/dist/transactions/index.js +32 -0
- package/dist/transactions/index.js.map +1 -0
- package/dist/transactions/routerCommands.js +45 -0
- package/dist/transactions/routerCommands.js.map +1 -0
- package/dist/transactions/sign.js +146 -0
- package/dist/transactions/sign.js.map +1 -0
- package/dist/transactions/trade.js +24 -0
- package/dist/transactions/trade.js.map +1 -0
- package/dist/transactions/txHelpers.js +8 -0
- package/dist/transactions/txHelpers.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/services/getNativeToken.d.ts.map +1 -1
- package/dist/types/services/getSocketBridgeTime.d.ts.map +1 -1
- package/dist/types/transactions/action.d.ts +27 -0
- package/dist/types/transactions/action.d.ts.map +1 -0
- package/dist/types/transactions/consts.d.ts +4 -0
- package/dist/types/transactions/consts.d.ts.map +1 -0
- package/dist/types/transactions/contractAddresses.d.ts +8 -0
- package/dist/types/transactions/contractAddresses.d.ts.map +1 -0
- package/dist/types/transactions/executeTransaction.d.ts +15 -0
- package/dist/types/transactions/executeTransaction.d.ts.map +1 -0
- package/dist/types/transactions/index.d.ts +12 -0
- package/dist/types/transactions/index.d.ts.map +1 -0
- package/dist/types/transactions/routerCommands.d.ts +23 -0
- package/dist/types/transactions/routerCommands.d.ts.map +1 -0
- package/dist/types/transactions/sign.d.ts +12 -0
- package/dist/types/transactions/sign.d.ts.map +1 -0
- package/dist/types/transactions/trade.d.ts +2 -0
- package/dist/types/transactions/trade.d.ts.map +1 -0
- package/dist/types/transactions/txHelpers.d.ts +2 -0
- package/dist/types/transactions/txHelpers.d.ts.map +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/network.d.ts +3 -1
- package/dist/types/utils/network.d.ts.map +1 -1
- package/dist/types/utils/token-info.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/network.js +11 -0
- package/dist/utils/network.js.map +1 -1
- package/dist/utils/socket/reyaNetwork.json +291 -23
- package/dist/utils/token-info.js +3 -0
- package/dist/utils/token-info.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/services/getNativeToken.ts +1 -0
- package/src/services/getSocketBridgeTime.ts +3 -0
- package/src/transactions/abis/CoreProxy.json +5600 -0
- package/src/transactions/abis/Periphery.json +1464 -0
- package/src/transactions/abis/socket/VaultWithPayload.json +40 -0
- package/src/transactions/action.ts +41 -0
- package/src/transactions/consts.ts +3 -0
- package/src/transactions/contractAddresses.ts +41 -0
- package/src/transactions/executeTransaction.ts +83 -0
- package/src/transactions/index.ts +11 -0
- package/src/transactions/routerCommands.ts +62 -0
- package/src/transactions/sign.ts +135 -0
- package/src/transactions/trade.ts +25 -0
- package/src/transactions/txHelpers.ts +3 -0
- package/src/types.ts +1 -0
- package/src/utils/network.ts +14 -1
- package/src/utils/socket/reyaNetwork.json +291 -23
- package/src/utils/token-info.ts +9 -0
package/README.md
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
|
|
7
7
|
| Statements | Branches | Functions | Lines |
|
|
8
8
|
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
|
|
9
|
-
|  |  |  |  |
|
|
10
10
|
|
package/dist/index.js
CHANGED
|
@@ -21,4 +21,5 @@ __exportStar(require("./services"), exports);
|
|
|
21
21
|
__exportStar(require("./modules"), exports);
|
|
22
22
|
__exportStar(require("./rest"), exports);
|
|
23
23
|
__exportStar(require("./decorators"), exports);
|
|
24
|
+
__exportStar(require("./transactions"), exports);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,+CAA6B","sourcesContent":["export * from './types';\nexport * from './commands';\nexport * from './utils';\nexport * from './services';\nexport * from './modules';\nexport * from './rest';\nexport * from './decorators';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,+CAA6B;AAC7B,iDAA+B","sourcesContent":["export * from './types';\nexport * from './commands';\nexport * from './utils';\nexport * from './services';\nexport * from './modules';\nexport * from './rest';\nexport * from './decorators';\nexport * from './transactions';\n"]}
|
|
@@ -9,6 +9,7 @@ var nativeToken = (_a = {},
|
|
|
9
9
|
_a[types_1.MoneyInOutChainId.opMainnet] = 'ETH',
|
|
10
10
|
_a[types_1.MoneyInOutChainId.polygonMainnet] = 'MATIC',
|
|
11
11
|
_a[types_1.MoneyInOutChainId.arbitrumOne] = 'ETH',
|
|
12
|
+
_a[types_1.MoneyInOutChainId.baseMainnet] = 'ETH',
|
|
12
13
|
// testnet
|
|
13
14
|
_a[types_1.MoneyInOutChainId.polygonMumbai] = 'MATIC',
|
|
14
15
|
_a[types_1.MoneyInOutChainId.arbitrumSepolia] = 'ETH',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNativeToken.js","sourceRoot":"/","sources":["services/getNativeToken.ts"],"names":[],"mappings":";;;;AAAA,kCAAwD;AAExD,IAAM,WAAW;IACf,UAAU;IACV,GAAC,yBAAiB,CAAC,eAAe,IAAG,KAAK;IAC1C,GAAC,yBAAiB,CAAC,SAAS,IAAG,KAAK;IACpC,GAAC,yBAAiB,CAAC,cAAc,IAAG,OAAO;IAC3C,GAAC,yBAAiB,CAAC,WAAW,IAAG,KAAK;IACtC,UAAU;IACV,GAAC,yBAAiB,CAAC,aAAa,IAAG,OAAO;IAC1C,GAAC,yBAAiB,CAAC,eAAe,IAAG,KAAK;IAC1C,GAAC,yBAAiB,CAAC,SAAS,IAAG,KAAK;IACpC,GAAC,yBAAiB,CAAC,eAAe,IAAG,KAAK;OAC3C,CAAC;AAEK,IAAM,cAAc,GAAG,UAC5B,iBAAoC;IAEpC,OAAO,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACxC,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB","sourcesContent":["import { MoneyInOutChainId, TokenName } from '../types';\n\nconst nativeToken: Record<MoneyInOutChainId, TokenName> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'ETH',\n [MoneyInOutChainId.opMainnet]: 'ETH',\n [MoneyInOutChainId.polygonMainnet]: 'MATIC',\n [MoneyInOutChainId.arbitrumOne]: 'ETH',\n // testnet\n [MoneyInOutChainId.polygonMumbai]: 'MATIC',\n [MoneyInOutChainId.arbitrumSepolia]: 'ETH',\n [MoneyInOutChainId.opSepolia]: 'ETH',\n [MoneyInOutChainId.ethereumSepolia]: 'ETH',\n};\n\nexport const getNativeToken = (\n moneyInOutChainId: MoneyInOutChainId,\n): TokenName => {\n return nativeToken[moneyInOutChainId];\n};\n"]}
|
|
1
|
+
{"version":3,"file":"getNativeToken.js","sourceRoot":"/","sources":["services/getNativeToken.ts"],"names":[],"mappings":";;;;AAAA,kCAAwD;AAExD,IAAM,WAAW;IACf,UAAU;IACV,GAAC,yBAAiB,CAAC,eAAe,IAAG,KAAK;IAC1C,GAAC,yBAAiB,CAAC,SAAS,IAAG,KAAK;IACpC,GAAC,yBAAiB,CAAC,cAAc,IAAG,OAAO;IAC3C,GAAC,yBAAiB,CAAC,WAAW,IAAG,KAAK;IACtC,GAAC,yBAAiB,CAAC,WAAW,IAAG,KAAK;IACtC,UAAU;IACV,GAAC,yBAAiB,CAAC,aAAa,IAAG,OAAO;IAC1C,GAAC,yBAAiB,CAAC,eAAe,IAAG,KAAK;IAC1C,GAAC,yBAAiB,CAAC,SAAS,IAAG,KAAK;IACpC,GAAC,yBAAiB,CAAC,eAAe,IAAG,KAAK;OAC3C,CAAC;AAEK,IAAM,cAAc,GAAG,UAC5B,iBAAoC;IAEpC,OAAO,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACxC,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB","sourcesContent":["import { MoneyInOutChainId, TokenName } from '../types';\n\nconst nativeToken: Record<MoneyInOutChainId, TokenName> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'ETH',\n [MoneyInOutChainId.opMainnet]: 'ETH',\n [MoneyInOutChainId.polygonMainnet]: 'MATIC',\n [MoneyInOutChainId.arbitrumOne]: 'ETH',\n [MoneyInOutChainId.baseMainnet]: 'ETH',\n // testnet\n [MoneyInOutChainId.polygonMumbai]: 'MATIC',\n [MoneyInOutChainId.arbitrumSepolia]: 'ETH',\n [MoneyInOutChainId.opSepolia]: 'ETH',\n [MoneyInOutChainId.ethereumSepolia]: 'ETH',\n};\n\nexport const getNativeToken = (\n moneyInOutChainId: MoneyInOutChainId,\n): TokenName => {\n return nativeToken[moneyInOutChainId];\n};\n"]}
|
|
@@ -17,6 +17,9 @@ var socketFees = (_a = {},
|
|
|
17
17
|
_a[types_1.MoneyInOutChainId.arbitrumOne] = {
|
|
18
18
|
bridgeTimeInMS: 3 * 60 * 1000,
|
|
19
19
|
},
|
|
20
|
+
_a[types_1.MoneyInOutChainId.baseMainnet] = {
|
|
21
|
+
bridgeTimeInMS: 3 * 60 * 1000,
|
|
22
|
+
},
|
|
20
23
|
// testnet
|
|
21
24
|
_a[types_1.MoneyInOutChainId.polygonMumbai] = {
|
|
22
25
|
bridgeTimeInMS: 55 * 60 * 1000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSocketBridgeTime.js","sourceRoot":"/","sources":["services/getSocketBridgeTime.ts"],"names":[],"mappings":";;;;AAAA,kCAIkB;AAElB,IAAM,UAAU;IACd,UAAU;IACV,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,SAAS,IAAG;QAC7B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,cAAc,IAAG;QAClC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,WAAW,IAAG;QAC/B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,UAAU;IACV,GAAC,yBAAiB,CAAC,aAAa,IAAG;QACjC,cAAc,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;KAC/B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,SAAS,IAAG;QAC7B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;OACF,CAAC;AAEK,IAAM,mBAAmB,GAAG,UACjC,MAAiC;IAEjC,OAAO,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC9C,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B","sourcesContent":["import {\n GetSocketBridgeTimeResult,\n GetSocketBridgeTimeParams,\n MoneyInOutChainId,\n} from '../types';\n\nconst socketFees: Record<MoneyInOutChainId, GetSocketBridgeTimeResult> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.opMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.polygonMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.arbitrumOne]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n // testnet\n [MoneyInOutChainId.polygonMumbai]: {\n bridgeTimeInMS: 55 * 60 * 1000,\n },\n [MoneyInOutChainId.arbitrumSepolia]: {\n bridgeTimeInMS: 5 * 60 * 1000,\n },\n [MoneyInOutChainId.opSepolia]: {\n bridgeTimeInMS: 5 * 60 * 1000,\n },\n [MoneyInOutChainId.ethereumSepolia]: {\n bridgeTimeInMS: 5 * 60 * 1000,\n },\n};\n\nexport const getSocketBridgeTime = (\n params: GetSocketBridgeTimeParams,\n): GetSocketBridgeTimeResult => {\n return socketFees[params.moneyInOutChainId];\n};\n"]}
|
|
1
|
+
{"version":3,"file":"getSocketBridgeTime.js","sourceRoot":"/","sources":["services/getSocketBridgeTime.ts"],"names":[],"mappings":";;;;AAAA,kCAIkB;AAElB,IAAM,UAAU;IACd,UAAU;IACV,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,SAAS,IAAG;QAC7B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,cAAc,IAAG;QAClC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,WAAW,IAAG;QAC/B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,WAAW,IAAG;QAC/B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,UAAU;IACV,GAAC,yBAAiB,CAAC,aAAa,IAAG;QACjC,cAAc,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;KAC/B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,SAAS,IAAG;QAC7B,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;KAC9B;OACF,CAAC;AAEK,IAAM,mBAAmB,GAAG,UACjC,MAAiC;IAEjC,OAAO,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC9C,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B","sourcesContent":["import {\n GetSocketBridgeTimeResult,\n GetSocketBridgeTimeParams,\n MoneyInOutChainId,\n} from '../types';\n\nconst socketFees: Record<MoneyInOutChainId, GetSocketBridgeTimeResult> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.opMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.polygonMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.arbitrumOne]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n [MoneyInOutChainId.baseMainnet]: {\n bridgeTimeInMS: 3 * 60 * 1000,\n },\n // testnet\n [MoneyInOutChainId.polygonMumbai]: {\n bridgeTimeInMS: 55 * 60 * 1000,\n },\n [MoneyInOutChainId.arbitrumSepolia]: {\n bridgeTimeInMS: 5 * 60 * 1000,\n },\n [MoneyInOutChainId.opSepolia]: {\n bridgeTimeInMS: 5 * 60 * 1000,\n },\n [MoneyInOutChainId.ethereumSepolia]: {\n bridgeTimeInMS: 5 * 60 * 1000,\n },\n};\n\nexport const getSocketBridgeTime = (\n params: GetSocketBridgeTimeParams,\n): GetSocketBridgeTimeResult => {\n return socketFees[params.moneyInOutChainId];\n};\n"]}
|