Skip to content

Commit 04bb407

Browse files
feat: build js sdk (#6)
* 1.0.6 * fix: build --------- Co-authored-by: BarryTong65 <[email protected]>
1 parent 4e4c610 commit 04bb407

File tree

6 files changed

+101
-43
lines changed

6 files changed

+101
-43
lines changed

dist/tsc/paymasterclient.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export type IsSponsorableResponse = {
77
SponsorIcon: string;
88
SponsorWebsite: string;
99
};
10+
export type SendRawTransactionOptions = {
11+
UserAgent?: string;
12+
};
1013
export declare enum GaslessTransactionStatus {
1114
New = 0,
1215
Pending = 1,
@@ -49,10 +52,13 @@ export type Bundle = {
4952
readonly ChainID: number;
5053
};
5154
export declare class PaymasterClient extends ethers.JsonRpcProvider {
52-
constructor(url?: string | FetchRequest, network?: Networkish, options?: JsonRpcApiProviderOptions);
55+
private privatePolicyUUID?;
56+
private constructor();
57+
static new(url?: string | FetchRequest, network?: Networkish, options?: JsonRpcApiProviderOptions): PaymasterClient;
58+
static newPrivatePaymaster(url: string | FetchRequest, privatePolicyUUID: string, network?: Networkish, options?: JsonRpcApiProviderOptions): PaymasterClient;
5359
chainID(): Promise<string>;
5460
isSponsorable(tx: TransactionRequest): Promise<IsSponsorableResponse>;
55-
sendRawTransaction(signedTx: string): Promise<string>;
61+
sendRawTransaction(signedTx: string, opts?: SendRawTransactionOptions): Promise<string>;
5662
getGaslessTransactionByHash(hash: string): Promise<GaslessTransaction>;
5763
getSponsorTxByTxHash(hash: string): Promise<SponsorTx>;
5864
getSponsorTxByBundleUuid(bundleUuid: string): Promise<SponsorTx>;

dist/tsc/paymasterclient.js

Lines changed: 38 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tsc/paymasterclient.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 49 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "megafuel-js-sdk",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "SDK for megafuel product",
55
"repository": "https://github.com/node-real/megafuel-js-sdk",
66
"license": "GPL-3.0-or-later",
@@ -33,10 +33,10 @@
3333
"ts-jest": "^29.0.3",
3434
"ts-node": "^10.9.1",
3535
"typedoc": "^0.23.21",
36-
"typescript": "^4.9.3"
36+
"typescript": "^5.0.4"
3737
},
3838
"dependencies": {
3939
"dotenv": "^16.4.5",
40-
"ethers": "^6.13.2"
40+
"ethers": "^6.13.4"
4141
}
4242
}

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"noImplicitAny": true,
99
"strictNullChecks": true,
1010
"strictFunctionTypes": true,
11-
"noUnusedLocals": true,
12-
"noUnusedParameters": true,
11+
"noUnusedLocals": false,
12+
"noUnusedParameters": false,
1313
"noImplicitReturns": true,
1414
"noFallthroughCasesInSwitch": true,
1515
"importHelpers": true,

0 commit comments

Comments
 (0)