near-safe 0.9.3 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -170,4 +170,6 @@ export declare class NearSafe {
170
170
  requestRouter({ method, chainId, params }: SignRequestData, sponsorshipPolicy?: string): Promise<EncodedSignRequest>;
171
171
  encodeForSafe(from: string): boolean;
172
172
  policyForChainId(chainId: number): Promise<SponsorshipPolicyData[]>;
173
+ deploymentRequest(chainId: number): SignRequestData;
174
+ addOwnerRequest(chainId: number, recoveryAddress: Address): SignRequestData;
173
175
  }
@@ -350,5 +350,33 @@ class NearSafe {
350
350
  const bundler = this.bundlerForChainId(chainId);
351
351
  return bundler.getSponsorshipPolicies();
352
352
  }
353
+ deploymentRequest(chainId) {
354
+ return {
355
+ method: "eth_sendTransaction",
356
+ chainId,
357
+ params: [
358
+ {
359
+ from: this.address,
360
+ to: viem_1.zeroAddress,
361
+ value: "0x0",
362
+ data: "0x",
363
+ },
364
+ ],
365
+ };
366
+ }
367
+ addOwnerRequest(chainId, recoveryAddress) {
368
+ return {
369
+ method: "eth_sendTransaction",
370
+ chainId,
371
+ params: [
372
+ {
373
+ from: this.address,
374
+ to: this.address,
375
+ value: "0x0",
376
+ data: new safe_1.SafeContractSuite().addOwnerData(recoveryAddress),
377
+ },
378
+ ],
379
+ };
380
+ }
353
381
  }
354
382
  exports.NearSafe = NearSafe;
@@ -170,4 +170,6 @@ export declare class NearSafe {
170
170
  requestRouter({ method, chainId, params }: SignRequestData, sponsorshipPolicy?: string): Promise<EncodedSignRequest>;
171
171
  encodeForSafe(from: string): boolean;
172
172
  policyForChainId(chainId: number): Promise<SponsorshipPolicyData[]>;
173
+ deploymentRequest(chainId: number): SignRequestData;
174
+ addOwnerRequest(chainId: number, recoveryAddress: Address): SignRequestData;
173
175
  }
@@ -353,4 +353,32 @@ export class NearSafe {
353
353
  const bundler = this.bundlerForChainId(chainId);
354
354
  return bundler.getSponsorshipPolicies();
355
355
  }
356
+ deploymentRequest(chainId) {
357
+ return {
358
+ method: "eth_sendTransaction",
359
+ chainId,
360
+ params: [
361
+ {
362
+ from: this.address,
363
+ to: zeroAddress,
364
+ value: "0x0",
365
+ data: "0x",
366
+ },
367
+ ],
368
+ };
369
+ }
370
+ addOwnerRequest(chainId, recoveryAddress) {
371
+ return {
372
+ method: "eth_sendTransaction",
373
+ chainId,
374
+ params: [
375
+ {
376
+ from: this.address,
377
+ to: this.address,
378
+ value: "0x0",
379
+ data: new SafeContractSuite().addOwnerData(recoveryAddress),
380
+ },
381
+ ],
382
+ };
383
+ }
356
384
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "near-safe",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "license": "MIT",
5
5
  "description": "An SDK for controlling Ethereum Smart Accounts via ERC4337 from a Near Account.",
6
6
  "author": "bh2smith",