@ensdomains/ensjs 3.0.0 → 3.1.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/cjs/clients/decorators/public.js.map +1 -1
- package/dist/cjs/contracts/consts.js +3 -3
- package/dist/cjs/contracts/universalResolver.js +92 -59
- package/dist/cjs/contracts/universalResolver.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/functions/public/_getAbi.js +52 -45
- package/dist/cjs/functions/public/_getAbi.js.map +1 -1
- package/dist/cjs/functions/public/_getAddr.js +30 -23
- package/dist/cjs/functions/public/_getAddr.js.map +1 -1
- package/dist/cjs/functions/public/_getContentHash.js +14 -7
- package/dist/cjs/functions/public/_getContentHash.js.map +1 -1
- package/dist/cjs/functions/public/_getText.js +15 -8
- package/dist/cjs/functions/public/_getText.js.map +1 -1
- package/dist/cjs/functions/public/getAbiRecord.js +13 -5
- package/dist/cjs/functions/public/getAbiRecord.js.map +1 -1
- package/dist/cjs/functions/public/getAddressRecord.js +13 -5
- package/dist/cjs/functions/public/getAddressRecord.js.map +1 -1
- package/dist/cjs/functions/public/getContentHashRecord.js +13 -5
- package/dist/cjs/functions/public/getContentHashRecord.js.map +1 -1
- package/dist/cjs/functions/public/getName.js +53 -35
- package/dist/cjs/functions/public/getName.js.map +1 -1
- package/dist/cjs/functions/public/getRecords.js +164 -161
- package/dist/cjs/functions/public/getRecords.js.map +1 -1
- package/dist/cjs/functions/public/getTextRecord.js +13 -5
- package/dist/cjs/functions/public/getTextRecord.js.map +1 -1
- package/dist/cjs/functions/public/universalWrapper.js +45 -37
- package/dist/cjs/functions/public/universalWrapper.js.map +1 -1
- package/dist/cjs/utils/checkSafeUniversalResolverData.js +35 -0
- package/dist/cjs/utils/checkSafeUniversalResolverData.js.map +1 -0
- package/dist/esm/clients/decorators/public.js.map +1 -1
- package/dist/esm/contracts/consts.js +3 -3
- package/dist/esm/contracts/universalResolver.js +92 -59
- package/dist/esm/contracts/universalResolver.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/functions/public/_getAbi.js +56 -49
- package/dist/esm/functions/public/_getAbi.js.map +1 -1
- package/dist/esm/functions/public/_getAddr.js +30 -23
- package/dist/esm/functions/public/_getAddr.js.map +1 -1
- package/dist/esm/functions/public/_getContentHash.js +14 -7
- package/dist/esm/functions/public/_getContentHash.js.map +1 -1
- package/dist/esm/functions/public/_getText.js +15 -8
- package/dist/esm/functions/public/_getText.js.map +1 -1
- package/dist/esm/functions/public/getAbiRecord.js +13 -5
- package/dist/esm/functions/public/getAbiRecord.js.map +1 -1
- package/dist/esm/functions/public/getAddressRecord.js +13 -5
- package/dist/esm/functions/public/getAddressRecord.js.map +1 -1
- package/dist/esm/functions/public/getContentHashRecord.js +13 -5
- package/dist/esm/functions/public/getContentHashRecord.js.map +1 -1
- package/dist/esm/functions/public/getName.js +54 -36
- package/dist/esm/functions/public/getName.js.map +1 -1
- package/dist/esm/functions/public/getRecords.js +168 -165
- package/dist/esm/functions/public/getRecords.js.map +1 -1
- package/dist/esm/functions/public/getTextRecord.js +13 -5
- package/dist/esm/functions/public/getTextRecord.js.map +1 -1
- package/dist/esm/functions/public/universalWrapper.js +46 -38
- package/dist/esm/functions/public/universalWrapper.js.map +1 -1
- package/dist/esm/utils/checkSafeUniversalResolverData.js +39 -0
- package/dist/esm/utils/checkSafeUniversalResolverData.js.map +1 -0
- package/dist/types/clients/decorators/public.d.ts +6 -6
- package/dist/types/clients/decorators/public.d.ts.map +1 -1
- package/dist/types/clients/public.d.ts +34 -8
- package/dist/types/clients/public.d.ts.map +1 -1
- package/dist/types/contracts/consts.d.ts +3 -3
- package/dist/types/contracts/universalResolver.d.ts +73 -0
- package/dist/types/contracts/universalResolver.d.ts.map +1 -1
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/functions/public/_getAbi.d.ts +3 -1
- package/dist/types/functions/public/_getAbi.d.ts.map +1 -1
- package/dist/types/functions/public/_getAddr.d.ts +3 -1
- package/dist/types/functions/public/_getAddr.d.ts.map +1 -1
- package/dist/types/functions/public/_getContentHash.d.ts +3 -1
- package/dist/types/functions/public/_getContentHash.d.ts.map +1 -1
- package/dist/types/functions/public/_getText.d.ts +3 -1
- package/dist/types/functions/public/_getText.d.ts.map +1 -1
- package/dist/types/functions/public/getAbiRecord.d.ts +8 -5
- package/dist/types/functions/public/getAbiRecord.d.ts.map +1 -1
- package/dist/types/functions/public/getAddressRecord.d.ts +8 -5
- package/dist/types/functions/public/getAddressRecord.d.ts.map +1 -1
- package/dist/types/functions/public/getContentHashRecord.d.ts +7 -4
- package/dist/types/functions/public/getContentHashRecord.d.ts.map +1 -1
- package/dist/types/functions/public/getName.d.ts +9 -3
- package/dist/types/functions/public/getName.d.ts.map +1 -1
- package/dist/types/functions/public/getRecords.d.ts +53 -26
- package/dist/types/functions/public/getRecords.d.ts.map +1 -1
- package/dist/types/functions/public/getTextRecord.d.ts +7 -4
- package/dist/types/functions/public/getTextRecord.d.ts.map +1 -1
- package/dist/types/functions/public/universalWrapper.d.ts +4 -2
- package/dist/types/functions/public/universalWrapper.d.ts.map +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/checkSafeUniversalResolverData.d.ts +14 -0
- package/dist/types/utils/checkSafeUniversalResolverData.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/clients/decorators/public.ts +31 -4
- package/src/contracts/consts.ts +3 -3
- package/src/contracts/universalResolver.ts +95 -59
- package/src/errors/version.ts +1 -1
- package/src/functions/public/_getAbi.ts +61 -53
- package/src/functions/public/_getAddr.ts +31 -24
- package/src/functions/public/_getContentHash.ts +15 -7
- package/src/functions/public/_getText.ts +16 -8
- package/src/functions/public/getAbiRecord.ts +21 -8
- package/src/functions/public/getAddressRecord.ts +25 -9
- package/src/functions/public/getContentHashRecord.ts +19 -7
- package/src/functions/public/getName.ts +58 -40
- package/src/functions/public/getRecords.ts +336 -235
- package/src/functions/public/getTextRecord.ts +19 -6
- package/src/functions/public/universalWrapper.ts +49 -43
- package/src/types.ts +4 -3
- package/src/utils/checkSafeUniversalResolverData.ts +62 -0
|
@@ -53,7 +53,7 @@ export type EnsPublicActions = {
|
|
|
53
53
|
* const result = await client.getAbiRecord({ name: 'ens.eth' })
|
|
54
54
|
* // TODO: real example
|
|
55
55
|
*/
|
|
56
|
-
getAbiRecord: ({ name, }: GetAbiRecordParameters) => Promise<GetAbiRecordReturnType>;
|
|
56
|
+
getAbiRecord: ({ name, gatewayUrls, strict, }: GetAbiRecordParameters) => Promise<GetAbiRecordReturnType>;
|
|
57
57
|
/**
|
|
58
58
|
* Gets an address record for a name and specified coin
|
|
59
59
|
* @param parameters - {@link GetAddressRecordParameters}
|
|
@@ -71,7 +71,7 @@ export type EnsPublicActions = {
|
|
|
71
71
|
* const result = await client.getAddressRecord({ name: 'ens.eth', coin: 'ETH' })
|
|
72
72
|
* // { id: 60, name: 'ETH , value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }
|
|
73
73
|
*/
|
|
74
|
-
getAddressRecord: ({ name, coin, bypassFormat, }: GetAddressRecordParameters) => Promise<GetAddressRecordReturnType>;
|
|
74
|
+
getAddressRecord: ({ name, coin, bypassFormat, gatewayUrls, strict, }: GetAddressRecordParameters) => Promise<GetAddressRecordReturnType>;
|
|
75
75
|
/**
|
|
76
76
|
* Gets the availability of a name to register
|
|
77
77
|
* @param parameters - {@link GetAvailableParameters}
|
|
@@ -107,7 +107,7 @@ export type EnsPublicActions = {
|
|
|
107
107
|
* const result = await client.getContentHashRecord({ name: 'ens.eth' })
|
|
108
108
|
* // { protocolType: 'ipfs', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' }
|
|
109
109
|
*/
|
|
110
|
-
getContentHashRecord: ({ name, }: GetContentHashRecordParameters) => Promise<GetContentHashRecordReturnType>;
|
|
110
|
+
getContentHashRecord: ({ name, gatewayUrls, strict, }: GetContentHashRecordParameters) => Promise<GetContentHashRecordReturnType>;
|
|
111
111
|
/**
|
|
112
112
|
* Gets the expiry for a name
|
|
113
113
|
* @param parameters - {@link GetExpiryParameters}
|
|
@@ -143,7 +143,7 @@ export type EnsPublicActions = {
|
|
|
143
143
|
* const result = await client.getName({ address: '0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5' })
|
|
144
144
|
* // { name: 'nick.eth', match: true, reverseResolverAddress: '0xa2c122be93b0074270ebee7f6b7292c7deb45047', resolverAddress: '0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41' }
|
|
145
145
|
*/
|
|
146
|
-
getName: ({ address }: GetNameParameters) => Promise<GetNameReturnType>;
|
|
146
|
+
getName: ({ address, allowMismatch, gatewayUrls, strict, }: GetNameParameters) => Promise<GetNameReturnType>;
|
|
147
147
|
/**
|
|
148
148
|
* Gets the owner(s) of a name.
|
|
149
149
|
* @param parameters - {@link GetOwnerParameters}
|
|
@@ -204,7 +204,7 @@ export type EnsPublicActions = {
|
|
|
204
204
|
* })
|
|
205
205
|
* // { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
|
|
206
206
|
*/
|
|
207
|
-
getRecords: ({ name,
|
|
207
|
+
getRecords: <const TTexts extends readonly string[] = readonly string[], const TCoins extends readonly (string | number)[] = readonly (string | number)[], const TContentHash extends boolean = true, const TAbi extends boolean = true>({ name, texts, coins, contentHash, abi, resolver, gatewayUrls, }: GetRecordsParameters<TTexts, TCoins, TContentHash, TAbi>) => Promise<GetRecordsReturnType<TTexts, TCoins, TContentHash, TAbi>>;
|
|
208
208
|
/**
|
|
209
209
|
* Gets the resolver address for a name.
|
|
210
210
|
* @param parameters - {@link GetResolverParameters}
|
|
@@ -240,7 +240,7 @@ export type EnsPublicActions = {
|
|
|
240
240
|
* const result = await client.getTextRecord({ name: 'ens.eth', key: 'com.twitter' })
|
|
241
241
|
* // ensdomains
|
|
242
242
|
*/
|
|
243
|
-
getTextRecord: ({ name, key, }: GetTextRecordParameters) => Promise<GetTextRecordReturnType>;
|
|
243
|
+
getTextRecord: ({ name, key, gatewayUrls, strict, }: GetTextRecordParameters) => Promise<GetTextRecordReturnType>;
|
|
244
244
|
/**
|
|
245
245
|
* Gets the wrapper data for a name.
|
|
246
246
|
* @param parameters - {@link GetWrapperDataParameters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../src/clients/decorators/public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAc,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAA;AACxC,OAAqB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAA;AAC/C,OAAyB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAChC,MAAM,4CAA4C,CAAA;AACnD,OAAqB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAA;AAC/C,OAA6B,EAC3B,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACpC,MAAM,gDAAgD,CAAA;AACvD,OAAkB,EAChB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAA;AAC5C,OAAgB,EACd,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,mCAAmC,CAAA;AAC1C,OAAiB,EACf,KAAK,kBAAkB,EACv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AAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,SAAS,CACzD,MAAM,GACN,MAAM,CACT,EAAE,EACH,KAAK,CAAC,YAAY,SAAS,OAAO,GAAG,IAAI,EACzC,KAAK,CAAC,IAAI,SAAS,OAAO,GAAG,IAAI,EACjC,EACA,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,GAAG,EACH,QAAQ,EACR,WAAW,GACZ,EAAE,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,KAAK,OAAO,CACrE,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,CACzD,CAAA;IACD;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,EAAE,CAAC,EACZ,IAAI,GACL,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC3D;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,EAAE,CAAC,EACd,IAAI,EACJ,GAAG,EACH,WAAW,EACX,MAAM,GACP,EAAE,uBAAuB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;IAC/D;;;;;;;;;;;;;;;OAeG;IACH,cAAc,EAAE,CAAC,EACf,IAAI,GACL,EAAE,wBAAwB,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAA;IACjE;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,EAAE,CAAC,EACf,IAAI,GACL,EAAE,wBAAwB,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAA;CAClE,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,sMAM1B,gBAgBD,CAAA"}
|
|
@@ -41,32 +41,58 @@ export declare const createEnsPublicClient: <TTransport extends Transport, TChai
|
|
|
41
41
|
type: string;
|
|
42
42
|
uid: string;
|
|
43
43
|
ensBatch: <TBatchFunctions extends import("../public.js").BatchParameters>(...parameters: TBatchFunctions) => Promise<import("../public.js").BatchReturnType<TBatchFunctions>>;
|
|
44
|
-
getAbiRecord: ({ name, }: {
|
|
44
|
+
getAbiRecord: ({ name, gatewayUrls, strict, }: {
|
|
45
45
|
name: string;
|
|
46
|
+
strict?: boolean | undefined;
|
|
47
|
+
gatewayUrls?: string[] | undefined;
|
|
46
48
|
}) => Promise<import("../public.js").GetAbiRecordReturnType>;
|
|
47
|
-
getAddressRecord: ({ name, coin, bypassFormat, }: {
|
|
49
|
+
getAddressRecord: ({ name, coin, bypassFormat, gatewayUrls, strict, }: {
|
|
48
50
|
name: string;
|
|
49
51
|
coin?: string | number | undefined;
|
|
50
52
|
bypassFormat?: boolean | undefined;
|
|
53
|
+
strict?: boolean | undefined;
|
|
54
|
+
gatewayUrls?: string[] | undefined;
|
|
51
55
|
}) => Promise<import("../public.js").GetAddressRecordReturnType>;
|
|
52
56
|
getAvailable: ({ name, }: import("../public.js").GetAvailableParameters) => Promise<boolean>;
|
|
53
|
-
getContentHashRecord: ({ name, }: {
|
|
57
|
+
getContentHashRecord: ({ name, gatewayUrls, strict, }: {
|
|
54
58
|
name: string;
|
|
59
|
+
strict?: boolean | undefined;
|
|
60
|
+
gatewayUrls?: string[] | undefined;
|
|
55
61
|
}) => Promise<import("../public.js").GetContentHashRecordReturnType>;
|
|
56
62
|
getExpiry: ({ name, contract, }: {
|
|
57
63
|
name: string;
|
|
58
64
|
contract?: ("registrar" | "nameWrapper") | undefined;
|
|
59
65
|
}) => Promise<import("../public.js").GetExpiryReturnType>;
|
|
60
|
-
getName: ({ address }: import("../public.js").GetNameParameters) => Promise<import("../public.js").GetNameReturnType>;
|
|
66
|
+
getName: ({ address, allowMismatch, gatewayUrls, strict, }: import("../public.js").GetNameParameters) => Promise<import("../public.js").GetNameReturnType>;
|
|
61
67
|
getOwner: ({ name, contract, }: import("../public.js").GetOwnerParameters) => Promise<import("../public.js").GetOwnerReturnType>;
|
|
62
68
|
getPrice: ({ nameOrNames, duration, }: import("../public.js").GetPriceParameters) => Promise<import("../public.js").GetPriceReturnType>;
|
|
63
|
-
getRecords: ({ name,
|
|
69
|
+
getRecords: <const TTexts extends readonly string[] = readonly string[], const TCoins extends readonly (string | number)[] = readonly (string | number)[], const TContentHash extends boolean = true, const TAbi extends boolean = true>({ name, texts, coins, contentHash, abi, resolver, gatewayUrls, }: import("../public.js").GetRecordsParameters<TTexts, TCoins, TContentHash, TAbi>) => Promise<(TContentHash extends true ? {
|
|
70
|
+
contentHash: import("../public.js").InternalGetContentHashReturnType;
|
|
71
|
+
} : {}) & (TAbi extends true ? {
|
|
72
|
+
abi: import("../public.js").InternalGetAbiReturnType;
|
|
73
|
+
} : {}) & (TTexts extends readonly [string, ...string[]] ? {
|
|
74
|
+
texts: import("../types.js").DecodedText[];
|
|
75
|
+
} : {}) & (TCoins extends readonly [string | number, ...(string | number)[]] ? {
|
|
76
|
+
coins: import("../types.js").DecodedAddr[];
|
|
77
|
+
} : {}) & {
|
|
64
78
|
resolverAddress: `0x${string}`;
|
|
65
|
-
}
|
|
79
|
+
} extends infer T ? { [K in keyof T]: ((TContentHash extends true ? {
|
|
80
|
+
contentHash: import("../public.js").InternalGetContentHashReturnType;
|
|
81
|
+
} : {}) & (TAbi extends true ? {
|
|
82
|
+
abi: import("../public.js").InternalGetAbiReturnType;
|
|
83
|
+
} : {}) & (TTexts extends readonly [string, ...string[]] ? {
|
|
84
|
+
texts: import("../types.js").DecodedText[];
|
|
85
|
+
} : {}) & (TCoins extends readonly [string | number, ...(string | number)[]] ? {
|
|
86
|
+
coins: import("../types.js").DecodedAddr[];
|
|
87
|
+
} : {}) & {
|
|
88
|
+
resolverAddress: `0x${string}`;
|
|
89
|
+
})[K]; } : never>;
|
|
66
90
|
getResolver: ({ name, }: import("../public.js").GetResolverParameters) => Promise<import("../public.js").GetResolverReturnType>;
|
|
67
|
-
getTextRecord: ({ name, key, }: {
|
|
91
|
+
getTextRecord: ({ name, key, gatewayUrls, strict, }: {
|
|
68
92
|
name: string;
|
|
69
93
|
key: string;
|
|
94
|
+
strict?: boolean | undefined;
|
|
95
|
+
gatewayUrls?: string[] | undefined;
|
|
70
96
|
}) => Promise<import("../public.js").GetTextRecordReturnType>;
|
|
71
97
|
getWrapperData: ({ name, }: import("../public.js").GetWrapperDataParameters) => Promise<import("../public.js").GetWrapperDataReturnType>;
|
|
72
98
|
getWrapperName: ({ name, }: import("../functions/public/getWrapperName.js").GetWrapperNameParameters) => Promise<import("../functions/public/getWrapperName.js").GetWrapperNameReturnType>;
|
|
@@ -89,6 +115,6 @@ export declare const createEnsPublicClient: <TTransport extends Transport, TChai
|
|
|
89
115
|
transport?: undefined;
|
|
90
116
|
type?: undefined;
|
|
91
117
|
uid?: undefined;
|
|
92
|
-
}>(fn: (client: Client<TTransport, ChainWithEns<TChain>, undefined, PublicRpcSchema, EnsPublicActions & EnsSubgraphActions>) => client) => Client<TTransport, ChainWithEns<TChain>, undefined, PublicRpcSchema, { [
|
|
118
|
+
}>(fn: (client: Client<TTransport, ChainWithEns<TChain>, undefined, PublicRpcSchema, EnsPublicActions & EnsSubgraphActions>) => client) => Client<TTransport, ChainWithEns<TChain>, undefined, PublicRpcSchema, { [K_1 in keyof client]: client[K_1]; } & EnsPublicActions & EnsSubgraphActions>;
|
|
93
119
|
};
|
|
94
120
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/clients/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAA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AAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,eAAe,CACzB,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,YAAY,GAAG,YAAY,IACxC,QAAQ,CACV,MAAM,CACJ,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,gBAAgB,GAAG,kBAAkB,CACtC,CACF,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBjC,CAAA"}
|
|
@@ -37,7 +37,7 @@ export declare const addresses: {
|
|
|
37
37
|
readonly address: "0x21745FF62108968fBf5aB1E07961CC0FCBeB2364";
|
|
38
38
|
};
|
|
39
39
|
readonly ensUniversalResolver: {
|
|
40
|
-
readonly address: "
|
|
40
|
+
readonly address: "0x8cab227b1162f03b8338331adaad7aadc83b895e";
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
readonly goerli: {
|
|
@@ -69,7 +69,7 @@ export declare const addresses: {
|
|
|
69
69
|
readonly address: "0xF427c4AdED8B6dfde604865c1a7E953B160C26f0";
|
|
70
70
|
};
|
|
71
71
|
readonly ensUniversalResolver: {
|
|
72
|
-
readonly address: "
|
|
72
|
+
readonly address: "0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1";
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
readonly sepolia: {
|
|
@@ -101,7 +101,7 @@ export declare const addresses: {
|
|
|
101
101
|
readonly address: "0x7b3ada1c8f012bae747cf99d6cbbf70d040b84cf";
|
|
102
102
|
};
|
|
103
103
|
readonly ensUniversalResolver: {
|
|
104
|
-
readonly address: "
|
|
104
|
+
readonly address: "0xBaBC7678D7A63104f1658c11D6AE9A21cdA09725";
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
};
|
|
@@ -86,6 +86,30 @@ export declare const universalResolverReverseSnippet: readonly [{
|
|
|
86
86
|
}];
|
|
87
87
|
readonly stateMutability: "view";
|
|
88
88
|
readonly type: "function";
|
|
89
|
+
}, {
|
|
90
|
+
readonly inputs: readonly [{
|
|
91
|
+
readonly name: "reverseName";
|
|
92
|
+
readonly type: "bytes";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "gateways";
|
|
95
|
+
readonly type: "string[]";
|
|
96
|
+
}];
|
|
97
|
+
readonly name: "reverse";
|
|
98
|
+
readonly outputs: readonly [{
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly name: "resolvedName";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
readonly name: "resolvedAddress";
|
|
104
|
+
}, {
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
readonly name: "reverseResolver";
|
|
107
|
+
}, {
|
|
108
|
+
readonly type: "address";
|
|
109
|
+
readonly name: "resolver";
|
|
110
|
+
}];
|
|
111
|
+
readonly stateMutability: "view";
|
|
112
|
+
readonly type: "function";
|
|
89
113
|
}];
|
|
90
114
|
export declare const universalResolverResolveSnippet: readonly [{
|
|
91
115
|
readonly inputs: readonly [];
|
|
@@ -138,6 +162,27 @@ export declare const universalResolverResolveSnippet: readonly [{
|
|
|
138
162
|
}];
|
|
139
163
|
readonly stateMutability: "view";
|
|
140
164
|
readonly type: "function";
|
|
165
|
+
}, {
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly name: "name";
|
|
168
|
+
readonly type: "bytes";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "data";
|
|
171
|
+
readonly type: "bytes";
|
|
172
|
+
}, {
|
|
173
|
+
readonly name: "gateways";
|
|
174
|
+
readonly type: "string[]";
|
|
175
|
+
}];
|
|
176
|
+
readonly name: "resolve";
|
|
177
|
+
readonly outputs: readonly [{
|
|
178
|
+
readonly name: "data";
|
|
179
|
+
readonly type: "bytes";
|
|
180
|
+
}, {
|
|
181
|
+
readonly name: "resolver";
|
|
182
|
+
readonly type: "address";
|
|
183
|
+
}];
|
|
184
|
+
readonly stateMutability: "view";
|
|
185
|
+
readonly type: "function";
|
|
141
186
|
}];
|
|
142
187
|
export declare const universalResolverResolveArraySnippet: readonly [{
|
|
143
188
|
readonly inputs: readonly [];
|
|
@@ -197,6 +242,34 @@ export declare const universalResolverResolveArraySnippet: readonly [{
|
|
|
197
242
|
}];
|
|
198
243
|
readonly stateMutability: "view";
|
|
199
244
|
readonly type: "function";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly name: "name";
|
|
248
|
+
readonly type: "bytes";
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "data";
|
|
251
|
+
readonly type: "bytes[]";
|
|
252
|
+
}, {
|
|
253
|
+
readonly name: "gateways";
|
|
254
|
+
readonly type: "string[]";
|
|
255
|
+
}];
|
|
256
|
+
readonly name: "resolve";
|
|
257
|
+
readonly outputs: readonly [{
|
|
258
|
+
readonly components: readonly [{
|
|
259
|
+
readonly name: "success";
|
|
260
|
+
readonly type: "bool";
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "returnData";
|
|
263
|
+
readonly type: "bytes";
|
|
264
|
+
}];
|
|
265
|
+
readonly name: "";
|
|
266
|
+
readonly type: "tuple[]";
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "";
|
|
269
|
+
readonly type: "address";
|
|
270
|
+
}];
|
|
271
|
+
readonly stateMutability: "view";
|
|
272
|
+
readonly type: "function";
|
|
200
273
|
}];
|
|
201
274
|
export declare const universalResolverFindResolverSnippet: readonly [{
|
|
202
275
|
readonly inputs: readonly [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universalResolver.d.ts","sourceRoot":"","sources":["../../../src/contracts/universalResolver.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C1B,CAAA;
|
|
1
|
+
{"version":3,"file":"universalResolver.d.ts","sourceRoot":"","sources":["../../../src/contracts/universalResolver.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C1B,CAAA;AAoBV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAalC,CAAA;AA4BV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAalC,CAAA;AAsCV,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavC,CAAA;AAEV,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBvC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v3.
|
|
1
|
+
export declare const version = "v3.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -4,8 +4,10 @@ import type { DecodedAbi, Prettify, SimpleTransactionRequest } from '../../types
|
|
|
4
4
|
export type InternalGetAbiParameters = {
|
|
5
5
|
/** Name to get ABI record for */
|
|
6
6
|
name: string;
|
|
7
|
+
/** Whether or not to throw decoding errors */
|
|
8
|
+
strict?: boolean;
|
|
7
9
|
};
|
|
8
10
|
export type InternalGetAbiReturnType = Prettify<DecodedAbi | null>;
|
|
9
|
-
declare const _getAbi: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name }: InternalGetAbiParameters) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex) => Promise<InternalGetAbiReturnType>>;
|
|
11
|
+
declare const _getAbi: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name }: Omit<InternalGetAbiParameters, 'strict'>) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex, { strict }: Pick<InternalGetAbiParameters, 'strict'>) => Promise<InternalGetAbiReturnType>>;
|
|
10
12
|
export default _getAbi;
|
|
11
13
|
//# sourceMappingURL=_getAbi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_getAbi.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getAbi.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AAKvB,MAAM,MAAM,wBAAwB,GAAG;IACrC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"_getAbi.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getAbi.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AAKvB,MAAM,MAAM,wBAAwB,GAAG;IACrC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;AA+FlE,QAAA,MAAM,OAAO,wEArFF,aAAa,YACZ,KAAK,wBAAwB,EAAE,QAAQ,CAAC,KACjD,wBAAwB,YAYhB,aAAa,QAChB,GAAG,cACG,KAAK,wBAAwB,EAAE,QAAQ,CAAC,KACnD,QAAQ,wBAAwB,CAAC,CAoEgB,CAAA;AAEpD,eAAe,OAAO,CAAA"}
|
|
@@ -8,8 +8,10 @@ export type InternalGetAddrParameters = {
|
|
|
8
8
|
coin?: string | number;
|
|
9
9
|
/** Optionally return raw bytes value of address record (default: false) */
|
|
10
10
|
bypassFormat?: boolean;
|
|
11
|
+
/** Whether or not to throw decoding errors */
|
|
12
|
+
strict?: boolean;
|
|
11
13
|
};
|
|
12
14
|
export type InternalGetAddrReturnType = Prettify<DecodedAddr | null>;
|
|
13
|
-
declare const _getAddr: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name, coin, bypassFormat }: InternalGetAddrParameters) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex, { coin }: InternalGetAddrParameters) => Promise<InternalGetAddrReturnType>>;
|
|
15
|
+
declare const _getAddr: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name, coin, bypassFormat }: Omit<InternalGetAddrParameters, 'strict'>) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex, { coin, strict }: Pick<InternalGetAddrParameters, 'coin' | 'strict'>) => Promise<InternalGetAddrReturnType>>;
|
|
14
16
|
export default _getAddr;
|
|
15
17
|
//# sourceMappingURL=_getAddr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_getAddr.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getAddr.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAK9D,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AAKvB,MAAM,MAAM,yBAAyB,GAAG;IACtC,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"_getAddr.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getAddr.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAK9D,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AAKvB,MAAM,MAAM,yBAAyB,GAAG;IACtC,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;AAoFpE,QAAA,MAAM,QAAQ,wEAjFH,aAAa,gCACa,KAAK,yBAAyB,EAAE,QAAQ,CAAC,KAC3E,wBAAwB,YAmChB,aAAa,QAChB,GAAG,oBACc,KAAK,yBAAyB,EAAE,MAAM,GAAG,QAAQ,CAAC,KACxE,QAAQ,yBAAyB,CAAC,CAyCgB,CAAA;AAErD,eAAe,QAAQ,CAAA"}
|
|
@@ -5,8 +5,10 @@ import { type DecodedContentHash } from '../../utils/contentHash.js';
|
|
|
5
5
|
export type InternalGetContentHashParameters = {
|
|
6
6
|
/** Name to get content hash record for */
|
|
7
7
|
name: string;
|
|
8
|
+
/** Whether or not to throw decoding errors */
|
|
9
|
+
strict?: boolean;
|
|
8
10
|
};
|
|
9
11
|
export type InternalGetContentHashReturnType = Prettify<DecodedContentHash | null>;
|
|
10
|
-
declare const _getContentHash: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name }: InternalGetContentHashParameters) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex) => Promise<InternalGetContentHashReturnType>>;
|
|
12
|
+
declare const _getContentHash: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name }: Omit<InternalGetContentHashParameters, 'strict'>) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex, { strict }: Pick<InternalGetContentHashParameters, 'strict'>) => Promise<InternalGetContentHashReturnType>>;
|
|
11
13
|
export default _getContentHash;
|
|
12
14
|
//# sourceMappingURL=_getContentHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_getContentHash.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getContentHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAExE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAA;AAInC,MAAM,MAAM,gCAAgC,GAAG;IAC7C,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"_getContentHash.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getContentHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAExE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAA;AAInC,MAAM,MAAM,gCAAgC,GAAG;IAC7C,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAC1C,QAAQ,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAA;AAqCrC,QAAA,MAAM,eAAe,wEAlCV,aAAa,YACZ,KAAK,gCAAgC,EAAE,QAAQ,CAAC,KACzD,wBAAwB,YAYhB,aAAa,QAChB,GAAG,cACG,KAAK,gCAAgC,EAAE,QAAQ,CAAC,KAC3D,QAAQ,gCAAgC,CAAC,CAiBgB,CAAA;AAE5D,eAAe,eAAe,CAAA"}
|
|
@@ -6,8 +6,10 @@ export type InternalGetTextParameters = {
|
|
|
6
6
|
name: string;
|
|
7
7
|
/** Text record key to get */
|
|
8
8
|
key: string;
|
|
9
|
+
/** Whether or not to throw decoding errors */
|
|
10
|
+
strict?: boolean;
|
|
9
11
|
};
|
|
10
12
|
export type InternalGetTextReturnType = string | null;
|
|
11
|
-
declare const _getText: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name, key }: InternalGetTextParameters) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex) => Promise<InternalGetTextReturnType>>;
|
|
13
|
+
declare const _getText: import("../../utils/generateFunction.js").GeneratedFunction<(_client: ClientWithEns, { name, key }: Omit<InternalGetTextParameters, 'strict'>) => SimpleTransactionRequest, (_client: ClientWithEns, data: Hex, { strict }: Pick<InternalGetTextParameters, 'strict'>) => Promise<InternalGetTextReturnType>>;
|
|
12
14
|
export default _getText;
|
|
13
15
|
//# sourceMappingURL=_getText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_getText.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getText.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAK9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"_getText.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/_getText.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAK9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,IAAI,CAAA;AAuCrD,QAAA,MAAM,QAAQ,wEApCH,aAAa,iBACP,KAAK,yBAAyB,EAAE,QAAQ,CAAC,KACvD,wBAAwB,YAYhB,aAAa,QAChB,GAAG,cACG,KAAK,yBAAyB,EAAE,QAAQ,CAAC,KACpD,QAAQ,yBAAyB,CAAC,CAmBgB,CAAA;AAErD,eAAe,QAAQ,CAAA"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import type { Hex } from 'viem';
|
|
1
|
+
import type { BaseError, Hex } from 'viem';
|
|
2
2
|
import type { ClientWithEns } from '../../contracts/consts.js';
|
|
3
3
|
import type { GenericPassthrough, Prettify, SimpleTransactionRequest } from '../../types.js';
|
|
4
4
|
import { type GeneratedFunction } from '../../utils/generateFunction.js';
|
|
5
5
|
import { type InternalGetAbiParameters, type InternalGetAbiReturnType } from './_getAbi.js';
|
|
6
|
-
export type GetAbiRecordParameters = Prettify<InternalGetAbiParameters
|
|
6
|
+
export type GetAbiRecordParameters = Prettify<InternalGetAbiParameters & {
|
|
7
|
+
/** Batch gateway URLs to use for resolving CCIP-read requests. */
|
|
8
|
+
gatewayUrls?: string[];
|
|
9
|
+
}>;
|
|
7
10
|
export type GetAbiRecordReturnType = Prettify<InternalGetAbiReturnType>;
|
|
8
|
-
declare const encode: (client: ClientWithEns, { name }: GetAbiRecordParameters) => SimpleTransactionRequest;
|
|
9
|
-
declare const decode: (client: ClientWithEns, data: Hex, passthrough: GenericPassthrough) => Promise<GetAbiRecordReturnType>;
|
|
11
|
+
declare const encode: (client: ClientWithEns, { name, gatewayUrls }: Omit<GetAbiRecordParameters, 'strict'>) => SimpleTransactionRequest;
|
|
12
|
+
declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { strict }: Pick<GetAbiRecordParameters, 'strict'>) => Promise<GetAbiRecordReturnType>;
|
|
10
13
|
type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
11
14
|
/**
|
|
12
15
|
* Gets the ABI record for a name
|
|
@@ -27,6 +30,6 @@ type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
|
27
30
|
* const result = await getAbiRecord(client, { name: 'ens.eth' })
|
|
28
31
|
* // TODO: real example
|
|
29
32
|
*/
|
|
30
|
-
declare const getAbiRecord: ((client: ClientWithEns, { name }: GetAbiRecordParameters) => Promise<GetAbiRecordReturnType>) & BatchableFunctionObject;
|
|
33
|
+
declare const getAbiRecord: ((client: ClientWithEns, { name, strict }: GetAbiRecordParameters) => Promise<GetAbiRecordReturnType>) & BatchableFunctionObject;
|
|
31
34
|
export default getAbiRecord;
|
|
32
35
|
//# sourceMappingURL=getAbiRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAbiRecord.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getAbiRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"getAbiRecord.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getAbiRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,QAAQ,EACR,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAA;AACxC,OAAgB,EACd,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAA;AAGrB,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAC3C,wBAAwB,GAAG;IACzB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CACF,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,wBAAwB,CAAC,CAAA;AAEvE,QAAA,MAAM,MAAM,WACF,aAAa,yBACE,KAAK,sBAAsB,EAAE,QAAQ,CAAC,KAC5D,wBAOF,CAAA;AAED,QAAA,MAAM,MAAM,WACF,aAAa,QACf,GAAG,GAAG,SAAS,eACR,kBAAkB,cACnB,KAAK,sBAAsB,EAAE,QAAQ,CAAC,KACjD,QAAQ,sBAAsB,CAMhC,CAAA;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,YAAY,YACR,aAAa,oBACH,sBAAsB,KACrC,QAAQ,sBAAsB,CAAC,2BACX,CAAA;AAEzB,eAAe,YAAY,CAAA"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import type { Hex } from 'viem';
|
|
1
|
+
import type { BaseError, Hex } from 'viem';
|
|
2
2
|
import type { ClientWithEns } from '../../contracts/consts.js';
|
|
3
3
|
import type { GenericPassthrough, Prettify, SimpleTransactionRequest } from '../../types.js';
|
|
4
4
|
import { type GeneratedFunction } from '../../utils/generateFunction.js';
|
|
5
5
|
import { type InternalGetAddrParameters, type InternalGetAddrReturnType } from './_getAddr.js';
|
|
6
|
-
export type GetAddressRecordParameters = Prettify<InternalGetAddrParameters
|
|
6
|
+
export type GetAddressRecordParameters = Prettify<InternalGetAddrParameters & {
|
|
7
|
+
/** Batch gateway URLs to use for resolving CCIP-read requests. */
|
|
8
|
+
gatewayUrls?: string[];
|
|
9
|
+
}>;
|
|
7
10
|
export type GetAddressRecordReturnType = Prettify<InternalGetAddrReturnType>;
|
|
8
|
-
declare const encode: (client: ClientWithEns, { name, coin }: GetAddressRecordParameters) => SimpleTransactionRequest;
|
|
9
|
-
declare const decode: (client: ClientWithEns, data: Hex, passthrough: GenericPassthrough,
|
|
11
|
+
declare const encode: (client: ClientWithEns, { name, coin, gatewayUrls, }: Omit<GetAddressRecordParameters, 'strict' | 'bypassFormat'>) => SimpleTransactionRequest;
|
|
12
|
+
declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { coin, strict }: Pick<GetAddressRecordParameters, 'coin' | 'strict'>) => Promise<GetAddressRecordReturnType>;
|
|
10
13
|
type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
11
14
|
/**
|
|
12
15
|
* Gets an address record for a name and specified coin
|
|
@@ -27,6 +30,6 @@ type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
|
27
30
|
* const result = await getAddressRecord(client, { name: 'ens.eth', coin: 'ETH' })
|
|
28
31
|
* // { id: 60, name: 'ETH , value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }
|
|
29
32
|
*/
|
|
30
|
-
declare const getAddressRecord: ((client: ClientWithEns, { name, coin, bypassFormat }: GetAddressRecordParameters) => Promise<GetAddressRecordReturnType>) & BatchableFunctionObject;
|
|
33
|
+
declare const getAddressRecord: ((client: ClientWithEns, { name, coin, bypassFormat, strict }: GetAddressRecordParameters) => Promise<GetAddressRecordReturnType>) & BatchableFunctionObject;
|
|
31
34
|
export default getAddressRecord;
|
|
32
35
|
//# sourceMappingURL=getAddressRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAddressRecord.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getAddressRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"getAddressRecord.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getAddressRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,QAAQ,EACR,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAA;AACxC,OAAiB,EACf,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAA;AAGtB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAC/C,yBAAyB,GAAG;IAC1B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CACF,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC,yBAAyB,CAAC,CAAA;AAE5E,QAAA,MAAM,MAAM,WACF,aAAa,gCAKlB,KAAK,0BAA0B,EAAE,QAAQ,GAAG,cAAc,CAAC,KAC7D,wBAOF,CAAA;AAED,QAAA,MAAM,MAAM,WACF,aAAa,QACf,GAAG,GAAG,SAAS,eACR,kBAAkB,oBACb,KAAK,0BAA0B,EAAE,MAAM,GAAG,QAAQ,CAAC,KACpE,QAAQ,0BAA0B,CAMpC,CAAA;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,gBAAgB,YACZ,aAAa,wCACiB,0BAA0B,KAC7D,QAAQ,0BAA0B,CAAC,2BACf,CAAA;AAEzB,eAAe,gBAAgB,CAAA"}
|
|
@@ -3,10 +3,13 @@ import type { ClientWithEns } from '../../contracts/consts.js';
|
|
|
3
3
|
import type { GenericPassthrough, Prettify, TransactionRequestWithPassthrough } from '../../types.js';
|
|
4
4
|
import { type GeneratedFunction } from '../../utils/generateFunction.js';
|
|
5
5
|
import { type InternalGetContentHashParameters, type InternalGetContentHashReturnType } from './_getContentHash.js';
|
|
6
|
-
export type GetContentHashRecordParameters = Prettify<InternalGetContentHashParameters
|
|
6
|
+
export type GetContentHashRecordParameters = Prettify<InternalGetContentHashParameters & {
|
|
7
|
+
/** Batch gateway URLs to use for resolving CCIP-read requests. */
|
|
8
|
+
gatewayUrls?: string[];
|
|
9
|
+
}>;
|
|
7
10
|
export type GetContentHashRecordReturnType = Prettify<InternalGetContentHashReturnType>;
|
|
8
|
-
declare const encode: (client: ClientWithEns, { name }: GetContentHashRecordParameters) => TransactionRequestWithPassthrough;
|
|
9
|
-
declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough) => Promise<GetContentHashRecordReturnType>;
|
|
11
|
+
declare const encode: (client: ClientWithEns, { name, gatewayUrls }: Omit<GetContentHashRecordParameters, 'strict'>) => TransactionRequestWithPassthrough;
|
|
12
|
+
declare const decode: (client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { strict }: Pick<GetContentHashRecordParameters, 'strict'>) => Promise<GetContentHashRecordReturnType>;
|
|
10
13
|
type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
11
14
|
/**
|
|
12
15
|
* Gets the content hash record for a name
|
|
@@ -27,6 +30,6 @@ type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
|
27
30
|
* const result = await getContentHashRecord(client, { name: 'ens.eth' })
|
|
28
31
|
* // { protocolType: 'ipfs', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' }
|
|
29
32
|
*/
|
|
30
|
-
declare const getContentHashRecord: ((client: ClientWithEns, { name }: GetContentHashRecordParameters) => Promise<GetContentHashRecordReturnType>) & BatchableFunctionObject;
|
|
33
|
+
declare const getContentHashRecord: ((client: ClientWithEns, { name, strict }: GetContentHashRecordParameters) => Promise<GetContentHashRecordReturnType>) & BatchableFunctionObject;
|
|
31
34
|
export default getContentHashRecord;
|
|
32
35
|
//# sourceMappingURL=getContentHashRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContentHashRecord.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getContentHashRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,QAAQ,EACR,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAA;AACxC,OAAwB,EACtB,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACtC,MAAM,sBAAsB,CAAA;AAG7B,MAAM,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"getContentHashRecord.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getContentHashRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,QAAQ,EACR,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAA;AACxC,OAAwB,EACtB,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACtC,MAAM,sBAAsB,CAAA;AAG7B,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CACnD,gCAAgC,GAAG;IACjC,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CACF,CAAA;AAED,MAAM,MAAM,8BAA8B,GACxC,QAAQ,CAAC,gCAAgC,CAAC,CAAA;AAE5C,QAAA,MAAM,MAAM,WACF,aAAa,yBACE,KAAK,8BAA8B,EAAE,QAAQ,CAAC,KACpE,iCAOF,CAAA;AAED,QAAA,MAAM,MAAM,WACF,aAAa,QACf,GAAG,GAAG,SAAS,eACR,kBAAkB,cACnB,KAAK,8BAA8B,EAAE,QAAQ,CAAC,KACzD,QAAQ,8BAA8B,CAMxC,CAAA;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,oBAAoB,YAChB,aAAa,oBACH,8BAA8B,KAC7C,QAAQ,8BAA8B,CAAC,2BACnB,CAAA;AAEzB,eAAe,oBAAoB,CAAA"}
|
|
@@ -5,6 +5,12 @@ import { type GeneratedFunction } from '../../utils/generateFunction.js';
|
|
|
5
5
|
export type GetNameParameters = {
|
|
6
6
|
/** Address to get name for */
|
|
7
7
|
address: Address;
|
|
8
|
+
/** Whether or not to allow mismatched forward resolution */
|
|
9
|
+
allowMismatch?: boolean;
|
|
10
|
+
/** Whether or not to throw decoding errors */
|
|
11
|
+
strict?: boolean;
|
|
12
|
+
/** Batch gateway URLs to use for resolving CCIP-read requests. */
|
|
13
|
+
gatewayUrls?: string[];
|
|
8
14
|
};
|
|
9
15
|
export type GetNameReturnType = {
|
|
10
16
|
/** Primary name for address */
|
|
@@ -16,8 +22,8 @@ export type GetNameReturnType = {
|
|
|
16
22
|
/** Resolver address for resolved name */
|
|
17
23
|
resolverAddress: Address;
|
|
18
24
|
};
|
|
19
|
-
declare const encode: (client: ClientWithEns, { address }: GetNameParameters) => TransactionRequestWithPassthrough;
|
|
20
|
-
declare const decode: (_client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { address }: GetNameParameters) => Promise<GetNameReturnType | null>;
|
|
25
|
+
declare const encode: (client: ClientWithEns, { address, gatewayUrls }: Omit<GetNameParameters, 'allowMismatch' | 'strict'>) => TransactionRequestWithPassthrough;
|
|
26
|
+
declare const decode: (_client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, { address, allowMismatch, strict }: GetNameParameters) => Promise<GetNameReturnType | null>;
|
|
21
27
|
type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
22
28
|
/**
|
|
23
29
|
* Gets the primary name for an address
|
|
@@ -38,6 +44,6 @@ type BatchableFunctionObject = GeneratedFunction<typeof encode, typeof decode>;
|
|
|
38
44
|
* const result = await getName(client, { address: '0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5' })
|
|
39
45
|
* // { name: 'nick.eth', match: true, reverseResolverAddress: '0xa2c122be93b0074270ebee7f6b7292c7deb45047', resolverAddress: '0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41' }
|
|
40
46
|
*/
|
|
41
|
-
declare const getName: ((client: ClientWithEns, { address }: GetNameParameters) => Promise<GetNameReturnType>) & BatchableFunctionObject;
|
|
47
|
+
declare const getName: ((client: ClientWithEns, { address, allowMismatch, strict }: GetNameParameters) => Promise<GetNameReturnType>) & BatchableFunctionObject;
|
|
42
48
|
export default getName;
|
|
43
49
|
//# sourceMappingURL=getName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getName.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getName.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"getName.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getName.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIT,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,OAAO,KAAK,EACV,kBAAkB,EAClB,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAA;AAGxC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,KAAK,EAAE,OAAO,CAAA;IACd,wCAAwC;IACxC,sBAAsB,EAAE,OAAO,CAAA;IAC/B,yCAAyC;IACzC,eAAe,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,QAAA,MAAM,MAAM,WACF,aAAa,4BACK,KAAK,iBAAiB,EAAE,eAAe,GAAG,QAAQ,CAAC,KAC5E,iCAkCF,CAAA;AAED,QAAA,MAAM,MAAM,YACD,aAAa,QAChB,GAAG,GAAG,SAAS,eACR,kBAAkB,sCACK,iBAAiB,KACpD,QAAQ,iBAAiB,GAAG,IAAI,CA6BlC,CAAA;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;AAE9E;;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