@rango-dev/wallets-core 0.41.1-next.3 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hub/mod.d.ts +1 -0
- package/dist/hub/mod.d.ts.map +1 -1
- package/dist/hub/namespaces/mod.d.ts +1 -1
- package/dist/hub/namespaces/mod.d.ts.map +1 -1
- package/dist/hub/provider/types.d.ts +2 -0
- package/dist/hub/provider/types.d.ts.map +1 -1
- package/dist/mod.d.ts +1 -1
- package/dist/mod.d.ts.map +1 -1
- package/dist/namespaces/common/mod.js +1 -1
- package/dist/namespaces/evm/mod.js +1 -1
- package/dist/namespaces/solana/mod.js +1 -1
- package/dist/namespaces/sui/mod.js +1 -1
- package/dist/namespaces/utxo/actions.d.ts +2 -0
- package/dist/namespaces/utxo/actions.d.ts.map +1 -0
- package/dist/namespaces/utxo/after.d.ts +2 -0
- package/dist/namespaces/utxo/after.d.ts.map +1 -0
- package/dist/namespaces/utxo/and.d.ts +3 -0
- package/dist/namespaces/utxo/and.d.ts.map +1 -0
- package/dist/namespaces/utxo/before.d.ts +2 -0
- package/dist/namespaces/utxo/before.d.ts.map +1 -0
- package/dist/namespaces/utxo/builders.d.ts +4 -0
- package/dist/namespaces/utxo/builders.d.ts.map +1 -0
- package/dist/namespaces/utxo/constants.d.ts +3 -0
- package/dist/namespaces/utxo/constants.d.ts.map +1 -0
- package/dist/namespaces/utxo/mod.d.ts +8 -0
- package/dist/namespaces/utxo/mod.d.ts.map +1 -0
- package/dist/namespaces/utxo/mod.js +2 -0
- package/dist/namespaces/utxo/mod.js.map +7 -0
- package/dist/namespaces/utxo/types.d.ts +7 -0
- package/dist/namespaces/utxo/types.d.ts.map +1 -0
- package/dist/wallets-core.build.json +1 -1
- package/package.json +6 -2
- package/src/hub/mod.ts +1 -0
- package/src/hub/namespaces/mod.ts +1 -0
- package/src/hub/provider/types.ts +2 -0
- package/src/mod.ts +2 -0
- package/src/namespaces/utxo/actions.ts +3 -0
- package/src/namespaces/utxo/after.ts +3 -0
- package/src/namespaces/utxo/and.ts +5 -0
- package/src/namespaces/utxo/before.ts +3 -0
- package/src/namespaces/utxo/builders.ts +12 -0
- package/src/namespaces/utxo/constants.ts +2 -0
- package/src/namespaces/utxo/mod.ts +8 -0
- package/src/namespaces/utxo/types.ts +14 -0
package/dist/hub/mod.d.ts
CHANGED
package/dist/hub/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/hub/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/hub/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { Subscriber, State, RegisteredActions as ActionsMap, Context, Actions, } from './types.js';
|
|
1
|
+
export type { Subscriber, SubscriberCleanUp, State, RegisteredActions as ActionsMap, Context, Actions, } from './types.js';
|
|
2
2
|
export { Namespace } from './namespace.js';
|
|
3
3
|
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/hub/namespaces/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,KAAK,EACL,iBAAiB,IAAI,UAAU,EAC/B,OAAO,EACP,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/hub/namespaces/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,iBAAiB,IAAI,UAAU,EAC/B,OAAO,EACP,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import type { CosmosActions } from '../../namespaces/cosmos/mod.js';
|
|
|
5
5
|
import type { EvmActions } from '../../namespaces/evm/mod.js';
|
|
6
6
|
import type { SolanaActions } from '../../namespaces/solana/mod.js';
|
|
7
7
|
import type { SuiActions } from '../../namespaces/sui/mod.js';
|
|
8
|
+
import type { UtxoActions } from '../../namespaces/utxo/mod.js';
|
|
8
9
|
import type { AnyFunction, FunctionWithContext } from '../../types/actions.js';
|
|
9
10
|
import type { Prettify } from '../../types/utils.js';
|
|
10
11
|
export type Context = {
|
|
@@ -21,6 +22,7 @@ export interface CommonNamespaces {
|
|
|
21
22
|
solana: SolanaActions;
|
|
22
23
|
cosmos: CosmosActions;
|
|
23
24
|
sui: SuiActions;
|
|
25
|
+
utxo: UtxoActions;
|
|
24
26
|
}
|
|
25
27
|
export type CommonNamespaceKeys = Prettify<keyof CommonNamespaces>;
|
|
26
28
|
export interface ExtendableInternalActions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hub/provider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AAC5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,EAC9D,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KACZ,IAAI,CAAC;AACV,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,KAAK,CAAC;IACV,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,UAAU,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,GAAG,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hub/provider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AAC5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,EAC9D,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KACZ,IAAI,CAAC;AACV,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,KAAK,CAAC;IACV,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,UAAU,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,gBAAgB,CAAC,CAAC;AAEnE,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,mBAAmB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAClD;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,IAAI,GAAG,CAC1D,CAAC,EACD,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAC3B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC"}
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Store, State, ProviderInfo, CommonNamespaces, CommonNamespaceKeys, } from './hub/mod.js';
|
|
1
|
+
export type { Store, State, ProviderInfo, CommonNamespaces, CommonNamespaceKeys, Subscriber, SubscriberCleanUp, } from './hub/mod.js';
|
|
2
2
|
export { Hub, Provider, Namespace, createStore, guessProviderStateSelector, namespaceStateSelector, } from './hub/mod.js';
|
|
3
3
|
export type { ProxiedNamespace, FindProxiedNamespace } from './builders/mod.js';
|
|
4
4
|
export { NamespaceBuilder, ProviderBuilder, ActionBuilder, } from './builders/mod.js';
|
package/dist/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,GAAG,EACH,QAAQ,EACR,SAAS,EACT,WAAW,EACX,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAgB3B,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var u=Object.defineProperty;var t=(o,e)=>u(o,"name",{value:e,configurable:!0});var m=(o,e)=>{for(var
|
|
1
|
+
var u=Object.defineProperty;var t=(o,e)=>u(o,"name",{value:e,configurable:!0});var m=(o,e)=>{for(var r in e)u(o,r,{get:e[r],enumerable:!0})};var f={};m(f,{disconnect:()=>s,recommended:()=>x});function s(o){let[,e]=o.state();e("network",null),e("accounts",null),e("connected",!1),e("connecting",!1)}t(s,"disconnect");var x=[["disconnect",s]];var l={};m(l,{disconnect:()=>w});import{createStore as Ae}from"zustand/vanilla";import{produce as pe}from"immer";import{produce as ve}from"immer";var n=class{static{t(this,"ActionBuilder")}name;#e=new Map;#t=new Map;#o=new Map;#r=new Map;#n;constructor(e){this.name=e}and(e){return this.#e.has(this.name)||this.#e.set(this.name,[]),this.#e.get(this.name)?.push(e),this}or(e){return this.#t.has(this.name)||this.#t.set(this.name,[]),this.#t.get(this.name)?.push(e),this}before(e){return this.#r.has(this.name)||this.#r.set(this.name,[]),this.#r.get(this.name)?.push(e),this}after(e){return this.#o.has(this.name)||this.#o.set(this.name,[]),this.#o.get(this.name)?.push(e),this}action(e){return this.#n=e,this}build(){if(!this.#n)throw new Error("Your action builder should includes an action.");return{actionName:this.name,action:this.#n,before:this.#r,after:this.#o,and:this.#e,or:this.#t}}};import*as ot from"caip";var w=t(()=>new n("disconnect").action(s),"disconnect");function y(o){let[,e]=o.state();e("connecting",!1)}t(y,"intoConnectionFinished");var A=[["connect",y]];import{AccountId as N}from"caip";function d(o){try{return N.parse(o),!0}catch{return!1}}t(d,"isValidCaipAddress");function E(o,e){if(!e.every(d))throw new Error(`Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${e}`);let[,r]=o.state();return r("accounts",e),r("connected",!0),e}t(E,"connectAndUpdateStateForSingleNetwork");function k(o,e){if(!e.accounts.every(d))throw new Error(`Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${e.accounts}`);let[,r]=o.state();return r("accounts",e.accounts),r("network",e.network),r("connected",!0),e}t(k,"connectAndUpdateStateForMultiNetworks");var T=[];function S(o){let[,e]=o.state();e("connecting",!0)}t(S,"intoConnecting");var I=[["connect",S]];export{f as actions,A as afterRecommended,T as andRecommended,I as beforeRecommended,l as builders,k as connectAndUpdateStateForMultiNetworks,E as connectAndUpdateStateForSingleNetwork,S as intoConnecting,y as intoConnectionFinished};
|
|
2
2
|
//# sourceMappingURL=mod.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var A=Object.defineProperty;var t=(o,e)=>A(o,"name",{value:e,configurable:!0});var c=(o,e)=>{for(var
|
|
1
|
+
var A=Object.defineProperty;var t=(o,e)=>A(o,"name",{value:e,configurable:!0});var c=(o,e)=>{for(var r in e)A(o,r,{get:e[r],enumerable:!0})};var T={};c(T,{changeAccountSubscriber:()=>L,changeChainSubscriber:()=>Y,connect:()=>B,recommended:()=>U});import{AccountId as k}from"caip";function w(o){let[,e]=o.state();e("network",null),e("accounts",null),e("connected",!1),e("connecting",!1)}t(w,"disconnect");var P=[["disconnect",w]];var m="eip155",H="1";var I={};c(I,{getAccounts:()=>l,suggestNetwork:()=>E,switchNetwork:()=>N,switchOrAddNetwork:()=>y});async function l(o){let[e,r]=await Promise.all([o.request({method:"eth_requestAccounts"}),o.request({method:"eth_chainId"})]);return{accounts:e,chainId:r}}t(l,"getAccounts");async function E(o,e){return await o.request({method:"wallet_addEthereumChain",params:[e]})}t(E,"suggestNetwork");async function N(o,e){return await o.request({method:"wallet_switchEthereumChain",params:[{chainId:e}]})}t(N,"switchNetwork");async function y(o,e){try{let r=typeof e=="string"?e:e.chainId;await N(o,r)}catch(r){let n=r;throw typeof e!="string"&&(n.code===4902||!n.code)&&await E(o,e),r}}t(y,"switchOrAddNetwork");var U=[...P];function B(o){return async(e,r)=>{let n=o();if(!n)throw new Error("Do your wallet injected correctly and is evm compatible?");r&&await y(n,r);let s=await n.request({method:"eth_chainId"}),a=await l(n);return{accounts:a.accounts.map(v=>k.format({address:v,chainId:{namespace:m,reference:s}})),network:a.chainId}}}t(B,"connect");function L(o){let e;return[(r,n)=>{let s=o();if(!s)throw new Error("Trying to subscribe to your EVM wallet, but seems its instance is not available.");let[,a]=r.state();if(e=t(async p=>{if(!p||p.length===0){r.action("disconnect");return}let v=await s.request({method:"eth_chainId"}),V=p.map(M=>k.format({address:M,chainId:{namespace:m,reference:v}}));a("accounts",V)},"eventCallback"),s.on("accountsChanged",e),n instanceof Error)throw n},(r,n)=>{let s=o();if(e&&s&&s.removeListener("accountsChanged",e),n instanceof Error)throw n}]}t(L,"changeAccountSubscriber");function Y(o){let e;return[r=>{let n=o();if(!n)throw new Error("Trying to subscribe to your EVM wallet, but seems its instance is not available.");let[,s]=r.state();e=t(async a=>{s("network",a)},"eventCallback"),n.on("chainChanged",e)},()=>{let r=o();e&&r&&r.removeListener("chainChanged",e)}]}t(Y,"changeChainSubscriber");var _={};c(_,{recommended:()=>$});function u(o){let[,e]=o.state();e("connecting",!1)}t(u,"intoConnectionFinished");var x=[["connect",u]];var $=[...x];var K={};c(K,{recommended:()=>X});import{createStore as it}from"zustand/vanilla";import{produce as Le}from"immer";import{produce as Qe}from"immer";var i=class{static{t(this,"ActionBuilder")}name;#e=new Map;#t=new Map;#o=new Map;#r=new Map;#n;constructor(e){this.name=e}and(e){return this.#e.has(this.name)||this.#e.set(this.name,[]),this.#e.get(this.name)?.push(e),this}or(e){return this.#t.has(this.name)||this.#t.set(this.name,[]),this.#t.get(this.name)?.push(e),this}before(e){return this.#r.has(this.name)||this.#r.set(this.name,[]),this.#r.get(this.name)?.push(e),this}after(e){return this.#o.has(this.name)||this.#o.set(this.name,[]),this.#o.get(this.name)?.push(e),this}action(e){return this.#n=e,this}build(){if(!this.#n)throw new Error("Your action builder should includes an action.");return{actionName:this.name,action:this.#n,before:this.#r,after:this.#o,and:this.#e,or:this.#t}}};import*as Dt from"caip";import{AccountId as J}from"caip";function j(o){try{return J.parse(o),!0}catch{return!1}}t(j,"isValidCaipAddress");function d(o,e){if(!e.accounts.every(j))throw new Error(`Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${e.accounts}`);let[,r]=o.state();return r("accounts",e.accounts),r("network",e.network),r("connected",!0),e}t(d,"connectAndUpdateStateForMultiNetworks");function h(o){let[,e]=o.state();e("connecting",!0)}t(h,"intoConnecting");var b=[["connect",h]];var X=[["connect",d]];var F={};c(F,{recommended:()=>ee});var ee=[...b];var D={};c(D,{connect:()=>te});var te=t(()=>new i("connect").and(d).before(h).after(u),"connect");export{H as CAIP_ETHEREUM_CHAIN_ID,m as CAIP_NAMESPACE,T as actions,_ as after,K as and,F as before,D as builders,I as utils};
|
|
2
2
|
//# sourceMappingURL=mod.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var g=Object.defineProperty;var t=(o,e)=>g(o,"name",{value:e,configurable:!0});var a=(o,e)=>{for(var n in e)g(o,n,{get:e[n],enumerable:!0})};var
|
|
1
|
+
var g=Object.defineProperty;var t=(o,e)=>g(o,"name",{value:e,configurable:!0});var a=(o,e)=>{for(var n in e)g(o,n,{get:e[n],enumerable:!0})};var A={};a(A,{changeAccountSubscriber:()=>R,recommended:()=>j});import{AccountId as _}from"caip";function C(o){let[,e]=o.state();e("network",null),e("accounts",null),e("connected",!1),e("connecting",!1)}t(C,"disconnect");var b=[["disconnect",C]];var u="solana",f="5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";var j=[...b];function R(o){let e;return[(n,s)=>{let i=o();if(!i)throw new Error("Trying to subscribe to your Solana wallet, but seems its instance is not available.");let[,K]=n.state();if(e=t(x=>{if(!x){n.action("disconnect");return}K("accounts",[_.format({address:x.toString(),chainId:{namespace:u,reference:f}})])},"eventCallback"),i.on("accountChanged",e),s instanceof Error)throw s},(n,s)=>{let i=o();if(e&&i&&i.off("accountChanged",e),s instanceof Error)throw s}]}t(R,"changeAccountSubscriber");var P={};a(P,{recommended:()=>O});function p(o){let[,e]=o.state();e("connecting",!1)}t(p,"intoConnectionFinished");var h=[["connect",p]];var O=[...h];var I={};a(I,{recommended:()=>B});import{createStore as ze}from"zustand/vanilla";import{produce as Fe}from"immer";import{produce as De}from"immer";var r=class{static{t(this,"ActionBuilder")}name;#e=new Map;#t=new Map;#o=new Map;#n=new Map;#r;constructor(e){this.name=e}and(e){return this.#e.has(this.name)||this.#e.set(this.name,[]),this.#e.get(this.name)?.push(e),this}or(e){return this.#t.has(this.name)||this.#t.set(this.name,[]),this.#t.get(this.name)?.push(e),this}before(e){return this.#n.has(this.name)||this.#n.set(this.name,[]),this.#n.get(this.name)?.push(e),this}after(e){return this.#o.has(this.name)||this.#o.set(this.name,[]),this.#o.get(this.name)?.push(e),this}action(e){return this.#r=e,this}build(){if(!this.#r)throw new Error("Your action builder should includes an action.");return{actionName:this.name,action:this.#r,before:this.#n,after:this.#o,and:this.#e,or:this.#t}}};import*as Nt from"caip";import{AccountId as U}from"caip";function E(o){try{return U.parse(o),!0}catch{return!1}}t(E,"isValidCaipAddress");function c(o,e){if(!e.every(E))throw new Error(`Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${e}`);let[,n]=o.state();return n("accounts",e),n("connected",!0),e}t(c,"connectAndUpdateStateForSingleNetwork");function m(o){let[,e]=o.state();e("connecting",!0)}t(m,"intoConnecting");var S=[["connect",m]];var B=[["connect",c]];var k={};a(k,{recommended:()=>L});var L=[...S];var T={};a(T,{connect:()=>Y});var Y=t(()=>new r("connect").and(c).before(m).after(p),"connect");export{u as CAIP_NAMESPACE,f as CAIP_SOLANA_CHAIN_ID,A as actions,P as after,I as and,k as before,T as builders};
|
|
2
2
|
//# sourceMappingURL=mod.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var x=Object.defineProperty;var e=(o,t)=>x(o,"name",{value:t,configurable:!0});var g=(o,t)=>{for(var
|
|
1
|
+
var x=Object.defineProperty;var e=(o,t)=>x(o,"name",{value:t,configurable:!0});var g=(o,t)=>{for(var r in t)x(o,r,{get:t[r],enumerable:!0})};var C={};g(C,{changeAccountSubscriber:()=>T});import{AccountId as I}from"caip";var i="move",a="sui";function T(o){let t;return[(r,s)=>{let y=c(o.name),[,d]=r.state();if(t=e(u=>{u.accounts&&(u.accounts.length===0?r.action("disconnect"):d("accounts",u.accounts.map(E=>I.format({address:E.address,chainId:{namespace:i,reference:a}}))))},"eventCallback"),y.features["standard:events"].on("change",t),s instanceof Error)throw s},(r,s)=>{if(s instanceof Error)throw s}]}e(T,"changeAccountSubscriber");var N={};g(N,{connect:()=>W});import{createStore as De}from"zustand/vanilla";import{produce as be}from"immer";import{produce as Ie}from"immer";var n=class{static{e(this,"ActionBuilder")}name;#e=new Map;#t=new Map;#o=new Map;#r=new Map;#n;constructor(t){this.name=t}and(t){return this.#e.has(this.name)||this.#e.set(this.name,[]),this.#e.get(this.name)?.push(t),this}or(t){return this.#t.has(this.name)||this.#t.set(this.name,[]),this.#t.get(this.name)?.push(t),this}before(t){return this.#r.has(this.name)||this.#r.set(this.name,[]),this.#r.get(this.name)?.push(t),this}after(t){return this.#o.has(this.name)||this.#o.set(this.name,[]),this.#o.get(this.name)?.push(t),this}action(t){return this.#n=t,this}build(){if(!this.#n)throw new Error("Your action builder should includes an action.");return{actionName:this.name,action:this.#n,before:this.#r,after:this.#o,and:this.#e,or:this.#t}}};import*as P from"caip";function l(o){let[,t]=o.state();t("connecting",!1)}e(l,"intoConnectionFinished");import{AccountId as R}from"caip";function w(o){try{return R.parse(o),!0}catch{return!1}}e(w,"isValidCaipAddress");function v(o,t){if(!t.every(w))throw new Error(`Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${t}`);let[,r]=o.state();return r("accounts",t),r("connected",!0),t}e(v,"connectAndUpdateStateForSingleNetwork");function S(o){let[,t]=o.state();t("connecting",!0)}e(S,"intoConnecting");import{getWallets as V,SUI_MAINNET_CHAIN as D}from"@mysten/wallet-standard";function c(o){let t=V().get().find(r=>r.name===o&&r.chains.includes(D));if(!t)throw new Error("We couldn't find the Sui instance on your wallet. It may be fixed by refreshing the page.");return t}e(c,"getInstanceOrThrow");var W=e(o=>new n("connect").action(async function(){return(await c(o.name).features["standard:connect"].connect()).accounts.map(d=>P.AccountId.format({address:d.address,chainId:{namespace:i,reference:a}}))}).and(v).before(S).after(l),"connect");export{i as CAIP_NAMESPACE,a as CAIP_SUI_CHAIN_ID,C as actions,N as builders,c as getInstanceOrThrow};
|
|
2
2
|
//# sourceMappingURL=mod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/actions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,+EAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/after.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,sFAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"and.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/and.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,kBAAkB,CAAC;AAEzE,eAAO,MAAM,WAAW,wEAEvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"before.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/before.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,+EAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7C,eAAO,MAAM,OAAO,6CAIc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,qBAAqB,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as actions from './actions.js';
|
|
2
|
+
export * as after from './after.js';
|
|
3
|
+
export * as and from './and.js';
|
|
4
|
+
export * as before from './before.js';
|
|
5
|
+
export * as builders from './builders.js';
|
|
6
|
+
export type { ProviderAPI, UtxoActions } from './types.js';
|
|
7
|
+
export { CAIP_NAMESPACE, CAIP_BITCOIN_CHAIN_ID } from './constants.js';
|
|
8
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var v=Object.defineProperty;var t=(o,e)=>v(o,"name",{value:e,configurable:!0});var s=(o,e)=>{for(var n in e)v(o,n,{get:e[n],enumerable:!0})};var x={};s(x,{recommended:()=>E});function l(o){let[,e]=o.state();e("network",null),e("accounts",null),e("connected",!1),e("connecting",!1)}t(l,"disconnect");var y=[["disconnect",l]];var E=[...y];var S={};s(S,{recommended:()=>k});function a(o){let[,e]=o.state();e("connecting",!1)}t(a,"intoConnectionFinished");var d=[["connect",a]];var k=[...d];var A={};s(A,{recommended:()=>j});import{createStore as De}from"zustand/vanilla";import{produce as be}from"immer";import{produce as ke}from"immer";var r=class{static{t(this,"ActionBuilder")}name;#e=new Map;#t=new Map;#o=new Map;#r=new Map;#n;constructor(e){this.name=e}and(e){return this.#e.has(this.name)||this.#e.set(this.name,[]),this.#e.get(this.name)?.push(e),this}or(e){return this.#t.has(this.name)||this.#t.set(this.name,[]),this.#t.get(this.name)?.push(e),this}before(e){return this.#r.has(this.name)||this.#r.set(this.name,[]),this.#r.get(this.name)?.push(e),this}after(e){return this.#o.has(this.name)||this.#o.set(this.name,[]),this.#o.get(this.name)?.push(e),this}action(e){return this.#n=e,this}build(){if(!this.#n)throw new Error("Your action builder should includes an action.");return{actionName:this.name,action:this.#n,before:this.#r,after:this.#o,and:this.#e,or:this.#t}}};import*as vt from"caip";import{AccountId as O}from"caip";function b(o){try{return O.parse(o),!0}catch{return!1}}t(b,"isValidCaipAddress");function i(o,e){if(!e.every(b))throw new Error(`Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${e}`);let[,n]=o.state();return n("accounts",e),n("connected",!0),e}t(i,"connectAndUpdateStateForSingleNetwork");function p(o){let[,e]=o.state();e("connecting",!0)}t(p,"intoConnecting");var h=[["connect",p]];var j=[["connect",i]];var P={};s(P,{recommended:()=>_});var _=[...h];var N={};s(N,{connect:()=>V});var V=t(()=>new r("connect").and(i).before(p).after(a),"connect");var D="bip122",W="000000000019d6689c085ae165831e93";export{W as CAIP_BITCOIN_CHAIN_ID,D as CAIP_NAMESPACE,x as actions,S as after,A as and,P as before,N as builders};
|
|
2
|
+
//# sourceMappingURL=mod.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/namespaces/utxo/actions.ts", "../../../src/namespaces/common/actions.ts", "../../../src/namespaces/utxo/after.ts", "../../../src/namespaces/common/after.ts", "../../../src/namespaces/utxo/and.ts", "../../../src/hub/store/store.ts", "../../../src/hub/store/namespaces.ts", "../../../src/hub/store/providers.ts", "../../../src/builders/action.ts", "../../../src/utils/mod.ts", "../../../src/namespaces/common/helpers.ts", "../../../src/namespaces/common/and.ts", "../../../src/namespaces/common/before.ts", "../../../src/namespaces/utxo/before.ts", "../../../src/namespaces/utxo/builders.ts", "../../../src/namespaces/utxo/constants.ts"],
|
|
4
|
+
"sourcesContent": ["import { recommended as commonRecommended } from '../common/actions.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function disconnect(context: Context): void {\n const [, setState] = context.state();\n setState('network', null);\n setState('accounts', null);\n setState('connected', false);\n setState('connecting', false);\n}\n\nexport const recommended = [['disconnect', disconnect] as const];\n", "import { recommended as commonRecommended } from '../common/after.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function intoConnectionFinished(context: Context) {\n const [, setState] = context.state();\n setState('connecting', false);\n}\n\nexport const recommended = [['connect', intoConnectionFinished] as const];\n", "import { connectAndUpdateStateForSingleNetwork } from '../common/mod.js';\n\nexport const recommended = [\n ['connect', connectAndUpdateStateForSingleNetwork] as const,\n];\n", "import type { StoreApi } from 'zustand/vanilla';\n\nimport { createStore as createZustandStore } from 'zustand/vanilla';\n\nimport { extend, type Store } from './extend.js';\nimport { hubStore, type HubStore } from './hub.js';\nimport { namespacesStore, type NamespaceStore } from './namespaces.js';\nimport { providersStore, type ProviderStore } from './providers.js';\n\n/************ State ************/\n\nexport interface State {\n hub: HubStore;\n providers: ProviderStore;\n namespaces: NamespaceStore;\n}\n\nexport type RawStore = StoreApi<State>;\n\nexport const createStore = (): Store => {\n const store = createZustandStore<State>((...api) => {\n return {\n hub: hubStore(...api),\n providers: providersStore(...api),\n namespaces: namespacesStore(...api),\n };\n });\n\n return extend(store);\n};\n", "/************ Namespace ************/\n\nimport type { StateCreator } from 'zustand';\n\nimport { produce } from 'immer';\n\nimport {\n ConsumableEvents,\n type NamespaceConnectedEvent,\n type NamespaceDisconnectedEvent,\n type NamespaceSwitchedAccountEvent,\n type NamespaceSwitchedNetworkEvent,\n} from './events.js';\nimport { namespaceStateSelector, type State } from './mod.js';\n\n// Currently, namespace doesn't has any config.\nexport type NamespaceConfig = object;\n\nexport interface NamespaceData {\n accounts: null | string[];\n network: null | string;\n connected: boolean;\n connecting: boolean;\n}\n\ninterface NamespaceInfo {\n providerId: string;\n namespaceId: string;\n}\n\ninterface NamespaceItem {\n info: NamespaceInfo;\n data: NamespaceData;\n error: unknown;\n}\n\ntype NamespaceState = {\n events: InstanceType<typeof ConsumableEvents>;\n list: Record<string, NamespaceItem>;\n};\n\ninterface NamespaceActions {\n addNamespace: (id: string, config: NamespaceInfo) => void;\n updateStatus: <K extends keyof NamespaceData>(\n id: string,\n key: K,\n value: NamespaceData[K]\n ) => void;\n\n _produceEventsWhenUpdatingStatus: <K extends keyof NamespaceData>(\n namespace: NamespaceItem,\n id: string,\n key: K,\n value: NamespaceData[K]\n ) => void;\n}\ninterface NamespaceSelectors {\n getNamespaceData(storeId: string): NamespaceData;\n}\n\nexport type NamespaceStore = NamespaceState &\n NamespaceActions &\n NamespaceSelectors;\ntype NamespaceStateCreator = StateCreator<State, [], [], NamespaceStore>;\n\nconst namespacesStore: NamespaceStateCreator = (set, get) => ({\n events: new ConsumableEvents(),\n\n list: {},\n addNamespace: (id, info) => {\n const data: NamespaceData = {\n accounts: null,\n network: null,\n connected: false,\n connecting: false,\n };\n\n const item = {\n data,\n error: '',\n info,\n };\n\n set(\n produce((state: State) => {\n state.namespaces.list[id] = item;\n })\n );\n },\n updateStatus: (id, key, value) => {\n const ns = get().namespaces.list[id];\n if (!ns) {\n throw new Error(`No namespace with '${id}' found.`);\n }\n\n get().namespaces._produceEventsWhenUpdatingStatus(ns, id, key, value);\n\n // Updating state\n set(\n produce((state: State) => {\n state.namespaces.list[id].data[key] = value;\n })\n );\n },\n getNamespaceData(storeId) {\n return namespaceStateSelector(get(), storeId);\n },\n\n _produceEventsWhenUpdatingStatus: (namespace, id, key, value) => {\n if (key === 'accounts') {\n // check for both null and empty array\n const isAccountsEmpty =\n Object.is(value, null) || (Array.isArray(value) && value.length === 0);\n\n if (isAccountsEmpty) {\n const currentConnectedStatus = get().namespaces.list[id].data.connected;\n if (currentConnectedStatus) {\n const event: NamespaceDisconnectedEvent = {\n type: 'namespace_disconnected',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n };\n\n get().namespaces.events.push(event);\n }\n // Skip emitting disconnect event, if the `connected` is false\n } else {\n const currentAccounts = get().namespaces.list[id].data.accounts;\n\n if (!currentAccounts) {\n const event: NamespaceConnectedEvent = {\n type: 'namespace_connected',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n accounts: value as string[],\n };\n\n get().namespaces.events.push(event);\n } else {\n const areSameAccounts =\n currentAccounts.sort().toString() ===\n (value as string[]).sort().toString();\n\n if (!areSameAccounts) {\n const event: NamespaceSwitchedAccountEvent = {\n type: 'namespace_account_switched',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n previousAccounts: currentAccounts,\n accounts: value as string[],\n };\n\n get().namespaces.events.push(event);\n }\n }\n }\n } else if (key === 'network') {\n const currentNetwork = get().namespaces.list[id].data.network;\n\n const event: NamespaceSwitchedNetworkEvent = {\n type: 'namespace_network_switched',\n provider: namespace.info.providerId,\n namespace: namespace.info.namespaceId,\n network: value as string,\n previousNetwork: currentNetwork,\n };\n\n get().namespaces.events.push(event);\n }\n },\n});\n\nexport { namespacesStore };\n", "import type { Namespace } from '../../namespaces/common/types.js';\nimport type { State as InternalProviderState } from '../provider/mod.js';\nimport type { StateCreator } from 'zustand';\n\nimport { produce } from 'immer';\n\nimport { ConsumableEvents, type ProviderDetectedEvent } from './events.js';\nimport { guessProviderStateSelector, type State } from './mod.js';\n\ntype Browsers = 'firefox' | 'chrome' | 'edge' | 'brave' | 'homepage';\ntype Property<N extends string, V> = { name: N; value: V };\ntype DetachedInstances = Property<'detached', Namespace[]>;\n\nexport type ProviderInfo = {\n name: string;\n icon: string;\n extensions: Partial<Record<Browsers, string>>;\n properties?: DetachedInstances[];\n};\n\nexport interface ProviderConfig {\n info: ProviderInfo;\n}\n\ninterface ProviderData {\n installed: boolean;\n}\n\ninterface ProviderItem {\n config: ProviderConfig;\n data: ProviderData;\n error: unknown;\n}\n\ntype ProviderState = {\n events: ConsumableEvents;\n list: Record<string, ProviderItem>;\n};\ninterface ProviderActions {\n addProvider: (id: string, config: ProviderConfig) => void;\n updateStatus: <K extends keyof ProviderData>(\n id: string,\n key: K,\n value: ProviderData[K]\n ) => void;\n\n _produceEventsWhenUpdatingStatus: <K extends keyof ProviderData>(\n provider: ProviderItem,\n id: string,\n key: K,\n value: ProviderData[K]\n ) => void;\n}\n\ninterface ProviderSelectors {\n /**\n * Provider has a limited state to itself, to be compatible with legacy, we try to produce same object as legacy\n * which includes namespace state as well.\n */\n guessNamespacesState: (id: string) => InternalProviderState;\n}\n\nexport type ProviderStore = ProviderState & ProviderActions & ProviderSelectors;\ntype ProvidersStateCreator = StateCreator<State, [], [], ProviderStore>;\n\nconst providersStore: ProvidersStateCreator = (set, get) => ({\n events: new ConsumableEvents(),\n\n list: {},\n addProvider: (id, config) => {\n const item = {\n data: {\n installed: false,\n },\n error: '',\n config,\n };\n\n set(\n produce((state: State) => {\n state.providers.list[id] = item;\n })\n );\n },\n updateStatus: (id, key, value) => {\n const provider = get().providers.list[id];\n if (!provider) {\n throw new Error(`No namespace namespace with '${id}' found.`);\n }\n\n get().providers._produceEventsWhenUpdatingStatus(provider, id, key, value);\n\n set(\n produce((state: State) => {\n state.providers.list[id].data[key] = value;\n })\n );\n },\n guessNamespacesState: (providerId: string): InternalProviderState => {\n return guessProviderStateSelector(get(), providerId);\n },\n\n _produceEventsWhenUpdatingStatus: (_provider, id, key, _value) => {\n if (key === 'installed') {\n const event: ProviderDetectedEvent = {\n type: 'provider_detected',\n provider: id,\n };\n\n get().providers.events.push(event);\n }\n },\n});\n\nexport { providersStore };\n", "import type { Actions, Context, Operators } from '../hub/namespaces/types.js';\nimport type { AnyFunction, FunctionWithContext } from '../types/actions.js';\n\nexport interface ActionByBuilder<T, Context> {\n actionName: keyof T;\n and: Operators<T>;\n or: Operators<T>;\n after: Operators<T>;\n before: Operators<T>;\n action: FunctionWithContext<T[keyof T], Context>;\n}\n\n/*\n * TODO:\n * Currently, to use this builder you will write something like this:\n * new ActionBuilder<EvmActions, 'disconnect'>('disconnect').after(....)\n *\n * I couldn't figure it out to be able typescript infer the constructor value as key of actions.\n * Ideal usage:\n * new ActionBuilder<EvmActions>('disconnect').after(....)\n *\n */\nexport class ActionBuilder<T extends Actions<T>, K extends keyof T> {\n readonly name: K;\n #and: Operators<T> = new Map();\n #or: Operators<T> = new Map();\n #after: Operators<T> = new Map();\n #before: Operators<T> = new Map();\n #action: FunctionWithContext<T[keyof T], Context<T>> | undefined;\n\n constructor(name: K) {\n this.name = name;\n }\n\n public and(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#and.has(this.name)) {\n this.#and.set(this.name, []);\n }\n this.#and.get(this.name)?.push(action);\n return this;\n }\n\n public or(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#or.has(this.name)) {\n this.#or.set(this.name, []);\n }\n this.#or.get(this.name)?.push(action);\n return this;\n }\n\n public before(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#before.has(this.name)) {\n this.#before.set(this.name, []);\n }\n this.#before.get(this.name)?.push(action);\n return this;\n }\n\n public after(action: FunctionWithContext<AnyFunction, Context<T>>) {\n if (!this.#after.has(this.name)) {\n this.#after.set(this.name, []);\n }\n this.#after.get(this.name)?.push(action);\n return this;\n }\n\n public action(action: FunctionWithContext<T[keyof T], Context<T>>) {\n this.#action = action;\n return this;\n }\n\n public build(): ActionByBuilder<T, Context<T>> {\n if (!this.#action) {\n throw new Error('Your action builder should includes an action.');\n }\n\n return {\n actionName: this.name,\n action: this.#action,\n before: this.#before,\n after: this.#after,\n and: this.#and,\n or: this.#or,\n };\n }\n}\n", "/*\n * It is not a good idea to re-export all of CAIP because if they have a breaking change, we will break as well.\n * It would be better to create an abstraction over them and export our own interface to ensure it is under our control.\n */\nexport * as CAIP from 'caip';\n\nexport { generateStoreId } from '../hub/helpers.js';\nexport * from './versions.js';\n", "import { AccountId } from 'caip';\n\nexport function isValidCaipAddress(address: string): boolean {\n try {\n AccountId.parse(address);\n return true;\n } catch {\n return false;\n }\n}\n", "import type {\n Accounts,\n AccountsWithActiveChain,\n} from './../../types/accounts.js';\nimport type { Context } from '../../hub/namespaces/mod.js';\n\nimport { isValidCaipAddress } from './helpers.js';\n\nexport function connectAndUpdateStateForSingleNetwork(\n context: Context,\n accounts: Accounts\n) {\n if (!accounts.every(isValidCaipAddress)) {\n throw new Error(\n `Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${accounts}`\n );\n }\n\n const [, setState] = context.state();\n setState('accounts', accounts);\n setState('connected', true);\n return accounts;\n}\n\nexport function connectAndUpdateStateForMultiNetworks(\n context: Context,\n accounts: AccountsWithActiveChain\n) {\n if (!accounts.accounts.every(isValidCaipAddress)) {\n throw new Error(\n `Your provider should format account addresses in CAIP-10 format. Your provided accounts: ${accounts.accounts}`\n );\n }\n\n const [, setState] = context.state();\n setState('accounts', accounts.accounts);\n setState('network', accounts.network);\n setState('connected', true);\n return accounts;\n}\n\nexport const recommended = [];\n", "import type { Context } from '../../hub/namespaces/mod.js';\n\nexport function intoConnecting(context: Context) {\n const [, setState] = context.state();\n setState('connecting', true);\n}\n\n// Please consider if you are going to add something here, make sure it works on all namespaces.\nexport const recommended = [['connect', intoConnecting] as const];\n", "import { recommended as commonRecommended } from '../common/before.js';\n\nexport const recommended = [...commonRecommended];\n", "import type { UtxoActions } from './types.js';\n\nimport { ActionBuilder } from '../../mod.js';\nimport { intoConnectionFinished } from '../common/after.js';\nimport { connectAndUpdateStateForSingleNetwork } from '../common/and.js';\nimport { intoConnecting } from '../common/before.js';\n\nexport const connect = () =>\n new ActionBuilder<UtxoActions, 'connect'>('connect')\n .and(connectAndUpdateStateForSingleNetwork)\n .before(intoConnecting)\n .after(intoConnectionFinished);\n", "export const CAIP_NAMESPACE = 'bip122';\nexport const CAIP_BITCOIN_CHAIN_ID = '000000000019d6689c085ae165831e93';\n"],
|
|
5
|
+
"mappings": "6IAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEO,SAASC,EAAWC,EAAwB,CACjD,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,UAAW,IAAI,EACxBA,EAAS,WAAY,IAAI,EACzBA,EAAS,YAAa,EAAK,EAC3BA,EAAS,aAAc,EAAK,CAC9B,CANgBC,EAAAH,EAAA,cAQT,IAAMI,EAAc,CAAC,CAAC,aAAcJ,CAAU,CAAU,EDRxD,IAAMK,EAAc,CAAC,GAAGA,CAAiB,EEFhD,IAAAC,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEO,SAASC,EAAuBC,EAAkB,CACvD,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,aAAc,EAAK,CAC9B,CAHgBC,EAAAH,EAAA,0BAKT,IAAMI,EAAc,CAAC,CAAC,UAAWJ,CAAsB,CAAU,EDLjE,IAAMK,EAAc,CAAC,GAAGA,CAAiB,EEFhD,IAAAC,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,ICEA,OAAS,eAAeC,OAA0B,kBCElD,OAAS,WAAAC,OAAe,QCAxB,OAAS,WAAAC,OAAe,QCkBjB,IAAMC,EAAN,KAA6D,CAtBpE,MAsBoE,CAAAC,EAAA,sBACzD,KACTC,GAAqB,IAAI,IACzBC,GAAoB,IAAI,IACxBC,GAAuB,IAAI,IAC3BC,GAAwB,IAAI,IAC5BC,GAEA,YAAYC,EAAS,CACnB,KAAK,KAAOA,CACd,CAEO,IAAIC,EAAsD,CAC/D,OAAK,KAAKN,GAAK,IAAI,KAAK,IAAI,GAC1B,KAAKA,GAAK,IAAI,KAAK,KAAM,CAAC,CAAC,EAE7B,KAAKA,GAAK,IAAI,KAAK,IAAI,GAAG,KAAKM,CAAM,EAC9B,IACT,CAEO,GAAGA,EAAsD,CAC9D,OAAK,KAAKL,GAAI,IAAI,KAAK,IAAI,GACzB,KAAKA,GAAI,IAAI,KAAK,KAAM,CAAC,CAAC,EAE5B,KAAKA,GAAI,IAAI,KAAK,IAAI,GAAG,KAAKK,CAAM,EAC7B,IACT,CAEO,OAAOA,EAAsD,CAClE,OAAK,KAAKH,GAAQ,IAAI,KAAK,IAAI,GAC7B,KAAKA,GAAQ,IAAI,KAAK,KAAM,CAAC,CAAC,EAEhC,KAAKA,GAAQ,IAAI,KAAK,IAAI,GAAG,KAAKG,CAAM,EACjC,IACT,CAEO,MAAMA,EAAsD,CACjE,OAAK,KAAKJ,GAAO,IAAI,KAAK,IAAI,GAC5B,KAAKA,GAAO,IAAI,KAAK,KAAM,CAAC,CAAC,EAE/B,KAAKA,GAAO,IAAI,KAAK,IAAI,GAAG,KAAKI,CAAM,EAChC,IACT,CAEO,OAAOA,EAAqD,CACjE,YAAKF,GAAUE,EACR,IACT,CAEO,OAAwC,CAC7C,GAAI,CAAC,KAAKF,GACR,MAAM,IAAI,MAAM,gDAAgD,EAGlE,MAAO,CACL,WAAY,KAAK,KACjB,OAAQ,KAAKA,GACb,OAAQ,KAAKD,GACb,MAAO,KAAKD,GACZ,IAAK,KAAKF,GACV,GAAI,KAAKC,EACX,CACF,CACF,ECjFA,UAAYM,OAAU,OCJtB,OAAS,aAAAC,MAAiB,OAEnB,SAASC,EAAmBC,EAA0B,CAC3D,GAAI,CACF,OAAAC,EAAU,MAAMD,CAAO,EAChB,EACT,MAAQ,CACN,MAAO,EACT,CACF,CAPgBE,EAAAH,EAAA,sBCMT,SAASI,EACdC,EACAC,EACA,CACA,GAAI,CAACA,EAAS,MAAMC,CAAkB,EACpC,MAAM,IAAI,MACR,4FAA4FD,CAAQ,EACtG,EAGF,GAAM,CAAC,CAAEE,CAAQ,EAAIH,EAAQ,MAAM,EACnC,OAAAG,EAAS,WAAYF,CAAQ,EAC7BE,EAAS,YAAa,EAAI,EACnBF,CACT,CAdgBG,EAAAL,EAAA,yCCNT,SAASM,EAAeC,EAAkB,CAC/C,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EACnCC,EAAS,aAAc,EAAI,CAC7B,CAHgBC,EAAAH,EAAA,kBAMT,IAAMI,EAAc,CAAC,CAAC,UAAWJ,CAAc,CAAU,ERNzD,IAAMK,EAAc,CACzB,CAAC,UAAWC,CAAqC,CACnD,ESJA,IAAAC,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAEO,IAAMC,EAAc,CAAC,GAAGA,CAAiB,ECFhD,IAAAC,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAOO,IAAMC,EAAUC,EAAA,IACrB,IAAIC,EAAsC,SAAS,EAChD,IAAIC,CAAqC,EACzC,OAAOC,CAAc,EACrB,MAAMC,CAAsB,EAJV,WCPhB,IAAMC,EAAiB,SACjBC,EAAwB",
|
|
6
|
+
"names": ["actions_exports", "__export", "recommended", "disconnect", "context", "setState", "__name", "recommended", "recommended", "after_exports", "__export", "recommended", "intoConnectionFinished", "context", "setState", "__name", "recommended", "recommended", "and_exports", "__export", "recommended", "createZustandStore", "produce", "produce", "ActionBuilder", "__name", "#and", "#or", "#after", "#before", "#action", "name", "action", "CAIP", "AccountId", "isValidCaipAddress", "address", "AccountId", "__name", "connectAndUpdateStateForSingleNetwork", "context", "accounts", "isValidCaipAddress", "setState", "__name", "intoConnecting", "context", "setState", "__name", "recommended", "recommended", "connectAndUpdateStateForSingleNetwork", "before_exports", "__export", "recommended", "recommended", "builders_exports", "__export", "connect", "connect", "__name", "ActionBuilder", "connectAndUpdateStateForSingleNetwork", "intoConnecting", "intoConnectionFinished", "CAIP_NAMESPACE", "CAIP_BITCOIN_CHAIN_ID"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Accounts } from '../../types/accounts.js';
|
|
2
|
+
import type { AutoImplementedActionsByRecommended, CommonActions } from '../common/types.js';
|
|
3
|
+
export interface UtxoActions extends AutoImplementedActionsByRecommended, CommonActions {
|
|
4
|
+
connect: () => Promise<Accounts>;
|
|
5
|
+
}
|
|
6
|
+
export type ProviderAPI = Record<string, any>;
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/namespaces/utxo/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EACV,mCAAmC,EACnC,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,WACf,SAAQ,mCAAmC,EACzC,aAAa;IACf,OAAO,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;CAClC;AAGD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/hub/helpers.ts":{"bytes":371,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/errors.ts":{"bytes":328,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/namespace.ts":{"bytes":12251,"imports":[{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/hub/namespaces/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/mod.ts":{"bytes":160,"imports":[{"path":"src/hub/namespaces/namespace.ts","kind":"import-statement","original":"./namespace.js"}],"format":"esm"},"src/hub/provider/provider.ts":{"bytes":9080,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/provider/mod.ts":{"bytes":196,"imports":[{"path":"src/hub/provider/provider.ts","kind":"import-statement","original":"./provider.js"}],"format":"esm"},"src/hub/hub.ts":{"bytes":3050,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/selectors.ts":{"bytes":2225,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/extend.ts":{"bytes":3898,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/hub.ts":{"bytes":342,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/events.ts":{"bytes":1956,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/namespaces.ts":{"bytes":4638,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/providers.ts":{"bytes":2966,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/store.ts":{"bytes":808,"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"src/hub/store/extend.ts","kind":"import-statement","original":"./extend.js"},{"path":"src/hub/store/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/namespaces.ts","kind":"import-statement","original":"./namespaces.js"},{"path":"src/hub/store/providers.ts","kind":"import-statement","original":"./providers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/mod.ts":{"bytes":627,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"src/hub/store/store.ts","kind":"import-statement","original":"./store.js"}],"format":"esm"},"src/hub/mod.ts":{"bytes":428,"imports":[{"path":"src/hub/namespaces/mod.ts","kind":"import-statement","original":"./namespaces/mod.js"},{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"./provider/mod.js"},{"path":"src/hub/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./store/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"}],"format":"esm"},"src/builders/namespace.ts":{"bytes":6879,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/provider.ts":{"bytes":1584,"imports":[{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"../hub/provider/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/action.ts":{"bytes":2385,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/mod.ts":{"bytes":220,"imports":[{"path":"src/builders/namespace.ts","kind":"import-statement","original":"./namespace.js"},{"path":"src/builders/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"src/builders/action.ts","kind":"import-statement","original":"./action.js"}],"format":"esm"},"src/utils/versions.ts":{"bytes":1851,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/mod.ts":{"bytes":356,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../hub/helpers.js"},{"path":"src/utils/versions.ts","kind":"import-statement","original":"./versions.js"}],"format":"esm"},"src/mod.ts":{"bytes":1344,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/builders/mod.ts","kind":"import-statement","original":"./builders/mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"./utils/mod.js"}],"format":"esm"},"src/legacy/types.ts":{"bytes":6846,"imports":[],"format":"esm"},"src/legacy/persistor.ts":{"bytes":544,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":1855,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/wallet.ts":{"bytes":15787,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":1428,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/persistor.ts","kind":"import-statement","original":"./persistor.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/wallet.ts","kind":"import-statement","original":"./wallet.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/common/actions.ts":{"bytes":347,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/constants.ts":{"bytes":83,"imports":[],"format":"esm"},"src/namespaces/evm/utils.ts":{"bytes":1450,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/actions.ts":{"bytes":4250,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/after.ts":{"bytes":271,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/common/builders.ts":{"bytes":545,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/helpers.ts":{"bytes":189,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/and.ts":{"bytes":1144,"imports":[{"path":"src/namespaces/common/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/before.ts":{"bytes":351,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/mod.ts":{"bytes":547,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/common/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"./before.js"}],"format":"esm"},"src/namespaces/evm/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/before.ts":{"bytes":106,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/builders.ts":{"bytes":410,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/mod.ts":{"bytes":363,"imports":[{"path":"src/namespaces/evm/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/evm/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/evm/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/evm/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/evm/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/solana/constants.ts":{"bytes":112,"imports":[],"format":"esm"},"src/namespaces/solana/actions.ts":{"bytes":2143,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/solana/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/solana/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/solana/builders.ts":{"bytes":416,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/mod.ts":{"bytes":327,"imports":[{"path":"src/namespaces/solana/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/solana/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/solana/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/solana/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/solana/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/sui/constants.ts":{"bytes":276,"imports":[],"format":"esm"},"src/namespaces/sui/actions.ts":{"bytes":1832,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/utils.ts":{"bytes":905,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/builders.ts":{"bytes":1168,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"../../utils/mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/mod.ts":{"bytes":262,"imports":[{"path":"src/namespaces/sui/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/sui/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":77322},"dist/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ActionBuilder","Hub","Namespace","NamespaceBuilder","Provider","ProviderBuilder","createStore","defineVersions","guessProviderStateSelector","namespaceStateSelector","pickVersion"],"entryPoint":"src/mod.ts","inputs":{"src/hub/helpers.ts":{"bytesInOutput":131},"src/hub/namespaces/errors.ts":{"bytesInOutput":235},"src/hub/namespaces/namespace.ts":{"bytesInOutput":2393},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/provider.ts":{"bytesInOutput":1837},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/hub.ts":{"bytesInOutput":689},"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1381},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":579},"src/mod.ts":{"bytesInOutput":0},"src/builders/namespace.ts":{"bytesInOutput":1222},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/provider.ts":{"bytesInOutput":461},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/utils/versions.ts":{"bytesInOutput":356}},"bytes":11987},"dist/utils/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3724},"dist/utils/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP","defineVersions","generateStoreId","legacyProviderImportsToVersionsInterface","pickVersion"],"entryPoint":"src/utils/mod.ts","inputs":{"src/utils/mod.ts":{"bytesInOutput":23},"src/hub/helpers.ts":{"bytesInOutput":58},"src/utils/versions.ts":{"bytesInOutput":456}},"bytes":771},"dist/legacy/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":36117},"dist/legacy/mod.js":{"imports":[],"exports":["LegacyEvents","LegacyNetworks","LegacyWallet","Persistor","legacyEagerConnectHandler","legacyFormatAddressWithNetwork","legacyGetBlockChainNameFromId","legacyIsEvmNamespace","legacyReadAccountAddress"],"entryPoint":"src/legacy/mod.ts","inputs":{"src/legacy/types.ts":{"bytesInOutput":1375},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/persistor.ts":{"bytesInOutput":206},"src/legacy/helpers.ts":{"bytesInOutput":610},"src/legacy/utils.ts":{"bytesInOutput":238},"src/legacy/wallet.ts":{"bytesInOutput":5876}},"bytes":8654},"dist/hub/store/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":23731},"dist/hub/store/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true}],"exports":["createStore","guessProviderStateSelector","namespaceStateSelector"],"entryPoint":"src/hub/store/mod.ts","inputs":{"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1381},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":579}},"bytes":3756},"dist/namespaces/evm/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":28150},"dist/namespaces/evm/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_ETHEREUM_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/evm/mod.ts","inputs":{"src/namespaces/evm/actions.ts":{"bytesInOutput":1366},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/evm/constants.ts":{"bytesInOutput":21},"src/namespaces/evm/utils.ts":{"bytesInOutput":701},"src/namespaces/evm/mod.ts":{"bytesInOutput":0},"src/namespaces/evm/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/evm/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":300},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/evm/before.ts":{"bytesInOutput":49},"src/namespaces/evm/builders.ts":{"bytesInOutput":98}},"bytes":4282},"dist/namespaces/solana/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22309},"dist/namespaces/solana/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SOLANA_CHAIN_ID","actions","after","and","before","builders"],"entryPoint":"src/namespaces/solana/mod.ts","inputs":{"src/namespaces/solana/actions.ts":{"bytesInOutput":597},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/solana/constants.ts":{"bytesInOutput":52},"src/namespaces/solana/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/solana/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/solana/before.ts":{"bytesInOutput":47},"src/namespaces/solana/builders.ts":{"bytesInOutput":96}},"bytes":2776},"dist/namespaces/sui/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22592},"dist/namespaces/sui/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"@mysten/wallet-standard","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SUI_CHAIN_ID","actions","builders","getInstanceOrThrow"],"entryPoint":"src/namespaces/sui/mod.ts","inputs":{"src/namespaces/sui/actions.ts":{"bytesInOutput":474},"src/namespaces/sui/constants.ts":{"bytesInOutput":21},"src/namespaces/sui/mod.ts":{"bytesInOutput":0},"src/namespaces/sui/builders.ts":{"bytesInOutput":275},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":23},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/after.ts":{"bytesInOutput":81},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":73},"src/namespaces/sui/utils.ts":{"bytesInOutput":298}},"bytes":2744},"dist/namespaces/common/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18257},"dist/namespaces/common/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["actions","afterRecommended","andRecommended","beforeRecommended","builders","connectAndUpdateStateForMultiNetworks","connectAndUpdateStateForSingleNetwork","intoConnecting","intoConnectionFinished"],"entryPoint":"src/namespaces/common/mod.ts","inputs":{"src/namespaces/common/actions.ts":{"bytesInOutput":200},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/builders.ts":{"bytesInOutput":89},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":559},"src/namespaces/common/before.ts":{"bytesInOutput":95}},"bytes":2451}}}
|
|
1
|
+
{"inputs":{"src/hub/helpers.ts":{"bytes":371,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/errors.ts":{"bytes":328,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/namespace.ts":{"bytes":12251,"imports":[{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/hub/namespaces/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/mod.ts":{"bytes":181,"imports":[{"path":"src/hub/namespaces/namespace.ts","kind":"import-statement","original":"./namespace.js"}],"format":"esm"},"src/hub/provider/provider.ts":{"bytes":9080,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/provider/mod.ts":{"bytes":196,"imports":[{"path":"src/hub/provider/provider.ts","kind":"import-statement","original":"./provider.js"}],"format":"esm"},"src/hub/hub.ts":{"bytes":3050,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/selectors.ts":{"bytes":2225,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/extend.ts":{"bytes":3898,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/hub.ts":{"bytes":342,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/events.ts":{"bytes":1956,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/namespaces.ts":{"bytes":4638,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/providers.ts":{"bytes":2966,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/store.ts":{"bytes":808,"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"src/hub/store/extend.ts","kind":"import-statement","original":"./extend.js"},{"path":"src/hub/store/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/namespaces.ts","kind":"import-statement","original":"./namespaces.js"},{"path":"src/hub/store/providers.ts","kind":"import-statement","original":"./providers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/mod.ts":{"bytes":627,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"src/hub/store/store.ts","kind":"import-statement","original":"./store.js"}],"format":"esm"},"src/hub/mod.ts":{"bytes":502,"imports":[{"path":"src/hub/namespaces/mod.ts","kind":"import-statement","original":"./namespaces/mod.js"},{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"./provider/mod.js"},{"path":"src/hub/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./store/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"}],"format":"esm"},"src/builders/namespace.ts":{"bytes":6879,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/provider.ts":{"bytes":1584,"imports":[{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"../hub/provider/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/action.ts":{"bytes":2385,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/mod.ts":{"bytes":220,"imports":[{"path":"src/builders/namespace.ts","kind":"import-statement","original":"./namespace.js"},{"path":"src/builders/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"src/builders/action.ts","kind":"import-statement","original":"./action.js"}],"format":"esm"},"src/utils/versions.ts":{"bytes":1851,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/mod.ts":{"bytes":356,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../hub/helpers.js"},{"path":"src/utils/versions.ts","kind":"import-statement","original":"./versions.js"}],"format":"esm"},"src/mod.ts":{"bytes":1379,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/builders/mod.ts","kind":"import-statement","original":"./builders/mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"./utils/mod.js"}],"format":"esm"},"src/legacy/types.ts":{"bytes":6846,"imports":[],"format":"esm"},"src/legacy/persistor.ts":{"bytes":544,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":1855,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/wallet.ts":{"bytes":15787,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":1428,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/persistor.ts","kind":"import-statement","original":"./persistor.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/wallet.ts","kind":"import-statement","original":"./wallet.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/common/actions.ts":{"bytes":347,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/constants.ts":{"bytes":83,"imports":[],"format":"esm"},"src/namespaces/evm/utils.ts":{"bytes":1450,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/actions.ts":{"bytes":4250,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/after.ts":{"bytes":271,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/common/builders.ts":{"bytes":545,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/helpers.ts":{"bytes":189,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/and.ts":{"bytes":1144,"imports":[{"path":"src/namespaces/common/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/before.ts":{"bytes":351,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/mod.ts":{"bytes":547,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/common/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"./before.js"}],"format":"esm"},"src/namespaces/evm/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/before.ts":{"bytes":106,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/builders.ts":{"bytes":410,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/mod.ts":{"bytes":363,"imports":[{"path":"src/namespaces/evm/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/evm/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/evm/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/evm/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/evm/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/solana/constants.ts":{"bytes":112,"imports":[],"format":"esm"},"src/namespaces/solana/actions.ts":{"bytes":2143,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/solana/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/solana/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/solana/builders.ts":{"bytes":416,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/mod.ts":{"bytes":327,"imports":[{"path":"src/namespaces/solana/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/solana/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/solana/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/solana/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/solana/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/utxo/actions.ts":{"bytes":125,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"}],"format":"esm"},"src/namespaces/utxo/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/utxo/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/utxo/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/utxo/builders.ts":{"bytes":480,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"../common/and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/utxo/constants.ts":{"bytes":113,"imports":[],"format":"esm"},"src/namespaces/utxo/mod.ts":{"bytes":326,"imports":[{"path":"src/namespaces/utxo/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/utxo/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/utxo/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/utxo/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/utxo/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/utxo/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/sui/constants.ts":{"bytes":276,"imports":[],"format":"esm"},"src/namespaces/sui/actions.ts":{"bytes":1832,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/utils.ts":{"bytes":905,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/builders.ts":{"bytes":1168,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"../../utils/mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui/mod.ts":{"bytes":262,"imports":[{"path":"src/namespaces/sui/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/sui/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/sui/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/sui/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":77322},"dist/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ActionBuilder","Hub","Namespace","NamespaceBuilder","Provider","ProviderBuilder","createStore","defineVersions","guessProviderStateSelector","namespaceStateSelector","pickVersion"],"entryPoint":"src/mod.ts","inputs":{"src/hub/helpers.ts":{"bytesInOutput":131},"src/hub/namespaces/errors.ts":{"bytesInOutput":235},"src/hub/namespaces/namespace.ts":{"bytesInOutput":2393},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/provider.ts":{"bytesInOutput":1837},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/hub.ts":{"bytesInOutput":689},"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1381},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":579},"src/mod.ts":{"bytesInOutput":0},"src/builders/namespace.ts":{"bytesInOutput":1222},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/provider.ts":{"bytesInOutput":461},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/utils/versions.ts":{"bytesInOutput":356}},"bytes":11987},"dist/utils/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3724},"dist/utils/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP","defineVersions","generateStoreId","legacyProviderImportsToVersionsInterface","pickVersion"],"entryPoint":"src/utils/mod.ts","inputs":{"src/utils/mod.ts":{"bytesInOutput":23},"src/hub/helpers.ts":{"bytesInOutput":58},"src/utils/versions.ts":{"bytesInOutput":456}},"bytes":771},"dist/legacy/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":36117},"dist/legacy/mod.js":{"imports":[],"exports":["LegacyEvents","LegacyNetworks","LegacyWallet","Persistor","legacyEagerConnectHandler","legacyFormatAddressWithNetwork","legacyGetBlockChainNameFromId","legacyIsEvmNamespace","legacyReadAccountAddress"],"entryPoint":"src/legacy/mod.ts","inputs":{"src/legacy/types.ts":{"bytesInOutput":1375},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/persistor.ts":{"bytesInOutput":206},"src/legacy/helpers.ts":{"bytesInOutput":610},"src/legacy/utils.ts":{"bytesInOutput":238},"src/legacy/wallet.ts":{"bytesInOutput":5876}},"bytes":8654},"dist/hub/store/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":23731},"dist/hub/store/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true}],"exports":["createStore","guessProviderStateSelector","namespaceStateSelector"],"entryPoint":"src/hub/store/mod.ts","inputs":{"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1381},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":579}},"bytes":3756},"dist/namespaces/evm/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":28150},"dist/namespaces/evm/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_ETHEREUM_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/evm/mod.ts","inputs":{"src/namespaces/evm/actions.ts":{"bytesInOutput":1366},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/evm/constants.ts":{"bytesInOutput":21},"src/namespaces/evm/utils.ts":{"bytesInOutput":701},"src/namespaces/evm/mod.ts":{"bytesInOutput":0},"src/namespaces/evm/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/evm/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":300},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/evm/before.ts":{"bytesInOutput":49},"src/namespaces/evm/builders.ts":{"bytesInOutput":98}},"bytes":4282},"dist/namespaces/solana/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22309},"dist/namespaces/solana/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SOLANA_CHAIN_ID","actions","after","and","before","builders"],"entryPoint":"src/namespaces/solana/mod.ts","inputs":{"src/namespaces/solana/actions.ts":{"bytesInOutput":597},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/solana/constants.ts":{"bytesInOutput":52},"src/namespaces/solana/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/solana/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/solana/before.ts":{"bytesInOutput":47},"src/namespaces/solana/builders.ts":{"bytesInOutput":96}},"bytes":2776},"dist/namespaces/utxo/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":19404},"dist/namespaces/utxo/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_BITCOIN_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders"],"entryPoint":"src/namespaces/utxo/mod.ts","inputs":{"src/namespaces/utxo/actions.ts":{"bytesInOutput":47},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/utxo/mod.ts":{"bytesInOutput":0},"src/namespaces/utxo/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/utxo/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/utxo/before.ts":{"bytesInOutput":47},"src/namespaces/utxo/builders.ts":{"bytesInOutput":96},"src/namespaces/utxo/constants.ts":{"bytesInOutput":52}},"bytes":2227},"dist/namespaces/sui/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22592},"dist/namespaces/sui/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"@mysten/wallet-standard","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SUI_CHAIN_ID","actions","builders","getInstanceOrThrow"],"entryPoint":"src/namespaces/sui/mod.ts","inputs":{"src/namespaces/sui/actions.ts":{"bytesInOutput":474},"src/namespaces/sui/constants.ts":{"bytesInOutput":21},"src/namespaces/sui/mod.ts":{"bytesInOutput":0},"src/namespaces/sui/builders.ts":{"bytesInOutput":275},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":23},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/after.ts":{"bytesInOutput":81},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":73},"src/namespaces/sui/utils.ts":{"bytesInOutput":298}},"bytes":2744},"dist/namespaces/common/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18257},"dist/namespaces/common/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["actions","afterRecommended","andRecommended","beforeRecommended","builders","connectAndUpdateStateForMultiNetworks","connectAndUpdateStateForSingleNetwork","intoConnecting","intoConnectionFinished"],"entryPoint":"src/namespaces/common/mod.ts","inputs":{"src/namespaces/common/actions.ts":{"bytesInOutput":200},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/builders.ts":{"bytesInOutput":89},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":559},"src/namespaces/common/before.ts":{"bytesInOutput":95}},"bytes":2451}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/wallets-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/mod.ts",
|
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
"./namespaces/sui": {
|
|
39
39
|
"types": "./dist/namespaces/sui/mod.d.ts",
|
|
40
40
|
"default": "./dist/namespaces/sui/mod.js"
|
|
41
|
+
},
|
|
42
|
+
"./namespaces/utxo": {
|
|
43
|
+
"types": "./dist/namespaces/utxo/mod.d.ts",
|
|
44
|
+
"default": "./dist/namespaces/utxo/mod.js"
|
|
41
45
|
}
|
|
42
46
|
},
|
|
43
47
|
"files": [
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
"legacy"
|
|
47
51
|
],
|
|
48
52
|
"scripts": {
|
|
49
|
-
"build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/hub/store/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/sui/mod.ts,src/namespaces/common/mod.ts",
|
|
53
|
+
"build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/hub/store/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/utxo/mod.ts,src/namespaces/sui/mod.ts,src/namespaces/common/mod.ts",
|
|
50
54
|
"ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
|
|
51
55
|
"clean": "rimraf dist",
|
|
52
56
|
"format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
|
package/src/hub/mod.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { CosmosActions } from '../../namespaces/cosmos/mod.js';
|
|
|
5
5
|
import type { EvmActions } from '../../namespaces/evm/mod.js';
|
|
6
6
|
import type { SolanaActions } from '../../namespaces/solana/mod.js';
|
|
7
7
|
import type { SuiActions } from '../../namespaces/sui/mod.js';
|
|
8
|
+
import type { UtxoActions } from '../../namespaces/utxo/mod.js';
|
|
8
9
|
import type { AnyFunction, FunctionWithContext } from '../../types/actions.js';
|
|
9
10
|
import type { Prettify } from '../../types/utils.js';
|
|
10
11
|
|
|
@@ -27,6 +28,7 @@ export interface CommonNamespaces {
|
|
|
27
28
|
solana: SolanaActions;
|
|
28
29
|
cosmos: CosmosActions;
|
|
29
30
|
sui: SuiActions;
|
|
31
|
+
utxo: UtxoActions;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export type CommonNamespaceKeys = Prettify<keyof CommonNamespaces>;
|
package/src/mod.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UtxoActions } from './types.js';
|
|
2
|
+
|
|
3
|
+
import { ActionBuilder } from '../../mod.js';
|
|
4
|
+
import { intoConnectionFinished } from '../common/after.js';
|
|
5
|
+
import { connectAndUpdateStateForSingleNetwork } from '../common/and.js';
|
|
6
|
+
import { intoConnecting } from '../common/before.js';
|
|
7
|
+
|
|
8
|
+
export const connect = () =>
|
|
9
|
+
new ActionBuilder<UtxoActions, 'connect'>('connect')
|
|
10
|
+
.and(connectAndUpdateStateForSingleNetwork)
|
|
11
|
+
.before(intoConnecting)
|
|
12
|
+
.after(intoConnectionFinished);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as actions from './actions.js';
|
|
2
|
+
export * as after from './after.js';
|
|
3
|
+
export * as and from './and.js';
|
|
4
|
+
export * as before from './before.js';
|
|
5
|
+
export * as builders from './builders.js';
|
|
6
|
+
|
|
7
|
+
export type { ProviderAPI, UtxoActions } from './types.js';
|
|
8
|
+
export { CAIP_NAMESPACE, CAIP_BITCOIN_CHAIN_ID } from './constants.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Accounts } from '../../types/accounts.js';
|
|
2
|
+
import type {
|
|
3
|
+
AutoImplementedActionsByRecommended,
|
|
4
|
+
CommonActions,
|
|
5
|
+
} from '../common/types.js';
|
|
6
|
+
|
|
7
|
+
export interface UtxoActions
|
|
8
|
+
extends AutoImplementedActionsByRecommended,
|
|
9
|
+
CommonActions {
|
|
10
|
+
connect: () => Promise<Accounts>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
|
+
export type ProviderAPI = Record<string, any>;
|