@human.tech/waap-sdk 2.3.0 → 2.4.1
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/.agent/SKILL.md +28 -13
- package/CHANGELOG.md +152 -0
- package/README.md +16 -2
- package/dist/SolanaProvider-BdeBP_ro.js +1 -0
- package/dist/SolanaProvider-DP9J8JuJ.mjs +1 -0
- package/dist/UIMessageManager-4xqSTTBS.d.mts +11 -0
- package/dist/UIMessageManager-4xqSTTBS.d.ts +11 -0
- package/dist/UIMessageManager-CtnIZgIY.mjs +1 -0
- package/dist/UIMessageManager-D-OTya1E.js +1 -0
- package/dist/WaaPError-C2TOEGPx.d.mts +52 -0
- package/dist/WaaPError-C2TOEGPx.d.ts +52 -0
- package/dist/{WalletConnect-Dn40Omgo.js → WalletConnect-B21f4Vvh.js} +1 -1
- package/dist/{WalletConnect-UfxGn2M_.mjs → WalletConnect-DXiTxC-F.mjs} +1 -1
- package/dist/{WaaPError-CMOAWUlN.d.ts → WalletModalController-16mHsFv2.d.ts} +17 -55
- package/dist/{WaaPError-BjukImOz.d.mts → WalletModalController-DxiBiqDf.d.mts} +17 -55
- package/dist/bridge.d.mts +158 -0
- package/dist/bridge.d.ts +158 -0
- package/dist/bridge.js +1 -0
- package/dist/bridge.mjs +1 -0
- package/dist/evm-dDMLwSQe.mjs +2 -0
- package/dist/evm-rUSuf-iy.js +2 -0
- package/dist/evm.d.mts +3 -2
- package/dist/evm.d.ts +3 -2
- package/dist/evm.js +1 -1
- package/dist/evm.mjs +1 -1
- package/dist/{index-DOIss_GK.d.ts → index-BOExImk3.d.mts} +29 -192
- package/dist/{index-C0mLQs_a.d.mts → index-BkKBZpqc.d.ts} +29 -192
- package/dist/index.d.mts +33 -8
- package/dist/index.d.ts +33 -8
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/dist/init-BkrqKNet.js +1 -0
- package/dist/init-C-52fEJS.d.ts +84 -0
- package/dist/init-C3zCj5Lc.d.mts +84 -0
- package/dist/init-CkYgm7Zu.mjs +1 -0
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/register-B2G1larb.mjs +1 -0
- package/dist/{register-9bEe9ATz.d.mts → register-BKCJXsHB.d.mts} +9 -6
- package/dist/register-BL_2Xqcc.js +1 -0
- package/dist/{register-XzDVa7r8.d.mts → register-C1hFwh4A.d.ts} +4 -3
- package/dist/register-CLpzYN7U.mjs +1 -0
- package/dist/{register-DgN7qh23.js → register-Diu5wxsG.js} +1 -1
- package/dist/{register-PWKDsSRv.d.ts → register-GiWQpcBY.d.ts} +9 -6
- package/dist/{register-Mb1D_xW4.d.ts → register-mq9fTaSt.d.mts} +4 -3
- package/dist/solana.d.mts +6 -4
- package/dist/solana.d.ts +6 -4
- package/dist/solana.js +1 -1
- package/dist/solana.mjs +1 -1
- package/dist/stellar.d.mts +6 -0
- package/dist/stellar.d.ts +6 -0
- package/dist/stellar.js +1 -0
- package/dist/stellar.mjs +1 -0
- package/dist/sui.d.mts +5 -4
- package/dist/sui.d.ts +5 -4
- package/dist/sui.js +1 -1
- package/dist/sui.mjs +1 -1
- package/dist/types-Bai14yLc.d.mts +95 -0
- package/dist/types-Bj5dDE-C.d.ts +198 -0
- package/dist/types-C7JDjWnt.d.mts +198 -0
- package/dist/{types-BmCqyQtu.d.mts → types-Cc6tc4ut.d.mts} +18 -1
- package/dist/{types-BmCqyQtu.d.ts → types-Cc6tc4ut.d.ts} +18 -1
- package/dist/types-DqdVfkaW.d.ts +95 -0
- package/dist/ui-CnG74RaM.js +1 -0
- package/dist/ui-lV9LVoom.mjs +1 -0
- package/dist/{useWaapAuth-vJAk2n_I.d.mts → useWaapAuth-Be1YJk-7.d.mts} +2 -2
- package/dist/useWaapAuth-C9Cwu4XG.js +1 -0
- package/dist/{useWaapAuth-DgYO5KxO.d.ts → useWaapAuth-DSFDwJtt.d.ts} +2 -2
- package/dist/useWaapAuth-Vh8gUs6Y.mjs +1 -0
- package/dist/walletconnect.js +1 -1
- package/dist/walletconnect.mjs +1 -1
- package/docs/solana-wallet-adapter.md +157 -0
- package/package.json +32 -4
- package/dist/esm-BUfmyWbN.mjs +0 -1
- package/dist/esm-DFwVZkjo.js +0 -1
- package/dist/evm-9r6LecIW.mjs +0 -2
- package/dist/evm-D_LHHo3z.js +0 -2
- package/dist/initializerContext-DIrqEE6B.d.ts +0 -20
- package/dist/initializerContext-_YjbVTiL.d.mts +0 -20
- package/dist/register-CEeLG7qz.mjs +0 -1
- package/dist/register-CodxV1XG.js +0 -1
- package/dist/register-I8d7v41B.mjs +0 -1
- package/dist/ui-BjcwM6px.js +0 -1
- package/dist/ui-CrnBoTQL.mjs +0 -1
- package/dist/useWaapAuth-BPvve-_3.js +0 -1
- package/dist/useWaapAuth-BcmVGb-D.mjs +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { d as WaaPAccountMode, f as WaaPAccountStatus, r as LoginResponse } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
import { a as StellarSignBlobOptions, c as WaaPInitializerOptions, i as StellarNetwork, o as StellarSignTransactionOptions, r as Sep43Result, s as WaaPStellarProviderInterface, t as InitWaaPStellarOptions } from "./types-Bai14yLc.mjs";
|
|
3
|
+
import { t as UIMessageManager } from "./UIMessageManager-4xqSTTBS.mjs";
|
|
4
|
+
//#region src/lib/stellar/StellarProvider.d.ts
|
|
5
|
+
declare class WaaPStellarProvider implements WaaPStellarProviderInterface {
|
|
6
|
+
readonly name = "WaaP";
|
|
7
|
+
readonly version = "1.0.0";
|
|
8
|
+
private readonly network;
|
|
9
|
+
private address;
|
|
10
|
+
private accountMode;
|
|
11
|
+
private loginMethod;
|
|
12
|
+
private walletMessageManager;
|
|
13
|
+
private uiMessageManager;
|
|
14
|
+
private internalEventEmitter;
|
|
15
|
+
private ensureIframe?;
|
|
16
|
+
private iframeMounted;
|
|
17
|
+
private initializerOptions;
|
|
18
|
+
private initializerPromise;
|
|
19
|
+
private initializedIframeWindow;
|
|
20
|
+
constructor(iframeWindow: Window | null, options?: InitWaaPStellarOptions, ensureIframe?: () => Window | null, initializerOptions?: WaaPInitializerOptions);
|
|
21
|
+
destroy(): void;
|
|
22
|
+
get ui(): UIMessageManager;
|
|
23
|
+
private ensureIframeMounted;
|
|
24
|
+
preload(): Promise<void>;
|
|
25
|
+
private ensureInitialized;
|
|
26
|
+
setAccountMode(mode: WaaPAccountMode): void;
|
|
27
|
+
selectAccountMode(mode: WaaPAccountMode, options?: WaaPInitializerOptions): Promise<void>;
|
|
28
|
+
setLoginMethod(loginMethod: LoginResponse): void;
|
|
29
|
+
getLoginMethod(): LoginResponse;
|
|
30
|
+
login(): Promise<LoginResponse>;
|
|
31
|
+
logout(): Promise<void>;
|
|
32
|
+
disconnect(): Promise<void>;
|
|
33
|
+
getAccountStatus(): Promise<WaaPAccountStatus>;
|
|
34
|
+
/**
|
|
35
|
+
* `getNetwork` is answered locally.
|
|
36
|
+
*
|
|
37
|
+
* The facade is initialized for one network and signs for that one; a round
|
|
38
|
+
* trip could only ever disagree with it, and a dapp that believed the round
|
|
39
|
+
* trip would build a transaction the wallet then refuses.
|
|
40
|
+
*/
|
|
41
|
+
getNetwork(): Promise<Sep43Result<{
|
|
42
|
+
network: StellarNetwork;
|
|
43
|
+
networkPassphrase: string;
|
|
44
|
+
}>>;
|
|
45
|
+
getAddress(): Promise<Sep43Result<{
|
|
46
|
+
address: string;
|
|
47
|
+
}>>;
|
|
48
|
+
signTransaction(xdr: string, opts?: StellarSignTransactionOptions): Promise<Sep43Result<{
|
|
49
|
+
signedTxXdr: string;
|
|
50
|
+
signerAddress: string;
|
|
51
|
+
}>>;
|
|
52
|
+
signMessage(message: string, opts?: StellarSignBlobOptions): Promise<Sep43Result<{
|
|
53
|
+
signedMessage: string;
|
|
54
|
+
signerAddress: string;
|
|
55
|
+
}>>;
|
|
56
|
+
/**
|
|
57
|
+
* Not supported, and refused rather than approximated.
|
|
58
|
+
*
|
|
59
|
+
* A Soroban authorization entry is a different preimage with different
|
|
60
|
+
* consequences, and the wallet has nothing that can decode or display one.
|
|
61
|
+
* Signing a blob it cannot show the user is exactly the blind signing the
|
|
62
|
+
* rest of this integration is built to avoid. SEP-43 defines no
|
|
63
|
+
* "unsupported" code, so this is -1 with a message that says why.
|
|
64
|
+
*/
|
|
65
|
+
signAuthEntry(): Promise<Sep43Result<{
|
|
66
|
+
signedAuthEntry: string;
|
|
67
|
+
signerAddress: string;
|
|
68
|
+
}>>;
|
|
69
|
+
/** A dapp may assert which network it built for; it may never select one. */
|
|
70
|
+
private networkMismatch;
|
|
71
|
+
private requireAddress;
|
|
72
|
+
private postRequestAndWait;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/lib/stellar/init.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* Initialize a standalone SEP-43 Stellar wallet.
|
|
78
|
+
*
|
|
79
|
+
* Always TAP: Stellar signs with the `t2` ed25519 key, and Squid's shared
|
|
80
|
+
* dWallet has no funded Stellar account to send from.
|
|
81
|
+
*/
|
|
82
|
+
declare function initWaaPStellar(options?: InitWaaPStellarOptions): WaaPStellarProviderInterface;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { WaaPStellarProvider as n, initWaaPStellar as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e,_ as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,o as l,r as u,t as d,v as f,w as p}from"./UIMessageManager-CtnIZgIY.mjs";import{EventEmitter as m}from"events";const h={PUBLIC:`Public Global Stellar Network ; September 2015`,TESTNET:`Test SDF Network ; September 2015`},g=(e,t,n)=>({error:{code:e,message:t,...n?{ext:n}:{}}});function _(e){let t=e instanceof Error?e.message:String(e),n=t.toLowerCase();return n.includes(`reject`)||n.includes(`cancel`)||n.includes(`denied`)||n.includes(`closed`)?g(-4,`The user rejected this request.`,[t]):n.includes(`horizon`)||n.includes(`network`)?g(-2,`An error occurred with the Stellar network. Please try again.`,[t]):g(-1,`The wallet encountered an internal error. Please try again or contact support if the problem persists.`,[t])}var v=class{constructor(e,t={},n,i=t){this.name=`WaaP`,this.version=`1.0.0`,this.address=null,this.accountMode=`tap`,this.loginMethod=null,this.internalEventEmitter=new m,this.initializerPromise=null,this.initializedIframeWindow=null,this.network=t.network??`PUBLIC`,this.walletMessageManager=new r(e,f(t)),this.ensureIframe=n,this.iframeMounted=!n,this.initializerOptions=i,this.uiMessageManager=new d,this.walletMessageManager.addListener({handleResponse:e=>{this.internalEventEmitter.emit(e.id,e)},handleRequest:e=>{e.method===p.show_modal?this.uiMessageManager.emit(`show_modal`):e.method===p.hide_modal&&this.uiMessageManager.emit(`hide_modal`)},onAccountChanged:async()=>{this.address=null}})}destroy(){this.walletMessageManager.dispose(),this.internalEventEmitter.removeAllListeners(),this.uiMessageManager.removeAllListeners(),this.address=null}get ui(){return this.uiMessageManager}ensureIframeMounted(){if(this.iframeMounted||!this.ensureIframe)return;let e=this.ensureIframe();if(!e)throw Error(`Failed to create WaaP iframe`);this.iframeMounted=!0,this.walletMessageManager.setIframeWindow(e)}async preload(){if(!this.ensureIframe)return;this.ensureIframeMounted();let e=this.walletMessageManager.getIframeWindow();if(!e)throw Error(`WaaP iframe is not mounted`);if(this.initializedIframeWindow===e&&this.initializerPromise)return this.initializerPromise;this.initializedIframeWindow=e,this.initializerPromise=c(e,()=>this.selectAccountMode(this.accountMode,this.initializerOptions));try{await this.initializerPromise}catch(e){throw this.initializerPromise=null,this.initializedIframeWindow=null,e}}async ensureInitialized(){await this.preload()}setAccountMode(e){this.accountMode=e,this.initializerPromise=null,this.initializedIframeWindow=null}async selectAccountMode(e,t={}){await this.walletMessageManager.pingIframe(),await this.postRequestAndWait({method:p.set_signing_mode,params:[i(e,t)],interactionRequired:!1})}setLoginMethod(e){this.loginMethod=e,e===null&&(this.address=null)}getLoginMethod(){return this.loginMethod}async login(){await this.ensureInitialized();let e=(await this.postRequestAndWait({method:p.login,params:[],interactionRequired:!0})).data;return e!==`waap`&&e!==`human`&&e!==`injected`&&e!==`walletconnect`?(this.loginMethod=null,null):(this.loginMethod=e,e)}async logout(){await this.ensureInitialized(),await this.postRequestAndWait({method:p.logout,params:[],interactionRequired:!1}),this.loginMethod=null,this.address=null}async disconnect(){await this.ensureInitialized(),await this.postRequestAndWait({method:p.stellar_disconnect,params:[],interactionRequired:!1}),this.address=null}async getAccountStatus(){await this.ensureInitialized();let e=await this.postRequestAndWait({method:p.waap_getAccountStatus,params:[],interactionRequired:!1});if(e.error)throw Error(e.error.message||`Failed to read WaaP status`);return e.data}async getNetwork(){return{network:this.network,networkPassphrase:h[this.network]}}async getAddress(){try{if(this.address)return{address:this.address};await this.ensureInitialized();let e=(await this.postRequestAndWait({method:p.stellar_connect,params:[{}],interactionRequired:!this.loginMethod})).data?.address;return e?(this.address=e,{address:e}):g(-1,`The wallet has no Stellar address for this account.`)}catch(e){return _(e)}}async signTransaction(e,t){try{if(typeof e!=`string`||e.length===0)return g(-3,`Request is invalid. Please check the details.`,[`Missing transaction XDR`]);let n=this.networkMismatch(t?.networkPassphrase);if(n)return n;if(t?.submitUrl)return g(-3,`This wallet submits through its own Stellar network connection and cannot submit to a supplied URL.`,[`submitUrl is not supported`]);let r=await this.requireAddress(t?.address);if(`error`in r)return r;let i=(await this.postRequestAndWait({method:t?.submit?p.stellar_signAndSendTransaction:p.stellar_signTransaction,params:[{xdr:e,account:r.address,network:this.network}],interactionRequired:!0})).data;return i?.signedTxXdr?{signedTxXdr:i.signedTxXdr,signerAddress:r.address}:g(-1,`The wallet did not return a signed transaction.`)}catch(e){return _(e)}}async signMessage(e,t){try{if(typeof e!=`string`||e.length===0)return g(-3,`Request is invalid. Please check the details.`,[`Missing message`]);let n=this.networkMismatch(t?.networkPassphrase);if(n)return n;let r=await this.requireAddress(t?.address);if(`error`in r)return r;let i=(await this.postRequestAndWait({method:p.stellar_signMessage,params:[{message:e,account:r.address,network:this.network}],interactionRequired:!0})).data;return i?.signedMessage?{signedMessage:i.signedMessage,signerAddress:r.address}:g(-1,`The wallet did not return a signature.`)}catch(e){return _(e)}}async signAuthEntry(){return g(-1,`This wallet does not support Soroban authorization entries yet.`)}networkMismatch(e){if(!(!e||e===h[this.network]))return g(-3,`This wallet is connected to Stellar ${this.network}. Reconnect it to the network this transaction was built for.`,[`expected ${h[this.network]}`])}async requireAddress(e){let t=await this.getAddress();if(t.error)return{error:t.error};let n=t.address;return e&&e!==n?g(-3,`This wallet is not signing for the requested address.`,[`requested ${e}`]):{address:n}}async postRequestAndWait(t){let r;try{t.interactionRequired&&s({layout:t.method===p.login?`auth`:`signing`}),r=await this.walletMessageManager.postSilkRequest({method:t.method,params:t.params,interactionRequired:t.interactionRequired});let e=await l({eventEmitter:this.internalEventEmitter,id:r,method:t.method,interactionRequired:t.interactionRequired,signal:t.signal,timeoutMs:t.timeoutMs,onCancel:()=>{this.walletMessageManager.cancelSilkRequest(r,t.method),t.interactionRequired&&n()}});if(e.error)throw Error(e.error.message);return e}catch(i){throw t.interactionRequired&&r===void 0&&n(),e(i,{chain:`stellar`,method:String(t.method),requestId:r})}}};function y(e={}){let r=()=>(a(e),o(`tap`).contentWindow),i=e.deferIframe===!1,c=e.deferIframe===void 0,l=i?r():null;if(i&&!l)throw Error(`Failed to create WaaP iframe`);let d=new v(l,e,r,{...e,chains:[`stellar`]});i&&d.preload().catch(()=>void 0);let f=d.destroy.bind(d);if(d.destroy=()=>{f(),t()},c){let e=u(d),t=d.destroy.bind(d);d.destroy=()=>{e(),t()}}return d.ui.on(`show_modal`,()=>{s()}),d.ui.on(`hide_modal`,()=>{n()}),d}export{v as n,y as t};
|
package/dist/react.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useWaapTransaction, i as UseWaapTransactionReturn, n as TxState, r as UseWaapTransactionOptions, t as useWaapAuth } from "./useWaapAuth-
|
|
1
|
+
import { a as useWaapTransaction, i as UseWaapTransactionReturn, n as TxState, r as UseWaapTransactionOptions, t as useWaapAuth } from "./useWaapAuth-Be1YJk-7.mjs";
|
|
2
2
|
export { type TxState, type UseWaapTransactionOptions, type UseWaapTransactionReturn, useWaapAuth, useWaapTransaction };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useWaapTransaction, i as UseWaapTransactionReturn, n as TxState, r as UseWaapTransactionOptions, t as useWaapAuth } from "./useWaapAuth-
|
|
1
|
+
import { a as useWaapTransaction, i as UseWaapTransactionReturn, n as TxState, r as UseWaapTransactionOptions, t as useWaapAuth } from "./useWaapAuth-DSFDwJtt.js";
|
|
2
2
|
export { type TxState, type UseWaapTransactionOptions, type UseWaapTransactionReturn, useWaapAuth, useWaapTransaction };
|
package/dist/react.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useWaapAuth-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useWaapAuth-C9Cwu4XG.js");exports.useWaapAuth=e.t,exports.useWaapTransaction=e.n;
|
package/dist/react.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./useWaapAuth-
|
|
1
|
+
import{n as e,t}from"./useWaapAuth-Vh8gUs6Y.mjs";export{t as useWaapAuth,e as useWaapTransaction};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./ui-lV9LVoom.mjs";import{t}from"./SolanaProvider-DP9J8JuJ.mjs";function n(n,r={}){let i=new t(n,r);return i.setAccountMode(`tap`),i.selectAccountMode(`tap`).catch(()=>void 0),e(i),i}export{n as t};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { E as RequestPermissionTokenResult, T as RequestPermissionTokenParams, a as PermissionTokenClearResult, d as WaaPAccountMode, f as WaaPAccountStatus, m as WaaPSessionExtension, o as PermissionTokenQuery, r as LoginResponse, s as PermissionTokenStatus } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
import { a as SolanaConnectOutput, b as WaaPSolanaWalletFeatures, c as SolanaSignMessageInput, d as SolanaSignTransactionOutput, i as SolanaConnectInput, l as SolanaSignMessageOutput, n as SolanaAccount, o as SolanaSignAndSendTransactionInput, r as SolanaChain, s as SolanaSignAndSendTransactionOutput, t as InitWaaPSolanaOptions, u as SolanaSignTransactionInput, v as SolanaWalletEventListener, y as WaaPSolanaProviderInterface } from "./types-C7JDjWnt.mjs";
|
|
3
|
+
import { c as WaaPInitializerOptions } from "./types-Bai14yLc.mjs";
|
|
4
|
+
import { t as UIMessageManager } from "./UIMessageManager-4xqSTTBS.mjs";
|
|
4
5
|
//#region src/lib/solana/SolanaProvider.d.ts
|
|
5
6
|
declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
7
|
+
private readonly ownsSession;
|
|
6
8
|
/**
|
|
7
9
|
* Last conversion state the wallet actually reported. The synchronous status
|
|
8
10
|
* accessor cannot await the iframe, and previously answered `complete` for any
|
|
@@ -18,6 +20,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
18
20
|
private accountMode;
|
|
19
21
|
private loginMethod;
|
|
20
22
|
private _chains;
|
|
23
|
+
private readonly defaultChain;
|
|
21
24
|
private walletMessageManager;
|
|
22
25
|
private uiMessageManager;
|
|
23
26
|
private internalEventEmitter;
|
|
@@ -27,7 +30,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
27
30
|
private initializerOptions;
|
|
28
31
|
private initializerPromise;
|
|
29
32
|
private initializedIframeWindow;
|
|
30
|
-
constructor(iframeWindow: Window | null, options?: InitWaaPSolanaOptions, ensureIframe?: () => Window | null, initializerOptions?: WaaPInitializerOptions);
|
|
33
|
+
constructor(iframeWindow: Window | null, options?: InitWaaPSolanaOptions, ensureIframe?: () => Window | null, initializerOptions?: WaaPInitializerOptions, ownsSession?: boolean);
|
|
31
34
|
/** Release listeners owned by this Solana facade. */
|
|
32
35
|
destroy(): void;
|
|
33
36
|
private ensureIframeMounted;
|
|
@@ -45,7 +48,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
45
48
|
get ui(): UIMessageManager;
|
|
46
49
|
getAccountStatus(): WaaPAccountStatus;
|
|
47
50
|
get session(): WaaPSessionExtension;
|
|
48
|
-
getCanonicalAccountStatus(): Promise<WaaPAccountStatus>;
|
|
51
|
+
getCanonicalAccountStatus(input?: Pick<SolanaConnectInput, 'signal' | 'timeoutMs'>): Promise<WaaPAccountStatus>;
|
|
49
52
|
/** @internal Initializers set this once; applications select a mode by initializer. */
|
|
50
53
|
setAccountMode(mode: WaaPAccountMode): void;
|
|
51
54
|
/** @internal Tell the iframe which initializer family owns this facade. */
|
|
@@ -53,7 +56,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
53
56
|
/** @internal Shared multichain initializers propagate their EVM login here. */
|
|
54
57
|
setLoginMethod(loginMethod: LoginResponse): void;
|
|
55
58
|
getLoginMethod(): LoginResponse;
|
|
56
|
-
login(): Promise<LoginResponse>;
|
|
59
|
+
login(input?: SolanaConnectInput): Promise<LoginResponse>;
|
|
57
60
|
logout(): Promise<void>;
|
|
58
61
|
private refreshAccounts;
|
|
59
62
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./ui-CnG74RaM.js"),t=require("./SolanaProvider-BdeBP_ro.js");function n(n,r={}){let i=new t.t(n,r);return i.setAccountMode(`tap`),i.selectAccountMode(`tap`).catch(()=>void 0),e.s(i),i}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { E as RequestPermissionTokenResult, T as RequestPermissionTokenParams, a as PermissionTokenClearResult, d as WaaPAccountMode, f as WaaPAccountStatus, m as WaaPSessionExtension, o as PermissionTokenQuery, r as LoginResponse, s as PermissionTokenStatus } from "./types-Cc6tc4ut.js";
|
|
2
|
+
import { A as SuiSignPersonalMessageInput, B as WalletIcon, C as SuiChain, D as SuiSignAndExecuteTransactionBlockOutput, E as SuiSignAndExecuteTransactionBlockInput, L as SuiWalletEventListener, M as SuiSignTransactionBlockInput, N as SuiSignTransactionBlockOutput, O as SuiSignAndExecuteTransactionInput, P as SuiSignTransactionInput, S as SuiAccount, T as SuiConnectOutput, j as SuiSignPersonalMessageOutput, k as SuiSignAndExecuteTransactionOutput, w as SuiConnectInput, x as InitWaaPSuiOptions, z as WaaPSuiWalletInterface } from "./index-BkKBZpqc.js";
|
|
3
|
+
import { c as WaaPInitializerOptions } from "./types-DqdVfkaW.js";
|
|
4
|
+
import { t as UIMessageManager } from "./UIMessageManager-4xqSTTBS.js";
|
|
4
5
|
//#region src/lib/sui/SuiWallet.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* WaaP Sui Wallet implementation.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./ui-lV9LVoom.mjs";import{registerWallet as t}from"@mysten/wallet-standard";function n(n,r={}){let i=new e(n,r);return t(i),i}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./ui-
|
|
1
|
+
const e=require("./ui-CnG74RaM.js");let t=require("@mysten/wallet-standard");function n(n,r={}){let i=new e.c(n,r);return(0,t.registerWallet)(i),i}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { E as RequestPermissionTokenResult, T as RequestPermissionTokenParams, a as PermissionTokenClearResult, d as WaaPAccountMode, f as WaaPAccountStatus, m as WaaPSessionExtension, o as PermissionTokenQuery, r as LoginResponse, s as PermissionTokenStatus } from "./types-Cc6tc4ut.js";
|
|
2
|
+
import { a as SolanaConnectOutput, b as WaaPSolanaWalletFeatures, c as SolanaSignMessageInput, d as SolanaSignTransactionOutput, i as SolanaConnectInput, l as SolanaSignMessageOutput, n as SolanaAccount, o as SolanaSignAndSendTransactionInput, r as SolanaChain, s as SolanaSignAndSendTransactionOutput, t as InitWaaPSolanaOptions, u as SolanaSignTransactionInput, v as SolanaWalletEventListener, y as WaaPSolanaProviderInterface } from "./types-Bj5dDE-C.js";
|
|
3
|
+
import { c as WaaPInitializerOptions } from "./types-DqdVfkaW.js";
|
|
4
|
+
import { t as UIMessageManager } from "./UIMessageManager-4xqSTTBS.js";
|
|
4
5
|
//#region src/lib/solana/SolanaProvider.d.ts
|
|
5
6
|
declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
7
|
+
private readonly ownsSession;
|
|
6
8
|
/**
|
|
7
9
|
* Last conversion state the wallet actually reported. The synchronous status
|
|
8
10
|
* accessor cannot await the iframe, and previously answered `complete` for any
|
|
@@ -18,6 +20,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
18
20
|
private accountMode;
|
|
19
21
|
private loginMethod;
|
|
20
22
|
private _chains;
|
|
23
|
+
private readonly defaultChain;
|
|
21
24
|
private walletMessageManager;
|
|
22
25
|
private uiMessageManager;
|
|
23
26
|
private internalEventEmitter;
|
|
@@ -27,7 +30,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
27
30
|
private initializerOptions;
|
|
28
31
|
private initializerPromise;
|
|
29
32
|
private initializedIframeWindow;
|
|
30
|
-
constructor(iframeWindow: Window | null, options?: InitWaaPSolanaOptions, ensureIframe?: () => Window | null, initializerOptions?: WaaPInitializerOptions);
|
|
33
|
+
constructor(iframeWindow: Window | null, options?: InitWaaPSolanaOptions, ensureIframe?: () => Window | null, initializerOptions?: WaaPInitializerOptions, ownsSession?: boolean);
|
|
31
34
|
/** Release listeners owned by this Solana facade. */
|
|
32
35
|
destroy(): void;
|
|
33
36
|
private ensureIframeMounted;
|
|
@@ -45,7 +48,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
45
48
|
get ui(): UIMessageManager;
|
|
46
49
|
getAccountStatus(): WaaPAccountStatus;
|
|
47
50
|
get session(): WaaPSessionExtension;
|
|
48
|
-
getCanonicalAccountStatus(): Promise<WaaPAccountStatus>;
|
|
51
|
+
getCanonicalAccountStatus(input?: Pick<SolanaConnectInput, 'signal' | 'timeoutMs'>): Promise<WaaPAccountStatus>;
|
|
49
52
|
/** @internal Initializers set this once; applications select a mode by initializer. */
|
|
50
53
|
setAccountMode(mode: WaaPAccountMode): void;
|
|
51
54
|
/** @internal Tell the iframe which initializer family owns this facade. */
|
|
@@ -53,7 +56,7 @@ declare class WaaPSolanaProvider implements WaaPSolanaProviderInterface {
|
|
|
53
56
|
/** @internal Shared multichain initializers propagate their EVM login here. */
|
|
54
57
|
setLoginMethod(loginMethod: LoginResponse): void;
|
|
55
58
|
getLoginMethod(): LoginResponse;
|
|
56
|
-
login(): Promise<LoginResponse>;
|
|
59
|
+
login(input?: SolanaConnectInput): Promise<LoginResponse>;
|
|
57
60
|
logout(): Promise<void>;
|
|
58
61
|
private refreshAccounts;
|
|
59
62
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { E as RequestPermissionTokenResult, T as RequestPermissionTokenParams, a as PermissionTokenClearResult, d as WaaPAccountMode, f as WaaPAccountStatus, m as WaaPSessionExtension, o as PermissionTokenQuery, r as LoginResponse, s as PermissionTokenStatus } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
import { A as SuiSignPersonalMessageInput, B as WalletIcon, C as SuiChain, D as SuiSignAndExecuteTransactionBlockOutput, E as SuiSignAndExecuteTransactionBlockInput, L as SuiWalletEventListener, M as SuiSignTransactionBlockInput, N as SuiSignTransactionBlockOutput, O as SuiSignAndExecuteTransactionInput, P as SuiSignTransactionInput, S as SuiAccount, T as SuiConnectOutput, j as SuiSignPersonalMessageOutput, k as SuiSignAndExecuteTransactionOutput, w as SuiConnectInput, x as InitWaaPSuiOptions, z as WaaPSuiWalletInterface } from "./index-BOExImk3.mjs";
|
|
3
|
+
import { c as WaaPInitializerOptions } from "./types-Bai14yLc.mjs";
|
|
4
|
+
import { t as UIMessageManager } from "./UIMessageManager-4xqSTTBS.mjs";
|
|
4
5
|
//#region src/lib/sui/SuiWallet.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* WaaP Sui Wallet implementation.
|
package/dist/solana.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
1
|
+
import { _ as resolveWalletOrigin, g as WaaPWalletTargetOptions, h as WaaPEnvironment, v as validateWalletOrigin } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
import { a as subscribeWaaPIframeLifecycle, i as getWaaPIframeDiagnostics, n as WaaPIframeLifecycleEvent, r as WaaPIframeLifecyclePhase, t as WaaPIframeDiagnostics } from "./WalletModalController-DxiBiqDf.mjs";
|
|
3
|
+
import { _ as SolanaStandardSignTransactionOutput, a as SolanaConnectOutput, b as WaaPSolanaWalletFeatures, c as SolanaSignMessageInput, d as SolanaSignTransactionOutput, f as SolanaStandardSignAndSendTransactionInput, g as SolanaStandardSignTransactionInput, h as SolanaStandardSignMessageOutput, i as SolanaConnectInput, l as SolanaSignMessageOutput, m as SolanaStandardSignMessageInput, n as SolanaAccount, o as SolanaSignAndSendTransactionInput, p as SolanaStandardSignAndSendTransactionOutput, r as SolanaChain, s as SolanaSignAndSendTransactionOutput, t as InitWaaPSolanaOptions, u as SolanaSignTransactionInput, y as WaaPSolanaProviderInterface } from "./types-C7JDjWnt.mjs";
|
|
4
|
+
import { a as CancelWaaPPreload, c as preloadWaaPOnIdle, i as normalizeWaaPError, n as WaaPErrorCode, o as WaaPIdlePreloadOptions, r as WaaPOperationMetadata, s as WaaPPreloadTarget, t as WaaPError } from "./WaaPError-C2TOEGPx.mjs";
|
|
5
|
+
import { _ as initWaaPSolana } from "./index-BOExImk3.mjs";
|
|
6
|
+
import { n as WaaPSolanaProvider, t as registerWaaPSolanaWallet } from "./register-BKCJXsHB.mjs";
|
|
5
7
|
export { type CancelWaaPPreload, type InitWaaPSolanaOptions, type SolanaAccount, type SolanaChain, type SolanaConnectInput, type SolanaConnectOutput, type SolanaSignAndSendTransactionInput, type SolanaSignAndSendTransactionOutput, type SolanaSignMessageInput, type SolanaSignMessageOutput, type SolanaSignTransactionInput, type SolanaSignTransactionOutput, type SolanaStandardSignAndSendTransactionInput, type SolanaStandardSignAndSendTransactionOutput, type SolanaStandardSignMessageInput, type SolanaStandardSignMessageOutput, type SolanaStandardSignTransactionInput, type SolanaStandardSignTransactionOutput, type WaaPEnvironment, WaaPError, type WaaPErrorCode, type WaaPIdlePreloadOptions, type WaaPIframeDiagnostics, type WaaPIframeLifecycleEvent, type WaaPIframeLifecyclePhase, type WaaPOperationMetadata, type WaaPPreloadTarget, WaaPSolanaProvider, type WaaPSolanaProviderInterface, type WaaPSolanaWalletFeatures, type WaaPWalletTargetOptions, getWaaPIframeDiagnostics, initWaaPSolana as initWaaP, initWaaPSolana, normalizeWaaPError, preloadWaaPOnIdle, registerWaaPSolanaWallet, resolveWalletOrigin, subscribeWaaPIframeLifecycle, validateWalletOrigin };
|
package/dist/solana.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
1
|
+
import { _ as resolveWalletOrigin, g as WaaPWalletTargetOptions, h as WaaPEnvironment, v as validateWalletOrigin } from "./types-Cc6tc4ut.js";
|
|
2
|
+
import { a as subscribeWaaPIframeLifecycle, i as getWaaPIframeDiagnostics, n as WaaPIframeLifecycleEvent, r as WaaPIframeLifecyclePhase, t as WaaPIframeDiagnostics } from "./WalletModalController-16mHsFv2.js";
|
|
3
|
+
import { _ as SolanaStandardSignTransactionOutput, a as SolanaConnectOutput, b as WaaPSolanaWalletFeatures, c as SolanaSignMessageInput, d as SolanaSignTransactionOutput, f as SolanaStandardSignAndSendTransactionInput, g as SolanaStandardSignTransactionInput, h as SolanaStandardSignMessageOutput, i as SolanaConnectInput, l as SolanaSignMessageOutput, m as SolanaStandardSignMessageInput, n as SolanaAccount, o as SolanaSignAndSendTransactionInput, p as SolanaStandardSignAndSendTransactionOutput, r as SolanaChain, s as SolanaSignAndSendTransactionOutput, t as InitWaaPSolanaOptions, u as SolanaSignTransactionInput, y as WaaPSolanaProviderInterface } from "./types-Bj5dDE-C.js";
|
|
4
|
+
import { a as CancelWaaPPreload, c as preloadWaaPOnIdle, i as normalizeWaaPError, n as WaaPErrorCode, o as WaaPIdlePreloadOptions, r as WaaPOperationMetadata, s as WaaPPreloadTarget, t as WaaPError } from "./WaaPError-C2TOEGPx.js";
|
|
5
|
+
import { _ as initWaaPSolana } from "./index-BkKBZpqc.js";
|
|
6
|
+
import { n as WaaPSolanaProvider, t as registerWaaPSolanaWallet } from "./register-GiWQpcBY.js";
|
|
5
7
|
export { type CancelWaaPPreload, type InitWaaPSolanaOptions, type SolanaAccount, type SolanaChain, type SolanaConnectInput, type SolanaConnectOutput, type SolanaSignAndSendTransactionInput, type SolanaSignAndSendTransactionOutput, type SolanaSignMessageInput, type SolanaSignMessageOutput, type SolanaSignTransactionInput, type SolanaSignTransactionOutput, type SolanaStandardSignAndSendTransactionInput, type SolanaStandardSignAndSendTransactionOutput, type SolanaStandardSignMessageInput, type SolanaStandardSignMessageOutput, type SolanaStandardSignTransactionInput, type SolanaStandardSignTransactionOutput, type WaaPEnvironment, WaaPError, type WaaPErrorCode, type WaaPIdlePreloadOptions, type WaaPIframeDiagnostics, type WaaPIframeLifecycleEvent, type WaaPIframeLifecyclePhase, type WaaPOperationMetadata, type WaaPPreloadTarget, WaaPSolanaProvider, type WaaPSolanaProviderInterface, type WaaPSolanaWalletFeatures, type WaaPWalletTargetOptions, getWaaPIframeDiagnostics, initWaaPSolana as initWaaP, initWaaPSolana, normalizeWaaPError, preloadWaaPOnIdle, registerWaaPSolanaWallet, resolveWalletOrigin, subscribeWaaPIframeLifecycle, validateWalletOrigin };
|
package/dist/solana.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./UIMessageManager-D-OTya1E.js"),t=require("./ui-CnG74RaM.js"),n=require("./SolanaProvider-BdeBP_ro.js"),r=require("./register-BL_2Xqcc.js");exports.WaaPError=e.x,exports.WaaPSolanaProvider=n.t,exports.getWaaPIframeDiagnostics=e.s,exports.initWaaP=t.r,exports.initWaaPSolana=t.r,exports.normalizeWaaPError=e.S,exports.preloadWaaPOnIdle=e.r,exports.registerWaaPSolanaWallet=r.t,exports.resolveWalletOrigin=e.v,exports.subscribeWaaPIframeLifecycle=e.u,exports.validateWalletOrigin=e.y;
|
package/dist/solana.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as e,
|
|
1
|
+
import{S as e,r as t,s as n,u as r,v as i,x as a,y as o}from"./UIMessageManager-CtnIZgIY.mjs";import{r as s}from"./ui-lV9LVoom.mjs";import{t as c}from"./SolanaProvider-DP9J8JuJ.mjs";import{t as l}from"./register-B2G1larb.mjs";export{a as WaaPError,c as WaaPSolanaProvider,n as getWaaPIframeDiagnostics,s as initWaaP,s as initWaaPSolana,e as normalizeWaaPError,t as preloadWaaPOnIdle,l as registerWaaPSolanaWallet,i as resolveWalletOrigin,r as subscribeWaaPIframeLifecycle,o as validateWalletOrigin};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { _ as resolveWalletOrigin, g as WaaPWalletTargetOptions, h as WaaPEnvironment, v as validateWalletOrigin } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
import { a as subscribeWaaPIframeLifecycle, i as getWaaPIframeDiagnostics, n as WaaPIframeLifecycleEvent, r as WaaPIframeLifecyclePhase, t as WaaPIframeDiagnostics } from "./WalletModalController-DxiBiqDf.mjs";
|
|
3
|
+
import { a as CancelWaaPPreload, c as preloadWaaPOnIdle, n as WaaPErrorCode, o as WaaPIdlePreloadOptions, s as WaaPPreloadTarget, t as WaaPError } from "./WaaPError-C2TOEGPx.mjs";
|
|
4
|
+
import { a as StellarSignBlobOptions, i as StellarNetwork, n as Sep43Error, o as StellarSignTransactionOptions, r as Sep43Result, s as WaaPStellarProviderInterface, t as InitWaaPStellarOptions } from "./types-Bai14yLc.mjs";
|
|
5
|
+
import { n as WaaPStellarProvider, t as initWaaPStellar } from "./init-C3zCj5Lc.mjs";
|
|
6
|
+
export { type CancelWaaPPreload, type InitWaaPStellarOptions, type Sep43Error, type Sep43Result, type StellarNetwork, type StellarSignBlobOptions, type StellarSignTransactionOptions, type WaaPEnvironment, WaaPError, type WaaPErrorCode, type WaaPIdlePreloadOptions, type WaaPIframeDiagnostics, type WaaPIframeLifecycleEvent, type WaaPIframeLifecyclePhase, type WaaPPreloadTarget, WaaPStellarProvider, type WaaPStellarProviderInterface, type WaaPWalletTargetOptions, getWaaPIframeDiagnostics, initWaaPStellar as initWaaP, initWaaPStellar, preloadWaaPOnIdle, resolveWalletOrigin, subscribeWaaPIframeLifecycle, validateWalletOrigin };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { _ as resolveWalletOrigin, g as WaaPWalletTargetOptions, h as WaaPEnvironment, v as validateWalletOrigin } from "./types-Cc6tc4ut.js";
|
|
2
|
+
import { a as subscribeWaaPIframeLifecycle, i as getWaaPIframeDiagnostics, n as WaaPIframeLifecycleEvent, r as WaaPIframeLifecyclePhase, t as WaaPIframeDiagnostics } from "./WalletModalController-16mHsFv2.js";
|
|
3
|
+
import { a as CancelWaaPPreload, c as preloadWaaPOnIdle, n as WaaPErrorCode, o as WaaPIdlePreloadOptions, s as WaaPPreloadTarget, t as WaaPError } from "./WaaPError-C2TOEGPx.js";
|
|
4
|
+
import { a as StellarSignBlobOptions, i as StellarNetwork, n as Sep43Error, o as StellarSignTransactionOptions, r as Sep43Result, s as WaaPStellarProviderInterface, t as InitWaaPStellarOptions } from "./types-DqdVfkaW.js";
|
|
5
|
+
import { n as WaaPStellarProvider, t as initWaaPStellar } from "./init-C-52fEJS.js";
|
|
6
|
+
export { type CancelWaaPPreload, type InitWaaPStellarOptions, type Sep43Error, type Sep43Result, type StellarNetwork, type StellarSignBlobOptions, type StellarSignTransactionOptions, type WaaPEnvironment, WaaPError, type WaaPErrorCode, type WaaPIdlePreloadOptions, type WaaPIframeDiagnostics, type WaaPIframeLifecycleEvent, type WaaPIframeLifecyclePhase, type WaaPPreloadTarget, WaaPStellarProvider, type WaaPStellarProviderInterface, type WaaPWalletTargetOptions, getWaaPIframeDiagnostics, initWaaPStellar as initWaaP, initWaaPStellar, preloadWaaPOnIdle, resolveWalletOrigin, subscribeWaaPIframeLifecycle, validateWalletOrigin };
|
package/dist/stellar.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./UIMessageManager-D-OTya1E.js"),t=require("./init-BkrqKNet.js");exports.WaaPError=e.x,exports.WaaPStellarProvider=t.n,exports.getWaaPIframeDiagnostics=e.s,exports.initWaaP=t.t,exports.initWaaPStellar=t.t,exports.preloadWaaPOnIdle=e.r,exports.resolveWalletOrigin=e.v,exports.subscribeWaaPIframeLifecycle=e.u,exports.validateWalletOrigin=e.y;
|
package/dist/stellar.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,s as t,u as n,v as r,x as i,y as a}from"./UIMessageManager-CtnIZgIY.mjs";import{n as o,t as s}from"./init-CkYgm7Zu.mjs";export{i as WaaPError,o as WaaPStellarProvider,t as getWaaPIframeDiagnostics,s as initWaaP,s as initWaaPStellar,e as preloadWaaPOnIdle,r as resolveWalletOrigin,n as subscribeWaaPIframeLifecycle,a as validateWalletOrigin};
|
package/dist/sui.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { E as RequestPermissionTokenResult, T as RequestPermissionTokenParams, _ as resolveWalletOrigin, g as WaaPWalletTargetOptions, h as WaaPEnvironment, v as validateWalletOrigin } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
import { a as subscribeWaaPIframeLifecycle, i as getWaaPIframeDiagnostics, n as WaaPIframeLifecycleEvent, r as WaaPIframeLifecyclePhase, t as WaaPIframeDiagnostics } from "./WalletModalController-DxiBiqDf.mjs";
|
|
3
|
+
import { a as CancelWaaPPreload, c as preloadWaaPOnIdle, i as normalizeWaaPError, n as WaaPErrorCode, o as WaaPIdlePreloadOptions, r as WaaPOperationMetadata, s as WaaPPreloadTarget, t as WaaPError } from "./WaaPError-C2TOEGPx.mjs";
|
|
4
|
+
import { A as SuiSignPersonalMessageInput, C as SuiChain, F as SuiSignTransactionOutput, I as SuiTransactionInput, O as SuiSignAndExecuteTransactionInput, P as SuiSignTransactionInput, R as WaaPSuiWalletFeatures, S as SuiAccount, T as SuiConnectOutput, j as SuiSignPersonalMessageOutput, k as SuiSignAndExecuteTransactionOutput, w as SuiConnectInput, x as InitWaaPSuiOptions, y as initWaaPSui, z as WaaPSuiWalletInterface } from "./index-BOExImk3.mjs";
|
|
5
|
+
import { n as WaaPSuiWallet, t as registerWaaPSuiWallet } from "./register-mq9fTaSt.mjs";
|
|
5
6
|
export { type CancelWaaPPreload, type InitWaaPSuiOptions, type RequestPermissionTokenParams, type RequestPermissionTokenResult, type SuiAccount, type SuiChain, type SuiConnectInput, type SuiConnectOutput, type SuiSignAndExecuteTransactionInput, type SuiSignAndExecuteTransactionOutput, type SuiSignPersonalMessageInput, type SuiSignPersonalMessageOutput, type SuiSignTransactionInput, type SuiSignTransactionOutput, type SuiTransactionInput, type WaaPEnvironment, WaaPError, type WaaPErrorCode, type WaaPIdlePreloadOptions, type WaaPIframeDiagnostics, type WaaPIframeLifecycleEvent, type WaaPIframeLifecyclePhase, type WaaPOperationMetadata, type WaaPPreloadTarget, WaaPSuiWallet, type WaaPSuiWalletFeatures, type WaaPSuiWalletInterface, type WaaPWalletTargetOptions, getWaaPIframeDiagnostics, initWaaPSui as initWaaP, initWaaPSui, normalizeWaaPError, preloadWaaPOnIdle, registerWaaPSuiWallet, resolveWalletOrigin, subscribeWaaPIframeLifecycle, validateWalletOrigin };
|
package/dist/sui.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { E as RequestPermissionTokenResult, T as RequestPermissionTokenParams, _ as resolveWalletOrigin, g as WaaPWalletTargetOptions, h as WaaPEnvironment, v as validateWalletOrigin } from "./types-Cc6tc4ut.js";
|
|
2
|
+
import { a as subscribeWaaPIframeLifecycle, i as getWaaPIframeDiagnostics, n as WaaPIframeLifecycleEvent, r as WaaPIframeLifecyclePhase, t as WaaPIframeDiagnostics } from "./WalletModalController-16mHsFv2.js";
|
|
3
|
+
import { a as CancelWaaPPreload, c as preloadWaaPOnIdle, i as normalizeWaaPError, n as WaaPErrorCode, o as WaaPIdlePreloadOptions, r as WaaPOperationMetadata, s as WaaPPreloadTarget, t as WaaPError } from "./WaaPError-C2TOEGPx.js";
|
|
4
|
+
import { A as SuiSignPersonalMessageInput, C as SuiChain, F as SuiSignTransactionOutput, I as SuiTransactionInput, O as SuiSignAndExecuteTransactionInput, P as SuiSignTransactionInput, R as WaaPSuiWalletFeatures, S as SuiAccount, T as SuiConnectOutput, j as SuiSignPersonalMessageOutput, k as SuiSignAndExecuteTransactionOutput, w as SuiConnectInput, x as InitWaaPSuiOptions, y as initWaaPSui, z as WaaPSuiWalletInterface } from "./index-BkKBZpqc.js";
|
|
5
|
+
import { n as WaaPSuiWallet, t as registerWaaPSuiWallet } from "./register-C1hFwh4A.js";
|
|
5
6
|
export { type CancelWaaPPreload, type InitWaaPSuiOptions, type RequestPermissionTokenParams, type RequestPermissionTokenResult, type SuiAccount, type SuiChain, type SuiConnectInput, type SuiConnectOutput, type SuiSignAndExecuteTransactionInput, type SuiSignAndExecuteTransactionOutput, type SuiSignPersonalMessageInput, type SuiSignPersonalMessageOutput, type SuiSignTransactionInput, type SuiSignTransactionOutput, type SuiTransactionInput, type WaaPEnvironment, WaaPError, type WaaPErrorCode, type WaaPIdlePreloadOptions, type WaaPIframeDiagnostics, type WaaPIframeLifecycleEvent, type WaaPIframeLifecyclePhase, type WaaPOperationMetadata, type WaaPPreloadTarget, WaaPSuiWallet, type WaaPSuiWalletFeatures, type WaaPSuiWalletInterface, type WaaPWalletTargetOptions, getWaaPIframeDiagnostics, initWaaPSui as initWaaP, initWaaPSui, normalizeWaaPError, preloadWaaPOnIdle, registerWaaPSuiWallet, resolveWalletOrigin, subscribeWaaPIframeLifecycle, validateWalletOrigin };
|
package/dist/sui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./UIMessageManager-D-OTya1E.js"),t=require("./ui-CnG74RaM.js"),n=require("./register-Diu5wxsG.js");exports.WaaPError=e.x,exports.WaaPSuiWallet=t.c,exports.getWaaPIframeDiagnostics=e.s,exports.initWaaP=t.a,exports.initWaaPSui=t.a,exports.normalizeWaaPError=e.S,exports.preloadWaaPOnIdle=e.r,exports.registerWaaPSuiWallet=n.t,exports.resolveWalletOrigin=e.v,exports.subscribeWaaPIframeLifecycle=e.u,exports.validateWalletOrigin=e.y;
|
package/dist/sui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as e,
|
|
1
|
+
import{S as e,r as t,s as n,u as r,v as i,x as a,y as o}from"./UIMessageManager-CtnIZgIY.mjs";import{a as s,c}from"./ui-lV9LVoom.mjs";import{t as l}from"./register-CLpzYN7U.mjs";export{a as WaaPError,c as WaaPSuiWallet,n as getWaaPIframeDiagnostics,s as initWaaP,s as initWaaPSui,e as normalizeWaaPError,t as preloadWaaPOnIdle,l as registerWaaPSuiWallet,i as resolveWalletOrigin,r as subscribeWaaPIframeLifecycle,o as validateWalletOrigin};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { d as WaaPAccountMode, f as WaaPAccountStatus, r as LoginResponse, w as ProjectConfig, x as CustomConfig } from "./types-Cc6tc4ut.mjs";
|
|
2
|
+
//#region src/lib/initializerContext.d.ts
|
|
3
|
+
type WaaPInitializerOptions = {
|
|
4
|
+
referralCode?: string;
|
|
5
|
+
project?: ProjectConfig;
|
|
6
|
+
config?: CustomConfig;
|
|
7
|
+
chains?: readonly ('evm' | 'sui' | 'solana' | 'stellar')[];
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/lib/stellar/types.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* SEP-43 — the Stellar ecosystem's standard web wallet interface.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately not Wallet Standard. SEP-43 is a plain module interface, so
|
|
15
|
+
* there is no registry to publish to and no `features` map; a dapp either
|
|
16
|
+
* holds this object or it does not.
|
|
17
|
+
*
|
|
18
|
+
* The error convention is the standard's own and differs from every other
|
|
19
|
+
* facade here: a method RESOLVES with an `error` field rather than throwing.
|
|
20
|
+
* Dapps written against SEP-43 check `if (result.error)`, and a thrown
|
|
21
|
+
* exception would slip straight past that check.
|
|
22
|
+
*/
|
|
23
|
+
interface Sep43Error {
|
|
24
|
+
/** Human-readable and intended to be shown to the user as-is. */
|
|
25
|
+
message: string;
|
|
26
|
+
/**
|
|
27
|
+
* -1 internal wallet error, -2 external service, -3 invalid client request,
|
|
28
|
+
* -4 user rejected. The standard defines no "unsupported" code, so an
|
|
29
|
+
* unsupported method answers -1 and says so in `message`.
|
|
30
|
+
*/
|
|
31
|
+
code: -1 | -2 | -3 | -4;
|
|
32
|
+
/** Optional detail lines, e.g. a Horizon result code. */
|
|
33
|
+
ext?: string[];
|
|
34
|
+
}
|
|
35
|
+
type Sep43Result<T> = (T | Partial<Record<keyof T, never>>) & {
|
|
36
|
+
error?: Sep43Error;
|
|
37
|
+
};
|
|
38
|
+
type StellarNetwork = 'PUBLIC' | 'TESTNET';
|
|
39
|
+
interface StellarSignTransactionOptions {
|
|
40
|
+
networkPassphrase?: string;
|
|
41
|
+
address?: string;
|
|
42
|
+
/** Sign and submit in one call. The wallet submits through its own Horizon. */
|
|
43
|
+
submit?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Accepted only when it names the network the wallet is already configured
|
|
46
|
+
* for. See `StellarProvider.signTransaction` for why an arbitrary URL is
|
|
47
|
+
* refused rather than honoured.
|
|
48
|
+
*/
|
|
49
|
+
submitUrl?: string;
|
|
50
|
+
}
|
|
51
|
+
interface StellarSignBlobOptions {
|
|
52
|
+
networkPassphrase?: string;
|
|
53
|
+
address?: string;
|
|
54
|
+
}
|
|
55
|
+
interface WaaPStellarProviderInterface {
|
|
56
|
+
getAddress(): Promise<Sep43Result<{
|
|
57
|
+
address: string;
|
|
58
|
+
}>>;
|
|
59
|
+
signTransaction(xdr: string, opts?: StellarSignTransactionOptions): Promise<Sep43Result<{
|
|
60
|
+
signedTxXdr: string;
|
|
61
|
+
signerAddress: string;
|
|
62
|
+
}>>;
|
|
63
|
+
signAuthEntry(authEntry: string, opts?: StellarSignBlobOptions): Promise<Sep43Result<{
|
|
64
|
+
signedAuthEntry: string;
|
|
65
|
+
signerAddress: string;
|
|
66
|
+
}>>;
|
|
67
|
+
signMessage(message: string, opts?: StellarSignBlobOptions): Promise<Sep43Result<{
|
|
68
|
+
signedMessage: string;
|
|
69
|
+
signerAddress: string;
|
|
70
|
+
}>>;
|
|
71
|
+
getNetwork(): Promise<Sep43Result<{
|
|
72
|
+
network: StellarNetwork;
|
|
73
|
+
networkPassphrase: string;
|
|
74
|
+
}>>;
|
|
75
|
+
/** WaaP lifecycle, outside SEP-43 but needed to reach an account at all. */
|
|
76
|
+
login(): Promise<LoginResponse>;
|
|
77
|
+
logout(): Promise<void>;
|
|
78
|
+
disconnect(): Promise<void>;
|
|
79
|
+
getAccountStatus(): Promise<WaaPAccountStatus>;
|
|
80
|
+
preload(): Promise<void>;
|
|
81
|
+
destroy(): void;
|
|
82
|
+
setAccountMode(mode: WaaPAccountMode): void;
|
|
83
|
+
selectAccountMode(mode: WaaPAccountMode, options?: WaaPInitializerOptions): Promise<void>;
|
|
84
|
+
setLoginMethod(loginMethod: LoginResponse): void;
|
|
85
|
+
getLoginMethod(): LoginResponse;
|
|
86
|
+
}
|
|
87
|
+
interface InitWaaPStellarOptions extends WaaPInitializerOptions {
|
|
88
|
+
/** Defaults to pubnet. Testnet is opt-in so a mainnet dapp cannot land on it. */
|
|
89
|
+
network?: StellarNetwork;
|
|
90
|
+
walletOrigin?: string;
|
|
91
|
+
useStaging?: boolean;
|
|
92
|
+
iframeMode?: 'eager' | 'warmOnIdle' | 'lazy';
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { StellarSignBlobOptions as a, WaaPInitializerOptions as c, StellarNetwork as i, Sep43Error as n, StellarSignTransactionOptions as o, Sep43Result as r, WaaPStellarProviderInterface as s, InitWaaPStellarOptions as t };
|