viem 3.0.0-next.0 → 3.0.0-next.2
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/core/Client.d.ts +235 -1
- package/dist/core/Client.d.ts.map +1 -1
- package/dist/core/Client.js +141 -0
- package/dist/core/Client.js.map +1 -1
- package/dist/core/actions/decorators/public.d.ts +52 -48
- package/dist/core/actions/decorators/public.d.ts.map +1 -1
- package/dist/core/actions/decorators/public.js +8 -4
- package/dist/core/actions/decorators/public.js.map +1 -1
- package/dist/core/actions/decorators/wallet.d.ts +25 -23
- package/dist/core/actions/decorators/wallet.d.ts.map +1 -1
- package/dist/core/actions/decorators/wallet.js +4 -2
- package/dist/core/actions/decorators/wallet.js.map +1 -1
- package/dist/core/actions/index.d.ts +2 -3
- package/dist/core/actions/index.d.ts.map +1 -1
- package/dist/core/actions/index.js +2 -3
- package/dist/core/actions/index.js.map +1 -1
- package/dist/core/actions/siwe/index.d.ts +2 -0
- package/dist/core/actions/siwe/index.d.ts.map +1 -0
- package/dist/core/actions/siwe/index.js +2 -0
- package/dist/core/actions/siwe/index.js.map +1 -0
- package/dist/core/actions/{verifySiweMessage.d.ts → siwe/verify.d.ts} +6 -6
- package/dist/core/actions/siwe/verify.d.ts.map +1 -0
- package/dist/core/actions/{verifySiweMessage.js → siwe/verify.js} +4 -4
- package/dist/core/actions/siwe/verify.js.map +1 -0
- package/dist/core/actions/typedData/index.d.ts +3 -0
- package/dist/core/actions/typedData/index.d.ts.map +1 -0
- package/dist/core/actions/typedData/index.js +3 -0
- package/dist/core/actions/typedData/index.js.map +1 -0
- package/dist/core/actions/{signTypedData.d.ts → typedData/sign.d.ts} +6 -6
- package/dist/core/actions/typedData/sign.d.ts.map +1 -0
- package/dist/core/actions/{signTypedData.js → typedData/sign.js} +4 -4
- package/dist/core/actions/typedData/sign.js.map +1 -0
- package/dist/core/actions/{verifyTypedData.d.ts → typedData/verify.d.ts} +6 -6
- package/dist/core/actions/typedData/verify.d.ts.map +1 -0
- package/dist/core/actions/{verifyTypedData.js → typedData/verify.js} +4 -4
- package/dist/core/actions/typedData/verify.js.map +1 -0
- package/dist/erc4337/internal/erc7739.js +1 -1
- package/dist/erc4337/internal/erc7739.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/core/Client.ts +444 -1
- package/src/core/actions/decorators/public.ts +64 -57
- package/src/core/actions/decorators/wallet.ts +34 -29
- package/src/core/actions/index.ts +2 -3
- package/src/core/actions/siwe/index.ts +1 -0
- package/src/core/actions/{verifySiweMessage.ts → siwe/verify.ts} +7 -7
- package/src/core/actions/typedData/index.ts +2 -0
- package/src/core/actions/{signTypedData.ts → typedData/sign.ts} +8 -8
- package/src/core/actions/{verifyTypedData.ts → typedData/verify.ts} +8 -8
- package/src/erc4337/internal/erc7739.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/core/actions/signTypedData.d.ts.map +0 -1
- package/dist/core/actions/signTypedData.js.map +0 -1
- package/dist/core/actions/verifySiweMessage.d.ts.map +0 -1
- package/dist/core/actions/verifySiweMessage.js.map +0 -1
- package/dist/core/actions/verifyTypedData.d.ts.map +0 -1
- package/dist/core/actions/verifyTypedData.js.map +0 -1
|
@@ -20,12 +20,12 @@ import * as filter from '../filter/index.js'
|
|
|
20
20
|
import * as event from '../event/index.js'
|
|
21
21
|
import * as fee from '../fee/index.js'
|
|
22
22
|
import { multicall } from '../multicall.js'
|
|
23
|
+
import * as siwe from '../siwe/index.js'
|
|
23
24
|
import * as token from '../token/index.js'
|
|
24
25
|
import * as transaction from '../transaction/index.js'
|
|
26
|
+
import * as typedData from '../typedData/index.js'
|
|
25
27
|
import { verifyHash } from '../verifyHash.js'
|
|
26
28
|
import { verifyMessage } from '../verifyMessage.js'
|
|
27
|
-
import { verifySiweMessage } from '../verifySiweMessage.js'
|
|
28
|
-
import { verifyTypedData } from '../verifyTypedData.js'
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Bag of public actions bound to a {@link Client}. Pass to `Client.create`'s
|
|
@@ -111,6 +111,9 @@ export function publicActions() {
|
|
|
111
111
|
getHistory: (options) => fee.getHistory(client, options),
|
|
112
112
|
},
|
|
113
113
|
multicall: (options) => multicall(client, options),
|
|
114
|
+
siwe: {
|
|
115
|
+
verify: (options) => siwe.verify(client, options),
|
|
116
|
+
},
|
|
114
117
|
token: {
|
|
115
118
|
getAllowance: Object.assign(
|
|
116
119
|
(options: never) => token.getAllowance(client, options),
|
|
@@ -141,10 +144,11 @@ export function publicActions() {
|
|
|
141
144
|
waitForReceipt: (options) => transaction.waitForReceipt(client, options),
|
|
142
145
|
watchPending: (options) => transaction.watchPending(client, options),
|
|
143
146
|
},
|
|
147
|
+
typedData: {
|
|
148
|
+
verify: (options) => typedData.verify(client, options),
|
|
149
|
+
},
|
|
144
150
|
verifyHash: (options) => verifyHash(client, options),
|
|
145
151
|
verifyMessage: (options) => verifyMessage(client, options),
|
|
146
|
-
verifySiweMessage: (options) => verifySiweMessage(client, options),
|
|
147
|
-
verifyTypedData: (options) => verifyTypedData(client, options),
|
|
148
152
|
})
|
|
149
153
|
}
|
|
150
154
|
|
|
@@ -1565,58 +1569,61 @@ export declare namespace publicActions {
|
|
|
1565
1569
|
verifyMessage: (
|
|
1566
1570
|
options: verifyMessage.Options,
|
|
1567
1571
|
) => Promise<verifyMessage.ReturnType>
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
options:
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1572
|
+
siwe: {
|
|
1573
|
+
/**
|
|
1574
|
+
* Verifies that an EIP-4361 formatted message was signed, supporting
|
|
1575
|
+
* Smart Contract Accounts (ERC-1271/6492/8010) and Externally Owned
|
|
1576
|
+
* Accounts.
|
|
1577
|
+
*
|
|
1578
|
+
* @example
|
|
1579
|
+
* ```ts
|
|
1580
|
+
* import { Client, http, publicActions } from 'viem'
|
|
1581
|
+
* import { mainnet } from 'viem/chains'
|
|
1582
|
+
*
|
|
1583
|
+
* const client = Client.create({
|
|
1584
|
+
* chain: mainnet,
|
|
1585
|
+
* transport: http(),
|
|
1586
|
+
* }).extend(publicActions())
|
|
1587
|
+
* const valid = await client.siwe.verify({
|
|
1588
|
+
* message: 'example.com wants you to sign in with your Ethereum account…',
|
|
1589
|
+
* signature: '0x…',
|
|
1590
|
+
* })
|
|
1591
|
+
* ```
|
|
1592
|
+
*/
|
|
1593
|
+
verify: (options: siwe.verify.Options) => Promise<siwe.verify.ReturnType>
|
|
1594
|
+
}
|
|
1595
|
+
typedData: {
|
|
1596
|
+
/**
|
|
1597
|
+
* Verifies that typed data was signed by the provided address, supporting
|
|
1598
|
+
* Smart Contract Accounts (ERC-1271/6492/8010) and Externally Owned
|
|
1599
|
+
* Accounts.
|
|
1600
|
+
*
|
|
1601
|
+
* @example
|
|
1602
|
+
* ```ts
|
|
1603
|
+
* import { Client, http, publicActions } from 'viem'
|
|
1604
|
+
* import { mainnet } from 'viem/chains'
|
|
1605
|
+
*
|
|
1606
|
+
* const client = Client.create({
|
|
1607
|
+
* chain: mainnet,
|
|
1608
|
+
* transport: http(),
|
|
1609
|
+
* }).extend(publicActions())
|
|
1610
|
+
* const valid = await client.typedData.verify({
|
|
1611
|
+
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
1612
|
+
* domain: { name: 'Ether Mail', version: '1', chainId: 1 },
|
|
1613
|
+
* types: { Mail: [{ name: 'contents', type: 'string' }] },
|
|
1614
|
+
* primaryType: 'Mail',
|
|
1615
|
+
* message: { contents: 'hello world' },
|
|
1616
|
+
* signature: '0x…',
|
|
1617
|
+
* })
|
|
1618
|
+
* ```
|
|
1619
|
+
*/
|
|
1620
|
+
verify: <
|
|
1621
|
+
const definition extends TypedData.TypedData | Record<string, unknown>,
|
|
1622
|
+
primaryType extends keyof definition | 'EIP712Domain' =
|
|
1623
|
+
keyof definition,
|
|
1624
|
+
>(
|
|
1625
|
+
options: typedData.verify.Options<definition, primaryType>,
|
|
1626
|
+
) => Promise<typedData.verify.ReturnType>
|
|
1627
|
+
}
|
|
1621
1628
|
}
|
|
1622
1629
|
}
|
|
@@ -13,9 +13,9 @@ import type {
|
|
|
13
13
|
import * as chains from '../chains/index.js'
|
|
14
14
|
import * as contract from '../contract/index.js'
|
|
15
15
|
import { signMessage } from '../signMessage.js'
|
|
16
|
-
import { signTypedData } from '../signTypedData.js'
|
|
17
16
|
import * as token from '../token/index.js'
|
|
18
17
|
import * as transaction from '../transaction/index.js'
|
|
18
|
+
import * as typedData from '../typedData/index.js'
|
|
19
19
|
import * as wallet from '../wallet/index.js'
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -90,6 +90,9 @@ export function walletActions() {
|
|
|
90
90
|
sendSync: (options) => transaction.sendSync(client, options),
|
|
91
91
|
sign: (options) => transaction.sign(client, options),
|
|
92
92
|
},
|
|
93
|
+
typedData: {
|
|
94
|
+
sign: (options) => typedData.sign(client, options),
|
|
95
|
+
},
|
|
93
96
|
wallet: {
|
|
94
97
|
connect: (options) => wallet.connect(client, options),
|
|
95
98
|
disconnect: () => wallet.disconnect(client),
|
|
@@ -113,7 +116,6 @@ export function walletActions() {
|
|
|
113
116
|
},
|
|
114
117
|
signMessage: (options) => signMessage(client, options),
|
|
115
118
|
signTransaction: (options) => transaction.sign(client, options),
|
|
116
|
-
signTypedData: (options) => signTypedData(client, options),
|
|
117
119
|
})
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -932,32 +934,35 @@ export declare namespace walletActions {
|
|
|
932
934
|
signTransaction: (
|
|
933
935
|
options: transaction.sign.Options<chain>,
|
|
934
936
|
) => Promise<transaction.sign.ReturnType>
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
937
|
+
typedData: {
|
|
938
|
+
/**
|
|
939
|
+
* Signs [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data.
|
|
940
|
+
*
|
|
941
|
+
* @example
|
|
942
|
+
* ```ts
|
|
943
|
+
* import { Account, Client, http, walletActions } from 'viem'
|
|
944
|
+
* import { mainnet } from 'viem/chains'
|
|
945
|
+
*
|
|
946
|
+
* const client = Client.create({
|
|
947
|
+
* account: Account.fromPrivateKey('0x…'),
|
|
948
|
+
* chain: mainnet,
|
|
949
|
+
* transport: http(),
|
|
950
|
+
* }).extend(walletActions())
|
|
951
|
+
* const signature = await client.typedData.sign({
|
|
952
|
+
* domain: { name: 'Ether Mail', version: '1' },
|
|
953
|
+
* types: { Mail: [{ name: 'contents', type: 'string' }] },
|
|
954
|
+
* primaryType: 'Mail',
|
|
955
|
+
* message: { contents: 'hello world' },
|
|
956
|
+
* })
|
|
957
|
+
* ```
|
|
958
|
+
*/
|
|
959
|
+
sign: <
|
|
960
|
+
const definition extends TypedData | Record<string, unknown>,
|
|
961
|
+
primaryType extends keyof definition | 'EIP712Domain' =
|
|
962
|
+
keyof definition,
|
|
963
|
+
>(
|
|
964
|
+
options: typedData.sign.Options<definition, primaryType>,
|
|
965
|
+
) => Promise<typedData.sign.ReturnType>
|
|
966
|
+
}
|
|
962
967
|
}
|
|
963
968
|
}
|
|
@@ -18,17 +18,16 @@ export * as filter from './filter/index.js'
|
|
|
18
18
|
/** Resolves Client-attached action overrides, falling back to standalone actions. */
|
|
19
19
|
export { getAction } from './getAction.js'
|
|
20
20
|
export * as node from './node/index.js'
|
|
21
|
+
export * as siwe from './siwe/index.js'
|
|
21
22
|
export * as state from './state/index.js'
|
|
22
23
|
export * as token from './token/index.js'
|
|
23
24
|
export * as transaction from './transaction/index.js'
|
|
25
|
+
export * as typedData from './typedData/index.js'
|
|
24
26
|
export * as txpool from './txpool/index.js'
|
|
25
27
|
export * as wallet from './wallet/index.js'
|
|
26
28
|
|
|
27
29
|
export { multicall } from './multicall.js'
|
|
28
30
|
export { signMessage } from './signMessage.js'
|
|
29
31
|
export { sign as signTransaction } from './transaction/sign.js'
|
|
30
|
-
export { signTypedData } from './signTypedData.js'
|
|
31
32
|
export { verifyHash } from './verifyHash.js'
|
|
32
33
|
export { verifyMessage } from './verifyMessage.js'
|
|
33
|
-
export { verifySiweMessage } from './verifySiweMessage.js'
|
|
34
|
-
export { verifyTypedData } from './verifyTypedData.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { verify } from './verify.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Hex, PersonalMessage, Siwe } from 'ox'
|
|
2
2
|
import type { Address, Errors } from 'ox'
|
|
3
3
|
|
|
4
|
-
import type * as Client from '
|
|
5
|
-
import { verifyHash } from '
|
|
4
|
+
import type * as Client from '../../Client.js'
|
|
5
|
+
import { verifyHash } from '../verifyHash.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Verifies that an [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361)
|
|
@@ -18,16 +18,16 @@ import { verifyHash } from './verifyHash.js'
|
|
|
18
18
|
* chain: mainnet,
|
|
19
19
|
* transport: http(),
|
|
20
20
|
* })
|
|
21
|
-
* const valid = await Actions.
|
|
21
|
+
* const valid = await Actions.siwe.verify(client, {
|
|
22
22
|
* message: 'example.com wants you to sign in with your Ethereum account…',
|
|
23
23
|
* signature: '0x…',
|
|
24
24
|
* })
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export async function
|
|
27
|
+
export async function verify(
|
|
28
28
|
client: Client.Client,
|
|
29
|
-
options:
|
|
30
|
-
): Promise<
|
|
29
|
+
options: verify.Options,
|
|
30
|
+
): Promise<verify.ReturnType> {
|
|
31
31
|
const {
|
|
32
32
|
address,
|
|
33
33
|
domain,
|
|
@@ -58,7 +58,7 @@ export async function verifySiweMessage(
|
|
|
58
58
|
} as verifyHash.Options)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export declare namespace
|
|
61
|
+
export declare namespace verify {
|
|
62
62
|
type Options = Omit<verifyHash.Options, 'address' | 'hash'> & {
|
|
63
63
|
/** Ethereum address to check against (defaults to the address in the message). */
|
|
64
64
|
address?: Address.Address | undefined
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TypedData } from 'ox'
|
|
2
2
|
import type { Address, Errors, Hex } from 'ox'
|
|
3
3
|
|
|
4
|
-
import * as Account from '
|
|
5
|
-
import type * as Client from '
|
|
4
|
+
import * as Account from '../../Account.js'
|
|
5
|
+
import type * as Client from '../../Client.js'
|
|
6
6
|
|
|
7
7
|
type RequestOptions = Parameters<Client.Client['request']>[1]
|
|
8
8
|
|
|
@@ -22,7 +22,7 @@ type RequestOptions = Parameters<Client.Client['request']>[1]
|
|
|
22
22
|
* chain: mainnet,
|
|
23
23
|
* transport: http(),
|
|
24
24
|
* })
|
|
25
|
-
* const signature = await Actions.
|
|
25
|
+
* const signature = await Actions.typedData.sign(client, {
|
|
26
26
|
* domain: { name: 'Ether Mail', version: '1' },
|
|
27
27
|
* types: {
|
|
28
28
|
* Mail: [{ name: 'contents', type: 'string' }],
|
|
@@ -32,18 +32,18 @@ type RequestOptions = Parameters<Client.Client['request']>[1]
|
|
|
32
32
|
* })
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export async function
|
|
35
|
+
export async function sign<
|
|
36
36
|
const typedData extends TypedData.TypedData | Record<string, unknown>,
|
|
37
37
|
primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData,
|
|
38
38
|
>(
|
|
39
39
|
client: Client.Client,
|
|
40
|
-
options:
|
|
41
|
-
): Promise<
|
|
40
|
+
options: sign.Options<typedData, primaryType>,
|
|
41
|
+
): Promise<sign.ReturnType> {
|
|
42
42
|
const {
|
|
43
43
|
account: account_ = client.account,
|
|
44
44
|
requestOptions,
|
|
45
45
|
...value
|
|
46
|
-
} = options as
|
|
46
|
+
} = options as sign.Options
|
|
47
47
|
|
|
48
48
|
if (!account_) throw new Account.NotFoundError()
|
|
49
49
|
const account =
|
|
@@ -63,7 +63,7 @@ export async function signTypedData<
|
|
|
63
63
|
)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
export declare namespace
|
|
66
|
+
export declare namespace sign {
|
|
67
67
|
type Options<
|
|
68
68
|
typedData extends TypedData.TypedData | Record<string, unknown> =
|
|
69
69
|
TypedData.TypedData,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TypedData } from 'ox'
|
|
2
2
|
import type { Errors } from 'ox'
|
|
3
3
|
|
|
4
|
-
import type * as Client from '
|
|
5
|
-
import { verifyHash } from '
|
|
4
|
+
import type * as Client from '../../Client.js'
|
|
5
|
+
import { verifyHash } from '../verifyHash.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Verifies that typed data was signed by the provided address, supporting
|
|
@@ -17,7 +17,7 @@ import { verifyHash } from './verifyHash.js'
|
|
|
17
17
|
* chain: mainnet,
|
|
18
18
|
* transport: http(),
|
|
19
19
|
* })
|
|
20
|
-
* const valid = await Actions.
|
|
20
|
+
* const valid = await Actions.typedData.verify(client, {
|
|
21
21
|
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
22
22
|
* domain: { name: 'Ether Mail', version: '1', chainId: 1 },
|
|
23
23
|
* types: {
|
|
@@ -29,13 +29,13 @@ import { verifyHash } from './verifyHash.js'
|
|
|
29
29
|
* })
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function verify<
|
|
33
33
|
const typedData extends TypedData.TypedData | Record<string, unknown>,
|
|
34
34
|
primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData,
|
|
35
35
|
>(
|
|
36
36
|
client: Client.Client,
|
|
37
|
-
options:
|
|
38
|
-
): Promise<
|
|
37
|
+
options: verify.Options<typedData, primaryType>,
|
|
38
|
+
): Promise<verify.ReturnType> {
|
|
39
39
|
const {
|
|
40
40
|
address,
|
|
41
41
|
blockHash,
|
|
@@ -50,7 +50,7 @@ export async function verifyTypedData<
|
|
|
50
50
|
requireCanonical,
|
|
51
51
|
signature,
|
|
52
52
|
...typedData
|
|
53
|
-
} = options as
|
|
53
|
+
} = options as verify.Options
|
|
54
54
|
|
|
55
55
|
return verifyHash(client, {
|
|
56
56
|
address,
|
|
@@ -69,7 +69,7 @@ export async function verifyTypedData<
|
|
|
69
69
|
} as verifyHash.Options)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export declare namespace
|
|
72
|
+
export declare namespace verify {
|
|
73
73
|
type Options<
|
|
74
74
|
typedData extends TypedData.TypedData | Record<string, unknown> =
|
|
75
75
|
TypedData.TypedData,
|
|
@@ -4,7 +4,7 @@ import type { Address } from 'ox'
|
|
|
4
4
|
import type * as Account from '../../core/Account.js'
|
|
5
5
|
import type * as Client from '../../core/Client.js'
|
|
6
6
|
import { getEip712Domain } from '../../core/actions/contract/getEip712Domain.js'
|
|
7
|
-
import {
|
|
7
|
+
import { sign as signTypedData_ } from '../../core/actions/typedData/sign.js'
|
|
8
8
|
|
|
9
9
|
type Options = {
|
|
10
10
|
account: Account.Account
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @internal */
|
|
2
|
-
export const version = '3.0.0-next.
|
|
2
|
+
export const version = '3.0.0-next.2'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../src/core/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAC9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,IAAI,CAAA;AAE9C,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AAE3C,KAAK,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,aAAa,CACjC,KAAK,CAAC,SAAS,SAAS,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrE,WAAW,SAAS,MAAM,SAAS,GAAG,cAAc,GAAG,MAAM,SAAS,EAEtE,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,GACrD,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAuBnC;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,KAAK,OAAO,CACV,SAAS,SAA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AClG,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC3B,0GAA0G;QAC1G,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;KACxB,CAAA;IAED,KAAK,UAAU,GAAG,OAAO,CAAA;IAEzB,KAAK,SAAS,GACV,eAAe,CAAC,cAAc,CAAC,SAAS,GACxC,UAAU,CAAC,SAAS,GACpB,MAAM,CAAC,eAAe,CAAA;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verifySiweMessage.js","sourceRoot":"","sources":["../../../src/core/actions/verifySiweMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,IAAI,CAAA;AAI/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAqB,EACrB,OAAkC;IAElC,MAAM,EACJ,OAAO,EACP,MAAM,EACN,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,GAAG,IAAI,IAAI,EAAE,EACjB,GAAG,IAAI,EACR,GAAG,OAAO,CAAA;IAEX,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAEjC,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;QACjC,OAAO;QACP,MAAM;QACN,OAAO,EAAE,MAAM;QACf,KAAK;QACL,MAAM;QACN,IAAI;KACL,CAAC,CAAA;IACF,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,EAAE;QACxB,GAAG,IAAI;QACP,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,IAAI,EAAE,eAAe,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAA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AA;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verifyTypedData.js","sourceRoot":"","sources":["../../../src/core/actions/verifyTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAInC,MAAqB,EACrB,OAAwD;IAExD,MAAM,EACJ,OAAO,EACP,SAAS,EACT,WAAW,EACX,QAAQ,EACR,sBAAsB,EACtB,OAAO,EACP,WAAW,EACX,IAAI,EACJ,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,GAAG,SAAS,EACb,GAAG,OAAkC,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,EAAE;QACxB,OAAO;QACP,SAAS;QACT,WAAW;QACX,QAAQ;QACR,sBAAsB;QACtB,OAAO;QACP,WAAW;QACX,IAAI,EAAE,SAAS,CAAC,cAAc,CAAC,SAAmC,CAAC;QACnE,IAAI;QACJ,gBAAgB;QAChB,cAAc;QACd,gBAAgB;QAChB,SAAS;KACY,CAAC,CAAA;AAC1B,CAAC"}
|