@argent/x-shared 1.75.9 → 1.76.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/src/chains/starknet/getAddressFromArgentName.cjs +1 -1
- package/dist/src/chains/starknet/getAddressFromArgentName.js +7 -7
- package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -1
- package/dist/src/chains/starknet/services/address/StarknetAddressService.js +9 -9
- package/dist/src/features/paymaster/types.cjs +1 -1
- package/dist/src/features/paymaster/types.js +1 -1
- package/dist/src/http/HttpService.cjs +1 -1
- package/dist/src/http/HttpService.d.ts +2 -2
- package/dist/src/http/HttpService.js +61 -44
- package/dist/src/http/IHttpService.cjs +1 -1
- package/dist/src/http/IHttpService.d.ts +5 -3
- package/dist/src/http/IHttpService.js +4 -4
- package/dist/src/transactions/txv3.cjs +1 -1
- package/dist/src/transactions/txv3.js +4 -4
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),s=require("zod"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),s=require("zod"),d=require("./address.cjs"),m=require("./argentName.cjs"),o=require("../../errors/address.cjs"),w=require("../../http/HttpError.cjs"),E=s.z.object({walletAddress:d.addressSchemaArgentBackend,ens:m.argentNameSchema,chain:s.z.enum(["ethereum","starknet"]),deleted:s.z.boolean(),walletDeployed:s.z.boolean()}).or(s.z.object({status:s.z.string()}));async function N(t,n,a,c="starknet"){const i={ens:t,chain:c},l=new URLSearchParams(i),A=u(a,"wallet",`?${l}`);try{const e=await n.get(A),r=e&&"walletAddress"in e?e.walletAddress:void 0;if(!r)throw new o.AddressError({code:"NO_ADDRESS_FROM_ARGENT_NAME"});if(d.isZeroAddress(r))throw new o.AddressError({code:"ARGENT_NAME_NOT_FOUND",message:`${t} not found`});if(!d.isValidAddress(r))throw new o.AddressError({code:"ARGENT_NAME_INVALID_ADDRESS",message:`${t} resolved to an invalid address (${r})`});return d.normalizeAddress(r)}catch(e){throw e instanceof w.HttpError&&e.status===404?new o.AddressError({code:"ARGENT_NAME_NOT_FOUND",message:`${t} not found`}):e}}exports.apiWalletResponseSchema=E;exports.getAddressFromArgentName=N;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import m from "url-join";
|
|
2
2
|
import { z as s } from "zod";
|
|
3
|
+
import { addressSchemaArgentBackend as A, isZeroAddress as w, isValidAddress as f, normalizeAddress as N } from "./address.js";
|
|
4
|
+
import { argentNameSchema as h } from "./argentName.js";
|
|
3
5
|
import { AddressError as t } from "../../errors/address.js";
|
|
4
|
-
import { argentNameSchema as A } from "./argentName.js";
|
|
5
|
-
import { addressSchemaArgentBackend as w, isZeroAddress as f, isValidAddress as N, normalizeAddress as h } from "./address.js";
|
|
6
6
|
import { HttpError as _ } from "../../http/HttpError.js";
|
|
7
7
|
const O = s.object({
|
|
8
|
-
walletAddress:
|
|
9
|
-
ens:
|
|
8
|
+
walletAddress: A,
|
|
9
|
+
ens: h,
|
|
10
10
|
chain: s.enum(["ethereum", "starknet"]),
|
|
11
11
|
deleted: s.boolean(),
|
|
12
12
|
walletDeployed: s.boolean()
|
|
@@ -24,17 +24,17 @@ async function T(o, n, a, d = "starknet") {
|
|
|
24
24
|
throw new t({
|
|
25
25
|
code: "NO_ADDRESS_FROM_ARGENT_NAME"
|
|
26
26
|
});
|
|
27
|
-
if (
|
|
27
|
+
if (w(r))
|
|
28
28
|
throw new t({
|
|
29
29
|
code: "ARGENT_NAME_NOT_FOUND",
|
|
30
30
|
message: `${o} not found`
|
|
31
31
|
});
|
|
32
|
-
if (!
|
|
32
|
+
if (!f(r))
|
|
33
33
|
throw new t({
|
|
34
34
|
code: "ARGENT_NAME_INVALID_ADDRESS",
|
|
35
35
|
message: `${o} resolved to an invalid address (${r})`
|
|
36
36
|
});
|
|
37
|
-
return
|
|
37
|
+
return N(r);
|
|
38
38
|
} catch (e) {
|
|
39
39
|
throw e instanceof _ && e.status === 404 ? new t({
|
|
40
40
|
code: "ARGENT_NAME_NOT_FOUND",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../address.cjs"),a=require("../../argentName.cjs"),o=require("../../getAddressFromArgentName.cjs"),n=require("../../getAddressFromStarkName.cjs"),i=require("../../starknetId.cjs"),s=require("../../../../errors/address.cjs");class A{constructor(e,r,t){this.httpService=e,this.baseUrl=r,this.allowedArgentNameNetworkId=t}async parseAddressOrDomain(e,r,t){if(d.isAddress(e))return d.normalizeAddress(e);try{return await this.getAddressFromDomainName(e,r,t)}catch{throw new s.AddressError({code:"NOT_VALID"})}}async getAddressFromDomainName(e,r,t){if(i.isStarknetId(e))return n.getAddressFromStarkName(e,r,t);if(a.isArgentName(e)){if(r!==this.allowedArgentNameNetworkId)throw new s.AddressError({code:"ARGENT_NAME_INVALID_NETWORK",message:`Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`});return o.getAddressFromArgentName(e,this.httpService,this.baseUrl)}throw new s.AddressError({code:"NO_ADDRESS_FROM_DOMAIN"})}}exports.StarknetAddressService=A;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AddressError as s } from "../../../../errors/address.js";
|
|
2
1
|
import { isAddress as o, normalizeAddress as i } from "../../address.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { isArgentName as m } from "../../argentName.js";
|
|
3
|
+
import { getAddressFromArgentName as a } from "../../getAddressFromArgentName.js";
|
|
4
|
+
import { getAddressFromStarkName as d } from "../../getAddressFromStarkName.js";
|
|
5
|
+
import { isStarknetId as n } from "../../starknetId.js";
|
|
6
|
+
import { AddressError as s } from "../../../../errors/address.js";
|
|
7
7
|
class p {
|
|
8
8
|
constructor(e, r, t) {
|
|
9
9
|
this.httpService = e, this.baseUrl = r, this.allowedArgentNameNetworkId = t;
|
|
@@ -18,15 +18,15 @@ class p {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
async getAddressFromDomainName(e, r, t) {
|
|
21
|
-
if (
|
|
22
|
-
return
|
|
23
|
-
if (
|
|
21
|
+
if (n(e))
|
|
22
|
+
return d(e, r, t);
|
|
23
|
+
if (m(e)) {
|
|
24
24
|
if (r !== this.allowedArgentNameNetworkId)
|
|
25
25
|
throw new s({
|
|
26
26
|
code: "ARGENT_NAME_INVALID_NETWORK",
|
|
27
27
|
message: `Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`
|
|
28
28
|
});
|
|
29
|
-
return
|
|
29
|
+
return a(e, this.httpService, this.baseUrl);
|
|
30
30
|
}
|
|
31
31
|
throw new s({
|
|
32
32
|
code: "NO_ADDRESS_FROM_DOMAIN"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),t=require("../../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),t=require("../../chains/starknet/address.cjs"),r=require("../../utils/starknet/starknet.cjs"),e=require("../../backend/schema.cjs"),s=a.z.object({calls:a.z.array(r.callSchema),accountAddress:t.addressSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),feeTokenAddress:t.addressSchema,maxFee:r.bigNumberishSchema,accountClassHash:a.z.string().optional()}),o=a.z.object({signature:a.z.string().array(),accountAddress:t.addressSchema,typedData:r.typedDataSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),deploymentData:a.z.object({class_hash:a.z.string().optional(),salt:a.z.string().or(a.z.number()).or(a.z.bigint()).optional(),unique:a.z.string(),calldata:a.z.array(a.z.string())}).optional()}),n=a.z.object({transactionHash:a.z.string()});exports.paymasterExecuteParams=o;exports.paymasterExecuteResponse=n;exports.paymasterExecutionDataParams=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z as a } from "zod";
|
|
2
|
+
import { addressSchema as t } from "../../chains/starknet/address.js";
|
|
2
3
|
import { bigNumberishSchema as o, callSchema as s, typedDataSchema as n } from "../../utils/starknet/starknet.js";
|
|
3
4
|
import { argentNetworkIdSchema as e, argentBackendNetworkIdSchema as r } from "../../backend/schema.js";
|
|
4
|
-
import { addressSchema as t } from "../../chains/starknet/address.js";
|
|
5
5
|
const d = a.object({
|
|
6
6
|
calls: a.array(s),
|
|
7
7
|
accountAddress: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("lodash-es"),n=require("./HttpError.cjs"),u=require("./IHttpService.cjs");class d{constructor(i,e="json"){this.requestInit=i,this.responseType=e}async get(i,e,s){const o=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,c={...o,...e,method:"GET",headers:{...o?.headers,...e?.headers}},t=await fetch(i,c).catch(async r=>{let a;throw r instanceof Response&&(a=await r.json().catch(()=>{})),new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_FETCH_URL,0,a)});if(this.responseType==="json"){if(!t.ok)throw new n.HttpError(t.statusText,t.status,await t.json().catch(()=>{}));const r=await t.json();if(s)try{return s.parse(r)}catch(a){throw new n.HttpError(a.message,0)}return r}return t}async post(i,e,s){const o=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,c={...o,...e,method:"POST",headers:{...o?.headers,...e?.headers}},t=await fetch(i,c).catch(()=>{throw new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_POST_URL,0)});if(!t.ok)throw new n.HttpError(t.statusText,t.status,await t.json());if(t.status===204)return{};const r=await t.json();if(s)try{return s.parse(r)}catch(a){throw new n.HttpError(a.message,0)}return r}async put(i,e,s){const o=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,c={...o,...e,method:"PUT",headers:{...o?.headers,...e?.headers}},t=await fetch(i,c).catch(()=>{throw new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_PUT_URL,0)});if(!t.ok)throw new n.HttpError(t.statusText,t.status,await t.json().catch(()=>{}));if(t.status===204)return{};const r=await t.json();if(s)try{return s.parse(r)}catch(a){throw new n.HttpError(a.message,0)}return r}async delete(i,e){const s=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,o={...s,...e,method:"DELETE",headers:{...s?.headers,...e?.headers}},c=await fetch(i,o).catch(()=>{throw new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_DELETE_URL,0)});if(!c.ok)throw new n.HttpError(c.statusText,c.status)}}exports.HTTPService=d;
|
|
@@ -7,9 +7,9 @@ export declare class HTTPService implements IHttpService {
|
|
|
7
7
|
private requestInit;
|
|
8
8
|
private responseType;
|
|
9
9
|
constructor(requestInit?: CanBeFn<RequestInit>, responseType?: ResponseType);
|
|
10
|
-
get<T>(url: string, requestInit?: RequestInit): Promise<T>;
|
|
10
|
+
get<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
11
11
|
post<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
12
|
-
put<T>(url: string, requestInit?: RequestInit): Promise<T>;
|
|
12
|
+
put<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
13
13
|
delete(url: string, requestInit?: RequestInit): Promise<void>;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -1,78 +1,95 @@
|
|
|
1
|
-
import { isFunction as
|
|
2
|
-
import { HttpError as
|
|
1
|
+
import { isFunction as c } from "lodash-es";
|
|
2
|
+
import { HttpError as r } from "./HttpError.js";
|
|
3
3
|
import { HTTP_ERROR_MESSAGE as u } from "./IHttpService.js";
|
|
4
|
-
class
|
|
5
|
-
constructor(
|
|
6
|
-
this.requestInit =
|
|
4
|
+
class f {
|
|
5
|
+
constructor(i, e = "json") {
|
|
6
|
+
this.requestInit = i, this.responseType = e;
|
|
7
7
|
}
|
|
8
|
-
async get(
|
|
9
|
-
const
|
|
10
|
-
...
|
|
8
|
+
async get(i, e, s) {
|
|
9
|
+
const o = c(this.requestInit) ? await this.requestInit() : this.requestInit, h = {
|
|
10
|
+
...o,
|
|
11
11
|
...e,
|
|
12
12
|
method: "GET",
|
|
13
13
|
// merge headers
|
|
14
14
|
headers: {
|
|
15
|
-
...
|
|
15
|
+
...o?.headers,
|
|
16
16
|
...e?.headers
|
|
17
17
|
}
|
|
18
|
-
}, t = await fetch(
|
|
19
|
-
let
|
|
20
|
-
throw a instanceof Response && (
|
|
21
|
-
})), new
|
|
18
|
+
}, t = await fetch(i, h).catch(async (a) => {
|
|
19
|
+
let n;
|
|
20
|
+
throw a instanceof Response && (n = await a.json().catch(() => {
|
|
21
|
+
})), new r(u.FAILED_TO_FETCH_URL, 0, n);
|
|
22
22
|
});
|
|
23
23
|
if (this.responseType === "json") {
|
|
24
24
|
if (!t.ok)
|
|
25
|
-
throw new
|
|
25
|
+
throw new r(t.statusText, t.status, await t.json().catch(() => {
|
|
26
26
|
}));
|
|
27
|
-
|
|
27
|
+
const a = await t.json();
|
|
28
|
+
if (s)
|
|
29
|
+
try {
|
|
30
|
+
return s.parse(a);
|
|
31
|
+
} catch (n) {
|
|
32
|
+
throw new r(n.message, 0);
|
|
33
|
+
}
|
|
34
|
+
return a;
|
|
28
35
|
}
|
|
29
36
|
return t;
|
|
30
37
|
}
|
|
31
|
-
async post(
|
|
32
|
-
const
|
|
33
|
-
...
|
|
38
|
+
async post(i, e, s) {
|
|
39
|
+
const o = c(this.requestInit) ? await this.requestInit() : this.requestInit, h = {
|
|
40
|
+
...o,
|
|
34
41
|
...e,
|
|
35
42
|
method: "POST",
|
|
36
43
|
// merge headers
|
|
37
44
|
headers: {
|
|
38
|
-
...
|
|
45
|
+
...o?.headers,
|
|
39
46
|
...e?.headers
|
|
40
47
|
}
|
|
41
|
-
},
|
|
42
|
-
throw new
|
|
48
|
+
}, t = await fetch(i, h).catch(() => {
|
|
49
|
+
throw new r(u.FAILED_TO_POST_URL, 0);
|
|
43
50
|
});
|
|
44
|
-
if (!
|
|
45
|
-
throw new
|
|
46
|
-
if (
|
|
51
|
+
if (!t.ok)
|
|
52
|
+
throw new r(t.statusText, t.status, await t.json());
|
|
53
|
+
if (t.status === 204)
|
|
47
54
|
return {};
|
|
48
|
-
const
|
|
55
|
+
const a = await t.json();
|
|
49
56
|
if (s)
|
|
50
57
|
try {
|
|
51
|
-
return s.parse(
|
|
52
|
-
} catch (
|
|
53
|
-
throw new
|
|
58
|
+
return s.parse(a);
|
|
59
|
+
} catch (n) {
|
|
60
|
+
throw new r(n.message, 0);
|
|
54
61
|
}
|
|
55
|
-
return
|
|
62
|
+
return a;
|
|
56
63
|
}
|
|
57
|
-
async put(
|
|
58
|
-
const
|
|
59
|
-
...
|
|
64
|
+
async put(i, e, s) {
|
|
65
|
+
const o = c(this.requestInit) ? await this.requestInit() : this.requestInit, h = {
|
|
66
|
+
...o,
|
|
60
67
|
...e,
|
|
61
68
|
method: "PUT",
|
|
62
69
|
// merge headers
|
|
63
70
|
headers: {
|
|
64
|
-
...
|
|
71
|
+
...o?.headers,
|
|
65
72
|
...e?.headers
|
|
66
73
|
}
|
|
67
|
-
}, t = await fetch(
|
|
68
|
-
throw new
|
|
74
|
+
}, t = await fetch(i, h).catch(() => {
|
|
75
|
+
throw new r(u.FAILED_TO_PUT_URL, 0);
|
|
69
76
|
});
|
|
70
77
|
if (!t.ok)
|
|
71
|
-
throw new
|
|
72
|
-
|
|
78
|
+
throw new r(t.statusText, t.status, await t.json().catch(() => {
|
|
79
|
+
}));
|
|
80
|
+
if (t.status === 204)
|
|
81
|
+
return {};
|
|
82
|
+
const a = await t.json();
|
|
83
|
+
if (s)
|
|
84
|
+
try {
|
|
85
|
+
return s.parse(a);
|
|
86
|
+
} catch (n) {
|
|
87
|
+
throw new r(n.message, 0);
|
|
88
|
+
}
|
|
89
|
+
return a;
|
|
73
90
|
}
|
|
74
|
-
async delete(
|
|
75
|
-
const s =
|
|
91
|
+
async delete(i, e) {
|
|
92
|
+
const s = c(this.requestInit) ? await this.requestInit() : this.requestInit, o = {
|
|
76
93
|
...s,
|
|
77
94
|
...e,
|
|
78
95
|
method: "DELETE",
|
|
@@ -81,13 +98,13 @@ class T {
|
|
|
81
98
|
...s?.headers,
|
|
82
99
|
...e?.headers
|
|
83
100
|
}
|
|
84
|
-
},
|
|
85
|
-
throw new
|
|
101
|
+
}, h = await fetch(i, o).catch(() => {
|
|
102
|
+
throw new r(u.FAILED_TO_DELETE_URL, 0);
|
|
86
103
|
});
|
|
87
|
-
if (!
|
|
88
|
-
throw new
|
|
104
|
+
if (!h.ok)
|
|
105
|
+
throw new r(h.statusText, h.status);
|
|
89
106
|
}
|
|
90
107
|
}
|
|
91
108
|
export {
|
|
92
|
-
|
|
109
|
+
f as HTTPService
|
|
93
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.HTTP_ERROR_MESSAGE=void 0;(function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.HTTP_ERROR_MESSAGE=void 0;(function(e){e.FAILED_TO_FETCH_URL="Failed to fetch url",e.FAILED_TO_POST_URL="Failed to post url",e.FAILED_TO_PUT_URL="Failed to put url",e.FAILED_TO_DELETE_URL="Failed to delete url"})(exports.HTTP_ERROR_MESSAGE||(exports.HTTP_ERROR_MESSAGE={}));
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
2
|
export interface IHttpService {
|
|
3
|
-
get<T>(url: string, options?: RequestInit): Promise<T>;
|
|
3
|
+
get<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
4
4
|
post<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
5
5
|
delete(url: string, options?: RequestInit): Promise<void>;
|
|
6
|
-
put<T>(url: string, options?: RequestInit): Promise<T>;
|
|
6
|
+
put<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
7
7
|
}
|
|
8
8
|
export declare enum HTTP_ERROR_MESSAGE {
|
|
9
9
|
FAILED_TO_FETCH_URL = "Failed to fetch url",
|
|
10
|
-
FAILED_TO_POST_URL = "Failed to post url"
|
|
10
|
+
FAILED_TO_POST_URL = "Failed to post url",
|
|
11
|
+
FAILED_TO_PUT_URL = "Failed to put url",
|
|
12
|
+
FAILED_TO_DELETE_URL = "Failed to delete url"
|
|
11
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e;
|
|
2
2
|
(function(t) {
|
|
3
|
-
t.FAILED_TO_FETCH_URL = "Failed to fetch url", t.FAILED_TO_POST_URL = "Failed to post url";
|
|
4
|
-
})(
|
|
3
|
+
t.FAILED_TO_FETCH_URL = "Failed to fetch url", t.FAILED_TO_POST_URL = "Failed to post url", t.FAILED_TO_PUT_URL = "Failed to put url", t.FAILED_TO_DELETE_URL = "Failed to delete url";
|
|
4
|
+
})(e || (e = {}));
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as HTTP_ERROR_MESSAGE
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../chains/starknet/address.cjs"),r=require("../chains/starknet/constants.cjs"),o=require("../chains/starknet/services/deploymentData/getAccountClassHash.cjs"),u=[r.STRK_TOKEN_ADDRESS];function n({address:e}){return u.some(s=>t.isEqualAddress(e,s))}function a(e){return e?o.getArgentAccountClassHashesWithTxV3Support().some(s=>t.isEqualAddress(s,e)):!1}exports.classHashSupportsTxV3=a;exports.feeTokenNeedsTxV3Support=n;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getArgentAccountClassHashesWithTxV3Support as t } from "../chains/starknet/services/deploymentData/getAccountClassHash.js";
|
|
2
|
-
import { STRK_TOKEN_ADDRESS as s } from "../chains/starknet/constants.js";
|
|
3
1
|
import { isEqualAddress as o } from "../chains/starknet/address.js";
|
|
4
|
-
|
|
2
|
+
import { STRK_TOKEN_ADDRESS as t } from "../chains/starknet/constants.js";
|
|
3
|
+
import { getArgentAccountClassHashesWithTxV3Support as s } from "../chains/starknet/services/deploymentData/getAccountClassHash.js";
|
|
4
|
+
const n = [t];
|
|
5
5
|
function f({ address: r }) {
|
|
6
6
|
return n.some((e) => o(r, e));
|
|
7
7
|
}
|
|
8
8
|
function m(r) {
|
|
9
|
-
return r ?
|
|
9
|
+
return r ? s().some((e) => o(e, r)) : !1;
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
12
|
m as classHashSupportsTxV3,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.76.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@types/lodash-es": "4.17.12",
|
|
65
65
|
"@types/numeral": "2.0.5",
|
|
66
66
|
"@types/ua-parser-js": "0.7.39",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
68
|
-
"@typescript-eslint/parser": "8.
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "8.43.0",
|
|
68
|
+
"@typescript-eslint/parser": "8.43.0",
|
|
69
69
|
"esbuild": "0.25.9",
|
|
70
70
|
"esbuild-register": "3.6.0",
|
|
71
71
|
"eslint": "8.57.1",
|