Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stacks/connect

Package Overview
Dependencies
Maintainers
0
Versions
703
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/connect - npm Package Compare versions

Comparing version 7.7.2-alpha.c3cfe23.0 to 7.7.2-alpha.cc06270.0

dist/types/types/network.d.ts

94

dist/index.js

@@ -6,7 +6,10 @@ 'use strict';

var connectUi = require('@stacks/connect-ui');
var networkV6 = require('@stacks/network-v6');
var network = require('@stacks/network');
var common = require('@stacks/common');
var transactions = require('@stacks/transactions');
var transactionsV6 = require('@stacks/transactions-v6');
var loader = require('@stacks/connect-ui/loader');
var _=Object.defineProperty,$=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var P=(e,t,n)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&P(e,n,t[n]);if(j)for(var n of j(t))O.call(t,n)&&P(e,n,t[n]);return e},u=(e,t)=>$(e,J(t));var d=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&j)for(var r of j(e))t.indexOf(r)<0&&O.call(e,r)&&(n[r]=e[r]);return n};function g(){return connectUi.getProviderFromId(connectUi.getSelectedProviderId())||window.StacksProvider||window.BlockstackProvider}function ce(){return !!g()}var de="https://app.blockstack.org";typeof window!="undefined"&&(window.__CONNECT_VERSION__="__VERSION__");var ot=()=>{let e=navigator.userAgent;return /android/i.test(e)||/iPad|iPhone|iPod/.test(e)?!0:/windows phone/i.test(e)},Me=()=>!ot(),E=e=>{if(!e){let t=new auth.AppConfig(["store_write"],document.location.href);e=new auth.UserSession({appConfig:t});}return e},k=async(e,t=g())=>{if(!t)throw new Error("[Connect] No installed Stacks wallet found");let{redirectTo:n="/",manifestPath:r,onFinish:i,onCancel:o,sendToSignIn:a=!1,userSession:p,appDetails:l}=e,c=E(p);c.isUserSignedIn()&&c.signUserOut();let x=c.generateAndStoreTransitKey(),A=c.makeAuthRequest(x,`${document.location.origin}${n}`,`${document.location.origin}${r}`,c.appConfig.scopes,void 0,void 0,{sendToSignIn:a,appDetails:l,connectVersion:"__VERSION__"});try{let I=await t.authenticationRequest(A);await c.handlePendingSignIn(I);let T=jsontokens.decodeToken(I),V=T==null?void 0:T.payload;i==null||i({authResponse:I,authResponsePayload:V,userSession:c});}catch(I){console.error("[Connect] Error during auth request",I),o==null||o();}},Se=async e=>(e=E(e),e.isUserSignedIn()?e.loadUserData():e.isSignInPending()?e.handlePendingSignIn():null);var it=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function w(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let n of e)t+=it[n];return t}function b(e){if(typeof e!="string")throw new TypeError(`hexToBytes: expected string, got ${typeof e}`);let t=e.length%2?`0${e}`:e,n=new Uint8Array(t.length/2);for(let r=0;r<n.length;r++){let i=r*2,o=t.slice(i,i+2),a=Number.parseInt(o,16);if(Number.isNaN(a)||a<0)throw new Error("Invalid byte sequence");n[r]=a;}return n}var st=(r=>(r.ContractCall="contract_call",r.ContractDeploy="smart_contract",r.STXTransfer="token_transfer",r))(st||{}),at=(o=>(o.BUFFER="buffer",o.UINT="uint",o.INT="int",o.PRINCIPAL="principal",o.BOOL="bool",o))(at||{});var y=e=>{let t=e;if(!t){let n=new auth.AppConfig(["store_write"],document.location.href);t=new auth.UserSession({appConfig:n});}return t};function M(e){try{return y(e).loadUserData().appPrivateKey}catch(t){return !1}}var S=e=>{let n=y(e).loadUserData().appPrivateKey,r=jsontokens.SECP256K1Client.derivePublicKey(n);return {privateKey:n,publicKey:r}};function ft(e){var p;let{stxAddress:t,userSession:n,network:r}=e;if(t)return t;if(!n||!r)return;let i=(p=n==null?void 0:n.loadUserData().profile)==null?void 0:p.stxAddress,o={[transactions.ChainID.Mainnet]:"mainnet",[transactions.ChainID.Testnet]:"testnet"};return i==null?void 0:i[o[r.chainId]]}function xt(e){let t=e.network||new network.StacksTestnet,n=y(e.userSession),r=u(s({},e),{network:t,userSession:n});return s({stxAddress:ft(r)},r)}function z(e){return e.map(t=>w(transactions.serializePostCondition(t)))}async function L(e,t){let{postConditions:n}=e;return n&&typeof n[0]!="string"&&(n=z(n)),new jsontokens.TokenSigner("ES256k",t).signAsync(u(s({},e),{postConditions:n}))}function C(e){let{postConditions:t}=e;return t&&typeof t[0]!="string"&&(t=z(t)),jsontokens.createUnsecuredToken(u(s({},e),{postConditions:t}))}var It=async({token:e,options:t},n)=>{var r,i,o;try{let a=await n.transactionRequest(e),{txRaw:p}=a,l=b(p.replace(/^0x/,"")),c=transactions.deserializeTransaction(l);if("sponsored"in t&&t.sponsored){(r=t.onFinish)==null||r.call(t,u(s({},a),{stacksTransaction:c}));return}(i=t.onFinish)==null||i.call(t,u(s({},a),{stacksTransaction:c}));}catch(a){console.error("[Connect] Error during transaction request",a),(o=t.onCancel)==null||o.call(t);}},Dt=async e=>{let p=e,{functionArgs:t,appDetails:n,userSession:r}=p,i=d(p,["functionArgs","appDetails","userSession"]),o=t.map(l=>typeof l=="string"?l:w(transactions.serializeCV(l)));if(M(r)){let{privateKey:l,publicKey:c}=S(r),x=u(s({},i),{functionArgs:o,txType:"contract_call",publicKey:c});return n&&(x.appDetails=n),L(x,l)}let a=u(s({},i),{functionArgs:o,txType:"contract_call"});return n&&(a.appDetails=n),C(a)},Tt=async e=>{let o=e,{appDetails:t,userSession:n}=o,r=d(o,["appDetails","userSession"]);if(M(n)){let{privateKey:a,publicKey:p}=S(n),l=u(s({},r),{publicKey:p,txType:"smart_contract"});return t&&(l.appDetails=t),L(l,a)}let i=u(s({},r),{txType:"smart_contract"});return t&&(i.appDetails=t),C(i)},wt=async e=>{let a=e,{amount:t,appDetails:n,userSession:r}=a,i=d(a,["amount","appDetails","userSession"]);if(M(r)){let{privateKey:p,publicKey:l}=S(r),c=u(s({},i),{amount:t.toString(10),publicKey:l,txType:"token_transfer"});return n&&(c.appDetails=n),L(c,p)}let o=u(s({},i),{amount:t.toString(10),txType:"token_transfer"});return n&&(o.appDetails=n),C(o)},At=async e=>{let a=e,{txHex:t,appDetails:n,userSession:r}=a,i=d(a,["txHex","appDetails","userSession"]);if(M(r)){let{privateKey:p,publicKey:l}=S(r),c=u(s({},i),{txHex:t,publicKey:l});return n&&(c.appDetails=n),L(c,p)}let o=u(s({},i),{txHex:t});return n&&(o.appDetails=n),C(o)};async function N(e,t,n){let r=await t(s(s({},xt(e)),e));return It({token:r,options:e},n)}function v(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return N(e,Dt,t)}function R(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return N(e,Tt,t)}function B(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return N(e,wt,t)}function Y(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return N(e,At,t)}async function Nt(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(s({},e))}function mt(e){let t=e.network||new network.StacksTestnet,n=y(e.userSession),r=u(s({},e),{network:t,userSession:n});return s({},r)}async function Pt({token:e,options:t},n){var r,i;if(!n)throw new Error("[Connect] No installed Stacks wallet found");try{let o=await n.psbtRequest(e);(r=t.onFinish)==null||r.call(t,o);}catch(o){console.error("[Connect] Error during psbt request",o),(i=t.onCancel)==null||i.call(t);}}var ht=async e=>{let p=e,{allowedSighash:t,hex:n,signAtIndex:r,userSession:i}=p,o=d(p,["allowedSighash","hex","signAtIndex","userSession"]);if(M(i)){let{privateKey:l,publicKey:c}=S(i),x=u(s({},o),{allowedSighash:t,hex:n,signAtIndex:r,publicKey:c});return Nt(x,l)}let a=s({},o);return jsontokens.createUnsecuredToken(a)};async function Ot(e,t,n){let r=await t(s(s({},mt(e)),e));return Pt({token:r,options:e},n)}function Q(e,t=g()){return Ot(e,ht,t)}function Ut(e){var a;let{userSession:t,network:n}=e;if(!t||!n)return;let r=(a=t==null?void 0:t.loadUserData().profile)==null?void 0:a.stxAddress,i={[transactions.ChainID.Mainnet]:"mainnet",[transactions.ChainID.Testnet]:"testnet"};return r==null?void 0:r[i[n.chainId]]}async function zt(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(s({},e))}function m(e){let t=e.network||new network.StacksTestnet,n=y(e.userSession),r=u(s({},e),{network:t,userSession:n});return s({stxAddress:Ut(r)},r)}async function vt({token:e,options:t},n){var r,i;try{let o=await n.signatureRequest(e);(r=t.onFinish)==null||r.call(t,o);}catch(o){console.error("[Connect] Error during signature request",o),(i=t.onCancel)==null||i.call(t);}}var Rt=async e=>{let i=e,{userSession:t}=i,n=d(i,["userSession"]);if(M(t)){let{privateKey:o,publicKey:a}=S(t),p=u(s({},n),{publicKey:a});return zt(p,o)}let r=s({},n);return jsontokens.createUnsecuredToken(r)};async function Bt(e,t,n){let r=await t(s(s({},m(e)),e));return vt({token:r,options:e},n)}function q(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return Bt(e,Rt,t)}async function Gt(e,t,n){let r=await t(s(s({},m(e)),e));return Zt({token:r,options:e},n)}function Z(e){return u(s({},e),{message:w(transactions.serializeCV(e.message)),domain:w(transactions.serializeCV(e.domain))})}async function qt(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(Z(e))}async function Ft(e){let r=e,{userSession:t}=r,n=d(r,["userSession"]);if(M(t)){let{privateKey:i,publicKey:o}=S(t),a=u(s({},n),{publicKey:o});return qt(a,i)}return jsontokens.createUnsecuredToken(Z(e))}async function Zt({token:e,options:t},n){var r,i;try{let o=await n.structuredDataSignatureRequest(e);(r=t.onFinish)==null||r.call(t,o);}catch(o){console.error("[Connect] Error during signature request",o),(i=t.onCancel)==null||i.call(t);}}function W(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return Gt(e,Ft,t)}async function Vt(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(s({},e))}function _t(e){let t=e.network||new network.StacksTestnet,n=y(e.userSession),r=u(s({},e),{network:t,userSession:n});return s({},r)}async function $t({token:e,options:t},n){var r,i;try{let o=await n.profileUpdateRequest(e);(r=t.onFinish)==null||r.call(t,o);}catch(o){console.error("[Connect] Error during signature request",o),(i=t.onCancel)==null||i.call(t);}}var Jt=async e=>{let o=e,{userSession:t,profile:n}=o,r=d(o,["userSession","profile"]);if(M(t)){let{privateKey:a,publicKey:p}=S(t),l=u(s({},r),{profile:n,publicKey:p});return Vt(l,a)}let i=s({},r);return jsontokens.createUnsecuredToken(i)};async function Ht(e,t,n){let r=await t(s(s({},_t(e)),e));return $t({token:r,options:e},n)}function X(e,t=g()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return Ht(e,Jt,t)}var te=(o=>(o[o.DEFAULT=0]="DEFAULT",o[o.ALL=1]="ALL",o[o.NONE=2]="NONE",o[o.SINGLE=3]="SINGLE",o[o.ANYONECANPAY=128]="ANYONECANPAY",o))(te||{});var K=[{id:"LeatherProvider",name:"Leather",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiByeD0iMjYuODM4NyIgZmlsbD0iIzEyMTAwRiIvPgo8cGF0aCBkPSJNNzQuOTE3MSA1Mi43MTE0QzgyLjQ3NjYgNTEuNTQwOCA5My40MDg3IDQzLjU4MDQgOTMuNDA4NyAzNy4zNzYxQzkzLjQwODcgMzUuNTAzMSA5MS44OTY4IDM0LjIxNTQgODkuNjg3MSAzNC4yMTU0Qzg1LjUwMDQgMzQuMjE1NCA3OC40MDYxIDQwLjUzNjggNzQuOTE3MSA1Mi43MTE0Wk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"https://chrome.google.com/webstore/detail/hiro-wallet/ldinpeekobnhjjdofggfgjlcehhmanlj",mozillaAddOnsUrl:"https://leather.io/install-extension"},{id:"XverseProviders.StacksProvider",name:"Xverse Wallet",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxNzE3MTciIGQ9Ik0wIDBoNjAwdjYwMEgweiIvPjxwYXRoIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTQ0MCA0MzUuNHYtNTFjMC0yLS44LTMuOS0yLjItNS4zTDIyMCAxNjIuMmE3LjYgNy42IDAgMCAwLTUuNC0yLjJoLTUxLjFjLTIuNSAwLTQuNiAyLTQuNiA0LjZ2NDcuM2MwIDIgLjggNCAyLjIgNS40bDc4LjIgNzcuOGE0LjYgNC42IDAgMCAxIDAgNi41bC03OSA3OC43Yy0xIC45LTEuNCAyLTEuNCAzLjJ2NTJjMCAyLjQgMiA0LjUgNC42IDQuNUgyNDljMi42IDAgNC42LTIgNC42LTQuNlY0MDVjMC0xLjIuNS0yLjQgMS40LTMuM2w0Mi40LTQyLjJhNC42IDQuNiAwIDAgMSA2LjQgMGw3OC43IDc4LjRhNy42IDcuNiAwIDAgMCA1LjQgMi4yaDQ3LjVjMi41IDAgNC42LTIgNC42LTQuNloiLz48cGF0aCBmaWxsPSIjRUU3QTMwIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0zMjUuNiAyMjcuMmg0Mi44YzIuNiAwIDQuNiAyLjEgNC42IDQuNnY0Mi42YzAgNCA1IDYuMSA4IDMuMmw1OC43LTU4LjVjLjgtLjggMS4zLTIgMS4zLTMuMnYtNTEuMmMwLTIuNi0yLTQuNi00LjYtNC42TDM4NCAxNjBjLTEuMiAwLTIuNC41LTMuMyAxLjNsLTU4LjQgNTguMWE0LjYgNC42IDAgMCAwIDMuMiA3LjhaIi8+PC9nPjwvc3ZnPg==",webUrl:"https://xverse.app",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",mozillaAddOnsUrl:"https://www.xverse.app/download"},{id:"AsignaProvider",name:"Asigna",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMDEwMCIgZD0iTTAgMGgzMnYzMkgweiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNS4xMSA1LjU1YTMgMyAwIDAgMC0xLjgyIDEuM2wtLjA1LjA4LS40My43Mi0uMDcuMTEtLjUuODUtLjA1LjA5LTEuMjkgMi4xOC0uMDQuMDctLjQ3LjgtLjA2LjEtLjQ2Ljc4LS4wNy4xMS0xLjYzIDIuNzYtLjA3LjExLS4zOC42Ni0uMDUuMDgtLjczIDEuMjQtLjM1LjYtLjQuNjctLjA1LjA5TDUuMSAyMC43bC0uMTEuMTgtLjE0LjIzLS4wNy4xMy0uMzMuNTUtLjA0LjA3di4wMWExLjI2IDEuMjYgMCAwIDAtLjE0LjQ3IDEuMzEgMS4zMSAwIDAgMCAxLjI0IDEuNGgxLjVsLjA1LS4wNi4wNC0uMDYuODctMS4yMS4wNS0uMDguNzctMS4wNy4wNS0uMDcuNC0uNTcuMDUtLjA2LjI0LS4zNGExLjUyIDEuNTIgMCAwIDEgMS4zOS0uNjIgMS41IDEuNSAwIDAgMSAuNjQuMiAxLjQ3IDEuNDcgMCAwIDEgLjczIDEuMjcgMS40N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9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzk3NzNGRiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==",webUrl:"https://asigna.io",chromeWebStoreUrl:"https://chromewebstore.google.com/detail/asigna-multisig/gopddoinbenlokghakiafackadkbnlid"}];function f(e,t=!0){return function(r,i){var T;if(i)return e(r,i);let o=connectUi.getSelectedProviderId(),a=g();if(o&&a)return e(r,a);if(typeof window=="undefined")return;loader.defineCustomElements(window);let p=(T=r==null?void 0:r.defaultProviders)!=null?T:K,l=connectUi.getInstalledProviders(p),c=document.createElement("connect-modal");c.defaultProviders=p,c.installedProviders=l,c.persistSelection=t;let x=document.body.style.overflow;document.body.style.overflow="hidden";let A=()=>{c.remove(),document.body.style.overflow=x;};c.callback=D=>{A(),e(r,D);},c.cancelCallback=()=>{var D;A(),(D=r.onCancel)==null||D.call(r);},document.body.appendChild(c);let I=D=>{D.key==="Escape"&&(document.removeEventListener("keydown",I),c.remove());};document.addEventListener("keydown",I);}}var ie=f(k,!1),xn=f(B),In=f(v),Dn=f(R),Tn=f(Y),wn=f(Q),An=f(X),jn=f(q),Ln=f(W),Cn=connectUi.clearSelectedProviderId,Nn=ie;
var et=Object.defineProperty,nt=Object.defineProperties;var ot=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var O=(e,t,n)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>{for(var n in t||(t={}))k.call(t,n)&&O(e,n,t[n]);if(x)for(var n of x(t))E.call(t,n)&&O(e,n,t[n]);return e},u=(e,t)=>nt(e,ot(t));var g=(e,t)=>{var n={};for(var o in e)k.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&x)for(var o of x(e))t.indexOf(o)<0&&E.call(e,o)&&(n[o]=e[o]);return n};function l(){return connectUi.getProviderFromId(connectUi.getSelectedProviderId())||window.StacksProvider||window.BlockstackProvider}function ge(){return !!l()}function y(e){return e?typeof e=="string"?networkV6.StacksNetwork.fromName(e):"version"in e?e:"url"in e?new networkV6.StacksMainnet({url:e.url}):e.transactionVersion===network.TransactionVersion.Mainnet?new networkV6.StacksMainnet:new networkV6.StacksTestnet:new networkV6.StacksTestnet}var Ie="https://app.blockstack.org";typeof window!="undefined"&&(window.__CONNECT_VERSION__="__VERSION__");var dt=()=>{let e=navigator.userAgent;return /android/i.test(e)||/iPad|iPhone|iPod/.test(e)?!0:/windows phone/i.test(e)},Ce=()=>!dt(),b=e=>{if(!e){let t=new auth.AppConfig(["store_write"],document.location.href);e=new auth.UserSession({appConfig:t});}return e},U=async(e,t=l())=>{if(!t)throw new Error("[Connect] No installed Stacks wallet found");let{redirectTo:n="/",manifestPath:o,onFinish:a,onCancel:r,sendToSignIn:i=!1,userSession:d,appDetails:p}=e,c=b(d);c.isUserSignedIn()&&c.signUserOut();let C=c.generateAndStoreTransitKey(),A=c.makeAuthRequest(C,`${document.location.origin}${n}`,`${document.location.origin}${o}`,c.appConfig.scopes,void 0,void 0,{sendToSignIn:i,appDetails:p,connectVersion:"__VERSION__"});try{let j=await t.authenticationRequest(A);await c.handlePendingSignIn(j);let T=jsontokens.decodeToken(j),tt=T==null?void 0:T.payload;a==null||a({authResponse:j,authResponsePayload:tt,userSession:c});}catch(j){console.error("[Connect] Error during auth request",j),r==null||r();}},je=async e=>(e=b(e),e.isUserSignedIn()?e.loadUserData():e.isSignInPending()?e.handlePendingSignIn():null);var lt=(o=>(o.ContractCall="contract_call",o.ContractDeploy="smart_contract",o.STXTransfer="token_transfer",o))(lt||{}),gt=(r=>(r.BUFFER="buffer",r.UINT="uint",r.INT="int",r.PRINCIPAL="principal",r.BOOL="bool",r))(gt||{});var D=e=>{let t=e;if(!t){let n=new auth.AppConfig(["store_write"],document.location.href);t=new auth.UserSession({appConfig:n});}return t};function M(e){try{return D(e).loadUserData().appPrivateKey}catch(t){return !1}}var S=e=>{let n=D(e).loadUserData().appPrivateKey,o=jsontokens.SECP256K1Client.derivePublicKey(n);return {privateKey:n,publicKey:o}};function At(e){var p;let{stxAddress:t,userSession:n,network:o}=e;if(t)return t;if(!n||!o)return;let a=(p=n==null?void 0:n.loadUserData().profile)==null?void 0:p.stxAddress,r={[network.ChainId.Mainnet]:"mainnet",[network.ChainId.Testnet]:"testnet"},i=y(o);return a==null?void 0:a[r[i.chainId]]}function xt(e){let t=y(e.network),n=D(e.userSession),o=u(s({},e),{network:t,userSession:n});return s({stxAddress:At(o)},o)}async function N(e,t){let{postConditions:n}=e;return n&&n.length>0&&typeof n[0]!="string"&&(typeof n[0].type=="string"?n=n.map(transactions.postConditionToHex):n=n.map(a=>common.bytesToHex(transactionsV6.serializePostCondition(a)))),new jsontokens.TokenSigner("ES256k",t).signAsync(u(s({},e),{postConditions:n}))}function f(e){let{postConditions:t}=e;return t&&t.length>0&&typeof t[0]!="string"&&(typeof t[0].type=="string"?t=t.map(transactions.postConditionToHex):t=t.map(n=>common.bytesToHex(transactionsV6.serializePostCondition(n)))),jsontokens.createUnsecuredToken(u(s({},e),{postConditions:t}))}var Nt=async({token:e,options:t},n)=>{var o,a,r;try{let i=await n.transactionRequest(e),{txRaw:d}=i,p=common.hexToBytes(d.replace(/^0x/,"")),c=transactions.deserializeTransaction(p);if("sponsored"in t&&t.sponsored){(o=t.onFinish)==null||o.call(t,u(s({},i),{stacksTransaction:c}));return}(a=t.onFinish)==null||a.call(t,u(s({},i),{stacksTransaction:c}));}catch(i){console.error("[Connect] Error during transaction request",i),(r=t.onCancel)==null||r.call(t);}},ft=async e=>{let d=e,{functionArgs:t,appDetails:n,userSession:o}=d,a=g(d,["functionArgs","appDetails","userSession"]),r=t.map(p=>typeof p=="string"?p:typeof p.type=="string"?transactions.serializeCV(p):common.bytesToHex(transactionsV6.serializeCV(p)));if(M(o)){let{privateKey:p,publicKey:c}=S(o),C=u(s({},a),{functionArgs:r,txType:"contract_call",publicKey:c});return n&&(C.appDetails=n),N(C,p)}let i=u(s({},a),{functionArgs:r,txType:"contract_call"});return n&&(i.appDetails=n),f(i)},wt=async e=>{let r=e,{appDetails:t,userSession:n}=r,o=g(r,["appDetails","userSession"]);if(M(n)){let{privateKey:i,publicKey:d}=S(n),p=u(s({},o),{publicKey:d,txType:"smart_contract"});return t&&(p.appDetails=t),N(p,i)}let a=u(s({},o),{txType:"smart_contract"});return t&&(a.appDetails=t),f(a)},Pt=async e=>{let i=e,{amount:t,appDetails:n,userSession:o}=i,a=g(i,["amount","appDetails","userSession"]);if(M(o)){let{privateKey:d,publicKey:p}=S(o),c=u(s({},a),{amount:t.toString(10),publicKey:p,txType:"token_transfer"});return n&&(c.appDetails=n),N(c,d)}let r=u(s({},a),{amount:t.toString(10),txType:"token_transfer"});return n&&(r.appDetails=n),f(r)},mt=async e=>{let i=e,{txHex:t,appDetails:n,userSession:o}=i,a=g(i,["txHex","appDetails","userSession"]);if(M(o)){let{privateKey:d,publicKey:p}=S(o),c=u(s({},a),{txHex:t,publicKey:p});return n&&(c.appDetails=n),N(c,d)}let r=u(s({},a),{txHex:t});return n&&(r.appDetails=n),f(r)};async function w(e,t,n){let o=await t(u(s(s({},xt(e)),e),{network:y(e.network)}));return Nt({token:o,options:e},n)}function Y(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return w(e,ft,t)}function B(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return w(e,wt,t)}function G(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return w(e,Pt,t)}function q(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return w(e,mt,t)}async function Et(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(s({},e))}function ht(e){let t=y(e.network),n=D(e.userSession),o=u(s({},e),{network:t,userSession:n});return s({},o)}async function zt({token:e,options:t},n){var o,a;if(!n)throw new Error("[Connect] No installed Stacks wallet found");try{let r=await n.psbtRequest(e);(o=t.onFinish)==null||o.call(t,r);}catch(r){console.error("[Connect] Error during psbt request",r),(a=t.onCancel)==null||a.call(t);}}var bt=async e=>{let d=e,{allowedSighash:t,hex:n,signAtIndex:o,userSession:a}=d,r=g(d,["allowedSighash","hex","signAtIndex","userSession"]);if(M(a)){let{privateKey:p,publicKey:c}=S(a),C=u(s({},r),{allowedSighash:t,hex:n,signAtIndex:o,publicKey:c});return Et(C,p)}let i=s({},r);return jsontokens.createUnsecuredToken(i)};async function Ut(e,t,n){let o=await t(s(s({},ht(e)),e));return zt({token:o,options:e},n)}function F(e,t=l()){return Ut(e,bt,t)}function Qt(e){var d;let{userSession:t,network:n}=e;if(!t||!n)return;let o=(d=t==null?void 0:t.loadUserData().profile)==null?void 0:d.stxAddress,a={[network.ChainId.Mainnet]:"mainnet",[network.ChainId.Testnet]:"testnet"},r=y(n);return o==null?void 0:o[a[r.chainId]]}async function Yt(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(s({},e))}function m(e){let t=y(e.network),n=D(e.userSession),o=u(s({},e),{network:t,userSession:n});return s({stxAddress:Qt(o)},o)}async function Bt({token:e,options:t},n){var o,a;try{let r=await n.signatureRequest(e);(o=t.onFinish)==null||o.call(t,r);}catch(r){console.error("[Connect] Error during signature request",r),(a=t.onCancel)==null||a.call(t);}}var Gt=async e=>{let a=e,{userSession:t}=a,n=g(a,["userSession"]);if(M(t)){let{privateKey:r,publicKey:i}=S(t),d=u(s({},n),{publicKey:i});return Yt(d,r)}let o=s({},n);return jsontokens.createUnsecuredToken(o)};async function qt(e,t,n){let o=await t(s(s({},m(e)),e));return Bt({token:o,options:e},n)}function W(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return qt(e,Gt,t)}async function Wt(e,t,n){let o=await t(s(s({},m(e)),e));return Kt({token:o,options:e},n)}function _(e){let{message:t,domain:n}=e;return typeof t.type=="string"&&typeof n.type=="string"?u(s({},e),{message:transactions.serializeCV(t),domain:transactions.serializeCV(n)}):u(s({},e),{message:common.bytesToHex(transactionsV6.serializeCV(t)),domain:common.bytesToHex(transactionsV6.serializeCV(n))})}async function Vt(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(_(e))}async function Xt(e){let o=e,{userSession:t}=o,n=g(o,["userSession"]);if(M(t)){let{privateKey:a,publicKey:r}=S(t),i=u(s({},n),{publicKey:r});return Vt(i,a)}return jsontokens.createUnsecuredToken(_(e))}async function Kt({token:e,options:t},n){var o,a;try{let r=await n.structuredDataSignatureRequest(e);(o=t.onFinish)==null||o.call(t,r);}catch(r){console.error("[Connect] Error during signature request",r),(a=t.onCancel)==null||a.call(t);}}function J(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return Wt(e,Xt,t)}async function Ht(e,t){return new jsontokens.TokenSigner("ES256k",t).signAsync(s({},e))}function $t(e){let t=y(e.network),n=D(e.userSession),o=u(s({},e),{network:t,userSession:n});return s({},o)}async function te({token:e,options:t},n){var o,a;try{let r=await n.profileUpdateRequest(e);(o=t.onFinish)==null||o.call(t,r);}catch(r){console.error("[Connect] Error during signature request",r),(a=t.onCancel)==null||a.call(t);}}var ee=async e=>{let r=e,{userSession:t,profile:n}=r,o=g(r,["userSession","profile"]);if(M(t)){let{privateKey:i,publicKey:d}=S(t),p=u(s({},o),{profile:n,publicKey:d});return Ht(p,i)}let a=s({},o);return jsontokens.createUnsecuredToken(a)};async function ne(e,t,n){let o=await t(s(s({},$t(e)),e));return te({token:o,options:e},n)}function H(e,t=l()){if(!t)throw new Error("[Connect] No installed Stacks wallet found");return ne(e,ee,t)}var oe=(r=>(r[r.DEFAULT=0]="DEFAULT",r[r.ALL=1]="ALL",r[r.NONE=2]="NONE",r[r.SINGLE=3]="SINGLE",r[r.ANYONECANPAY=128]="ANYONECANPAY",r))(oe||{});var $=[{id:"LeatherProvider",name:"Leather",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHh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MjIgNTIuNzExNEM2Ny41OTAzIDM1LjczNzIgNzcuODI0NiAyMi41MDkgOTEuNDMxNiAyMi41MDlDOTkuMTA3NCAyMi41MDkgMTA1LjE1NSAyNy41NDI4IDEwNS4xNTUgMzYuNjczN0MxMDUuMTU1IDUxLjMwNjYgODYuMDgxOSA2My4yNDcxIDcxLjY2MDcgNjQuNDE3N0w2NS43Mjk1IDg1LjM3MjFDNzIuNDc0OCA5My4yMTUzIDkxLjE5OSAxMDAuODI0IDkxLjE5OSA3OS4yODQ4SDEwMi44MjlaIiBmaWxsPSIjRjVGMUVEIi8+Cjwvc3ZnPgo=",webUrl:"https://leather.io",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/hiro-wallet/ldinpeekobnhjjdofggfgjlcehhmanlj",mozillaAddOnsUrl:"https://leather.io/install-extension"},{id:"XverseProviders.StacksProvider",name:"Xverse Wallet",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxNzE3MTciIGQ9Ik0wIDBoNjAwdjYwMEgweiIvPjxwYXRoIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTQ0MCA0MzUuNHYtNTFjMC0yLS44LTMuOS0yLjItNS4zTDIyMCAxNjIuMmE3LjYgNy42IDAgMCAwLTUuNC0yLjJoLTUxLjFjLTIuNSAwLTQuNiAyLTQuNiA0LjZ2NDcuM2MwIDIgLjggNCAyLjIgNS40bDc4LjIgNzcuOGE0LjYgNC42IDAgMCAxIDAgNi41bC03OSA3OC43Yy0xIC45LTEuNCAyLTEuNCAzLjJ2NTJjMCAyLjQgMiA0LjUgNC42IDQuNUgyNDljMi42IDAgNC42LTIgNC42LTQuNlY0MDVjMC0xLjIuNS0yLjQgMS40LTMuM2w0Mi40LTQyLjJhNC42IDQuNiAwIDAgMSA2LjQgMGw3OC43IDc4LjRhNy42IDcuNiAwIDAgMCA1LjQgMi4yaDQ3LjVjMi41IDAgNC42LTIgNC42LTQuNloiLz48cGF0aCBmaWxsPSIjRUU3QTMwIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0zMjUuNiAyMjcuMmg0Mi44YzIuNiAwIDQuNiAyLjEgNC42IDQuNnY0Mi42YzAgNCA1IDYuMSA4IDMuMmw1OC43LTU4LjVjLjgtLjggMS4zLTIgMS4zLTMuMnYtNTEuMmMwLTIuNi0yLTQuNi00LjYtNC42TDM4NCAxNjBjLTEuMiAwLTIuNC41LTMuMyAxLjNsLTU4LjQgNTguMWE0LjYgNC42IDAgMCAwIDMuMiA3LjhaIi8+PC9nPjwvc3ZnPg==",webUrl:"https://xverse.app",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",mozillaAddOnsUrl:"https://www.xverse.app/download"},{id:"AsignaProvider",name:"Asigna",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMDEwMCIgZD0iTTAgMGgzMnYzMkgweiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNS4xMSA1LjU1YTMgMyAwIDAgMC0xLjgyIDEuM2wtLjA1LjA4LS40My43Mi0uMDcuMTEtLjUuODUtLjA1LjA5LTEuMjkgMi4xOC0uMDQuMDctLjQ3LjgtLjA2LjEtLjQ2Ljc4LS4wNy4xMS0xLjYzIDIuNzYtLjA3LjExLS4zOC42Ni0uMDUuMDg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RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzlCNkJGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0E1ODVGRiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iMjIuNTkiIHgyPSIyNC44IiB5MT0iMjQuNzEiIHkyPSIxNS41MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM0MjFGOEIiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzcyMzBGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzk3NzNGRiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==",webUrl:"https://asigna.io",chromeWebStoreUrl:"https://chromewebstore.google.com/detail/asigna-multisig/gopddoinbenlokghakiafackadkbnlid"}];function I(e,t=!0){return function(o,a){var T;if(a)return e(o,a);let r=connectUi.getSelectedProviderId(),i=l();if(r&&i)return e(o,i);if(typeof window=="undefined")return;loader.defineCustomElements(window);let d=(T=o==null?void 0:o.defaultProviders)!=null?T:$,p=connectUi.getInstalledProviders(d),c=document.createElement("connect-modal");c.defaultProviders=d,c.installedProviders=p,c.persistSelection=t;let C=document.body.style.overflow;document.body.style.overflow="hidden";let A=()=>{c.remove(),document.body.style.overflow=C;};c.callback=L=>{A(),e(o,L);},c.cancelCallback=()=>{var L;A(),(L=o.onCancel)==null||L.call(o);},document.body.appendChild(c);let j=L=>{L.key==="Escape"&&(document.removeEventListener("keydown",j),c.remove());};document.addEventListener("keydown",j);}}var ce=I(U,!1),Nn=I(G),fn=I(Y),wn=I(B),Pn=I(q),mn=I(F),On=I(H),kn=I(W),En=I(J),hn=connectUi.clearSelectedProviderId,zn=ce;

@@ -25,48 +28,49 @@ Object.defineProperty(exports, "clearSelectedProviderId", {

});
exports.ContractCallArgumentType = at;
exports.DEFAULT_PROVIDERS = K;
exports.SignatureHash = te;
exports.TransactionTypes = st;
exports.authenticate = k;
exports.defaultAuthURL = de;
exports.disconnect = Cn;
exports.getDefaultProfileUpdateRequestOptions = _t;
exports.getDefaultPsbtRequestOptions = mt;
exports.ContractCallArgumentType = gt;
exports.DEFAULT_PROVIDERS = $;
exports.SignatureHash = oe;
exports.TransactionTypes = lt;
exports.authenticate = U;
exports.defaultAuthURL = Ie;
exports.disconnect = hn;
exports.getDefaultProfileUpdateRequestOptions = $t;
exports.getDefaultPsbtRequestOptions = ht;
exports.getDefaultSignatureRequestOptions = m;
exports.getKeys = S;
exports.getOrCreateUserSession = E;
exports.getStacksProvider = g;
exports.getStxAddress = ft;
exports.getUserData = Se;
exports.getUserSession = y;
exports.getOrCreateUserSession = b;
exports.getStacksProvider = l;
exports.getStxAddress = At;
exports.getUserData = je;
exports.getUserSession = D;
exports.hasAppPrivateKey = M;
exports.isMobile = ot;
exports.isStacksWalletInstalled = ce;
exports.makeContractCallToken = Dt;
exports.makeContractDeployToken = Tt;
exports.makeProfileUpdateToken = Jt;
exports.makePsbtToken = ht;
exports.makeSTXTransferToken = wt;
exports.makeSignTransaction = At;
exports.openContractCall = v;
exports.openContractDeploy = R;
exports.openProfileUpdateRequestPopup = X;
exports.openPsbtRequestPopup = Q;
exports.openSTXTransfer = B;
exports.openSignTransaction = Y;
exports.openSignatureRequestPopup = q;
exports.openStructuredDataSignatureRequestPopup = W;
exports.shouldUsePopup = Me;
exports.showBlockstackConnect = Nn;
exports.showConnect = ie;
exports.showContractCall = In;
exports.showContractDeploy = Dn;
exports.showProfileUpdate = An;
exports.showPsbt = wn;
exports.showSTXTransfer = xn;
exports.showSignMessage = jn;
exports.showSignStructuredMessage = Ln;
exports.showSignTransaction = Tn;
exports.signMessage = Rt;
exports.signStructuredMessage = Ft;
exports.isMobile = dt;
exports.isStacksWalletInstalled = ge;
exports.legacyNetworkFromConnectNetwork = y;
exports.makeContractCallToken = ft;
exports.makeContractDeployToken = wt;
exports.makeProfileUpdateToken = ee;
exports.makePsbtToken = bt;
exports.makeSTXTransferToken = Pt;
exports.makeSignTransaction = mt;
exports.openContractCall = Y;
exports.openContractDeploy = B;
exports.openProfileUpdateRequestPopup = H;
exports.openPsbtRequestPopup = F;
exports.openSTXTransfer = G;
exports.openSignTransaction = q;
exports.openSignatureRequestPopup = W;
exports.openStructuredDataSignatureRequestPopup = J;
exports.shouldUsePopup = Ce;
exports.showBlockstackConnect = zn;
exports.showConnect = ce;
exports.showContractCall = fn;
exports.showContractDeploy = wn;
exports.showProfileUpdate = On;
exports.showPsbt = mn;
exports.showSTXTransfer = Nn;
exports.showSignMessage = kn;
exports.showSignStructuredMessage = En;
exports.showSignTransaction = Pn;
exports.signMessage = Gt;
exports.signStructuredMessage = Xt;
Object.keys(auth).forEach(function (k) {

@@ -78,3 +82,3 @@ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {

});
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map

@@ -0,3 +1,3 @@

import { StacksProvider } from '../types';
import { PsbtRequestOptions } from '../types/bitcoin';
import { StacksProvider } from '../types';
export declare function getDefaultPsbtRequestOptions(options: PsbtRequestOptions): {

@@ -12,3 +12,3 @@ allowedSighash?: import("../types").SignatureHash[];

authOrigin?: string;
network?: import("@stacks/network").StacksNetwork;
network?: import("../types").ConnectNetwork;
onCancel?: import("../types").PsbtCanceled;

@@ -15,0 +15,0 @@ onFinish?: import("../types").PsbtFinished;

@@ -9,3 +9,3 @@ import { ProfileUpdateRequestOptions, StacksProvider } from '../types';

authOrigin?: string;
network?: import("@stacks/network").StacksNetwork;
network?: import("../types").ConnectNetwork;
stxAddress?: string;

@@ -12,0 +12,0 @@ userSession?: import("@stacks/auth").UserSession;

@@ -0,3 +1,3 @@

import { StacksProvider } from '../types';
import { CommonSignatureRequestOptions, SignatureRequestOptions } from '../types/signature';
import { StacksProvider } from '../types';
export declare function getDefaultSignatureRequestOptions(options: CommonSignatureRequestOptions): {

@@ -9,3 +9,3 @@ appDetails?: {

authOrigin?: string;
network?: import("@stacks/network").StacksNetwork;
network?: import("../types").ConnectNetwork;
stxAddress: string;

@@ -12,0 +12,0 @@ userSession?: import("@stacks/auth").UserSession;

import { UserSession } from '@stacks/auth';
import { StacksProvider } from '../types';
import { ContractCallOptions, ContractCallRegularOptions, ContractCallSponsoredOptions, ContractDeployOptions, ContractDeployRegularOptions, ContractDeploySponsoredOptions, SignTransactionOptions, STXTransferOptions, STXTransferRegularOptions, STXTransferSponsoredOptions, TransactionOptions } from '../types/transactions';
import { StacksProvider } from '../types';
export declare const getUserSession: (_userSession?: UserSession) => UserSession;

@@ -5,0 +5,0 @@ export declare function hasAppPrivateKey(userSession?: UserSession): string | false;

import { UserSession } from '@stacks/auth';
import { StacksNetwork } from '@stacks/network';
import { AuthOptions } from './auth';
import { ConnectNetwork } from './network';
export declare enum SignatureHash {

@@ -19,3 +19,3 @@ DEFAULT = 0,

authOrigin?: string;
network?: StacksNetwork;
network?: ConnectNetwork;
onCancel?: PsbtCanceled;

@@ -22,0 +22,0 @@ onFinish?: PsbtFinished;

@@ -8,1 +8,2 @@ export * from './provider';

export * from './bitcoin';
export * from './network';
import { UserSession } from '@stacks/auth';
import { StacksNetwork } from '@stacks/network';
import { AuthOptions } from './auth';
import { PublicPersonProfile } from '@stacks/profile';
import { ConnectNetwork } from './network';
export type ProfileUpdateFinished = (data: PublicPersonProfile) => void;

@@ -10,3 +10,3 @@ export type ProfileUpdateCanceled = () => void;

authOrigin?: string;
network?: StacksNetwork;
network?: ConnectNetwork;
stxAddress?: string;

@@ -13,0 +13,0 @@ userSession?: UserSession;

import { UserSession } from '@stacks/auth';
import { StacksNetwork } from '@stacks/network';
import type { AuthOptions } from '../types/auth';
import { ConnectNetwork } from './network';
export type SignatureFinished = (data: SignatureData) => void;

@@ -9,3 +9,3 @@ export type SignatureCanceled = () => void;

authOrigin?: string;
network?: StacksNetwork;
network?: ConnectNetwork;
stxAddress?: string;

@@ -43,3 +43,3 @@ userSession?: UserSession;

appDetails?: AuthOptions['appDetails'];
network?: StacksNetwork;
network?: ConnectNetwork;
}

@@ -0,10 +1,11 @@

import { ClarityValue as LegacyClarityValue, TupleCV as LegacyTupleCV } from '@stacks/transactions-v6';
import { ClarityValue, TupleCV } from '@stacks/transactions';
import { CommonSignaturePayload, CommonSignatureRequestOptions, SignatureCanceled, SignatureFinished } from './signature';
export interface StructuredDataSignatureRequestOptions extends CommonSignatureRequestOptions {
message: ClarityValue;
domain: TupleCV;
message: LegacyClarityValue | ClarityValue;
domain: LegacyTupleCV | TupleCV;
}
export interface StructuredDataSignatureOptions {
message: ClarityValue;
domain: TupleCV;
message: LegacyClarityValue | ClarityValue;
domain: LegacyTupleCV | TupleCV;
onFinish?: SignatureFinished;

@@ -18,4 +19,4 @@ onCancel?: SignatureCanceled;

export interface StructuredDataSignaturePayload extends CommonSignaturePayload {
message: ClarityValue;
domain: TupleCV;
message: LegacyClarityValue | ClarityValue;
domain: LegacyTupleCV | TupleCV;
}
import { UserSession } from '@stacks/auth';
import type { AuthOptions } from '../types/auth';
import { ClarityValue as LegacyClarityValue, PostCondition as LegacyPostCondition } from '@stacks/transactions-v6';
import { PostConditionMode, PostCondition, AnchorMode, ClarityValue, StacksTransaction } from '@stacks/transactions';
import { StacksNetwork } from '@stacks/network';
import { ConnectNetwork } from './network';
export interface TxBase {
appDetails?: AuthOptions['appDetails'];
postConditionMode?: PostConditionMode;
postConditions?: (string | PostCondition)[];
network?: StacksNetwork;
postConditions?: (string | LegacyPostCondition | PostCondition)[];
network?: ConnectNetwork;
anchorMode?: AnchorMode;

@@ -25,3 +26,3 @@ attachment?: string;

appDetails?: AuthOptions['appDetails'];
network?: StacksNetwork;
network?: ConnectNetwork;
attachment?: string;

@@ -35,3 +36,3 @@ /**

/** @deprecated `unused - only included for compatibility with other transaction types` */
postConditions?: (string | PostCondition)[];
postConditions?: (string | LegacyPostCondition | PostCondition)[];
}

@@ -69,3 +70,3 @@ export interface SponsoredFinishedTxPayload {

functionName: string;
functionArgs: (string | ClarityValue)[];
functionArgs: (string | LegacyClarityValue | ClarityValue)[];
}

@@ -72,0 +73,0 @@ export interface OptionsBase {

@@ -0,2 +1,6 @@

import { StacksNetwork as LegacyStacksNetwork } from '@stacks/network-v6';
import { ConnectNetwork } from './types';
export declare function getStacksProvider(): any;
export declare function isStacksWalletInstalled(): boolean;
/** @internal */
export declare function legacyNetworkFromConnectNetwork(network?: ConnectNetwork): LegacyStacksNetwork;
{
"name": "@stacks/connect",
"version": "7.7.2-alpha.c3cfe23.0",
"version": "7.7.2-alpha.cc06270.0",
"license": "MIT",
"scripts": {
"build": "concurrently 'tsup src/index.ts' 'yarn types'",
"prepublishOnly": "yarn build",
"build": "concurrently 'tsup src/index.ts' 'npm run types'",
"prepublishOnly": "npm run build",
"typecheck": "tsc --project tsconfig.json --noEmit",

@@ -14,7 +14,10 @@ "types": "tsc --project tsconfig.json --emitDeclarationOnly",

"dependencies": {
"@stacks/auth": "^6.1.1",
"@stacks/connect-ui": "^6.4.2-alpha.c3cfe23.0",
"@stacks/network": "^6.1.1",
"@stacks/profile": "^6.1.1",
"@stacks/transactions": "^6.1.1",
"@stacks/auth": "^7.0.0-next.70",
"@stacks/common": "^7.0.0-next.70",
"@stacks/connect-ui": "^6.4.2-alpha.cc06270.0",
"@stacks/network": "^7.0.0-next.70",
"@stacks/network-v6": "npm:@stacks/network@^6.16.0",
"@stacks/profile": "^7.0.0-next.70",
"@stacks/transactions": "^7.0.0-next.70",
"@stacks/transactions-v6": "npm:@stacks/transactions@^6.16.0",
"jsontokens": "^4.0.1"

@@ -37,5 +40,2 @@ },

},
"typedoc": {
"entryPoint": "./src/index.ts"
},
"devDependencies": {

@@ -60,3 +60,3 @@ "@babel/preset-env": "^7.23.3",

},
"gitHead": "ff27167de83cc201e8db0f729d741085234ca931"
"gitHead": "f6b4912998b1ed12c0c622c9c516e59231044087"
}

@@ -76,3 +76,2 @@ # `@stacks/connect` [![npm](https://img.shields.io/npm/v/@stacks/connect)](https://www.npmjs.com/package/@stacks/connect) <!-- omit in toc -->

import { openSTXTransfer } from '@stacks/connect';
import { StacksTestnet } from '@stacks/network';
import { AnchorMode, PostConditionMode } from '@stacks/transactions';

@@ -82,3 +81,3 @@ import { userSession } from './userSession';

openSTXTransfer({
network: new StacksTestnet(), // which network to use; use `new StacksMainnet()` for mainnet
network: 'testnet', // which network to use; ('mainnet' or 'testnet')
anchorMode: AnchorMode.Any, // which type of block the tx should be mined in

@@ -110,3 +109,2 @@

import { openContractCall } from '@stacks/connect';
import { StacksTestnet } from '@stacks/network';
import { AnchorMode, PostConditionMode, stringUtf8CV } from '@stacks/transactions';

@@ -118,3 +116,3 @@ import { userSession } from './userSession';

openContractCall({
network: new StacksTestnet(),
network: 'testnet', // which network to use; ('mainnet' or 'testnet')
anchorMode: AnchorMode.Any, // which type of block the tx should be mined in

@@ -224,3 +222,3 @@

| :------------------ | :------------------ | :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :------------------------ |
| `network` | Mainnet | The network to broadcast the transaction to | [StacksNetwork](https://stacks.js.org/classes/network.StacksNetwork.html) | `new StacksMainnet()` |
| `network` | Mainnet | The network to broadcast the transaction to | string | 'mainnet' |
| `anchorMode` | Any | The type of block the transaction should be mined in | [AnchorMode Enum](https://stacks.js.org/enums/transactions.AnchorMode.html) | `AnchorMode.OnChainOnly` |

@@ -227,0 +225,0 @@ | `memo` | _Empty_ `''` | The memo field (used for additional data) | `string` | `'a memo'` |

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc