@notabene/javascript-sdk 2.14.0-next.4 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/notabene.cjs +1 -1
- package/dist/cjs/notabene.d.ts +1 -3
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +1 -3
- package/dist/esm/notabene.js +6 -6
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +1 -3
- package/dist/notabene.js +6 -6
- package/package.json +1 -1
- package/src/types.ts +0 -3
package/dist/cjs/notabene.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty;var k=(e,t,n)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var c=(e,t,n)=>k(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var N=(e=>(e.PRIVATE="WALLET",e.VASP="VASP",e))(N||{}),m=(e=>(e.NATURAL="natural",e.LEGAL="legal",e.SELF="self",e))(m||{}),w=(e=>(e.EMPTY="empty",e.VERIFY="verify",e.PENDING="pending",e.VERIFIED="verified",e.BANNED="banned",e))(w||{}),C=(e=>(e.ALLOWED="allowed",e.PENDING="pending",e))(C||{}),L=(e=>(e.SMS="sms",e.EMAIL="email",e))(L||{}),P=(e=>(e.PENDING="pending",e.APPROVED="approved",e.FAILED="failed",e.EXPIRED="expired",e.MAX_ATTEMPTS_REACHED="max_attempts_reached",e.UNREACHABLE="unreachable",e))(P||{}),R=(e=>(e.COINBASE="coinbase",e))(R||{}),S=(e=>(e.ASSET="asset",e.DESTINATION="destination",e.COUNTERPARTY="counterparty",e.AGENT="agent",e))(S||{}),l=(e=>(e.COMPLETE="complete",e.RESIZE="resize",e.RESULT="result",e.READY="ready",e.INVALID="invalid",e.ERROR="error",e.CANCEL="cancel",e.WARNING="warning",e.INFO="info",e))(l||{}),v=(e=>(e.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",e.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",e.WALLET_NOT_SUPPORTED="WALLET_NOT_SUPPORTED",e.TOKEN_INVALID="TOKEN_INVALID",e))(v||{}),T=(e=>(e.WALLET_ADDRESS_NOT_CONNECTED="WALLET_ADDRESS_NOT_CONNECTED",e.WALLET_LOCKED="WALLET_LOCKED",e.WALLET_UNREACHABLE="WALLET_UNREACHABLE",e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE="JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE",e.IDV_UNAVAILABLE="IDV_UNAVAILABLE",e))(T||{}),b=(e=>(e.UPDATE="update",e.REQUEST_RESPONSE="requestResponse",e))(b||{}),_=(e=>(e.PENDING="pending",e.FAILED="rejected",e.FLAGGED="flagged",e.VERIFIED="verified",e))(_||{}),O=(e=>(e.SelfDeclaration="self-declaration",e.SIWE="siwe",e.SIWX="siwx",e.SOL_SIWX="sol-siwx",e.EIP191="eip-191",e.EIP712="eip-712",e.EIP1271="eip-1271",e.BIP137="bip-137",e.BIP322="bip-322",e.BIP137_XPUB="xpub",e.TIP191="tip-191",e.ED25519="ed25519",e.XRP_ED25519="xrp-ed25519",e.XLM_ED25519="xlm-ed25519",e.CIP8="cip-8",e.COSMOS="cosmos-ecdsa",e.MicroTransfer="microtransfer",e.Screenshot="screenshot",e.Connect="connect",e.CONCORDIUM="concordium",e))(O||{});class j{constructor(){c(this,"listeners",new Map);c(this,"port");this.handleMessage=this.handleMessage.bind(this)}setPort(t){this.port=t,this.port.onmessage=this.handleMessage,this.port.start()}on(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>this.off(t,n)}off(t,n){const r=this.listeners.get(t);r&&(r.delete(n),r.size===0&&this.listeners.delete(t))}handleMessage(t){const n=t.data;if(typeof n=="object"&&n!==null&&"type"in n){const r=n.type,o=this.listeners.get(r);o&&o.forEach(i=>i(n))}}send(t){this.port&&this.port.postMessage(t)}}class D{constructor(t,n,r){c(this,"_url");c(this,"_value");c(this,"_options");c(this,"_errors",[]);c(this,"iframe");c(this,"eventManager");c(this,"modal");this._url=t,this._value=n,this._options=r,this.eventManager=new j,this.on(l.INVALID,o=>{o.type===l.INVALID&&(this._errors=o.errors,this._value=o.value)}),this.on(l.RESIZE,o=>{o.type===l.RESIZE&&this.iframe&&(this.iframe.style.height=`${o.height}px`)})}get url(){return this._url}get value(){return this._value}get options(){return this._options}get errors(){return this._errors}open(){document.location.href=this.url}mount(t){const n=document.querySelector(t);if(!n)throw new Error(`parentID ${t} not found`);this.embed(n)}embed(t,n=!1){var r,o;this.removeEmbed(),this.iframe=document.createElement("iframe"),this.iframe.src=this.url+(n?"":"&embedded=true"),this.iframe.allow="web-share; clipboard-write; hid; bluetooth;",this.iframe.style.width="100%",this.iframe.style.height="0px",this.iframe.style.border="none",this.iframe.style.overflow="hidden",this.iframe.scrolling="no",t.appendChild(this.iframe),window.addEventListener("message",i=>{var s,a;i.source===((s=this.iframe)==null?void 0:s.contentWindow)&&((a=this.eventManager)==null||a.setPort(i.ports[0]))}),(o=(r=this.iframe)==null?void 0:r.contentWindow)==null||o.focus()}removeEmbed(){this.iframe&&this.iframe.remove()}send(t){this.eventManager.send(t)}on(t,n){return this.eventManager.on(t,n)}off(t,n){this.eventManager.off(t,n)}update(t,n){this._value=t,n&&(this._options=n),this.send({type:b.UPDATE,value:t,options:this._options})}completion(){return new Promise((t,n)=>{let r,o,i;function s(){r&&r(),o&&o(),i&&i()}r=this.on(l.COMPLETE,a=>{t(a.response),s()}),o=this.on(l.CANCEL,()=>{n(new Error("User cancelled")),s()}),i=this.on("error",a=>{n(new Error(a.message)),s()})})}async openModal(){this.modal&&this.closeModal(),this.modal=document.createElement("dialog"),this.modal.style.border="none",this.modal.style.backgroundColor="white",this.modal.style.maxWidth="100vw",this.modal.style.maxHeight="100vh",this.modal.style.width="600px",this.modal.style.height="600px",document.body.appendChild(this.modal),this.embed(this.modal,!0);const t=this.on(l.CANCEL,()=>{this.closeModal()}),n=this.on(l.COMPLETE,()=>{this.closeModal()});return this.modal.showModal(),this.modal.addEventListener("click",()=>{this.closeModal()}),this.completion().finally(()=>{t(),n()})}closeModal(){var t;this.modal&&((t=this.modal)==null||t.close(),this.modal.remove(),this.modal=void 0)}async popup(){const t=window.open(this.url,"_blank","popup=true,width=600,height=600");window.addEventListener("message",o=>{var i;o.source===t&&(console.log("received message from popup",o.data),(i=this.eventManager)==null||i.setPort(o.ports[0]))});const n=this.on(l.CANCEL,()=>{t==null||t.close()}),r=this.on(l.COMPLETE,()=>{t==null||t.close()});return this.completion().finally(()=>{n(),r()})}}function F(e){return Object.entries(e).map(([t,n])=>{if(n==null)return;const r=encodeURIComponent(t),o=encodeURIComponent(typeof n=="object"?JSON.stringify(n):String(n));return`${r}=${o}`}).filter(t=>t!==void 0).join("&")}function J(e){const t=e.slice(1);return t?t.split("&").filter(Boolean).reduce((r,o)=>{const[i,s]=o.split("=");return i&&(r[decodeURIComponent(i)]=s?decodeURIComponent(s):""),r},{}):{}}new TextEncoder;const E=new TextDecoder;function q(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function G(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e=="string"?e:E.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=E.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return q(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}class U extends Error{constructor(n,r){var o;super(n,r);c(this,"code","ERR_JOSE_GENERIC");this.name=this.constructor.name,(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}c(U,"code","ERR_JOSE_GENERIC");class u extends U{constructor(){super(...arguments);c(this,"code","ERR_JWT_INVALID")}}c(u,"code","ERR_JWT_INVALID");function $(e){return typeof e=="object"&&e!==null}const H=e=>{if(!$(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};function K(e){if(typeof e!="string")throw new u("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new u("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new u("Invalid JWT");if(!t)throw new u("JWTs must contain a payload");let r;try{r=G(t)}catch{throw new u("Failed to base64url decode the payload")}let o;try{o=JSON.parse(E.decode(r))}catch{throw new u("Failed to parse the decoded payload as JSON")}if(!H(o))throw new u("Invalid JWT Claims Set");return o}function p(e,t){if(t!=null&&t.email)return`did:email:${t.email}`;if(t!=null&&t.name)return`did:name:${encodeURIComponent(t.name.replace(/\s+/g,"-"))}`;throw new Error(`Unable to generate ${e} ID: missing required ${e} information`)}function X(e){const{nameIdentifier:t,...n}=e;return{...n,nameIdentifier:t==null?void 0:t.map(({nameIdentifierType:r,...o})=>({...o,naturalPersonNameIdentifierType:r}))}}function z(e,t){return{naturalPerson:e.naturalPerson?{...e.naturalPerson,name:X(e.naturalPerson.name)}:void 0,legalPerson:e.legalPerson,accountNumber:[t]}}const A=[{addressType:"GEOG",addressLine:["1234 Main Street"],townName:"Unknown",country:"US"}];function Y(e){const t=e.trim();if(!t)return{primaryIdentifier:"",secondaryIdentifier:""};const n=t.split(/\s+/),r=n[n.length-1],o=n.slice(0,-1),i=o.length>0?o.join(" "):r;return{primaryIdentifier:r,secondaryIdentifier:i}}function Q(e,t,n=["1234567890"]){const r=t==null?void 0:t.map(o=>{const i={...o};return i.naturalPerson&&(i.naturalPerson={...i.naturalPerson,geographicAddress:A}),i.legalPerson&&(i.legalPerson={...i.legalPerson,geographicAddress:A}),i});return e==="originator"?{originatorPersons:r,accountNumber:n}:{beneficiaryPersons:r,accountNumber:n}}function Z(e,t="John Doe"){const{primaryIdentifier:n,secondaryIdentifier:r}=Y(t),o={naturalPerson:{name:[{nameIdentifier:[{primaryIdentifier:n,...r?{secondaryIdentifier:r}:{},nameIdentifierType:"LEGL"}]}],geographicAddress:A}};return e==="originator"?{originatorPersons:[o],accountNumber:["1234567890"]}:{beneficiaryPersons:[o],accountNumber:["1234567890"]}}const ee=e=>({...e,name:e.name?[e.name]:void 0}),te=e=>({...e,naturalPerson:e.naturalPerson?ee(e.naturalPerson):void 0}),ne=({beneficiary:e,originator:t},n,r,o,i)=>{var s;{const a=e&&{...e,...o&&{accountNumber:[o]},beneficiaryPersons:(s=e.beneficiaryPersons)==null?void 0:s.map(te)};if(r&&(a!=null&&a.beneficiaryPersons)){const d=Q("originator",a==null?void 0:a.beneficiaryPersons);return{beneficiary:{accountNumber:d.accountNumber,beneficiaryPersons:d.originatorPersons},originator:d}}return{beneficiary:a,originator:Z("originator",n)}}};function re(e,t,n){var i,s;const{beneficiary:r,originator:o}=ne(n,(i=e.customer)==null?void 0:i.name,t.originatorEqualsBeneficiary,e.destination);return{transactionAsset:t.transactionAsset,transactionAmount:t.transactionAmount,beneficiaryDid:(s=e.counterparty)==null?void 0:s.did,originatorVASPdid:t.originatorVASPdid,...t.beneficiaryVASPdid&&!t.beneficiaryProof?{beneficiaryVASPdid:t.beneficiaryVASPdid}:{},transactionBlockchainInfo:{...(o==null?void 0:o.accountNumber)&&{origin:o.accountNumber[0]},...e.destination&&{destination:e.destination}},...t.beneficiaryProof&&{beneficiaryProof:t.beneficiaryProof},...r&&{beneficiary:r},...o&&{originator:o},...t.originatorEqualsBeneficiary&&{originatorEqualsBeneficiary:t.originatorEqualsBeneficiary}}}function x(e,t,n={}){var a,d;const r=(n==null?void 0:n.originatorId)||p("originator",e.customer),o=(n==null?void 0:n.beneficiaryId)||p("beneficiary",e.counterparty),i=(n==null?void 0:n.referenceId)||Math.random().toString(36).substring(2,15),s=[];return t.originatorVASPdid&&s.push({"@id":t.originatorVASPdid,for:r,role:"VASP"}),t.beneficiaryVASPdid&&s.push({"@id":t.beneficiaryVASPdid,for:o,role:"VASP"}),e.destination&&((a=e==null?void 0:e.account)!=null&&a.did)&&s.push({"@id":e.account.did,for:t.beneficiaryVASPdid||o,role:"SettlementAddress"}),{originator:{"@id":r},beneficiary:{"@id":o},asset:e.asset,amount:((d=e.amountDecimal)==null?void 0:d.toString())||t.transactionAmount,agents:s,ref:i}}function M(e,t,n={}){var i,s,a;const r=n.beneficiaryId||p("beneficiary",e.counterparty),o=((i=e.counterparty)==null?void 0:i.type)===m.SELF&&n.originator?n.originator.originatorPerson:((a=(s=t.beneficiary)==null?void 0:s.beneficiaryPersons)==null?void 0:a.map(d=>z(d,r)))||[];return{ivms101:{originator:n.originator,beneficiary:{beneficiaryPerson:o}}}}function y(e,t,n){var o;const r={...e};if(!r.originatorId)try{const i=K(t);i!=null&&i.sub&&(r.originatorId=i.sub)}catch{}return r.beneficiaryId||(((o=n.counterparty)==null?void 0:o.type)===m.SELF?r.beneficiaryId=r.originatorId:n.destination&&(r.beneficiaryId=`did:key:${n.destination}`)),r}function oe(e){var s;if(!e.txCreate||!e.ivms101)throw new Error("Invalid response: missing required txCreate or ivms101 data");const{value:t,ivms101:n,proof:r,txCreate:o}=e,i={destination:(t==null?void 0:t.destination)||"",counterparty:(t==null?void 0:t.counterparty)||{},agent:t==null?void 0:t.agent,account:t==null?void 0:t.account,proof:r,asset:(t==null?void 0:t.asset)||(typeof o.transactionAsset=="string"?o.transactionAsset:(s=o.transactionAsset)==null?void 0:s.caip19)||"",amountDecimal:(t==null?void 0:t.amountDecimal)||(o.transactionAmount?parseFloat(o.transactionAmount):0),customer:t==null?void 0:t.customer};return re(i,o,n)}function ie(e,t,n={}){if(!e.txCreate||!e.ivms101)throw new Error("Invalid response: missing required txCreate or ivms101 data");const{value:r,txCreate:o,ivms101:i,proof:s}=e,a=y(n,t,r);return{createTx:x(r,o,a),ivms101:M(r,i,a),...s&&{confirmRelationship:{proof:s}}}}function se(e,t,n={}){if(!e.txCreate||!e.ivms101)throw new Error("Invalid response: missing required txCreate or ivms101 data");const{value:r,txCreate:o}=e,i=y(n,t,r);return x(r,o,i)}function ae(e,t,n={}){if(!e.ivms101)throw new Error("Invalid response: missing required ivms101 data");const{value:r,ivms101:o}=e,i=y(n,t,r);return M(r,o,i)}async function I(e,t){const n=JSON.stringify(e),r=new TextEncoder,o=t?g(t):crypto.getRandomValues(new Uint8Array(32)),i=await crypto.subtle.importKey("raw",o,{name:"AES-GCM"},!1,["encrypt"]),s=crypto.getRandomValues(new Uint8Array(12)),a=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,r.encode(n));return{ciphertext:`${f(s)}-${f(a)}`,key:f(o)}}async function V({ciphertext:e,key:t}){const[n,r]=e.split("-"),o=new Uint8Array(atob(t).split("").map(B=>B.charCodeAt(0))),i=g(n),s=g(r),a=await crypto.subtle.importKey("raw",o,{name:"AES-GCM"},!1,["decrypt"]),d=new TextDecoder,h=await crypto.subtle.decrypt({name:"AES-GCM",iv:new Uint8Array(i)},a,s);return JSON.parse(d.decode(h))}function f(e){const t=new Uint8Array(e);let n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return btoa(n)}function g(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}async function ce(e){const t=await fetch(e.url,{method:"GET"});if(!t.ok)throw new Error(`Failed to get connection: ${await t.text()}`);const n=await t.json();if(!n.id||!n.metadata||!n.status||!n.sealed)throw new Error("Data missing from server response");const r={id:n.id,metadata:n.metadata,status:n.status};if(n.status==="closed")return r;const o=n.sealed[n.sealed.length-1],i=await V({ciphertext:o,key:e.key});return n.status==="completed"?{...r,result:i.result}:{...r,tx:i.tx}}class de{constructor(t){c(this,"endpoint");this.endpoint=t}async create(t,n){const r=await I(t),o={metadata:n,sealed:r.ciphertext},i=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new Error(`Failed to create connection: ${await i.text()}`);const s=await i.json();return{id:s.id,version:s.version,status:s.status,metadata:n,data:t,key:r.key}}async update(t,n,r,o,i){const s=await I(n,i),a={sealed:s.ciphertext,version:r,status:o},d=await fetch(`${this.endpoint}/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!d.ok)throw new Error(`Failed to update connection: ${await d.text()}`);const h=await d.json();return{id:h.id,metadata:h.metadata,version:h.version,status:h.status,data:n,key:s.key}}async get(t,n){const r=await fetch(`${this.endpoint}/${t}`,{method:"GET"});if(!r.ok)throw new Error(`Failed to get connection: ${await r.text()}`);const o=await r.json(),i=o.sealed[o.sealed.length-1],s=await V({ciphertext:i,key:n});return{id:o.id,status:o.status,version:o.version,metadata:o.metadata,data:s,key:n}}async close(t){const n=await fetch(`${this.endpoint}/${t}`,{method:"DELETE"});if(!n.ok)throw new Error(`Failed to close connection: ${await n.text()}`)}}class le{constructor(t){c(this,"nodeUrl");c(this,"authToken");c(this,"uxUrl");c(this,"theme");c(this,"locale");this.uxUrl=t.uxUrl||"https://connect.notabene.id",this.nodeUrl=t.nodeUrl,this.authToken=t.authToken,this.theme=t.theme,this.locale=t.locale}componentUrl(t,n,r,o){const i=new URL(this.uxUrl);i.pathname=t;const s=F({authToken:this.authToken,value:n,configuration:r});return i.hash=s,this.nodeUrl&&i.searchParams.set("nodeUrl",this.nodeUrl),this.theme&&i.searchParams.set("theme",JSON.stringify(this.theme)),this.locale&&i.searchParams.set("locale",this.locale),o&&(o.callback&&i.searchParams.set("callback_url",o.callback),o.redirectUri&&i.searchParams.set("redirect_uri",o.redirectUri)),i.toString()}createComponent(t,n,r,o){return new D(this.componentUrl(t,n,r,o),n,r)}createWithdrawalAssist(t,n,r){return this.createComponent("withdrawal-assist",t,n,r)}createConnectWallet(t,n,r){return this.createComponent("connect",t,n,r)}createDepositRequest(t,n,r){return this.createComponent("deposit-request",t,n,r)}createDepositAssist(t,n,r){return this.createComponent("deposit-assist",t,n,r)}}exports.AgentType=N;exports.CMType=l;exports.CodeVerificationStatus=P;exports.ConnectionManager=de;exports.EmbeddedComponent=D;exports.ErrorIdentifierCode=v;exports.HMType=b;exports.IdentityVerificationMethod=L;exports.OAuthProvider=R;exports.PersonType=m;exports.ProofStatus=_;exports.ProofTypes=O;exports.Status=w;exports.VASPSearchControl=C;exports.ValidationSections=S;exports.WarningIdentifierCode=T;exports.componentResponseToIVMS101=ae;exports.componentResponseToTxCreateRequest=se;exports.componentResponseToTxRequests=ie;exports.componentResponseToV1TxCreateRequest=oe;exports.decodeFragmentToObject=J;exports.default=le;exports.getRefreshResult=ce;
|
|
1
|
+
"use strict";var W=Object.defineProperty;var k=(e,t,n)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var c=(e,t,n)=>k(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var N=(e=>(e.PRIVATE="WALLET",e.VASP="VASP",e))(N||{}),m=(e=>(e.NATURAL="natural",e.LEGAL="legal",e.SELF="self",e))(m||{}),w=(e=>(e.EMPTY="empty",e.VERIFY="verify",e.PENDING="pending",e.VERIFIED="verified",e.BANNED="banned",e))(w||{}),C=(e=>(e.ALLOWED="allowed",e.PENDING="pending",e))(C||{}),L=(e=>(e.SMS="sms",e.EMAIL="email",e))(L||{}),P=(e=>(e.PENDING="pending",e.APPROVED="approved",e.FAILED="failed",e.EXPIRED="expired",e.MAX_ATTEMPTS_REACHED="max_attempts_reached",e.UNREACHABLE="unreachable",e))(P||{}),R=(e=>(e.COINBASE="coinbase",e))(R||{}),S=(e=>(e.ASSET="asset",e.DESTINATION="destination",e.COUNTERPARTY="counterparty",e.AGENT="agent",e))(S||{}),l=(e=>(e.COMPLETE="complete",e.RESIZE="resize",e.RESULT="result",e.READY="ready",e.INVALID="invalid",e.ERROR="error",e.CANCEL="cancel",e.WARNING="warning",e.INFO="info",e))(l||{}),T=(e=>(e.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",e.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",e.WALLET_NOT_SUPPORTED="WALLET_NOT_SUPPORTED",e.TOKEN_INVALID="TOKEN_INVALID",e))(T||{}),v=(e=>(e.WALLET_ADDRESS_NOT_CONNECTED="WALLET_ADDRESS_NOT_CONNECTED",e.WALLET_LOCKED="WALLET_LOCKED",e.WALLET_UNREACHABLE="WALLET_UNREACHABLE",e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE="JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE",e.IDV_UNAVAILABLE="IDV_UNAVAILABLE",e))(v||{}),y=(e=>(e.UPDATE="update",e.REQUEST_RESPONSE="requestResponse",e))(y||{}),O=(e=>(e.PENDING="pending",e.FAILED="rejected",e.FLAGGED="flagged",e.VERIFIED="verified",e))(O||{}),_=(e=>(e.SelfDeclaration="self-declaration",e.SIWE="siwe",e.SIWX="siwx",e.SOL_SIWX="sol-siwx",e.EIP191="eip-191",e.EIP712="eip-712",e.EIP1271="eip-1271",e.BIP137="bip-137",e.BIP322="bip-322",e.TIP191="tip-191",e.ED25519="ed25519",e.XRP_ED25519="xrp-ed25519",e.XLM_ED25519="xlm-ed25519",e.CIP8="cip-8",e.COSMOS="cosmos-ecdsa",e.MicroTransfer="microtransfer",e.Screenshot="screenshot",e.Connect="connect",e.CONCORDIUM="concordium",e))(_||{});class j{constructor(){c(this,"listeners",new Map);c(this,"port");this.handleMessage=this.handleMessage.bind(this)}setPort(t){this.port=t,this.port.onmessage=this.handleMessage,this.port.start()}on(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>this.off(t,n)}off(t,n){const r=this.listeners.get(t);r&&(r.delete(n),r.size===0&&this.listeners.delete(t))}handleMessage(t){const n=t.data;if(typeof n=="object"&&n!==null&&"type"in n){const r=n.type,o=this.listeners.get(r);o&&o.forEach(i=>i(n))}}send(t){this.port&&this.port.postMessage(t)}}class D{constructor(t,n,r){c(this,"_url");c(this,"_value");c(this,"_options");c(this,"_errors",[]);c(this,"iframe");c(this,"eventManager");c(this,"modal");this._url=t,this._value=n,this._options=r,this.eventManager=new j,this.on(l.INVALID,o=>{o.type===l.INVALID&&(this._errors=o.errors,this._value=o.value)}),this.on(l.RESIZE,o=>{o.type===l.RESIZE&&this.iframe&&(this.iframe.style.height=`${o.height}px`)})}get url(){return this._url}get value(){return this._value}get options(){return this._options}get errors(){return this._errors}open(){document.location.href=this.url}mount(t){const n=document.querySelector(t);if(!n)throw new Error(`parentID ${t} not found`);this.embed(n)}embed(t,n=!1){var r,o;this.removeEmbed(),this.iframe=document.createElement("iframe"),this.iframe.src=this.url+(n?"":"&embedded=true"),this.iframe.allow="web-share; clipboard-write; hid; bluetooth;",this.iframe.style.width="100%",this.iframe.style.height="0px",this.iframe.style.border="none",this.iframe.style.overflow="hidden",this.iframe.scrolling="no",t.appendChild(this.iframe),window.addEventListener("message",i=>{var s,a;i.source===((s=this.iframe)==null?void 0:s.contentWindow)&&((a=this.eventManager)==null||a.setPort(i.ports[0]))}),(o=(r=this.iframe)==null?void 0:r.contentWindow)==null||o.focus()}removeEmbed(){this.iframe&&this.iframe.remove()}send(t){this.eventManager.send(t)}on(t,n){return this.eventManager.on(t,n)}off(t,n){this.eventManager.off(t,n)}update(t,n){this._value=t,n&&(this._options=n),this.send({type:y.UPDATE,value:t,options:this._options})}completion(){return new Promise((t,n)=>{let r,o,i;function s(){r&&r(),o&&o(),i&&i()}r=this.on(l.COMPLETE,a=>{t(a.response),s()}),o=this.on(l.CANCEL,()=>{n(new Error("User cancelled")),s()}),i=this.on("error",a=>{n(new Error(a.message)),s()})})}async openModal(){this.modal&&this.closeModal(),this.modal=document.createElement("dialog"),this.modal.style.border="none",this.modal.style.backgroundColor="white",this.modal.style.maxWidth="100vw",this.modal.style.maxHeight="100vh",this.modal.style.width="600px",this.modal.style.height="600px",document.body.appendChild(this.modal),this.embed(this.modal,!0);const t=this.on(l.CANCEL,()=>{this.closeModal()}),n=this.on(l.COMPLETE,()=>{this.closeModal()});return this.modal.showModal(),this.modal.addEventListener("click",()=>{this.closeModal()}),this.completion().finally(()=>{t(),n()})}closeModal(){var t;this.modal&&((t=this.modal)==null||t.close(),this.modal.remove(),this.modal=void 0)}async popup(){const t=window.open(this.url,"_blank","popup=true,width=600,height=600");window.addEventListener("message",o=>{var i;o.source===t&&(console.log("received message from popup",o.data),(i=this.eventManager)==null||i.setPort(o.ports[0]))});const n=this.on(l.CANCEL,()=>{t==null||t.close()}),r=this.on(l.COMPLETE,()=>{t==null||t.close()});return this.completion().finally(()=>{n(),r()})}}function F(e){return Object.entries(e).map(([t,n])=>{if(n==null)return;const r=encodeURIComponent(t),o=encodeURIComponent(typeof n=="object"?JSON.stringify(n):String(n));return`${r}=${o}`}).filter(t=>t!==void 0).join("&")}function J(e){const t=e.slice(1);return t?t.split("&").filter(Boolean).reduce((r,o)=>{const[i,s]=o.split("=");return i&&(r[decodeURIComponent(i)]=s?decodeURIComponent(s):""),r},{}):{}}new TextEncoder;const E=new TextDecoder;function q(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function G(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e=="string"?e:E.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=E.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return q(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}class U extends Error{constructor(n,r){var o;super(n,r);c(this,"code","ERR_JOSE_GENERIC");this.name=this.constructor.name,(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}c(U,"code","ERR_JOSE_GENERIC");class u extends U{constructor(){super(...arguments);c(this,"code","ERR_JWT_INVALID")}}c(u,"code","ERR_JWT_INVALID");function $(e){return typeof e=="object"&&e!==null}const H=e=>{if(!$(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};function K(e){if(typeof e!="string")throw new u("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:n}=e.split(".");if(n===5)throw new u("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new u("Invalid JWT");if(!t)throw new u("JWTs must contain a payload");let r;try{r=G(t)}catch{throw new u("Failed to base64url decode the payload")}let o;try{o=JSON.parse(E.decode(r))}catch{throw new u("Failed to parse the decoded payload as JSON")}if(!H(o))throw new u("Invalid JWT Claims Set");return o}function p(e,t){if(t!=null&&t.email)return`did:email:${t.email}`;if(t!=null&&t.name)return`did:name:${encodeURIComponent(t.name.replace(/\s+/g,"-"))}`;throw new Error(`Unable to generate ${e} ID: missing required ${e} information`)}function X(e){const{nameIdentifier:t,...n}=e;return{...n,nameIdentifier:t==null?void 0:t.map(({nameIdentifierType:r,...o})=>({...o,naturalPersonNameIdentifierType:r}))}}function z(e,t){return{naturalPerson:e.naturalPerson?{...e.naturalPerson,name:X(e.naturalPerson.name)}:void 0,legalPerson:e.legalPerson,accountNumber:[t]}}const A=[{addressType:"GEOG",addressLine:["1234 Main Street"],townName:"Unknown",country:"US"}];function Y(e){const t=e.trim();if(!t)return{primaryIdentifier:"",secondaryIdentifier:""};const n=t.split(/\s+/),r=n[n.length-1],o=n.slice(0,-1),i=o.length>0?o.join(" "):r;return{primaryIdentifier:r,secondaryIdentifier:i}}function Q(e,t,n=["1234567890"]){const r=t==null?void 0:t.map(o=>{const i={...o};return i.naturalPerson&&(i.naturalPerson={...i.naturalPerson,geographicAddress:A}),i.legalPerson&&(i.legalPerson={...i.legalPerson,geographicAddress:A}),i});return e==="originator"?{originatorPersons:r,accountNumber:n}:{beneficiaryPersons:r,accountNumber:n}}function Z(e,t="John Doe"){const{primaryIdentifier:n,secondaryIdentifier:r}=Y(t),o={naturalPerson:{name:[{nameIdentifier:[{primaryIdentifier:n,...r?{secondaryIdentifier:r}:{},nameIdentifierType:"LEGL"}]}],geographicAddress:A}};return e==="originator"?{originatorPersons:[o],accountNumber:["1234567890"]}:{beneficiaryPersons:[o],accountNumber:["1234567890"]}}const ee=e=>({...e,name:e.name?[e.name]:void 0}),te=e=>({...e,naturalPerson:e.naturalPerson?ee(e.naturalPerson):void 0}),ne=({beneficiary:e,originator:t},n,r,o,i)=>{var s;{const a=e&&{...e,...o&&{accountNumber:[o]},beneficiaryPersons:(s=e.beneficiaryPersons)==null?void 0:s.map(te)};if(r&&(a!=null&&a.beneficiaryPersons)){const d=Q("originator",a==null?void 0:a.beneficiaryPersons);return{beneficiary:{accountNumber:d.accountNumber,beneficiaryPersons:d.originatorPersons},originator:d}}return{beneficiary:a,originator:Z("originator",n)}}};function re(e,t,n){var i,s;const{beneficiary:r,originator:o}=ne(n,(i=e.customer)==null?void 0:i.name,t.originatorEqualsBeneficiary,e.destination);return{transactionAsset:t.transactionAsset,transactionAmount:t.transactionAmount,beneficiaryDid:(s=e.counterparty)==null?void 0:s.did,originatorVASPdid:t.originatorVASPdid,...t.beneficiaryVASPdid&&!t.beneficiaryProof?{beneficiaryVASPdid:t.beneficiaryVASPdid}:{},transactionBlockchainInfo:{...(o==null?void 0:o.accountNumber)&&{origin:o.accountNumber[0]},...e.destination&&{destination:e.destination}},...t.beneficiaryProof&&{beneficiaryProof:t.beneficiaryProof},...r&&{beneficiary:r},...o&&{originator:o},...t.originatorEqualsBeneficiary&&{originatorEqualsBeneficiary:t.originatorEqualsBeneficiary}}}function x(e,t,n={}){var a,d;const r=(n==null?void 0:n.originatorId)||p("originator",e.customer),o=(n==null?void 0:n.beneficiaryId)||p("beneficiary",e.counterparty),i=(n==null?void 0:n.referenceId)||Math.random().toString(36).substring(2,15),s=[];return t.originatorVASPdid&&s.push({"@id":t.originatorVASPdid,for:r,role:"VASP"}),t.beneficiaryVASPdid&&s.push({"@id":t.beneficiaryVASPdid,for:o,role:"VASP"}),e.destination&&((a=e==null?void 0:e.account)!=null&&a.did)&&s.push({"@id":e.account.did,for:t.beneficiaryVASPdid||o,role:"SettlementAddress"}),{originator:{"@id":r},beneficiary:{"@id":o},asset:e.asset,amount:((d=e.amountDecimal)==null?void 0:d.toString())||t.transactionAmount,agents:s,ref:i}}function M(e,t,n={}){var i,s,a;const r=n.beneficiaryId||p("beneficiary",e.counterparty),o=((i=e.counterparty)==null?void 0:i.type)===m.SELF&&n.originator?n.originator.originatorPerson:((a=(s=t.beneficiary)==null?void 0:s.beneficiaryPersons)==null?void 0:a.map(d=>z(d,r)))||[];return{ivms101:{originator:n.originator,beneficiary:{beneficiaryPerson:o}}}}function b(e,t,n){var o;const r={...e};if(!r.originatorId)try{const i=K(t);i!=null&&i.sub&&(r.originatorId=i.sub)}catch{}return r.beneficiaryId||(((o=n.counterparty)==null?void 0:o.type)===m.SELF?r.beneficiaryId=r.originatorId:n.destination&&(r.beneficiaryId=`did:key:${n.destination}`)),r}function oe(e){var s;if(!e.txCreate||!e.ivms101)throw new Error("Invalid response: missing required txCreate or ivms101 data");const{value:t,ivms101:n,proof:r,txCreate:o}=e,i={destination:(t==null?void 0:t.destination)||"",counterparty:(t==null?void 0:t.counterparty)||{},agent:t==null?void 0:t.agent,account:t==null?void 0:t.account,proof:r,asset:(t==null?void 0:t.asset)||(typeof o.transactionAsset=="string"?o.transactionAsset:(s=o.transactionAsset)==null?void 0:s.caip19)||"",amountDecimal:(t==null?void 0:t.amountDecimal)||(o.transactionAmount?parseFloat(o.transactionAmount):0),customer:t==null?void 0:t.customer};return re(i,o,n)}function ie(e,t,n={}){if(!e.txCreate||!e.ivms101)throw new Error("Invalid response: missing required txCreate or ivms101 data");const{value:r,txCreate:o,ivms101:i,proof:s}=e,a=b(n,t,r);return{createTx:x(r,o,a),ivms101:M(r,i,a),...s&&{confirmRelationship:{proof:s}}}}function se(e,t,n={}){if(!e.txCreate||!e.ivms101)throw new Error("Invalid response: missing required txCreate or ivms101 data");const{value:r,txCreate:o}=e,i=b(n,t,r);return x(r,o,i)}function ae(e,t,n={}){if(!e.ivms101)throw new Error("Invalid response: missing required ivms101 data");const{value:r,ivms101:o}=e,i=b(n,t,r);return M(r,o,i)}async function I(e,t){const n=JSON.stringify(e),r=new TextEncoder,o=t?g(t):crypto.getRandomValues(new Uint8Array(32)),i=await crypto.subtle.importKey("raw",o,{name:"AES-GCM"},!1,["encrypt"]),s=crypto.getRandomValues(new Uint8Array(12)),a=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,r.encode(n));return{ciphertext:`${f(s)}-${f(a)}`,key:f(o)}}async function V({ciphertext:e,key:t}){const[n,r]=e.split("-"),o=new Uint8Array(atob(t).split("").map(B=>B.charCodeAt(0))),i=g(n),s=g(r),a=await crypto.subtle.importKey("raw",o,{name:"AES-GCM"},!1,["decrypt"]),d=new TextDecoder,h=await crypto.subtle.decrypt({name:"AES-GCM",iv:new Uint8Array(i)},a,s);return JSON.parse(d.decode(h))}function f(e){const t=new Uint8Array(e);let n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return btoa(n)}function g(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}async function ce(e){const t=await fetch(e.url,{method:"GET"});if(!t.ok)throw new Error(`Failed to get connection: ${await t.text()}`);const n=await t.json();if(!n.id||!n.metadata||!n.status||!n.sealed)throw new Error("Data missing from server response");const r={id:n.id,metadata:n.metadata,status:n.status};if(n.status==="closed")return r;const o=n.sealed[n.sealed.length-1],i=await V({ciphertext:o,key:e.key});return n.status==="completed"?{...r,result:i.result}:{...r,tx:i.tx}}class de{constructor(t){c(this,"endpoint");this.endpoint=t}async create(t,n){const r=await I(t),o={metadata:n,sealed:r.ciphertext},i=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new Error(`Failed to create connection: ${await i.text()}`);const s=await i.json();return{id:s.id,version:s.version,status:s.status,metadata:n,data:t,key:r.key}}async update(t,n,r,o,i){const s=await I(n,i),a={sealed:s.ciphertext,version:r,status:o},d=await fetch(`${this.endpoint}/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!d.ok)throw new Error(`Failed to update connection: ${await d.text()}`);const h=await d.json();return{id:h.id,metadata:h.metadata,version:h.version,status:h.status,data:n,key:s.key}}async get(t,n){const r=await fetch(`${this.endpoint}/${t}`,{method:"GET"});if(!r.ok)throw new Error(`Failed to get connection: ${await r.text()}`);const o=await r.json(),i=o.sealed[o.sealed.length-1],s=await V({ciphertext:i,key:n});return{id:o.id,status:o.status,version:o.version,metadata:o.metadata,data:s,key:n}}async close(t){const n=await fetch(`${this.endpoint}/${t}`,{method:"DELETE"});if(!n.ok)throw new Error(`Failed to close connection: ${await n.text()}`)}}class le{constructor(t){c(this,"nodeUrl");c(this,"authToken");c(this,"uxUrl");c(this,"theme");c(this,"locale");this.uxUrl=t.uxUrl||"https://connect.notabene.id",this.nodeUrl=t.nodeUrl,this.authToken=t.authToken,this.theme=t.theme,this.locale=t.locale}componentUrl(t,n,r,o){const i=new URL(this.uxUrl);i.pathname=t;const s=F({authToken:this.authToken,value:n,configuration:r});return i.hash=s,this.nodeUrl&&i.searchParams.set("nodeUrl",this.nodeUrl),this.theme&&i.searchParams.set("theme",JSON.stringify(this.theme)),this.locale&&i.searchParams.set("locale",this.locale),o&&(o.callback&&i.searchParams.set("callback_url",o.callback),o.redirectUri&&i.searchParams.set("redirect_uri",o.redirectUri)),i.toString()}createComponent(t,n,r,o){return new D(this.componentUrl(t,n,r,o),n,r)}createWithdrawalAssist(t,n,r){return this.createComponent("withdrawal-assist",t,n,r)}createConnectWallet(t,n,r){return this.createComponent("connect",t,n,r)}createDepositRequest(t,n,r){return this.createComponent("deposit-request",t,n,r)}createDepositAssist(t,n,r){return this.createComponent("deposit-assist",t,n,r)}}exports.AgentType=N;exports.CMType=l;exports.CodeVerificationStatus=P;exports.ConnectionManager=de;exports.EmbeddedComponent=D;exports.ErrorIdentifierCode=T;exports.HMType=y;exports.IdentityVerificationMethod=L;exports.OAuthProvider=R;exports.PersonType=m;exports.ProofStatus=O;exports.ProofTypes=_;exports.Status=w;exports.VASPSearchControl=C;exports.ValidationSections=S;exports.WarningIdentifierCode=v;exports.componentResponseToIVMS101=ae;exports.componentResponseToTxCreateRequest=se;exports.componentResponseToTxRequests=ie;exports.componentResponseToV1TxCreateRequest=oe;exports.decodeFragmentToObject=J;exports.default=le;exports.getRefreshResult=ce;
|
package/dist/cjs/notabene.d.ts
CHANGED
|
@@ -1612,7 +1612,6 @@ export declare enum ProofStatus {
|
|
|
1612
1612
|
* - ED25519: Ed25519 signature (used in Solana)
|
|
1613
1613
|
* - XRP_ED25519: Ed25519 signature (used in XRP)
|
|
1614
1614
|
* - XLM_ED25519: Ed25519 signature (used in Stellar)
|
|
1615
|
-
* - XPUB: Extended public key signature for HD wallets
|
|
1616
1615
|
* - MicroTransfer: Proof via small blockchain transaction
|
|
1617
1616
|
* - Screenshot: Image proof of ownership/access
|
|
1618
1617
|
* - CIP8: Cardano message signing standard (CIP-8)
|
|
@@ -1633,7 +1632,6 @@ export declare enum ProofTypes {
|
|
|
1633
1632
|
EIP1271 = "eip-1271",
|
|
1634
1633
|
BIP137 = "bip-137",
|
|
1635
1634
|
BIP322 = "bip-322",
|
|
1636
|
-
BIP137_XPUB = "xpub",
|
|
1637
1635
|
TIP191 = "tip-191",
|
|
1638
1636
|
ED25519 = "ed25519",
|
|
1639
1637
|
XRP_ED25519 = "xrp-ed25519",
|
|
@@ -1708,7 +1706,7 @@ export declare interface ScreenshotProof extends OwnershipProof {
|
|
|
1708
1706
|
* @public
|
|
1709
1707
|
*/
|
|
1710
1708
|
export declare interface SignatureProof extends OwnershipProof {
|
|
1711
|
-
type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP322 | ProofTypes.
|
|
1709
|
+
type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP322 | ProofTypes.ED25519 | ProofTypes.TIP191 | ProofTypes.SIWX | ProofTypes.SOL_SIWX | ProofTypes.SIWE | ProofTypes.CIP8 | ProofTypes.XRP_ED25519 | ProofTypes.CONCORDIUM | ProofTypes.XLM_ED25519 | ProofTypes.COSMOS;
|
|
1712
1710
|
proof: string;
|
|
1713
1711
|
attestation: string;
|
|
1714
1712
|
wallet_provider: string;
|
package/dist/cjs/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.14.
|
|
13
|
+
"version": "2.14.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/dist/esm/notabene.d.ts
CHANGED
|
@@ -1612,7 +1612,6 @@ export declare enum ProofStatus {
|
|
|
1612
1612
|
* - ED25519: Ed25519 signature (used in Solana)
|
|
1613
1613
|
* - XRP_ED25519: Ed25519 signature (used in XRP)
|
|
1614
1614
|
* - XLM_ED25519: Ed25519 signature (used in Stellar)
|
|
1615
|
-
* - XPUB: Extended public key signature for HD wallets
|
|
1616
1615
|
* - MicroTransfer: Proof via small blockchain transaction
|
|
1617
1616
|
* - Screenshot: Image proof of ownership/access
|
|
1618
1617
|
* - CIP8: Cardano message signing standard (CIP-8)
|
|
@@ -1633,7 +1632,6 @@ export declare enum ProofTypes {
|
|
|
1633
1632
|
EIP1271 = "eip-1271",
|
|
1634
1633
|
BIP137 = "bip-137",
|
|
1635
1634
|
BIP322 = "bip-322",
|
|
1636
|
-
BIP137_XPUB = "xpub",
|
|
1637
1635
|
TIP191 = "tip-191",
|
|
1638
1636
|
ED25519 = "ed25519",
|
|
1639
1637
|
XRP_ED25519 = "xrp-ed25519",
|
|
@@ -1708,7 +1706,7 @@ export declare interface ScreenshotProof extends OwnershipProof {
|
|
|
1708
1706
|
* @public
|
|
1709
1707
|
*/
|
|
1710
1708
|
export declare interface SignatureProof extends OwnershipProof {
|
|
1711
|
-
type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP322 | ProofTypes.
|
|
1709
|
+
type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP322 | ProofTypes.ED25519 | ProofTypes.TIP191 | ProofTypes.SIWX | ProofTypes.SOL_SIWX | ProofTypes.SIWE | ProofTypes.CIP8 | ProofTypes.XRP_ED25519 | ProofTypes.CONCORDIUM | ProofTypes.XLM_ED25519 | ProofTypes.COSMOS;
|
|
1712
1710
|
proof: string;
|
|
1713
1711
|
attestation: string;
|
|
1714
1712
|
wallet_provider: string;
|
package/dist/esm/notabene.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var C = Object.defineProperty;
|
|
2
2
|
var R = (e, t, n) => t in e ? C(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var c = (e, t, n) => R(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
var S = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(S || {}), g = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(g || {}), _ = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(_ || {}), O = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(O || {}), T = /* @__PURE__ */ ((e) => (e.SMS = "sms", e.EMAIL = "email", e))(T || {}), D = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.COINBASE = "coinbase", e))(U || {}), x = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(x || {}), l = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(l || {}), M = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(M || {}), V = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(V || {}),
|
|
4
|
+
var S = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(S || {}), g = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(g || {}), _ = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(_ || {}), O = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(O || {}), T = /* @__PURE__ */ ((e) => (e.SMS = "sms", e.EMAIL = "email", e))(T || {}), D = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.COINBASE = "coinbase", e))(U || {}), x = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(x || {}), l = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(l || {}), M = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(M || {}), V = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(V || {}), I = /* @__PURE__ */ ((e) => (e.UPDATE = "update", e.REQUEST_RESPONSE = "requestResponse", e))(I || {}), B = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.FAILED = "rejected", e.FLAGGED = "flagged", e.VERIFIED = "verified", e))(B || {}), W = /* @__PURE__ */ ((e) => (e.SelfDeclaration = "self-declaration", e.SIWE = "siwe", e.SIWX = "siwx", e.SOL_SIWX = "sol-siwx", e.EIP191 = "eip-191", e.EIP712 = "eip-712", e.EIP1271 = "eip-1271", e.BIP137 = "bip-137", e.BIP322 = "bip-322", e.TIP191 = "tip-191", e.ED25519 = "ed25519", e.XRP_ED25519 = "xrp-ed25519", e.XLM_ED25519 = "xlm-ed25519", e.CIP8 = "cip-8", e.COSMOS = "cosmos-ecdsa", e.MicroTransfer = "microtransfer", e.Screenshot = "screenshot", e.Connect = "connect", e.CONCORDIUM = "concordium", e))(W || {});
|
|
5
5
|
class k {
|
|
6
6
|
constructor() {
|
|
7
7
|
c(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -166,7 +166,7 @@ class J {
|
|
|
166
166
|
* @param value - The new transaction value
|
|
167
167
|
*/
|
|
168
168
|
update(t, n) {
|
|
169
|
-
this._value = t, n && (this._options = n), this.send({ type:
|
|
169
|
+
this._value = t, n && (this._options = n), this.send({ type: I.UPDATE, value: t, options: this._options });
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* Waits for the component to complete and returns the transaction response
|
|
@@ -572,7 +572,7 @@ function ce(e, t, n = {}) {
|
|
|
572
572
|
const { value: r, ivms101: o } = e, i = b(n, t, r);
|
|
573
573
|
return L(r, o, i);
|
|
574
574
|
}
|
|
575
|
-
async function
|
|
575
|
+
async function y(e, t) {
|
|
576
576
|
const n = JSON.stringify(e), r = new TextEncoder(), o = t ? A(t) : crypto.getRandomValues(new Uint8Array(32)), i = await crypto.subtle.importKey(
|
|
577
577
|
"raw",
|
|
578
578
|
o,
|
|
@@ -659,7 +659,7 @@ class le {
|
|
|
659
659
|
* @returns Promise resolving to connection details including ID, version, and encryption key
|
|
660
660
|
*/
|
|
661
661
|
async create(t, n) {
|
|
662
|
-
const r = await
|
|
662
|
+
const r = await y(t), o = {
|
|
663
663
|
metadata: n,
|
|
664
664
|
sealed: r.ciphertext
|
|
665
665
|
}, i = await fetch(this.endpoint, {
|
|
@@ -692,7 +692,7 @@ class le {
|
|
|
692
692
|
* @returns Promise resolving to updated connection details including new encryption key
|
|
693
693
|
*/
|
|
694
694
|
async update(t, n, r, o, i) {
|
|
695
|
-
const s = await
|
|
695
|
+
const s = await y(n, i), a = {
|
|
696
696
|
sealed: s.ciphertext,
|
|
697
697
|
version: r,
|
|
698
698
|
status: o
|
|
@@ -880,7 +880,7 @@ export {
|
|
|
880
880
|
le as ConnectionManager,
|
|
881
881
|
J as EmbeddedComponent,
|
|
882
882
|
M as ErrorIdentifierCode,
|
|
883
|
-
|
|
883
|
+
I as HMType,
|
|
884
884
|
T as IdentityVerificationMethod,
|
|
885
885
|
U as OAuthProvider,
|
|
886
886
|
g as PersonType,
|
package/dist/esm/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.14.
|
|
13
|
+
"version": "2.14.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/dist/notabene.d.ts
CHANGED
|
@@ -1612,7 +1612,6 @@ export declare enum ProofStatus {
|
|
|
1612
1612
|
* - ED25519: Ed25519 signature (used in Solana)
|
|
1613
1613
|
* - XRP_ED25519: Ed25519 signature (used in XRP)
|
|
1614
1614
|
* - XLM_ED25519: Ed25519 signature (used in Stellar)
|
|
1615
|
-
* - XPUB: Extended public key signature for HD wallets
|
|
1616
1615
|
* - MicroTransfer: Proof via small blockchain transaction
|
|
1617
1616
|
* - Screenshot: Image proof of ownership/access
|
|
1618
1617
|
* - CIP8: Cardano message signing standard (CIP-8)
|
|
@@ -1633,7 +1632,6 @@ export declare enum ProofTypes {
|
|
|
1633
1632
|
EIP1271 = "eip-1271",
|
|
1634
1633
|
BIP137 = "bip-137",
|
|
1635
1634
|
BIP322 = "bip-322",
|
|
1636
|
-
BIP137_XPUB = "xpub",
|
|
1637
1635
|
TIP191 = "tip-191",
|
|
1638
1636
|
ED25519 = "ed25519",
|
|
1639
1637
|
XRP_ED25519 = "xrp-ed25519",
|
|
@@ -1708,7 +1706,7 @@ export declare interface ScreenshotProof extends OwnershipProof {
|
|
|
1708
1706
|
* @public
|
|
1709
1707
|
*/
|
|
1710
1708
|
export declare interface SignatureProof extends OwnershipProof {
|
|
1711
|
-
type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP322 | ProofTypes.
|
|
1709
|
+
type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP322 | ProofTypes.ED25519 | ProofTypes.TIP191 | ProofTypes.SIWX | ProofTypes.SOL_SIWX | ProofTypes.SIWE | ProofTypes.CIP8 | ProofTypes.XRP_ED25519 | ProofTypes.CONCORDIUM | ProofTypes.XLM_ED25519 | ProofTypes.COSMOS;
|
|
1712
1710
|
proof: string;
|
|
1713
1711
|
attestation: string;
|
|
1714
1712
|
wallet_provider: string;
|
package/dist/notabene.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var C = Object.defineProperty;
|
|
2
2
|
var R = (e, t, n) => t in e ? C(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var c = (e, t, n) => R(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
var S = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(S || {}), g = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(g || {}), _ = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(_ || {}), O = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(O || {}), T = /* @__PURE__ */ ((e) => (e.SMS = "sms", e.EMAIL = "email", e))(T || {}), D = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.COINBASE = "coinbase", e))(U || {}), x = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(x || {}), l = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(l || {}), M = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(M || {}), V = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(V || {}),
|
|
4
|
+
var S = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(S || {}), g = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(g || {}), _ = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(_ || {}), O = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(O || {}), T = /* @__PURE__ */ ((e) => (e.SMS = "sms", e.EMAIL = "email", e))(T || {}), D = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.COINBASE = "coinbase", e))(U || {}), x = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(x || {}), l = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(l || {}), M = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(M || {}), V = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(V || {}), I = /* @__PURE__ */ ((e) => (e.UPDATE = "update", e.REQUEST_RESPONSE = "requestResponse", e))(I || {}), B = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.FAILED = "rejected", e.FLAGGED = "flagged", e.VERIFIED = "verified", e))(B || {}), W = /* @__PURE__ */ ((e) => (e.SelfDeclaration = "self-declaration", e.SIWE = "siwe", e.SIWX = "siwx", e.SOL_SIWX = "sol-siwx", e.EIP191 = "eip-191", e.EIP712 = "eip-712", e.EIP1271 = "eip-1271", e.BIP137 = "bip-137", e.BIP322 = "bip-322", e.TIP191 = "tip-191", e.ED25519 = "ed25519", e.XRP_ED25519 = "xrp-ed25519", e.XLM_ED25519 = "xlm-ed25519", e.CIP8 = "cip-8", e.COSMOS = "cosmos-ecdsa", e.MicroTransfer = "microtransfer", e.Screenshot = "screenshot", e.Connect = "connect", e.CONCORDIUM = "concordium", e))(W || {});
|
|
5
5
|
class k {
|
|
6
6
|
constructor() {
|
|
7
7
|
c(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -166,7 +166,7 @@ class J {
|
|
|
166
166
|
* @param value - The new transaction value
|
|
167
167
|
*/
|
|
168
168
|
update(t, n) {
|
|
169
|
-
this._value = t, n && (this._options = n), this.send({ type:
|
|
169
|
+
this._value = t, n && (this._options = n), this.send({ type: I.UPDATE, value: t, options: this._options });
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* Waits for the component to complete and returns the transaction response
|
|
@@ -572,7 +572,7 @@ function ce(e, t, n = {}) {
|
|
|
572
572
|
const { value: r, ivms101: o } = e, i = b(n, t, r);
|
|
573
573
|
return L(r, o, i);
|
|
574
574
|
}
|
|
575
|
-
async function
|
|
575
|
+
async function y(e, t) {
|
|
576
576
|
const n = JSON.stringify(e), r = new TextEncoder(), o = t ? A(t) : crypto.getRandomValues(new Uint8Array(32)), i = await crypto.subtle.importKey(
|
|
577
577
|
"raw",
|
|
578
578
|
o,
|
|
@@ -659,7 +659,7 @@ class le {
|
|
|
659
659
|
* @returns Promise resolving to connection details including ID, version, and encryption key
|
|
660
660
|
*/
|
|
661
661
|
async create(t, n) {
|
|
662
|
-
const r = await
|
|
662
|
+
const r = await y(t), o = {
|
|
663
663
|
metadata: n,
|
|
664
664
|
sealed: r.ciphertext
|
|
665
665
|
}, i = await fetch(this.endpoint, {
|
|
@@ -692,7 +692,7 @@ class le {
|
|
|
692
692
|
* @returns Promise resolving to updated connection details including new encryption key
|
|
693
693
|
*/
|
|
694
694
|
async update(t, n, r, o, i) {
|
|
695
|
-
const s = await
|
|
695
|
+
const s = await y(n, i), a = {
|
|
696
696
|
sealed: s.ciphertext,
|
|
697
697
|
version: r,
|
|
698
698
|
status: o
|
|
@@ -880,7 +880,7 @@ export {
|
|
|
880
880
|
le as ConnectionManager,
|
|
881
881
|
J as EmbeddedComponent,
|
|
882
882
|
M as ErrorIdentifierCode,
|
|
883
|
-
|
|
883
|
+
I as HMType,
|
|
884
884
|
T as IdentityVerificationMethod,
|
|
885
885
|
U as OAuthProvider,
|
|
886
886
|
g as PersonType,
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.14.
|
|
13
|
+
"version": "2.14.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/src/types.ts
CHANGED
|
@@ -1164,7 +1164,6 @@ export enum ProofStatus {
|
|
|
1164
1164
|
* - ED25519: Ed25519 signature (used in Solana)
|
|
1165
1165
|
* - XRP_ED25519: Ed25519 signature (used in XRP)
|
|
1166
1166
|
* - XLM_ED25519: Ed25519 signature (used in Stellar)
|
|
1167
|
-
* - XPUB: Extended public key signature for HD wallets
|
|
1168
1167
|
* - MicroTransfer: Proof via small blockchain transaction
|
|
1169
1168
|
* - Screenshot: Image proof of ownership/access
|
|
1170
1169
|
* - CIP8: Cardano message signing standard (CIP-8)
|
|
@@ -1185,7 +1184,6 @@ export enum ProofTypes {
|
|
|
1185
1184
|
EIP1271 = 'eip-1271',
|
|
1186
1185
|
BIP137 = 'bip-137',
|
|
1187
1186
|
BIP322 = 'bip-322',
|
|
1188
|
-
BIP137_XPUB = 'xpub',
|
|
1189
1187
|
TIP191 = 'tip-191',
|
|
1190
1188
|
ED25519 = 'ed25519',
|
|
1191
1189
|
XRP_ED25519 = 'xrp-ed25519',
|
|
@@ -1316,7 +1314,6 @@ export interface SignatureProof extends OwnershipProof {
|
|
|
1316
1314
|
| ProofTypes.EIP1271
|
|
1317
1315
|
| ProofTypes.BIP137
|
|
1318
1316
|
| ProofTypes.BIP322
|
|
1319
|
-
| ProofTypes.BIP137_XPUB
|
|
1320
1317
|
| ProofTypes.ED25519
|
|
1321
1318
|
| ProofTypes.TIP191
|
|
1322
1319
|
| ProofTypes.SIWX
|