@staratlas/player-profile
Advanced tools
Comparing version 0.2.0 to 0.2.1
import { KeyedAccountInfo, PublicKey } from '@solana/web3.js'; | ||
import { PlayerNameData, PlayerProfileIDLProgram } from './index'; | ||
import { Account, DecodedAccountData } from '@staratlas/data-source'; | ||
import { PlayerProfileIDL } from '@staratlas/idls'; | ||
export declare function playerNameDataEquals(playerName1: PlayerNameData, playerName2: PlayerNameData): boolean; | ||
@@ -9,3 +10,3 @@ export declare class PlayerName implements Account { | ||
private _name; | ||
static readonly ACCOUNT_NAME = "playerName"; | ||
static readonly ACCOUNT_NAME: NonNullable<PlayerProfileIDL['accounts']>[number]['name']; | ||
static readonly MIN_DATA_SIZE: number; | ||
@@ -12,0 +13,0 @@ constructor(_data: PlayerNameData, _key: PublicKey, _name: string); |
@@ -6,2 +6,3 @@ /// <reference types="bn.js" /> | ||
import { PlayerProfileData, PlayerProfileIDLProgram } from './index'; | ||
import { PlayerProfileIDL } from '@staratlas/idls'; | ||
export declare function profileDataEquals(playerProfile1: PlayerProfileData, playerProfile2: PlayerProfileData): boolean; | ||
@@ -103,3 +104,3 @@ export declare type ProfileKey = { | ||
private _profileKeys; | ||
static readonly ACCOUNT_NAME = "profile"; | ||
static readonly ACCOUNT_NAME: NonNullable<PlayerProfileIDL['accounts']>[number]['name']; | ||
static readonly MIN_DATA_SIZE: number; | ||
@@ -106,0 +107,0 @@ constructor(_data: PlayerProfileData, _key: PublicKey, _profileKeys: ProfileKey[]); |
@@ -209,6 +209,20 @@ "use strict"; | ||
.remainingAccounts(keys.map((key) => { | ||
if (key.key instanceof web3_js_1.PublicKey) { | ||
// if (key.key instanceof PublicKey) { | ||
// return { | ||
// pubkey: key.key, | ||
// isSigner: false, | ||
// isWritable: false, | ||
// }; | ||
// } else { | ||
// return { | ||
// pubkey: key.key.publicKey(), | ||
// isSigner: true, | ||
// isWritable: false, | ||
// }; | ||
// } | ||
// if ('publicKey' in key.key && typeof key.key.publicKey == 'function') { | ||
if ((0, data_source_1.isAsyncSigner)(key.key)) { | ||
return { | ||
pubkey: key.key, | ||
isSigner: false, | ||
pubkey: key.key.publicKey(), | ||
isSigner: true, | ||
isWritable: false, | ||
@@ -219,4 +233,4 @@ }; | ||
return { | ||
pubkey: key.key.publicKey(), | ||
isSigner: true, | ||
pubkey: key.key, | ||
isSigner: false, | ||
isWritable: false, | ||
@@ -232,3 +246,5 @@ }; | ||
.map((key) => key.key) | ||
.filter((key) => !(key instanceof web3_js_1.PublicKey)), | ||
// .filter((key): key is AsyncSigner => !(key instanceof PublicKey)), | ||
// .filter((key): key is AsyncSigner => isAsyncSigner(key)), | ||
.filter(data_source_1.isAsyncSigner), | ||
], | ||
@@ -235,0 +251,0 @@ }); |
{ | ||
"name": "@staratlas/player-profile", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "> TODO: description", | ||
@@ -22,6 +22,6 @@ "author": "Brett Etter <brett.etter@staratlas.com>", | ||
"@solana/web3.js": "^1.66.2", | ||
"@staratlas/data-source": "^0.2.0", | ||
"@staratlas/idls": "^0.2.0" | ||
"@staratlas/data-source": "^0.2.1", | ||
"@staratlas/idls": "^0.2.1" | ||
}, | ||
"gitHead": "7835a1674a83fb9fba28ed3f82f11820a284d3df" | ||
"gitHead": "85119c642c3b2a0c79f15e3e766655f4b74a975f" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73027
783
Updated@staratlas/idls@^0.2.1