PageSourceSearch

https://docs.tableland.xyz/assets/js/2cd020ac.6490a801.js

js tableland.xyz collected 2026-10-03 22:19:40 UTC 22,671 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4160],{592182:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>l,toc:()=>o});var r=s(785893),i=s(511151);const d={},c="Interface: Signer",l={id:"api/sdk/namespaces/helpers/interfaces/Signer",title:"Interface: Signer",description:"A Signer represents an account on the Ethereum Blockchain, and is most often",source:"@site/docs/api/sdk/namespaces/helpers/interfaces/Signer.md",sourceDirName:"api/sdk/namespaces/helpers/interfaces",slug:"/api/sdk/namespaces/helpers/interfaces/Signer",permalink:"/api/sdk/namespaces/helpers/interfaces/Signer",draft:!1,unlisted:!1,editUrl:"https://github.com/tablelandnetwork/docs/tree/main/docs/api/sdk/namespaces/helpers/interfaces/Signer.md",tags:[],version:"current",lastUpdatedBy:"Dan Buchholz",lastUpdatedAt:1715186607e3,frontMatter:{},sidebar:"apiSdk",previous:{title:"Interface: Signal",permalink:"/api/sdk/namespaces/helpers/interfaces/Signal"},next:{title:"Interface: SignerConfig",permalink:"/api/sdk/namespaces/helpers/interfaces/SignerConfig"}},t={},o=[{value:"Extends",id:"extends",level:2},{value:"Properties",id:"properties",level:2},{value:"provider",id:"provider",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Source",id:"source",level:4},{value:"Methods",id:"methods",level:2},{value:"call()",id:"call",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Source",id:"source-1",level:4},{value:"connect()",id:"connect",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Source",id:"source-2",level:4},{value:"estimateGas()",id:"estimategas",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Throws",id:"throws",level:4},{value:"Source",id:"source-3",level:4},{value:"getAddress()",id:"getaddress",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Source",id:"source-4",level:4},{value:"getNonce()",id:"getnonce",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Source",id:"source-5",level:4},{value:"populateCall()",id:"populatecall",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Source",id:"source-6",level:4},{value:"populateTransaction()",id:"populatetransaction",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Note",id:"note",level:4},{value:"Source",id:"source-7",level:4},{value:"resolveName()",id:"resolvename",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Source",id:"source-8",level:4},{value:"sendTransaction()",id:"sendtransaction",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Source",id:"source-9",level:4},{value:"signMessage()",id:"signmessage",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Source",id:"source-10",level:4},{value:"signTransaction()",id:"signtransaction",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Source",id:"source-11",level:4},{value:"signTypedData()",id:"signtypeddata",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Source",id:"source-12",level:4}];function a(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"interface-signer",children:"Interface: Signer"}),"\n",(0,r.jsx)(n.p,{children:"A Signer represents an account on the Ethereum Blockchain, and is most often\nbacked by a private key represented by a mnemonic or residing on a Hardware Wallet."}),"\n",(0,r.jsx)(n.p,{children:"The API remains abstract though, so that it can deal with more advanced exotic\nSigning entities, such as Smart Contract Wallets or Virtual Wallets (where the\nprivate key may not be known)."}),"\n",(0,r.jsx)(n.h2,{id:"extends",children:"Extends"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Addressable"}),".",(0,r.jsx)(n.code,{children:"ContractRunner"}),".",(0,r.jsx)(n.code,{children:"NameResolver"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,r.jsx)(n.h3,{id:"provider",children:"provider"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"provider"}),": ",(0,r.jsx)(n.code,{children:"null"})," | ",(0,r.jsx)(n.code,{children:"Provider"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The [[Provider]] attached to this Signer (if any)."}),"\n",(0,r.jsx)(n.h4,{id:"overrides",children:"Overrides"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"ContractRunner.provider"})}),"\n",(0,r.jsx)(n.h4,{id:"source",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:18"}),"\n",(0,r.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,r.jsx)(n.h3,{id:"call",children:"call()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"call"}),"(",(0,r.jsx)(n.code,{children:"tx"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Evaluates the //tx// by running it against the current Blockchain state. This\ncannot change state and has no cost in ether, as it is effectively simulating\
1nexecution."}),"\n",(0,r.jsx)(n.p,{children:"This can be used to have the Blockchain perform computations based on its state\n(e.g. running a Contract's getters) or to simulate the effect of a transaction\nbefore actually performing an operation."}),"\n",(0,r.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"tx"}),": ",(0,r.jsx)(n.code,{children:"TransactionRequest"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides-1",children:"Overrides"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"ContractRunner.call"})}),"\n",(0,r.jsx)(n.h4,{id:"source-1",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:86"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"connect",children:"connect()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"connect"}),"(",(0,r.jsx)(n.code,{children:"provider"}),"): ",(0,r.jsx)(n.a,{href:"/api/sdk/namespaces/helpers/interfaces/Signer",children:(0,r.jsx)(n.code,{children:"Signer"})})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Returns a new instance of this Signer connected to //provider// or detached\nfrom any Provider if null."}),"\n",(0,r.jsx)(n.h4,{id:"parameters-1",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"provider"}),": ",(0,r.jsx)(n.code,{children:"null"})," | ",(0,r.jsx)(n.code,{children:"Provider"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns-1",children:"Returns"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{href:"/api/sdk/namespaces/helpers/interfaces/Signer",children:(0,r.jsx)(n.code,{children:"Signer"})})}),"\n",(0,r.jsx)(n.h4,{id:"source-2",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:23"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"estimategas",children:"estimateGas()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"estimateGas"}),"(",(0,r.jsx)(n.code,{children:"tx"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"bigint"}),">"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Estimates the required gas required to execute //tx// on the Blockchain. This\nwill be the expected amount a transaction will require as its ",(0,r.jsx)(n.code,{children:"gasLimit"}),"\nto successfully run all the necessary computations and store the needed state\nthat the transaction intends."]}),"\n",(0,r.jsxs)(n.p,{children:["Keep in mind that this is ",(0,r.jsx)(n.strong,{children:"best efforts"}),", since the state of the Blockchain\nis in flux, which could affect transaction gas requirements."]}),"\n",(0,r.jsx)(n.h4,{id:"parameters-2",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"tx"}),": ",(0,r.jsx)(n.code,{children:"TransactionRequest"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns-2",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"bigint"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides-2",children:"Overrides"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"ContractRunner.estimateGas"})}),"\n",(0,r.jsx)(n.h4,{id:"throws",children:"Throws"}),"\n",(0,r.jsxs)(n.p,{children:["UNPREDICTABLE_GAS_LIMIT A transaction that is believed by the node to likely\nfail will throw an error during gas estimation. This could indicate that it\nwill actually fail or that the circumstances are simply too complex for the\nnode to take into account. In these cases, a manually determined ",(0,r.jsx)(n.code,{children:"gasLimit"}),"\nwill need to be made."]}),"\n",(0,r.jsx)(n.h4,{id:"source-3",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:76"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"getaddress",children:"getAddress()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"getAddress"}),"(): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Get the address of the Signer."}),"\n",(0,r.jsx)(n.h4,{id:"returns-3",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides-3",children:"Overrides"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"Addressable.getAddress"})}),"\n",(0,r.jsx)(n.h4,{id:"source-4",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:27"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"getnonce",children:"getNonce()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"getNonce"}),"(",(0,r.jsx)(n.code,{children:"blockTag"}),"?): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"number"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Gets the next nonce required for this Signer to send a transaction."}),"\n",(0,r.jsx)(n.h4,{id:"parameters-3",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"blockTag?"}),": ",(0,r.jsx)(n.code,{children:"BlockTag"})]}),"\n",(0,r.jsxs)(n.p,{children:["The blocktag to base the transaction count on, keep in mind\nmany nodes do not honour this value and silently ignore it [default: ",(0,r.jsx)(n.code,{children:'"latest"'}),"]"]}),"\n",(0,r.jsx)(n.h4,{id:"returns-4",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"number"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"source-5",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:34"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"populatecall",children:"populateCall()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"populateCall"}),"(",(0,r.jsx)(n.code,{children:"tx"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"TransactionLike"}),"<",(0,r.jsx)(n.code,{children:"string"}),">>"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Prepares a TransactionRequest for calling:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["resolves ",(0,r.jsx)(n.code,{children:"to"})," and ",(0,r.jsx)(n.code,{children:"from"})," addresses"]}),"\n",(0,r.jsxs)(n.li,{children:["if ",(0,r.jsx)(n.code,{children:"from"})," is specified , check that it matches this Signer"]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"parameters-4",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"tx"}),": ",(0,r.jsx)(n.code,{children:"TransactionRequest"})]}),"\n",(0,r.jsx)(n.p,{children:"The call to prepare"}),"\n",(0,r.jsx)(n.h4,{id:"returns-5",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"TransactionLike"}),"<",(0,r.jsx)(n.code,{children:"string"}),">>"]}),"\n",(0,r.jsx)(n.h4,{id:"source-6",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:42"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"populatetransaction",children:"populateTransaction()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"populateTransaction"}),"(",(0,r.jsx)(n.code,{children:"tx"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"TransactionLike"}),"<",(0,r.jsx)(n.code,{children:"string"}),">>"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Prepares a TransactionRequest for sending to the network by\npopulating any missing properties:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["resolves ",(0,r.jsx)(n.code,{children:"to"})," and ",(0,r.jsx)(n.code,{children:"from"})," addresses"]}),"\n",(0,r.jsxs)(n.li,{children:["if ",(0,r.jsx)(n.code,{children:"from"})," is specified , check that it matches this Signer"]}),"\n",(0,r.jsxs)(n.li,{children:["populates ",(0,r.jsx)(n.code,{children:"nonce"})," via ",(0,r.jsx)(n.code,{children:'signer.getNonce("pending")'})]}),"\n",(0,r.jsxs)(n.li,{children:["populates ",(0,r.jsx)(n.code,{children:"gasLimit"})," via ",(0,r.jsx)(n.code,{children:"signer.estimateGas(tx)"})]}),"\n",(0,r.jsxs)(n.li,{children:["populates ",(0,r.jsx)(n.code,{children:"chainId"})," via ",(0,r.jsx)(n.code,{children:"signer.provider.getNetwork()"})]}),"\n",(0,r.jsxs)(n.li,{children:["populates ",(0,r.jsx)(n.code,{children:"type"})," and relevant fee data for that type (",(0,r.jsx)(n.code,{children:"gasPrice"}),"\nfor legacy transactions, ",(0,r.jsx)(n.code,{children:"maxFeePerGas"})," for EIP-1559, etc)"]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"parameters-5",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"tx"}),": ",(0,r.jsx)(n.code,{children:"TransactionRequest"})]}),"\n",(0,r.jsx)(n.p,{children:"The call to prepare"}),"\n",(0,r.jsx)(n.h4,{id:"returns-6",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"TransactionLike"}),"<",(0,r.jsx)(n.code,{children:"string"}),">>"]}),"\n",(0,r.jsx)(n.h4,{id:"note",children:"Note"}),"\n",(0,r.jsx)(n.p,{children:"Some Signer implementations may skip populating properties that\nare populated downstream; for example JsonRpcSigner defers to the\nnode to populate the nonce and fee data."}),"\n",(0,r.jsx)(n.h4,{id:"source-7",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:60"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"resolvename",children:"resolveName()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"resolveName"}),"(",(0,r.jsx)(n.code,{children:"name"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"null"})," | ",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Resolves an ENS Name to an address."}),"\n",(0,r.jsx)(n.h4,{id:"parameters-6",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"name"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns-7",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"null"})," | ",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides-4",children:"Overrides"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"ContractRunner.resolveName"})}),"\n",(0,r.jsx)(n.h4,{id:"source-8",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:90"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"sendtransaction",children:"sendTransaction()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"sendTransaction"}),"(",(0,r.jsx)(n.code,{children:"tx"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"TransactionResponse"}),">"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Sends %%tx%% to the Network. The ",(0,r.jsx)(n.code,{children:"signer.populateTransaction(tx)"}),"\nis called first to ensure all necessary properties for the\ntransaction to be valid have been popualted first."]}),"\n",(0,r.jsx)(n.h4,{id:"parameters-7",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"tx"}),": ",(0,r.jsx)(n.code,{children:"TransactionRequest"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns-8",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"TransactionResponse"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides-5",children:"Overrides"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"ContractRunner.sendTransaction"})}),"\n",(0,r.jsx)(n.h4,{id:"source-9",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:101"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"signmessage",children:"signMessage()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"signMessage"}),"(",(0,r.jsx)(n.code,{children:"message"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Signs an [[link-eip-191]] prefixed personal message."}),"\n",(0,r.jsxs)(n.p,{children:["If the %%message%% is a string, it is signed as UTF-8 encoded bytes. It is ",(0,r.jsx)(n.strong,{children:"not"}),"\ninterpretted as a [[BytesLike]]; so the string ",(0,r.jsx)(n.code,{children:'"0x1234"'})," is signed as six\ncharacters, ",(0,r.jsx)(n.strong,{children:"not"})," two bytes."]}),"\n",(0,r.jsxs)(n.p,{children:["To sign that example as two bytes, the Uint8Array should be used\n(i.e. ",(0,r.jsx)(n.code,{children:"new Uint8Array([ 0x12, 0x34 ])"}),")."]}),"\n",(0,r.jsx)(n.h4,{id:"parameters-8",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"message"}),": ",(0,r.jsx)(n.code,{children:"string"})," | ",(0,r.jsx)(n.code,{children:"Uint8Array"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns-9",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"source-10",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:112"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"signtransaction",children:"signTransaction()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"signTransaction"}),"(",(0,r.jsx)(n.code,{children:"tx"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Signs %%tx%%, returning the fully signed transaction. This does not\npopulate any additional properties within the transaction."}),"\n",(0,r.jsx)(n.h4,{id:"parameters-9",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"tx"}),": ",(0,r.jsx)(n.code,{children:"TransactionRequest"})]}),"\n",(0,r.jsx)(n.h4,{id:"returns-10",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"source-11",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:95"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"signtypeddata",children:"signTypedData()"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"signTypedData"}),"(",(0,r.jsx)(n.code,{children:"domain"}),", ",(0,r.jsx)(n.code,{children:"types"}),", ",(0,r.jsx)(n.code,{children:"value"}),"): ",(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Signs the [[link-eip-712]] typed data."}),"\n",(0,r.jsx)(n.h4,{id:"parameters-10",children:"Parameters"}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"domain"}),": ",(0,r.jsx)(n.code,{children:"TypedDataDomain"})]}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"types"}),": ",(0,r.jsx)(n.code,{children:"Record"}),"<",(0,r.jsx)(n.code,{children:"string"}),", ",(0,r.jsx)(n.code,{children:"TypedDataField"}),"[]>"]}),"\n",(0,r.jsxs)(n.p,{children:["\u2022 ",(0,r.jsx)(n.strong,{children:"value"}),": ",(0,r.jsx)(n.code,{children:"Record"}),"<",(0,r.jsx)(n.code,{children:"string"}),", ",(0,r.jsx)(n.code,{children:"any"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"returns-11",children:"Returns"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Promise"}),"<",(0,r.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,r.jsx)(n.h4,{id:"source-12",children:"Source"}),"\n",(0,r.jsx)(n.p,{children:"ethers/lib.commonjs/providers/signer.d.ts:116"})]})}function h(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},511151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>c});var
1 r=s(667294);const i={},d=r.createContext(i);function c(e){const n=r.useContext(d);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),r.createElement(d.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.