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

@metaplex-foundation/mpl-token-auth-rules

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metaplex-foundation/mpl-token-auth-rules - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

dist/src/revisions/v1/isWallet.d.ts

1

dist/src/revisions/v1/index.d.ts

@@ -17,1 +17,2 @@ export * from './additionalSigner';

export * from './rule';
export * from './isWallet';

@@ -33,2 +33,3 @@ "use strict";

__exportStar(require("./rule"), exports);
__exportStar(require("./isWallet"), exports);
//# sourceMappingURL=index.js.map

3

dist/src/revisions/v1/rule.d.ts

@@ -16,3 +16,4 @@ import type { RuleV2 } from '../v2';

import type { PubkeyTreeMatchRuleV1 } from './pubkeyTreeMatch';
export declare type RuleV1 = AdditionalSignerRuleV1 | AllRuleV1 | AmountRuleV1 | AnyRuleV1 | NamespaceRuleV1 | NotRuleV1 | PassRuleV1 | PdaMatchRuleV1 | ProgramOwnedRuleV1 | ProgramOwnedListRuleV1 | ProgramOwnedTreeRuleV1 | PubkeyListMatchRuleV1 | PubkeyMatchRuleV1 | PubkeyTreeMatchRuleV1;
import type { IsWalletRuleV1 } from './isWallet';
export declare type RuleV1 = AdditionalSignerRuleV1 | AllRuleV1 | AmountRuleV1 | AnyRuleV1 | NamespaceRuleV1 | NotRuleV1 | PassRuleV1 | PdaMatchRuleV1 | ProgramOwnedRuleV1 | ProgramOwnedListRuleV1 | ProgramOwnedTreeRuleV1 | PubkeyListMatchRuleV1 | PubkeyMatchRuleV1 | PubkeyTreeMatchRuleV1 | IsWalletRuleV1;
export declare const isRuleV1: (rule: RuleV2 | RuleV1) => rule is RuleV1;

@@ -18,1 +18,2 @@ export * from './additionalSigner';

export * from './ruleType';
export * from './isWallet';

@@ -34,2 +34,3 @@ "use strict";

__exportStar(require("./ruleType"), exports);
__exportStar(require("./isWallet"), exports);
//# sourceMappingURL=index.js.map

@@ -17,5 +17,6 @@ import { Serializer } from '@metaplex-foundation/umi/serializers';

import { PubkeyTreeMatchRuleV2 } from './pubkeyTreeMatch';
export declare type RuleV2 = AdditionalSignerRuleV2 | AllRuleV2 | AmountRuleV2 | AnyRuleV2 | NamespaceRuleV2 | NotRuleV2 | PassRuleV2 | PdaMatchRuleV2 | ProgramOwnedRuleV2 | ProgramOwnedListRuleV2 | ProgramOwnedTreeRuleV2 | PubkeyListMatchRuleV2 | PubkeyMatchRuleV2 | PubkeyTreeMatchRuleV2;
import { IsWalletRuleV2 } from './isWallet';
export declare type RuleV2 = AdditionalSignerRuleV2 | AllRuleV2 | AmountRuleV2 | AnyRuleV2 | IsWalletRuleV2 | NamespaceRuleV2 | NotRuleV2 | PassRuleV2 | PdaMatchRuleV2 | ProgramOwnedRuleV2 | ProgramOwnedListRuleV2 | ProgramOwnedTreeRuleV2 | PubkeyListMatchRuleV2 | PubkeyMatchRuleV2 | PubkeyTreeMatchRuleV2;
export declare const getRuleV2Serializer: () => Serializer<RuleV2>;
export declare const getRuleV2SerializerFromType: <T extends RuleV2>(type: T["type"]) => Serializer<T, T>;
export declare const isRuleV2: (rule: RuleV1 | RuleV2) => rule is RuleV2;

@@ -18,2 +18,3 @@ "use strict";

const pubkeyTreeMatch_1 = require("./pubkeyTreeMatch");
const isWallet_1 = require("./isWallet");
const ruleType_1 = require("./ruleType");

@@ -44,4 +45,4 @@ const getRuleV2Serializer = () => ({

// return getFrequencyRuleV2Serializer();
// case 'IsWallet':
// return getIsWalletRuleV2Serializer();
case 'IsWallet':
return (0, isWallet_1.getIsWalletRuleV2Serializer)();
case 'Namespace':

@@ -48,0 +49,0 @@ return (0, namespace_1.getNamespaceRuleV2Serializer)();

@@ -38,4 +38,3 @@ "use strict";

case RuleTypeV2.IsWallet: // 6
// return 'IsWallet';
throw new Error('IsWallet Rule is not supported yet');
return 'IsWallet';
case RuleTypeV2.Namespace: // 7

@@ -42,0 +41,0 @@ return 'Namespace';

{
"name": "@metaplex-foundation/mpl-token-auth-rules",
"version": "3.0.1",
"version": "3.0.2",
"description": "Javascript SDK for MPL Token Authorization Rules. MPL Token Authorization Rules can be used to restrict common token operations",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

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

# mpl-token-auth-rules
# JavaScript client for Mpl Token Auth Rules
TODO
A Umi-compatible JavaScript library for the project.
## Getting started
1. First, if you're not already using Umi, [follow these instructions to install the Umi framework](https://github.com/metaplex-foundation/umi/blob/main/docs/installation.md).
2. Next, install this library using the package manager of your choice.
```sh
npm install @metaplex-foundation/mpl-token-auth-rules
```
2. Finally, register the library with your Umi instance like so.
```ts
import { mplTokenAuthRules } from '@metaplex-foundation/mpl-token-auth-rules';
umi.use(mplTokenAuthRules());
```
You can learn more about this library's API by reading its generated [TypeDoc documentation](https://mpl-token-auth-rules-js-docs.vercel.app).
## Contributing
Check out the [Contributing Guide](./CONTRIBUTING.md) the learn more about how to contribute to this library.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc