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

@keystonehq/sdk

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keystonehq/sdk - npm Package Compare versions

Comparing version 0.6.3-alpha.1 to 0.6.3-alpha.2

4

dist/sdk.cjs.development.js

@@ -224,5 +224,5 @@ 'use strict';

ee.emit('error', e);
} else {
setError(e.message);
}
setError(e.message);
}

@@ -229,0 +229,0 @@ };

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react-dom")),r=require("react"),n=e(r),a=e(require("react-modal")),o=require("rxjs"),i=e(require("qrcode.react")),l=require("events"),A=require("@ngraveio/bc-ur");const s=({size:e=200,data:t="",ecl:r="L"})=>n.createElement(i,{value:t,size:e,level:r}),c={minWidth:"16rem",height:"3rem",background:"#784FFE",borderColor:"grey",borderRadius:"8px",borderWidth:1,color:"white",outline:"none",margin:2},m=e=>{const{onClick:t,children:r}=e;return n.createElement("button",{onClick:t,style:c},r)},u=e=>n.createElement("div",{style:{width:"100%",marginTop:"1rem",display:"flex",flexDirection:"row-reverse",alignItems:"center",justifyContent:"center"}},e.children),d=new A.UR(Buffer.from("NO DATA","utf-8"));class y extends Error{constructor(e){super(e),Object.setPrototypeOf(this,y.prototype)}}const E=n.lazy(()=>new Promise((function(e){e(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t.default=e,t}(require("react-qr-reader")))}))),g=e=>n.createElement("div",{style:{paddingLeft:"1rem"}},n.createElement("div",{style:{display:"flex",alignItems:"center",padding:0}},n.createElement("img",{style:{display:"inline-block"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAoCAYAAACfKfiZAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAKAAAAACc9ikyAAAD+ElEQVRYCb1WbWiNURw/Z9caY5SyrKzVhuUtZcYoJdZ8kMywGClG+WK+eJsPmogNKfZBxBbmAyPyEgvtA8UUX9inbVeb8AGTd8t2j9/vdp91ntPzPPd57h3/+t1z/uf/ev7nnP9zhUiMsmH2BOgF9ifmIjmrVpgrDWuScxfMeqUW2EqiB2sjgrlJTDsNZmHACqyP2xJzGcyq2iU4E7kTzFVw7fEw+Qbou9bn94K7FCIlgNFh6I7y0E8oAQ9/NlEBuAig71ifv4VspM1iiJnHHsGZyPohjmdzxzeu79acsyFJm8UQMnzbfONmUIvnsRTG4g3DWAM8B24DM4GkaR88WMGcxkYtQr2h+wl8niYPPJ0Aix+AU2Cu8UlmASRe0gHA1L1JYaLUBEPToc7v1hx7XdISTc/3tAiaXs+uE3K2ZdJaQE/MnLdDzvvhm3ij2wDTkc4vj3lLx/gmji7tqmL6voYNcRze17zwv4CemNuc/xt8NSoqsau5OfoD2TSAxDb+EXDTNdeX0igeHYSCaajzfGoWZWDidU90O84XWIZuYw4EvwDT0OK527GG8VUPfcuO4wPAsVvqt/MolIYDbsSmxLPUiS+gEpgBOH1Z+7HOC90MMBFXYnn0jM35S8hDrtZJCFgBluZEHB/bIWenc6XVV1Qo/MCxCoM2ucUi0lwubX4YfBng1TKvQ1426MWY1NSolAs94jJKVoYaOh2DbqGw3ddQqutqkGcooEG5rmHM+8DvMNZs7KVuUaiUWOUjOO0k9HIjSpzOq1RRv0xgus2jnTkONhxbKsZ4A7gFlMbWRChddMLtZ4v3O0YiojZvq8rkEbwCrOai278Dkw98BxYBLYD+anaB58sREzerosiAaMExjCbvl0KpooAV6HIx2IN1Bk8FTgF6cLDiCLCTk86z8mlKSCzBbr6S90NSooumiXYm8MjBgG+3KbZehXGygw6XmAQrEU0C77TETxII3ofA6zrrZR+PIAvoBrhTEnvAPIBJZAIdQLzS8r8BkxGTNqq5AxLHocQY8iYxOIKuwCu4Sxkr8B7g5bLoIiYMTjoExAtOvTqASYiORtmmJCohxRfyBv3GeqkVnDJWgLQQaAV45iw3k5oKsAMySb9UDcVaKuduUYWiX1xDObPJI/AHDBXhBsnvwiBZCXChAuA/nWdkQLxg0bJGOf8/tDtG9fxNKqNfisX4ZKamC/Gw/Zzs9e9GiL1Q5n0ICn6A5gQJ5KY7C4Ig33s90WibdXOsr3ud7wsoshcwiaAUPfegRm76syHgBylINaIX0c1hout8FecB/i/Uy23OedvZP/4Z5cDzSeAnYAZnK54P/BcahygHAD5dNh12tilAIPoLD0OnpwCV000AAAAASUVORK5CYII=",alt:""}),n.createElement("div",{style:{fontSize:"1.25rem",fontWeight:"bold",marginLeft:"1rem"}},"Sync Keystone")),n.createElement("ul",{style:{marginTop:"2rem",listStyleType:"none",padding:0,fontSize:"1rem"}},n.createElement("li",{style:{marginBottom:"0.75rem"}},"1. Turn on your Keystone hardware device"),n.createElement("li",{style:{marginBottom:"0.75rem"}},`2. Select your "${e.walletMode}" as your Watch-only wallet(Companion App)`),n.createElement("li",{style:{marginBottom:"0.75rem"}},' 3. Press the "Scan Keystone" button and scan the QR Code displayed on your Keystone hardware wallet'),n.createElement("li",{style:{marginBottom:"0.75rem"}}," 4. Select account and check your watch-only wallet")),n.createElement("div",{style:{marginBottom:"1rem"}},n.createElement("a",{style:{marginTop:"1.25rem",color:"#784FFE",textDecoration:"none"},href:e.link},"Click here to view detailed tutorial")),n.createElement(m,{onClick:e.onButtonClick},"Sync Keystone")),p={overlay:{zIndex:999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",borderRadius:"10px",width:"37rem",marginRight:"-50%",transform:"translate(-50%, -50%)",postion:"relative"}};var f=()=>{const[e,{read:t,play:i,cameraReady:c,showError:f}]=(()=>{const[e,t]=r.useState(!1),[i,c]=r.useState(!1),[f,h]=r.useState(""),[S,w]=r.useState(""),[v,b]=r.useState("play"),[x,{play:B}]=(()=>{const[e,t]=r.useState(d),[a,i]=r.useState(!1),[c,y]=r.useState(100),[E,g]=r.useState(!1),[p,f]=r.useState(null),[h,S]=r.useState(null),w=r.useMemo(()=>new A.UREncoder(e),[e]),[v,b]=r.useState(w.nextPart()),x=r.useMemo(()=>new l.EventEmitter,[]);return r.useEffect(()=>{w.cbor.toString("hex")!==d.cbor.toString("hex")&&i(!0)},[w]),r.useEffect(()=>{const e=o.interval(c).subscribe(()=>{b(w.nextPart())});return()=>{e.unsubscribe()}},[c,w]),[a?n.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},p&&n.createElement("p",{style:{fontSize:"1.25rem",fontWeight:"bold"}},p),n.createElement(s,{size:288,data:v}),h&&n.createElement("p",{style:{fontSize:"1rem",textAlign:"center"}},h),n.createElement(u,null,n.createElement(m,{onClick:()=>{x.emit("finish",!0)}},E?"Continue":"Finish"))):n.createElement("div",null),{play:(e,r)=>new Promise(n=>{t(e),r&&(r.refreshSpeed&&y(r.refreshSpeed),r.hasNext&&g(r.hasNext),r.title&&f(r.title),r.description&&S(r.description)),x.once("finish",()=>{t(d),i(!1),y(100),n()})})}]})(),[C,{read:R,cameraReady:D,showError:k}]=(()=>{const[e,t]=r.useState(!1),[a,o]=r.useState([]),[i,s]=r.useState(new A.URDecoder),[c,d]=r.useState(""),g=r.useMemo(()=>new l.EventEmitter,[]),[p,f]=r.useState(null),[h,S]=r.useState(0),[w,v]=r.useState(null),b=()=>{s(new A.URDecoder),d("")};return[n.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},p&&n.createElement("p",{style:{fontSize:"1.25rem",fontWeight:"bold"}},p),w&&n.createElement("p",{style:{fontSize:"1rem",textAlign:"center"}},w),n.createElement(r.Suspense,{fallback:n.createElement("div",null)},n.createElement(E,{onScan:e=>{e&&(e=>{try{if(i.isComplete()){const e=i.resultUR();let t=!1;if(a.forEach(r=>{if(r===e.type)return t=!0,void g.emit("read",{result:e,status:"success"})}),!t)throw new y(`received ur type ${e.type}, but expected [${a.join(",")}]`)}else i.receivePart(e),S(i.getProgress())}catch(e){e instanceof y&&g.emit("error",e),d(e.message)}})(e)},onLoad:()=>{t(!0)},delay:100,style:{width:"100%"},onError:e=>{d(e.message)}})),n.createElement("p",null,(100*h).toFixed(0)," %"),c&&n.createElement("p",{style:{color:"red",fontSize:"1rem"}},c),n.createElement(u,null,n.createElement(m,{onClick:()=>{g.emit("read",{status:"canceled"})}},"Close"),c&&n.createElement(m,{onClick:()=>{b()}},"Retry"))),{read:(e,t)=>new Promise((r,n)=>{o(e),t&&(t.title&&f(t.title),t.description&&v(t.description)),g.once("read",e=>{b(),r(e)}),g.once("error",e=>{n(e)})}),showError:e=>d(e),cameraReady:e}]})(),U=()=>{t(!1),b("play")};return[n.createElement(a,{isOpen:e,style:p},n.createElement("div",{onClick:()=>t(!1)},n.createElement("img",{style:{position:"absolute",top:"1rem",right:"1rem"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADKADAAQAAAABAAAADAAAAAATDPpdAAAAmklEQVQoFZWRwQ3DIAwAa4brJPBP80hnaD/lD5N0iYxEfRVBxBGRwsvgO2PZklJaReTrvX/eTk7O+VVKuTtgDRYVPyOeHAysAFV40jCGEB69aHN/YSRZGK4JVuKu5/DrToDoqnI9tOh4vXJ2Qlc96kSY2lTfWs0m9DCT0r3MSkUrXR9r3eBCNbuDrY/td23z7Vg3wQhGIgcD+wPGY2fPvHuWagAAAABJRU5ErkJggg=="})),n.createElement("div",{style:{width:"35rem",boxSizing:"border-box",padding:18,flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center"}},i?n.createElement(g,{walletMode:f,link:S,onButtonClick:()=>{c(!1),b("read")}}):null,i||"read"!==v?x:C)),{play:async(e,r)=>{t(!0),b("play"),await B(e,r),U()},read:async(e,r)=>{if(r.renderInitial){c(!0),h(r.renderInitial.walletMode),w(r.renderInitial.link),t(!0);const n=await R(e,r);return U(),n}{b("read"),t(!0);const n=await R(e,r);return U(),n}},cameraReady:D,showError:k}]})();return x(t,i,c,f),e};let h,S,w,v,b=!1;const x=(e,t,r,n)=>{b=!0,h=e,S=t,w=r,v=n},B={bootstrap:()=>{const e=document.getElementsByTagName("body").item(0),r=document.createElement("div");r.id="kv_sdk_container",e.appendChild(r),a.setAppElement("#kv_sdk_container"),t.render(n.createElement(f),r)},getSdk:()=>{if(b)return{read:h,play:S,cameraReady:w,showError:v};throw new Error("SDK is not initialized")}};var C;(C=exports.SupportedResult||(exports.SupportedResult={})).UR_BYTES="bytes",C.UR_CRYPTO_HDKEY="crypto-hdkey",C.UR_ETH_SIGN_REQUEST="eth-sign-request",C.UR_ETH_SIGNATURE="eth-signature",exports.URTypeError=y,exports.default=B;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react-dom")),r=require("react"),n=e(r),a=e(require("react-modal")),o=require("rxjs"),i=e(require("qrcode.react")),l=require("events"),A=require("@ngraveio/bc-ur");const s=({size:e=200,data:t="",ecl:r="L"})=>n.createElement(i,{value:t,size:e,level:r}),c={minWidth:"16rem",height:"3rem",background:"#784FFE",borderColor:"grey",borderRadius:"8px",borderWidth:1,color:"white",outline:"none",margin:2},m=e=>{const{onClick:t,children:r}=e;return n.createElement("button",{onClick:t,style:c},r)},u=e=>n.createElement("div",{style:{width:"100%",marginTop:"1rem",display:"flex",flexDirection:"row-reverse",alignItems:"center",justifyContent:"center"}},e.children),d=new A.UR(Buffer.from("NO DATA","utf-8"));class y extends Error{constructor(e){super(e),Object.setPrototypeOf(this,y.prototype)}}const E=n.lazy(()=>new Promise((function(e){e(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t.default=e,t}(require("react-qr-reader")))}))),g=e=>n.createElement("div",{style:{paddingLeft:"1rem"}},n.createElement("div",{style:{display:"flex",alignItems:"center",padding:0}},n.createElement("img",{style:{display:"inline-block"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAoCAYAAACfKfiZAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAKAAAAACc9ikyAAAD+ElEQVRYCb1WbWiNURw/Z9caY5SyrKzVhuUtZcYoJdZ8kMywGClG+WK+eJsPmogNKfZBxBbmAyPyEgvtA8UUX9inbVeb8AGTd8t2j9/vdp91ntPzPPd57h3/+t1z/uf/ev7nnP9zhUiMsmH2BOgF9ifmIjmrVpgrDWuScxfMeqUW2EqiB2sjgrlJTDsNZmHACqyP2xJzGcyq2iU4E7kTzFVw7fEw+Qbou9bn94K7FCIlgNFh6I7y0E8oAQ9/NlEBuAig71ifv4VspM1iiJnHHsGZyPohjmdzxzeu79acsyFJm8UQMnzbfONmUIvnsRTG4g3DWAM8B24DM4GkaR88WMGcxkYtQr2h+wl8niYPPJ0Aix+AU2Cu8UlmASRe0gHA1L1JYaLUBEPToc7v1hx7XdISTc/3tAiaXs+uE3K2ZdJaQE/MnLdDzvvhm3ij2wDTkc4vj3lLx/gmji7tqmL6voYNcRze17zwv4CemNuc/xt8NSoqsau5OfoD2TSAxDb+EXDTNdeX0igeHYSCaajzfGoWZWDidU90O84XWIZuYw4EvwDT0OK527GG8VUPfcuO4wPAsVvqt/MolIYDbsSmxLPUiS+gEpgBOH1Z+7HOC90MMBFXYnn0jM35S8hDrtZJCFgBluZEHB/bIWenc6XVV1Qo/MCxCoM2ucUi0lwubX4YfBng1TKvQ1426MWY1NSolAs94jJKVoYaOh2DbqGw3ddQqutqkGcooEG5rmHM+8DvMNZs7KVuUaiUWOUjOO0k9HIjSpzOq1RRv0xgus2jnTkONhxbKsZ4A7gFlMbWRChddMLtZ4v3O0YiojZvq8rkEbwCrOai278Dkw98BxYBLYD+anaB58sREzerosiAaMExjCbvl0KpooAV6HIx2IN1Bk8FTgF6cLDiCLCTk86z8mlKSCzBbr6S90NSooumiXYm8MjBgG+3KbZehXGygw6XmAQrEU0C77TETxII3ofA6zrrZR+PIAvoBrhTEnvAPIBJZAIdQLzS8r8BkxGTNqq5AxLHocQY8iYxOIKuwCu4Sxkr8B7g5bLoIiYMTjoExAtOvTqASYiORtmmJCohxRfyBv3GeqkVnDJWgLQQaAV45iw3k5oKsAMySb9UDcVaKuduUYWiX1xDObPJI/AHDBXhBsnvwiBZCXChAuA/nWdkQLxg0bJGOf8/tDtG9fxNKqNfisX4ZKamC/Gw/Zzs9e9GiL1Q5n0ICn6A5gQJ5KY7C4Ig33s90WibdXOsr3ud7wsoshcwiaAUPfegRm76syHgBylINaIX0c1hout8FecB/i/Uy23OedvZP/4Z5cDzSeAnYAZnK54P/BcahygHAD5dNh12tilAIPoLD0OnpwCV000AAAAASUVORK5CYII=",alt:""}),n.createElement("div",{style:{fontSize:"1.25rem",fontWeight:"bold",marginLeft:"1rem"}},"Sync Keystone")),n.createElement("ul",{style:{marginTop:"2rem",listStyleType:"none",padding:0,fontSize:"1rem"}},n.createElement("li",{style:{marginBottom:"0.75rem"}},"1. Turn on your Keystone hardware device"),n.createElement("li",{style:{marginBottom:"0.75rem"}},`2. Select your "${e.walletMode}" as your Watch-only wallet(Companion App)`),n.createElement("li",{style:{marginBottom:"0.75rem"}},' 3. Press the "Scan Keystone" button and scan the QR Code displayed on your Keystone hardware wallet'),n.createElement("li",{style:{marginBottom:"0.75rem"}}," 4. Select account and check your watch-only wallet")),n.createElement("div",{style:{marginBottom:"1rem"}},n.createElement("a",{style:{marginTop:"1.25rem",color:"#784FFE",textDecoration:"none"},href:e.link},"Click here to view detailed tutorial")),n.createElement(m,{onClick:e.onButtonClick},"Sync Keystone")),p={overlay:{zIndex:999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",borderRadius:"10px",width:"37rem",marginRight:"-50%",transform:"translate(-50%, -50%)",postion:"relative"}};var f=()=>{const[e,{read:t,play:i,cameraReady:c,showError:f}]=(()=>{const[e,t]=r.useState(!1),[i,c]=r.useState(!1),[f,h]=r.useState(""),[S,w]=r.useState(""),[v,b]=r.useState("play"),[x,{play:B}]=(()=>{const[e,t]=r.useState(d),[a,i]=r.useState(!1),[c,y]=r.useState(100),[E,g]=r.useState(!1),[p,f]=r.useState(null),[h,S]=r.useState(null),w=r.useMemo(()=>new A.UREncoder(e),[e]),[v,b]=r.useState(w.nextPart()),x=r.useMemo(()=>new l.EventEmitter,[]);return r.useEffect(()=>{w.cbor.toString("hex")!==d.cbor.toString("hex")&&i(!0)},[w]),r.useEffect(()=>{const e=o.interval(c).subscribe(()=>{b(w.nextPart())});return()=>{e.unsubscribe()}},[c,w]),[a?n.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},p&&n.createElement("p",{style:{fontSize:"1.25rem",fontWeight:"bold"}},p),n.createElement(s,{size:288,data:v}),h&&n.createElement("p",{style:{fontSize:"1rem",textAlign:"center"}},h),n.createElement(u,null,n.createElement(m,{onClick:()=>{x.emit("finish",!0)}},E?"Continue":"Finish"))):n.createElement("div",null),{play:(e,r)=>new Promise(n=>{t(e),r&&(r.refreshSpeed&&y(r.refreshSpeed),r.hasNext&&g(r.hasNext),r.title&&f(r.title),r.description&&S(r.description)),x.once("finish",()=>{t(d),i(!1),y(100),n()})})}]})(),[C,{read:R,cameraReady:D,showError:k}]=(()=>{const[e,t]=r.useState(!1),[a,o]=r.useState([]),[i,s]=r.useState(new A.URDecoder),[c,d]=r.useState(""),g=r.useMemo(()=>new l.EventEmitter,[]),[p,f]=r.useState(null),[h,S]=r.useState(0),[w,v]=r.useState(null),b=()=>{s(new A.URDecoder),d("")};return[n.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},p&&n.createElement("p",{style:{fontSize:"1.25rem",fontWeight:"bold"}},p),w&&n.createElement("p",{style:{fontSize:"1rem",textAlign:"center"}},w),n.createElement(r.Suspense,{fallback:n.createElement("div",null)},n.createElement(E,{onScan:e=>{e&&(e=>{try{if(i.isComplete()){const e=i.resultUR();let t=!1;if(a.forEach(r=>{if(r===e.type)return t=!0,void g.emit("read",{result:e,status:"success"})}),!t)throw new y(`received ur type ${e.type}, but expected [${a.join(",")}]`)}else i.receivePart(e),S(i.getProgress())}catch(e){e instanceof y?g.emit("error",e):d(e.message)}})(e)},onLoad:()=>{t(!0)},delay:100,style:{width:"100%"},onError:e=>{d(e.message)}})),n.createElement("p",null,(100*h).toFixed(0)," %"),c&&n.createElement("p",{style:{color:"red",fontSize:"1rem"}},c),n.createElement(u,null,n.createElement(m,{onClick:()=>{g.emit("read",{status:"canceled"})}},"Close"),c&&n.createElement(m,{onClick:()=>{b()}},"Retry"))),{read:(e,t)=>new Promise((r,n)=>{o(e),t&&(t.title&&f(t.title),t.description&&v(t.description)),g.once("read",e=>{b(),r(e)}),g.once("error",e=>{n(e)})}),showError:e=>d(e),cameraReady:e}]})(),U=()=>{t(!1),b("play")};return[n.createElement(a,{isOpen:e,style:p},n.createElement("div",{onClick:()=>t(!1)},n.createElement("img",{style:{position:"absolute",top:"1rem",right:"1rem"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADKADAAQAAAABAAAADAAAAAATDPpdAAAAmklEQVQoFZWRwQ3DIAwAa4brJPBP80hnaD/lD5N0iYxEfRVBxBGRwsvgO2PZklJaReTrvX/eTk7O+VVKuTtgDRYVPyOeHAysAFV40jCGEB69aHN/YSRZGK4JVuKu5/DrToDoqnI9tOh4vXJ2Qlc96kSY2lTfWs0m9DCT0r3MSkUrXR9r3eBCNbuDrY/td23z7Vg3wQhGIgcD+wPGY2fPvHuWagAAAABJRU5ErkJggg=="})),n.createElement("div",{style:{width:"35rem",boxSizing:"border-box",padding:18,flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center"}},i?n.createElement(g,{walletMode:f,link:S,onButtonClick:()=>{c(!1),b("read")}}):null,i||"read"!==v?x:C)),{play:async(e,r)=>{t(!0),b("play"),await B(e,r),U()},read:async(e,r)=>{if(r.renderInitial){c(!0),h(r.renderInitial.walletMode),w(r.renderInitial.link),t(!0);const n=await R(e,r);return U(),n}{b("read"),t(!0);const n=await R(e,r);return U(),n}},cameraReady:D,showError:k}]})();return x(t,i,c,f),e};let h,S,w,v,b=!1;const x=(e,t,r,n)=>{b=!0,h=e,S=t,w=r,v=n},B={bootstrap:()=>{const e=document.getElementsByTagName("body").item(0),r=document.createElement("div");r.id="kv_sdk_container",e.appendChild(r),a.setAppElement("#kv_sdk_container"),t.render(n.createElement(f),r)},getSdk:()=>{if(b)return{read:h,play:S,cameraReady:w,showError:v};throw new Error("SDK is not initialized")}};var C;(C=exports.SupportedResult||(exports.SupportedResult={})).UR_BYTES="bytes",C.UR_CRYPTO_HDKEY="crypto-hdkey",C.UR_ETH_SIGN_REQUEST="eth-sign-request",C.UR_ETH_SIGNATURE="eth-signature",exports.URTypeError=y,exports.default=B;
//# sourceMappingURL=sdk.cjs.production.min.js.map

@@ -198,5 +198,5 @@ import ReactDOM from 'react-dom';

ee.emit('error', e);
} else {
setError(e.message);
}
setError(e.message);
}

@@ -203,0 +203,0 @@ };

{
"name": "@keystonehq/sdk",
"version": "0.6.3-alpha.1",
"version": "0.6.3-alpha.2",
"description": "Keystone airgaped wallet SDK",

@@ -46,3 +46,3 @@ "author": "aaronisme <aarondongchen@gmail.com>",

},
"gitHead": "fd0598142a2e8f4a97ef0950740412011947027f"
"gitHead": "9c09dcd071bb70f4b0d375bab645fcb58fccb125"
}

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