@reyaxyz/sdk 0.49.1 → 0.51.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/dist/config/index.js +1 -2
- package/dist/config/index.js.map +1 -1
- package/package.json +3 -3
- package/src/config/index.ts +2 -2
package/dist/config/index.js
CHANGED
|
@@ -62,8 +62,7 @@ var TransactionModule = /** @class */ (function (_super) {
|
|
|
62
62
|
return __awaiter(this, void 0, void 0, function () {
|
|
63
63
|
var uri;
|
|
64
64
|
return __generator(this, function (_a) {
|
|
65
|
-
uri = "/api/transaction
|
|
66
|
-
// const uri = `/api/transaction/execute`; //switch between Gelato and internal relayer
|
|
65
|
+
uri = "/api/transaction/execute";
|
|
67
66
|
return [2 /*return*/, this.post(uri, {}, {
|
|
68
67
|
txData: txData,
|
|
69
68
|
contractAddress: contractAddress,
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAgF;AAUhF;IAAuC,qCAAU;IAAjD;;IAkBA,CAAC;IAjBO,8CAAkB,GAAxB,UACE,MAAc,EACd,eAAuB,EACvB,QAAsC;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAgF;AAUhF;IAAuC,qCAAU;IAAjD;;IAkBA,CAAC;IAjBO,8CAAkB,GAAxB,UACE,MAAc,EACd,eAAuB,EACvB,QAAsC;;;;gBAGhC,GAAG,GAAG,0BAA0B,CAAC;gBACvC,sBAAO,IAAI,CAAC,IAAI,CACd,GAAG,EACH,EAAE,EACF;wBACE,MAAM,EAAE,MAAM;wBACd,eAAe,iBAAA;wBACf,QAAQ,UAAA;qBACT,CACF,EAAC;;;KACH;IACH,wBAAC;AAAD,CAAC,AAlBD,CAAuC,mBAAU,GAkBhD;AAlBY,8CAAiB;AAoB9B,iBAAiB;AACjB,IAAI,iBAAiB,GAAsB,IAAI,iBAAiB,CAC9D,2BAAkB,CAAC,MAAM,CAAC,CAAC,WAAW,CACvC,CAAC;AAEF,gCAAgC;AACzB,IAAM,YAAY,GAAG,UAC1B,WAAyC;IAEzC,IAAM,MAAM,GAAG,2BAAkB,CAAC,WAAW,CAAC,IAAI,2BAAkB,CAAC,MAAM,CAAC,CAAC;IAC7E,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAChE,CAAC,CAAC;AALW,QAAA,YAAY,gBAKvB;AAEK,IAAM,0BAA0B,GAAG;IACxC,IAAI,CAAC,iBAAiB;QACpB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAJW,QAAA,0BAA0B,8BAIrC","sourcesContent":["import { API_CLIENT_CONFIGS, RestClient, ServiceConfig } from '@reyaxyz/common';\n\nexport type BroadcastTransactionMetadata = {\n accountName?: string;\n};\n\nexport type TxData = {\n to: string;\n data: string;\n};\nexport class TransactionModule extends RestClient {\n async executeTransaction(\n txData: TxData,\n contractAddress: string,\n metadata: BroadcastTransactionMetadata,\n ) {\n // const uri = `/api/transaction-gelato/executeGelato`;\n const uri = `/api/transaction/execute`; //switch between Gelato and internal relayer\n return this.post<{ txHash: string; accountId?: string }>(\n uri,\n {},\n {\n txData: txData,\n contractAddress,\n metadata,\n },\n );\n }\n}\n\n// Internal state\nlet transactionModule: TransactionModule = new TransactionModule(\n API_CLIENT_CONFIGS['test'].apiEndpoint,\n);\n\n// Function to configure the SDK\nexport const configureSDK = (\n environment: ServiceConfig['environment'],\n): void => {\n const config = API_CLIENT_CONFIGS[environment] || API_CLIENT_CONFIGS['test'];\n transactionModule = new TransactionModule(config.apiEndpoint);\n};\n\nexport const getTransactionModuleClient = (): TransactionModule => {\n if (!transactionModule)\n throw new Error('SDK is not configured! Call configureSDK()');\n return transactionModule;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@reyaxyz/common": "0.
|
|
32
|
+
"@reyaxyz/common": "0.58.0",
|
|
33
33
|
"bignumber.js": "^9.1.2",
|
|
34
34
|
"ethers": "6.9.0"
|
|
35
35
|
},
|
|
36
36
|
"packageManager": "pnpm@8.10.4",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "8b2fc18cffccdeca0d96423fa6691c4a1d022b61"
|
|
38
38
|
}
|
package/src/config/index.ts
CHANGED
|
@@ -14,8 +14,8 @@ export class TransactionModule extends RestClient {
|
|
|
14
14
|
contractAddress: string,
|
|
15
15
|
metadata: BroadcastTransactionMetadata,
|
|
16
16
|
) {
|
|
17
|
-
const uri = `/api/transaction-gelato/executeGelato`;
|
|
18
|
-
|
|
17
|
+
// const uri = `/api/transaction-gelato/executeGelato`;
|
|
18
|
+
const uri = `/api/transaction/execute`; //switch between Gelato and internal relayer
|
|
19
19
|
return this.post<{ txHash: string; accountId?: string }>(
|
|
20
20
|
uri,
|
|
21
21
|
{},
|