Constructors
constructor
- new StashedHost(
request: {
id: string;
name?: string;
origin: string;
payload:
| { type: "connect" }
| { address: string; data: string; type: "sign-transaction-block" }
| { address: string; bytes: string; type: "sign-personal-message" };
},
): StashedHost Parameters
- request: {
id: string;
name?: string;
origin: string;
payload:
| { type: "connect" }
| { address: string; data: string; type: "sign-transaction-block" }
| { address: string; bytes: string; type: "sign-personal-message" };
}
Methods
close
- close(
payload?:
| { type: "reject" }
| {
data:
| { address: string; type: "connect" }
| { bytes: string; signature: string; type: "sign-transaction-block" }
| { bytes: string; signature: string; type: "sign-personal-message" };
type: "resolve";
},
): void Parameters
Optional
payload:
| { type: "reject" }
| {
data:
| { address: string; type: "connect" }
| { bytes: string; signature: string; type: "sign-transaction-block" }
| { bytes: string; signature: string; type: "sign-personal-message" };
type: "resolve";
}
Returns void
getRequestData
- getRequestData(): {
id: string;
name?: string;
origin: string;
payload: | { type: "connect" }
| { address: string; data: string; type: "sign-transaction-block" }
| { address: string; bytes: string; type: "sign-personal-message" };
} Returns {
id: string;
name?: string;
origin: string;
payload:
| { type: "connect" }
| { address: string; data: string; type: "sign-transaction-block" }
| { address: string; bytes: string; type: "sign-personal-message" };
}
sendMessage
- sendMessage(
payload:
| { type: "reject" }
| {
data:
| { address: string; type: "connect" }
| { bytes: string; signature: string; type: "sign-transaction-block" }
| { bytes: string; signature: string; type: "sign-personal-message" };
type: "resolve";
},
): void Parameters
- payload:
| { type: "reject" }
| {
data:
| { address: string; type: "connect" }
| { bytes: string; signature: string; type: "sign-transaction-block" }
| { bytes: string; signature: string; type: "sign-personal-message" };
type: "resolve";
}
Returns void
Static
fromUrl
- fromUrl(url?: string): StashedHost
Parameters
- url: string = window.location.href