Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add create mint entitlement json sample #169

Merged
merged 15 commits into from
Mar 12, 2024
Merged

Conversation

elv-todd
Copy link
Contributor

@elv-todd elv-todd commented Feb 28, 2024

for https://github.com/qluvio/elv-apps-projects/issues/243

$ node samples/GenMintEntitlement.js iten4TXq2en3qtu3JREnE5tSLRf9zLod iq__2dXeKyUVhpcsd1RM6xaC1jdeZpyr C9Zct19CoEAZYWug9tyavX 1 nonce_6f9f53ecc09a7e223cf7d47f pid_e852572c6e84626892da049
SIGNER 0x761f45287ea364db6b216bd655910430afa3e839
ENTITLEMENT TO SIGN {"tenant_id":"iten4TXq2en3qtu3JREnE5tSLRf9zLod","marketplace_id":"iq__2dXeKyUVhpcsd1RM6xaC1jdeZpyr","items":[{"sku":"C9Zct19CoEAZYWug9tyavX","amount":1}],"nonce":"nonce_6f9f53ecc09a7e223cf7d47f","purchase_id":"pid_e852572c6e84626892da049"}
ENTITLEMENT {
  tenant_id: 'iten4TXq2en3qtu3JREnE5tSLRf9zLod',
  marketplace_id: 'iq__2dXeKyUVhpcsd1RM6xaC1jdeZpyr',
  items: [ { sku: 'C9Zct19CoEAZYWug9tyavX', amount: 1 } ],
  nonce: 'nonce_6f9f53ecc09a7e223cf7d47f',
  purchase_id: 'pid_e852572c6e84626892da049'
}
ENTITLEMENT_SIGNATURE ES256K_7uAQCp6nUQDiyHUSUa4AHV91rTpgoUsRQ4pPrjZpY9PZ3Ww21ZFaF4q6zXKP2TFQajbvUMS38PGeyA6XERwpcasbh
ALL DONE

@elv-todd
Copy link
Contributor Author

elv-todd commented Mar 6, 2024

updated to use new sig format:

$ node samples/GenMintEntitlement.js
SIGNER 0x761f45287ea364db6b216bd655910430afa3e839
ENTITLEMENT {
  tenant_id: 'iten4TXq2en3qtu3JREnE5tSLRf9zLod',
  marketplace_id: 'iq__2dXeKyUVhpcsd1RM6xaC1jdeZpyr',
  items: [ { sku: 'C9Zct19CoEAZYWug9tyavX', amount: 1 } ],
  nonce: 'nonce_6f9f53ecc09a7e223cf7d47f',
  purchase_id: 'pid_e852572c6e84626892da049a'
}
ENTITLEMENT_SIGNATURE mje_2LDb4upTtBDeQdcAt2oBvya1338s3WVdrzCQZFvXo1YLiAmWvh44xAZcdpJyzhtcuG4s6PNXgcBYbfrbAPxNK3bYEUYkv9Pp6uHGvvP8V8f5bPDk6qMYvYCvH94AsrxhqXY3Gsn98uTNioe6711ZFpQTBjDukL4Xt7mzvN88NvxU5oWCV2W1vzn1VPnPrVZZ6TSkv4fLTHj1bJfL5NWSgDBAcQYAf9pdNgiJX9reYQGKceQk5LViqNfjSBXhzd4rgbvBJMD8Uua8mXo1zqxCoyZrR5UhfvpsNX3oSd9P8Vw5zVDNX3s9JpPR8edZ73EbZixoiYf5h6bJfZggHJDxcgkzzD5Unhcbz3MxA7XS6yZ32A1dsXfWtc1m2AQU1vLEmoyr9oQG9JCURznZhFtHGR4qhieBnWMZN
ALL DONE

Copy link
Contributor

@elv-serban elv-serban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to merge and then modify to use a more official elv-client-js CreateSignedMessageJSON once we have one

Comment on lines 9 to 11
let tenant = "iten4TXq2en3qtu3JREnE5tSLRf9zLod"; // paladin
let marketplaceObjectId = "iq__2dXeKyUVhpcsd1RM6xaC1jdeZpyr"; // A Place for Goats
let sku = "C9Zct19CoEAZYWug9tyavX"; // Goat Pack One
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the comments referencing the names of test tenants and marketplaces. It's fine to leave the IDs as examples.

@elv-todd elv-todd merged commit 19d41a6 into main Mar 12, 2024
@elv-todd elv-todd deleted the create-mint-entitlement branch March 12, 2024 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants