Skip to content

Commit

Permalink
feat: build js sdk (#6)
Browse files Browse the repository at this point in the history
* 1.0.6

* fix: build

---------

Co-authored-by: BarryTong65 <[email protected]>
  • Loading branch information
BarryTong98 and BarryTong65 authored Oct 17, 2024
1 parent 4e4c610 commit 04bb407
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 43 deletions.
10 changes: 8 additions & 2 deletions dist/tsc/paymasterclient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export type IsSponsorableResponse = {
SponsorIcon: string;
SponsorWebsite: string;
};
export type SendRawTransactionOptions = {
UserAgent?: string;
};
export declare enum GaslessTransactionStatus {
New = 0,
Pending = 1,
Expand Down Expand Up @@ -49,10 +52,13 @@ export type Bundle = {
readonly ChainID: number;
};
export declare class PaymasterClient extends ethers.JsonRpcProvider {
constructor(url?: string | FetchRequest, network?: Networkish, options?: JsonRpcApiProviderOptions);
private privatePolicyUUID?;
private constructor();
static new(url?: string | FetchRequest, network?: Networkish, options?: JsonRpcApiProviderOptions): PaymasterClient;
static newPrivatePaymaster(url: string | FetchRequest, privatePolicyUUID: string, network?: Networkish, options?: JsonRpcApiProviderOptions): PaymasterClient;
chainID(): Promise<string>;
isSponsorable(tx: TransactionRequest): Promise<IsSponsorableResponse>;
sendRawTransaction(signedTx: string): Promise<string>;
sendRawTransaction(signedTx: string, opts?: SendRawTransactionOptions): Promise<string>;
getGaslessTransactionByHash(hash: string): Promise<GaslessTransaction>;
getSponsorTxByTxHash(hash: string): Promise<SponsorTx>;
getSponsorTxByBundleUuid(bundleUuid: string): Promise<SponsorTx>;
Expand Down
40 changes: 38 additions & 2 deletions dist/tsc/paymasterclient.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/paymasterclient.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 49 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "megafuel-js-sdk",
"version": "1.0.5",
"version": "1.0.6",
"description": "SDK for megafuel product",
"repository": "https://github.com/node-real/megafuel-js-sdk",
"license": "GPL-3.0-or-later",
Expand Down Expand Up @@ -33,10 +33,10 @@
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typedoc": "^0.23.21",
"typescript": "^4.9.3"
"typescript": "^5.0.4"
},
"dependencies": {
"dotenv": "^16.4.5",
"ethers": "^6.13.2"
"ethers": "^6.13.4"
}
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"importHelpers": true,
Expand Down

0 comments on commit 04bb407

Please sign in to comment.