@rango-dev/provider-slush 0.1.0 → 0.1.1-next.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/CHANGELOG.md +14 -0
- package/dist/legacy/index.d.ts.map +1 -1
- package/dist/mod.js +1 -1
- package/dist/mod.js.map +3 -3
- package/dist/provider-slush.build.json +1 -1
- package/package.json +4 -4
- package/src/legacy/index.ts +5 -40
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 0.1.0 (2025-06-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* playground crash on filter wallets ([f0e98ce](https://github.com/rango-exchange/rango-client/commit/f0e98cec6377324385e429df1b6f739770eff089))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* integrate slush wallet ([9e9a5cc](https://github.com/rango-exchange/rango-client/commit/9e9a5ccb802fbd1f9a50322a89f65b557f152c6a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOhD,KAAK,QAAQ,GAAG,GAAG,CAAC;AAEpB,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,WAAW,0BAAoB,CAAC;AAM7C,eAAO,MAAM,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,aAAa,CAC9D,CAAC;AAET,eAAO,MAAM,aAAa,EAAE,CAC1B,cAAc,EAAE,cAAc,EAAE,KAC7B,UAEJ,CAAC;AAEF,QAAA,MAAM,mBAAmB,EAAE,MAAM,uBAM/B,CAAC;AAEH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/mod.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u=Object.defineProperty;var e=(t,o)=>u(t,"name",{value:o,configurable:!0});import{defineVersions as N}from"@rango-dev/wallets-core/utils";import{WalletTypes as b}from"@rango-dev/wallets-shared";import"rango-types";import"@mysten/wallet-standard";import{getInstanceOrThrow as g}from"@rango-dev/wallets-core/namespaces/sui";import"@rango-dev/wallets-core";import{TransactionType as f}from"rango-types";var i="slush",r="Slush",c={name:"Slush",icon:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/slush/icon.svg",extensions:{chrome:"https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil",edge:"https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil",brave:"https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil",homepage:"https://slush.app/download"},properties:[{name:"namespaces",value:{data:[{label:"Sui",value:"Sui",id:"SUI",getSupportedChains:t=>t.filter(o=>o.type===f.SUI)}],selection:"multiple"}}]};function n(){try{return g(r)}catch{return null}}e(n,"suiWalletInstance");import{getInstanceOrThrow as S}from"@rango-dev/wallets-core/namespaces/sui";import{DefaultSignerFactory as h,TransactionType as y}from"rango-types";async function a(){let t=S(r),{DefaultSuiSigner:o}=await import("@rango-dev/signer-sui"),s=new h;return s.registerSigner(y.SUI,new o(t)),s}e(a,"getSigners");var L=b.SLUSH,W={type:L},A=n,E=e(async()=>{throw new Error("not implemented")},"connect"),v=a,T=e(()=>{throw new Error("not implemented")},"getWalletInfo"),l=e(()=>({config:W,getInstance:A,connect:E,getSigners:v,getWalletInfo:T}),"buildLegacyProvider");import{ProviderBuilder as P}from"@rango-dev/wallets-core";import{NamespaceBuilder as w}from"@rango-dev/wallets-core";import{builders as I}from"@rango-dev/wallets-core/namespaces/common";import{actions as _,builders as p}from"@rango-dev/wallets-core/namespaces/sui";var x=p.canEagerConnect().action(_.canEagerConnect({name:r})).build(),D=p.connect({name:r}).build(),F=I.disconnect().before(async()=>{await n()?.features["standard:disconnect"].disconnect()}).build(),m=new w("Sui",i).action(D).action(F).action(x).build();var d=e(()=>new P(i).init(function(t){let[,o]=t.state();n()&&(o("installed",!0),console.debug("[slush] instance detected.",t))}).config("info",c).add("sui",m).build(),"buildProvider");var ge=e(()=>N().version("0.0.0",l()).version("1.0.0",d()).build(),"versions");export{ge as versions};
|
|
2
2
|
//# sourceMappingURL=mod.js.map
|
package/dist/mod.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/mod.ts", "../src/legacy/index.ts", "../src/utils.ts", "../src/constants.ts", "../src/legacy/signer.ts", "../src/provider.ts", "../src/namespaces/sui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineVersions } from '@rango-dev/wallets-core/utils';\n\nimport { buildLegacyProvider } from './legacy/index.js';\nimport { buildProvider } from './provider.js';\n\nconst versions = () =>\n defineVersions()\n .version('0.0.0', buildLegacyProvider())\n .version('1.0.0', buildProvider())\n .build();\n\nexport { versions };\n", "import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';\nimport type { Connect, WalletInfo } from '@rango-dev/wallets-shared';\n\nimport { WalletTypes } from '@rango-dev/wallets-shared';\nimport {
|
|
5
|
-
"mappings": "+EAAA,OAAS,kBAAAA,MAAsB,gCCG/B,OAAS,eAAAC,MAAmB,4BAC5B,
|
|
6
|
-
"names": ["defineVersions", "WalletTypes", "
|
|
4
|
+
"sourcesContent": ["import { defineVersions } from '@rango-dev/wallets-core/utils';\n\nimport { buildLegacyProvider } from './legacy/index.js';\nimport { buildProvider } from './provider.js';\n\nconst versions = () =>\n defineVersions()\n .version('0.0.0', buildLegacyProvider())\n .version('1.0.0', buildProvider())\n .build();\n\nexport { versions };\n", "import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';\nimport type { Connect, WalletInfo } from '@rango-dev/wallets-shared';\n\nimport { WalletTypes } from '@rango-dev/wallets-shared';\nimport { type BlockchainMeta, type SignerFactory } from 'rango-types';\n\nimport { suiWalletInstance } from '../utils.js';\n\nimport signer from './signer.js';\n\nconst WALLET = WalletTypes.SLUSH;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Provider = any;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = suiWalletInstance;\n\nconst connect: Connect = async () => {\n throw new Error('not implemented');\n};\n\nexport const getSigners: (provider: Provider) => Promise<SignerFactory> =\n signer;\n\nexport const getWalletInfo: (\n allBlockChains: BlockchainMeta[]\n) => WalletInfo = () => {\n throw new Error('not implemented');\n};\n\nconst buildLegacyProvider: () => LegacyProviderInterface = () => ({\n config,\n getInstance,\n connect,\n getSigners,\n getWalletInfo,\n});\n\nexport { buildLegacyProvider };\n", "import {\n type StandardConnectFeature,\n type StandardDisconnectFeature,\n type StandardEventsFeature,\n type SuiFeatures,\n type WalletWithFeatures,\n} from '@mysten/wallet-standard';\nimport { getInstanceOrThrow } from '@rango-dev/wallets-core/namespaces/sui';\n\nimport { WALLET_NAME_IN_WALLET_STANDARD } from './constants.js';\n\ntype SuiWalletStandard = WalletWithFeatures<\n StandardConnectFeature &\n StandardEventsFeature &\n SuiFeatures &\n StandardDisconnectFeature\n>;\n\nexport function suiWalletInstance(): SuiWalletStandard | null {\n try {\n return getInstanceOrThrow(\n WALLET_NAME_IN_WALLET_STANDARD\n ) as SuiWalletStandard;\n } catch {\n return null;\n }\n}\n", "import { type ProviderInfo } from '@rango-dev/wallets-core';\nimport {\n type BlockchainMeta,\n type SuiBlockchainMeta,\n TransactionType,\n} from 'rango-types';\n\nexport const WALLET_ID = 'slush';\nexport const WALLET_NAME_IN_WALLET_STANDARD = 'Slush';\n\nexport const info: ProviderInfo = {\n name: 'Slush',\n icon: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/slush/icon.svg',\n extensions: {\n chrome:\n 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',\n edge: 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',\n brave:\n 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',\n homepage: 'https://slush.app/download',\n },\n properties: [\n {\n name: 'namespaces',\n value: {\n data: [\n {\n label: 'Sui',\n value: 'Sui',\n id: 'SUI',\n getSupportedChains: (allBlockchains: BlockchainMeta[]) =>\n allBlockchains.filter(\n (chain): chain is SuiBlockchainMeta =>\n chain.type === TransactionType.SUI\n ),\n },\n ],\n selection: 'multiple',\n },\n },\n ],\n};\n", "import type { SignerFactory } from 'rango-types';\n\nimport { getInstanceOrThrow } from '@rango-dev/wallets-core/namespaces/sui';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nimport { WALLET_NAME_IN_WALLET_STANDARD } from '../constants.js';\n\nexport default async function getSigners(): Promise<SignerFactory> {\n const suiWalletProvider = getInstanceOrThrow(WALLET_NAME_IN_WALLET_STANDARD);\n\n const { DefaultSuiSigner } = await import('@rango-dev/signer-sui');\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.SUI, new DefaultSuiSigner(suiWalletProvider));\n return signers;\n}\n", "import { ProviderBuilder } from '@rango-dev/wallets-core';\n\nimport { info, WALLET_ID } from './constants.js';\nimport { sui } from './namespaces/sui.js';\nimport { suiWalletInstance } from './utils.js';\n\nconst buildProvider = () =>\n new ProviderBuilder(WALLET_ID)\n .init(function (context) {\n const [, setState] = context.state();\n if (suiWalletInstance()) {\n setState('installed', true);\n console.debug('[slush] instance detected.', context);\n }\n })\n .config('info', info)\n .add('sui', sui)\n .build();\n\nexport { buildProvider };\n", "import type { SuiActions } from '@rango-dev/wallets-core/namespaces/sui';\n\nimport { NamespaceBuilder } from '@rango-dev/wallets-core';\nimport { builders as commonBuilders } from '@rango-dev/wallets-core/namespaces/common';\nimport { actions, builders } from '@rango-dev/wallets-core/namespaces/sui';\n\nimport { WALLET_ID, WALLET_NAME_IN_WALLET_STANDARD } from '../constants.js';\nimport { suiWalletInstance } from '../utils.js';\n\nconst canEagerConnect = builders\n .canEagerConnect()\n .action(\n actions.canEagerConnect({\n name: WALLET_NAME_IN_WALLET_STANDARD,\n })\n )\n .build();\n\nconst connect = builders\n .connect({\n name: WALLET_NAME_IN_WALLET_STANDARD,\n })\n .build();\n\nconst disconnect = commonBuilders\n .disconnect<SuiActions>()\n /*\n * This addresses a wallet bug where changing accounts within the app\n * and then reconnecting results in a connection to the previously connected account.\n * Explicitly calling `disconnect()` on the wallet instance ensures the wallet\n * itself is disconnected, allowing for a proper connection to the intended account\n * upon subsequent reconnection.\n */\n .before(async () => {\n await suiWalletInstance()?.features['standard:disconnect'].disconnect();\n })\n .build();\n\nconst sui = new NamespaceBuilder<SuiActions>('Sui', WALLET_ID)\n .action(connect)\n .action(disconnect)\n .action(canEagerConnect)\n .build();\n\nexport { sui };\n"],
|
|
5
|
+
"mappings": "+EAAA,OAAS,kBAAAA,MAAsB,gCCG/B,OAAS,eAAAC,MAAmB,4BAC5B,MAAwD,cCJxD,MAMO,0BACP,OAAS,sBAAAC,MAA0B,yCCPnC,MAAkC,0BAClC,OAGE,mBAAAC,MACK,cAEA,IAAMC,EAAY,QACZC,EAAiC,QAEjCC,EAAqB,CAChC,KAAM,QACN,KAAM,sFACN,WAAY,CACV,OACE,yGACF,KAAM,yGACN,MACE,yGACF,SAAU,4BACZ,EACA,WAAY,CACV,CACE,KAAM,aACN,MAAO,CACL,KAAM,CACJ,CACE,MAAO,MACP,MAAO,MACP,GAAI,MACJ,mBAAqBC,GACnBA,EAAe,OACZC,GACCA,EAAM,OAASL,EAAgB,GACnC,CACJ,CACF,EACA,UAAW,UACb,CACF,CACF,CACF,EDvBO,SAASM,GAA8C,CAC5D,GAAI,CACF,OAAOC,EACLC,CACF,CACF,MAAQ,CACN,OAAO,IACT,CACF,CARgBC,EAAAH,EAAA,qBEhBhB,OAAS,sBAAAI,MAA0B,yCACnC,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cAIhE,eAAOC,GAA4D,CACjE,IAAMC,EAAoBC,EAAmBC,CAA8B,EAErE,CAAE,iBAAAC,CAAiB,EAAI,KAAM,QAAO,uBAAuB,EAC3DC,EAAU,IAAIC,EACpB,OAAAD,EAAQ,eAAeE,EAAO,IAAK,IAAIH,EAAiBH,CAAiB,CAAC,EACnEI,CACT,CAP8BG,EAAAR,EAAA,cHG9B,IAAMS,EAASC,EAAY,MAKdC,EAAS,CACpB,KAAMF,CACR,EAEaG,EAAcC,EAErBC,EAAmBC,EAAA,SAAY,CACnC,MAAM,IAAI,MAAM,iBAAiB,CACnC,EAFyB,WAIZC,EACXA,EAEWC,EAEKF,EAAA,IAAM,CACtB,MAAM,IAAI,MAAM,iBAAiB,CACnC,EAFkB,iBAIZG,EAAqDH,EAAA,KAAO,CAChE,OAAAJ,EACA,YAAAC,EACA,QAAAE,EACA,WAAAE,EACA,cAAAC,CACF,GAN2D,uBIlC3D,OAAS,mBAAAE,MAAuB,0BCEhC,OAAS,oBAAAC,MAAwB,0BACjC,OAAS,YAAYC,MAAsB,4CAC3C,OAAS,WAAAC,EAAS,YAAAC,MAAgB,yCAKlC,IAAMC,EAAkBC,EACrB,gBAAgB,EAChB,OACCC,EAAQ,gBAAgB,CACtB,KAAMC,CACR,CAAC,CACH,EACC,MAAM,EAEHC,EAAUH,EACb,QAAQ,CACP,KAAME,CACR,CAAC,EACA,MAAM,EAEHE,EAAaC,EAChB,WAAuB,EAQvB,OAAO,SAAY,CAClB,MAAMC,EAAkB,GAAG,SAAS,qBAAqB,EAAE,WAAW,CACxE,CAAC,EACA,MAAM,EAEHC,EAAM,IAAIC,EAA6B,MAAOC,CAAS,EAC1D,OAAON,CAAO,EACd,OAAOC,CAAU,EACjB,OAAOL,CAAe,EACtB,MAAM,EDpCT,IAAMW,EAAgBC,EAAA,IACpB,IAAIC,EAAgBC,CAAS,EAC1B,KAAK,SAAUC,EAAS,CACvB,GAAM,CAAC,CAAEC,CAAQ,EAAID,EAAQ,MAAM,EAC/BE,EAAkB,IACpBD,EAAS,YAAa,EAAI,EAC1B,QAAQ,MAAM,6BAA8BD,CAAO,EAEvD,CAAC,EACA,OAAO,OAAQG,CAAI,EACnB,IAAI,MAAOC,CAAG,EACd,MAAM,EAXW,iBLDtB,IAAMC,GAAWC,EAAA,IACfC,EAAe,EACZ,QAAQ,QAASC,EAAoB,CAAC,EACtC,QAAQ,QAASC,EAAc,CAAC,EAChC,MAAM,EAJM",
|
|
6
|
+
"names": ["defineVersions", "WalletTypes", "getInstanceOrThrow", "TransactionType", "WALLET_ID", "WALLET_NAME_IN_WALLET_STANDARD", "info", "allBlockchains", "chain", "suiWalletInstance", "getInstanceOrThrow", "WALLET_NAME_IN_WALLET_STANDARD", "__name", "getInstanceOrThrow", "DefaultSignerFactory", "TxType", "getSigners", "suiWalletProvider", "getInstanceOrThrow", "WALLET_NAME_IN_WALLET_STANDARD", "DefaultSuiSigner", "signers", "DefaultSignerFactory", "TxType", "__name", "WALLET", "WalletTypes", "config", "getInstance", "suiWalletInstance", "connect", "__name", "getSigners", "getWalletInfo", "buildLegacyProvider", "ProviderBuilder", "NamespaceBuilder", "commonBuilders", "actions", "builders", "canEagerConnect", "builders", "actions", "WALLET_NAME_IN_WALLET_STANDARD", "connect", "disconnect", "commonBuilders", "suiWalletInstance", "sui", "NamespaceBuilder", "WALLET_ID", "buildProvider", "__name", "ProviderBuilder", "WALLET_ID", "context", "setState", "suiWalletInstance", "info", "sui", "versions", "__name", "defineVersions", "buildLegacyProvider", "buildProvider"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/constants.ts":{"bytes":1304,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":684,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/signer.ts":{"bytes":640,"imports":[{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"@rango-dev/signer-sui","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/constants.ts":{"bytes":1304,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":684,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/signer.ts":{"bytes":640,"imports":[{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"@rango-dev/signer-sui","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/index.ts":{"bytes":1046,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"src/legacy/signer.ts","kind":"import-statement","original":"./signer.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui.ts":{"bytes":1406,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/provider.ts":{"bytes":573,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui.ts","kind":"import-statement","original":"./namespaces/sui.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/mod.ts":{"bytes":332,"imports":[{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"src/legacy/index.ts","kind":"import-statement","original":"./legacy/index.js"},{"path":"src/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":9434},"dist/mod.js":{"imports":[{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-sui","kind":"dynamic-import","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true}],"exports":["versions"],"entryPoint":"src/mod.ts","inputs":{"src/mod.ts":{"bytesInOutput":142},"src/legacy/index.ts":{"bytesInOutput":329},"src/utils.ts":{"bytesInOutput":181},"src/constants.ts":{"bytesInOutput":748},"src/legacy/signer.ts":{"bytesInOutput":305},"src/provider.ts":{"bytesInOutput":242},"src/namespaces/sui.ts":{"bytesInOutput":462}},"bytes":2544}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/provider-slush",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/mod.ts",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@mysten/sui": "^1.21.2",
|
|
25
25
|
"@mysten/wallet-standard": "^0.13.26",
|
|
26
|
-
"@rango-dev/signer-sui": "^0.4.0",
|
|
27
|
-
"@rango-dev/wallets-shared": "^0.45.
|
|
28
|
-
"rango-types": "^0.1.
|
|
26
|
+
"@rango-dev/signer-sui": "^0.4.1-next.0",
|
|
27
|
+
"@rango-dev/wallets-shared": "^0.45.1-next.1",
|
|
28
|
+
"rango-types": "^0.1.88"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
package/src/legacy/index.ts
CHANGED
|
@@ -2,12 +2,7 @@ import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';
|
|
|
2
2
|
import type { Connect, WalletInfo } from '@rango-dev/wallets-shared';
|
|
3
3
|
|
|
4
4
|
import { WalletTypes } from '@rango-dev/wallets-shared';
|
|
5
|
-
import {
|
|
6
|
-
type BlockchainMeta,
|
|
7
|
-
type SignerFactory,
|
|
8
|
-
type SuiBlockchainMeta,
|
|
9
|
-
TransactionType,
|
|
10
|
-
} from 'rango-types';
|
|
5
|
+
import { type BlockchainMeta, type SignerFactory } from 'rango-types';
|
|
11
6
|
|
|
12
7
|
import { suiWalletInstance } from '../utils.js';
|
|
13
8
|
|
|
@@ -31,40 +26,10 @@ const connect: Connect = async () => {
|
|
|
31
26
|
export const getSigners: (provider: Provider) => Promise<SignerFactory> =
|
|
32
27
|
signer;
|
|
33
28
|
|
|
34
|
-
export const getWalletInfo: (
|
|
35
|
-
allBlockChains
|
|
36
|
-
) => {
|
|
37
|
-
|
|
38
|
-
(blockchain) => blockchain.type === TransactionType.SUI
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
name: 'Slush',
|
|
43
|
-
img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/slush/icon.svg',
|
|
44
|
-
installLink: {
|
|
45
|
-
CHROME:
|
|
46
|
-
'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',
|
|
47
|
-
DEFAULT: 'https://slush.app/download',
|
|
48
|
-
},
|
|
49
|
-
color: '#4d40c6',
|
|
50
|
-
// if you are adding a new namespace, don't forget to also update `properties`
|
|
51
|
-
needsNamespace: {
|
|
52
|
-
selection: 'multiple',
|
|
53
|
-
data: [
|
|
54
|
-
{
|
|
55
|
-
label: 'Sui',
|
|
56
|
-
value: 'Sui',
|
|
57
|
-
id: 'SUI',
|
|
58
|
-
getSupportedChains: (allBlockchains: BlockchainMeta[]) =>
|
|
59
|
-
allBlockchains.filter(
|
|
60
|
-
(chain): chain is SuiBlockchainMeta =>
|
|
61
|
-
chain.type === TransactionType.SUI
|
|
62
|
-
),
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
supportedChains: sui,
|
|
67
|
-
};
|
|
29
|
+
export const getWalletInfo: (
|
|
30
|
+
allBlockChains: BlockchainMeta[]
|
|
31
|
+
) => WalletInfo = () => {
|
|
32
|
+
throw new Error('not implemented');
|
|
68
33
|
};
|
|
69
34
|
|
|
70
35
|
const buildLegacyProvider: () => LegacyProviderInterface = () => ({
|