@dynamic-labs-sdk/cosmos 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addCosmosExtension/addCosmosExtension.d.ts +10 -0
- package/dist/addCosmosExtension/addCosmosExtension.d.ts.map +1 -0
- package/dist/addCosmosExtension/index.d.ts +2 -0
- package/dist/addCosmosExtension/index.d.ts.map +1 -0
- package/dist/addCosmosInjectedExtension-CA5nvvNU.cjs.js +246 -0
- package/dist/addCosmosInjectedExtension-CA5nvvNU.cjs.js.map +1 -0
- package/dist/addCosmosInjectedExtension-iWAqM9Kr.esm.js +229 -0
- package/dist/addCosmosInjectedExtension-iWAqM9Kr.esm.js.map +1 -0
- package/dist/exports/index.d.ts +2 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/injected.d.ts +2 -0
- package/dist/exports/injected.d.ts.map +1 -0
- package/dist/index.cjs.js +22 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/injected/addCosmosInjectedExtension/addCosmosInjectedExtension.d.ts +4 -0
- package/dist/injected/addCosmosInjectedExtension/addCosmosInjectedExtension.d.ts.map +1 -0
- package/dist/injected/addCosmosInjectedExtension/index.d.ts +2 -0
- package/dist/injected/addCosmosInjectedExtension/index.d.ts.map +1 -0
- package/dist/injected/utils/compass/getCompassInjectedProvider/index.d.ts +2 -0
- package/dist/injected/utils/compass/getCompassInjectedProvider/index.d.ts.map +1 -0
- package/dist/injected/utils/keplr/getKeplrInjectedProvider/index.d.ts +2 -0
- package/dist/injected/utils/keplr/getKeplrInjectedProvider/index.d.ts.map +1 -0
- package/dist/injected/utils/leap/getLeapInjectedProvider/index.d.ts +2 -0
- package/dist/injected/utils/leap/getLeapInjectedProvider/index.d.ts.map +1 -0
- package/dist/injected.cjs.js +9 -0
- package/dist/injected.cjs.js.map +1 -0
- package/dist/injected.esm.js +9 -0
- package/dist/injected.esm.js.map +1 -0
- package/dist/isCosmosNetworkProvider/index.d.ts +2 -0
- package/dist/isCosmosNetworkProvider/index.d.ts.map +1 -0
- package/dist/isCosmosNetworkProvider/isCosmosNetworkProvider.d.ts +5 -0
- package/dist/isCosmosNetworkProvider/isCosmosNetworkProvider.d.ts.map +1 -0
- package/dist/isCosmosWalletAccount/index.d.ts +2 -0
- package/dist/isCosmosWalletAccount/index.d.ts.map +1 -0
- package/dist/isCosmosWalletAccount/isCosmosWalletAccount.d.ts +5 -0
- package/dist/isCosmosWalletAccount/isCosmosWalletAccount.d.ts.map +1 -0
- package/dist/isCosmosWalletProvider/index.d.ts +2 -0
- package/dist/isCosmosWalletProvider/index.d.ts.map +1 -0
- package/dist/isCosmosWalletProvider/isCosmosWalletProvider.d.ts +1 -1
- package/dist/isCosmosWalletProvider/isCosmosWalletProvider.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +9 -4
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","names":["BaseError","packageName","packageVersion"],"sources":["../
|
|
1
|
+
{"version":3,"file":"index.cjs.js","names":["BaseError","packageName","packageVersion"],"sources":["../src/addCosmosExtension/addCosmosExtension.ts","../src/errors/NotCosmosProviderError/NotCosmosProviderError.ts","../src/isCosmosWalletAccount/isCosmosWalletAccount.ts","../src/exports/index.ts"],"sourcesContent":["import { getDefaultClient } from '@dynamic-labs-sdk/client/core';\n\nimport { addCosmosInjectedExtension } from '../injected/addCosmosInjectedExtension/addCosmosInjectedExtension';\n\n/**\n * Adds the Cosmos extension to the Dynamic client.\n *\n * This is a convenience function that adds support for cosmos injected wallets like Compass, Keplr, and more.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @not-instrumented\n */\nexport const addCosmosExtension = (client = getDefaultClient()): void => {\n addCosmosInjectedExtension(client);\n};\n","import { BaseError } from '@dynamic-labs-sdk/client';\n\nexport class NotCosmosProviderError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'not_cosmos_provider',\n details: undefined,\n docsUrl: null,\n metaMessages: undefined,\n name: 'NotCosmosProviderError',\n shortMessage: 'The provided wallet provider is not a Cosmos wallet provider.',\n });\n }\n}\n","import type { WalletAccount } from '@dynamic-labs-sdk/client';\n\nimport type { CosmosWalletAccount } from '../CosmosWalletAccount.types';\n\n/** @not-instrumented */\nexport const isCosmosWalletAccount = (\n walletAccount: WalletAccount\n): walletAccount is CosmosWalletAccount => walletAccount.chain === 'COSMOS';\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { addCosmosExtension } from '../addCosmosExtension';\nexport type { CosmosNetworkProvider } from '../CosmosNetworkProvider.types';\nexport type { CosmosWalletAccount } from '../CosmosWalletAccount.types';\nexport type { CosmosOfflineSigner } from '../CosmosWalletProvider.types';\nexport { NotCosmosProviderError } from '../errors/NotCosmosProviderError';\nexport { isCosmosWalletAccount } from '../isCosmosWalletAccount';\n"],"mappings":";;;;;;;;;;;;;;AAYA,MAAa,sBAAsB,8DAA2B,KAAW;AACvE,+DAA2B,OAAO;;;;;ACXpC,IAAa,yBAAb,cAA4CA,mCAAU;CACpD,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,SAAS;GACT,cAAc;GACd,MAAM;GACN,cAAc;GACf,CAAC;;;;;;;ACPN,MAAa,yBACX,kBACyC,cAAc,UAAU;;;;mECD9CC,yCAAaC,2CAAe"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
import { n as name, r as version, t as addCosmosInjectedExtension } from "./addCosmosInjectedExtension-iWAqM9Kr.esm.js";
|
|
1
2
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
3
|
+
import { getDefaultClient } from "@dynamic-labs-sdk/client/core";
|
|
2
4
|
import { BaseError } from "@dynamic-labs-sdk/client";
|
|
3
5
|
|
|
4
|
-
//#region
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
//#region src/addCosmosExtension/addCosmosExtension.ts
|
|
7
|
+
/**
|
|
8
|
+
* Adds the Cosmos extension to the Dynamic client.
|
|
9
|
+
*
|
|
10
|
+
* This is a convenience function that adds support for cosmos injected wallets like Compass, Keplr, and more.
|
|
11
|
+
*
|
|
12
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
13
|
+
* @not-instrumented
|
|
14
|
+
*/
|
|
15
|
+
const addCosmosExtension = (client = getDefaultClient()) => {
|
|
16
|
+
addCosmosInjectedExtension(client);
|
|
17
|
+
};
|
|
7
18
|
|
|
8
19
|
//#endregion
|
|
9
20
|
//#region src/errors/NotCosmosProviderError/NotCosmosProviderError.ts
|
|
@@ -21,10 +32,15 @@ var NotCosmosProviderError = class extends BaseError {
|
|
|
21
32
|
}
|
|
22
33
|
};
|
|
23
34
|
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/isCosmosWalletAccount/isCosmosWalletAccount.ts
|
|
37
|
+
/** @not-instrumented */
|
|
38
|
+
const isCosmosWalletAccount = (walletAccount) => walletAccount.chain === "COSMOS";
|
|
39
|
+
|
|
24
40
|
//#endregion
|
|
25
41
|
//#region src/exports/index.ts
|
|
26
42
|
assertPackageVersion(name, version);
|
|
27
43
|
|
|
28
44
|
//#endregion
|
|
29
|
-
export { NotCosmosProviderError };
|
|
45
|
+
export { NotCosmosProviderError, addCosmosExtension, isCosmosWalletAccount };
|
|
30
46
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":["packageName","packageVersion"],"sources":["../
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":["packageName","packageVersion"],"sources":["../src/addCosmosExtension/addCosmosExtension.ts","../src/errors/NotCosmosProviderError/NotCosmosProviderError.ts","../src/isCosmosWalletAccount/isCosmosWalletAccount.ts","../src/exports/index.ts"],"sourcesContent":["import { getDefaultClient } from '@dynamic-labs-sdk/client/core';\n\nimport { addCosmosInjectedExtension } from '../injected/addCosmosInjectedExtension/addCosmosInjectedExtension';\n\n/**\n * Adds the Cosmos extension to the Dynamic client.\n *\n * This is a convenience function that adds support for cosmos injected wallets like Compass, Keplr, and more.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @not-instrumented\n */\nexport const addCosmosExtension = (client = getDefaultClient()): void => {\n addCosmosInjectedExtension(client);\n};\n","import { BaseError } from '@dynamic-labs-sdk/client';\n\nexport class NotCosmosProviderError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'not_cosmos_provider',\n details: undefined,\n docsUrl: null,\n metaMessages: undefined,\n name: 'NotCosmosProviderError',\n shortMessage: 'The provided wallet provider is not a Cosmos wallet provider.',\n });\n }\n}\n","import type { WalletAccount } from '@dynamic-labs-sdk/client';\n\nimport type { CosmosWalletAccount } from '../CosmosWalletAccount.types';\n\n/** @not-instrumented */\nexport const isCosmosWalletAccount = (\n walletAccount: WalletAccount\n): walletAccount is CosmosWalletAccount => walletAccount.chain === 'COSMOS';\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { addCosmosExtension } from '../addCosmosExtension';\nexport type { CosmosNetworkProvider } from '../CosmosNetworkProvider.types';\nexport type { CosmosWalletAccount } from '../CosmosWalletAccount.types';\nexport type { CosmosOfflineSigner } from '../CosmosWalletProvider.types';\nexport { NotCosmosProviderError } from '../errors/NotCosmosProviderError';\nexport { isCosmosWalletAccount } from '../isCosmosWalletAccount';\n"],"mappings":";;;;;;;;;;;;;;AAYA,MAAa,sBAAsB,SAAS,kBAAkB,KAAW;AACvE,4BAA2B,OAAO;;;;;ACXpC,IAAa,yBAAb,cAA4C,UAAU;CACpD,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,SAAS;GACT,cAAc;GACd,MAAM;GACN,cAAc;GACf,CAAC;;;;;;;ACPN,MAAa,yBACX,kBACyC,cAAc,UAAU;;;;ACDnE,qBAAqBA,MAAaC,QAAe"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const COSMOS_INJECTED_EXTENSION_KEY = "cosmosInjected";
|
|
2
|
+
/** @not-instrumented */
|
|
3
|
+
export declare const addCosmosInjectedExtension: (client?: import("@dynamic-labs-sdk/client").DynamicClient) => void;
|
|
4
|
+
//# sourceMappingURL=addCosmosInjectedExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addCosmosInjectedExtension.d.ts","sourceRoot":"","sources":["../../../src/injected/addCosmosInjectedExtension/addCosmosInjectedExtension.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,6BAA6B,mBAAmB,CAAC;AAE9D,wBAAwB;AACxB,eAAO,MAAM,0BAA0B,iEAEpC,IAoEF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/injected/addCosmosInjectedExtension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/injected/utils/compass/getCompassInjectedProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/injected/utils/keplr/getKeplrInjectedProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/injected/utils/leap/getLeapInjectedProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const require_addCosmosInjectedExtension = require('./addCosmosInjectedExtension-CA5nvvNU.cjs.js');
|
|
2
|
+
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
3
|
+
|
|
4
|
+
//#region src/exports/injected.ts
|
|
5
|
+
(0, _dynamic_labs_sdk_assert_package_version.assertPackageVersion)(require_addCosmosInjectedExtension.name, require_addCosmosInjectedExtension.version);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.addCosmosInjectedExtension = require_addCosmosInjectedExtension.addCosmosInjectedExtension;
|
|
9
|
+
//# sourceMappingURL=injected.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injected.cjs.js","names":["packageName","packageVersion"],"sources":["../src/exports/injected.ts"],"sourcesContent":["import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { addCosmosInjectedExtension } from '../injected/addCosmosInjectedExtension';\n"],"mappings":";;;;mEAMqBA,yCAAaC,2CAAe"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { n as name, r as version, t as addCosmosInjectedExtension } from "./addCosmosInjectedExtension-iWAqM9Kr.esm.js";
|
|
2
|
+
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
3
|
+
|
|
4
|
+
//#region src/exports/injected.ts
|
|
5
|
+
assertPackageVersion(name, version);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { addCosmosInjectedExtension };
|
|
9
|
+
//# sourceMappingURL=injected.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injected.esm.js","names":["packageName","packageVersion"],"sources":["../src/exports/injected.ts"],"sourcesContent":["import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { addCosmosInjectedExtension } from '../injected/addCosmosInjectedExtension';\n"],"mappings":";;;;AAMA,qBAAqBA,MAAaC,QAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isCosmosNetworkProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NetworkProvider } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { CosmosNetworkProvider } from '../CosmosNetworkProvider.types';
|
|
3
|
+
/** @not-instrumented */
|
|
4
|
+
export declare const isCosmosNetworkProvider: (networkProvider: NetworkProvider) => networkProvider is CosmosNetworkProvider;
|
|
5
|
+
//# sourceMappingURL=isCosmosNetworkProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isCosmosNetworkProvider.d.ts","sourceRoot":"","sources":["../../src/isCosmosNetworkProvider/isCosmosNetworkProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,wBAAwB;AACxB,eAAO,MAAM,uBAAuB,oBACjB,eAAe,KAC/B,eAAe,IAAI,qBACc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isCosmosWalletAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WalletAccount } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { CosmosWalletAccount } from '../CosmosWalletAccount.types';
|
|
3
|
+
/** @not-instrumented */
|
|
4
|
+
export declare const isCosmosWalletAccount: (walletAccount: WalletAccount) => walletAccount is CosmosWalletAccount;
|
|
5
|
+
//# sourceMappingURL=isCosmosWalletAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isCosmosWalletAccount.d.ts","sourceRoot":"","sources":["../../src/isCosmosWalletAccount/isCosmosWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,wBAAwB;AACxB,eAAO,MAAM,qBAAqB,kBACjB,aAAa,KAC3B,aAAa,IAAI,mBAAuD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isCosmosWalletProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WalletProvider } from '@dynamic-labs-sdk/client/core';
|
|
2
2
|
import type { CosmosWalletProvider } from '../CosmosWalletProvider.types';
|
|
3
3
|
/** @not-instrumented */
|
|
4
|
-
export declare const isCosmosWalletProvider: (
|
|
4
|
+
export declare const isCosmosWalletProvider: (walletProvider: WalletProvider) => walletProvider is CosmosWalletProvider;
|
|
5
5
|
//# sourceMappingURL=isCosmosWalletProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isCosmosWalletProvider.d.ts","sourceRoot":"","sources":["../../src/isCosmosWalletProvider/isCosmosWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,wBAAwB;AACxB,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"isCosmosWalletProvider.d.ts","sourceRoot":"","sources":["../../src/isCosmosWalletProvider/isCosmosWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,wBAAwB;AACxB,eAAO,MAAM,sBAAsB,mBACjB,cAAc,KAC7B,cAAc,IAAI,oBAAyD,CAAC"}
|